Option 82 AID

Ray Phillips r.phillips at uq.edu.au
Fri Sep 18 08:00:07 UTC 2009


Recently dhcp snooping was enabled on our Cisco switches so I've used 
some code I found on this list to log the option 82 data:

if exists agent.circuit-id {
     log (info, concat( "Lease for ",
         binary-to-ascii (10, 8, ".", leased-address),
         " is connected to interface ",
         binary-to-ascii (10, 8, "/", suffix (option agent.circuit-id, 2)),
         ", VLAN ",
         binary-to-ascii (10, 16, "", substring (option 
agent.circuit-id, 2, 2)),
         " on switch ",
         substring (option agent.remote-id, 2, 256)));

     log (info, concat( "Lease for ",
         binary-to-ascii (10, 8, ".", leased-address),
         " raw option-82 info is CID: ",
         binary-to-ascii (10, 8, ".", option agent.circuit-id),
         " AID: ",
         binary-to-ascii(16, 8, ".", option agent.remote-id)));
}

which is working fine.

CID stands for Circuit ID I presume, but can someone tell me what the 
abbreviation AID stands for please?

The switch's names, not their MAC addresses, are put into the Option 
82 space.  Since I wanted to use code that would work for any 
reasonable name length I used the value 256 in the second substring 
function because I couldn't find any way to calculate a string's 
length.  Is there some way to do that?

By the way, the dhcp-eval(5) man page contains this entry:

        number

          Any number between zero and the maximum  representable  size  may  be
          specified as a numeric expression.

by doesn't elaborate on what the the maximum representable size might 
be, so how is it defined?


Ray



More information about the dhcp-users mailing list