FW: addding "CID" and leased address to logging

raz khan callirazo at hotmail.com
Wed Aug 22 16:31:33 UTC 2012



From: callirazo at hotmail.com
To: dhcp-users at lists.isc.org
Subject: addding "CID" and leased address to logging
Date: Wed, 22 Aug 2012 14:05:14 +0000




Hi,

 

I am running dhcpd version
V3.0.5-RedHat on a CentOS based server. This server serves LT2P users
terminating on an LNS, and the LNS relays the DHCP requests here. All seems to
be working O.K, however I need to get the CID (the end user’s username) in the
dhcpd log file. Currently with log facility defined in the conf file and syslog
is configured to forward logs to a separate file I am getting the usual dhcpd
logs about DHCPACK and DHCPREQUEST. 

I need to have the CID
information along with leased IP address in the log file. I have been searching
a lot, and I think the clue is in the log (info, concat….), but I am not sure
how this works, as I can’t find any documentation.

How can I use this feature to
get the CID and the leased IP, I know the LNS is sending over this information
as I captured the dhcp packets and it shows the CID;

 

13:04:41.005695 IP (tos 0x0,
ttl 254, id 49155, offset 0, flags [none], proto: UDP (17), length: 324)
xxxxxxxxxxx > xxxxxxxxxxxxx: [udp sum ok] BOOTP/DHCd:4a:fa:18, length: 296,
xid:0x33d5, flags: [none] (0x0000)

          Gateway IP: xx.xx.xx.xx

          Client Ethernet Address: xxxxxxxxxxxx

          Vendor-rfc1048:

            DHCP:REQUEST

            MSZ:1152

            CID:"test at foo"

            SID:xx.xx.xx.xx

            RQ:xx.xx.xx.xx

            LT:3600

            PR:SM+NS+DN+WNS

 

This information is passed on
to the lease file but not to the default log file. My dhcpd.conf file is

 

#

# DHCP Server Configuration
file.

#   see /usr/share/doc/dhcp*/dhcpd.conf.sample

#

 

ddns-update-style interim;

ignore client-updates;

log-facility local0;

 

subnet xx.xx.xx.xx netmask
xx.xx.xx.xx {

log(info,);

range xx.xx.xx.xx
xx.xx.xx.xx;

option domain-name-servers
xx.xx.xx.xx, yy.yy.yy.yy;

max-lease-time 3600;

 

range xx.xx.xx.xx
xx.xx.xx.xx;

option domain-name-servers
xx.xx.xx.xx, yy.yy.yy.yy;

max-lease-time 3600;

}

 

Syslog has got an entry as;

 

#DHCP log messages

local0.*                                               
/var/log/dhcpd.log

 

 

Any help will be appreciated.

 

Thanks

 

RR 



  		 	   		   		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.isc.org/pipermail/dhcp-users/attachments/20120822/b9ae3cdf/attachment.html>


More information about the dhcp-users mailing list