Why is the DHCPREQUEST message sent as a broadcast during the DHCPv4 process

The interaction between Dynamic Host Configuration Protocol (DHCP) clients and servers enables a client to obtain its IP address and corresponding configuration information from a DHCP server.

This process occurs through a series of steps, illustrated in the following figure.

Figure 1. DHCP client-server interaction

Why is the DHCPREQUEST message sent as a broadcast during the DHCPv4 process

Client requests DHCP information: DHCPDISCOVERFirst, the client sends out a DHCPDISCOVER message requesting an IP address. The DHCPDISCOVER message contains an identifier unique to the client (typically the MAC address). The message might also contain other requests, such as requested options (for example, subnet mask, domain name server, domain name, or static route). The message is sent out as a broadcast. If the network contains routers, those routers can be configured to forward DHCPDISCOVER packets to DHCP servers on attached networks.DHCP server offers information to client: DHCPOFFERAny DHCP server that receives the DHCPDISCOVER message might send a DHCPOFFER message in response. The DHCP server might not send a DHCPOFFER message back to the client for multiple reasons: the most common reasons are that all available addresses are currently leased, the subnet is not configured, or the client is not supported. If the DHCP server sends a DHCPOFFER message in response, the DHCPOFFER will contain an available IP address and any other configuration information that is defined in the DHCP setup.Client accepts DHCP server offer: DHCPREQUESTThe client receives DHCPOFFER messages from the DHCP servers that responded to the DHCPDISCOVER messages. The client compares the offers with the settings that it requested, and then selects the server that it wants to use. It sends a DHCPREQUEST message to accept the offer, indicating which server it selected. This message is broadcast to the entire network to let all DHCP servers know which server was selected.DHCP server acknowledges the client and leases the IP address: DHCPACKIf a server receives a DHCPREQUEST message, the server marks the address as leased. Servers that are not selected will return offered addresses to their available pool. The selected server sends the client an acknowledgment (DHCPACK), which contains additional configuration information.

The client might now use the IP address and configuration parameters. It will use these settings until its lease expires or until the client sends a DHCPRELEASE message to the server to end the lease.

DHCP uses a four-step process to lease IP addressing information to DCHP clients. The four steps are named after the DHCP packet types.

1. DHCP discover

2. DHCP offer

3. DHCP request

4. DHCP acknowledgement or DHCP negative acknowledgement

Definition

The DHCP client broadcasts a DHCPDISCOVER packet

The DHCP lease generation process is the process by which the DHCP client receives IP addressing configuration data from the DHCP server.

The DHCP client broadcasts a DHCPDISCOVER packet to locate a DHCP server. A DHCPDISCOVER packet is a message that DHCP clients send the first time that they attempt to log onto the network and request IP address information from a DHCP server.

There are two ways that the lease generation process can begin. The first occurs when a client computer either starts up or initializes TCP/IP for the first time. The second occurs when a client attempts to renew its lease and is denied. (For example, a client can be denied a renewal when you move it to another subnet.)

The DHCP server broadcasts a DHCPOFFER packet

The DHCP client broadcasts a DHCPREQUEST packet

The DHCP server broadcasts a DHCPACK packet

The DHCP server broadcasts a DHCPOFFER packet to the client. A DHCPOFFER packet is a message that DHCP servers use to offer the lease of an IP address to a DHCP client when it starts on the network.

Each responding DHCP server reserves the offered IP address in order not offer it to another DHCP client before the requesting client's acceptance.

If the client does not receive an offer after four requests, it uses an IP address in the reserved range from 169.254.0.1 to 169.254.255.254. The use of one of these auto-configured IP addresses ensures that clients located on a subnet with an unavailable DHCP server are able to communicate with each other. The DHCP client continues to attempt to find an available DHCP server every five minutes. When a DHCP server becomes available, clients receive valid IP addresses, allowing those clients to communicate with hosts both on and off their subnet.

The DHCP client broadcasts a DHCPREQUEST packet. A DHCPREQUEST packet is a message that a client sends to the DHCP server to request or renew the lease of the client's IP address.

The DHCP client responds to the first DHCPOFFER packet that it receives by broadcasting a DHCPREQUEST packet to accept the offer. The DHCPREQUEST packet includes the identification of the server whose offer the client accepted. All other DHCP servers then retract their offers and retain their IP addresses for other IP lease requests.

The DHCP server broadcasts a DHCPACK packet to the client. A DHCPACK packet is a message that the DHCP server sends to a client to acknowledge and complete a client's request for leased configuration. This message contains a valid lease for the IP address and other IP configuration data.

When the DHCP client receives the acknowledgment, TCP/IP initializes by using the IP configuration data that the DHCP server provides. The client also binds the TCP/IP protocol to the network services and network adapter, permitting the client to communicate on the network.

The DHCP server sends a DHCP negative acknowledgement (DHCPNAK packet) if the IP address that was offered is no longer valid or is now in use by another computer. The client must then begin the lease process again.

Important A DHCP server and a DHCP client communicate by using User Datagram Protocol (UDP) ports 67 and 68. Some switches do not properly forward DHCP broadcasts by default. For DHCP to function correctly, you may need to configure these switches to forward broadcasts over these ports.

Why is the DHCP request message sent as a broadcast?

It sends a DHCPREQUEST message to accept the offer, indicating which server it selected. This message is broadcast to the entire network to let all DHCP servers know which server was selected.

Which message type is sent by the DHCPv4 client to accept an IPv4 address and parameters?

The broadcast DHCPDISCOVER message finds DHCPv4 servers on the network. When the DHCPv4 server receives a DHCPDISCOVER message, it reserves an available IPv4 address to lease to the client and sends the unicast DHCPOFFER message to the requesting client.

Which destination IPv4 address does a DHCPv4 client use to send the initial DHCP discover packet when the client is looking for DHCP server?

DHCPv4 Operation The client transmits a DHCPDISCOVER message on its local network 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 message is an IPv4 broadcast (destination IPv4 address of 255.255. 255.255).