question about DHCPACK log entries
Tim Peiffer
peiffer at umn.edu
Thu Mar 1 22:00:18 UTC 2007
At 12:45, the DHCP server responded to a relayed (AKA broadcast)
DHCPREQUEST. At 13:11, it responded to the same MAC via unicast. There
are a few wrinkles according to the source.. server/dhcp.c +1224 :
/* RFC2131 states the server SHOULD unciast to ciaddr.
* There are two wrinkles - relays, and when ciaddr is zero.
* There's actually no mention of relays at all in rfc2131 in
* regard to DHCPINFORM, except to say we might get packets from
* clients via them. Note: relays unicast to clients to the
* "yiaddr" address, which servers are forbidden to set when
* answering an inform.
*
* The solution: If ciaddr is zero, and giaddr is set, go via the
* relay with the broadcast flag set to help the relay (with no
* yiaddr and very likely no chaddr, it will have no idea where to
* send the packet).
*
* If the ciaddr is zero and giaddr is not set, go via the source
* IP address (but you are permitted to barf on their shoes).
*
* If ciaddr is not zero, send the packet there always.
*/
Tim Peiffer
Networking and Telecommunications Services
University of Minnesota
Kirsten Petersen wrote:
> I have a script that parses our dhcp logs to generate a happy little table
> of mac->ip addresses mappings for a particular subnet. Because I only
> care about the one subnet, I was doing a regular expression match on the
> gateway IP. But then I noticed that the format of the DHCPACK log entries
> isn't always the same - and sometimes doesn't include the gateway address.
> Examples follow. Can someone shed a little light on what is happening
> here? We are running 3.0.4, fyi.
>
> Log entries in question:
>
> Mar 1 12:45:48 ns1 dhcpd: DHCPACK on 128.193.143.180 to 00:16:6f:67:89:e6
> via 128.193.136.1
> Mar 1 12:45:48 ns2 dhcpd: DHCPACK on 128.193.143.180 to 00:16:6f:67:89:e6
> via 128.193.136.1
> Mar 1 13:11:02 ns1 dhcpd: DHCPACK on 128.193.143.180 to 00:16:6f:67:89:e6
> via eth0
> Mar 1 13:11:11 ns1 dhcpd: DHCPACK on 128.193.143.180 to 00:16:6f:67:89:e6
> via eth0
>
> Notice that at 12:45, the ACK log entry includes the gateway address, but
> at 13:11, it does not. Why is that?
>
> Thanks in advance.
>
> ________________
> Kirsten Petersen
> Network Services * Oregon State University
> http://oregonstate.edu/net * irc.oregonstate.edu #osu-is
> "If you're not learning, you're not living."
>
>
More information about the dhcp-users
mailing list