<HTML><HEAD>
<META content="text/html; charset=utf-8" http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 8.00.6001.18812"></HEAD>
<BODY style="MARGIN: 4px 4px 1px; FONT: 10pt Tahoma">
<DIV>Tim,</DIV>
<DIV>option 82 info is pretty easy to log to syslog, provided you always hand back a lease. Something like this in the dhcpd.conf:</DIV>
<DIV> </DIV>
<DIV>if exists agent.circuit-id {<BR>        log(info,concat(binary-to-ascii(10,8,".",leased-address)," ASSIGNED TO AGENT.CIRCUIT-ID => ",option agent.circuit-id));<BR>}<BR></DIV>
<DIV>will produce output like:</DIV>
<DIV> </DIV>
<DIV>Mar 17 11:29:26 isg-dhcp dhcpd: [ID 702911 daemon.info] DHCPOFFER on 74.207.x.y to 00:1a:2b:54:a9:e2 via 74.207.128.1<BR>Mar 17 11:29:26 isg-dhcp dhcpd: [ID 702911 daemon.info] 74.207.x.y ASSIGNED TO AGENT.CIRCUIT-ID => 10.150.124.106:1-14-15-0-adsl-0-35-1415<BR><BR>BUT, be aware that in a no free leases situation, no offer will be made (which is what generates the logging above), and you will simply get this instead:</DIV>
<DIV> </DIV>
<DIV>Mar 17 11:28:24 isg-dhcp dhcpd: [ID 702911 daemon.error] DHCPDISCOVER from 00:40:36:22:5a:c0 via 74.207.128.1: network isg-test: no free leases</DIV>
<DIV> </DIV>
<DIV>Note there is no option 82 info on where your error is coming from. For us, this means one of our hundreds of relay agents has this customer MAC attached to it that is unable to get a lease, but which one?</DIV>
<DIV> </DIV>
<DIV>This patch claims to fix that, but I haven't tried it (yet):</DIV>
<DIV><A href="http://www.miquels.cistron.nl/isc-dhcpd/patch-server::02-log-agent-options">http://www.miquels.cistron.nl/isc-dhcpd/patch-server::02-log-agent-options</A></DIV>
<DIV> </DIV>
<DIV>As for question 2, I haven't really thought about that situation much and haven't had to troubleshoot by L2 address nearly as often as L3, so haven't found as much of a need for formatting it appropriately. Anyone else have any thoughts?</DIV>
<DIV> </DIV>
<DIV>HTH,</DIV>
<DIV> </DIV>
<DIV>--Marc<BR></DIV>
<DIV style="BORDER-LEFT: #050505 1px solid; BACKGROUND-COLOR: #f3f3f3; MARGIN: 0px 0px 0px 15px; PADDING-LEFT: 7px">Message: 4<BR>Date: Wed, 17 Mar 2010 11:34:49 -0700<BR>From: Tim Gavin <livewire98801@gmail.com><BR>Subject: Logging questions<BR>To: Users of ISC DHCP <dhcp-users@lists.isc.org><BR>Message-ID:<BR><10af9a9a1003171134l47b66ed9jaeb567a6d2d6b7a4@mail.gmail.com><BR>Content-Type: text/plain; charset=ISO-8859-1<BR><BR>I have two questions pertaining to logging.  I've looked through the<BR>archives, but can't make sense of the responses.  I think it's because<BR>everyone's trying to do more with it than I want to do.<BR><BR>First question:<BR><BR>I'm about to start getting option 82 information from our layer two<BR>vendor network (I admin a ISP fiber network), and it appears that<BR>people have issues getting that info logged into the syslog.  Is this<BR>something I have to add, or is it only when people use fancy logging<BR>scripts that this is an issue?  If it's something I have to add,<BR>what's the easiest way to do it?<BR><BR><BR>Second (less critical) question:<BR><BR>The MACs are logged in "computer standard" format of<BR>aa:bb:cc:dd:ee:ff.  This is all well and good normally, but all of my<BR>equipment, and all of our vendor's equipment is Cisco. That means I<BR>have to reformat every MAC when flipping back and forth between<BR>routers/switches and the DHCP server.  Is there any way I can change<BR>the logging format to aabb.ccdd.eeff ?<BR><BR>Thanks :)<BR><BR>Tim<BR></DIV></BODY></HTML>