Static IP via Option 82 - methodology

perl-list perl-list at network1.net
Wed May 21 16:40:41 UTC 2014


Resurrecting this older thread for a new related question. 

if the relay agent encodes the option 82 as binary data (as is the case with Cisco and Brocade systems, at least), How can one perform this match: 

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

host 10-24-24-9 { 

host-identifier option agent.circuit-id "<some circuit id>"; 

fixed-address 10.24.24.9; 

server-name "192.168.0.12"; 

filename "SomeCFG.cfg"; 

} 

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

If I was doing it with a class statement, it would be done something like this: 

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

class 10-24-24-9 { 

match if binary-to-ascii(10, 8, "", option agent.circuit-id) = " <some circuit id> "; 

} 

.... some pool/range with single address allowing members of class 10-24-24-9 

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

Don't want to do it with a class statement if I can help it as that prevents quick replacement of equipment until the lease expires (as address is already leased to previous equipment). host {} with fixed-address makes no lease and therefore quick swap of equipment at the end of the circuit meets no resistance. 

Thoughts? 

----- Original Message -----

> From: "perl-list" <perl-list at network1.net>
> To: "Users of ISC DHCP" <dhcp-users at lists.isc.org>
> Sent: Wednesday, January 22, 2014 2:32:54 PM
> Subject: Re: Static IP via Option 82 - methodology

> For example... would this work?:

> -----------------------------------------------------

> host 10-24-24-9 {

> host-identifier option agent.circuit-id "1.21.1.4/Ethernet9";

> fixed-address 10.24.24.9;

> server-name "192.168.0.12";

> filename "SomeCFG.cfg";

> }

> -----------------------------------------------------

> It passes muster as far as dhcpd doesn't complain and will run, but will the
> client receive the server-name / filename options?

> ----- Original Message -----

> > From: "perl-list" <perl-list at network1.net>
> 
> > To: "Users of ISC DHCP" <dhcp-users at lists.isc.org>
> 
> > Sent: Wednesday, January 22, 2014 12:25:11 PM
> 
> > Subject: Re: Static IP via Option 82 - methodology
> 

> > The problem, I am assuming here, seems to be that the initial DISCOVER -
> > OFFER - REQUEST - ACK at some point fails to include the option 82
> > circuit-id data in the return to the relay agent using the host statement
> > method. I'll break it down simply:
> 

> > Working method:
> 
> > ----------------------------------
> 

> > class "10-24-24-9" {
> 
> > match if option agent.circuit-id = "1.21.1.4/Ethernet9";
> 
> > }
> 

> > subnet 10.24.24.0 netmask 255.255.255.0 {
> 
> > option routers 10.24.24.1;
> 
> > option subnet-mask 255.255.255.0;
> 
> > pool {
> 
> > server-name "192.168.0.12";
> 
> > filename "SomeCFG.cfg";
> 
> > deny dynamic bootp clients;
> 
> > allow members of "10-24-24-9";
> 
> > range 10.24.24.9;
> 
> > }
> 

> > }
> 
> > ----------------------------------
> 

> > Non-working method:
> 
> > ----------------------------------
> 

> > subnet 10.24.24.0 netmask 255.255.255.0 {
> 
> > option routers 10.24.24.1;
> 
> > option subnet-mask 255.255.255.0;
> 

> > }
> 

> > host 10-24-24-9 {
> 
> > host-identifier option agent.circuit-id "1.21.1.4/Ethernet9";
> 
> > fixed-address 10.24.24.9;
> 
> > }
> 
> > ----------------------------------
> 

> > oh man - i think I just realized why this didn't work. No TFTP file/server
> > available. So now I have new questions as I didn't think about this before.
> 

> > Can I put 'server-name "192.168.0.12";' in the subnet {} statement or does
> > that have to be inside a pool {} statement?
> 

> > Can I put 'filename "SomeCFG.cfg";' in the host {} declaration as we need
> > different filenames for different hosts?
> 

> > _______________________________________________
> 
> > dhcp-users mailing list
> 
> > dhcp-users at lists.isc.org
> 
> > https://lists.isc.org/mailman/listinfo/dhcp-users
> 
> _______________________________________________
> dhcp-users mailing list
> dhcp-users at lists.isc.org
> https://lists.isc.org/mailman/listinfo/dhcp-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.isc.org/pipermail/dhcp-users/attachments/20140521/64d5c7bc/attachment.html>


More information about the dhcp-users mailing list