Option 82 logging on dhcpd 4.1.1 and red hat 6
Alex Moen
alexm at ndtel.com
Tue Oct 4 16:12:32 UTC 2016
Just comparing with mine, it seems that the "option agent.circuit-id"
needs to be in parens. And, I don't know the use of the
"(leased-address)" is. So, try this:
-----------------------------------------------------
## Option 82 Class
class "myvendor" {
match if option agent.circuit-id = 00:04:00:6b:00:84;
}
# Test Option 82 logging
if exists agent.circuit-id
{
log (info, concat(
"Lease for ", binary-to-ascii (10, 8, ".", leased-address),
" with circuit-id ", (option agent.circuit-id),
" is assigned using Option82"
));
}
pool {
allow members of "myvendor";
range x.x.x.x x.x.x.x;
}
-----------------------------------------------------
This should give you a line that looks something like:
Lease for 192.168.0.10 with circuit-id Ethernet 5 is assigned using Option82
Obviously, your circuit-id will most likely be something other than
"Ethernet 5", but you get the idea.
If I'm way off base, someone please correct me!
Good luck,
Alex
On 10/04/2016 10:27 AM, project722 wrote:
> Hello DHCP experts! We are implementing Option 82 in our network and I
> am just scratching the surface of how to setup my server. I have
> successfully created my first Option 82 ACL based on the agent circuit
> ID that is contained in the packet, now I just need guidance on how I
> get the Option 82 data into the logs. Here is my O82 setup on the server:
>
> ## Option 82 Class
> class "myvendor" {
> match if option agent.circuit-id = 00:04:00:6b:00:84;
> }
>
> # Test Option 82 logging
> if exists agent.circuit-id
> {
> log (info, concat( "Lease for ", option agent.circuit-id
> (leased-address), "is an address assigned using Option82"));
> }
>
> pool {
> allow members of "myvendor";
> range x.x.x.x x.x.x.x;
> }
>
> The problem I am having is when I go to check the conf before
> restarting dhcpd I am getting the error:
>
> etc/dhcp/dhcpd.conf line 135: right parenthesis expected.
> log (info, concat( "Lease for ", option agent.circuit-id (
> ^
> Can anyone tell me what I am doing wrong and how to fix this error?
>
>
> _______________________________________________
> dhcp-users mailing list
> dhcp-users at lists.isc.org
> https://lists.isc.org/mailman/listinfo/dhcp-users
--
Alex Moen
NSTII
Calix System Specialist
North Dakota Telephone Company
701-662-6481
More information about the dhcp-users
mailing list