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

Command Reference

CloudEngine 8800, 7800, 6800, and 5800 V200R002C50

This document describes all the configuration commands of the device, including the command function, syntax, parameters, views, default level, usage guidelines, examples, and related commands.
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 Configuration Commands

DHCP Configuration Commands

NOTE:

The CE6810LI does not support IPv4 Layer 3 forwarding. After the IPv4 function is enabled on an interface of the CE6810LI, the configured IPv4 address can only be used to manage the switch.

dhcp anti-attack check duplicate option

Function

The dhcp anti-attack check duplicate option command enables duplication check of options in DHCP packets.

The undo dhcp anti-attack check duplicate option command disables duplication check of options in DHCP packets.

By default, duplication check of options in DHCP packets is disabled.

Format

dhcp anti-attack check duplicate option [ { option-start [ to option-end ] } &<1-254> ]

undo dhcp anti-attack check duplicate option [ { option-start [ to option-end ] } &<1-254> ]

Parameters

Parameter Description Value
option-start Specifies the start value of an option in a DHCP packet. The value is an integer ranging from 1 to 254.
option-end Specifies the end value of an option in a DHCP packet. The value is an integer ranging from 1 to 254. For an option, the end value must be larger than the start value.

Views

System view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

To improve DHCP packet security, run the dhcp anti-attack check duplicate option command to enable duplication check of options in DHCP packets. After detecting duplicated options in a DHCP packet, the device discards the DHCP packet. If the start value and end value are specified, the device can perform duplication check of a specified option in DHCP packets. By default, the device performs duplication check of all options in DHCP packets.

Prerequisites

DHCP has been enabled globally by running the dhcp enable command.

Example

# Enable duplication check of option 80 in DHCP packets.

<HUAWEI> system-view
[~HUAWEI] dhcp enable
[*HUAWEI] dhcp anti-attack check duplicate option 80
Related Topics

dhcp enable

Function

The dhcp enable command enables DHCP.

The undo dhcp enable command disables DHCP.

By default, DHCP is disabled.

Format

dhcp enable

undo dhcp enable

Parameters

None

Views

System view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

Before you configure DHCP, run the dhcp enable command to globally enable DHCP. DHCP configurations take effect only after DHCP is enabled.

Configuration Impact

The undo dhcp enable command disables DHCP. However, related configurations are not deleted.

Precautions

The dhcp enable and sdn copy-to-controller dhcp enable commands are mutually exclusive.

Example

# Enable DHCP on a device.

<HUAWEI> system-view
[~HUAWEI] dhcp enable

dhcp relay binding server

Function

The dhcp relay binding server command configures a DHCP server group for a DHCP relay agent.

The undo dhcp relay binding server command deletes the DHCP server group configured for a DHCP relay agent.

By default, no DHCP server group is configured on a VLANIF interface.

Format

dhcp relay binding server group group-name

undo dhcp relay binding server group

Parameters

Parameter Description Value
group-name Specifies the name of a DHCP server group. The value is a string of 1 to 32 case-insensitive characters, spaces not supported.

Views

VLANIF interface view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

When a DHCP relay agent is used to forward DHCP Request messages from DHCP clients to DHCP servers, run the dhcp relay server-select command on the DHCP relay agent to configure a DHCP server group. Then configure IP addresses for the DHCP servers in the DHCP server group. This command is available only on data center devices.
NOTE:
  • You can bind multiple VLANIF interfaces to a DHCP server group. However, you can specify only one DHCP server group for each VLANIF interface.
  • IP addresses of the DHCP servers in a DHCP server group must not reside on the same network segment as the interface IP address of the DHCP relay agent.

Prerequisites

Precautions

If the dhcp relay server-select command is run in the same view more than once, the latest configuration overrides the previous one. If you specify a non-existent DHCP server group, the configuration fails, and the earlier configuration takes effect.

Example

# Configure a DHCP server group named group1 on VLANIF 100 for a DHCP relay agent.

<HUAWEI> system-view
[~HUAWEI] interface vlanif 100
[*HUAWEI-Vlanif100] dhcp relay binding server group group1

dhcp relay binding server ip

Function

The dhcp relay binding server ip command configures a DHCP server address on a VLANIF interface enabled with DHCP relay.

The undo dhcp relay binding server ip command deletes a specified or all DHCP server addresses on a VLANIF interface enabled with DHCP relay.

By default, no DHCP server address is configured on a VLANIF interface.

Format

dhcp relay binding server ip ip-address

undo dhcp relay binding server ip { ip-address | all }

dhcp relay binding server ip ip-address { vpn-instance vpn-name | public-net }

undo dhcp relay binding server ip ip-address { vpn-instance vpn-name | public-net }

Parameters

Parameter Description Value
ip-address Specifies the IP address of a DHCP server. The value is in dotted decimal notation.
all Deletes all DHCP server addresses on a VLANIF interface. -
vpn-instance vpn-name Specifies the name of a VPN instance to which a DHCP server belongs. The value is a string of 1 to 31 case-sensitive characters, spaces not supported. In addition, the VPN instance name must not be _public_. When double quotation marks are used around the string, spaces are allowed in the string.
public-net Indicates that the DHCP server is the public network server. -

Views

VLANIF interface view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

When a DHCP relay agent is used to forward a DHCP Request message from a DHCP client to a DHCP server on a different network segment, run the dhcp relay binding server ip command on the DHCP relay agent to configure a DHCP server address. This command is available only on data center devices.

vpn-instance vpn-instance-name parameter must be specified in this command if the DHCP clients and DHCP server are in different VPNs. When the DHCP clients and DHCP server are in the same VPN, do not specify the vpn-instance vpn-instance-name parameter. This is because the VPN to which the DHCP server belongs is by default the same as the VPN to which the DHCP relay interface belongs. In this case, you only need to bind the DHCP relay interface to the VPN and use the VPN information.

Prerequisites

DHCP relay has been enabled on the VLANIF interface using the dhcp select relay command.

Precautions

A DHCP relay interface can have a maximum of 20 source IP addresses configured. The DHCP relay agent sends DHCP request packets to all servers and DHCP reply packets to all clients.

If the dhcp relay binding server ip command has been run for multiple times, the latest configuration will not override the previous one.

Multi-level DHCP relay is not supported in inter-VPN scenarios.

Example

# Configure DHCP server addresses 10.1.1.1 and 10.2.1.1 on VLANIF 100.

<HUAWEI> system-view
[~HUAWEI] dhcp enable
[*HUAWEI] vlan batch 100
[*HUAWEI] interface vlanif 100
[*HUAWEI-Vlanif100] dhcp select relay
[*HUAWEI-Vlanif100] dhcp relay binding server ip 10.1.1.1
[*HUAWEI-Vlanif100] dhcp relay binding server ip 10.2.1.1

# Configure the IP address 10.1.1.2 for the DHCP server (public network server) on interface VLANIF 200.

<HUAWEI> system-view
[~HUAWEI] dhcp enable
[*HUAWEI] vlan batch 200
[*HUAWEI] interface vlanif 200
[*HUAWEI-Vlanif200] dhcp select relay
[*HUAWEI-Vlanif200] dhcp relay binding server ip 10.1.1.2 public-net
Related Topics

dhcp relay gateway

Function

The dhcp relay gateway command configures a gateway address on a DHCP relay interface.

The undo dhcp relay gateway command deletes a gateway address configured on a DHCP relay interface.

By default, no gateway address is configured on a DHCP relay interface.

Format

dhcp relay gateway ip-address

undo dhcp relay gateway ip-address

Parameters

Parameter Description Value
ip-address Specifies a gateway address. The value is in dotted decimal notation.

Views

VLANIF interface view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

You can configure a gateway address based on the primary and secondary IP addresses of a DHCP relay interface. By default, the primary IP address is used as a gateway address. If VRRP has been enabled on the DHCP relay interface, run the dhcp relay gateway command to forcibly configure a gateway address on the interface. This command is available only on data center devices.
NOTE:
A maximum of 255 secondary IP addresses can be configured for an interface.

Prerequisites

DHCP relay has been enabled using the dhcp select relay command in the interface view.

Example

# Set the gateway address to 10.10.10.11 on VLANIF 100.

<HUAWEI> system-view
[~HUAWEI] interface vlanif100
[*HUAWEI-Vlanif100] dhcp select relay
[*HUAWEI-Vlanif100] dhcp relay gateway 10.10.10.11

dhcp relay gateway-switch enable

Function

The dhcp relay gateway-switch enable command enables DHCP relay gateway switching.

The undo dhcp relay gateway-switch enable command disables DHCP relay gateway switching.

By default, DHCP relay gateway switching is disabled.

Format

dhcp relay gateway-switch enable

undo dhcp relay gateway-switch enable

Parameters

None

Views

VLANIF interface view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

If a DHCP relay agent fails to use the primary IP address as the gateway address to apply for IP addresses for DHCP clients, run the dhcp relay gateway-switch enable command to configure the DHCP relay agent to use the secondary IP address as the gateway address to apply for IP addresses for the DHCP clients. This command is available only on data center devices.
NOTE:
  • If a DHCP client fails to obtain an IP address using the primary IP address three times, and the interval between the first and last failures exceeds 24 seconds, the gateway address switches from the primary IP address to a secondary IP address.
  • Each interface can have one primary IP address and a maximum of 255 secondary IP addresses. The system tries the secondary IP addresses one by one until the clients obtain IP addresses.

Prerequisites

  • DHCP has been enabled globally using the dhcp enable command.
  • A VLAN is created and the VLAN view is displayed using the vlan command.
  • The VLANIF interface view is displayed using the interface vlanif command.
  • DHCP relay has been enabled using the dhcp select relay command.
  • Primary and secondary IP addresses have been configured for the VLANIF interface.

Precautions

The dhcp relay gateway-switch enable command does not take effect if a gateway address is configured on the interface using the dhcp relay gateway command.

Example

# Enable DHCP relay gateway switching.

<HUAWEI> system-view
[~HUAWEI] interface vlanif 10
[*HUAWEI-Vlanif10] ip address 192.168.30.1 255.255.255.0
[*HUAWEI-Vlanif10] ip address 192.168.31.1 255.255.255.0 sub
[*HUAWEI-Vlanif10] dhcp select relay
[*HUAWEI-Vlanif10] dhcp relay binding server ip 192.168.30.1
[*HUAWEI-Vlanif10] dhcp relay gateway-switch enable

dhcp relay giaddr outgoing-interface-address

Function

The dhcp relay giaddr outgoing-interface-address command configures the relay agent address as the IP address of the outbound interface.

The undo dhcp relay giaddr outgoing-interface-address command deletes the configuration.

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

Format

dhcp relay giaddr outgoing-interface-address

undo dhcp relay giaddr outgoing-interface-address

Parameters

None

Views

Interface view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

By default, the primary IP address of the DHCP relay interface is used as the relay agent address, and the relay agent address is added to the GiAddr field of packets. The DHCP server then uses the relay agent address to identify the network segment where a user resides and allocates an appropriate IP address for the user to allow for communication with the DHCP relay.

If the user and the DHCP server are located in different VPNs, the DHCP server fails to use this relay agent address to communicate with the DHCP relay, and DHCP reply packets are unreachable.

To address this issue, run the dhcp relay giaddr outgoing-interface-address command to configure the relay agent address as the IP address of the outbound interface in DHCP request packets. In this manner, the DHCP reply packets sent by the DHCP server can be successfully forwarded to the DHCP relay.

Generally, the DHCP server allocates IP addresses based on the GiAddr field. A modification of the GiAddr field may cause a user online failure.
  • If the DHCP server supports the suboption link-selection of the Option 82 field, run the dhcp option82 command on the DHCP relay so that the suboption link-selection can be added to the Option 82 field in DHCP request packets. As the suboption link-selection carries GiAddr information, the DHCP server can allocate IP addresses to users based on this suboption.
  • If the DHCP server does not support the suboption link-selection of the Option 82 field, the dhcp relay giaddr outgoing-interface-address command cannot be run.

Precautions

Running this command in non-inter-VPN address allocation scenarios leads to a user online failure.

Example

# On interface VBDIF100, configure the relay agent address as the IP address of the outbound interface.

<HUAWEI> system-view
[~HUAWEI] bridge-domain 100
[*HUAWEI-bd100] quit
[*HUAWEI] interface Vbdif100
[*HUAWEI-Vbdif100] dhcp relay giaddr outgoing-interface-address

dhcp option82

Function

The dhcp option82 command enables the function of inserting the Option 82 option to DHCP packets on the DHCP relay interface in inter-VPN scenarios.

The undo dhcp option82 command disables the function of inserting the Option 82 option to DHCP packets on the DHCP relay interface in inter-VPN scenarios.

By default, the function of inserting the Option 82 option to DHCP packets on the DHCP relay interface in inter-VPN scenarios is disabled.

Format

dhcp option82 { vss-control | link-selection | server-id-override } insert enable

undo dhcp option82 { vss-control | link-selection | server-id-override } insert enable

Parameters

Parameter Description Value
vss-control Indicates suboption 151 that carries VPN information of a DHCP client. -
link-selection Indicates suboption 5 that carries the GiAddr address of the DHCP relay interface. -
server-id-override Indicates suboption 11 that carries the IP address of the DHCP relay interface. -

Views

Interface view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

When the DHCP server and DHCP clients are in different VPNs, run the dhcp option82 command on the DHCP relay so that suboption 151, suboption 5, and suboption 11 can be inserted to the Option 82 field in DHCP request packets. In this manner, DHCP clients can properly obtain IP addresses from the DHCP server.

The functions of the three suboptions are as follows:
  • suboption151: corresponds to the vss-control parameter that indicates VPN information of DHCP clients. Inserting this suboption to the Option 82 field is a proof of address allocation by the DHCP server.
  • suboption5: corresponds to the link-selection parameter that indicates the GiAddr information of the DHCP relay interface. In inter-VPN scenarios, the dhcp relay giaddr outgoing-interface-address command is run to allow the DHCP reply packets to be properly sent to the DHCP relay. The suboption 5 allows the GiAddr information to be sent to the DHCP server. Then DHCP server then selects the desired address pool based on suboption151 and suboption5 and allocates IP addresses to DHCP clients.
  • suboption11: corresponds to the server-id-override parameter that indicates the IP address of the DHCP relay interface. This suboption helps DHCP clients to obtain the correct destination IP address of renewal packets. Generally, when a DHCP client applies for an IP address for the first time, the DHCP reply packet sent by the DHCP server carries the Option 54 field that contains the IP address of the DHCP server. Upon receipt of the DHCP reply packet, the DHCP client uses this IP address as the destination IP address of renewal packets. Then, the DHCP client can interact with the DHCP server using unicast packets whenever it wants to renew the lease. In inter-VPN scenarios, if suboption 11 is inserted to the Option 82 field on the DHCP relay, the DHCP server encapsulates the content in suboption 11 into Option 54 in a DHCP reply packet. Upon receipt of the DHCP reply packet, the DHCP client uses the IP address of the DHCP relay interface as the destination IP address of renewal packets. In this manner, the DHCP client can properly send packets to the DHCP server through DHCP relay when it renews the lease.

Precautions

This command is used only in inter-VPN scenarios.

  • If the DHCP server does not support suboption link-selection, the return route unreachable issue can be addressed using a loopback interface. Specifically, you can configure a loopback interface on the DHCP relay, configure the loopback interface's IP address as the GiAddr address, and bind it to the VPN where the DHCP server resides.
  • If the DHCP server does not support suboption 11, the server route unreachable issue can be address using a loopback interface. Specifically, you can configure a loopback interface on the DHCP relay, configure the loopback interface's IP address as the DHCP server's IP address, and bind it to the VPN where DHCP clients reside.
This method may be time consuming when the live network is complex as this method requires the configuration of a loopback interface on each DHCP server or client. If the DHCP server supports suboptions, enabling the function of inserting suboptions to DHCP packets on the DHCP relay is recommended.

Example

# Enable the function of inserting suboption 5 and suboption 11 into DHCP packets on interface VLANIF 100.

<HUAWEI> system-view
[~HUAWEI] vlan batch 100
[*HUAWEI] interface vlanif 100
[*HUAWEI-Vlanif100] dhcp option82 link-selection insert enable
[*HUAWEI-Vlanif100] dhcp option82 server-id-override insert enable

dhcp relay release (system view)

Function

The dhcp relay release command configures a DHCP relay agent to request a DHCP server to release a DHCP client IP address.

Format

dhcp relay release client-ip-address mac-address [ server-ip-address | vpn-instance vpn-instance-name [ server-ip-address ] ]

Parameters

Parameter Description Value
client-ip-address Specifies the IP address of a DHCP client. The value is in dotted decimal notation.
mac-address Specifies the MAC address of a DHCP client. The value is in the format of H-H-H.
server-ip-address Specifies the IP address of a DHCP server. The value is in dotted decimal notation.
vpn-instance vpn-instance-name Specifies the name of a VPN instance. The value is a string of 1 to 31 case-sensitive characters, spaces not supported. In addition, the VPN instance name must not be _public_. When double quotation marks are used around the string, spaces are allowed in the string.

Views

System view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

To allow a DHCP relay agent to request a DHCP server to release a DHCP client IP address so that the client can log out, run the dhcp relay release command. If a DHCP server is specified, the DHCP relay agent sends a DHCP Release message only to the specified DHCP server.

Configuration Impact

If the DHCP server's IP address is not specified, the DHCP relay agent sends Release packets to all DHCP servers.

Precautions

In scenarios in which multiple DHCP relay agents are deployed, if a client knows the IP address of the DHCP server, it is recommended that server-ip-address be specified in the dhcp relay release command for IP address release. If a client does not know the IP address of the DHCP server, run the dhcp relay release command without server-ip-address specified on the last DHCP relay agent closest to the server. If the dhcp relay release command without server-ip-address specified is run on the first DHCP relay agent, IP address release may fail on the server.

Example

# Configure a DHCP relay agent to send Release packets to the DHCP server with the IP address of 10.110.91.174, requesting the IP address 192.168.2.25 for the DHCP client with the MAC address of 0050-ba34-2000.

<HUAWEI> system-view
[~HUAWEI] dhcp relay release 192.168.2.25 0050-ba34-2000 10.110.91.174

dhcp relay release (interface view)

Function

The dhcp relay release command configures a DHCP relay agent to request a DHCP server to release a DHCP client IP address.

Format

dhcp relay release client-ip-address mac-address [ server-ip-address ]

dhcp relay release client-ip-address mac-address server-ip-address { vpn-instance vpn-name | public-net }

Parameters

Parameter Description Value
client-ip-address Specifies the IP address of a DHCP client. The value is in dotted decimal notation.
mac-address Specifies the MAC address of a DHCP client. The value is in the format of H-H-H.
server-ip-address Specifies the IP address of a DHCP server. The value is in dotted decimal notation.
vpn-instance vpn-instance-name Specifies the name of a VPN instance to which a DHCP server belongs. The value is a string of 1 to 31 case-sensitive characters, spaces not supported. In addition, the VPN instance name must not be _public_. When double quotation marks are used around the string, spaces are allowed in the string.
public-net Indicates that the DHCP server is the public network server. -

Views

Interface view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

To allow a DHCP relay agent to request a DHCP server to release a DHCP client IP address so that the client can log out, run the dhcp relay release command. If a DHCP server is specified, the DHCP relay agent sends a DHCP Release message only to the specified DHCP server.

Configuration Impact

If the DHCP server's IP address is not specified, the DHCP relay agent sends Release packets to all DHCP servers.

Precautions

In scenarios in which multiple DHCP relay agents are deployed, if a client knows the IP address of the DHCP server, it is recommended that server-ip-address be specified in the dhcp relay release command for IP address release. If a client does not know the IP address of the DHCP server, run the dhcp relay release command without server-ip-address specified on the last DHCP relay agent closest to the server. If the dhcp relay release command without server-ip-address specified is run on the first DHCP relay agent, IP address release may fail on the server.

Example

# Configure a DHCP relay agent to request the DHCP server with IP address 10.110.91.174 to release IP address 192.168.2.25 of the DHCP client with MAC address 0050-ba34-2000.

<HUAWEI> system-view
[~HUAWEI] interface 10ge 1/0/1
[~HUAWEI-10GE1/0/1] undo portswitch
[*HUAWEI-10GE1/0/1] dhcp relay release 192.168.2.25 0050-ba34-2000 10.110.91.174

# Configure a DHCP relay agent to send Release packets to the DHCP server with the IP address of 10.100.81.154 in VPN1, requesting the IP address 192.168.3.25 for the DHCP client with the MAC address of 0050-ba10-2000.

<HUAWEI> system-view
[~HUAWEI] ip vpn-instance VPN1
[*HUAWEI-vpn-instance-VPN1] ipv4-family
[*HUAWEI-vpn-instance-VPN1-af-ipv4] commit
[~HUAWEI-vpn-instance-VPN1-af-ipv4] quit
[~HUAWEI-vpn-instance-VPN1] quit
[~HUAWEI] interface 10ge 1/0/1
[~HUAWEI-10GE1/0/1] undo portswitch
[*HUAWEI-10GE1/0/1] ip vpn-instance VPN1
[*HUAWEI-10GE1/0/1] dhcp relay release 192.168.3.25 0050-ba10-2000 10.100.81.154 vpn-instance VPN1

dhcp relay server group

Function

The dhcp relay server group command creates a DHCP server group and displays the DHCP server group view.

The undo dhcp relay server group command deletes a specified DHCP server group.

By default, no DHCP server group is created.

Format

dhcp relay server group group-name

undo dhcp relay server group group-name

Parameters

Parameter Description Value
group-name Specifies the name of a DHCP server group. The value is a string of 1 to 32 case-insensitive characters, spaces not supported.

Views

System view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

A DHCP relay agent serves multiple DHCP servers for assigning IP addresses to DHCP clients. To facilitate DHCP server management, run the dhcp server group command to create a DHCP server group. Then add DHCP servers to the DHCP server group. This command is available only on data center devices.
NOTE:
You can configure a maximum of 256 DHCP server groups globally. Each DHCP server group can contain a maximum of 20 DHCP servers.

Follow-up Procedure

  • Run the server command to add DHCP servers to the DHCP server group.
  • Run the dhcp relay binding server command in the VLANIF interface view to specify the DHCP server group for the DHCP relay agent.

Example

# Create a DHCP server group named dhcp-srv1.

<HUAWEI> system-view
[~HUAWEI] dhcp relay server group dhcp-srv1

dhcp server option82-trusted disable

Function

The dhcp server option82-trusted disable command disables a DHCP server from trusting Option 82.

The undo dhcp server option82-trusted disable command enables a DHCP server to trust Option 82.

By default, a DHCP server trusts Option 82.

Format

dhcp server option82-trusted disable

undo dhcp server option82-trusted disable

Parameters

None

Views

System view

Default Level

2: Configuration level

Usage Guidelines

An attack to the CPU can be initiated using packets carrying Option 82. To prevent this problem, run the dhcp server option82-trusted disable command to disable a DHCP server from trusting Option 82 so that the DHCP server discards packets carrying Option 82.

Example

# Enable a DHCP server to trust Option 82.

<HUAWEI> system-view
[~HUAWEI] undo dhcp server option82-trusted disable

dhcp select relay

Function

The dhcp select relay command enables DHCP relay.

The undo dhcp select relay command restores the default configuration on data center devices.

By default, DHCP relay is disabled.

Format

dhcp select relay

undo dhcp select relay

Parameters

None

Views

Interface view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

When a DHCP server and a DHCP client are on the same subnet, they can communicate using DHCP. You do not need to enable DHCP relay. If a DHCP server and a DHCP client are on different subnets, run the dhcp select relay command to enable DHCP relay to forward DHCP packets to the DHCP server.

Configuration Impact

After DHCP relay is enabled, the DHCP relay agent forwards IP addresses assigned by the DHCP server to DHCP clients.

Example

# Enable DHCP relay on 10GE 1/0/1 to forward DHCP messages.

<HUAWEI> system-view
[~HUAWEI] interface 10GE1/0/1
[~HUAWEI-10GE1/0/1] undo portswitch
[*HUAWEI-10GE1/0/1] dhcp select relay

dhcp server bootp

Function

The dhcp server bootp command enables a DHCP server to respond to Bootstrap Protocol (BOOTP) requests.

The undo dhcp server bootp command disables a DHCP server from responding to BOOTP requests.

By default, a DHCP server is disabled from responding to BOOTP requests.

Format

dhcp server bootp

undo dhcp server bootp

Parameters

None

Views

System view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

A DHCP server and a BOOTP server can be both deployed on a network. The BOOTP server assigns an IP address to a BOOTP client. A DHCP server can also reply to a BOOTP request. A BOOTP client can obtain an IP address from a DHCP server, not a BOOTP server. To enable a DHCP server to respond to BOOTP requests, run the dhcp server bootp command.

Prerequisites

DHCP has been enabled using the dhcp enable command in the system view.

Example

# Enable a DHCP server to respond to BOOTP requests.

<HUAWEI> system-view
[~HUAWEI] dhcp enable
[*HUAWEI] dhcp server bootp
Related Topics

dhcp server bootp automatic

Function

The dhcp server bootp automatic command enables a DHCP server to dynamically assign IP addresses to BOOTP clients.

The undo dhcp server bootp automatic command disables a DHCP server from dynamically assigning IP addresses to BOOTP clients.

By default, a DHCP server is disabled from dynamically assigning IP addresses to BOOTP clients.

Format

dhcp server bootp automatic

undo dhcp server bootp automatic

Parameters

None

Views

System view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

To allow a DHCP server to assign a BOOTP client an IP address, DNS server address, and egress gateway address, run the dhcp server bootp automatic command on the DHCP server.

Prerequisites

  • DHCP has been enabled using the dhcp enable command in the system view.
  • The DHCP server has been enabled to respond to BOOTP requests using the dhcp server bootp command in the system view.

Example

# Enable a DHCP server to dynamically assign IP addresses to BOOTP clients.

<HUAWEI> system-view
[~HUAWEI] dhcp enable
[*HUAWEI] dhcp server bootp
[*HUAWEI] dhcp server bootp automatic
Related Topics

dhcp server database

Function

The dhcp server database command enables the function of storing and restoring DHCP data.

The undo dhcp server database command disables the function of storing and restoring DHCP data.

By default, the function of storing and restoring DHCP data is disabled.

Format

dhcp server database { enable | recover | write-delay interval }

undo dhcp server database { enable | recover | write-delay }

Parameters

Parameter Description Value
enable Enables the function of storing DHCP data. -
recover Restores DHCP data from a storage device. -
write-delay interval Specifies the interval for storing DHCP data. The value is an integer ranging from 300 to 86400, in seconds. The default value is 300.

Views

System view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

To prevent against unexpected data loss, run the dhcp server database enable command to enable the DHCP data storage function. The system saves the lease.txt and conflict.txt files to a DHCP folder on the CF card. The system automatically saves DHCP data at an interval and the previous data files are overwritten. To configure such interval, run the dhcp server database write-delay interval command.

To restore DHCP data from a storage file when a device becomes faulty, run the dhcp server database recover command after the system is restarted.

Configuration Impact

After the dhcp server database enable command is executed, if a large number of clients go online concurrently, the online rate will be decreased greatly. Only a minority of clients can rapidly go online.

Precautions

The lease.txt and conflict.txt files will be overwritten on a regular basis. Backing up the two files is recommended.

The data storage function is independent of the data restoration function.

Example

# Enable the DHCP data storage function and set the storage interval to 36,000 seconds.

<HUAWEI> system-view
[~HUAWEI] dhcp server database enable
[*HUAWEI] dhcp server database write-delay 36000

# Enable the DHCP data storage function on storage device.

<HUAWEI> system-view
[~HUAWEI] dhcp server database recover

dhcp server identifier dest-ip

Function

The dhcp server identifier dest-ip command enables the DHCP server to use the destination IP address in the packet forwarded by the DHCP relay as the server identifier.

The undo dhcp server identifier command restores the default configuration.

By default, the DHCP server uses the inbound interface IP address in a DHCP request as the server identifier.

Format

dhcp server identifier dest-ip

undo dhcp server identifier

Parameters

None

Views

System view

Default Level

2: Configuration level

Usage Guidelines

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.

Example

# Enable the DHCP server to use the destination IP address in the packet forwarded by the DHCP relay as the server identifier.

<HUAWEI> system-view
[~HUAWEI] dhcp server identifier dest-ip

dhcp server ping

Function

The dhcp server ping command configures the maximum number of ping packets that a DHCP server sends and the maximum timeout period of each ping reply.

The undo dhcp server ping command restores the default configuration.

By default, the DHCP server does not send any ping packet (that is, no ping operation is performed), and the maximum response time is 500 ms.

Format

dhcp server ping { packet packet-number | timeout timeout-interval } *

undo dhcp server ping { packet | timeout }

Parameters

Parameter Description Value
packet packet-number Specifies the maximum number of ping packets that can be sent by a DHCP server. The value is an integer ranging from 0 to 10. Value 0 indicates that the ping operation is not performed.
timeout timeout-interval Specifies the maximum timeout period of each ping reply. The value is an integer ranging from 0 to 10000, in milliseconds.

Views

System view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

To prevent address conflicts due to repetitive IP address assignment, run the dhcp server ping command to configure the maximum number of ping packets that a DHCP server sends and the maximum timeout period of each ping reply. If no ping reply is received within a specified detection period, the DHCP server continues sending ping packets until the number of ping packets reaches the threshold. If still no ping reply is received, the DHCP server considers that this IP address can be assigned to a DHCP client as no device in the network segment is using this IP address. In this manner, the IP addresses sent to DHCP clients are unique.

Prerequisites

The DHCP function has been enabled using the dhcp enable command.

Example

# Configure the maximum number of ping packets that can be sent by a DHCP server to 10 and the maximum timeout period to 100 ms.

<HUAWEI> system-view
[~HUAWEI] dhcp enable
[*HUAWEI] dhcp server ping packet 10
[*HUAWEI] dhcp server ping timeout 100

display debugging dhcp

Function

The display debugging dhcp command displays DHCP debugging functions.

Format

display debugging dhcp

Parameters

None

Views

All views

Default Level

1: Monitoring level

Usage Guidelines

When a large amount of information is output, run the display debugging dhcp command to check the DHCP debugging functions that have been enabled. Then you can disable some unnecessary debugging functions to minimize the debugging information output.

Example

# Display DHCP debugging functions. In this example, the message debugging function is enabled.

<HUAWEI> display debugging dhcp
DHCP diagnose message debugging switch is on

# Display DHCP debugging functions. In this example, all debugging functions are enabled.

<HUAWEI> display debugging dhcp
DHCP diagnose event debugging switch is on
DHCP diagnose error debugging switch is on
DHCP diagnose message debugging switch is on
DHCP diagnose info debugging switch is on

display debugging dhcpr

Function

The display debugging dhcpr command displays DHCP relay debugging functions.

Format

display debugging dhcpr

Parameters

None

Views

All views

Default Level

1: Monitoring level

Usage Guidelines

When a large amount of information is output, run the display debugging dhcpr command to check the DHCP relay debugging functions that have been enabled. Then you can disable some unnecessary debugging functions to minimize the debugging information output. The DHCP relay debugging functions include:
  • DHCPR info debug
  • DHCPR event debug
  • DHCPR error debug
  • DHCPR packet debug

Example

# Display DHCP relay debugging functions.

<HUAWEI> display debugging dhcpr
DHCP relay event debugging switch is on 
DHCP relay error debugging switch is on 
DHCP relay info debugging switch is on 
DHCP relay packet debugging switch is on

display default-parameter dhcp option82

Function

The display default-parameter dhcp option82 command displays the default format information about DHCP Option82 on an interface in a VLAN.

Format

display default-parameter dhcp option82 interface interface-type interface-number vlan vlan-id

Parameters

Parameter Description Value
interface interface-type interface-number Specifies the type and number of an interface. -
vlan vlan-id Specifies a VLAN ID. The value is an integer ranging from 1 to 4094.

Views

All views

Default Level

1: Monitoring level

Usage Guidelines

Option82 is a special field contained in a DHCP packet and records the packet sending path. To view the default format of DHCP Option82 on an interface in a VLAN, run the display default-parameter dhcp option82 command.

Example

# Display the default format of DHCP Option82 on a specified interface in a VLAN.

<HUAWEI> display default-parameter dhcp option82 interface 10ge 1/0/0 vlan 1
 Option82 circuit-id format      : default
 Option82 remote-id format       : default
Table 8-19  Description of the display default-parameter dhcp option82 command output

Item

Description

Option82 circuit-id format

Default format of Option82 circuit-id

Option82 remote-id format

Default format of Option82 remote-id

display dhcp relay

Function

The display dhcp relay command displays DHCP server group information on a VLANIF interface.

Format

display dhcp relay { interface interface-type interface-number }

Parameters

Parameter Description Value
interface interface-type interface-number Specifies the type and number of an interface. -

Views

All views

Default Level

1: Monitoring level

Usage Guidelines

Usage Scenario

To check DHCP server group information on a VLANIF interface, run the display dhcp relay command. The information includes DHCP server addresses, DHCP gateway addresses in use, and configured gateway addresses. This command is available only on data center devices.

Example

# Display DHCP server group information on VLANIF 100.

<HUAWEI> display dhcp relay interface Vlanif100
 DHCP relay agent running information of interface Vlanif100 :
 Server IP address
         : 10.2.2.3
 Gateway address in use     : 10.2.2.2
 Gateway address configured : 5.5.5.5
 Gateway switch enable
Table 8-20  Description of the display dhcp relay command output

Item

Description

Server IP address

IP address of a DHCP server in a DHCP server group

Gateway address in use

IP address of the DHCP gateway in use

Gateway address configured

Configured gateway address

Gateway switch enable

Information indicating that DHCP relay gateway switching is enabled

display dhcp relay statistics

Function

The display dhcp relay statistics command displays packet statistics on a DHCP relay agent.

Format

display dhcp relay statistics [ server-group group-name ]

Parameters

Parameter Description Value
server-group group-name Specifies the name of a DHCP server group. The value is a string of 1 to 32 characters, spaces not supported. The string can contain letters, digits, underscores (_), hyphens (-), and periods (.). This parameter is available only on data center devices.

Views

All views

Default Level

1: Monitoring level

Usage Guidelines

Usage Scenario

To check packet statistics on a DHCP relay agent, run the display dhcp relay statistics command. The packets include:
  • DHCP messages received from DHCP clients
  • DHCP messages received from DHCP servers
  • DHCP messages sent to DHCP servers
  • DHCP messages (including unicast and broadcast packets) sent to DHCP clients

Example

# Display packet statistics on a DHCP relay agent.

<HUAWEI> display dhcp relay statistics
    DHCP packets received from clients         : 0
        DISCOVER packets                       : 0
        REQUEST packets                        : 0
        RELEASE packets                        : 0
        INFORM packets                         : 0
        DECLINE packets                        : 0
    DHCP packets sent to clients               : 0
        Unicast packets                        : 0
        Broadcast packets                      : 0
    DHCP packets received from servers         : 0
        OFFER packets                          : 0
        ACK packets                            : 0
        NAK packets                            : 0
    DHCP packets sent to servers               : 0
    DHCP Bad packets received                  : 0
    Local DHCP RELEASE packets sent to servers : 0
PNP authen request packets received            : 0
        Expired packets                        : 0
        Bad packets                            : 0
PNP authen reply packets sent                  : 0
Table 8-21  Description of the display dhcp relay statistics command output

Item

Description

DHCP packets received from clients

Number of DHCP messages received from DHCP clients

DISCOVER packets

Number of received DHCP Discover messages

REQUEST packets

Number of received DHCP Request messages

RELEASE packets

Number of received DHCP Release messages

INFORM packets

Number of received DHCP Inform messages

DECLINE packets

Number of received DHCP Decline messages

DHCP packets sent to clients

Number of DHCP messages sent to DHCP clients

Unicast packets

Number of unicast packets sent to DHCP clients

Broadcast packets

Number of broadcast packets sent to DHCP clients

DHCP packets received from servers

Number of DHCP messages received from DHCP servers

OFFER packets

Number of received DHCP Offer messages

ACK packets

Number of received DHCP ACK messages

NAK packets

Number of received DHCP NAK messages

DHCP packets sent to servers

Number of DHCP messages sent to DHCP servers

DHCP Bad packets received

Number of received DHCP error packets

Local DHCP RELEASE packets sent to servers

Number of local DHCP Release messages sent to DHCP servers

PNP authen request packets received

Number of authentication request packets received from PNP devices

Expired packets

Number of expired authentication request packets received from PNP devices

Bad packets

Number of error authentication request packets received from PNP devices

PNP authen reply packets sent

Number of authentication reply packets sent to PNP devices

display dhcp relay server group

Function

The display dhcp relay server group command displays DHCP server group information.

Format

display dhcp relay server group group-name

Parameters

Parameter Description Value
group-name Specifies the name of a DHCP server group. The value is a string of 1 to 32 case-insensitive characters, spaces not supported.

Views

All views

Default Level

1: Monitoring level

Usage Guidelines

Usage Scenario

To check all DHCP server group information and the numbers of DHCP servers in the DHCP server groups, run the display dhcp relay server group command. If group-name is specified, the command displays the number of DHCP servers in the specified DHCP server group and their IP addresses. This command is available only on data center devices.

Prerequisites

A DHCP server group has been created using the dhcp relay server group command.

Example

# Display DHCP server group information.

<HUAWEI> display dhcp relay server group
  Group-name          : group1
    (0)  Server-IP    : 1.1.1.1
    Gateway           : --
    VPN instance      : --
  1 DHCP server group(s) in total
Table 8-22  Description of the display dhcp relay server group command output

Item

Description

Group-name

Name of a DHCP server group

(0) Server-IP

IP address of a DHCP server in a DHCP server group

Gateway

Gateway address of a DHCP server in a DHCP server group

VPN instance

Name of a VPN instance

1 DHCP server group(s) in total

Number of DHCP server groups

display dhcp server database

Function

The display dhcp server database command displays storage information of DHCP data.

Format

display dhcp server database

Parameters

None

Views

All views

Default Level

1: Monitoring level

Usage Guidelines

To view storage information of DHCP data, such as the save path and file name, run the display dhcp server database command. The storage information helps you determine:

  • Whether the function of storing DHCP data to a storage device is enabled. To enable such function, run the dhcp server database command.
  • Whether the interval for storing DHCP data is qualified
  • Whether the function of restoring data from a storage device is enabled after system restart

Example

# Display DHCP database storage information.

<HUAWEI> display dhcp server database
 Status: enable
 Recover from files after reboot: disable
 File saving lease items: cfcard:/dhcp/lease.txt
 File saving conflict items: cfcard:/dhcp/conflict.txt
 Save interval: 300 (seconds) 
Table 8-23  Description of the display dhcp server database command output

Item

Description

Status

Whether DHCP data can be saved to a storage device
  • disable: DHCP data cannot be saved to a storage device.
  • enable: DHCP data can be saved to a storage device.

Recover from files after reboot

Whether the DHCP data can be restored from the storage device after system restart
  • disable: DHCP data cannot be restored from the storage device after system restart.
  • enable: DHCP data can be restored from the storage device after system restart.

File saving lease items: cfcard

File name and path in which address lease information is saved

File saving conflict items

File name and path in which address conflict information is saved

Save interval

Interval at which data is saved, in seconds

display dhcp server statistics

Function

The display dhcp server statistics command displays statistics about a DHCP server.

Format

display dhcp server statistics

Parameters

None

Views

All views

Default Level

1: Monitoring level

Usage Guidelines

Usage Scenario

To learn details about the packets sent and received by the DHCP server, run the display dhcp server statistics command to view DHCP server statistics, including:

  • Statistics about various DHCP packets sent by DHCP clients to the DHCP server

  • Statistics about various DHCP packets sent by the DHCP server to DHCP clients

  • Statistics about unidentified packets

Follow-up Procedure

If some DHCP server statistics are detected to be incorrect, run the reset dhcp server statistics command to clear these statistics and then collect statistics again.

Precautions

If a DHCP server does not respond to a received packet, the DHCP server is not correctly configured.

Example

# Display statistics about a DHCP server.

<HUAWEI> display dhcp server statistics
DHCP Server Statistics:

 Client Request:             6
  DHCP Discover:             1
  DHCP Request:              4
  DHCP Decline:              0
  DHCP Release:              1
  DHCP Inform:               0
 Server Reply:               4
  DHCP Offer:                1
  DHCP Ack:                  3
  DHCP Nak:                  0
 Bad Messages:               0
Table 8-24  Description of the display dhcp server statistics command output

Item

Description

DHCP Server Statistics

Statistics about the DHCP server

Client Request

Number of messages that a DHCP client sends to a DHCP server

DHCP Discover

Number of DHCP Discover messages sent by DHCP clients to the DHCP server

DHCP Request

Number of DHCP Request messages sent by DHCP clients to the DHCP server

DHCP Decline

Number of DHCP Decline messages sent by DHCP clients to the DHCP server

DHCP Release

Number of DHCP Release messages sent by DHCP clients to the DHCP server

DHCP Inform

Number of DHCP Inform messages sent by DHCP clients to the DHCP server

Server Reply

Number of messages that the DHCP server sends to DHCP clients

DHCP Offer

Number of DHCP Offer messages that the DHCP server sends to DHCP clients

DHCP Ack

Number of DHCP Ack messages that the DHCP server sends to DHCP clients

DHCP Nak

Number of DHCP Nak messages that the DHCP server sends to DHCP clients

Bad Messages

Number of messages that fail to be transmitted between the DHCP server and DHCP clients

display dhcp statistics

Function

The display dhcp statistics command displays DHCP packet statistics.

Format

display dhcp statistics

Parameters

None

Views

All views

Default Level

1: Monitoring level

Usage Guidelines

Usage Scenario

To check DHCP packet statistics, run the display dhcp statistics command. The statistics includes the total numbers of DHCP messages that the device receives and discards, the numbers of BOOTP Request messages, BOOTP Reply messages, DHCP Discover messages, DHCP Offer messages, DHCP Request messages, DHCP ACK messages, DHCP NAK messages, DHCP Release messages, DHCP Decline messages, and DHCP Inform messages that the device receives.

Example

# Display DHCP packet statistics.

<HUAWEI> display dhcp  statistics
Received packets: total 11, discarded 0
  Bootp request            : 11                  Bootp reply              : 0         
  Discover                 : 0                   Offer                    : 0         
  Request                  : 0                   Ack                      : 0         
  Release                  : 0                   Nak                      : 0         
  Decline                  : 0                   Inform                   : 0         

Sent packets: total 11, discarded 0
Table 8-25  Description of the display dhcp statistics command output

Item

Description

Received packets

Number of received DHCP messages

discarded

Number of discarded DHCP messages

Bootp request

Number of received BOOTP Request messages

Bootp reply

Number of received BOOTP Reply messages

Discover

Number of received DHCP Discover messages

Offer

Number of received DHCP Offer messages

Request

Number of received DHCP Request messages

Ack

Number of received DHCP ACK messages

Nak

Number of received DHCP NAK messages

Decline

Number of received DHCP Decline messages

Inform

Number of received DHCP Inform messages

Sent packets

Number of sent DHCP messages

discarded

Number of discarded DHCP messages

display ip pool

Function

The display ip pool command displays information about an IP address pool.

Format

display ip pool [ name ip-pool-name [ start-ip-address [ high-ip-address ] | all | conflict | expired | used ] ]

display ip pool [ vpn-instance vpn-instance-name ]

Parameters

Parameter Description Value
name ip-pool-name Specifies the name of an IP address pool.

The value is a string of 1 to 64 characters and can contain digits, letters, underscores (_), and periods (.), but not spaces.

start-ip-address Specifies the start IP address of an address segment. The value is in dotted decimal notation.
high-ip-address Specifies the end IP address of an address segment. The value is in dotted decimal notation.
all Indicates all IP addresses in the address pool. -
conflict Indicates the conflicting IP address in the address pool. -
expired Indicates expired IP addresses in the address pool. These IP addresses are in the idle state. -
used Indicates in-use IP addresses. -
vpn-instance vpn-instance-name Specifies a VPN instance name. The value is a string of 1 to 31 case-sensitive characters, spaces not supported. In addition, the VPN instance name must not be _public_. When double quotation marks are used around the string, spaces are allowed in the string.

Views

All views

Default Level

1: Monitoring level

Usage Guidelines

To view information about an address pool, run the display ip pool command. You can specify an address pool name to view information about the address pool. You can specify the all, conflict, expired, and used parameters to view the IP address status and lease.

Example

# Display information about an address pool named test.

<HUAWEI> display ip pool name test
Pool name      : test
  Pool number    : 2
  Lease          : 3 Days 0 Hours 0 Minutes
  Next server    : --
  Domain name    : huawei.com
  DNS server     : 10.10.10.5
                 : 10.10.10.6
  NBNS server    : 20.20.20.5
  Netbios type   : --
  Position       : Local         
  Status         : Unlocked
  Gateway        : 10.10.10.10
  Mask           : 255.255.255.0
  VPN instance   : --
  --------------------------------------------------------------------------
  Start           End         Total   Used  Idle(Expired)  Conflict  Disable
  --------------------------------------------------------------------------
  10.10.10.1     10.10.10.254   253    0     253(0)          0       0
  -------------------------------------------------------------------------- 
Table 8-26  Description of the display ip pool name test command output

Item

Description

Pool name

Address pool name

Pool number

Address pool index

Lease

Address pool lease

Domain name

DNS domain name suffix

DNS server

DNS server address. Currently, an address pool can be configured with a maximum of eight DNS servers. Value 0 indicates the first DNS server address, and Value 1 indicates the second DNS server address.

NBNS server

NetBIOS server address. Currently, an address pool can be configured with a maximum of eight NetBIOS servers. Value 0 indicates the first NetBIOS server address.

Netbios type

NetBIOS type

Position

Position of the address pool

Status

Status of the address pool

Gateway

Gateway address. Currently, an address pool can be configured with a maximum of eight gateways. Value 0 indicates the first gateway address.

Mask

Subnet mask of the address pool

VPN instance

VPN instance name

Start

Start IP address of the address pool

End

End IP address of the address pool

Total

Total number of IP addresses in the address pool, calculated as follows:

total = used + idle + conflict + disable

Used

Number of used IP addresses in the address pool

Idle(Expired)

Number of available IP addresses in the address pool

Note that expired is a sub-state of the idle state.

Conflict

Number of conflicting IP addresses in the address pool

Disable

Number of IP addresses that cannot be used in the address pool

Related Topics

display pnp state

Function

The display pnp state command displays the plug-and-play (PNP) status of a device.

Format

display pnp state

Parameters

None

Views

All views

Default Level

1: Monitoring level

Usage Guidelines

Usage Scenario

If the configuration file contains the ztpv2 enable command, a device enters the PNP state after starting. After completing automatic configuration, the device leaves the PNP state. Before the device completes automatic configuration, if you run the undo ztpv2 enable command to disable ZTP or ZTP does not take effect due to some causes (for example, the configuration file contains IP address information), the device also leaves the PNP state. To check whether the device works in the PNP state, run the display pnp state command. If the device works in the PNP state, a message is displayed. If the device does not work in the PNP state, no message is displayed.

Precautions

If ZTP is enabled on a device, a message that is the same as the display pnp state command output is displayed every 60 seconds.

Example

# Display the PNP state of the device.

<HUAWEI>display pnp state
PNP State!!!PLEASE UNDO PNP enable for manual Setup! 
You can undo PNP in system view with "undo pnp enable
Related Topics

dns-list

Function

The dns-list command sets a DNS server address for a global address pool.

The undo dns-list command deletes a DNS server address of a global address pool.

By default, no DNS server address is specified for a global address pool.

Format

dns-list ip-address &<1-8>

undo dns-list { ip-address &<1-8> | all }

Parameters

Parameter Description Value
ip-address Specifies the address of a DNS server. The value is in dotted decimal notation. A maximum of eight DNS server addresses can be configured. They are separated using spaces in the command.
all Deletes all DNS server addresses. -

Views

IP address pool view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

When a host attempts to access the Internet, the host sends a request to a DNS server. Upon receipt of the request, the DNS server resolves the domain name carried in the request into an IP address. To help a DHCP client access the Internet, run the dns-list command on a DHCP server to specify DNS server addresses. This allows the DNS server to deliver DNS server addresses in addition to assigning IP addresses to DHCP clients.

Prerequisites

A global address pool has been created using the ip pool command in the system view.

Precautions

  • A maximum of eight DNS server addresses can be specified for each address pool, which helps balance traffic and improve network reliability. The first assigned DNS server address functions as a primary address, and the other addresses function as secondary addresses.
  • To specify multiple DNS servers, specify their addresses in the dns-list command.

Example

# Specify DNS server address 10.10.10.10 for a global address pool named global1.

<HUAWEI> system-view
[~HUAWEI] ip pool global1
[*HUAWEI-ip-pool-global1] dns-list 10.10.10.10
Related Topics

domain-name

Function

The domain-name command specifies the domain name that a DHCP server delivers to a DHCP client.

The undo domain-name command deletes the domain name that a DHCP server delivers to DHCP clients.

By default, a DHCP server does not deliver a domain name to DHCP clients.

Format

domain-name domain-name

undo domain-name

Parameters

Parameter Description Value
domain-name Specifies the domain name that a DHCP server delivers to a DHCP client. The value is a string of 1 to 63characters, spaces not supported. The string can contain letters, digits, underscores (_), and periods (.).
NOTE:
When quotation marks are used around the string, spaces are allowed in the string.

Views

IP address pool view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

Each client uses a domain name to communicate with each other. To prevent IP address conflicts during domain name resolution, a DHCP server delivers a domain name to a DHCP client, in addition to assigning an IP address to the client. To specify a domain name, run the domain-name command on a DHCP server for each global address pool. The DHCP server delivers both an IP address and a domain name to a DHCP client. A user can enter a domain name and the DHCP server automatically adds a suffix to the domain name and resolves the IP address.

Prerequisites

A global address pool has been created using the ip pool command in the system view.

Precautions

If no domain name is specified for a global address pool, a DHCP server assigns an IP address, not a domain name, to a DHCP client. As a result, the DHCP client cannot communicate with another client.

Example

# Set the domain name to www.example.com for a global address pool named pool1.

<HUAWEI> system-view
[~HUAWEI] ip pool global1
[*HUAWEI-ip-pool-global1] domain-name www.example.com
Related Topics

excluded-ip-address

Function

The excluded-ip-address command configures the range of IP addresses that do not take part in automatic address assignment.

The undo excluded-ip-address command deletes the configuration.

By default, all IP addresses in an address pool take part in automatic address assignment.

Format

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

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

Parameters

Parameter Description Value
start-ip-address Specifies the start IP address of the IP address segment that do not take part in automatic address assignment. The value is in dotted decimal notation.
end-ip-address Specifies the end IP address of the IP address segment that do not take part in automatic address assignment. The value is in dotted decimal notation. The values of end-ip-address and start-ip-address must be in the same network segment, but the value of end-ip-address cannot be less than the value of start-ip-address. If end-ip-address is not specified, start-ip-address is the only IP address in the address pool.

Views

Server IP address pool view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

Some IP addresses in an address pool need to be reserved for specific purposes, and some IP addresses have been assigned to specific hosts (such as the DNS and WWW servers) and therefore cannot be automatically assigned. To exclude such IP addresses from automatic address assignment, run the excluded-ip-address command.

Pre-configuration Tasks

The range of IP addresses that can be assigned in an address pool have been configured using the network command.

Precautions

  • The excluded IP addresses or IP address segments must be within the local address pool.

  • The excluded IP addresses or IP address segments cannot be automatically allocated in the local address pool.

  • Repeat this command as needed to specify multiple ranges of IP addresses or IP address segments.

Example

# Configure IP addresses 10.1.1.10 through 10.1.1.20 to not take part in automatic address assignment for an address pool named huawei.

<HUAWEI> system-view
[~HUAWEI] ip pool huawei server
[*HUAWEI-ip-pool-huawei] excluded-ip-address 10.1.1.10 10.1.1.20

gateway

Function

The gateway command configures a gateway address for a DHCP relay agent in the DHCP server group view.

The undo gateway command restores the default configuration.

By default, no gateway address is configured.

Format

gateway ip-address

undo gateway

Parameters

Parameter Description Value
ip-address Specifies the IP address of a gateway. The value is in dotted decimal notation.

Views

DHCP server group view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

If a DHCP server and a DHCP relay agent reside on different network segments, run the gateway command to configure a gateway address for the DHCP relay agent. The DHCP relay agent uses the gateway address to communicate with the DHCP server. This command is available only on data center devices.
NOTE:
If no gateway address is configured for a DHCP relay agent, the DHCP relay agent uses the interface address as a gateway address to communicate with the DHCP server.

Example

# Set the gateway address to 10.10.10.1 for the DHCP relay agent in the DHCP server group dhcp-srv1.

<HUAWEI> system-view
[~HUAWEI] dhcp relay server group dhcp-srv1
Info: DHCP relay server group is successfully created.
[*HUAWEI-dhcp-relay-server-group-dhcp-srv1] gateway 10.10.10.1

gateway-list (IP address pool view)

Function

The gateway-list command configures egress gateway addresses for a global address pool on a DHCP server.

The undo gateway-list command deletes all egress gateway addresses of a global address pool on a DHCP server.

By default, no egress gateway address is specified for a global address pool on a DHCP server.

Format

gateway-list ip-address &<1-8>

undo gateway-list { ip-address &<1-8> | all }

Parameters

Parameter Description Value
ip-address Specifies the IP address of an egress gateway. The value is in dotted decimal notation. A maximum of eight gateway addresses can be configured. They are separated using spaces in the command.
all Deletes all gateway addresses. -

Views

IP address pool view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

When a client sends a request to a DHCP server on another network segment, the DHCP server assigns an IP address and an egress gateway address for a global address pool to the client. To specify an egress gateway address for a global address pool, run the gateway-list command on the DHCP server. Multiple egress gateway addresses can be specified for a global address pool, which helps balance traffic and improve network reliability.

To enable a DHCP relay agent to communicate with a DHCP server through an egress gateway, run the gateway command to specify the egress gateway address on the DHCP relay agent.

Prerequisites

A global address pool has been created using the ip pool command in the system view.

Precautions

  • A maximum of eight gateway addresses can be specified for each global address pool. A subnet broadcast address cannot be configured as a gateway address.
  • The gateway address for an address pool on a DHCP server must be on the same network segment as the gateway address of a DHCP relay agent connected to the DHCP server.

Example

# Set the egress gateway address to 1.1.1.1 for a global address pool named global1.

<HUAWEI> system-view
[~HUAWEI] ip pool global1
[*HUAWEI-ip-pool-global1] gateway-list 1.1.1.1
Related Topics

ip pool (system view)

Function

The ip pool command creates an address pool for the DHCP server or enters the IP address pool view.

The undo ip pool command deletes an address pool from the DHCP server.

By default, no address pool is created for the DHCP server.

Format

ip pool ip-pool-name

undo ip pool ip-pool-name

Parameters

Parameter Description Value
ip-pool-name

Specifies the name of an address pool.

The value is a string of 1 to 64characters and can contain digits, letters, underscores (_), and periods (.), but not spaces.

Views

System view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

To create an address pool, run the ip pool command to configure address pool parameters, such as the gateway address, address pool lease, and VPN instance. Such an address pool can be used for the DHCP server to assign IP addresses.

Follow-up Procedure

After an address pool is created, run the network command in the IP address pool view to specify the network segment in which the IP address can be assigned from the address pool.

Precautions

If an IP address in a global address pool is being used, the global address pool cannot be deleted. After a global address pool is deleted, all IP addresses assigned from the address pool will be reclaimed.

Example

# Create an address pool named huawei.

<HUAWEI> system-view
[~HUAWEI] ip pool huawei

lease

Function

The lease command configures an IP address lease for an address pool.

The undo lease command restores the default configuration.

The default IP address lease is 1 day.

Format

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

undo lease

Parameters

Parameter Description Value
day day Specifies the number of days for an IP address lease. The value is an integer ranging from 0 to 999. The default value is 1.
hour hour Specifies the number of hours for an IP address lease. The value is an integer ranging from 0 to 23. The default value is 0.
minute minute Specifies the number of minutes for an IP address lease. The value is an integer ranging from 0 to 59. The default value is 0.
unlimited Indicates that the IP address lease is unlimited. -

Views

Server IP address pool view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

The IP address lease for a host varies according to client requirements. Some hosts, such as the DNS server, need to be used for a long term. To configure the IP address lease to unlimited for such hosts, run the lease command with unlimited specified. Some hosts, such as a laptop, are used temporarily. To configure an IP address lease for such hosts, run the lease command with a lease specified. After the lease time elapses, the DHCP server reclaims the IP address so that the IP address can be assigned to another DHCP client.

In actual application, a DHCP client automatically sends a renewal message to the DHCP server to renew the IP address lease when the DHCP client is started or the lease is half left. If the IP address can be assigned to the DHCP client, the DHCP server notifies the DHCP client of obtaining a new IP address lease. if the IP address cannot be assigned to the DHCP client, the DHCP server notifies the DHCP client of a failure to renew the IP address lease, and the DHCP client needs to request for another IP address.

Precautions

A DHCP server can assign a specific lease to IP addresses in each address pool. All addresses in the same address pool must have the same lease.

Example

# Configure the IP address lease to 1 day 2 hours 30 minutes for an address pool named huawei.

<HUAWEI> system-view
[~HUAWEI] ip pool huawei server
[*HUAWEI-ip-pool-huawei] lease day 1 hour 2 minute 30

lock (Server IP address pool view)

Function

The lock command locks an address pool.

The undo lock command restores the default configuration.

By default, no Server IP address pool is locked.

Format

lock

undo lock

Parameters

None

Views

Server IP address pool view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

If you want to delete an address pool that is currently in use, run the lock command to prevent new users from using IP addresses in this address pool. The address pool can be deleted after all users using this address pool go offline.

Precautions

After the lock command is executed to lock an address pool, no IP address in the address pool can be assigned to DHCP clients. An address pool that is being created cannot be locked.

Example

# Lock an address pool named huawei.

<HUAWEI> system-view
[~HUAWEI] ip pool huawei server
[~HUAWEI-ip-pool-huawei] lock

network (IP address pool view)

Function

The network command sets a network segment address for a global address pool.

The undo network command deletes a network segment address of a global address pool.

By default, no network segment address is specified for a global address pool.

Format

network ip-address [ mask { mask | mask-length } ]

undo network

Parameters

Parameter Description Value
ip-address Specifies the network segment address for a global address pool. The value is in dotted decimal notation.
mask Indicates the mask of a network segment address for a global address pool. If this parameter is not configured, a natural mask is used. -
mask Specifies the mask of a network segment address for a global address pool. The value is in dotted decimal notation.
mask-length Specifies a mask length. The value is an integer ranging from 0 to 32.

Views

IP address pool view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

A DHCP server can assign IP addresses saved in a global address pool only after a network segment is specified for the global address pool. To specify a network segment for a global address pool, run the network command in the IP address pool view. The network segment of an interface address pool is the same as that of the addresses in the address pool.

Prerequisites

A global address pool has been created using the ip pool command in the system view.

Precautions

  • A single network segment is specified for each IP address. To specify multiple address segments, configure multiple address pools.
  • Each network segment specified using the network command can contain a maximum of 65536 addresses.
  • If mask is not configured, a natural mask is used. A class A address cannot be configured as a network segment address.
  • If mask is configured, its length must be longer than or equal to 16 bits.

Example

# Set the network segment address to 10.1.1.0 and the mask length to 24 bits for a global address pool named global1.

<HUAWEI> system-view
[~HUAWEI] ip pool global1
[*HUAWEI] gateway-list 10.1.1.1
[*HUAWEI-ip-pool-global1] network 10.1.1.0 mask 24

nbns-list

Function

The nbns-list command sets a NetBIOS server address for a global address pool.

The undo nbns-list command deletes one or all NetBIOS server addresses.

By default, no NetBIOS server address is specified for a global address pool.

Format

nbns-list ip-address &<1-8>

undo nbns-list { ip-address &<1-8> | all }

Parameters

Parameter Description Value
ip-address Specifies the address of a NetBIOS server. The value is in dotted decimal notation. A maximum of eight NetBIOS server addresses can be specified. They are separated using spaces in the command.
all Deletes all NetBIOS server addresses. -

Views

IP address pool view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

When a host attempts to access the Internet, the host sends a request to a NetBIOS server. Upon receipt of the request, the NetBIOS server resolves the domain name carried in the request into an IP address. To enable a DHCP server to resolve a NetBIOS request, run the nbns-list command to specify NetBIOS server addresses for a global address pool. The DHCP server assigns both IP and NetBIOS server addresses to a client.

Prerequisites

A global address pool has been created using the ip pool command in the system view.

Precautions

  • A maximum of eight NetBIOS server addresses can be specified for each global address pool. The first assigned NetBIOS server address functions as a primary address, and the other addresses function as secondary addresses.
  • To specify multiple NetBIOS servers, specify their addresses in the nbns-list command.

Example

# Set a NetBIOS server address to 1.1.1.1 for a global address pool named global1.

<HUAWEI> system-view
[~HUAWEI] ip pool global1
[*HUAWEI-ip-pool-global1] nbns-list 1.1.1.1
Related Topics

netbios-type

Function

The netbios-type command configures the NetBIOS node type for a DHCP client.

The undo netbios-type command deletes the configuration.

By default, no NetBIOS node type is configured for an address pool.

Format

netbios-type { b-node | h-node | m-node | p-node }

undo netbios-type

Parameters

Parameter Description Value
b-node Indicates a broadcast node. That is, the mapping between host names and IP addresses is obtained in broadcast mode. -
h-node Indicates a hybrid mode which is a b node that supports the peer-to-peer communication mechanism. -
m-node Indicates a mixed node which is a p node that has some broadcast features. -
p-node Indicates a peer-to-peer node. That is, the mapping is obtained through communication with the NetBIOS server. -

Views

Server IP address pool view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

When a DHCP client uses NetBIOS to communicate with the DHCP server, mapping between host names and IP addresses needs to be established. Based on the method of obtaining the mapping, NetBIOS nodes can be classified as b node, p node, m node, and h node. To configure the NetBIOS node type for a DHCP client, run the netbios-type command. The DHCP server sends the NetBIOS node type to a DHCP client along with IP address assignment.

Precautions

If no NetBIOS node type is specified on the DHCP server, the p node is used by default.

Example

# Set the NetBIOS node type to b node for an address pool named huawei.

<HUAWEI> system-view
[~HUAWEI] ip pool huawei server
[~HUAWEI-ip-pool-huawei] netbios-type b-node

next-server

Function

The next-server command specifies the DHCP server address used by a DHCP client during a start.

The undo next-server command deletes the DHCP server address used by a DHCP client during a start.

By default, no DHCP server address used by a DHCP client is specified.

Format

next-server ip-address

undo next-server

Parameters

Parameter Description Value
ip-address Specifies the DHCP server address used by a DHCP client. The value is in dotted decimal notation.

Views

IP address pool view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

A DHCP server assigns an IP address to a DHCP client and delivers a DHCP server address to the DHCP client. To specify the DHCP server address used by a DHCP client during a start, run the next-server command.

Prerequisites

A global address pool has been created using the ip pool command in the system view.

Precautions

  • A single DHCP server address can be configured for each IP address pool. To specify multiple DHCP server addresses, configure multiple address pools.
  • If the next-server command is run more than once, the latest configuration overrides the previous one.

Example

# Set the DHCP server address used by a DHCP client to 10.1.2.2 for a global address pool named global1.

<HUAWEI> system-view
[~HUAWEI] ip pool global1
[*HUAWEI-ip-pool-global1] next-server 10.1.2.2
Related Topics

option

Function

The option command configures a user-defined option for a global DHCP address pool.

The undo option command deletes the configuration.

By default, no user-defined option is configured for a global DHCP address pool.

Format

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

undo option [ code [ sub-option sub-code ] ]

Parameters

Parameter Description Value
code Specifies the code of a user-defined option.
The value is an integer ranging from 1 to 254. Options 1, 3, 6, 15, 44, 46, 50, 51, 52, 53, 54, 55, 57, 58, 59, 60, 61, 82, 121, and 184 are excluded.
NOTE:
  • The command formats of Option 121 and Option 184 are different from that of other options.
  • There are two types of options: well-known option and user-defined option. The field content varies according to the code value. For details about well-known options, refer to standard protocols.
sub-code Specifies the code of a user-defined sub-option. The value is an integer ranging from 1 to 254.
ascii-string Specifies a user-defined option as ASCII characters.
The value is a character string that can contain digits, letters, spaces, underscores (_), and periods (.).
  • If sub-option is not specified, the value ranges from 1 to 255.
  • If sub-option is specified, the value ranges from 1 to 253.
NOTE:
The value must be a multiple of four for Option 6.
cipher-text Specifies a user-defined option as ciphertext characters. You can enter a plaintext or ciphertext option code, but the option code is displayed in ciphertext in the configuration file. The value is a character string that can contain digits, letters, underscores (_), and periods (.).
  • If sub-option is not specified:
    • The value is a string of 1 to 255 characters in plaintext.
    • The value is a string of 20 to 432 characters in ciphertext.
  • If sub-option is specified:
    • The value is a string of 1 to 253 characters in plaintext.
    • The value is a string of 20 to 432 characters in ciphertext.
hex-string Specifies a user-defined option as hexadecimal characters.
The value is a hexadecimal string of 1 to 380 even-number characters, such as hh or hhhh. The value contains only digits 0 to 9, upper-case letters A to F, and lower-case letters a to f.
NOTE:
  • If sub-option is not specified, the length of the hex-string field minus space must be an even number less than 255.
  • If sub-option is specified, the length of the hex-string field minus space must be an even number less than 253.
ip-address Specifies a user-defined option as an IP address.

The value is in dotted decimal notation.

A maximum of eight IP addresses can be configured, separated by space.

Views

Server IP address pool view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

The Option fields in DHCP packets are used to store control information and parameters. If an Option field is configured for the DHCP server, a DHCP client obtains the configuration in the Option field of the DHCP packet replied by the DHCP server while requesting an IP address from the address pool. Well-known options are for the DNS service (Option 6, Option 15, and Option 119) and NetBIOS service (Option 44 and Option 46). To configure user-defined options, run the option command.

Precautions

  • If the option command is run more than once in the address pool view, the last configuration takes effect.
  • For details about option configuration, refer to standard protocols. For example, Option 33 is used to configure a static route. Option 33 consists one or more groups of static routes (including the destination address and gateway address), with 1 to 8 even-number IP addresses required to be entered and the destination IP address prohibited from being configured as 0.0.0.0 (invalid IP address as defined).

Example

# Configure hexadecimal characters 0x11 and 0x22 for a user-defined option with the code of 12 in an address pool named global1.

<HUAWEI> system-view
[~HUAWEI] ip pool global1
[*HUAWEI-ip-pool-global1] option 12 hex 11 22

option121

Function

The option121 command specifies a classless static route that a DHCP server delivers to a DHCP client.

The undo option121 command deletes a classless static route that a DHCP server delivers to a DHCP client.

By default, no classless static route is specified.

Format

option121 ip-address { ip-address mask-length gateway-address } &<1-8>

undo option121 [ ip-address ip-address mask-length gateway-address ]

Parameters

Parameter Description Value
ip-address ip-address Specifies a destination IP address.

The value is in dotted decimal notation.

mask-length Specifies a mask length.

The value is an integer ranging from 0 to 32.

gateway-address Specifies a gateway address.

The value is in dotted decimal notation.

Views

IP address pool view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

To specify a classless static route that a DHCP server delivers to a DHCP client, run the option121 command.

A mask length and a gateway address can be specified for a classless static route. A maximum of eight classless static routes can be configured by running the option121 command repeatedly.

Prerequisites

A global address pool has been created using the ip pool (system view) command in the system view.

Precautions

The undo option121 command deletes all classless static routes. To delete a specific classless static route, run the undo option121 ip-address ip-address mask-length gateway-address command.

Example

# Configure a classless static route entry with the destination IP address 10.10.10.10, the mask length of 24, and the gateway address of 10.10.10.1 in the view of the global address pool named global1.

<HUAWEI> system-view
[~HUAWEI] ip pool global1
[*HUAWEI-ip-pool-global1] option121 ip-address 10.10.10.10 24 10.10.10.1
Related Topics

option184

Function

The option184 command specifies the Option 184 field content carried in a DHCP message that a DHCP server sends to a DHCP client.

The undo option184 command deletes the Option 184 field content carried in a DHCP message that a DHCP server sends to a DHCP client.

By default, no Option 184 content is specified.

Format

option184 { as-ip as-ip-address | fail-over fail-over-ip-address dialer-string | ncp-ip nc-ip-address | voice-vlan vlan-id }

undo option184 [ as-ip | fail-over | ncp-ip | voice-vlan ]

Parameters

Parameter Description Value
as-ip as-ip-address Specifies the IP address of the backup network call processor (NCP).

The value is in dotted decimal notation.

fail-over fail-over-ip-address Specifies the IP address in the failover route.

The value is in dotted decimal notation.

dialer-string Specifies the dialer string. The value is a string of 1 to 64 characters.
ncp-ip nc-ip-address Specifies the IP address of the NCP.

The value is in dotted decimal notation.

voice-vlan vlan-id Specifies the ID of a voice VLAN.

The value is an integer ranging from 1 to 4094.

Views

IP address pool view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

To specify the Option 184 field carried in a DHCP message that a DHCP server sends to a DHCP client, run the option184 command.

Example

# Set the AS-IP address to 10.10.10.10 in the view of the global address pool named global1.

<HUAWEI> system-view
[~HUAWEI] ip pool global1
[*HUAWEI-ip-pool-global1] option184 as-ip 10.10.10.10

reset dhcp relay statistics

Function

The reset dhcp relay statistics command clears packet statistics on a DHCP relay agent.

Format

reset dhcp relay statistics [ server-group group-name ]

Parameters

Parameter Description Value
server-group group-name Specifies the name of a DHCP server group. The value is a string of 1 to 32 characters, spaces not supported. The string can contain letters, digits, underscores (_), hyphens (-), and periods (.). This parameter is available only on data center devices.

Views

User view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

Before collecting packet statistics on a DHCP relay agent, run the reset dhcp relay statistics command to clear the existing statistics.

Example

# Clear packet statistics on a DHCP relay agent.

<HUAWEI> reset dhcp relay statistics

reset dhcp server statistics

Function

The reset dhcp server statistics command clears DHCP server statistics.

Format

reset dhcp server statistics

Parameters

None

Views

User view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

During DHCP fault diagnosis, packet sending and receiving statistics within a specified period need to be collected to check statistics consistency. To clear historical DHCP server statistics, run the reset dhcp server statistics command. Then you can run the display dhcp server statistics command to view DHCP server statistics.

Precautions

The reset dhcp server statistics can be executed for multiple times without interval limits.

Example

# Clear DHCP server statistics.

<HUAWEI> reset dhcp server statistics

reset dhcp statistics

Function

The reset dhcp statistics command clears DHCP packet statistics.

Format

reset dhcp statistics

Parameters

None

Views

User view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

To clear DHCP packet statistics, run the reset dhcp statistics command. The statistics includes the total number of DHCP packets that the device receives and discards and the number of BOOTP Request messages, BOOTP Reply messages, DHCP Discover messages, DHCP Offer messages, DHCP Request messages, DHCP ACK messages, DHCP NAK messages, DHCP Release messages, DHCP Decline messages, and DHCP Inform messages.

Example

# Clear DHCP packet statistics.

<HUAWEI> reset dhcp statistics

reset ip pool

Function

The reset ip pool command resets the status of IP addresses in an IP address pool to idle.

Format

reset ip pool name ip-pool-name { start-ip-address [ high-ip-address ] | all | conflict | expired | used }

Parameters

Parameter Description Value
name ip-pool-name Specifies the name of an IP address pool.

The value is a string of 1 to 64 characters and can contain digits, letters, underscores (_), and periods (.), but not spaces.

start-ip-address Specifies the start IP address of an address segment. -
high-ip-address Specifies the end IP address of an address segment. -
all Resets the status of all IP addresses in an IP address pool to idle. -
conflict Resets the status of conflicting IP addresses in an IP address pool to idle. -
expired Resets the status of expired IP addresses in an IP address pool to idle. -
used Resets the status of used IP addresses in an IP address pool to idle. -

Views

User view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

IP addresses in an address pool on the DHCP server are classified as used, idle, conflicted, or disabled. Expired IP addresses are considered idle. Only IP addresses in the idle state can be assigned to DHCP clients. To reset the status of used, conflicted, and expired IP addresses in an address pool to idle so that these IP addresses can become available again, or to reset the status of IP addresses in a specified address segment so that these IP addresses can be re-planned, run the reset ip pool command.

Configuration Impact

If the IP addresses that are being used are reclaimed, may influence normal user in the network.

Example

# Reset the IP addresses in an IP address pool named test to idle.

<HUAWEI> reset ip pool name test
Related Topics

server

Function

The server command adds a DHCP server to a DHCP server group.

The undo server command deletes a DHCP server from a DHCP server group.

By default, no DHCP server is added to a DHCP server group.

Format

server ip-address [ ip-address-index ]

undo server { ip-address | ip-address-index }

Parameters

Parameter Description Value
ip-address Specifies the IP address of a DHCP server. The value is in dotted decimal notation.
ip-address-index Specifies the index of an IP address. You can specify an index for the IP address of a DHCP server. This index indicates the priority of the DHCP server in a DHCP server group. If no index is specified, the system automatically assigns an idle index. You can delete a DHCP server address by specifying an IP address or address index.
NOTE:
If an index has been assigned and you assign a new index, the IP address specified by the new index replaces the IP address specified by the index that has been assigned.
The value is an integer ranging from 0 to 19.

Views

DHCP server group view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

To load-balance traffic and improve network reliability, run the server command to add multiple DHCP servers to a DHCP server group. This command is available only on data center devices.
NOTE:
The VPN instance bound to a DHCP server group on the DHCP relay agent must be the same as the VPN instance bound to the IP address pool on the DHCP server.

Example

# Add a DHCP server with the IP address 10.10.78.56 to a DHCP server group named dhcp-srv1.

<HUAWEI> system-view
[~HUAWEI] dhcp relay server group dhcp-srv1
[*HUAWEI-dhcp-relay-server-group-dhcp-srv1] server 10.10.78.56

sdn copy-to-controller dhcp enable

Function

The sdn copy-to-controller dhcp enable command enables the device to send DHCP packets to the Agile Controller-DCN.

The undo sdn copy-to-controller dhcp enable command disables the device from sending DHCP packets to the Agile Controller-DCN.

By default, the device does not send DHCP packets to the Agile Controller-DCN.

NOTE:

Only the CE6850HI, CE6850U-HI, CE6851HI, CE6855HI, CE6856HI, CE6860EI, CE6870EI, CE7850EI, CE7855EI, CE8850EI, and CE8860EI support this command.

Format

sdn copy-to-controller dhcp enable

undo sdn copy-to-controller dhcp enable

Parameters

None

Views

System view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

The device to which VMs or physical servers connect sends DHCP packets to the Agile Controller-DCN using the OpenFlow Protocol. The Agile Controller-DCN then sends the DHCP packets to the DHCP Server so that the DHCP Server uniformly allocates IP addresses to the VMs or physical servers and manages these IP addresses.

Precautions

The sdn copy-to-controller dhcp enable and dhcp enable commands are mutually exclusive.

Example

# Enable the device to send DHCP packets to the Agile Controller-DCN.

<HUAWEI> system-view
[~HUAWEI] sdn copy-to-controller dhcp enable

static-bind

Function

The static-bind command binds an IP address to a MAC address, which is static address assignment.

The undo static-bind command deletes the configuration.

By default, no binding between IP addresses and MAC addresses is configured for an address pool.

Format

static-bind ip-address ip-address mac-address mac-address

undo static-bind [ ip-address ip-address | mac-address mac-address ]

Parameters

Parameter Description Value
ip-address ip-address Specifies an IP address to be statically assigned. It must be a valid IP address in the address pool. The value is in dotted decimal notation.
mac-address mac-address Specifies the MAC address of a DHCP client. The value is in H-H-H format. An H is a hexadecimal number of 1 to 4 digits.

Views

Server IP address pool view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

Fixed IP addresses need to be assigned to specified clients, such as the WWW server. In this case, you can bind an available IP address in an address pool with the MAC address of a client. When the DHCP server receives a request for the IP address of a specific client, run the static-bind command to bind the IP address with the MAC address of the client.

After the undo static-bind command is executed, the bound IP address restores to be available, and the IP address can be assigned to other clients.

Pre-configuration Tasks

Perform the following operations:
  1. Run the ip pool command in the system view to create an address pool on the DHCP server.
  2. Run the gateway command in the Server IP address pool view to configure a gateway address of the created address pool.
  3. Run the network command in the Server IP address pool view to specify the network segment in which the IP addresses to be assigned reside.

Precautions

  • The IP address to be bound must have never been used. Before the static-bind command is executed, run the excluded-ip-address command to prohibit the IP address to be bound from taking part in automatic address assignment.

  • After the binding, the lease of this IP address is not managed. After the bound client obtains the IP address, the configuration cannot be deleted using the undo static-bind command. The binding relationship can be removed only when the user proactively goes offline.

  • After the undo ip pool command is run, you can configure the binding relationship between IP addresses and MAC addresses.

  • You can repeat executing the static-bind command to assign IP addresses to multiple clients. An IP address or MAC address can be used only once.

Example

# Configure the binding between IP address 10.10.10.10 and MAC address 2-2-2 for an address pool named global1.

<HUAWEI> system-view
[~HUAWEI] ip pool global1
[*HUAWEI-ip-pool-global1] gateway-list 10.10.10.12
[*HUAWEI-ip-pool-global1] network 10.10.10.11 mask 24
[*HUAWEI-ip-pool-global1] static-bind ip-address 10.10.10.10 mac-address 2-2-2

undo pnp enable

Function

The undo pnp enable command disables the plug-and-play (PNP) function.

By default, the PNP function is enabled.

Format

undo pnp enable

Parameters

None

Views

System view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

To prevent a PNP-enabled device from learning VLAN information automatically and protect user configurations from being affected, run the undo pnp enable command to disable the PNP function.

Example

# Disable the PNP function.

<HUAWEI> system-view
[~HUAWEI]undo pnp enable
Related Topics

vpn-instance (DHCP)

Function

The vpn-instance command binds a DHCP server group to a VPN instance.

The undo vpn-instance command unbinds a DHCP server group from a VPN instance.

By default, no DHCP server group is bound to a VPN instance.

Format

vpn-instance vpn-instance-name

undo vpn-instance

Parameters

Parameter Description Value
vpn-instance-name Specifies the name of a VPN instance. The value is a string of 1 to 31 case-sensitive characters, spaces not supported. In addition, the VPN instance name must not be _public_. When double quotation marks are used around the string, spaces are allowed in the string.

Views

DHCP server group view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

When DHCP is used on a VPN that connects divisions within a company, run the vpn-instance command to bind a DHCP server group to the VPN instance. This command is available only on data center devices.
NOTE:
The VPN instance bound to a DHCP server group on the DHCP relay agent must be the same as the VPN instance bound to the IP address pool on the DHCP server.

Configuration Impact

After the undo vpn-instance command is run to unbind a DHCP server from a VPN instance, the assigned IP addresses will be released from the DHCP server address pool.

Example

# Bind the DHCP server group dhcp-srv1 to the VPN instance vpn-1.

<HUAWEI> system-view
[~HUAWEI] dhcp relay server group dhcp-srv1
Info: DHCP relay server group is successfully created.
[*HUAWEI-dhcp-relay-server-group-dhcp-srv1] vpn-instance vpn-1

vpn-instance (Server IP address pool view)

Function

The vpn-instance command configures a VPN instance for an address pool.

The undo vpn-instance command deletes the configuration.

By default, no VPN instance is configured for an address pool.

Format

vpn-instance vpn-instance-name

undo vpn-instance

Parameters

Parameter Description Value
vpn-instance-name Specifies the name of the VPN instance to which a specified address pool belongs. The value is a string of 1 to 31 case-sensitive characters, spaces not supported. In addition, the VPN instance name must not be _public_. When double quotation marks are used around the string, spaces are allowed in the string.

Views

Server IP address pool view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

VPNs are specifically constructed for interconnections within an office or between offices. To configure a VPN instance for an IP address pool, run the vpn-instance command.

Prerequisites

A VPN instance has been created using the ip vpn-instance command.

Precautions

A DHCP client can go online through the DHCP server only when the VPN instance bound to the DHCP server address pool is the same as that bound to the DHCP relay server group.

Example

# Configure a VPN instance named vpn1 for an address pool named huawei.

<HUAWEI> system-view
[~HUAWEI] ip vpn-instance vpn1
[*HUAWEI-vpn-instance-vpn1] ipv4-family
[*HUAWEI-vpn-instance-vpn1-af-ipv4] quit
[*HUAWEI-vpn-instance-vpn1] quit
[*HUAWEI] ip pool huawei server
[*HUAWEI-ip-pool-huawei] vpn-instance vpn1

undo ztpv2 enable

Function

The undo ztpv2 enable command disables ZTP.

By default, ZTP is disabled. If the ztpv2 enable command is added to the factory configuration file, ZTP is enabled after the device starts.

Format

undo ztpv2 enable

ztpv2 enable

Parameters

None

Views

System view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

To enable a device to automatically obtain configurations after its startup, add the ztpv2 enable command to the default factory configuration file. After ZTP is enabled, the device starts the DHCP client service on all physical interfaces to obtain IP addresses.

To disable ZTP, run the undo ztpv2 enable command before the device completes automatic configuration.

Precautions

The ztpv2 enable command can be added to the configuration file only before a device starts. If you run the undo ztpv2 enable command to disable ZTP before the device completes automatic configuration, you cannot enable ZTP again.

If the configuration file for device startup contains IP address information or you manually configure an IP address after the device starts, ZTP does not take effect.

After the device completes automatic configuration, it automatically deletes the ztpv2 enable command configuration. If you save the configuration file, the device does not enable ZTP after restarting next time.

Example

# Disable ZTP.

<HUAWEI> system-view
[~HUAWEI]undo ztpv2 enable
Related Topics
Translation
Download
Updated: 2019-03-21

Document ID: EDOC1000166501

Views: 69237

Downloads: 374

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