DHCP Message Generation, Addressing, Transport and Retransmission
(Page 1 of 3)
In the previous section, we examined extensively the operation of DHCP, and its client/server nature. Pretty much every aspect of the protocol's operation is oriented around the notion of a client device exchanging information with a server. We can also see this reflected in all of the major characteristics of DHCP messaging. This includes the format of DHCP messages, as well as the specifics of how DHCP messages are created, addressed and transmittedand when necessary, retransmitted.
DHCP messaging is similar in many ways to that of BOOTP, the protocol upon which DHCP was based. BOOTP defined only two message types, a request and a reply. DHCP is of course much more complex, using some eight different types of messages, but these are still categorized as either request or reply messages, depending on who sends them and why. DHCP uses a special DHCP Message Type option to indicate the exact DHCP message type, but still treats a message from a client seeking information as a request, and a response from a server containing information as a reply.
A client generates a message using the general DHCP message format, which is very similar to the BOOTP message format. When a server replies to a client message it does not generate the reply as a completely new message, but rather copies the client request, changes fields as appropriate, and sends the reply back to the client. A special transaction identifier (XID) is placed in the request and maintained in the reply, which allows a client know which reply goes with a particular request.
DHCP uses UDP for transport just as BOOTP does, and for the same reasons: simplicity and support for broadcasts. It also has many of the same addressing concerns that we discussed in the topic on BOOTP messaging and addressing. Clients usually will send requests by broadcast on the local network, to allow them to contact any available DHCP server. The exception to this is when a client is trying to renew a lease with a server that it already knows. For compatibility with BOOTP, DHCP uses the same well-known (reserved) UDP port number, 67, for client requests to servers.
Home - Table Of Contents - Contact Us
The TCP/IP Guide (http://www.TCPIPGuide.com)
Version 3.0 - Version Date: September 20, 2005
© Copyright 2001-2005 Charles M. Kozierok. All Rights Reserved.
Not responsible for any loss resulting from the use of this site.