ignore hosts

Simon Hobson dhcp1 at thehobsons.co.uk
Fri Dec 9 20:59:57 UTC 2011


Anthony R Fletcher wrote:
>We run a non-authoritative DHCP server, version 4.2.1, on a network
>handing out IP addresses to certain hosts and we want to simply ignore
>(and not log) the rest. My config file looks like:
>
># Subnet setup.
>subnet 10.11.12.0 netmask 255.255.255.0
>{
>         option routers 10.11.12.1;
>         option broadcast-address 10.11.12.255;
>         option subnet-mask 255.255.255.0;
>
>	host host1 {
>		hardware ethernet 00:88:aa:43:00:8d;
>		fixed-address host1; }
>	}
>	#..... many others ....
>}
>
>
>However we get lots of logs like
>
>Dec  9 14:36:55 master dhcpd: DHCPDISCOVER from 00:22:44:d9:cd:e0 
>via eth0: network 10.11.12.0/24: no free leases
>
>How can I not log these messages for certain MACs or all unknown MACs?

Just use "ignore booting" and they'll be silently ignored. Also, put 
your host statement OUTSIDE the subnet declaration or you can get 
some very strange inheritance issues. It probably doesn't affect you, 
but it's the sort of thing that will catch you out if you do expand.

I think this ought to do it :

subnet 10.11.12.0 netmask 255.255.255.0
{
   option routers 10.11.12.1;
   option broadcast-address 10.11.12.255;
   option subnet-mask 255.255.255.0;
   ignore booting ;
}

group {
   allow booting ;
   host host1 {
     hardware ethernet 00:88:aa:43:00:8d;
     fixed-address host1; }
   }
   #..... many others ....
}

-- 
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