authorized mac ONLY dhcp
Simon Hobson
dhcp1 at thehobsons.co.uk
Mon Nov 10 08:14:00 UTC 2008
Zhaohui Wang wrote:
>I am using isc dhcpd version3. Can anyone present a conf file
>example showing that how to config dhcpd for autherized mac address
>only?
'man dhcpd.conf'
>I need all other unknow MACs dhcp request ignored.
>Here is my draft dhcpd.conf file, but can not get dhcpd started. Any
>correction or guide would be greatly appreciated.
>
>
>============================================
>ddns-update-style interim;
>ignore client-updates;
>range dynamic-bootp 192.168.0.128 192.168.0.254;
>default-lease-time 21600;
>
>
>host mx {
> hardware ethernet 00:1e:0f:fa:75:2e;
> fixed-address 192.168.0.7;
> option routers 192.168.0.1;
> option subnet-mask 255.255.255.0;
> option broadcast-address 192.168.0.255;
># option nis-domain "domain.org";
># option domain-name "domain.org";
> }
>==============================================
And what does it say when you try to start it - something about "No
subnet declaration for w.x.y.z" perhaps ? That should have given you
a clue.
Now, do you mean that you only want known clients to get a lease, but
they can be dynamic address, or that they should all have fixed
addresses, or a combination ?
Try this as an outline :
option domain-name-server a.b.c.d ;
<other global options here>
subnet 192.168.0.0 subnet-mask 255.255.255.0 {
option routers 192.168.0.1;
option subnet-mask 255.255.255.0;
option broadcast-address 192.168.0.255;
<other subnet specific options here>
pool {
allow known clients ;
range 192.168.0.100 192.168.0.199 ;
}
}
host mx {
hardware ethernet 00:1e:0f:fa:75:2e;
fixed-address 192.168.0.7;
}
host dynamic1 {
hardware ethernet aa:bb:cc:dd:ee:ff ;
}
If you don't want any dynamically addressed clients then simply omit
the whole pool declaration. But you must have the subnet
declaration(s) that matches the subnet on the interface(s) you are
serving - even if it has nothing in it but the subnet specific
options.
--
Simon Hobson
Visit http://www.magpiesnestpublishing.co.uk/ for books by acclaimed
author Gladys Hobson. Novels - poetry - short stories - ideal as
Christmas stocking fillers. Some available as e-books.
More information about the dhcp-users
mailing list