What is the correct order of DHCP to obtain an IP address?

 Our internal self-test result shows that a Windows 7 client PC does NOT send a DHCP Release message even after a normal log-off (power off). Thus, the client PC releases the allocated IP address to the DHCP server upon the expiration of the specified lease time.

The DHCP server must first be installed and configured by a system administrator. During configuration, the administrator enters information about the network that clients will need to operate on the network. After this information is in place, clients are able to request and receive network information.

The sequence of events for DHCP service is shown in the following diagram. The numbers in circles correlate to the numbered items in the description following the diagram.

Figure 7–1 Sequence of Events for DHCP Service

What is the correct order of DHCP to obtain an IP address?

LEGEND:

  1. The client discovers a DHCP server by broadcasting a discover message to the limited broadcast address (255.255.255.255) on the local subnet. If a router is present and configured to behave as a BOOTP relay agent, the request is passed to other DHCP servers on different subnets. The client's broadcast includes its unique ID, which in the Solaris DHCP implementation, is derived from the client's Media Access Control (MAC) address. On an Ethernet network, the MAC address is the same as the Ethernet address.

    DHCP servers that receive the discover message can determine the client's network by looking at the following information:

    • Which network interface did the request come in on? This tells the server that the client is either on the network to which the interface is connected, or that the client is using a BOOTP relay agent connected to that network.

    • Does the request include the IP address of a BOOTP relay agent? When a request passes through a relay agent, the relay agent inserts its address in the request header. When the server detects a relay agent address, it knows that the network portion of the address indicates the client's network address because the relay agent must be connected to the client's network.

    • Is the client's network subnetted? The server consults the netmasks table to find the subnet mask used on the network indicated by the relay agent's address or the address of the network interface that received the request. Once the server knows the subnet mask used, it can determine which portion of the network address is the host portion, and then select an IP address appropriate for the client. (See netmasks(4) for information on netmasks.)

  2. After they determine the client's network, DHCP servers select an appropriate IP address and verify that the address is not already in use. The DHCP servers then respond to the client by broadcasting an offer message that includes the selected IP address and information about services that can be configured for the client. Each server temporarily reserves the offered IP address until it can determine if the client will use it.

  3. The client selects the best offer (based on the number and type of services offered) and broadcasts a request that specifies the IP address of the server that made the best offer. The broadcast ensures that all the responding DHCP servers know the client has chosen a server, and those servers not chosen can cancel the reservations for the IP addresses they had offered.

  4. The selected server allocates the IP address for the client, stores the information in the DHCP data store, and sends an acknowledgement (ACK) to the client. The acknowledgement message contains the network configuration parameters for the client. The client uses ping to test the IP address to make sure no other system is using it, then continues booting to join the network.

  5. The client monitors the lease time, and when a set period of time has elapsed, the client sends a new message to the chosen server to increase its lease time.

  6. The DHCP server that receives the request extends the lease time if it still adheres to the local lease policy set by the administrator. If the server does not respond within 20 seconds, the client broadcasts a request so that one of the other DHCP servers can extend the lease.

  7. When the client no longer needs the IP address, it notifies the server that it is releasing the IP address. This can happen during an orderly shutdown and can also be done manually.

    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.

    What is the four step process for obtaining a DHCP lease for an IP address?

    Client devices lease their IP address configuration by using the following four-step DORA process:.
    Discover. The client broadcasts an attempt to discover a DHCP server..
    Offer. DHCP servers that receive the client broadcast offer an IP address configuration..
    Request. ... .
    Acknowledge..

    What is the first step in the DHCP IP assignment process?

    Assigning IP addresses First, all modern device operating systems include a DHCP client, which is typically enabled by default. In order to request an IP address, the client device sends out a broadcast message—DHCPDISCOVER. The network directs that request to the appropriate DHCP server.

    Which process DHCP follow to generate IP address?

    DHCP runs at the application layer of the Transmission Control Protocol/IP (TCP/IP) stack to dynamically assign IP addresses to DHCP clients and to allocate TCP/IP configuration information to DHCP clients. This includes subnet mask information, default gateway IP addresses and domain name system (DNS) addresses.

    How does DHCP work step by step?

    A DHCP server contains several pre-configured IP configurations. When it receives a DHCP request from a DHCP client, it provides an IP configuration to the client from all available IP configurations. This entire process goes through the four steps: Discover, Offer, Request, and Acknowledgment.