Strange renew unicast - help needed

Peter Rathlev peter at rathlev.dk
Thu Jul 24 07:21:48 UTC 2014


On Wed, 2014-07-23 at 21:37 -0400, Nikolay P wrote:
> When it is time to renew the lease it sends unicast DHCPREQUEST to the
> server. In this request:
> 
> IP: 192.168.10.1 (xx:xx:xx:xx:xx:xx) > 192.168.1.1 (yy:yy:yy:yy:yy:yy)
> OP: 1 (BOOTREQUEST)
> FLAGS: 7f80
> CIADDR: 0.0.0.0
> YIADDR: 0.0.0.0
> SIADDR: 0.0.0.0
> GIADDR: 0.0.0.0
> OPTION: 50 Request IP address: 192.168.10.1

That looks like a malformed request. CIADDR is supposed to contain the
clients current IP address. From RFC 2131:

   : ciaddr  4  Client IP address; only filled in if client is in
   :            BOUND, RENEW or REBINDING state and can respond
   :            to ARP requests.

If on the other hand it was an initial request (i.e. the client has no
valid IP address) then either GIADDR should contian something or the
client is assumed to connected to the same segment as the server.

> Server replies:
> 
> IP: 192.168.1.1 (yy:yy:yy:yy:yy:yy) > 255.255.255.255 (ff:ff:ff:ff:ff:ff)
> OP: 2 (BOOTREPLY)
> FLAGS: 7f80
> CIADDR: 0.0.0.0
> YIADDR: 0.0.0.0
> SIADDR: 192.168.10.1
> GIADDR: 0.0.0.0
> OPTION: 53 DHCP message type 6 (DHCPNAK)
> OPTION: 56 Message requested address not available

The server apparently does what it's supposed to cf. RFC 2131 4.1
regarding destination IP address and MAC address:

   : [...] If 'giaddr' is zero and 'ciaddr' is zero, and the
   : broadcast bit is set, then the server broadcasts
   : DHCPOFFER and DHCPACK messages to 0xffffffff. If the
   : broadcast bit is not set and 'giaddr' is zero and
   : 'ciaddr' is zero, then the server unicasts DHCPOFFER
   : and DHCPACK messages to the client's hardware address
   : and 'yiaddr' address.  In all cases, when 'giaddr' is
   : zero, the server broadcasts any DHCPNAK messages to
   : 0xffffffff.

> What I understand from this is that client sends unicast to the server
> (which does not go thru the ip-helper) thus server receives it
> directly on interface eth0. It sees both CIADDR and GIADDR are zeros
> and replies with BROADCAST. Client can not receive it since they are
> on different VLANs.

Yup. But it's the client that misbehaves. GIADDR is supposed to be
zeroed out on a regular "renew" request, but CIADDR is supposed to
contain the currently held IP address.

> At some point T1 expires and client sends BROADCAST which goes to the
> ip-helper and client finally gets IP from server.

Does the client then get the same address again?

-- 
Peter



More information about the dhcp-users mailing list