dhcp option 82 information
Glenn Satchell
Glenn.Satchell at uniq.com.au
Wed Aug 26 12:48:00 UTC 2009
>Date: Tue, 25 Aug 2009 21:33:58 -0400 (Eastern Daylight Time)
>From: Mike Diggins <mike.diggins at McMaster.CA>
>To: dhcp-users at lists.isc.org
>Subject: dhcp option 82 information
>
>My routers insert dhcp option 82 information into the DHCP requests so
>that my DHCP server knows what switch and port the request came from. Does
>anyone have an ISC DHCPd configuration that will extract that info and log
>it to syslog? I had been using this with RHEL4, but in RHEL5 64 bit, it
>doesn't quite work as expected.
>
>
># Log something useful if dhcp option 82 information is present
>#
>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 ",
> binary-to-ascii(16, 8, ":", substring( option agent.remote-id, 2, 6))));
>
> 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)));
>
>}
What if any log entries are you getting?
What facility and priority is set in dhcpd.conf and /etc/syslog.conf?
There may be a mismatch with the upgraded OS.
This is from dhcpd.conf man page for 4.1.1b1 (may be different on older
releases, in particular the default facility)
log-facility facility;
This statement causes the DHCP server to do all of its
logging on the specified log facility once the dhcpd.conf
file has been read. By default the DHCP server logs to
the daemon facility. Possible log facilities include
auth, authpriv, cron, daemon, ftp, kern, lpr, mail, mark,
news, ntp, security, syslog, user, uucp, and local0
through local7. Not all of these facilities are avail-
able on all systems, and there may be other facilities
available on other systems.
In addition to setting this value, you may need to modify
your syslog.conf file to configure logging of the DHCP
server. For example, you might add a line like this:
local7.debug /var/log/dhcpd.log
regards,
-glenn
More information about the dhcp-users
mailing list