Static IP via Option 82 - methodology
perl-list
perl-list at network1.net
Thu Jan 30 14:26:47 UTC 2014
This worked in testing - Hooray! One question - The usual statements for logging received option 82 data did not work while using this method. Any particular reason why these statements didn't work (ie: the option 82 was not logged)? I know option 82 was present as the host {} statement matching option 82 assigned the correct address. These log statements work as expected when using class / pool statements to assign the address based on option 82.
Here are the logging statements:
--------------------------------------------------
if exists agent.circuit-id {
log ( error,
concat( "agent.circuit-id,", binary-to-ascii (10, 8, ".", leased-address),",",
"circuit-id,",option agent.circuit-id,",",
"time,",binary-to-ascii(10,32,"",encode-int (lease-time,32)),",",
"hardware,",binary-to-ascii(16,8,":",substring(hardware,1,7))
)
);
}
if exists agent.remote-id {
log ( error,
concat( "agent.remote-id,", binary-to-ascii (10, 8, ".", leased-address),",",
"remote-id,",option agent.remote-id,",",
"time,",binary-to-ascii(10,32,"",encode-int (lease-time,32)),",",
"hardware,",binary-to-ascii(16,8,":",substring(hardware,1,7))
)
);
}
--------------------------------------------------
----- Original Message -----
> From: "Peter Rathlev" <peter at rathlev.dk>
> To: "Users of ISC DHCP" <dhcp-users at lists.isc.org>
> Sent: Wednesday, January 22, 2014 5:51:49 PM
> Subject: Re: Static IP via Option 82 - methodology
> On Wed, 2014-01-22 at 14:32 -0500, perl-list wrote:
> > 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?
> That'll work fine. If server-name and filename are the same for several
> hosts you could also place it in the subnet declaration.
> Generally you can place options anywhere you want. Options placed
> outside everything ("global scope") are server to every client asking
> for them. Inside a subnet declaration it's server to every client in
> that subnet, including static hosts. Inside a pool it's only served to
> clients in that pool.
> --
> Peter
> _______________________________________________
> 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/20140130/057b10f8/attachment.html>
More information about the dhcp-users
mailing list