Reservation best practices?

Simon Hobson dhcp1 at thehobsons.co.uk
Wed Jul 13 18:19:48 UTC 2011


Joshua Beard wrote:

>Example subnet:
>subnet 172.30.112.0 netmask 255.255.240.0 {
>		authoritative;
>
>		# This is the full range
>		#range 172.30.112.3 172.30.127.254;
>
>		pool {
>		range 172.30.115.1 172.30.127.254;
>				option subnet-mask              255.255.240.0;
>				option broadcast-address        172.30.112.255;
>				option routers                  172.30.112.2;
>		}
>
>} # // ITdept
>
>
>
>Example printer reservation:
>host vnbandk3920.dsdk12.schoollocal {
>     hardware ethernet 00:c0:ee:7d:bc:80;
>     fixed-address 172.30.176.243;
>}

That's a simple and easy mistake to make. The routers option is only 
in-scope for the pool it's defined it - and so isn't applied to the 
printer which isn't getting a dynamic address from that pool. The 
fact that the IP address is in the range doesn't matter - it's 
getting it's lease thanks to the host statement and fixed address.

You should put your subnet options in the subnet scope, like this :

subnet 172.30.112.0 netmask 255.255.240.0 {
   authoritative;
   option subnet-mask              255.255.240.0;
   option broadcast-address        172.30.112.255;
   option routers                  172.30.112.2;
   pool {
     range 172.30.115.1 172.30.127.254;
   }
} # // ITdept

That way, they will be inherited by any device that gets an address 
in that subnet - even if it doesn't get it via that dynamic pool.


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