- Table of Contents
- Related Documents
-
Title | Size | Download |
---|---|---|
08-DHCPv6 commands | 162.28 KB |
Contents
display ipv6 dhcp relay client-information address
display ipv6 dhcp relay client-information pd
display ipv6 dhcp relay drni-status
display ipv6 dhcp relay server-address
display ipv6 dhcp relay statistics
ipv6 dhcp relay client-information record
ipv6 dhcp relay client-link-address enable
ipv6 dhcp relay server-address
ipv6 dhcp relay source-address
reset ipv6 dhcp relay client-information address
reset ipv6 dhcp relay client-information pd
reset ipv6 dhcp relay statistics
display ipv6 dhcp client statistics
ipv6 dhcp client stateless enable
reset ipv6 dhcp client statistics
DHCPv6 commands
Common DHCPv6 commands
display ipv6 dhcp duid
Use display ipv6 dhcp duid to display the DUID of the local device.
Syntax
display ipv6 dhcp duid
Views
Any view
Predefined user roles
network-admin
network-operator
Usage guidelines
A DHCP unique identifier (DUID) uniquely identifies a DHCPv6 device (DHCPv6 client, server, or relay agent). A DHCPv6 device adds its DUID in a sent packet.
This command displays output only after the DHCPv6 process is running on the device.
Examples
# Display the DUID of the local device.
<Sysname> display ipv6 dhcp duid
The DUID of this device: 0003000100e0fc005552.
ipv6 dhcp advertise pd-route
Use ipv6 dhcp advertise pd-route to enable the DHCPv6 server or DHCPv6 relay agent to advertise IPv6 prefixes.
Use undo ipv6 dhcp advertise pd-route to disable the DHCPv6 server or DHCPv6 relay agent from advertising IPv6 prefixes.
Syntax
ipv6 dhcp advertise pd-route
undo ipv6 dhcp advertise pd-route
Default
The DHCPv6 server or DHCPv6 relay agent does not advertise IPv6 prefixes.
Views
System view
Predefined user roles
network-admin
Usage guidelines
A DHCPv6 client can obtain an IPv6 prefix through DHCPv6 and use this IPv6 prefix to assign IPv6 addresses to clients in a downstream network. If the IPv6 prefix is in a different subnet than the IPv6 address of the DHCPv6 client's upstream interface, clients in the downstream network cannot access the external network. You can use this command to enable this feature on the DHCPv6 server or DHCPv6 relay agent, whichever is on the same link as the DHCPv6 client.
To use this command on the DHCPv6 relay agent, you must enable the DHCPv6 relay agent to record DHCPv6 relay entries first.
Examples
# Enable the DHCPv6 server to advertise IPv6 prefixes.
<Sysname> system-view
[Sysname] ipv6 dhcp advertise pd-route
ipv6 dhcp dscp
Use ipv6 dhcp dscp to set the DSCP value for the DHCPv6 packets sent by the DHCPv6 server or the DHCPv6 relay agent.
Use undo ipv6 dhcp dscp to restore the default.
Syntax
ipv6 dhcp dscp dscp-value
undo ipv6 dhcp dscp
Default
The DSCP value is 56 in DHCPv6 packets sent by the DHCPv6 server or the DHCPv6 relay agent.
Views
System view
Predefined user roles
network-admin
Parameters
dscp-value: Specifies the DSCP value for DHCPv6 packets, in the range of 0 to 63.
Usage guidelines
The DSCP value of a packet specifies the priority level of the packet and affects the transmission priority of the packet. A bigger DSCP value represents a higher priority.
Examples
# Set the DSCP value to 30 for DHCPv6 packets sent by the DHCPv6 server or the DHCPv6 relay agent.
<Sysname> system-view
ipv6 dhcp select
Use ipv6 dhcp select to enable the DHCPv6 server or DHCPv6 relay agent on an interface.
Use undo ipv6 dhcp select to restore the default.
Syntax
ipv6 dhcp select { relay | server }
undo ipv6 dhcp select
Default
An interface does not work in the DHCPv6 server mode or in the DHCPv6 relay agent mode. It discards DHCPv6 packets from DHCPv6 clients.
Views
Interface view
Predefined user roles
network-admin
Parameters
relay: Enables the DHCPv6 relay agent on the interface.
server: Enables the DHCPv6 server on the interface.
Usage guidelines
Before changing the DHCPv6 server mode to the DHCPv6 relay agent mode on an interface, use the following commands to remove IPv6 address/prefix bindings:
· reset ipv6 dhcp server ip-in-use
· reset ipv6 dhcp server pd-in-use
Do not configure the DHCPv6 client on the interface that has been configured as the DHCPv6 relay agent or DHCPv6 server.
Examples
# Enable the DHCPv6 server on VLAN-interface 10.
<Sysname> system-view
[Sysname] interface vlan-interface 10
[Sysname-Vlan-interface10] ipv6 dhcp select server
# Enable the DHCPv6 relay agent on VLAN-interface 20.
<Sysname> system-view
[Sysname] interface vlan-interface 20
[Sysname-Vlan-interface20] ipv6 dhcp select relay
Related commands
display ipv6 dhcp relay server-address
display ipv6 dhcp server
DHCPv6 relay agent commands
display ipv6 dhcp relay client-information address
Use display ipv6 dhcp relay client-information address to display DHCPv6 relay entries that record clients' IPv6 address information.
Syntax
display ipv6 dhcp relay client-information address [ interface interface-type interface-number | ipv6 ipv6-address ] [ vpn-instance vpn-instance-name ]
Views
Any view
Predefined user roles
network-admin
network-operator
Parameters
interface interface-type interface-number: Specifies an interface by its type and number. If you do not specify an interface, this command displays DHCPv6 relay entries that record clients' IPv6 address information on all interfaces enabled with DHCPv6 relay agent.
ipv6 ipv6-address: Specifies an IPv6 address. If you do not specify an IPv6 address, this command displays DHCPv6 relay entries for all IPv6 addresses.
vpn-instance vpn-instance-name: Specifies an MPLS L3VPN instance by its name, a case-sensitive string of 1 to 31 characters. If you do not specify a VPN instance, this command displays DHCPv6 relay entries that record clients' IPv6 address information for the public network.
Usage guidelines
The DHCPv6 relay agent records DHCPv6 relay entries only after you configure the ipv6 dhcp relay client-information record command.
Examples
# Display all DHCPv6 relay entries that record clients' IPv6 address information.
<Sysname> display ipv6 dhcp relay client-information address
1 DHCPv6 relay entries found.
IPv6 address IAID Lease Status Interface
2::1 0x00030001 54 Open Vlan2
# Display the DHCPv6 relay entry for the IPv6 address 2::1.
<Sysname> display ipv6 dhcp relay client-information address ipv6 2::1
1 DHCPv6 relay entries found.
IPv6 address: 2::1
DUID: 00030001CA000C180000
IAID: 0x00030001
Port index: N/A
Interface: Vlan2
Outer VLAN: N/A
Inner VLAN: N/A
Status: Open
Access type: CommonV6
PPP index: N/A
Remaining lease time: 54 seconds
Preferred lifetime: 400 seconds
Valid lifetime: 500 seconds
Table 1 Command output
Field |
Description |
x DHCPv6 relay entries found. |
Number of DHCPv6 relay entries that record clients' IPv6 address information. |
IPv6 address |
IPv6 address of the DHCPv6 client. |
DUID |
DUID of the DHCPv6 client. |
IAID |
IAID of the DHCPv6 client. |
Port index |
Layer 2 port that receives the client's request. If the request is not received through a Layer 2 port, this field displays N/A. |
Interface |
Interface enabled with DHCPv6 relay agent. This field displays N/A if the entry does not contain interface information or if the interface index in the entry loses effect. |
Outer VLAN |
Outer VLAN tag contained in the client's request. If the request does not contain an outer VLAN tag, this field displays N/A. |
Inner VLAN |
Inner VLAN tag contained in the client's request. If the request does not contain an inner VLAN tag, this field displays N/A. |
Status |
Status of the DHCPv6 relay entry: · OPEN—The DHCPv6 client has obtained an IPv6 address or renewed the lease. · SOLICIT—The DHCPv6 relay agent receives a Solicit message that contains a Rapid Commit option from the DHCPv6 client. · REQUEST—The DHCPv6 relay agent receives a Request message from the DHCPv6 client. · RELEASE—The DHCPv6 relay agent receives a Release message from the DHCPv6 client. · DECLINE—The DHCPv6 relay agent receives a Decline message from the DHCPv6 client. · RENEW—The DHCPv6 relay agent receives a Renew message from the DHCPv6 client. · REBIND—The DHCPv6 relay agent receives a Rebind message from the DHCPv6 client. |
Access type |
Access type of the DHCPv6 client. CommonV6 represents the DHCPv6 method. |
PPP index |
PPP session index. If no PPP session index exists, this field displays N/A. This field is not supported in the current software version. |
Remaining lease time |
Remaining time in seconds of the IPv6 address lease. |
Preferred lifetime |
Preferred lifetime in seconds of the IPv6 address. |
Valid lifetime |
Valid lifetime in seconds of the IPv6 address. |
Related commands
ipv6 dhcp relay client-information record
reset ipv6 dhcp relay client-information address
display ipv6 dhcp relay client-information pd
Use display ipv6 dhcp relay client-information pd to display DHCPv6 relay entries that record clients' IPv6 prefix information.
Syntax
display ipv6 dhcp relay client-information pd [ interface interface-type interface-number | prefix prefix/prefix-len ] [ vpn-instance vpn-instance-name ]
Views
Any view
Predefined user roles
network-admin
network-operator
Parameters
interface interface-type interface-number: Specifies an interface by its type and number. If you do not specify an interface, this command displays DHCPv6 relay entries that record clients' IPv6 prefix information on all interfaces enabled with DHCPv6 relay agent.
prefix prefix/prefix-len: Specifies an IPv6 prefix with its length. The value range for the prefix-len argument is 1 to 128. If you do not specify an IPv6 prefix, this command displays DHCPv6 relay entries for all IPv6 prefixes.
vpn-instance vpn-instance-name: Specifies an MPLS L3VPN instance by its name, a case-sensitive string of 1 to 31 characters. If you do not specify a VPN instance, this command displays DHCPv6 relay entries that record clients' IPv6 prefix information for the public network.
Usage guidelines
The DHCPv6 relay agent records DHCPv6 relay entries only after you configure the ipv6 dhcp relay client-information record command.
Examples
# Display all DHCPv6 relay entries that record clients' IPv6 prefix information.
<Sysname> display ipv6 dhcp relay client-information pd
1 DHCPv6 relay entries found.
Prefix IAID Lease Status Interface
2::/64 0x00030001 54 Open Vlan2
# Display the DHCPv6 relay entry for the IPv6 prefix 2::/64.
<Sysname> display ipv6 dhcp relay client-information pd prefix 2::/64
1 DHCPv6 relay entries found.
Prefix: 2::/64
DUID: 00030001CA000C180000
IAID: 0x00030001
Port index: N/A
Interface: Vlan2
Outer VLAN: N/A
Inner VLAN: N/A
Status: Open
Access type: CommonV6
PPP index: N/A
Remaining lease time: 54 seconds
Preferred lifetime: 400 seconds
Valid lifetime: 500 seconds
Table 2 Command output
Field |
Description |
x DHCPv6 relay entries found. |
Number of DHCPv6 relay entries that record clients' IPv6 prefix information. |
Prefix |
IPv6 prefix of the DHCPv6 client. |
DUID |
DUID of the DHCPv6 client. |
IAID |
IAID of the DHCPv6 client. |
Port index |
Layer 2 port that receives the client's request. If the request is not received through a Layer 2 port, this field displays N/A. |
Interface |
Interface enabled with DHCPv6 relay agent. This field displays N/A if the entry does not contain interface information or if the interface index in the entry loses effect. |
Outer VLAN |
Outer VLAN tag contained in the client's request. If the request does not contain an outer VLAN tag, this field displays N/A. |
Inner VLAN |
Inner VLAN tag contained in the client's request. If the request does not contain an inner VLAN tag, this field displays N/A. |
Status |
Status of the DHCPv6 relay entry: · OPEN—The DHCPv6 client has obtained an IPv6 prefix or renewed the lease. · SOLICIT—The DHCPv6 relay agent receives a Solicit message that contains a Rapid Commit option from the DHCPv6 client. · REQUEST—The DHCPv6 relay agent receives a Request message from the DHCPv6 client. · RELEASE—The DHCPv6 relay agent receives a Release message from the DHCPv6 client. · DECLINE—The DHCPv6 relay agent receives a Decline message from the DHCPv6 client. · RENEW—The DHCPv6 relay agent receives a Renew message from the DHCPv6 client. · REBIND—The DHCPv6 relay agent receives a Rebind message from the DHCPv6 client. |
Access type |
Access type of the DHCPv6 client. CommonV6 represents the DHCPv6 method. |
PPP index |
This field is not supported in the current software version. PPP session index. If no PPP session index exists, this field displays N/A. |
Remaining lease time |
Remaining time in seconds of the IPv6 prefix lease. |
Preferred lifetime |
Preferred lifetime in seconds of the IPv6 prefix. |
Valid lifetime |
Valid lifetime in seconds of the IPv6 prefix. |
Related commands
ipv6 dhcp relay client-information record
reset ipv6 dhcp relay client-information pd
display ipv6 dhcp relay drni-status
Use display ipv6 dhcp relay drni-status to display DRNI status information on the DHCPv6 relay agent.
Syntax
display ipv6 dhcp relay drni-status
Views
Any view
Predefined user roles
network-admin
network-operator
Examples
# Display DRNI status information on the DHCPv6 relay agent.
<Sysname> display ipv6 dhcp relay drni-status
Drni role : Secondary
IPP/IPP Index : Bridge-Aggregation3/65540
IPP State : UP
Table 3 Command output
Field |
Description |
DRNI role: · Primary. · Secondary. If the device state is unknown, this field displays None. |
|
IPP/IPP index |
IPP interface name/IPP interface index. |
IPP State |
Physical status of the IPP interface, up or down. |
display ipv6 dhcp relay server-address
Use display ipv6 dhcp relay server-address to display DHCPv6 server addresses specified on the DHCPv6 relay agent.
Syntax
display ipv6 dhcp relay server-address [ interface interface-type interface-number ]
Views
Any view
Predefined user roles
network-admin
network-operator
Parameters
interface interface-type interface-number: Specifies an interface by its type and number. If you do not specify an interface, this command displays DHCPv6 server addresses on all interfaces enabled with DHCPv6 relay agent.
# Display DHCPv6 server addresses on all interfaces enabled with DHCPv6 relay agent.
<Sysname> display ipv6 dhcp relay server-address
Interface: Vlan-interface2
Server address Outgoing Interface
2::3
3::4 Vlan-interface4
Interface: Vlan-interface3
Server address Outgoing Interface
2::3
3::4 Vlan-interface4
# Display DHCPv6 server addresses on VLAN-interface 2.
<Sysname> display ipv6 dhcp relay server-address interface vlan-interface 2
Interface: Vlan-interface2
Server address Outgoing Interface
2::3
3::4 Vlan-interface4
Table 4 Command output
Field |
Description |
Server address |
DHCPv6 server address specified on the DHCPv6 relay agent. |
Outgoing Interface |
Output interface of DHCPv6 packets. If no output interface is specified, the device searches the routing table for the output interface. |
Related commands
ipv6 dhcp relay server-address
ipv6 dhcp select
display ipv6 dhcp relay statistics
Use display ipv6 dhcp relay statistics to display DHCPv6 packet statistics on the DHCPv6 relay agent.
Syntax
display ipv6 dhcp relay statistics [ interface interface-type interface-number ]
Views
Any view
Predefined user roles
network-admin
network-operator
Parameters
interface interface-type interface-number: Specifies an interface by its type and number. If you do not specify an interface, this command displays DHCPv6 packets statistics on all interfaces enabled with DHCPv6 relay agent.
Examples
# Display DHCPv6 packet statistics on all interfaces enabled with DHCPv6 relay agent.
<Sysname> display ipv6 dhcp relay statistics
Packets dropped : 4
Packets received : 14
Solicit : 0
Request : 0
Confirm : 0
Renew : 0
Rebind : 0
Release : 0
Decline : 0
Information-request : 7
Relay-forward : 0
Relay-reply : 7
Packets sent : 14
Advertise : 0
Reconfigure : 0
Reply : 7
Relay-forward : 7
Relay-reply : 0
# Display DHCPv6 packet statistics on the DHCPv6 relay agent on VLAN-interface 2.
<Sysname> display ipv6 dhcp relay statistics interface vlan-interface 2
Packets dropped : 4
Packets received : 16
Solicit : 0
Request : 0
Confirm : 0
Renew : 0
Rebind : 0
Release : 0
Decline : 0
Information-request : 8
Relay-forward : 0
Relay-reply : 8
Packets sent : 16
Advertise : 0
Reconfigure : 0
Reply : 8
Relay-forward : 8
Relay-reply : 0
Table 5 Command output
Field |
Description |
Packets dropped |
Number of discarded packets. |
Packets received |
Number of received packets. |
Solicit |
Number of received solicit packets. |
Request |
Number of received request packets. |
Confirm |
Number of received confirm packets. |
Renew |
Number of received renew packets. |
Rebind |
Number of received rebind packets. |
Release |
Number of received release packets. |
Decline |
Number of received decline packets. |
Information-request |
Number of received information request packets. |
Relay-forward |
Number of received relay-forward packets. |
Relay-reply |
Number of received relay-reply packets. |
Packets sent |
Number of sent packets. |
Advertise |
Number of sent advertise packets. |
Reconfigure |
Number of sent reconfigure packets. |
Reply |
Number of sent reply packets. |
Relay-forward |
Number of sent Relay-forward packets. |
Relay-reply |
Number of sent Relay-reply packets. |
Related commands
reset ipv6 dhcp relay statistics
gateway-list
Use gateway-list to specify gateway addresses for DHCPv6 clients in a DHCPv6 address pool.
Use undo gateway-list to remove gateway addresses from a DHCPv6 address pool.
Syntax
gateway-list ipv6-address&<1-8>
undo gateway-list [ ipv6-address&<1-8> ]
Default
No gateway address is specified in a DHCPv6 address pool.
Views
DHCPv6 address pool view
Predefined user roles
network-admin
Parameters
ipv6-address&<1-8>: Specifies a space-separated list of up to eight addresses.
Usage guidelines
DHCPv6 clients of the same access type can be classified into different types by their locations. In this case, the relay interface typically has no IPv6 address configured. You can use the gateway-list command to specify gateway addresses for clients matching the same DHCPv6 address pool.
Upon receiving a DHCPv6 Solicit or Request from a client that matches a DHCPv6 address pool, the relay agent processes the packet as follows:
· Fills the link-address field of the packet with a specified gateway address.
· Forwards the packet to all DHCPv6 servers in the matching DHCPv6 address pool.
The DHCPv6 servers select a DHCPv6 address pool according to the gateway address.
Examples
# Specify the gateway address 10::1 in the DHCPv6 address pool p1.
<Sysname> system-view
[Sysname] ipv6 dhcp pool p1
[Sysname-dhcp6-pool-p1] gateway-list 10::1
ipv6 dhcp client-detect
Use ipv6 dhcp client-detect to enable client offline detection on the DHCPv6 relay agent.
Use undo ipv6 dhcp client-detect to disable client offline detection on the DHCPv6 relay agent.
Syntax
ipv6 dhcp client-detect
undo ipv6 dhcp client-detect
Default
Client offline detection is disabled.
Views
Interface view
Predefined user roles
network-admin
Usage guidelines
This command takes effect only after you enable the DHCPv6 relay agent and the recording of DHCPv6 relay entries on the interface.
Examples
# Enable client offline detection on VLAN-interface 2.
<Sysname> system-view
[Sysname] interface vlan-interface 2
[Sysname-Vlan-interface2] ipv6 dhcp select relay
[Sysname-Vlan-interface2] ipv6 dhcp relay client-information record
[Sysname-Vlan-interface2] ipv6 dhcp client-detect
ipv6 dhcp relay client-information record
Use ipv6 dhcp relay client-information record to enable recording client information in DHCPv6 relay entries.
Use undo ipv6 dhcp relay client-information record to disable recording client information in DHCPv6 relay entries.
Syntax
ipv6 dhcp relay client-information record
undo ipv6 dhcp relay client-information record
Default
The DHCPv6 relay agent does not record client information in DHCPv6 relay entries.
Views
Interface view
Predefined user roles
network-admin
Usage guidelines
The undo ipv6 dhcp relay client-information record command disables the recording of DHCPv6 relay entries and deletes all recorded DHCPv6 relay entries.
Examples
# Enable the recording of DHCPv6 relay entries on VLAN-interface 2.
<Sysname> system-view
[Sysname] interface vlan-interface 2
[Sysname-Vlan-interface2] ipv6 dhcp select relay
[Sysname-Vlan-interface2] ipv6 dhcp relay client-information record
Related commands
display ipv6 dhcp relay client-information address
display ipv6 dhcp relay client-information pd
ipv6 dhcp relay client-link-address enable
Use ipv6 dhcp relay client-link-address enable to enable the DHCPv6 relay agent to support Option 79.
Use undo ipv6 dhcp relay client-link-address enable to disable Option 79 support.
Syntax
ipv6 dhcp relay client-link-address enable
undo ipv6 dhcp relay client-link-address enable
Default
The DHCPv6 relay agent does not support Option 79.
Views
Interface view
Predefined user roles
network-admin
Usage guidelines
If DHCPv6 relay agents exist in the network, the DHCPv6 server needs the MAC address of the DHCPv6 client for authentication or for IPv6 address or prefix assignment. To meet the requirement, enable the first DHCPv6 relay agent that the Request message passes to support Option 79. This feature allows the DHCPv6 relay agent to learn the MAC address in the client request. When the relay agent generates a Relay-Forward packet for the request, it fills the MAC address of the client in Option 79. The Relay-Forward packet is then forwarded to the DHCPv6 server.
Examples
# Enable Option 79 support on VLAN-interface 2.
<Sysname> system-view
[Sysname] interface vlan-interface 2
[Sysname-Vlan-interface2] ipv6 dhcp relay client-link-address enable
ipv6 dhcp relay gateway
Use ipv6 dhcp relay gateway to specify a gateway address for DHCPv6 clients on the DHCPv6 relay interface.
Use undo ipv6 dhcp relay gateway to restore the default.
Syntax
ipv6 dhcp relay gateway ipv6-address
undo ipv6 dhcp relay gateway
Default
The first IPv6 address of the relay interface is used as the gateway address for DHCPv6 clients.
Views
Interface view
Predefined user roles
network-admin
Parameters
ipv6-address: Specifies a gateway address. The IPv6 address must be an IPv6 address of the relay interface.
Usage guidelines
The DHCPv6 relay agent uses the specified IPv6 address instead of the first IPv6 address of the relay interface as the gateway address for DHCPv6 clients.
If you execute this command multiple times, the most recent configuration takes effect.
Examples
# Specify 10::1 as the gateway address for DHCPv6 clients on VLAN-interface 2.
<Sysname> system-view
[Sysname] interface vlan-interface 2
[Sysname-Vlan-interface2] ipv6 dhcp relay gateway 10::1
Related commands
gateway-list
ipv6 dhcp relay interface-id
Use ipv6 dhcp relay interface-id to specify a padding mode for the Interface-ID option.
Use undo ipv6 dhcp relay interface-id to restore the default.
Syntax
ipv6 dhcp relay interface-id { bas | interface }
undo ipv6 dhcp relay interface-id
Default
The DHCPv6 relay agent fills the Interface-ID option with the interface index of the interface.
Views
Interface view
Predefined user roles
network-admin
Parameters
bas: Specifies the BAS mode.
interface: Specifies the interface name mode. This mode pads the Interface-ID option in ASCII code with the interface name and VLAN ID of the interface.
Usage guidelines
Enable the DHCPv6 relay agent on the interface before executing this command. Otherwise, the command does not take effect.
Examples
# Specify the BAS mode as the padding mode for the Interface-ID option on VLAN-interface 10.
<Sysname> system-view
[Sysname] interface vlan-interface 10
[Sysname-Vlan-interface10] ipv6 dhcp relay interface-id bas
# Specify the interface name mode as the padding mode for the Interface-ID option on VLAN-interface 10.
<Sysname> system-view
[Sysname] interface vlan-interface 10
[Sysname-Vlan-interface10] ipv6 dhcp relay interface-id interface
ipv6 dhcp relay release-agent
Use ipv6 dhcp relay release-agent to enable IPv6 release notification.
Use undo ipv6 dhcp relay release-agent to restore the default.
Syntax
ipv6 dhcp relay release-agent
undo ipv6 dhcp relay release-agent
Default
IPv6 release notification is disabled.
Views
Interface view
Predefined user roles
network-admin
Usage guidelines
This command enables the DHCPv6 relay agent to send a Release message to the DHCPv6 server after it deletes a DHCPv6 relay entry. After the DHCPv6 server receives the message, it reclaims the IPv6 address or prefix and marks the lease as expired.
This command takes effect only after you enable the DHCPv6 relay agent and the recording of DHCPv6 relay entries on the interface.
Examples
# Enable IPv6 release notification on VLAN-interface 2.
<Sysname> system-view
[Sysname] interface vlan-interface 2
[Sysname-Vlan-interface2] ipv6 dhcp select relay
[Sysname-Vlan-interface2] ipv6 dhcp relay client-information record
[Sysname-Vlan-interface2] ipv6 dhcp relay release-agent
ipv6 dhcp relay server-address
Use ipv6 dhcp relay server-address to specify a DHCPv6 server on the DHCPv6 relay agent.
Use undo ipv6 dhcp relay server-address to remove DHCPv6 server addresses.
Syntax
ipv6 dhcp relay server-address ipv6-address [ interface interface-type interface-number ]
undo ipv6 dhcp relay server-address [ ipv6-address [ interface interface-type interface-number ] ]
Default
No DHCPv6 server address is specified on the DHCPv6 relay agent.
Views
Interface view
Predefined user roles
network-admin
Parameters
ipv6-address: Specifies the IPv6 address of a DHCPv6 server.
interface interface-type interface-number: Specifies an output interface through which the relay agent forwards the DHCPv6 requests to the DHCPv6 server. If you do not specify an output interface, the relay agent looks up the routing table for an output interface.
Usage guidelines
Upon receiving a request from a DHCPv6 client, the interface encapsulates the request into a Relay-forward message and forwards the message to the specified DHCPv6 server.
You can specify a maximum of eight DHCPv6 servers on an interface. The DHCPv6 relay agent forwards DHCPv6 requests to all the specified DHCPv6 servers.
If the DHCPv6 server address is a link-local address or multicast address, you must specify an output interface. If you do not specify an output interface, DHCPv6 packets might fail to reach the DHCPv6 server.
If you do not specify an IPv6 address, the undo ipv6 dhcp relay server-address command removes all DHCPv6 server addresses specified on the interface.
Do not enable the DHCPv6 client and the DHCPv6 relay agent on the same interface.
Examples
# Enable the DHCPv6 relay agent on VLAN-interface 2 and specify the DHCPv6 server address 2001:1::3.
<Sysname> system-view
[Sysname] interface vlan-interface 2
[Sysname-Vlan-interface2] ipv6 dhcp select relay
[Sysname-Vlan-interface2] ipv6 dhcp relay server-address 2001:1::3
Related commands
display ipv6 dhcp relay server-address
ipv6 dhcp select
ipv6 dhcp relay source-address
Use ipv6 dhcp relay source-address to specify the source IPv6 address for relayed DHCPv6 requests.
Use undo ipv6 dhcp relay source-address to restore the default.
Syntax
ipv6 dhcp relay source-address { ipv6-address | interface interface-type interface-number }
undo ipv6 dhcp relay source-address
Default
The DHCPv6 relay agent uses the IPv6 global unicast address of the interface that connects to the DHCPv6 server as the source IPv6 address for relayed DHCPv6 requests.
Views
Interface view
Predefined user roles
network-admin
Parameters
ipv6-address: Specifies a source IPv6 address.
interface interface-type interface-number: Uses the IPv6 address of an interface as the source IPv6 address. The interface-type interface-number arguments specify an interface by its type and number.
Usage guidelines
This command is required if a relay interface does not have routes to DHCPv6 servers. You can specify a global unicast address or the IPv6 address of another interface (typically the loopback interface) as the source IPv6 address for DHCPv6 requests. The relay interface inserts the source IPv6 address in the source IPv6 address field of DHCPv6 requests.
If the specified interface does not have a global unicast IPv6 address, the IPv6 address of the output interface is used as the source address for relayed DHCPv6 requests.
If you execute this command multiple times, the most recent configuration takes effect.
Examples
# Specify 10::1 as the source IPv6 address for relayed DHCPv6 requests on VLAN-interface 2.
<Sysname> system-view
[Sysname] interface vlan-interface 2
[Sysname-Vlan-interface2] ipv6 dhcp relay source-address 10::1
remote-server
Use remote-server to specify DHCPv6 servers for a DHCPv6 address pool.
Use undo remote-server to remove DHCPv6 servers from a DHCPv6 address pool.
Syntax
remote-server ipv6-address [ interface interface-type interface-number ]
undo remote-server [ ipv6-address [ interface interface-type interface-number ] ]
Default
No DHCPv6 server is specified for the DHCPv6 address pool.
Views
DHCPv6 address pool view
Predefined user roles
network-admin
Parameters
ipv6-address: Specifies a DHCPv6 server address.
interface interface-type interface-number: Specifies the outgoing interface by its type and number for the DHCPv6 relay agent to forward packets to the DHCPv6 server. If you do not specify an outgoing interface, the DHCPv6 relay agent performs a routing table lookup.
Usage guidelines
You can specify a maximum of eight DHCPv6 servers in one DHCPv6 address pool.
If you do not specify any parameters, the undo remote-server command removes all DHCPv6 servers in the DHCPv6 address pool.
If a DHCPv6 server address is a link-local address, you must specify an outgoing interface by using the interface keyword in this command. If you do not specify an outgoing interface, DHCPv6 packets might fail to reach the DHCPv6 server.
Examples
# Specify DHCPv6 server 10::1 for DHCPv6 address pool 0.
<Sysname> system-view
[Sysname] ipv6 dhcp pool 0
[Sysname-dhcp6-pool-0] remote-server 10::1
reset ipv6 dhcp relay client-information address
Use reset ipv6 dhcp relay client-information address to clear DHCPv6 relay entries that record clients' IPv6 address information.
Syntax
reset ipv6 dhcp relay client-information address [ interface interface-type interface-number | ipv6 ipv6-address ] [ vpn-instance vpn-instance-name ]
Views
User view
Predefined user roles
network-admin
Parameters
interface interface-type interface-number: Specifies an interface by its type and number. If you do not specify an interface, this command clears DHCPv6 relay entries that record clients' IPv6 address information on all interfaces enabled with DHCPv6 relay agent.
ipv6 ipv6-address: Specifies an IPv6 address. If you do not specify an IPv6 address, this command clears DHCPv6 relay entries for all IPv6 addresses.
vpn-instance vpn-instance-name: Specifies an MPLS L3VPN instance by its name, a case-sensitive string of 1 to 31 characters. If you do not specify a VPN instance, this command clears DHCPv6 relay entries that record clients' IPv6 address information for the public network.
Usage guidelines
To enable the DHCPv6 relay agent to send a Release message to the DHCPv6 server after it deletes a DHCPv6 relay entry, execute the ipv6 dhcp relay release-agent command.
Examples
# Clear all DHCPv6 relay entries that record clients' IPv6 address information.
<Sysname> reset ipv6 dhcp relay client-information address
Related commands
display ipv6 dhcp relay client-information address
ipv6 dhcp relay client-information record
reset ipv6 dhcp relay client-information pd
Use reset ipv6 dhcp relay client-information pd to clear DHCPv6 relay entries that record clients' IPv6 prefix information.
Syntax
reset ipv6 dhcp relay client-information pd [ interface interface-type interface-number | prefix prefix/prefix-len ] [ vpn-instance vpn-instance-name ]
Views
User view
Predefined user roles
network-admin
Parameters
interface interface-type interface-number: Specifies an interface by its type and number. If you do not specify an interface, this command clears DHCPv6 relay entries that record clients' IPv6 prefix information on all interfaces enabled with DHCPv6 relay agent.
prefix prefix/prefix-len: Specifies an IPv6 prefix with its length. The value range for the prefix-len argument is 1 to 128. If you do not specify an IPv6 prefix, this command clears DHCPv6 relay entries for all IPv6 prefixes.
vpn-instance vpn-instance-name: Specifies an MPLS L3VPN instance by its name, a case-sensitive string of 1 to 31 characters. If you do not specify a VPN instance, this command clears DHCPv6 relay entries that record clients' IPv6 prefix information for the public network.
Examples
# Clear all DHCPv6 relay entries that record clients' IPv6 prefix information.
<Sysname> reset ipv6 dhcp relay client-information pd
Related commands
display ipv6 dhcp relay client-information pd
ipv6 dhcp relay client-information record
reset ipv6 dhcp relay statistics
Use reset ipv6 dhcp relay statistics to clear packets statistics on the DHCPv6 relay agent.
Syntax
reset ipv6 dhcp relay statistics [ interface interface-type interface-number ]
Views
User view
Predefined user roles
network-admin
Parameters
interface interface-type interface-number: Specifies an interface by its type and number. If you do not specify an interface, this command clears all relay agent statistics.
Examples
# Clear packet statistics on the DHCPv6 relay agent.
<Sysname> reset ipv6 dhcp relay statistics
Related commands
display ipv6 dhcp relay statistics
DHCPv6 client 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 ]
Views
Any view
Predefined user roles
network-admin
network-operator
Parameters
interface interface-type interface-number: Specifies an interface by its type and number. If you do not specify an interface, this command displays information about all DHCPv6 clients.
Examples
# Display the DHCPv6 client information on VLAN-interface 2.
<Sysname> display ipv6 dhcp client interface vlan-interface 2
Vlan-interface2:
Type: Stateful client requesting address and prefix
State: OPEN
Client DUID: 0003000100e002000000
Preferred server:
Reachable via address: FE80::2E0:1FF:FE00:18
Server DUID: 0003000100e001000000
IA_NA: IAID 0x00000642, T1 50 sec, T2 80 sec
Address: 1:1::2/128
Preferred lifetime 100 sec, valid lifetime 200 sec
Will expire on Feb 4 2014 at 15:37:20(288 seconds left)
IA_PD: IAID 0x00000642, T1 50 sec, T2 80 sec
Prefix: 12:34::/48
Preferred lifetime 100 sec, valid lifetime 200 sec
Will expire on Mar 27 2014 at 08:13:24 (199 seconds left)
DNS server addresses:
2:2::3
Domain name:
aaa.com
SIP server addresses:
2:2::4
SIP server domain names:
bbb.com
Options:
Code: 88
Length: 3 bytes
Hex: AABBCC
Table 6 Command output
Field |
Description |
Type |
Types of DHCPv6 client: · Stateful client requesting address—A DHCPv6 client that requests an IPv6 address. · Stateful client requesting prefix—A DHCPv6 client that requests an IPv6 prefix. · Stateful client requesting address and prefix—A DHCPv6 client that requests an IPv6 address and prefix. · Stateless client—A DHCPv6 client that requests configuration parameters other than an IPv6 address and prefix through stateless DHCPv6. |
State |
Current state of the DHCPv6 client: · IDLE—The client is in idle state. · SOLICIT—The client is locating a DHCPv6 server. · REQUEST—The client is requesting an IPv6 address or prefix. · OPEN—The client has obtained an IPv6 address or prefix. · RENEW—The client is extending the lease (after T1 and before T2). · REBIND—The client is extending the lease (after T2 and before the lease expires). · RELEASE—The client is releasing an IPv6 address or prefix. · DECLINE—The client is declining an IPv6 address or prefix because of an address or prefix conflict. · INFO-REQUESTING—The client is requesting configuration parameters through stateless DHCPv6. |
Client DUID |
DUID of the DHCPv6 client. |
Preferred server |
Information about the DHCPv6 server selected by the DHCPv6 client. |
Reachable via address |
Reachable address for the DHCPv6 client. It is the link local address of the DHCPv6 server or DHCPv6 relay agent. |
Server DUID |
DUID of the DHCPv6 server. |
IA_NA |
IA_NA information. |
IA_PD |
IA_PD information. |
IAID |
IA identifier. |
T1 |
T1 value in seconds. |
T2 |
T2 value in seconds. |
Address |
IPv6 address obtained. This field is displayed only when the DHCPv6 client type is Stateful client requesting address. |
Prefix |
IPv6 prefix obtained. This field is displayed only when the DHCPv6 client type is Stateful client requesting prefix. |
Preferred lifetime |
Preferred lifetime in seconds. |
valid lifetime |
Valid lifetime in seconds. |
Will expire on Feb 4 2014 at 15:37:20 (288 seconds left) |
Time when the lease expires and the remaining time of the lease. If the lease expires after the year 2100, this field displays Will expire after 2100. |
DNS server addresses |
IPv6 address of the DNS server. |
Domain name |
Domain name suffix. |
SIP server addresses |
IPv6 address of the SIP server. |
SIP server domain names |
Domain name of the SIP server. |
Options |
Self-defined options. |
Code |
Code of the self-defined option. |
Length |
Self-defined option length in bytes. |
Hex |
Self-defined option content represented by a hexadecimal number. |
Related commands
ipv6 address dhcp-alloc
ipv6 dhcp client duid
ipv6 dhcp client pd
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 ]
Views
Any view
Predefined user roles
network-admin
network-operator
Parameters
interface interface-type interface-number: Specifies an interface by its type and number. If you do not specify an interface, this command displays statistics for all DHCPv6 clients.
Examples
# Display DHCPv6 client statistics on 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
Renew : 0
Rebind : 0
Information-request : 5
Release : 0
Decline : 0
Table 7 Command output
Field |
Description |
Interface |
Interface that acts 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. |
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 ipv6 address dhcp-alloc to configure an interface to use DHCPv6 for IPv6 address acquisition.
Use undo ipv6 address dhcp-alloc to cancel an interface from using DHCPv6, and clear the obtained IPv6 address and other configuration parameters.
Syntax
ipv6 address dhcp-alloc [ option-group option-group-number | rapid-commit ] *
undo ipv6 address dhcp-alloc
Default
An interface does not use DHCPv6 for IPv6 address acquisition.
Views
Layer 3 Ethernet interface/subinterface view
Layer 3 aggregate interface/subinterface view
VLAN interface view
Reth interface/subinterface view
Predefined user roles
network-admin
Parameters
option-group option-group-number: Enables the DHCPv6 client to create a dynamic DHCPv6 option group for saving the configuration parameters, and assigns an ID to the option group. The value range for the ID is 1 to 100. If you do not specify this option, the DHCPv6 client does not create any dynamic DHCPv6 option groups.
rapid-commit: Supports rapid address or prefix assignment.
Examples
# Configure VLAN-interface 10 to use DHCPv6 for IPv6 address acquisition. Configure the DHCPv6 client to support rapid address assignment and create dynamic DHCPv6 option group 1 for the configuration parameters obtained.
<Sysname> system-view
[Sysname] interface vlan-interface 10
[Sysname-Vlan-interface10] ipv6 address dhcp-alloc rapid-commit option-group 1
Related commands
display ipv6 dhcp client
ipv6 dhcp client dscp
Use ipv6 dhcp client dscp to set the DSCP value for DHCPv6 packets sent by the DHCPv6 client.
Use undo ipv6 dhcp client dscp to restore the default.
Syntax
ipv6 dhcp client dscp dscp-value
undo ipv6 dhcp client dscp
Default
The DSCP value in DHCPv6 packets is 56.
Views
System view
Predefined user roles
network-admin
Parameters
dscp-value: Sets the DSCP value for DHCPv6 packets, in the range of 0 to 63.
Usage guidelines
The DSCP value is carried in the Traffic class field of a DHCPv6 packet. It specifies the priority level of the packet and affects the transmission priority of the packet. A bigger DSCP value represents a higher priority.
Examples
# Set the DSCP value to 30 for DHCPv6 packets sent by the DHCPv6 client.
<Sysname> system-view
[Sysname] ipv6 dhcp client dscp 30
ipv6 dhcp client duid
Use ipv6 dhcp client duid to configure the DHCPv6 client DUID for an interface.
Use undo ipv6 dhcp client duid to restore the default.
Syntax
ipv6 dhcp client duid { ascii ascii-string | hex hex-string | mac interface-type interface-number }
undo ipv6 dhcp client duid
Default
The interface uses the device bridge MAC address to generate its DHCPv6 client DUID.
Views
Layer 3 Ethernet interface/subinterface view
Layer 3 aggregate interface/subinterface view
VLAN interface view
Reth interface/subinterface view
Predefined user roles
network-admin
Parameters
ascii ascii-string: Specifies a case-sensitive ASCII string of 1 to 130 characters as the DHCPv6 client DUID.
hex hex-string: Specifies a hexadecimal number of 2 to 260 characters as the DHCPv6 client DUID.
mac interface-type interface-number: Specifies the MAC address of the specified interface as the DHCPv6 client DUID. The interface-type interface-number arguments specify an interface by its type and number.
Usage guidelines
A DHCPv6 client pads its DUID into the Option 1 of the DHCPv6 packet that it sends to the DHCPv6 server. The DHCPv6 server can assign specific IPv6 addresses or prefixes to DHCPv6 clients with specific DUIDs.
The DUID of a DHCPv6 client is the globally unique identifier of the client, so make sure the DUID that you configure is unique.
Examples
# Specify the hexadecimal number FFFFFFFF as the DHCPv6 client DUID for VLAN-interface 10.
<Sysname> system-view
[Sysname] interface vlan-interface 10
[Sysname-Vlan-interface10] ipv6 dhcp client duid hex ffffffff
Related commands
display ipv6 dhcp client
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, and clear the obtained IPv6 prefix and other configuration parameters.
Syntax
ipv6 dhcp client pd prefix-number [ option-group option-group-number | rapid-commit ]*
undo ipv6 dhcp client pd
Default
An interface does not use DHCPv6 for IPv6 prefix acquisition.
Views
Layer 3 Ethernet interface/subinterface view
Layer 3 aggregate interface/subinterface view
Layer 3 RPR logical interface view
VLAN interface view
Reth interface/subinterface view
Predefined user roles
network-admin
Parameters
prefix-number: Specifies an IPv6 prefix ID in the range of 1 to 1024. After obtaining an IPv6 prefix, the client assigns the ID to the IPv6 prefix.
rapid-commit: Supports rapid address or prefix assignment.
option-group option-group-number: Enables the DHCPv6 client to create a dynamic DHCPv6 option group for saving the configuration parameters, and assigns an ID to the option group. The value range for the ID is 1 to 100. If you do not specify this option, the DHCPv6 client does not create any dynamic DHCPv6 option groups.
Examples
# Configure VLAN-interface10 to use DHCPv6 for IPv6 prefix acquisition. Specify IDs for the dynamic IPv6 prefix and dynamic DHCPv6 option group, and configure the client to support rapid prefix assignment.
[Sysname] interface vlan-interface 10
[Sysname-Vlan-interface10] ipv6 dhcp client pd 1 rapid-commit option-group 1
Related commands
display ipv6 dhcp client
ipv6 dhcp client stateful
Use ipv6 dhcp client stateful to configure an interface to use DHCPv6 for IPv6 address and prefix acquisition.
Use undo ipv6 dhcp client stateful to cancel an interface from using DHCPv6, and clear the obtained IPv6 address, prefix, and other configuration parameters.
Syntax
ipv6 dhcp client stateful prefix prefix-number [ option-group option-group-number | rapid-commit ] *
undo ipv6 dhcp client stateful
Default
An interface does not use DHCPv6 for IPv6 address and prefix acquisition.
Views
Layer 3 Ethernet interface/subinterface view
Layer 3 aggregate interface/subinterface view
Layer 3 RPR logical interface view
VLAN interface view
Reth interface/subinterface view
Predefined user roles
network-admin
Parameters
prefix prefix-number: Specifies an IPv6 prefix ID in the range of 1 to 1024. After obtaining an IPv6 prefix, the client assigns the ID to the IPv6 prefix.
rapid-commit: Supports rapid address and prefix assignment.
option-group option-group-number: Enables the DHCPv6 client to create a dynamic DHCPv6 option group for saving the configuration parameters, and assigns an ID to the option group. The value range for the ID is 1 to 100. If you do not specify this option, the DHCPv6 client does not create any dynamic DHCPv6 option groups.
Usage guidelines
The ipv6 dhcp client stateful command takes effect if it is configured with the ipv6 address dhcp-alloc and ipv6 dhcp client pd commands on an interface. You must execute the undo ipv6 dhcp client stateful command to have the ipv6 address dhcp-alloc and ipv6 dhcp client pd commands take effect.
Examples
# Configure VLAN-interface 10 to use DHCPv6 for IPv6 address and prefix acquisition. Specify IDs for the dynamic IPv6 prefix and dynamic DHCPv6 option group, and configure the client to support rapid address and prefix assignment.
<Sysname> system-view
[Sysname] interface vlan-interface 10
[Sysname-Vlan-interface10] ipv6 dhcp client stateful prefix 1 rapid-commit option-group 1
Related commands
ipv6 address dhcp-alloc
ipv6 dhcp client pd
ipv6 dhcp client stateless enable
Use ipv6 dhcp client stateless enable to enable stateless DHCPv6.
Use undo ipv6 dhcp client stateless enable to disable stateless DHCPv6.
Syntax
ipv6 dhcp client stateless enable
undo ipv6 dhcp client stateless enable
Default
Stateless DHCPv6 is disabled.
Views
Layer 3 Ethernet interface/subinterface view
Layer 3 aggregate interface/subinterface view
Layer 3 RPR logical interface view
VLAN interface view
Reth interface/subinterface view
Predefined user roles
network-admin
Usage guidelines
Stateless DHCPv6 enables the interface to send an Information-request message to the multicast address of all DHCPv6 servers and DHCPv6 relay agents for configuration parameters.
Examples
# Enable stateless DHCPv6 on VLAN-interface 2.
<Sysname> system-view
[Sysname] interface vlan-interface 2
[Sysname-Vlan-interface2] ipv6 dhcp client stateless enable
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
Predefined user roles
network-admin
Parameters
interface interface-type interface-number: Specifies an interface by its type and number. If you do not specify an interface, this command clears all DHCPv6 client statistics.
Examples
# Clear all DHCPv6 client statistics.
<Sysname> reset ipv6 dhcp client statistics
Related commands
display ipv6 dhcp client statistics