DHCP Message Format

The developers of DHCP needed to maintain compatibility with BOOTP and consequently used the same BOOTP message format. However, because DHCP has more functionality than BOOTP, the DHCP options field was added. When communicating with older BOOTP clients, the DHCP options field is ignored.
Operation Code (OP) - Specifies the general type of message. A value of 1 indicates a request message; a value of 2 is a reply message.
Hardware Type - Identifies the type of hardware used in the network. For example, 1 is Ethernet, 15' is Frame Relay, and 20 is a serial line. These are the same codes used in ARP messages.
Hardware Address length - 8 bits to specify the length of the address.
Hops - Set to 0 by a client before transmitting a request and used by relay agents to control the forwarding of DHCP messages.
Transaction Identifier - 32-bit identification generated by the client to allow it to match up the request with replies received from DHCP servers.
Seconds - Number of seconds elapsed since a client began attempting to acquire or renew a lease. Busy DHCP servers use this number to prioritize replies when multiple client requests are outstanding.
Flags - Only one of the 16 bits is used, which is the broadcast flag. A client that does not know its IP address when it sends a request, sets the flag to 1. This value tells the DHCP server or relay agent receiving the request that it should send the reply back as a broadcast.
Client IP Address - The client puts its own IP address in this field if and only if it has a valid IP address while in the bound state; otherwise, it sets the field to 0. The client can only use this field when its address is actually valid and usable, not during the process of acquiring an address.
Your IP Address - IP address that the server assigns to the client.
Server IP Address - Address of the server that the client should use for the next step in the bootstrap process, which may or may not be the server sending this reply. The sending server always includes its own IP address in a special field called the Server Identifier DHCP option.
Gateway IP Address - Routes DHCP messages when DHCP relay agents are involved. The gateway address facilitates communications of DHCP requests and replies between the client and a server that are on different subnets or networks.
Client Hardware Address - Specifies the Physical layer of the client.
Server Name - The server sending a DHCPOFFER or DHCPACK message may optionally put its name in this field. This can be a simple text nickname or a DNS domain name, such as dhcpserver.netacad.net.
Boot Filename - Optionally used by a client to request a particular type of boot file in a DHCPDISCOVER message. Used by a server in a DHCPOFFER to fully specify a boot file directory and filename.
Options - Holds DHCP options, including several parameters required for basic DHCP operation. This field is variable in length. Both client and server may use this field.
DHCP Discovery and Offer Methods
When a client wants to join the network, it requests addressing values from the network DHCP server. If a client is configured to receive its IP settings dynamically, it transmits a DHCPDISCOVER message on its local physical subnet when it boots or senses an active network connection. Because the client has no way of knowing the subnet to which it belongs, the DHCPDISCOVER is an IP broadcast (destination IP address of The client does not have a configured IP address, so the source IP address of is used. As you see in the figure, the client IP address (CIADDR), default gateway address (GIADDR), and subnetwork mask are all marked with question marks.
When the DHCP server receives the DHCPDISCOVER message, it responds with a DHCPOFFER message. This message contains initial configuration information for the client, including the MAC address of the client, followed by the IP address that the server is offering, the subnet mask, the lease duration, and the IP address of the DHCP server making the offer. The subnet mask and default gateway are specified in the options field, subnet mask, and router options, respectively. The DHCPOFFER message can be configured to include other information, such as the lease renewal time, domain name server, and NetBIOS Name Service (Microsoft Windows Internet Name Service [Microsoft WINS]).
The server determines the configuration, based on the hardware address of the client as specified in the CHADDR field.
Administrators set up DHCP servers to assign addresses from predefined pools. Most DHCP servers also allow the administrator to define specifically which client MAC addresses can be serviced and automatically assign them the same IP address each time.
DHCP uses User Datagram Protocol (UDP) as its transport protocol. The client sends messages to the server on port 67. The server sends messages to the client on port 68.
The client and server acknowledge messages, and the process is complete. The client sets the CIADDR only when a host is in a bound state, which means that the client has confirmed and is using the IP address.
For more information on DHCP, see "Cisco IOS DHCP Server" at: http://www.cisco.com/univercd/cc/td/doc/product/software/ios120/120newft/120t/120t1/easyip2.htm#wp4363.


Post a Comment


NBA Live Streaming. Copyright 2008 All Rights Reserved Revolution Two Church theme by Brian Gardner Converted into Blogger Template by Bloganol dot com | Distributed by Blogger Templates Blog