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

Configuration Guide - IP Service

CloudEngine 8800, 7800, 6800, and 5800 V200R003C00

This document describes the configurations of IP Service, including IP address, ARP, DHCP, DNS, IP performance optimization, IPv6, DHCPv6, and IPv6 DNS.
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 Messages

DHCP Messages

DHCP Message Format

Figure 3-2 shows the format of DHCP messages.

Figure 3-2 DHCP message format

In Figure 3-2, numbers in parenthesis indicate the length of fields, in bytes.

Table 3-1 Description of each field in a DHCP message

Field

Length

Description

op

1 byte

Operation Code: indicates the message type. The options are as follows:
  • 1: DHCP Request message

  • 2: DHCP Reply message

htype

1 byte

Hardware Type: indicates the hardware address type. For Ethernet, the value of this field is 1.

hlen

1 byte

Hardware Address Length: indicates the length of a hardware address, expressed in bytes. For Ethernet, the value of this field is 6.

hops

1 byte

Hops: indicates the number of DHCP relay agents through which a DHCP Request message passes. A maximum of 16 DHCP relay agents are allowed between a client and server. This field is set to 0 by a DHCP client or a DHCP server. Its value increases by 1 each time a DHCP Request message passes through a DHCP relay agent. If the value is greater than 16, the message is discarded.

xid

4 bytes

Transaction Identifier: indicates a random number chosen by a DHCP client. It is used by the DHCP client and DHCP server to exchange messages.

secs

2 bytes

Seconds: indicates the number of seconds elapsed since the client obtained or renewed an IP address.

flags

2 bytes

Flags: indicates the flags field. Only the leftmost bit in this field is used and the other bits are set to 0. The leftmost bit specifies the mode in which the DHCP server sends a DHCP Reply message. The values are as follows:
  • 0: The DHCP server unicasts a DHCP Reply message.

  • 1: The DHCP server broadcasts a DHCP Reply message.

ciaddr

4 bytes

Client IP Address: indicates the IP address of a client. The IP address is either an existing IP address of a DHCP client or an IP address assigned by a DHCP server to a DHCP client. During the process of a client acquiring an IP address, the value of this field is 0.0.0.0.
NOTE:

The IP address 0.0.0.0 is used only for temporary communication during system startup in DHCP mode. It is an invalid destination address.

yiaddr

4 bytes

Your Client IP Address: indicates the DHCP client IP address assigned by a DHCP server. When responding to a DHCP request, the DHCP server fills the IP address to be assigned to the client into this field of a DHCP Reply message.

siaddr

4 bytes

Server IP Address: indicates the server IP address from which a DHCP client obtains startup configuration information.

giaddr

4 bytes

Gateway IP Address: indicates the IP address of the first DHCP relay agent.

If the DHCP server and client are located on different network segments:
  1. The first DHCP relay agent fills its IP address into this field of the DHCP Request message sent by the client and forwards the message to the DHCP server.
  2. The DHCP server determines the network segment where the client resides based on this field, and assigns an IP address on this network segment from an address pool.
  3. The DHCP server returns a DHCP Reply message to the first DHCP relay agent. The DHCP relay agent then forwards the DHCP Reply message to the client.
NOTE:

If a DHCP Request message has passed through multiple DHCP Relay agents before reaching the DHCP server, the value of this field is the IP address of the first DHCP relay agent and remains unchanged. However, the value of the hops field increases by 1 each time a DHCP Request message passes through a DHCP relay agent.

chaddr

16 bytes

Client Hardware Address: indicates the client MAC address. This field must be consistent with the hardware type (htype) and hardware length (hlen) fields. When sending a DHCP Request message, the client fills its hardware address into this field. For Ethernet, a 6-byte Ethernet MAC address must be filled in this field when the hardware type and hardware length fields are set to 1 and 6, respectively.

sname

64 bytes

Server Name: indicates the name of the server from which a client obtains configuration parameters. This field is optional and is filled in by a DHCP server. If this field is filled in, the value must be a character string that ends with 0.

file

128 bytes

Filename: indicates the startup configuration file name specified by the DHCP server for a DHCP client. This field is filled in by the DHCP server and is delivered to the client when the IP address is assigned to the client. This field is optional. If this field is filled in, the value must be a character string that ends with 0.

options

Variable

Options: indicates the DHCP Options field, which has a maximum of 312 bytes. This field contains the DHCP message type and configuration parameters assigned by a server to a client, including the gateway IP address, DNS server IP address, and IP address lease.

For details about the Options field, see DHCP Options.

DHCP Message Types

DHCP messages are classified into eight types. A DHCP server and a DHCP client communicate by exchanging the following DHCP messages.

Table 3-2 DHCP message types
Message Name Description

DHCP DISCOVER

A DHCP Discover message is broadcast by a DHCP client to locate a DHCP server when the client attempts to connect to a network for the first time.

DHCP OFFER

A DHCP Offer message is sent by a DHCP server to respond to a DHCP Discover message. A DHCP Offer message carries various configuration information.

DHCP REQUEST

A DHCP Request message is sent in the following conditions:

  • After a DHCP client is initialized, it broadcasts a DHCP Request message to respond to the DHCP Offer message sent by a DHCP server.
  • After a DHCP client restarts, it broadcasts a DHCP Request message to confirm the configuration including the assigned IP address.
  • After a DHCP client obtains an IP address, it unicasts or broadcasts a DHCP Request message to update the IP address lease time.

DHCP ACK

A DHCP ACK message is sent by a DHCP server to acknowledge the DHCP Request message from a DHCP client. After receiving a DHCP ACK message, the DHCP client obtains the configuration parameters including the IP address.

DHCP NAK

A DHCP NAK message is sent by a DHCP server to reject the DHCP Request message from a DHCP client. For example, after a DHCP server receives a DHCP Request message, it cannot find matching lease records. The DHCP server then sends a DHCP NAK message, notifying that no IP address is available for the DHCP client.

DHCP DECLINE

A DHCP Decline message is sent by a DHCP client to notify the DHCP server that the assigned IP address conflicts with another IP address. The DHCP client then applies to the DHCP server for another IP address.

DHCP RELEASE

A DHCP Release message is sent by a DHCP client to release its IP address. After receiving a DHCP Release message, the DHCP server can assign this IP address to another DHCP client.

DHCP INFORM

A DHCP Inform message is sent by a DHCP client to obtain other network configuration parameters such as the gateway address and DNS server address after the DHCP client has obtained an IP address.

Translation
Download
Updated: 2019-05-08

Document ID: EDOC1100004354

Views: 69221

Downloads: 147

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