Static IP via Option 82 - methodology

perl-list perl-list at network1.net
Wed Jan 8 17:30:43 UTC 2014


Folks, 

We have a scenario where we need to provide a static IP address to equipment based on the circuit-id portion of Option 82. We do this in the following example snippet (IPs and info changed to protect the innocent): 

------------------------ 


class "1-2-3-9" { 

match if option agent.circuit-id = "1.21.1.4/Ethernet9"; 

} 



shared-network EXAMPLE_YADA { 

subnet 1.2.0.0 netmask 255.255.0.0 { 

option routers 1.2.255.254; 

option subnet-mask 255.255.0.0; 

pool { 

min-lease-time 172800; 

default-lease-time 172800; 

max-lease-time 172800; 

server-name "1.1.0.12"; 

filename "SOME_FILE"; 

deny dynamic bootp clients; 

allow members of "1-2-3-9"; 

range 1.2.3.9; 

} 

} 

} 
------------------------ 

This is mainly done this way so that the equipment at the end of the circuit can be hot-swapped by low tech field personnel without the need for high tech personnel at the office to alter the DHCP configuration as there would be if the MAC address was the matching key. 

The problem we have run into is that when swapping the equipment, if the lease is still active (ie: the equipment is not completely broken and has updated its lease recently), then we have to wait until the lease expires before the new equipment will obtain its IP (1.2.3.9 in the example above). 

We could simply set the lease to a shorter length, but that wouldn't completely erase the problem and we would still have some length of time where the IP would be unobtainable. A better solution would be more like the host statement method like: 

------------------------ 


host 1-2-3-9 { hardware ethernet 01:03:05:07:09:aa; fixed-address 1.2.3.9; } 
------------------------ 



which does not have a lease associated with it and so would happily hand the IP to the new equipment. However, we need to do this with option 82. Is that possible in a host statement? If so, I've not heard that it is. 




Does anyone know of a possible solution to this problem (coaxing the DHCP server to not store a lease for the option 82 match assigned address)? 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.isc.org/pipermail/dhcp-users/attachments/20140108/d2738597/attachment.html>


More information about the dhcp-users mailing list