Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Networking
User Name
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.


  Search this Thread
Old 05-10-2008, 06:39 AM   #1
LQ Newbie
Registered: Feb 2007
Location: Morgantown, WV
Distribution: RedHat, Fedora
Posts: 24

Rep: Reputation: 16
DHCP option 82 remote-id

The newer cisco code allows you inject a string or switch host name for the agent.remote-idused 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
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 field im looking for .. 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 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 MAC 0:d:60:78:65:bb ROUTER

I want/need the Switch name to be
Swith hsc-2260


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
DHCP server not using 'option interface-mtu'? Moloko Linux - Networking 2 01-09-2010 11:30 AM
pring option in DHCP salahuddin_66 Slackware 1 06-26-2004 03:50 AM
DHCP option for SIP yrraja Linux - Networking 3 09-19-2002 10:33 PM
dhcp, option routers lalu Linux - General 1 09-13-2001 08:07 AM
DHCP-server. option routers lalu Linux - General 0 09-13-2001 01:46 AM > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 01:00 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration