What constitutes a "commit"
Norman Elton
normelton at gmail.com
Mon Jul 11 18:23:03 UTC 2011
I've got an "on commit" stanza that sends a syslog every time a lease
is committed. Trouble is, I'm not entirely sure exactly what triggers
this condition. I'm getting logs for most clients connecting, but not
all.
Here's a sample of a client coming online and doing a full DHCP
transaction (discover / offer / request / ack), but no commit message.
In this particular case, there are two servers configured for
failover. The logs on the individual servers show a client coming
online:
Jul 11 14:13:03 landlord03 dhcpd: [ID 702911 local7.info] DHCPREQUEST
for 128.239.16.169 from c8:2a:14:06:51:06 via 128.239.36.1: wrong
network.
Jul 11 14:13:03 landlord03 dhcpd: [ID 702911 local7.info] DHCPNAK on
128.239.16.169 to c8:2a:14:06:51:06 via 128.239.36.1
Jul 11 14:13:03 landlord03 dhcpd: [ID 702911 local7.debug]
DHCPDISCOVER from c8:2a:14:06:51:06 via 128.239.36.1: load balance to
peer wm-dhcp-03-04
Jul 11 14:13:05 landlord03 dhcpd: [ID 702911 local7.debug] DHCPREQUEST
for 128.239.37.123 (128.239.10.124) from c8:2a:14:06:51:06 via
128.239.36.1: lease owned by peer
Jul 11 14:13:03 landlord04 dhcpd: [ID 702911 local7.info] DHCPREQUEST
for 128.239.16.169 from c8:2a:14:06:51:06 via 128.239.36.1: wrong
network.
Jul 11 14:13:03 landlord04 dhcpd: [ID 702911 local7.info] DHCPNAK on
128.239.16.169 to c8:2a:14:06:51:06 via 128.239.36.1
Jul 11 14:13:03 landlord04 dhcpd: [ID 702911 local7.info] DHCPDISCOVER
from c8:2a:14:06:51:06 via 128.239.36.1
Jul 11 14:13:04 landlord04 dhcpd: [ID 702911 local7.info] DHCPOFFER on
128.239.37.123 to c8:2a:14:06:51:06 via 128.239.36.1
Jul 11 14:13:05 landlord04 dhcpd: [ID 702911 local7.info] DHCPREQUEST
for 128.239.37.123 (128.239.10.124) from c8:2a:14:06:51:06 via
128.239.36.1
Jul 11 14:13:05 landlord04 dhcpd: [ID 702911 local7.info] DHCPACK on
128.239.37.123 to c8:2a:14:06:51:06 via 128.239.36.1
All fine and dandy. But where is my commit syslog? Here's the stanza I'm using:
on commit {
if exists host-name {
log(info, concat(
"DHCPCOMMIT ",
binary-to-ascii (16, 8, ":", substring (hardware, 1,6)),
" ",
binary-to-ascii (10, 8, ".", leased-address),
" ",
binary-to-ascii (10, 32, "", encode-int (lease-time,32)),
" ",
option host-name
));
} else {
log(info, concat(
"DHCPCOMMIT ",
binary-to-ascii (16, 8, ":", substring (hardware, 1,6)),
" ",
binary-to-ascii (10, 8, ".", leased-address),
" ",
binary-to-ascii (10, 32, "", encode-int (lease-time,32)),
" "
));
}
}
Any ideas?
Thanks
Norman
More information about the dhcp-users
mailing list