Copyright

Return to index

*************************************

When a DHCP client (with an existing DHCP lease) boots, it issues a DHCPRequest. This is a broadcast to verify that the DHCP client's IP is still good. Because DHCPRequest is a broadcast, it will (in most cases) not cross routers. So, if your DHCP server isn't on the same segment as the client, the packet must be forwarded to the DHCP server by either a DHCP relay agent or a router with bootp/DHCP forwarding enabled.

When the DHCP server receives a DHCPRequest, it checks to see, whether the request was forwarded (by a DHCP relay or router) or received directly from a client on the local segment.

1)If the request was forwarded, then the forwarding agent will have added the IP of the NIC on which it received the DHCPRequest broadcast to the packet (in the giaddr field) before forwarding it to the DHCP server. The DHCP server will use this IP to determine the appropriate scope.

2) If the request was received directly from a local client (the giaddr field is blank), then primary IP of the NIC on which the request was received will be used to determine the appropriate scope.

The DHCP server checks its scopes to see, if any are defined for the same subnet as the IP on which the initial DHCPRequest broadcast was received (by the DHCP server or the DHCP relay agent). If it finds a matching scope, it verifies that the IP requested by the client is in the same subnet and is not already leased. If these checks succeed, the DHCP server replies with a DHCPAck and a new lease. If one of the checks fails, the server replies with a DHCPNack.

If the client receives a DHCPAck, it will reset the lease to reflect the new term passed with the Ack and continue its boot sequence.

If the client receives a DHCPNack, it will drop the existing IP and start over as a new client (e.g. Issue a DHCPDiscover to get a new IP).

*************************************