Option 82 log agent.remote-id

Tom Greaser tgreaser at hsc.wvu.edu
Fri May 9 11:39:29 UTC 2008


I did my best to search the archives .. as I was sure this question has been asked..

The newer cisco code allows you inject a string or switch host name for the agent.remote-id
used hsc-2260 as the string on the switch.  I see it in the sniff packets, but i cant seem to figure out how to get it in the logs..

If someone has already done so,  would you post your dhcp conf ..  If not.. I cant seem to find
the url / pdf / txt i had on how the log concat worked..  any direction on a good howto to 
re learn how to get the data out would be very helpful..

Like 99% of the people out there i got my base conf from  http://www.thtech.net/article/10
the second snip .. i did find on the net but can remember where.. (just want to give credit where credit is do)

1 last thing.. Ive been reading around so much / diff vendor stuff.. I just want to make sure the ver of isc dhcp we have
running support the agent.remote-id .. I think it does.. but way more smarter people on this list than I.

here is my current log statement   dhcp V3.0.5-RedHat


if exists agent.circuit-id
{
        log ( info, concat( "Lease for ", binary-to-ascii (10, 8, ".", leased-address), " connected to interface ",
        binary-to-ascii (10, 8, "/", suffix ( option agent.circuit-id, 2)), " (3750s subtract 2or4!), VLAN ",
        binary-to-ascii (10, 16, "", substring( option agent.circuit-id, 2, 2)),  " HWADD ",
        binary-to-ascii(16, 8, ":", hardware)));

        log ( info, concat ( "Switch" ,binary-to-ascii (10,8,"", substring(option agent.remote-id,9,1)),
         binary-to-ascii(10,16,"",suffix(option agent.remote-id,2)),
         " IP ", (binary-to-ascii(10, 8, ".", packet(12,4))),
         " MAC ", (binary-to-ascii(16, 8, ":", suffix(hardware,6))),
         " ROUTER ", (binary-to-ascii(10,8,".",substring(option agent.remote-id,4,4)))));

}

dhcpd.log output

May  9 07:28:40 pippin dhcpd: Lease for 10.3.3.16 connected to interface 1/4 (3750s subtract 2or4!), VLAN 3 HWADD 1:0:d:60:78:65:bb
May  9 07:28:40 pippin dhcpd: Switch4813872 IP 0.0.0.0 MAC 0:d:60:78:65:bb ROUTER 99.45.50.50











More information about the dhcp-users mailing list