- Table of Contents
-
- 04-Layer 3 Command Reference
- 00-Preface
- 01-Basic IP Routing Commands
- 02-Static Routing Commands
- 03-IPv6 Static Routing Commands
- 04-IP Addressing Commands
- 05-IPv6 Basics Commands
- 06-DHCP Commands
- 07-DHCPv6 Commands
- 08-DNS Commands
- 09-IPv6 DNS Commands
- 10-IP Performance Optimization Commands
- 11-ARP Commands
- 12-IP Forwarding Basics Commands
- 13-NAT Commands
- Related Documents
-
Title | Size | Download |
---|---|---|
07-DHCPv6 Commands | 81.76 KB |
DHCPv6 common configuration commands
display ipv6 dhcp option-group
DHCPv6 client configuration commands
display ipv6 dhcp client statistics
reset ipv6 dhcp client statistics
DHCPv6 common configuration commands
display ipv6 dhcp duid
Use display ipv6 dhcp duid to display the DHCP unique identifier (DUID) of the local device.
Syntax
display ipv6 dhcp duid [ | { begin | exclude | include } regular-expression ]
Views
Any view
Default command level
1: Monitor level
Parameters
|: Filters command output by specifying a regular expression. For more information about regular expressions, see Fundamentals Configuration Guide.
begin: Displays the first line that matches the specified regular expression and all lines that follow.
exclude: Displays all lines that do not match the specified regular expression.
include: Displays all lines that match the specified regular expression.
regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.
Examples
# Display the DUID of the device.
<Sysname> display ipv6 dhcp duid
The DUID of this device: 0003-0001-00e0-fc00-5552
display ipv6 dhcp option-group
Use display ipv6 dhcp option-group to display information about DHCPv6 option groups, including static and dynamic option groups.
Syntax
display ipv6 dhcp option-group [ option-group-number ] [ | { begin | exclude | include } regular-expression ]
Views
Any view
Default command level
1: Monitor level
Parameters
option-group-number: Specifies a DHCPv6 option group by its ID, in the range of 1 to 100. If no option group is specified, the command displays information about all DHCPv6 option groups.
|: Filters command output by specifying a regular expression. For more information about regular expressions, see Fundamentals Configuration Guide.
begin: Displays the first line that matches the specified regular expression and all lines that follow.
exclude: Displays all lines that do not match the specified regular expression.
include: Displays all lines that match the specified regular expression.
regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.
Usage guidelines
A dynamic DHCPv6 option group is automatically created by a DHCPv6 client when the client obtains an IPv6 address/prefix and network parameters.
Examples
# Display information about all DHCPv6 option groups.
<Sysname> display ipv6 dhcp option-group
DHCPv6 option group: 1
Type: Dynamic
DNS server addresses:
1::1
Domain names:
aaa.com
SIP server addresses:
2::1
SIP server domain names:
bbb.com
DS-Lite addresses:
2::3
Options:
Code: 23
Length: 2 bytes
Hex: ABCD
Code: 33
Length: 2 bytes
Hex: DEFA
Table 1 Command output
Field |
Description |
DHCPv6 option group |
DHCPv6 option group number. |
Type |
DHCPv6 option group type: Dynamic. |
DNS server addresses |
IP address of the DNS server. |
Domain names |
Domain name suffix. |
SIP server addresses |
IP address of the SIP server. |
SIP server domain names |
Domain name of the SIP server. |
DS-Lite addresses |
IP address of the Address Family Transition Router (AFTR) |
Options |
User-defined options. |
Code |
Code of the self-defined option. |
Length |
Self-defined option string length in bytes. |
Hex |
Self-defined option content represented by a hexadecimal string. |
Related commands
· ipv6 address dhcp-alloc
· ipv6 dhcp client pd
DHCPv6 client configuration commands
display ipv6 dhcp client
Use display ipv6 dhcp client to display DHCPv6 client information.
Syntax
display ipv6 dhcp client [ interface interface-type interface-number ] [ | { begin | exclude | include } regular-expression ]
Views
Any view
Default command level
1: Monitor level
Parameters
interface interface-type interface-number: Displays the DHCPv6 client information of a specified interface.
|: Filters command output by specifying a regular expression. For more information about regular expressions, see Fundamentals Configuration Guide.
begin: Displays the first line that matches the specified regular expression and all lines that follow.
exclude: Displays all lines that do not match the specified regular expression.
include: Displays all lines that match the specified regular expression.
regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.
Usage guidelines
If no parameters are specified, the command displays DHCPv6 client information of all interfaces.
Examples
# Display the DHCPv6 client information of VLAN-interface 2.
<Sysname> display ipv6 dhcp client interface vlan-interface 2
Vlan-interface2 is in stateless DHCPv6 client mode
State is OPEN
Preferred Server:
Reachable via address : FE80::213:7FFF:FEF6:C818
DUID : 0003000100137ff6c818
DNS servers : 1:2:3::5
1:2:4::7
Domain names : abc.com
Table 2 Command output
Field |
Description |
in stateless DHCPv6 client mode |
Indicates the client is in the stateless DHCPv6 configuration mode. |
State is OPEN |
Current state of the DHCPv6 client: · INIT—After enabled, the DHCPv6 client enters the INIT state. · IDLE—After receiving an RA message with the "M" flag set to 0 and "O" flag set to 1 and enabled with stateless DHCPv6, the DHCPv6 client enters the IDLE state. · INFO-REQUESTING—The DHCPv6 client is requesting configuration information. · OPEN—The DHCPv6 client successfully obtained configuration parameters and completed stateless configuration based on the obtained parameters. |
Preferred Server |
Information about the DHCPv6 server selected by the DHCPv6 client. |
Reachable via address |
Reachable address, which is the link local address of the DHCPv6 server or relay agent. |
DUID |
DUID of the DHCPv6 server. |
DNS servers |
DNS server address sent by the DHCPv6 server. |
Domain names |
Domain name information sent by the DHCPv6 server. |
display ipv6 dhcp client statistics
Use display ipv6 dhcp client statistics to display DHCPv6 client statistics.
Syntax
display ipv6 dhcp client statistics [ interface interface-type interface-number ] [ | { begin | exclude | include } regular-expression ]
Views
Any view
Default command level
1: Monitor level
Parameters
interface interface-type interface-number: Displays the DHCPv6 client statistics of a specified interface.
|: Filters command output by specifying a regular expression. For more information about regular expressions, see Fundamentals Configuration Guide.
begin: Displays the first line that matches the specified regular expression and all lines that follow.
exclude: Displays all lines that do not match the specified regular expression.
include: Displays all lines that match the specified regular expression.
regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.
Usage guidelines
If no parameters are specified, the command displays DHCPv6 client statistics of all interfaces.
Examples
# Display DHCPv6 client statistics of VLAN-interface 2.
<Sysname> display ipv6 dhcp client statistics interface vlan-interface 2
Interface : Vlan-interface2
Packets Received : 1
Reply : 1
Advertise : 0
Reconfigure : 0
Invalid : 0
Packets Sent : 5
Solicit : 0
Request : 0
Confirm : 0
Renew : 0
Rebind : 0
Information-request : 5
Release : 0
Decline : 0
Table 3 Command output
Field |
Description |
Interface |
Interface that serves as the DHCPv6 client. |
Packets Received |
Number of received packets. |
Reply |
Number of received reply packets. |
Advertise |
Number of received advertise packets. |
Reconfigure |
Number of received reconfigure packets. |
Invalid |
Number of invalid packets. |
Packets Sent |
Number of sent packets. |
Solicit |
Number of sent solicit packets. |
Request |
Number of sent request packets. |
Confirm |
Number of sent confirm packets. |
Renew |
Number of sent renew packets. |
Rebind |
Number of sent rebind packets. |
Information-request |
Number of sent information request packets. |
Release |
Number of sent release packets. |
Decline |
Number of sent decline packets. |
reset ipv6 dhcp client statistics
ipv6 address dhcp-alloc
Use the ipv6 address dhcp-alloc command to configure an interface to use DHCPv6 for IP address acquisition.
Use the undo ipv6 address dhcp-alloc command to cancel an interface from using DHCPv6.
Syntax
ipv6 address dhcp-alloc [ option-group group-number | rapid-commit ] *
undo ipv6 address dhcp-alloc
Default
An interface does not use DHCPv6 for IP address acquisition.
Views
Interface view
Default command level
2: System level
Parameters
option-group option-group-number: Enables the DHCPv6 client to create a dynamic DHCPv6 option group for saving the network parameters, and assigns an ID to the dynamic DHCPv6 option group, in the range of 1 to 100. If no option group ID is specified, the DHCPv6 client does not create any dynamic DHCPv6 option group.
rapid-commit: Enables rapid address and prefix assignment.
Examples
# Configure VLAN-interface 10 to use DHCPv6 for address acquisition, enable rapid address assignment, and specify the ID for the DHCPv6 option group as 1. When the client obtains network parameters, it creates an option group and saves the parameters in the group.
<Sysname> system-view
[Sysname] interface vlan-interface 10
[Sysname-Vlan-interface10] ipv6 address dhcp-alloc rapid-commit option-group 1
ipv6 dhcp client pd
Use ipv6 dhcp client pd to configure an interface to use DHCPv6 for IPv6 prefix acquisition.
Use undo ipv6 dhcp client pd to cancel an interface from using DHCPv6.
Syntax
ipv6 dhcp client pd prefix-number [ option-group group-number | rapid-commit ] *
undo ipv6 dhcp client pd
Default
An interface does not use DHCPv6 for IPv6 prefix acquisition.
Views
Interface view
Default command level
2: System level
Parameters
prefix-number: Specifies an IPv6 prefix ID, in the range of 1 to 1024. The client, after obtaining an IPv6 prefix, automatically assigns it the specified ID.
option-group option-group-number: Enables the DHCPv6 client to create a dynamic DHCPv6 option group for saving the network parameters, and assigns an ID to the dynamic DHCPv6 option group, in the range of 1 to 100. If no option group ID is specified, the DHCPv6 client does not create any dynamic DHCPv6 option group.
rapid-commit: Enables rapid address and prefix assignment.
Examples
# Configure VLAN-interface10 to use DHCPv6 for IPv6 prefix acquisition. Specify the prefix ID as 1, enable the DHCPv6 client to create a dynamic DHCPv6 option group with the ID 1, and enable rapid address and prefix assignment.
<Sysname> system-view
[Sysname] interface vlan-interface 10
[Sysname-Vlan-interface10] ipv6 dhcp client pd 1 rapid-commit option-group 1
reset ipv6 dhcp client statistics
Use reset ipv6 dhcp client statistics to clear DHCPv6 client statistics.
Syntax
reset ipv6 dhcp client statistics [ interface interface-type interface-number ]
Views
User view
Default command level
1: Monitor level
Parameters
interface interface-type interface-number: Clears DHCPv6 client statistics of a specified interface.
Usage guidelines
If no parameters are specified, the command clears DHCPv6 client statistics of all interfaces.
After this command is executed, the packets statistics are displayed as 0 for the display ipv6 dhcp client statistics command output.
Examples
# Clear DHCPv6 client statistics of all interfaces.
<Sysname> reset ipv6 dhcp client statistics
Related commands
display ipv6 dhcp client statistics