Sunteți pe pagina 1din 43

CloudEngine 8800&7800&6800&5800 Series Switches

Configuration Guide - IP Service 3 DHCP Configuration

3 DHCP Configuration

About This Chapter

DHCP dynamically manages and configures clients in a concentrated manner. It ensures


proper IP address allocation and improves IP address use efficiency.

3.1 DHCP Overview


This section describes the definition and purpose of DHCP.
3.2 Principles
This section describes the implementation of DHCP.
3.3 Applications
This section describes the applicable scenario of DHCP.
3.4 Configuration Notes
3.5 Default Configuration
This section provides default DHCP configurations.
3.6 Configuring a DHCP Server Based on the Global Address Pool
If a DHCP server based on a global address pool is configured, all online users of the server
can obtain IP addresses from this address pool.
3.7 Configuring a DHCP Relay Agent
By using a DHCP relay agent, a DHCP client can communicate with a DHCP server on
another network segment to obtain an IP address and other configuration information.
3.8 Maintaining DHCP
After DHCP configurations are complete, you can clear DHCP statistics and monitor DHCP
operation.
3.9 Configuration Examples
This section provides DHCP configuration examples including networking requirements and
configuration roadmap.
3.10 References
This section lists references of DHCP.

Issue 05 (2017-05-08) Huawei Proprietary and Confidential 79


Copyright © Huawei Technologies Co., Ltd.
CloudEngine 8800&7800&6800&5800 Series Switches
Configuration Guide - IP Service 3 DHCP Configuration

3.1 DHCP Overview


This section describes the definition and purpose of DHCP.

Definition
The Dynamic Host Configuration Protocol (DHCP) dynamically assigns IP addresses to users
and manages user configurations in a centralized manner.

Purpose
As the network expands and becomes complex, the number of hosts often exceeds the number
of available IP addresses. As portable computers and wireless networks are widely used, the
positions of computers often change, causing IP addresses of the computers to be changed
accordingly. As a result, network configurations become increasingly complex. To properly
and dynamically assign IP addresses to hosts, DHCP is used.

DHCP is developed based on the BOOTstrap Protocol (BOOTP). BOOTP runs on networks
where each host has a fixed network connection. The administrator configures a BOOTP
parameter file for each host, and the file remains unchanged for a long period of time. DHCP
has the following new features compared with BOOTP:

l Dynamically assigns IP addresses and configuration parameters to clients.


l Enables a host to obtain an IP address dynamically, but does not specify an IP address
for each host.

DHCP rapidly and dynamically allocates IP addresses, which improves IP address usage.

NOTE

The device supports DHCP snooping. For details about DHCP snooping, see the CloudEngine
8800&7800&6800&5800 Series Switches Configuration Guide -- Basic Configurations -- DHCP
Snooping Configurations.

3.2 Principles
This section describes the implementation of DHCP.

3.2.1 DHCP Overview


DHCP uses the client/server model. A DHCP client sends a packet 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 packet carrying the requested configurations based
on a policy.

DHCP Architecture
Figure 3-1 shows the DHCP architecture.

Issue 05 (2017-05-08) Huawei Proprietary and Confidential 80


Copyright © Huawei Technologies Co., Ltd.
CloudEngine 8800&7800&6800&5800 Series Switches
Configuration Guide - IP Service 3 DHCP Configuration

Figure 3-1 DHCP architecture

DHCP Client DHCP Relay DHCP Server

IP Network

DHCP involves the following roles:


l DHCP Client
A DHCP client exchanges messages with a DHCP server to obtain an IP address and
other configuration parameters. On the device, an interface can function as a DHCP
client to dynamically obtain configuration parameters such as an IP address from a
DHCP server. This facilitates configurations and centralized management.
l DHCP Relay
A DHCP relay agent forwards DHCP packets exchanged between a DHCP client and a
DHCP server that are located on different network segments so that they can complete
their address configuration. Using a DHCP relay agent eliminates the need for deploying
a DHCP server on each network segment. This feature reduces network deployment
costs and facilitates device management.
In the DHCP architecture, the DHCP relay agent is optional. A DHCP relay agent is
required only when the server and client are located on different network segments.
l DHCP Server
A DHCP server processes requests of address allocation, address lease extending, and
address releasing from a DHCP client or a DHCP relay agent, and allocates IP addresses
and other network configuration parameters to the DHCP client.

3.2.2 Introduction to DHCP Messages


DHCP Message Format
Figure 3-2 shows the format of a DHCP message.

Issue 05 (2017-05-08) Huawei Proprietary and Confidential 81


Copyright © Huawei Technologies Co., Ltd.
CloudEngine 8800&7800&6800&5800 Series Switches
Configuration Guide - IP Service 3 DHCP Configuration

Figure 3-2 Format of a DHCP message


0 7 15 23 31
op(1) htype (1) hlen (1) hops (1)
xid (4)
secs (2) flags (2)
ciaddr (4)
yiaddr (4)
siaddr (4)
giaddr (4)
chaddr (16)

sname (64)

file (128)

options (variable)

In Figure 3-2, numbers in the round brackets indicate the field length, expressed in bytes.

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


Field Length Description

op(op 1 byte Indicates the message type. The options are as follows:
code) l 1: DHCP Request message
l 2: DHCP Reply message

htype 1 byte Indicates the hardware address type. For Ethernet, the value of
(hardware this field is 1.
type)

hlen 1 byte Indicates the length of a hardware address, expressed in bytes. For
(hardware Ethernet, the value of this field is 6.
length)

Issue 05 (2017-05-08) Huawei Proprietary and Confidential 82


Copyright © Huawei Technologies Co., Ltd.
CloudEngine 8800&7800&6800&5800 Series Switches
Configuration Guide - IP Service 3 DHCP Configuration

Field Length Description

hops 1 byte Indicates the number of DHCP relay agents that a DHCP Request
message passes through. This field is set to 0 by a DHCP client or
a DHCP server. The value increases by 1 each time a DHCP
Request message passes through a DHCP relay agent. This field
limits the number of DHCP relay agents that a DHCP message
can pass through.
NOTE
A maximum of 16 DHCP relay agents are allowed between a server and a
client. That is, the number of hops must be smaller than or equal to 16.
Otherwise, DHCP messages are discarded.

xid 4 bytes 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 Indicates the time elapsed since the client obtained or renewed an
(seconds) IP address, in seconds.

flags 2 bytes Indicates the Flags field. Only the leftmost bit of the Flags field is
valid and other bits are set to 0. The leftmost bit determines
whether the DHCP server unicasts or broadcasts a DHCP Reply
message. The options are as follows:
l 0: The DHCP server unicasts a DHCP Reply message.
l 1: The DHCP server broadcasts a DHCP Reply message.

ciaddr 4 bytes Indicates the IP address of a client. The IP address can be an


(client ip existing IP address of a DHCP client or an IP address assigned by
address) a DHCP server to a DHCP client. During initialization, the client
has no IP address and 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 address.

yiaddr 4 bytes Indicates the DHCP client IP address assigned by the DHCP
(your client server. The DHCP server fills this field into a DHCP Reply
ip address) message.

siaddr 4 bytes Server IP address from which a DHCP client obtains the startup
(server ip configuration file.
address)

Issue 05 (2017-05-08) Huawei Proprietary and Confidential 83


Copyright © Huawei Technologies Co., Ltd.
CloudEngine 8800&7800&6800&5800 Series Switches
Configuration Guide - IP Service 3 DHCP Configuration

Field Length Description

giaddr 4 bytes Indicates the IP address of the first DHCP relay agent. If the
(gateway ip DHCP server and client are located on different network
address) segments, 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. 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.
The DHCP server also 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 the DHCP Request message passes 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 Indicates the client MAC address. This field must be consistent
(client bytes with the hardware type and hardware length fields. When sending
hardware a DHCP Request message, the client fills its hardware address
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 Indicates the name of the server from which a client obtains
(server host bytes configuration parameters. This field is optional and is filled in by
name) the DHCP server. The field must be filled in with a character
string that ends with 0.

file (file 128 Indicates the Bootfile name specified by the DHCP server for a
name) bytes 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. The field must be filled in with a
character string that ends with 0.

options Variabl Indicates the DHCP Options field, which has a maximum of 312
e 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 3.2.3 DHCP Options.

DHCP Message Types


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

Issue 05 (2017-05-08) Huawei Proprietary and Confidential 84


Copyright © Huawei Technologies Co., Ltd.
CloudEngine 8800&7800&6800&5800 Series Switches
Configuration Guide - IP Service 3 DHCP Configuration

Table 3-2 DHCP message types


Message Description
Name

DHCP A DHCP Discover message is broadcast by a DHCP client to locate a


DISCOVER 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 A DHCP Request message is sent in the following conditions:


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

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.
Then the DHCP server sends a DHCP NAK message, notifying that no IP
address is available for the DHCP client.

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

DHCP A DHCP Release message is sent by a DHCP client to release its IP


RELEASE address. After receiving a DHCP Release message, the DHCP server can
assign this IP address to another DHCP client.

DHCP A DHCP Inform message is sent by a DHCP client to obtain other


INFORM network configuration parameters such as the gateway address and DNS
server address after the DHCP client has obtained an IP address.

3.2.3 DHCP Options

NOTE

To obtain more information about DHCP options, use the DHCP Options Query Tool.

Issue 05 (2017-05-08) Huawei Proprietary and Confidential 85


Copyright © Huawei Technologies Co., Ltd.
CloudEngine 8800&7800&6800&5800 Series Switches
Configuration Guide - IP Service 3 DHCP Configuration

Options Field in a DHCP Packet


The Options field in a DHCP packet carries control information and parameters that are not
defined in common protocols. When a DHCP client requests an IP address from the DHCP
server configured with the Options field, the server replies a packet containing the Options
field. Figure 3-3 shows the format of the Options field.

Figure 3-3 Format of the Options field

0 7 15
Type Length Value

The Options field consists of Type, Length, and Value. The following table provides the
details.

Table 3-3 Description of the Options field


Field Length Description

Type 1 byte Indicates the type of the message


content.

Length 1 byte Indicates the length of the message


content.

Value Depending on the setting of the Indicates the message content.


Length field

The value of the Options field ranges from 1 to 255. Table 3-4 lists common DHCP options.

Table 3-4 Description of the Options field in DHCP packets


Options No. Function

1 Specifies the subnet mask.

3 Specifies the gateway address.

6 Specifies the DNS server IP address.

12 Specifies the hostname of DHCP client.

15 Specifies the domain name.

Issue 05 (2017-05-08) Huawei Proprietary and Confidential 86


Copyright © Huawei Technologies Co., Ltd.
CloudEngine 8800&7800&6800&5800 Series Switches
Configuration Guide - IP Service 3 DHCP Configuration

Options No. Function

33 Specifies a group of classful static routes. This option


contains a group of classful static routes. When a DHCP
client receives DHCP packets with this option, it adds the
classful static routes contained in the option to its routing
table. In classful routes, masks of destination addresses are
natural masks and masks cannot be used to divide subnets. If
Option 121 exists, this option is ignored.

44 Specifies the NetBIOS name.

46 Specifies the NetBIOS object type.

50 Specifies the requested IP address.

51 Specifies the IP address lease.

52 Specifies the additional option.

53 Specifies the DHCP packet type.

54 Specifies the server identifier.

55 Specifies the parameter request list. It is used by a DHCP


client to request specified configuration parameters.

58 Specifies the lease renewal time (T1), which is 50% of the


lease time.

59 Specifies the lease renewal time (T2), which is 87.5% of the


lease time.

60 Specifies the vendor classification information option, which


identifies the DHCP client type and configuration.

61 Specifies Client identifier.

66 Specifies the TFTP server name allocated to DHCP clients.

67 Specifies the Bootfile name allocated to DHCP clients.

77 Specifies the user type.

121 Specifies a group of classless routes. This option contains a


group of classless static routes. After a DHCP client receives
DHCP packets with this option, it adds the classless static
routes contained in the option to its routing table. Classless
routes are routes of which masks of destination addresses can
be any values and masks can be used to divide subnets.

The objects of this field vary with the functions of the Options field. For example, Option 77
is used on a DHCP client to identify user types of the DHCP client. The DHCP server selects
an address pool to allocate an IP address and configuration parameters to the DHCP client
based on the User Class in the Option field. Option 77 is manually configured only on the
DHCP client but not on the server.

Issue 05 (2017-05-08) Huawei Proprietary and Confidential 87


Copyright © Huawei Technologies Co., Ltd.
CloudEngine 8800&7800&6800&5800 Series Switches
Configuration Guide - IP Service 3 DHCP Configuration

For more information about common DHCP options, see RFC 2132.

Customized DHCP Options


Some options are not defined in RFC 2132. Customized options Option 82 are described as
follows:
The Option 82 field is called the DHCP relay agent information field. It records the location
of a DHCP client. A DHCP relay agent or a device enabled with DHCP snooping appends the
Option 82 field to a DHCP Request message sent from a DHCP client, and then forwards the
DHCP Request message to a DHCP server.
You can use the Option 82 field to locate a DHCP client and implement control security and
accounting of the DHCP client. The DHCP server that supports the Option 82 field can
determine allocation of IP addresses and other parameters according to the information in the
Option 82 field. IP addresses can be assigned flexibly.
The Option 82 field contains a maximum of 255 suboptions. If the Option 82 field is defined,
at least one suboption must be defined. Currently, the device supports only two suboptions:
sub-option 1 (circuit ID) and suboption 2 (remote ID).
The content of the Option 82 field is not defined uniformly, and various vendors fill in the
Option 82 field as required.

3.2.4 DHCP Principles

Modes for Interaction Between the DHCP Client and Server


To obtain a valid dynamic IP address, a DHCP client exchanges different messages with the
server at different stages. Generally, the DHCP client and server interact in the following
modes.
l The DHCP client dynamically obtains an IP address.

Issue 05 (2017-05-08) Huawei Proprietary and Confidential 88


Copyright © Huawei Technologies Co., Ltd.
CloudEngine 8800&7800&6800&5800 Series Switches
Configuration Guide - IP Service 3 DHCP Configuration

Figure 3-4 Procedure for a DHCP client to dynamically obtain an IP address


Client Server

DHCP DISCOVER
(broadcast)
Step1
DHCP OFFER
Step2
DHCP REQUEST
(broadcast)
Step3

DHCP ACK/DHCP NAK


Step4

As shown in Figure 3-4, when a DHCP client accesses the network for the first time, the
DHCP client sets up a connection with a DHCP server through the following four stages.
– Discovery stage: The DHCP client searches for the DHCP server.
In this stage, the DHCP client sends a DHCP Discover message to search for the
DHCP server. The DHCP server address is unknown to the client, so the DHCP
client broadcasts the DHCP Discover message. All the DHCP servers send Reply
messages after they receive the Discover message. In this way, the DHCP client
knows locations of the DHCP servers on the network.
– Offer stage: The DHCP server offers an IP address to the DHCP client.
The DHCP server receives the DHCP Discover message, selects an IP address from
the address pool, and sends a DHCP Offer message to the DHCP client. The Offer
message carries information such as the IP address, lease of the IP address, gateway
address, and DNS server address.
– Request stage: The DHCP client selects an IP address.
If multiple DHCP servers send DHCP Offer messages to the DHCP client, the
client receives the first DHCP Offer message. Then the client broadcasts a DHCP

Issue 05 (2017-05-08) Huawei Proprietary and Confidential 89


Copyright © Huawei Technologies Co., Ltd.
CloudEngine 8800&7800&6800&5800 Series Switches
Configuration Guide - IP Service 3 DHCP Configuration

Request message including the information about the DHCP server address (Option
54 field).
The client broadcasts a DHCP Request message to notify all the DHCP servers that
the client uses the IP address provided by the DHCP server in the Option 54 field
and that all the other servers can use the assigned IP addresses.
– Acknowledgment stage: The DHCP server acknowledges the IP address that is
offered.
When the DHCP server receives the DHCP Request message from the DHCP
client, the server searches the lease record based on the MAC address in the
Request message. If there is the IP address record, the server sends a DHCP ACK
message to the client, carrying the IP address and other configurations. After
receiving the DHCP ACK message, the DHCP client broadcasts gratuitous ARP
packets to detect whether any host is using the IP address assigned by the DHCP
server. If no response is received within the specified time, the DHCP client uses
the IP address.
If there is no IP address record or the server cannot assign IP addresses, the server
sends a DHCP NAK message to notify the DHCP client that the server cannot
assign IP addresses. The DHCP client needs to send a new DHCP Discover
message to request a new IP address.
After obtaining the IP address, the DHCP client checks the status of the gateway in
use before the client goes online. If the gateway address is incorrect or the gateway
device fails, the DHCP client requests a new IP address using the four modes for
interaction.
l The DHCP client uses the assigned IP address.

Issue 05 (2017-05-08) Huawei Proprietary and Confidential 90


Copyright © Huawei Technologies Co., Ltd.
CloudEngine 8800&7800&6800&5800 Series Switches
Configuration Guide - IP Service 3 DHCP Configuration

Figure 3-5 Procedure for the DHCP client to use the assigned IP address
Client Server

DHCP REQUEST
(broadcast)
Step1

Step2
DHCP ACK/DHCP NAK

As shown in Figure 3-5, when the DHCP client accesses a network for the second time,
it set ups a connection with the DHCP server in the following procedure.
– The client accesses a network for the second time with the IP address that does not
expire. The client does not need to send a DHCP Discover message again. It
directly sends a DHCP Request message carrying the IP address assigned in the first
time, namely, the Option 50 field in the message.
– After receiving the DHCP Request message, if the requested IP address is not
assigned to another DHCP client, the DHCP server sends a DHCP ACK message to
instruct the DHCP client to use the IP address again.
– If the IP address cannot be assigned to the DHCP client, for example, it has been
assigned to another DHCP client, the DHCP server sends a DHCP NAK message to
the DHCP client. After receiving the DHCP NAK message, the DHCP client sends
a DHCP Discover message to request a new IP address.
l The DHCP client renews the IP address lease.
An expected lease can be contained in the DHCP Request message sent to the server for
an IP address. The server compares the expected lease with the lease in the address pool
and assigns a shorter lease to the client.

Issue 05 (2017-05-08) Huawei Proprietary and Confidential 91


Copyright © Huawei Technologies Co., Ltd.
CloudEngine 8800&7800&6800&5800 Series Switches
Configuration Guide - IP Service 3 DHCP Configuration

The IP address dynamically assigned to the DHCP client usually has a validity period.
The DHCP server withdraws the IP address after the validity period expires. To keep
using the IP address, the DHCP client needs to renew the IP address lease.
When obtaining an IP address, the DHCP client enters the binding state. The client is
configured with three timers to control lease renewal, rebinding, and lease expiration
respectively. When assigning an IP address to the DHCP client, the DHCP server also
specifies values for the timers. If the server does not specify values for the timers, the
client uses the default values. Table 3-5 lists the default timer values.

Table 3-5 Default values of timers

Timer Default Value

Lease renewal 50% of the lease

Rebinding 87.5% of the lease

Lease expiration Overall lease

Figure 3-6 Procedure for a DHCP client to renew the IP address lease
Client Server

DHCP REQUEST
(unicast)
T1
DHCP REQUEST
(broadcast)
T2

DHCP ACK/DHCP NAK

As shown in Figure 3-6, when the DHCP client renews the IP address lease, it set ups a
connection with the DHCP server in the following procedures:
– When 50% of the IP address lease (T1) has passed, the DHCP client unicasts a
DHCP Request message to the DHCP server to renew the lease. If the client
receives a DHCP ACK message, the address lease is successfully renewed. If the
client receives a DHCP NAK message, it sends a request again.
– When 87.5% of the IP address lease (T2) has passed and the client has not received
the Reply message, the DHCP client automatically sends a broadcast message to the
DHCP server to renew the IP address lease. If the client receives a DHCP ACK
message, the address lease is successfully renewed. If the client receives a DHCP
NAK message, it sends a request again.
– If the client has not received a Reply message from the server when the IP address
lease expires, the client must stop using the current IP address and send a DHCP
Discover message to request a new IP address.

Issue 05 (2017-05-08) Huawei Proprietary and Confidential 92


Copyright © Huawei Technologies Co., Ltd.
CloudEngine 8800&7800&6800&5800 Series Switches
Configuration Guide - IP Service 3 DHCP Configuration

l The DHCP client releases an IP address.


When the DHCP client does not use the assigned IP address, it sends a DHCP Release
message to notify the DHCP server of releasing the IP address. The DHCP server retains
the DHCP client configurations so that the configurations can be used when the client
requests an address again.

3.2.5 DHCP Relay Principles


The DHCP relay function enables message exchanges between a DHCP server and a client on
different network segments. When the DHCP client and server are on different network
segments, the DHCP relay agent transparently transmits DHCP messages to the destination
DHCP server. In this way, DHCP clients on different network segments can communicate
with one DHCP server.
Figure 3-7 shows how a DHCP client uses the DHCP relay agent to apply for an IP address
for the first time.

Figure 3-7 Working process of a DHCP relay agent


DHCP Client DHCP Relay DHCP Server

DHCP DISCOVER DHCP DISCOVER


(Broadcast) (Unicast)
Step1
DHCP OFFER
DHCP OFFER
Step2 (Unicast)
DHCP REQUEST DHCP REQUEST
(Broadcast) (Unicast)
Step3
DHCP ACK/DHCPNAK
DHCP ACK/DHCPNAK
(Unicast)
Step4

Figure 3-7 shows the working process of a DHCP relay agent. The DHCP client sends a
Request message to the DHCP server. When receiving the message, the DHCP relay agent
processes and unicasts the message to the specified DHCP server on the other network
segment. The DHCP server sends requested configurations to the client through the DHCP
relay agent based on information in the Request message.
1. After receiving a DHCP Discover message or a Request message, the DHCP relay agent
performs the following operations:
– Discards DHCP Request messages whose number of hops is larger than the hop
limit to prevent loops. Or, increases the value of the hop by 1, indicating that the
message passes through a DHCP relay agent.
– Checks the giaddr field. If the value is 0, set the value of the giaddr field to the IP
address of the interface which receives the Request message. Selects one IP address
if the interface has multiple IP addresses. All the Request messages received by the
interface later use this IP address to fill the giaddr field. If the value is not 0, do not
change the value.

Issue 05 (2017-05-08) Huawei Proprietary and Confidential 93


Copyright © Huawei Technologies Co., Ltd.
CloudEngine 8800&7800&6800&5800 Series Switches
Configuration Guide - IP Service 3 DHCP Configuration

– Sets the TTL in the request packets to the default value 255 in the DHCP relay
device, not the value calculated by decreasing the original TTL by 1. You can
change the value of the hops field to prevent loops and limit hops.
– Changes the destination IP address of the DHCP Request message to the IP address
of the DHCP server or the IP address of the next DHCP relay agent. In this way, the
DHCP Request message can be forwarded to the DHCP server or the next DHCP
relay agent.
2. The DHCP server assigns IP addresses to the client based on the Relay Agent IP Address
field and sends the DHCP Reply message to the DHCP relay agent specified in the Relay
Agent IP Address field. After receiving the DHCP Reply message, the DHCP relay agent
performs the following operations:
– The DHCP relay agent assumes that all the Reply messages are sent to the directly-
connected DHCP clients. The Relay Agent IP Address field identifies the interface
directly connected to the client. If the value of the Relay Agent IP Address field is
not the IP address of a local interface, the DHCP relay agent discards the Reply
message.
– The DHCP relay agent checks the broadcast flag bit of the message. If the broadcast
flag bit is 1, the DHCP relay agent broadcasts the DHCP Reply message to the
DHCP client; otherwise, the DHCP relay agent unicasts the DHCP Reply message
to the DHCP client. The destination IP address is the value in the Your (Client) IP
Address field, and the MAC address is the value in the Client Hardware Address
field.
Figure 3-8 shows how a DHCP client extends the IP address lease through the DHCP relay
agent.

Figure 3-8 Extending the IP address lease through the DHCP relay agent

DHCP Client DHCP Relay DHCP Server

DHCP RESQUEST(Unicast)
Step1

DHCP ACK/DHCPNAK (Unicast)


Step2

1. After accessing the network for the first time, the DHCP client only needs to unicast a
DHCP Request message to the DHCP server that assigned its currently-used IP address.
2. The DHCP server then directly unicasts a DHCP ACK message or a DHCP NAK
message to the client.

DHCP Releasing
The DHCP relay agent, instead of the client, can send a Release message to the DHCP server
to release the IP addresses that assigned to the DHCP clients. You can configure a command
on the DHCP relay agent to release the IP addresses that the DHCP server assigns to the
DHCP client.

Issue 05 (2017-05-08) Huawei Proprietary and Confidential 94


Copyright © Huawei Technologies Co., Ltd.
CloudEngine 8800&7800&6800&5800 Series Switches
Configuration Guide - IP Service 3 DHCP Configuration

3.2.6 IP Address Assignment and Renewal

IP Address Assignment Sequence


The DHCP server assigns IP addresses to a client in the following sequence:
l IP address that is in the database of the DHCP server and is statically bound to the MAC
address of the client
l IP address that has been assigned to the client before, that is, IP address in the Requested
IP Addr Option of the DHCP Discover message sent by the client
l IP address that is first found when the DHCP server searches the DHCP address pool for
available IP addresses
l 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 is reported.

Method of Preventing Repeated IP Address Assignment


Before assigning an IP address to a client, the DHCP server needs to ping the IP address to
avoid address conflicts.
By using the ping command, you can check 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
keeps sending ping packets to the IP address to be assigned until the number of the sent ping
packets reaches the maximum value. 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 is implemented based on RFC
2132.)

IP Address Reservation
DHCP supports IP address reservation for clients. The reserved IP addresses can be those in
the address pool or not. If an address in the address pool is reserved, it is no longer assignable.
Addresses are usually reserved for DNS servers.

Method of IP Address Releasing and Lease Renewal on the PCs


The PCs (DHCP clients) must release the original IP addresses before obtaining new IP
addresses.
l Releasing the original IP address
Commands for renewing the lease of an IP address vary in different operating systems.
You can use either of the following methods to renew the lease of an IP address:
– Run the ipconfig /release command on the Windows 7 operating system of the PC
to release the IP address of the PC.
– Run the winipcfg /release command in the MS-DOS of Windows 98 to release the
IP address of the PC.
The user PC needs to send a DHCP Release message to the DHCP server.
l Renewing the IP address lease or applying for a new IP address
The same command is used to apply for a new IP address and renew the IP address in the
same operating system. Before applying for a new IP address, the PCs (DHCP clients)

Issue 05 (2017-05-08) Huawei Proprietary and Confidential 95


Copyright © Huawei Technologies Co., Ltd.
CloudEngine 8800&7800&6800&5800 Series Switches
Configuration Guide - IP Service 3 DHCP Configuration

must release the original IP addresses. If you want to renew the IP address lease, you do
not have to release the IP address.
Different commands are used in different operating systems. You can use either of the
following methods to apply for a new IP address:
– Run the ipconfig /renew command on the Windows 7 operating system of the PC
to apply for a new IP address.
– Run the winipcfg /renew command in the MS-DOS of Windows 98 to apply for a
new IP address.
The user PC needs to send a DHCP Discover message to the DHCP server.

3.3 Applications
This section describes the applicable scenario of DHCP.

3.3.1 DHCP Server Application

As it is shown in Figure 3-9, a DHCP server and multiple DHCP clients (such as PCs and
portable computers) are deployed.

Figure 3-9 Typical networking of the DHCP server


DHCP Clients DHCP Server

DHCP Clients

Generally, the DHCP server is used to assign IP addresses in the following scenarios:

l On a large network, manual configurations take a long time and bring difficulties to
centralized management over the entire network.
l Hosts on the network are more than available IP addresses. Thus, not every host has a
fixed IP address. Many hosts need to dynamically obtain IP addresses through the DHCP
server. In addition, network administrators hope that there is a limit to the number of
users of on-line at the same time.
l Only a few hosts on the network require fixed IP addresses.

3.3.2 DHCP Relay Application


Figure 3-10 shows typical networking of DHCP relay.

Issue 05 (2017-05-08) Huawei Proprietary and Confidential 96


Copyright © Huawei Technologies Co., Ltd.
CloudEngine 8800&7800&6800&5800 Series Switches
Configuration Guide - IP Service 3 DHCP Configuration

Figure 3-10 Typical networking of DHCP relay

Internet

DHCP Relay DHCP Server

DHCP Clients

The earlier DHCP protocol applies to only the scenario that the DHCP client and DHCP
server are on the same network segment. To dynamically assign IP addresses to hosts on
network segments, the network administrator needs to configure a DHCP server on each
network segment, which increases costs.

The DHCP relay function is introduced to solve this problem. A DHCP client can apply to the
DHCP server on another network segment to obtain a valid IP address. In this manner, DHCP
clients on multiple network segments can share one DHCP server. This reduces costs and
facilitates centralized management.

3.4 Configuration Notes

Involved Network Elements


Other network elements are not required.

License Support
DHCP is a basic feature of a switch and is not under license control.

Version Support

Table 3-6 Products and minimum version supporting DHCP


Series Product Minimum
Version Required

CE8800 CE8850 CE8850EI V200R002C50

CE8860 CE8860EI V100R006C00

CE7800 CE7850 CE7850EI V100R003C00

CE7855EI V200R001C00

CE6800 CE6810 CE6810EI V100R003C00

CE6810LI V100R006C0

Issue 05 (2017-05-08) Huawei Proprietary and Confidential 97


Copyright © Huawei Technologies Co., Ltd.
CloudEngine 8800&7800&6800&5800 Series Switches
Configuration Guide - IP Service 3 DHCP Configuration

Series Product Minimum


Version Required

CE6850 CE6850EI V100R001C00

CE6850-48S6Q-HI V100R005C00

CE6850-48T6Q-HI/ V100R005C10
CE6850U-HI/
CE6851HI

CE6855 CE6855HI V200R001C00

CE6860 CE6860EI V200R002C01

CE6870 CE6870-24S6CQ- V200R001C00


EI/
CE6870-48S6CQ-EI

CE6870-48T6CQ-EI V200R002C50

CE6880 CE6880-24S4Q2CQ V200R002C10


-EI/
CE6880-48S4Q2CQ
-EI

CE6880-48T4Q2CQ V200R002C20
-EI

CE5800 CE5810 CE5810EI V100R002C00

CE5850 CE5850EI V100R001C00

CE5850HI V100R003C00

CE5855 CE5855EI V100R005C10

Feature Dependencies and Limitations


When deploying DHCP on the switch, pay attention to the following:
l In V200R002C50 and later versions, a switch as the DHCP server can allocate IP
addresses on the same network segment as the secondary IP address of an interface.
l When configuring the range of dynamically assignable IP addresses in the global address
pool, ensure that the range is the same as the network segment on which the DHCP
server interface address or the DHCP relay agent interface address resides. This avoids
incorrect assignment of IP addresses.
l A DHCP message is forwarded between a DHCP client and a DHCP server at most 16
times, and then the DHCP message is discarded.
l In a VXLAN, DHCP relay and DHCP snooping cannot be configured together on the
same network-side interface.

Issue 05 (2017-05-08) Huawei Proprietary and Confidential 98


Copyright © Huawei Technologies Co., Ltd.
CloudEngine 8800&7800&6800&5800 Series Switches
Configuration Guide - IP Service 3 DHCP Configuration

3.5 Default Configuration


This section provides default DHCP configurations.

Table 3-7 DHCP default configuration

Parameter Default Value

Number of ping packets sent by the DHCP 0


server to prevent IP address conflict

Time interval at which the DHCP server 500 ms


waits for the response to ping packets to
avoid IP address conflicts

IP address lease 1 day

3.6 Configuring a DHCP Server Based on the Global


Address Pool
If a DHCP server based on a global address pool is configured, all online users of the server
can obtain IP addresses from this address pool.

Pre-configuration Tasks
Before configuring a DHCP server based on the global address pool, complete the following
tasks:

l Ensuring that the link between the DHCP client and the device works properly and the
DHCP client can communicate with the device
l (Optional) Configuring the DNS service for the DHCP client
l (Optional) Configuring the NetBIOS service for the DHCP client
l (Optional) Configuring routes from the device to the DNS server and the NetBIOS
server
l (Optional) Configuring the customized DHCP option

3.6.1 Configuring the Global Address Pool

Context
The global address pool attributes include the IP address range, IP address lease, IP addresses
not to be automatically allocated, and IP addresses to be statically bound to MAC addresses.
IP addresses in the global address pool can be assigned dynamically or bound manually as
required.

Issue 05 (2017-05-08) Huawei Proprietary and Confidential 99


Copyright © Huawei Technologies Co., Ltd.
CloudEngine 8800&7800&6800&5800 Series Switches
Configuration Guide - IP Service 3 DHCP Configuration

Procedure
Step 1 Run:
system-view

The system view is displayed.


Step 2 Run:
dhcp enable

DHCP is enabled.
By default, the DHCP function is disabled.
Step 3 Run:
ip pool ip-pool-name

A global address pool is created and the global address pool view is displayed.
By default, no global address pool exists on the switch.
Step 4 Run:
gateway-list ip-address &<1-8>

The egress gateway address is configured for the global address pool of a DHCP server.
By default, no egress gateway address is specified.

NOTE

When a DHCP client connects to the server or host outside the network segment, data must be forwarded
through the egress gateway.
To load balance traffic and improve network reliability, configure multiple gateways. An address pool can be
configured with a maximum of eight gateway addresses. Gateway addresses cannot be subnet broadcast
addresses.

Step 5 Run:
network ip-address [ mask { mask | mask-length } ]

The range of IP addresses that can be allocated dynamically in the global address pool is
specified.
By default, no network segment address for a global address pool is specified.
An address pool can contain only one address segment. The address range of the address pool
is set by the mask.

NOTE

When configuring the range of dynamically assignable IP addresses in the global address pool, ensure that the
range is the same as the network segment on which the DHCP server interface address or the DHCP relay
agent interface address resides. This avoids incorrect assignment of IP addresses.

Step 6 (Optional) Run:


lease { day day [ hour hour [ minute minute ] ] | unlimited }

The IP address lease is set.


By default, the IP address lease is one day.
Different address pools on a DHCP server can be set with different IP address leases, but the
IP addresses in one address pool must be configured with the same lease.

Issue 05 (2017-05-08) Huawei Proprietary and Confidential 100


Copyright © Huawei Technologies Co., Ltd.
CloudEngine 8800&7800&6800&5800 Series Switches
Configuration Guide - IP Service 3 DHCP Configuration

Step 7 (Optional) Run:


excluded-ip-address start-ip-address [ end-ip-address ]

The IP addresses that cannot be automatically allocated in the global address pool are
configured.
By default, all IP addresses in the address pool can be automatically assigned to clients.
Some IP addresses in the global address pool are reserved for other services, for example, the
IP address of the DNS server cannot be allocated to clients. If you run this command multiple
times, you can set multiple IP address ranges that cannot be automatically allocated in the
DHCP address pool.
Step 8 (Optional) Run:
static-bind ip-address ip-address mac-address mac-address

An IP address in the global address pool is statically bound to the MAC address of a DHCP
client.
By default, the IP address in a global address pool is not bound to any MAC address.
When a client requires a fixed IP address, bind an idle IP address in the address pool to the
client MAC address.

NOTE

When the IP address in the global address pool is statically bound to a MAC address, the IP address must be
in the range of IP addresses that can be allocated dynamically.

Step 9 (Optional) Run:


next-server ip-address

The server IP address for DHCP clients is configured.


By default, no server IP address is specified.
Step 10 (Optional) Run:
vpn-instance vpn-instance-name

The IP address pool is binded to a VPN instance.


By default, an IP address pool is not bound to any VPN instance.
Step 11 (Optional) Run:
lock

The IP address pool is locked.


By default, the IP address pool is unlocked.
Step 12 Run:
quit

The system view is displayed.


Step 13 (Optional) Run:
dhcp server identifier dest-ip

The DHCP server is enabled to use the destination IP address in the packet forwarded by the
DHCP relay as the server identifier.
By default, the DHCP server uses the inbound interface IP address in a DHCP request as the
server identifier.

Issue 05 (2017-05-08) Huawei Proprietary and Confidential 101


Copyright © Huawei Technologies Co., Ltd.
CloudEngine 8800&7800&6800&5800 Series Switches
Configuration Guide - IP Service 3 DHCP Configuration

This command is used when a DHCP client is connected to a DHCP relay (first PE) over a
VPN and the DHCP relay sends a DHCP request to the DHCP server (second PE). The DHCP
server assigns an IP address to the DHCP client over the VPN.
The server IP address specified by the DHCP server is generally the IP address of a non-
public interface on the DHCP server, but the DHCP request is received by a public interface
on the DHCP server. By default, the DHCP server uses the inbound interface IP address in the
DHCP request (public interface IP address) as the server identifier. As a result, the DHCP
client fails to extend the lease. To address this problem, run the dhcp server identifier dest-
ip command to enable the DHCP server to use the destination IP address in the packet
forwarded by the DHCP relay as the server identifier.
Step 14 (Optional) Run:
dhcp server bootp

The DHCP server is configured to respond to BOOTP requests.


By default, a DHCP server does not respond to BOOTP requests.
Step 15 (Optional) Run:
dhcp server bootp automatic

The DHCP server is configured to dynamically allocate IP addresses to BOOTP clients.


By default, the DHCP server does not dynamically allocate IP addresses to BOOTP clients.
When the device functions as the DHCP server, the device can allocate IP addresses to
BOOTP clients if the BOOTP clients reside on the same network as the DHCP server. You
can run the dhcp server bootp automatic command to dynamically allocate IP addresses.
You can also run the static-bind ip-address ip-address mac-address mac-address command
to allocate IP addresses to BOOTP clients in the static binding mode.
Step 16 Run:
commit

The configuration is committed.

----End

3.6.2 (Optional) Configuring the DNS Service and NetBIOS


Service on the DHCP Client

Context
To ensure normal operations of DHCP clients, you can specify the DNS server address and
the NetBIOS server address when the DHCP server assigns an IP address to the DHCP
client.NetBIOS:Network Basic Input Output System. When a DHCP client uses the NetBIOS
protocol for communication, host names must be mapped to IP addresses. Based on the modes
of obtaining mapping, NetBIOS nodes are classified into the following types:
l b-node: indicates a node in broadcast mode. This node obtains mappings in broadcast
mode.
l p-node: indicates a node in peer-to-peer mode. This node obtains mappings by
communicating with the NetBIOS server.
l m-node: indicates a node in mixed mode. An m-node is a p-node that has some broadcast
features.

Issue 05 (2017-05-08) Huawei Proprietary and Confidential 102


Copyright © Huawei Technologies Co., Ltd.
CloudEngine 8800&7800&6800&5800 Series Switches
Configuration Guide - IP Service 3 DHCP Configuration

l h-node: indicates a node in hybrid mode. An h-node is a b-type node enabled with the
end-to-end communication mechanism.

Procedure
Step 1 Run:
system-view

The system view is displayed.


Step 2 Run:
ip pool ip-pool-name

The IP address pool view is displayed.


Step 3 Run:
domain-name domain-name

The DNS domain name to be assigned to a DHCP client is configured.


Step 4 Run:
dns-list ip-address &<1-8>

The IP address of the DNS server is configured for a DHCP client.


To load balance the traffic and improve network reliability, configure multiple DNS servers.
Each address pool can be configured with a maximum of eight DNS server addresses.
Step 5 Run:
nbns-list ip-address &<1-8>

The IP address of the NetBIOS server used by the DHCP client is assigned.
Each address pool can be configured with a maximum of eight NetBIOS server address.
Step 6 Run:
netbios-type { b-node | h-node | m-node | p-node }

The NetBIOS node type of the DHCP client is configured.


By default, no NetBIOS node type is specified for DHCP clients.
Step 7 Run:
commit

The configuration is committed.

----End

3.6.3 (Optional) Configuring a DHCP Option for the Global


Address Pool

Context
As DHCP develops, new options are emerging. To use these options, add them to the attribute
list of the DHCP server manually. If the DHCP server is configured with the options, the
DHCP client obtains the configuration of the options from the DHCP packet replied by the
DHCP server when the client requests an IP address from the server.

Issue 05 (2017-05-08) Huawei Proprietary and Confidential 103


Copyright © Huawei Technologies Co., Ltd.
CloudEngine 8800&7800&6800&5800 Series Switches
Configuration Guide - IP Service 3 DHCP Configuration

Procedure
Step 1 Run:
system-view

The system view is displayed.


Step 2 Run:
ip pool ip-pool-name

The global address pool view is displayed.


Step 3 Run:
option code [ sub-option sub-code ] { ascii ascii-string | hex hex-string |
cipher cipher-string | ip-address ip-address &<1-8> }

A user-defined option that a DHCP server assigns to a DHCP client is specified.


No user-defined option is specified by default.

NOTE

l To ensure accuracy, read the Request For Comments (RFC) before configuring options.
l When the password is contained in option, the ascii or hex type is insecure. Set the option type to cipher.
A secure password should contain at least two types of the following: lowercase letters, uppercase letters,
number, and special characters. In addition, the password must consist of six or more than six characters.

Step 4 Run:
option121 ip-address { ip-address mask-length gateway-address } &<1-8>

A classless static route that a DHCP server assigns to a DHCP client is specified.
No classless static route is specified by default.
Step 5 Run:
option184 { as-ip ip-address | fail-over ip-address dialer-string | ncp-ip ip-
address | voice-vlan vlan-id }

The Option184 that a DHCP server delivers to a DHCP client is specified.


The Option184 is not specified by default.
Step 6 Run:
commit

The configuration is committed.

----End

3.6.4 (Optional) Preventing Repeated IP Address Allocation

Context
Before assigning an address to a client, the switch used as the DHCP server needs to ping the
IP address to avoid address conflicts.
After the dhcp server ping command is executed, the DHCP server can prevent repeated IP
address allocation. The DHCP server pings an IP address to be allocated. If there is no
response to the ping packet within a certain period, the DHCP server continues to send ping
packets to this IP address until the number of ping packets reaches the maximum value. If

Issue 05 (2017-05-08) Huawei Proprietary and Confidential 104


Copyright © Huawei Technologies Co., Ltd.
CloudEngine 8800&7800&6800&5800 Series Switches
Configuration Guide - IP Service 3 DHCP Configuration

there is still no response, this IP address is not in use, and the DHCP server allocates the IP
address to a client.
Duplicate IP address detection on the DHCP server should not be too long. Otherwise, the
client cannot obtain an IP address. It is recommended that the configured total detection time
(Maximum number of send ping packets x Maximum response time) be smaller than 8s.

Procedure
Step 1 Run:
system-view

The system view is displayed.


Step 2 Run:
dhcp server ping packet number

The maximum number of ping packets to be sent by the switch is set.


By default, the DHCP server sends 0 ping packets, indicating that no ping operation is
performed.
Step 3 Run:
dhcp server ping timeout milliseconds

The period in which the switch waits for the response to a ping packet is set.
By default, the period in which the switch waits for the response to a ping packet is 500 ms.
Step 4 Run:
commit

The configuration is committed.

----End

3.6.5 (Optional) Configuring Automatic Saving of DHCP Data


Context
When the device functions as the DHCP server, you can enable automatic saving of DHCP
data so that IP address information is saved to the storage device periodically.
You can configure the device to save DHCP data to the storage device. When a fault occurs,
you can restore data from the storage device.

Procedure
Step 1 Run:
system-view

The system view is displayed.


Step 2 Run:
dhcp server database enable

The function that saves DHCP data to the storage device is enabled.
By default, DHCP data is not saved to the storage device.

Issue 05 (2017-05-08) Huawei Proprietary and Confidential 105


Copyright © Huawei Technologies Co., Ltd.
CloudEngine 8800&7800&6800&5800 Series Switches
Configuration Guide - IP Service 3 DHCP Configuration

After this command is executed, the system generates the lease.txt and conflict.txt files and
saves them in the dhcp folder of the storage device. The two files save the address lease
information and address conflict information. Run the command display dhcp server
database to check the storage device for saving DHCP data.
Step 3 Run:
dhcp server database write-delay interval

The interval for saving DHCP data is set.


After the device is configured to automatically save DHCP data, the device saves data every
300 seconds by default and the latest data overwrites the previous data.
Step 4 Run:
dhcp server database recover

The DHCP data in the storage device is restored.


After this command is executed, the device restores DHCP data from the storage device
during a restart.
Step 5 Run:
commit

The configuration is committed.

----End

3.6.6 (Optional) Configuring the DHCP Server to trust Option 82

Procedure
Step 1 Run:
system-view

The system view is displayed.


Step 2 Run:
undo dhcp server option82-trusted disable

The switch is configured to trust Option 82.


By default, the DHCP server trusts Option 82.
Step 3 Run:
commit

The configuration is committed.

----End

3.6.7 Checking the Configuration

Procedure
l Run the display ip pool [ name ip-pool-name [ start-ip-address [ end-ip-address ] | all |
conflict | expired | used ] ] command to check information about the specified global
address pool.

Issue 05 (2017-05-08) Huawei Proprietary and Confidential 106


Copyright © Huawei Technologies Co., Ltd.
CloudEngine 8800&7800&6800&5800 Series Switches
Configuration Guide - IP Service 3 DHCP Configuration

l Run the display dhcp server database command to check information about the DHCP
database.

----End

3.7 Configuring a DHCP Relay Agent


By using a DHCP relay agent, a DHCP client can communicate with a DHCP server on
another network segment to obtain an IP address and other configuration information.

Pre-configuration Tasks
Before configuring a DHCP relay agent, complete the following tasks:

l Configuring a DHCP server


l Configuring a route from the device used as the DHCP relay agent to the DHCP server

Configuration Process
Figure 3-11 shows the configuration process.

Figure 3-11 DHCP relay agent configuration process


Configuring DHCP Relay

Configuring DHCP Relay


on an Interface

Configuring a Destination
DHCP Server Group

Binding an Interface to a
DHCP Server Group

Configure DHCP relay Configure the destination


in inter-VPN scenarios DHCP server address

3.7.1 Configuring DHCP Relay on an Interface

Issue 05 (2017-05-08) Huawei Proprietary and Confidential 107


Copyright © Huawei Technologies Co., Ltd.
CloudEngine 8800&7800&6800&5800 Series Switches
Configuration Guide - IP Service 3 DHCP Configuration

Context
When the network where a DHCP client resides does not have a DHCP server, a DHCP relay
agent can be configured to forward DHCP messages of the client to a DHCP server.
NOTE

A DHCP message is forwarded between a DHCP client and a DHCP server at most 16 times, and then
the DHCP message is discarded.

Procedure
Step 1 Run:
system-view

The system view is displayed.


Step 2 Run:
dhcp enable

DHCP is enabled.
Step 3 Run:
interface interface-type interface-number [.subinterface-number ]

The interface or sub-interface view is displayed.


If you need to enter the sub-interface view, create a sub-interface. For detailed configurations,
see Configuring a Sub-interface in the CloudEngine 8800&7800&6800&5800 Seriesswitch
Configuration Guide - Interface Management.
NOTE

If a CE6810LI functions as a standalone switch or a leaf switch in an SVF system consisting of fixed and
modular switches, the CE6810LI does not support sub-interfaces. If a CE6810LI functions as a leaf switch in
an SVF system consisting of fixed switches, the CE6810LI supports sub-interfaces.

Step 4 On an Ethernet interface, run:


undo portswitch

The interface is switched to Layer 3 mode.


By default, an Ethernet interface works in Layer 2 mode.
If an Ethernet interface already has Layer 2 configuration, this command will fail to be
executed on the interface. Before running this command on the interface, delete all the Layer
2 configuration of the interface.
NOTE

If many Ethernet interfaces need to be switched to Layer 3 mode, run the undo portswitch batch
interface-type { interface-number1 [ to interface-number2 ] } &<1-10> command in the system view to
switch these interfaces to Layer 3 mode in batches.

Step 5 Run:
ip address ip-address { mask | mask-length }

An IP address is assigned to the interface.


Step 6 Run:
dhcp select relay

The DHCP relay function is enabled on the interface.

Issue 05 (2017-05-08) Huawei Proprietary and Confidential 108


Copyright © Huawei Technologies Co., Ltd.
CloudEngine 8800&7800&6800&5800 Series Switches
Configuration Guide - IP Service 3 DHCP Configuration

Step 7 Run:
commit

The configuration is committed.

----End

Follow-up Procedure
When the DHCP relay function is enabled on an interface, specify the DHCP server IP
address on the interface in either of the following ways:
l Configure a destination DHCP server group and bind the group to the interface. For
details, see 3.7.2 Configuring a Destination DHCP Server Group and 3.7.4 Binding
an Interface to a DHCP Server .
l Run the dhcp relay binding server ip ip-address command in the interface view to
configure the destination DHCP server address.

3.7.2 Configuring a Destination DHCP Server Group


Context
After a DHCP server group is created and server IP addresses are added to the group, the
switch used as the DHCP relay agent can forward messages to multiple servers.

Procedure
Step 1 Run:
system-view

The system view is displayed.


Step 2 Run:
dhcp relay server group group-name

A DHCP server group is created and the DHCP server group view is displayed.
You can configure a maximum of 256 DHCP server groups in the system, and a maximum of
20 DHCP servers in a DHCP server group.
Step 3 Run:
server ip-address [ ip-address-index ]

A DHCP server is added to a DHCP server group.


A maximum of 20 DHCP servers can be added to a DHCP server group.
Step 4 Run:
gateway ip-address

A gateway address is configured for the DHCP server.


Step 5 (Optional) Run:
vpn-instance vpn-instance-name

The DHCP server group is bound to the created VPN instance.


Step 6 Run:

Issue 05 (2017-05-08) Huawei Proprietary and Confidential 109


Copyright © Huawei Technologies Co., Ltd.
CloudEngine 8800&7800&6800&5800 Series Switches
Configuration Guide - IP Service 3 DHCP Configuration

commit

The configuration is committed.

----End

3.7.3 (Optional) Configuring DHCP Relay in Inter-VPN Scenarios


This section describes how to configure DHCP relay to allow DHCP clients and DHCP server
that are located in different VPNs to communicate with each other.

Context
When DHCP clients and the DHCP server are located in different VPNs, you can configure
DHCP relay on the DHCP relay interface to allow the communication between them.

Procedure
Step 1 Run:
system-view

The system view is displayed.


Step 2 Run:
dhcp enable

DHCP is enabled globally.


Step 3 Run:
interface interface-type interface-number

The interface view is displayed.


Step 4 Run:
ip address ip-address { mask | mask-length }

The interface's IP address is configured.


Step 5 (Optional) Run:
ip address ip-address { mask | mask-length } sub

A secondary IP address is configured for the interface.


If the DHCP relay agent fails to use the primary IP address to apply for IP addresses for
DHCP clients, run this command to configure a secondary IP address as a gateway address to
apply for IP addresses for the DHCP clients.
Step 6 Run:
dhcp select relay

DHCP relay is enabled.


Step 7 Run:
dhcp relay binding server ip ip-address { vpn-instance vpn-instance-name | public-
net }

An IP address is configured for the DHCP server.


Step 8 Run:
dhcp option82 { vss-control | link-selection | server-id-override } insert enable

Issue 05 (2017-05-08) Huawei Proprietary and Confidential 110


Copyright © Huawei Technologies Co., Ltd.
CloudEngine 8800&7800&6800&5800 Series Switches
Configuration Guide - IP Service 3 DHCP Configuration

The function of inserting the Option 82 field into packets is enabled on the DHCP relay
interface.

Step 9 (Optional) Run:


dhcp relay gateway ip-address

The relay agent address is configured.

By default, a DHCP relay interface uses its primary IP address as the relay agent address.

Step 10 (Optional) Run:


dhcp relay gateway-switch enable

The function of switching the relay agent address is enabled.

If the DHCP relay agent fails to use the primary IP address to apply for IP addresses for
DHCP clients, this function allows the DHCP relay agent to use the secondary IP address as a
gateway address to apply for IP addresses for the DHCP clients.

Step 11 (Optional) Run:


dhcp relay giaddr outgoing-interface-address

The relay agent address is configured as the IP address of the outbound interface.

In inter-VPN scenarios, if the DHCP server supports the suboption link-selection of the
Option 82 field, you can run this command to address the issue that return routes fail to be
found based on the GiAddr address.

Step 12 Run:
commit

The configuration is committed.

----End

3.7.4 Binding an Interface to a DHCP Server

Context
After the DHCP relay function is enabled on an interface, bind a DHCP server group to the
interface so that DHCP clients can access DHCP servers in the bound server group.

Procedure
Step 1 Run:
system-view

The system view is displayed.

Step 2 Run:
interface interface-type interface-number [.subinterface-number ]

The interface or sub-interface view is displayed.

If you need to enter the sub-interface view, create a sub-interface. For detailed configurations,
see Configuring a Sub-interface in the CloudEngine 8800&7800&6800&5800 Seriesswitch
Configuration Guide - Interface Management.

Issue 05 (2017-05-08) Huawei Proprietary and Confidential 111


Copyright © Huawei Technologies Co., Ltd.
CloudEngine 8800&7800&6800&5800 Series Switches
Configuration Guide - IP Service 3 DHCP Configuration

NOTE

If a CE6810LI functions as a standalone switch or a leaf switch in an SVF system consisting of fixed and
modular switches, the CE6810LI does not support sub-interfaces. If a CE6810LI functions as a leaf switch in
an SVF system consisting of fixed switches, the CE6810LI supports sub-interfaces.

Step 3 On an Ethernet interface, run:


undo portswitch

The interface is switched to Layer 3 mode.

By default, an Ethernet interface works in Layer 2 mode.


If an Ethernet interface already has Layer 2 configuration, this command will fail to be
executed on the interface. Before running this command on the interface, delete all the Layer
2 configuration of the interface.
NOTE

If many Ethernet interfaces need to be switched to Layer 3 mode, run the undo portswitch batch
interface-type { interface-number1 [ to interface-number2 ] } &<1-10> command in the system view to
switch these interfaces to Layer 3 mode in batches.

Step 4 You can bind a DHCP relay interface to a DHCP server group or a DHCP server.
l Bind a DHCP relay interface to a DHCP server group.
Run:
dhcp relay binding server group group-name

The DHCP relay interface is bound to a DHCP server group.


l Bind a DHCP relay interface to a DHCP server.
a. Run:
dhcp relay binding server ip ip-address

The DHCP server IP address is specified on an interface enabled with DHCP relay.
b. Run:
dhcp relay gateway ip-address

A gateway address is specified for the DHCP relay agent.


By default, no gateway address is specified for the DHCP relay agent.

Step 5 (Optional) Run:


dhcp relay gateway-switch enable

DHCP relay gateway switching is enabled.

By default, DHCP relay gateway switching is disabled.

Step 6 Run:
commit

The configuration is committed.

----End

3.7.5 (Optional) Configuring the DHCP Relay Agent to Send


DHCP Release Messages

Issue 05 (2017-05-08) Huawei Proprietary and Confidential 112


Copyright © Huawei Technologies Co., Ltd.
CloudEngine 8800&7800&6800&5800 Series Switches
Configuration Guide - IP Service 3 DHCP Configuration

Context
If a user is forcibly disconnected, you can manually release the IP address assigned to the user
on the DHCP server. You can configure the DHCP relay agent to actively send DHCP Release
messages to the DHCP server. The DHCP server then releases the specified IP addresses.

Procedure
Step 1 Run:
system-view

The system view is displayed.


Step 2 (Optional) Run:
interface interface-type interface-number [.subinterface-number ]

The interface or sub-interface view is displayed.


If you need to enter the sub-interface view, create a sub-interface. For detailed configurations,
see Configuring a Sub-interface in the CloudEngine 8800&7800&6800&5800 Seriesswitch
Configuration Guide - Interface Management.
NOTE

If a CE6810LI functions as a standalone switch or a leaf switch in an SVF system consisting of fixed and
modular switches, the CE6810LI does not support sub-interfaces. If a CE6810LI functions as a leaf switch in
an SVF system consisting of fixed switches, the CE6810LI supports sub-interfaces.

Step 3 On an Ethernet interface, run:


undo portswitch

The interface is switched to Layer 3 mode.


By default, an Ethernet interface works in Layer 2 mode.
If an Ethernet interface already has Layer 2 configuration, this command will fail to be
executed on the interface. Before running this command on the interface, delete all the Layer
2 configuration of the interface.
NOTE

If many Ethernet interfaces need to be switched to Layer 3 mode, run the undo portswitch batch
interface-type { interface-number1 [ to interface-number2 ] } &<1-10> command in the system view to
switch these interfaces to Layer 3 mode in batches.

Step 4 Run:
dhcp relay release client-ip-address mac-address [ server-ip-address ]

The DHCP relay agent is configured to send DHCP Release messages to the DHCP server.
l When you use the dhcp relay release command in the system view:
– If no DHCP server is specified, the DHCP relay agent will send DHCP Release
messages to the servers in all DHCP server groups bound to the DHCP relay
interfaces.
– If a DHCP server is specified, the DHCP relay agent sends DHCP Release
messages to only the specified DHCP server.
l When you use the dhcp relay release command in the interface view:
– If no DHCP server is specified, the DHCP relay agent will send DHCP Release
messages to all the servers in the DHCP server group bound to this VLANIF
interface.

Issue 05 (2017-05-08) Huawei Proprietary and Confidential 113


Copyright © Huawei Technologies Co., Ltd.
CloudEngine 8800&7800&6800&5800 Series Switches
Configuration Guide - IP Service 3 DHCP Configuration

– If a DHCP server is specified, the DHCP relay agent sends DHCP Release
messages to only the specified DHCP server.

----End

3.7.6 Checking the Configuration


Procedure
l Run the display dhcp relay interface interface-type interface-number command to view
the DHCP server group or the DHCP servers on the DHCP relay interface.
l Run the display dhcp relay server group [ group-name ] command to view the DHCP
server group configuration.
----End

3.8 Maintaining DHCP


After DHCP configurations are complete, you can clear DHCP statistics and monitor DHCP
operation.

3.8.1 Clearing DHCP Statistics


Context
During routine maintenance, you can use the reset commands to clear DHCP statistics.

NOTICE
DHCP statistics cannot be restored after they are cleared. Exercise caution when running the
reset commands.

Procedure
l Run the reset dhcp server statistics command in the user view to clear DHCP server
statistics.
l Run the reset dhcp statistics command in the user view to clear the DHCP message
statistics.
l Run the reset dhcp relay statistics [ server-group group-name ] command in the user
view to clear DHCP relay agent statistics.
----End

Issue 05 (2017-05-08) Huawei Proprietary and Confidential 114


Copyright © Huawei Technologies Co., Ltd.
CloudEngine 8800&7800&6800&5800 Series Switches
Configuration Guide - IP Service 3 DHCP Configuration

3.8.2 Clearing the DHCP Address Pool


Procedure
l Run the reset ip pool name ip-pool-name { start-ip-address [ end-ip-address ] | all |
conflict | expired | used } command to reset the configured IP address pool on the
device.
----End

3.8.3 Monitoring DHCP Operation


Context
DHCP packet statistics contain only the number of packets received and sent by the DHCP
module.

Procedure
l Run the display dhcp statistics command to view DHCP message statistics.
l Run the display dhcp relay statistics [ server-group group-name ] command to view
statistics on the DHCP Relay Agent.
l Run the display dhcp server statistics command to view statistics on the DHCP Server.
----End

3.9 Configuration Examples


This section provides DHCP configuration examples including networking requirements and
configuration roadmap.
This section only provides configuration examples for single features. For details about multi-
feature configuration cases, feature-specific configuration cases, interconnection cases,
protocol or hardware replacement cases, and industry application cases, see the Typical
Configuration Cases.

3.9.1 Example for Configuring a DHCP Server Based on the


Global Address Pool

Networking Requirements
As shown in Figure 3-12, an enterprise has two offices on the same network segment. To
reduce network construction cost, the enterprise uses one DHCP server to assign IP addresses
for hosts in the two offices.
All the hosts in Office1 are on the network segment 10.1.1.0/25 and added to VLAN 10.
Hosts in Office1 only use the DNS service with a lease of ten days. All the hosts in Office2
are on the network segment 10.1.1.128/25 and added to VLAN 20. Hosts in Office2 use the
DNS service and NetBIOS service with a lease of two days.
You can configure a global address pool on SwitchB and enable the server to dynamically
assign IP addresses to hosts in the two offices.

Issue 05 (2017-05-08) Huawei Proprietary and Confidential 115


Copyright © Huawei Technologies Co., Ltd.
CloudEngine 8800&7800&6800&5800 Series Switches
Configuration Guide - IP Service 3 DHCP Configuration

Figure 3-12 Networking diagram for configuring a DHCP server based on the global address
pool
NetBIOS Server DHCP DHCP DHCP
10.1.1.4/25 Client Client Client

10GE1/0/1 10GE1/0/2
VLANIF10 VLANIF20
10.1.1.1/25 10.1.1.129/25
SwitchA SwitchC

SwitchB
DHCP Server

DNS Server DHCP DHCP DHCP


10.1.1.2/25 Client Client Client
Network: 10.1.1.0/25 Network: 10.1.1.128/25
Office 1 Office 2

Configuration Roadmap
The configuration roadmap is as follows:

1. Create two global address pools on SwitchB and set attributes of the pools. Assign IP
addresses to Office1 and Office2 as required.
2. Configure VLANIF interfaces to use the global address pool to assign IP addresses to
clients.

Procedure
Step 1 Enable DHCP.
<Huawei> system-view
[~Huawei] sysname SwitchB
[*Huawei] commit
[~SwitchB] dhcp enable
[*SwitchB] commit

Step 2 Create address pools and set the attributes of the address pools.

# Set the attributes of IP address pool 1, including the address pool range, DNS server
address, gateway address, and address lease.
[~SwitchB] ip pool pool1
[*SwitchB-ip-pool-pool1] gateway-list 10.1.1.1
[*SwitchB-ip-pool-pool1] network 10.1.1.0 mask 255.255.255.128
[*SwitchB-ip-pool-pool1] dns-list 10.1.1.2
[*SwitchB-ip-pool-pool1] excluded-ip-address 10.1.1.2
[*SwitchB-ip-pool-pool1] excluded-ip-address 10.1.1.4
[*SwitchB-ip-pool-pool1] lease day 10
[*SwitchB-ip-pool-pool1] commit
[~SwitchB-ip-pool-pool1] quit

# Set the attributes of IP address pool 2, including the address pool range, DNS server
address, egress gateway address, NetBIOS server address, and address lease.

Issue 05 (2017-05-08) Huawei Proprietary and Confidential 116


Copyright © Huawei Technologies Co., Ltd.
CloudEngine 8800&7800&6800&5800 Series Switches
Configuration Guide - IP Service 3 DHCP Configuration

[~SwitchB] ip pool pool2


[*SwitchB-ip-pool-pool2] gateway-list 10.1.1.129
[*SwitchB-ip-pool-pool2] network 10.1.1.128 mask 255.255.255.128
[*SwitchB-ip-pool-pool2] dns-list 10.1.1.2
[*SwitchB-ip-pool-pool2] nbns-list 10.1.1.4
[*SwitchB-ip-pool-pool2] lease day 2
[*SwitchB-ip-pool-pool2] commit
[~SwitchB-ip-pool-pool2] quit

Step 3 Set the address assignment mode on the VLANIF interfaces.

# Add 10GE1/0/1 and 10GE1/0/2 to the corresponding VLANs.


[~SwitchB] vlan batch 10 20
[*SwitchB] interface 10ge 1/0/1
[*SwitchB-10GE1/0/1] port link-type trunk
[*SwitchB-10GE1/0/1] port trunk allow-pass vlan 10
[*SwitchB-10GE1/0/1] commit
[~SwitchB-10GE1/0/1] quit
[~SwitchB] interface 10ge 1/0/2
[~SwitchB-10GE1/0/2] port link-type trunk
[*SwitchB-10GE1/0/2] port trunk allow-pass vlan 20
[*SwitchB-10GE1/0/2] commit
[~SwitchB-10GE1/0/2] quit

# Configure an IP address for VLANIF10.


[~SwitchB] interface vlanif 10
[*SwitchB-Vlanif10] ip address 10.1.1.1 255.255.255.128
[*SwitchB-Vlanif10] commit
[~SwitchB-Vlanif10] quit

# Configure an IP address for VLANIF20.


[~SwitchB] interface vlanif 20
[*SwitchB-Vlanif20] ip address 10.1.1.129 255.255.255.128
[*SwitchB-Vlanif20] commit
[~SwitchB-Vlanif20] quit

Step 4 Verify the configuration.

# Run the display ip pool command on SwitchB to view the IP address pool configuration.
[~SwitchB] display ip pool
-----------------------------------------------------------------------------
Pool name : pool1
Pool number : 0
Position : Local Status : Unlocked
Gateway : 10.1.1.1
Mask : 255.255.255.128
VPN instance : --

-----------------------------------------------------------------------------
Pool name : pool2
Pool number : 1
Position : Local Status : Unlocked
Gateway : 10.1.1.129
Mask : 255.255.255.128
VPN instance : --

IP address Statistic
Total :250
Used :6 Idle :242 Expired :0
Conflict :0 Disable :2

----End

Issue 05 (2017-05-08) Huawei Proprietary and Confidential 117


Copyright © Huawei Technologies Co., Ltd.
CloudEngine 8800&7800&6800&5800 Series Switches
Configuration Guide - IP Service 3 DHCP Configuration

Configuration Files
Configuration file of SwitchB
#
sysname SwitchB
#
vlan batch 10 20
#
dhcp enable
#
ip pool pool1
gateway-list 10.1.1.1
network 10.1.1.0 mask 255.255.255.128
lease day 10 hour 0 minute 0
dns-list 10.1.1.2
excluded-ip-address 10.1.1.2
excluded-ip-address 10.1.1.4
#
ip pool pool2
gateway-list 10.1.1.129
network 10.1.1.128 mask 255.255.255.128
lease day 2 hour 0 minute 0
dns-list 10.1.1.2
nbns-list 10.1.1.4
#
interface Vlanif10
ip address 10.1.1.1 255.255.255.128
#
interface Vlanif20
ip address 10.1.1.129 255.255.255.128
#
interface 10GE1/0/1
port link-type trunk
port trunk allow-pass vlan 10
#
interface 10GE1/0/2
port link-type trunk
port trunk allow-pass vlan 20
#
return

3.9.2 Example for Configuring a DHCP Relay Agent

Networking Requirements
As shown in Figure 3-13, an enterprise uses a DHCP server to assign IP addresses to servers
in the data center. The server at 10.20.20.0/24 is used as an example to describe how to
configure a DHCP relay agent.
The enterprise client is on the network segment 10.20.20.0/24, and the DHCP server is on the
network segment 10.10.10.0/24. The DHCP clients can obtain IP addresses from the DHCP
server through SwitchA enabled with DHCP relay.
The uplink interface of SwitchA is 10GE1/0/2, the address of VLANIF 200 is 10.10.20.1/24,
and the interface address of SwitchA connected to the peer device is 10.10.20.2/24.
The public address of the DHCP server is 10.10.10.1/24 and the interface address of the
DHCP server connected to the peer device is 10.10.10.2/24.

Issue 05 (2017-05-08) Huawei Proprietary and Confidential 118


Copyright © Huawei Technologies Co., Ltd.
CloudEngine 8800&7800&6800&5800 Series Switches
Configuration Guide - IP Service 3 DHCP Configuration

Figure 3-13 DHCP relay agent

Internet DHCP Server

10.10.10.1/24

VLANIF200
10GE1/0/2 10.10.20.1/24
DHCP Relay SwitchA
VLANIF100
10GE1/0/1
10.20.20.1/24

DHCP DHCP DHCP


Client Client Client

VLAN100

Configuration Roadmap
The configuration roadmap is as follows:

1. Configure DHCP relay on SwitchA to enable SwitchA to forward DHCP messages from
different network segments.

Procedure
Step 1 Add 10GE1/0/2 on SwitchA to VLAN 200.
<Huawei> system-view
[~Huawei] sysname SwitchA
[*Huawei] commit
[~SwitchA] vlan batch 200
[*SwitchA] interface 10ge 1/0/2
[*SwitchA-10GE1/0/2] port link-type trunk
[*SwitchA-10GE1/0/2] port trunk allow-pass vlan 200
[*SwitchA-10GE1/0/2] quit
[*SwitchA] interface vlanif 200
[*SwitchA-Vlanif200] ip address 10.10.20.1 24
[*SwitchA-Vlanif200] quit
[*SwitchA] commit

Step 2 Configure the DHCP relay function on SwitchA.


1. Create a DHCP server group and add DHCP servers to the group.

# Create a DHCP server group.

Issue 05 (2017-05-08) Huawei Proprietary and Confidential 119


Copyright © Huawei Technologies Co., Ltd.
CloudEngine 8800&7800&6800&5800 Series Switches
Configuration Guide - IP Service 3 DHCP Configuration

[~SwitchA] dhcp relay server group dhcpgroup1

# Add a DHCP server to the DHCP server group.


[*SwitchA-dhcp-relay-server-group-dhcpgroup1] server 10.10.10.1
[*SwitchA-dhcp-relay-server-group-dhcpgroup1] quit
[*SwitchA] commit

2. Enable DHCP relay on the interface.


# Create a VLAN and add 10GE1/0/1 to the VLAN.
[~SwitchA] vlan batch 100
[*SwitchA] interface 10ge 1/0/1
[*SwitchA-10GE1/0/1] port default vlan 100
[*SwitchA-10GE1/0/1] quit
[*SwitchA] commit

# Enable DHCP globally and DHCP relay on the interface.


[~SwitchA] dhcp enable
[*SwitchA] interface vlanif 100
[*SwitchA-Vlanif100] dhcp select relay
[*SwitchA-Vlanif100] quit
[*SwitchA] commit

3. Bind an interface to a DHCP server group.


# Assign IP addresses to interfaces.
[~SwitchA] interface vlanif 100
[*SwitchA-Vlanif100] ip address 10.20.20.1 24

Bind the interface to the DHCP server group.


[*SwitchA-Vlanif100] dhcp relay binding server group dhcpgroup1
[*SwitchA-Vlanif100] quit
[*SwitchA] commit

Step 3 Configure a default route on SwitchA.


[~SwitchA] ip route-static 0.0.0.0 0.0.0.0 10.10.20.2
[*SwitchA] commit

Step 4 Verify the configuration.


# Run the display dhcp relay command on SwitchA to view the DHCP relay configuration
on the interface.
[~SwitchA] display dhcp relay interface vlanif 100
DHCP relay agent running information of interface Vlanif100 :
Server group name : dhcpgroup1
Gateway address in use : 10.20.20.1

----End

Configuration Files
Configuration file of SwitchA
#
sysname SwitchA
#
vlan batch 100 200
#
dhcp enable
#
dhcp relay server group dhcpgroup1
server 10.10.10.1 0

Issue 05 (2017-05-08) Huawei Proprietary and Confidential 120


Copyright © Huawei Technologies Co., Ltd.
CloudEngine 8800&7800&6800&5800 Series Switches
Configuration Guide - IP Service 3 DHCP Configuration

#
interface Vlanif100
ip address 10.20.20.1 255.255.255.0
dhcp select relay
dhcp relay binding server group dhcpgroup1
#
interface Vlanif200
ip address 10.10.20.1 255.255.255.0
#
interface 10GE1/0/1
port default vlan 100
#
interface 10GE1/0/2
port link-type trunk
port trunk allow-pass vlan 200
#
ip route-static 0.0.0.0 0.0.0.0 10.10.20.2
#
return

3.10 References
This section lists references of DHCP.
The following table lists the references of this document.

Document Description Remarks

RFC951 BOOTSTRAP PROTOCOL (BOOTP) -

RFC1533 DHCP Options and BOOTP Vendor -


Extensions

RFC1534 Interoperation Between DHCP and -


BOOTP

RFC2131 Dynamic Host Configuration Protocol -

RFC2132 DHCP Options and BOOTP Vendor -


Extensions

RFC3046 DHCP Relay Agent Information Option -

Issue 05 (2017-05-08) Huawei Proprietary and Confidential 121


Copyright © Huawei Technologies Co., Ltd.

S-ar putea să vă placă și