1

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? I have tried multiple parenthesis locations and configuration but it keeps complaining about them.

1 Answer 1

1

I'm assuming you'd like to have a log line like:

Lease <ip address>, circuit id <circuit-id> is assigned using Option82

I guess this should work:

log(info, concat(
   "Lease ", 
   binary-to-ascii(10, 8, ".", leased-address),
   ", circuit id", 
   option agent.circuit-id, 
   " is assigned using Option82")
);

Be aware that if your circuit id field is binary (eg, not a regular human readable value), you need to convert it first to get something readable out of it. See also man dhcp-eval.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .