No relevant resource is found in the selected language.

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Read our privacy policy>Search

Reminder

To have a better experience, please upgrade your IE browser.

upgrade

NE40E V800R010C10SPC500 Feature Description - IP Services 01

This is NE40E V800R010C10SPC500 Feature Description - IP Services
Rate and give feedback:
Huawei uses machine translation combined with human proofreading to translate this document to different languages in order to help you better understand the content of this document. Note: Even the most advanced machine translation cannot match the quality of professional translators. Huawei shall not bear any responsibility for translation accuracy and it is recommended that you refer to the English document (a link for which has been provided).
DHCP Server

DHCP Server

A DHCP server assigns IP addresses to clients. A DHCP client sends a message to a DHCP server to request configuration parameters, such as the IP address, subnet mask, and default gateway address. The DHCP server responds with a message carrying the requested configuration parameters. Both the request and reply messages are encapsulated in UDP packets.

Three Modes for the Interaction Between the DHCP Client and Server

To obtain a valid dynamic IP address, a DHCP client exchanges different information with a server at different stages. Generally, the DHCP client and server interact in the following modes (defined in standard protocols):
  • A DHCP client accesses a network for the first time.

    When a DHCP client accesses a network for the first time, the DHCP client undergoes the following stages to set up a connection with a DHCP server:
    • Discovering stage: At this stage, the DHCP client searches for a DHCP server. The client broadcasts a DHCP Discover message and only DHCP servers respond to the message.

    • Offering stage: At this stage, each DHCP server offers an IP address to the DHCP client. After receiving the DHCP Discover message from the client, each DHCP server selects an unassigned IP address from the IP address pool and sends a DHCP Offer message with the leased IP address and other settings to the client.

    • Selecting stage: At this stage, the DHCP client selects an IP address. If multiple DHCP servers send DHCP Offer messages to the client, the client accepts the first received DHCP Offer message and broadcasts a DHCP Request message carrying the selected IP address.

    • Acknowledging stage: At this stage, the DHCP server confirms the IP address that is offered. After receiving the DHCP Request message, the DHCP server sends a DHCP ACK message to the client. The DHCP ACK message contains the offered IP address and other settings. The DHCP client then binds its TCP/IP protocol suite to the network interface card.

    Except the IP address selected by the client, the IP addresses offered by other DHCP servers are available to other clients.

  • A DHCP client accesses a network for the second time.

    When a DHCP client accesses a network for the second time, the DHCP client undergoes the following stages to set up a connection with the DHCP server:
    • If the client has previously accessed the network correctly, it does not broadcast a DHCP Discover message. Instead, it broadcasts a DHCP Request message that carries the previously-assigned IP address.

    • After receiving the DHCP Request message, the DHCP server responds with a DHCP ACK message if the IP address is not assigned, notifying the client that it can continue to use the original IP address.

    • If the IP address cannot be assigned to the client (for example, it has been assigned to another client), the DHCP server responds with a DHCP NAK message to the client. After receiving the DHCP NAK message, the client sends a DHCP Discover message to apply for an IP address.

  • A DHCP client extends the IP address lease.

    The IP address dynamically assigned to a client has a validity period. The server withdraws the IP address after the validity period expires. If the client intends to continue to use this IP address, it must extend the IP address lease.

    In real-world implementations, the DHCP client sends a DHCP Request message to the server automatically to update the IP address lease when the DHCP client is started or half of the lease has passed. If the IP address is valid, the server replies with a DHCP ACK message to inform the client of the new IP address lease.

IP Address Allocation Modes

DHCP provides the following address allocation modes:
  • Manual address allocation: An administrator binds fixed IP addresses to specific clients, such as the WWW server, and uses DHCP to assign these IP addresses to the clients.
  • Automatic address allocation: DHCP assigns IP addresses of infinite lease to clients.
  • Dynamic address allocation: DHCP assigns IP addresses with a validity period to clients. After the validity period expires, the clients must re-apply for addresses. This address allocation mode is widely adopted.

IP Address Allocation Sequence

A DHCP server assigns IP addresses to a client in the following sequence:

  • IP address that is in the database of the DHCP server and is statically bound to the MAC address of the client
  • IP address that has previously been assigned to the client, that is, IP address in the requested IP Addr Option of the DHCP Discover message sent by the client
  • IP address that is first found when the DHCP server searches the DHCP address pool for available IP addresses
  • If the DHCP address pool has no available IP address, the DHCP server searches the expired IP addresses and conflicting IP addresses, and then assigns a valid IP address to the client. If all the IP addresses are in use, an error message is reported.

Method of Preventing Repeated IP Address Allocation

To avoid address conflicts, the DHCP server pings the IP address before assigning it to a client.

The ping command checks whether a response to the ping packet is received within the specified period. If no response to the ping packet is received, the DHCP server continues to send ping packets to the IP address until the number of sent ping packets reaches the maximum limit. If there is still no response, this IP address is not in use, and the DHCP server assigns the IP address to a client. (This method is implemented based on standard protocols.)

IP Address Reservation

DHCP supports IP address reservation for clients. The reserved IP addresses must belong to the address pool. If an address in the address pool is reserved, it is no longer assignable. Addresses are usually reserved for specific clients, such as DNS and WWW servers.

Translation
Download
Updated: 2019-01-03

Document ID: EDOC1100055041

Views: 11219

Downloads: 50

Average rating:
This Document Applies to these Products
Related Documents
Related Version
Share
Previous Next