- Table of Contents
-
- 06-Layer 3 - IP Services Command Reference
- 00-Preface
- 01-ARP Commands
- 02-IP Addressing Commands
- 03-DHCP Commands
- 04-DNS Commands
- 05-NAT Commands
- 06-IP Forwarding Basics Commands
- 07-Adjacency Table Commands
- 08-IP Performance Optimization Commands
- 09-UDP helper Commands
- 10-IPv6 Basics Commands
- 11-DHCPv6 Commands
- 12-IPv6 DNS Commands
- 13-Tunneling Commands
- Related Documents
-
Title | Size | Download |
---|---|---|
11-DHCPv6 Commands | 196.4 KB |
Contents
DHCPv6 common configuration commands
DHCPv6 server configuration commands
display ipv6 dhcp server conflict
display ipv6 dhcp server expired
display ipv6 dhcp server ip-in-use
display ipv6 dhcp server pd-in-use
display ipv6 dhcp server statistics
reset ipv6 dhcp server conflict
reset ipv6 dhcp server ip-in-use
reset ipv6 dhcp server pd-in-use
reset ipv6 dhcp server statistics
DHCPv6 relay agent configuration commands
display ipv6 dhcp relay server-address
display ipv6 dhcp relay statistics
ipv6 dhcp relay server-address
reset ipv6 dhcp relay statistics
DHCPv6 snooping configuration commands
display ipv6 dhcp snooping trust
display ipv6 dhcp snooping user-binding
ipv6 dhcp snooping max-learning-num
ipv6 dhcp snooping vlan enable
reset ipv6 dhcp snooping user-binding
DHCPv6 common configuration commands
display ipv6 dhcp duid
Syntax
display ipv6 dhcp duid [ | { begin | exclude | include } regular-expression ]
View
Any view
Default 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.
Description
Use display ipv6 dhcp duid to display the DUID of the local switch.
Examples
# Display the DUID of the switch.
<Sysname> display ipv6 dhcp duid
The DUID of this device: 0003-0001-00e0-fc00-5552
DHCPv6 server configuration commands
display ipv6 dhcp pool
Syntax
display ipv6 dhcp pool [ pool-number ] [ | { begin | exclude | include } regular-expression ]
View
Any view
Default level
1: Monitor level
Parameters
pool-number: Displays information about the DHCPv6 address pool specified by the pool number in the range of 1 to 128. If you do not specify any pool number, this command displays all DHCPv6 address pool information.
|: 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.
Description
Use display ipv6 dhcp pool to display DHCPv6 address pool information.
Examples
# Display information about DHCPv6 address pool 1.
<Sysname> display ipv6 dhcp pool 1
Pool: 1
Network: 3FFE:501:FFFF:100::/64
Preferred lifetime 604800, valid lifetime 2592000
Static bindings:
DUID: 0003000100E0FC000001
IAID: 0x3F
Prefix: 3FFE:501:FFFF:100::/64
Preferred lifetime 604800, valid lifetime 2592000
DUID: 0003000100E0FC000002
IAID: 0x30
Address: 3FFE:501:FFFF:100::2345/64
Preferred lifetime 604800, valid lifetime 2592000
Prefix pool: 1
Preferred lifetime 201600, valid lifetime 864000
DNS server addresses:
2::2
2::3
Domain name:
aaa.com
SIP server addresses:
5::1
SIP server domain names:
bbb.com
DS-Lite address:
3::6
Table 1 Command output
Field |
Description |
Pool |
DHCPv6 address pool number. |
Network |
IPv6 subnet for dynamic IPv6 address assignment. |
preferred lifetime |
Preferred lifetime of the prefix, in seconds. |
valid lifetime |
Valid lifetime of the prefix, in seconds. |
Static bindings |
Static IPv6 address or prefix information configured in the address pool. If no static prefix is configured, this field is blank. |
DUID |
Client DUID. |
IAID |
Client IAID. If the IAID is not configured, this field displays Not configured. |
Prefix |
IPv6 address prefix. |
Address |
Static IPv6 address. |
Prefix pool |
Prefix pool referenced by the address pool. If no referenced prefix pool is specified, this field displays Not configured. |
DNS server addresses |
DNS server address. If no DNS server address is configured, this field is blank. |
SIP server addresses |
SIP server address. If no SIP server address is configured, this field is blank. |
SIP server domain names |
Domain name of the SIP server. If no domain name of the SIP server is configured, this field is blank. |
DS-Lite address |
AFTR address. If no AFTR address is configured, this field is blank. |
display ipv6 dhcp prefix-pool
Syntax
display ipv6 dhcp prefix-pool [ prefix-pool-number ] [ | { begin | exclude | include } regular-expression ]
View
Any view
Default level
1: Monitor level
Parameters
prefix-pool-number: Displays details about the prefix pool specified by the prefix pool number in the range of 1 to 128. If you do not specify any prefix pool number, this command displays brief information about all prefix pools.
|: 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.
Description
Use display ipv6 dhcp prefix-pool to display prefix pool information.
Examples
# Display brief information about all prefix pools.
<Sysname> display ipv6 dhcp prefix-pool
Prefix-pool Prefix Available In-use Static
1 5::/64 64 0 0
# Display details about prefix pool 1.
<Sysname> display ipv6 dhcp prefix-pool 1
Prefix: 5::/64
Assigned length: 70
Total prefix number: 64
Available: 64
In-use: 0
Static: 0
Table 2 Command output
Field |
Description |
Prefix-pool |
Prefix pool number. |
Prefix |
Prefix contained in the prefix pool. |
Available |
Number of idle prefixes. |
In-use |
Number of assigned prefixes. |
Static |
Number of static prefixes. |
Assigned length |
Length of prefixes to be assigned. |
Total prefix number |
Total number of prefixes. |
display ipv6 dhcp server
Syntax
display ipv6 dhcp server [ interface interface-type interface-number ] [ | { begin | exclude | include } regular-expression ]
View
Any view
Default level
1: Monitor level
Parameters
interface interface-type interface-number: Displays DHCPv6 server information about the interface specified by interface type and number. If you do not specify any interface, this command displays DHCPv6 server information about all interfaces.
|: 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.
Description
Use display ipv6 dhcp server to display DHCPv6 server information.
Examples
# Display DHCPv6 server information about all interfaces.
<Sysname> display ipv6 dhcp server
DHCPv6 server status: Enabled
Interface Pool
Vlan-interface2 1
Vlan-interface3 2
# Display DHCPv6 server information about the specified interface.
<Sysname> display ipv6 dhcp server interface vlan-interface 2
Using pool: 1
Preference value: 0
Allow-hint: Enabled
Rapid-commit: Disabled
Table 3 Command output
Field |
Description |
DHCPv6 server status |
DHCPv6 server status, Enabled or Disabled. |
Interface |
Interface on which the DHCPv6 server is enabled. |
Pool |
Address pool applied to the interface. The value 0 indicates that no address pool is applied to the interface. The DHCPv6 server searches all address pools and selects one address pool to assign a prefix or an address to the client. |
Using pool |
Address pool applied to the interface. If no address pool is applied, this field is not displayed. |
Preference value |
Server priority in the DHCPv6 Advertise message. The value range is 0 to 255. A bigger value represents a higher priority. |
Allow-hint |
Whether desired address/prefix assignment is enabled. |
Rapid-commit |
Whether rapid address/prefix assignment is enabled. |
display ipv6 dhcp server conflict
Syntax
display ipv6 dhcp server conflict { address ipv6-address | all | pool pool-number } [ | { begin | exclude | include } regular-expression ]
View
Any view
Default level
1: Monitor level
Parameters
address ipv6-address: Displays conflict information about the specified IPv6 address.
all: Displays all IPv6 address conflict information.
pool pool-number: Displays IPv6 address conflict information about the DHCPv6 address pool specified by the pool number in the range of 1 to 128.
|: 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.
Description
Use display ipv6 dhcp server conflict to display IPv6 address conflict information.
Related commands: reset ipv6 dhcp server conflict.
Examples
# Display all IPv6 address conflict information.
<Sysname> display ipv6 dhcp server conflict all
Address Detect time
1:2::1 Nov 23 2010 16:37:08
1:2::2 Nov 23 2010 16:37:08
1:2::3 Nov 23 2010 16:37:08
1:2::4 Nov 23 2010 16:37:08
--- total 4 entries ---
Table 4 Command output
Field |
Description |
Address |
IPv6 address that conflicted with another IPv6 address. |
Detect time |
Time when the conflict was detected. |
display ipv6 dhcp server expired
Syntax
display ipv6 dhcp server expired { address ipv6-address | all | pool pool-number } [ | { begin | exclude | include } regular-expression ]
View
Any view
Default level
1: Monitor level
Parameters
address ipv6-address: Displays information about an expired IPv6 address.
all: Displays information about all expired IPv6 addresses.
pool pool-number: Displays information about expired IPv6 addresses in the address pool specified by the pool number in the range of 1 to 128.
|: 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.
Description
Use display ipv6 dhcp server expired to display information about expired IPv6 addresses.
Examples
# Display information about all expired IPv6 addresses.
<Sysname> display ipv6 dhcp server expired all
Address Client ID Expiration time
1:2::4 00010006498D332 Nov 23 2010 16:12:43
2000102030405
1:2::3 00010006498D332 Nov 23 2010 16:12:43
2000102030405
1:2::2 00010006498D332 Nov 23 2010 16:12:43
2000102030405
1:2::1 00010006498D332 Nov 23 2010 16:12:43
2000102030405
--- total 4 entries ---
Table 5 Command output
Field |
Description |
Address |
Expired IPv6 address. |
Client ID |
Client DUID bound to the expired IPv6 address. |
Expiration time |
Time when the lease expired. |
display ipv6 dhcp server ip-in-use
Syntax
display ipv6 dhcp server ip-in-use { address ipv6-address | all | pool pool-number } [ | { begin | exclude | include } regular-expression ]
View
Any view
Default level
1: Monitor level
Parameters
address ipv6-address: Displays binding information about the specified IPv6 address.
all: Displays all IPv6 address binding information.
pool pool-number: Displays IPv6 address binding information about the address pool specified by the pool number in the range of 1 to 128.
|: 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.
Description
Use display ipv6 dhcp server ip-in-use to display IPv6 address binding information.
Related commands: reset ipv6 dhcp server ip-in-use.
Examples
# Display all IPv6 address binding information.
<Sysname> display ipv6 dhcp server ip-in-use all
Total number = 4
Address Type Pool Expiration time
2:1::1 Auto(O) 1 Jul 10 2011 19:45:01
3:1::2 Static(C) 1 Jan 1 2011 11:11:11
1:1::2 Static(F) 2 Not-available
1:2::1f1 Static(O) 3 Oct 9 2011 09:23:31
# Display IPv6 address binding information about address pool 1.
<Sysname> display ipv6 dhcp server ip-in-use pool 1
Total number = 2
Address Type Pool Expiration time
2:1::1 Auto(O) 1 Jul 10 2011 22:22:22
3:1::2 Static(C) 1 Jan 1 2011 11:11:11
# Display the binding information about IPv6 address 2:1::1.
<Sysname> display ipv6 dhcp server ip-in-use address 2:1::1
Pool: 1
Client: FE80::C800:CFF0:FE18:0
Type: Auto(O)
DUID: 00030001CA000C180000
IAID: 0x30001
Address: 2:1::1
Preferred lifetime 400, valid lifetime 500
Expires at Jul 10 2011 09:45:01 (288 seconds left)
Table 6 Command output
Field |
Description |
Total number |
Total number of IPv6 address bindings. |
Address |
Assigned IPv6 address. |
Type |
Type of an IPv6 address binding: · Static(F)—Free static binding, indicating the static address has not been assigned to the client. · Static(O)—Offered static binding. If the server replies with an Advertise message to the client during the four-step message exchange, the server sets the type of the static binding configured for the client to Static(O). · Static(C)—Committed static binding, indicating the static IPv6 address has been assigned to the client in a Reply message. · Auto(O)—Offered dynamic binding. If the server selects a dynamic IPv6 address and replies with an Advertise message to the client during the four-step message exchange, the server sets the type of the dynamic IPv6 address binding to Auto(O). · Auto(C)—Committed dynamic binding, indicating the dynamic IPv6 address has been assigned to the client in a Reply message. |
Pool |
Address pool to which the binding belongs. |
Expiration time |
Time when the lease of an IPv6 address expires. If the lease expires after the year 2100, this field displays after 2100. For a free static binding, this field displays Not-available. |
Client |
Link-local address of a DHCPv6 client. For a free static binding, this field is blank. |
DUID |
Client DUID. |
IAID |
Client IAID. For a free static binding without IAID specified, this field is blank. |
Expires at |
Time when the lease of an IPv6 address expires. If the lease expires after the year 2100, this field displays Expires after 2100. |
display ipv6 dhcp server pd-in-use
Syntax
display ipv6 dhcp server pd-in-use { all | pool pool-number | prefix prefix/prefix-len | prefix-pool prefix-pool-number } [ | { begin | exclude | include } regular-expression ]
View
Any view
Default level
1: Monitor level
Parameters
all: Displays all IPv6 prefix binding information.
pool pool-number: Displays prefix binding information about the DHCPv6 address pool specified by the pool number in the range of 1 to 128.
prefix prefix/prefix-len: Displays binding information about the specified prefix. The prefix/prefix-len indicates the IPv6 prefix and prefix length. The value range for the prefix length is 1 to 128.
prefix-pool prefix-pool-number: Displays prefix binding information about the prefix pool specified by the prefix pool number in the range of 1 to 128.
|: 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.
Description
Use display ipv6 dhcp server pd-in-use to display IPv6 prefix binding information.
The binding information generated for static prefixes is not displayed when you display prefix binding information about a specific prefix pool.
Examples
# Display all IPv6 prefix binding information.
<Sysname> display ipv6 dhcp server pd-in-use all
Total number = 3
Prefix Type Pool Expiration time
2:1::/24 Auto(O) 1 Jul 10 2011 19:45:01
1:1::/64 Static(F) 2 Not-available
1:2::/64 Static(O) 3 Oct 9 2011 09:23:31
# Display prefix binding information about the specified DHCPv6 address pool.
<Sysname> display ipv6 dhcp server pd-in-use pool 1
Total number = 2
Prefix Type Pool Expiration time
2:1::/24 Auto(O) 1 Jul 10 2011 22:22:22
3:1::/64 Static(C) 1 Jan 1 2011 11:11:11
# Display prefix binding information about the specified prefix pool.
<Sysname> display ipv6 dhcp server pd-in-use prefix-pool 1
Total number = 1
Prefix Type Pool Expiration time
2:1:1:2::/64 Auto(C) 2 Jan 1 2011 14:45:56
# Display prefix binding information about the specified prefix.
<Sysname> display ipv6 dhcp server pd-in-use prefix 2:1::3/24
Pool: 1
Prefix pool: 1
Client: FE80::C800:CFF:FE18:0
Type: Auto(O)
DUID: 00030001CA000C180000
IAID: 0x30001
Prefix: 2:1::/24
Preferred lifetime 400, valid lifetime 500
Expires at Jul 10 2011 09:45:01 (288 seconds left)
Table 7 Command output
Field |
Description |
Total number |
Total number of prefix bindings. |
Prefix |
Assigned IPv6 prefix. |
Type |
Type of a prefix binding: · Static(F)—Free static binding, indicating the static prefix has not been assigned to the client. · Static(O)—Offered static binding. If the server replies with an Advertise message to the client during the four-step message exchange, the server sets the type of the static binding configured for the client to Static(O). · Static(C)—Committed static binding, indicating the static IPv6 prefix has been assigned to the client in a Reply message. · Auto(O)—Offered dynamic binding. If the server selects a dynamic IPv6 prefix and replies with an Advertise message to the client during the four-step message exchange, the server sets the type of the dynamic IPv6 prefix binding to Auto(O). · Auto(C)—Committed dynamic binding, indicating the dynamic IPv6 prefix has been assigned to the client in a Reply message. |
Pool |
Address pool to which the prefix binding belongs. |
Expiration time |
Time when the prefix lease expires. If the lease expires after the year 2100, this field displays after 2100. For a free static binding, this field displays Not-available. |
Prefix Pool |
Prefix pool to which the prefix binding belongs. For a free static binding, this field displays null. |
Client |
IPv6 address of the DHCPv6 client. For a free static binding, this field displays null. |
DUID |
Client DUID. |
IAID |
Client IAID. For a free static binding without IAID configured, this field displays null. |
preferred lifetime |
Preferred lifetime of the prefix, in seconds. |
valid lifetime |
Valid lifetime of the prefix, in seconds. |
Expires at |
Time when the prefix lease expires. If the lease expires after the year 2100, this field displays Expires after 2100. |
display ipv6 dhcp server statistics
Syntax
display ipv6 dhcp server statistics [ | { begin | exclude | include } regular-expression ]
View
Any view
Default 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.
Description
Use display ipv6 dhcp server statistics to display packet statistics on the DHCPv6 server.
Examples
# Display packet statistics on the DHCPv6 server.
<Sysname> display ipv6 dhcp server statistics
Packets received : 0
SOLICIT : 0
REQUEST : 0
CONFIRM : 0
RENEW : 0
REBIND : 0
RELEASE : 0
DECLINE : 0
INFORMATION-REQUEST: 0
RELAY-FORWARD : 0
Packets dropped : 0
Packets sent : 0
ADVERTISE : 0
RECONFIGURE : 0
REPLY : 0
RELAY-REPLY : 0
Table 8 Command output
Field |
Description |
Packets received |
Number of messages received by the DHCPv6 server. The message types include: · SOLICIT. · REQUEST. · CONFIRM. · RENEW. · REBIND. · RELEASE. · DECLINE. · INFORMATION-REQUEST. · RELAY-FORWARD. |
Packets dropped |
Number of packets discarded. |
Packets sent |
Number of messages sent out from the DHCPv6 server. The message types include: · ADVERTISE. · RECONFIGURE. · REPLY. · RELAY-REPLY. |
dns-server
Syntax
dns-server ipv6-address
undo dns-server ipv6-address
View
DHCPv6 address pool view
Default level
2: System level
Parameters
ipv6-address: IPv6 address of a DNS server.
Description
Use dns-server to specify a DNS server for the client.
Use undo dns-server to remove the specified DNS server.
No DNS server address is specified by default.
You can configure multiple DNS server addresses.
You can configure up to eight DNS servers in an address pool.
The precedence of the specified DNS servers depends on the configuration sequence. The formerly specified DNS server takes precedence over the latter one.
Examples
# Specify the DNS server address to be assigned to the client as 2:2::3.
<Sysname> system-view
[Sysname] ipv6 dhcp pool 1
[Sysname-dhcp6-pool-1] dns-server 2:2::3
domain-name
Syntax
domain-name domain-name
undo domain-name
View
DHCPv6 address pool view
Default level
2: System level
Parameters
domain-name: Domain name, a string of 1 to 50 characters.
Description
Use domain-name to configure the domain name for the client.
Use undo domain-name to remove the configuration.
By default, no domain name is configured for the client.
You can configure only one domain name in an address pool.
If you use the domain-name command multiple times, the most recent configuration takes effect.
Examples
# Configure the domain name to be assigned to the client as aaa.com.
<Sysname> system-view
[Sysname] ipv6 dhcp pool 1
[Sysname-dhcp6-pool-1] domain-name aaa.com
ds-lite address
Syntax
ds-lite address ipv6-address
undo ds-lite address
View
DHCPv6 address pool view
Default level
2: System level
Parameters
ipv6-address: IPv6 address of the AFTR.
Description
Use ds-lite address to specify the address of the AFTR.
Use undo ds-lite address to delete the address of the AFTR.
The address of the AFTR is not specified by default.
When you configure a DS-Lite tunnel, the CPE sends a DHCPv6 request to obtain the address of the AFTR. Upon receiving the request, the DHCPv6 server sends the address of the AFTR to the CPE. For more information about the DS-lite tunnel, see Layer 3—IP Services Configuration Guide.
You can specify only one AFTR address for an address pool. The latest setting overrides the previous one.
Examples
# Specify the AFTR address as 2::1.
<Sysname> system-view
[Sysname] ipv6 dhcp pool 1
[Sysname-dhcp6-pool-1] ds-lite address 2::1
network
Syntax
network network-address/prefix-length [ preferred-lifetime preferred-lifetime valid-lifetime valid-lifetime ]
undo network
View
DHCPv6 address pool view
Default level
2: System level
Parameters
network-address/prefix-length: IPv6 subnet for dynamic assignment. network-address is the IPv6 address and prefix-length is the prefix length. The value range for the prefix length is 1 to 128.
preferred-lifetime preferred-lifetime: Specifies the preferred lifetime for IPv6 addresses assigned from the subnet. The value range is 60 to 4294967295 seconds, and the default is 604800 seconds (7 days).
valid-lifetime valid-lifetime: Specifies the valid lifetime for IPv6 addresses assigned from the subnet. The value range is 60 to 4294967295 seconds, and the default is 2592000 seconds (30 days). The valid lifetime cannot be shorter than the preferred lifetime.
Description
Use network to specify an IPv6 subnet in a DHCPv6 address pool for dynamic address assignment.
Use undo network to remove an IPv6 subnet from a DHCPv6 address pool.
By default, no IPv6 subnet is configured for dynamic address assignment.
Only one subnet can be specified in an address pool. If you use the network command multiple times in a DHCPv6 address pool, the most recent configuration takes effect. If the new configuration has the same subnet as but different preferred lifetime and valid lifetime from the previous configuration, the new preferred lifetime and valid lifetime are effective only to the IPv6 addresses not assigned to DHCPv6 clients.
You cannot use the network command to configure the same subnet in different address pools.
The network command cannot be used to specify a subnet where all the addresses are link-local or multicast addresses. The network command can be used to specify a subnet where some of the addresses are link-local or multicast addresses, but these addresses are not assignable.
Related commands: display ipv6 dhcp pool.
Examples
# Specify IPv6 subnet 3ffe:501:ffff:100::/64 in DHCPv6 address pool 1.
<Sysname> system-view
[Sysname] ipv6 dhcp pool 1
[Sysname-dhcp6-pool-1] network 3ffe:501:ffff:100::/64
ipv6 dhcp pool
Syntax
ipv6 dhcp pool pool-number
undo ipv6 dhcp pool pool-number
View
System view
Default level
2: System level
Parameters
pool-number: Address pool number in the range of 1 to 128.
Description
Use ipv6 dhcp pool to create a DHCPv6 address pool and enter DHCPv6 address pool view, or enter DHCPv6 address pool view if the specified address pool already exists.
Use undo ipv6 dhcp pool to remove the address pool.
No DHCPv6 address pool is configured by default.
Examples
# Create DHCPv6 address pool 1 and enter its view.
<Sysname> system-view
[Sysname] ipv6 dhcp pool 1
[Sysname-dhcp6-pool-1]
ipv6 dhcp prefix-pool
Syntax
ipv6 dhcp prefix-pool prefix-pool-number prefix prefix/prefix-len assign-len assign-len
undo ipv6 dhcp prefix-pool prefix-pool-number
View
System view
Default level
2: System level
Parameters
prefix-pool-number: Prefix pool number in the range of 1 to 128.
prefix prefix/prefix-len: Specifies the prefix contained in the specified prefix pool. The prefix indicates the IPv6 prefix. The prefix-len indicates the prefix length in the range of 1 to 128.
assign-len assign-len: Specifies the length of the prefix assigned. The value range is 1 to 128. The assign-len must be higher than or equal to the prefix-len, and the difference between them must be less than or equal to 16.
Description
Use ipv6 dhcp prefix-pool to create a prefix pool and specify the prefix and the length of the prefix assigned.
Use undo ipv6 dhcp prefix-pool to remove the prefix pool.
No prefix pool is configured by default.
The prefix ranges of the prefix pools cannot overlap.
You cannot modify an existing prefix pool.
Removing a prefix pool will clear all prefix bindings assigned from the prefix pool.
Examples
# Create prefix pool 1 that contains the prefix 2001:0410::/32 and specify the length of prefixes to be assigned as 42. Prefix pool 1 can assign 1024 prefixes in the range of 2001:0410::/42 to 2001:0410:FFC0::/42.
<Sysname> system-view
[Sysname] ipv6 dhcp prefix-pool 1 prefix 2001:0410::/32 assign-len 42
ipv6 dhcp server
Syntax
ipv6 dhcp server [ allow-hint | apply pool pool-number | preference preference-value | rapid-commit ] *
undo ipv6 dhcp server
View
Interface view
Default level
2: System level
Parameters
allow-hint: Configure the server to support desired address and prefix assignment. If you do not specify this keyword, the server does not support assignment of desired addresses and prefixes.
apply pool pool-number: Applies an address pool to the interface. The value range for the pool number is 1 to 128. If this option is specified, the DHCPv6 server assigns an IPv6 address or prefix from the address pool applied on the interface to the client. If not, the server searches all DHCPv6 address pools to assign an appropriate one to the client.
preference preference-value: Specifies the server priority in Advertise messages, in the range of 0 to 255. The default value is 0. A higher value indicates a higher priority.
rapid-commit: Configure the server to support rapid prefix assignment. If you do not specify this keyword, the server does not support rapid address and prefix assignment.
Description
Use ipv6 dhcp server to enable the DHCPv6 server on the interface.
Use undo ipv6 dhcp server to remove the configuration.
By default, the DHCPv6 server is not enabled on an interface.
Upon receiving a request, the interface enabled with the DHCPv6 server selects an IPv6 address or a prefix from the address pool and assigns it to the client.
|
CAUTION: You can configure the ipv6 dhcp server apply pool command only on Ethernet interface cards, rather than base cards and subcards. For more information about Ethernet interface cards, base cards, and subcards, see the appendixes in S9500E Installation Guide. |
With the allow-hint keyword specified, the server assigns the desired address or prefix to the requesting client. If the desired address or prefix is not included in the assignable address pool of the interface, or is already assigned to another client, the server ignores the desired address or prefix and assigns the client an address or a prefix from the free addresses or prefixes.
An interface cannot serve as a DHCPv6 server and DHCPv6 relay agent at the same time. It is not recommended that you enable the DHCPv6 server and DHCPv6 client on the same interface.
Only one address pool can be applied to an interface.
You can apply a non-existing address pool to an interface. However, the server cannot assign any address, prefix, or other configuration information from the address pool until the address pool is created.
You cannot modify the address pool applied to an interface or parameters such as the server priority by using the ipv6 dhcp server command. To do so, you must disable the DHCPv6 server on the interface first.
Examples
# Apply prefix pool 1 to VLAN-interface 2, configure the server to support desired prefix assignment and rapid prefix assignment, and set the highest priority of 255.
<Sysname> system-view
[Sysname] interface vlan-interface 2
[Sysname-Vlan-interface2] ipv6 dhcp server apply pool 1 allow-hint preference 255 rapid-commit
ipv6 dhcp server enable
Syntax
ipv6 dhcp server enable
undo ipv6 dhcp server enable
View
System view
Default level
2: System level
Parameters
None
Description
Use ipv6 dhcp server enable to enable the DHCPv6 server.
Use undo ipv6 dhcp server enable to disable the DHCPv6 server.
By default, the DHCPv6 server is disabled.
Other DHCPv6 server related configuration is effective only when the DHCPv6 server is enabled.
Examples
# Enable the DHCPv6 server.
<Sysname> system-view
[Sysname] ipv6 dhcp server enable
prefix-pool
Syntax
prefix-pool prefix-pool-number [ preferred-lifetime preferred-lifetime valid-lifetime valid-lifetime ]
undo prefix-pool
View
DHCPv6 address pool view
Default level
2: System level
Parameters
prefix-pool-number: Prefix pool number in the range of 1 to 128.
preferred-lifetime preferred-lifetime: Specifies the preferred lifetime of prefixes to be assigned. The value range is 60 to 4294967295 seconds, and the default is 604800 seconds (7 days).
valid-lifetime valid-lifetime: Specifies the valid lifetime of the prefixes to be assigned. The value range is 60 to 4294967295 seconds, and the default is 2592000 seconds (30 days). The valid lifetime must be greater than or equal to the preferred lifetime.
Description
Use prefix-pool to apply a prefix pool to the DHCPv6 address pool, so that the DHCPv6 server can dynamically select a prefix from the prefix pool and assign it to the client.
Use undo prefix-pool to remove the configuration.
No prefix pool is referenced by an address pool by default.
Only one prefix pool can be referenced by an address pool.
A non-existing prefix pool can be referenced by an address pool. However, no prefix is available in the prefix pool for dynamic prefix assignment until the prefix pool is created.
You cannot modify the prefix pool referenced by an address pool, or the preferred lifetime or valid lifetime by using the prefix-pool command. You need to remove the configuration before you can have another prefix pool referenced by the address pool, or modify the preferred lifetime and valid lifetime.
Examples
# Apply prefix pool 1 to address pool 1, and use the default preferred lifetime and valid lifetime.
<Sysname> system-view
[Sysname] ipv6 dhcp pool 1
[Sysname-dhcp6-pool-1] prefix-pool 1
# Apply prefix pool 1 to address pool 1, and set the valid lifetime to 3 days, the preferred lifetime to 1 day.
<Sysname> system-view
[Sysname] ipv6 dhcp pool 1
[Sysname-dhcp6-pool-1] prefix-pool 1 preferred-lifetime 86400 valid-lifetime 259200
reset ipv6 dhcp server conflict
Syntax
reset ipv6 dhcp server conflict { address ipv6-address | all | pool pool-number }
View
User view
Default level
2: System level
Parameters
address ipv6-address: Clears conflict information about the specified IPv6 address.
all: Clears all IPv6 address conflict information.
pool pool-number: Clears IPv6 address conflict information about the address pool specified by the pool number.
Description
Use reset ipv6 dhcp server conflict to clear IPv6 address conflict information.
Related commands: display ipv6 dhcp server conflict.
Examples
# Clear all IPv6 address conflict information.
<Sysname> reset ipv6 dhcp server conflict all
reset ipv6 dhcp server ip-in-use
Syntax
reset ipv6 dhcp server ip-in-use { address ipv6-address | all | pool pool-number }
View
User view
Default level
2: System level
Parameters
address ipv6-address: Clears binding information about the specified IPv6 address.
all: Clears all IPv6 address binding information.
pool pool-number: Clears IPv6 address binding information about the address pool specified by the pool number.
Description
Use reset ipv6 dhcp server ip-in-use to clear IPv6 address binding information.
This command only clears offered and committed static bindings but not free static bindings.
This command changes offered and committed static bindings to free static bindings.
Related commands: display ipv6 dhcp server ip-in-use.
Examples
# Clear all IPv6 address binding information.
<Sysname> reset ipv6 dhcp server ip-in-use all
# Clear IPv6 address binding information about address pool 1.
<Sysname> reset ipv6 dhcp server ip-in-use pool 1
# Clear binding information about IPv6 address 2001:0:0:1::1.
<Sysname> reset ipv6 dhcp server ip-in-use address 2001:0:0:1::1
reset ipv6 dhcp server pd-in-use
Syntax
reset ipv6 dhcp server pd-in-use { all | pool pool-number | prefix prefix/prefix-len }
View
User view
Default level
2: System level
Parameters
all: Clears all IPv6 prefix binding information.
pool pool-number: Clears IPv6 prefix binding information about the address pool specified by the pool number. The value range for the pool number is 1 to 128.
prefix prefix/prefix-len: Clears binding information about the specified IPv6 prefix. The prefix/prefix-len indicates the IPv6 prefix and prefix length. The value range for the prefix length is 1 to 128.
Description
Use reset ipv6 dhcp server pd-in-use to clear IPv6 prefix binding information.
This command only clears offered and committed static bindings but not free static bindings.
This command changes offered and committed static bindings to free static bindings.
Examples
# Clear all IPv6 prefix binding information.
<Sysname> reset ipv6 dhcp server pd-in-use all
# Clear IPv6 prefix binding information about address pool 1.
<Sysname> reset ipv6 dhcp server pd-in-use pool 1
# Clear binding information about IPv6 prefix 2001:0:0:1::/64.
<Sysname> reset ipv6 dhcp server pd-in-use prefix 2001:0:0:1::/64
reset ipv6 dhcp server statistics
Syntax
reset ipv6 dhcp server statistics
View
User view
Default level
1: Monitor level
Parameters
None
Description
Use reset ipv6 dhcp server statistics to remove packet statistics on the DHCPv6 server.
Examples
# Clear packet statistics on the DHCPv6 server.
<Sysname> reset ipv6 dhcp server statistics
sip-server
Syntax
sip-server { address ipv6-address | domain-name domain-name }
undo sip-server { address ipv6-address | domain-name domain-name }
View
DHCPv6 address pool view
Default level
2: System level
Parameters
address ipv6-address: Specifies the IPv6 address of a SIP server.
domain-name domain-name: Specifies the domain name of a SIP server. The domain name is a string of 1 to 50 characters.
Description
Use sip-server to configure the IPv6 address or domain name of a SIP server for the client.
Use undo sip-server to remove the configuration.
No SIP server address or domain name is specified by default.
You can configure up to eight SIP server addresses and eight SIP server domain names in an address pool. The priorities of the specified SIP servers depend on the configuration sequence. The formerly specified SIP server takes precedence over the latter one.
If you use the sip-server command multiple times, the latest configuration will not overwrite the previous one.
Examples
# Specify the SIP server address as 2:2::4 for the client.
<Sysname> system-view
[Sysname] ipv6 dhcp pool 1
[Sysname-dhcp6-pool-1] sip-server address 2:2::4
# Specify the domain name of the SIP server as bbb.com for the client.
[Sysname-dhcp6-pool-1] sip-server domain-name bbb.com
static-bind address
Syntax
static-bind address ipv6-address/addr-prefix-length duid duid [ iaid iaid ] [ preferred-lifetime preferred-lifetime valid-lifetime valid-lifetime ]
undo static-bind address ipv6-address/addr-prefix-length
View
DHCPv6 address pool view
Default level
2: System level
Parameters
ipv6-address/addr-prefix-length: Static IPv6 address and prefix length. The value range for the prefix length is 1 to 128.
duid duid: Specifies a client DUID. The value is an even hexadecimal number in the range of 2 to 256.
iaid iaid: Specifies a client IAID. The value is a hexadecimal number in the range of 0 to FFFFFFFF. If no IAID is specified, the server does not match against the client IAID during address assignment.
preferred-lifetime preferred-lifetime: Specifies the preferred lifetime of the static IPv6 address. The value range is 60 to 4294967295 seconds, and the default is 604800 seconds (7 days).
valid-lifetime valid-lifetime: Specifies the valid lifetime of the static IPv6 address. The value range is 60 to 4294967295 seconds, and the default is 2592000 seconds (30 days). The valid lifetime cannot be shorter than the preferred lifetime.
Description
Use static-bind address to configure a static IPv6 address binding in an address pool.
Use undo static-bind address to remove a static IPv6 address binding.
By default, no static IPv6 address binding is configured in an address pool.
You can configure multiple static IPv6 address bindings.
An IPv6 address can be bound to only one DHCPv6 client. You cannot use the static-bind address command to modify the DUID, IAID, preferred lifetime and valid lifetime of a static IPv6 address binding. To do so, you must remove the static binding first.
Related commands: display ipv6 dhcp pool.
Examples
# In address pool 1, bind static address 2001:0410::2/35 to the client with DUID 00030001CA0006A400 and IAID A1A1A1A1, and use the default settings of the preferred lifetime and valid lifetime.
<Sysname> system-view
[Sysname] ipv6 dhcp pool 1
[Sysname-dhcp6-pool-1] static-bind address 2001:0410::2/35 duid 00030001CA0006A400 iaid
static-bind prefix
Syntax
static-bind prefix prefix/prefix-len duid duid [ iaid iaid ] [ preferred-lifetime preferred-lifetime valid-lifetime valid-lifetime ]
undo static-bind prefix prefix/prefix-len
View
DHCPv6 address pool view
Default level
2: System level
Parameters
prefix/prefix-len: Static prefix and prefix length. The value range for the prefix length is 1 to 128.
duid duid: Specifies a client DUID. The value is an even hexadecimal number in the range of 2 to 256.
iaid iaid: Specifies a client IAID. The value is a hexadecimal number in the range of 0 to FFFFFFFF. If no IAID is specified, the server does not match against the client IAID for prefix assignment.
preferred-lifetime preferred-lifetime: Specifies the preferred lifetime of the prefix to be assigned. The value range is 60 to 4294967295 seconds, and the default is 604800 seconds (7 days).
valid-lifetime valid-lifetime: Specifies the valid lifetime of the prefix to be assigned. The value range is 60 to 4294967295 seconds, and the default is 2592000 seconds (30 days). The valid lifetime must be greater than or equal to the preferred lifetime.
Description
Use static-bind prefix to configure a static prefix.
Use undo static-bind prefix to remove a static prefix.
No static prefix is configured by default.
An IPv6 prefix can be bound to only one DHCPv6 client. You cannot use the static-bind prefix command to modify the DUID, IAID, preferred lifetime, and valid lifetime of an existing static IPv6 prefix binding. To do so, you must remove the static IPv6 prefix binding first.
Related commands: display ipv6 dhcp pool.
Examples
# In address pool 1, bind static prefix 2001:0410::/35 to the client with DUID 00030001CA0006A400 and IAID A1A1A1A1, and set the preferred lifetime to one day, and the valid lifetime to three days.
<Sysname> system-view
[Sysname] ipv6 dhcp pool 1
[Sysname-dhcp6-pool-1] static-bind prefix 2001:0410::/35 duid 00030001CA0006A400 iaid A1A1A1A1 preferred-lifetime 86400 valid-lifetime 259200
DHCPv6 relay agent configuration commands
display ipv6 dhcp relay server-address
Syntax
display ipv6 dhcp relay server-address { all | interface interface-type interface-number } [ | { begin | exclude | include } regular-expression ]
View
Any view
Default level
1: Monitor level
Parameters
all: Displays all DHCPv6 server address information.
interface interface-type interface-number: Displays DHCPv6 server address information about the 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.
Description
Use display ipv6 dhcp relay server-address to display information about DHCPv6 server addresses specified on the DHCPv6 relay agent.
Examples
# Display all the DHCPv6 server address information.
<Sysname> display ipv6 dhcp relay server-address all
Interface: Vlan2
Server address(es) Output Interface
1::1
FF02::1:2 Vlan4
Interface: Vlan3
Server address(es) Output Interface
1::1
FF02::1:2 Vlan4
# Display DHCPv6 server address information about VLAN-interface 2.
<Sysname> display ipv6 dhcp relay server-address interface vlan-interface 2
Interface: Vlan2
Server address(es) Output Interface
1::1
FF02::1:2 Vlan4
Table 9 Command output
Field |
Description |
Interface |
Interface that serves as the DHCPv6 relay agent. |
Server address(es) |
DHCPv6 server addresses specified on the interface. |
Output Interface |
Outgoing interface of DHCPv6 packets. |
display ipv6 dhcp relay statistics
Syntax
display ipv6 dhcp relay statistics [ | { begin | exclude | include } regular-expression ]
View
Any view
Default 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.
Description
Use display ipv6 dhcp relay statistics to display packet statistics on the DHCPv6 relay agent.
Related commands: reset ipv6 dhcp relay statistics.
Examples
# Display packet statistics on the DHCPv6 relay agent.
<Sysname> display ipv6 dhcp relay statistics
Packets dropped : 4
Error : 4
Excess of rate limit : 0
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
Table 10 Command output
Field |
Description |
Packets dropped |
Number of discarded packets. |
Error |
Number of discarded error packets. |
Excess of rate limit |
Number of packets discarded due to excess of rate limit. |
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. |
ipv6 dhcp relay server-address
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 ]
View
Interface view
Default level
2: System level
Parameters
ipv6-address: IPv6 address of the DHCPv6 server.
interface interface-type interface-number: Specifies an outgoing interface for DHCPv6 packets.
Description
Use ipv6 dhcp relay server-address to enable DHCPv6 relay agent on the interface and specify a DHCPv6 server.
Use undo ipv6 dhcp relay server-address to remove the DHCPv6 server from the interface.
By default, DHCPv6 relay agent is disabled and no DHCPv6 server is specified on the interface.
Upon receiving a request from a DHCPv6 client, the interface that operates as a DHCPv6 relay agent encapsulates the request into a Relay-forward message and forwards the message to the specified DHCPv6 server, which then assigns an IPv6 address and other configuration parameters to the DHCPv6 client.
You can specify up to eight DHCP servers for an interface. After receiving requests from DHCPv6 clients, the DHCPv6 relay agent forwards the requests to all the specified DHCPv6 servers.
If the DHCPv6 server address is a link-local address or link-scoped multicast address on the local link, you must specify an outgoing interface. If no outgoing interface is specified, DHCPv6 packets might fail to be forwarded to the DHCPv6 server.
After you remove all the specified DHCPv6 servers from an interface with the undo ipv6 dhcp relay server-address command, DHCPv6 relay agent is disabled on the interface.
An interface cannot serve as a DHCPv6 client and DHCPv6 relay agent at the same time.
Related commands: display ipv6 dhcp relay server-address.
Examples
# Enable DHCPv6 relay agent on VLAN-interface 2, and specify the DHCPv6 server address as 2001:1::3.
<Sysname> system-view
[Sysname] interface vlan-interface 2
[Sysname-Vlan-interface2] ipv6 dhcp relay server-address 2001:1::3
reset ipv6 dhcp relay statistics
Syntax
reset ipv6 dhcp relay statistics
View
User view
Default level
1: Monitor level
Parameters
None
Description
Use reset ipv6 dhcp relay statistics to clear packets statistics on the DHCPv6 relay agent.
After this command is executed, the packets statistics is displayed as 0 when you use the display ipv6 dhcp relay statistics command.
Related commands: display ipv6 dhcp relay statistics.
Examples
# Clear packet statistics on the DHCPv6 relay agent.
<Sysname> reset ipv6 dhcp relay statistics
DHCPv6 snooping configuration commands
display ipv6 dhcp snooping trust
Syntax
display ipv6 dhcp snooping trust [ | { begin | exclude | include } regular-expression ]
View
Any view
Default 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.
Description
Use display ipv6 dhcp snooping trust to display DHCPv6 snooping trusted ports.
Examples
# Display DHCPv6 snooping trusted ports.
<Sysname> display ipv6 dhcp snooping trust
Trusted ports include:
GigabitEthernet3/0/1
GigabitEthernet3/0/2
display ipv6 dhcp snooping user-binding
Syntax
display ipv6 dhcp snooping user-binding { ipv6-address | dynamic } [ | { begin | exclude | include } regular-expression ]
View
Any view
Default level
1: Monitor level
Parameters
ipv6-address: Displays DHCPv6 snooping entries of the specified IPv6 address.
dynamic: Displays all DHCPv6 snooping entries.
|: 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.
Description
Use display ipv6 dhcp snooping user-binding to display DHCPv6 snooping entries.
Examples
# Display all DHCPv6 snooping entries.
<Sysname> display ipv6 dhcp snooping user-binding dynamic
IPv6 Address MAC Address Lease VLAN Interface
============================== ============== ========== ==== ==================
2::1 00e0-fc00-0006 286 1 GigabitEthernet3/0/1
--- 1 DHCPv6 snooping item(s) found ---
Table 11 Command output
Field |
Description |
IPv6 Address |
IPv6 address in the DHCPv6 snooping entry. |
MAC Address |
MAC address in the DHCPv6 snooping entry. |
Lease |
Remaining lease of the DHCPv6 snooping entry, in seconds. |
VLAN |
VLAN to which the interface belongs. |
Interface |
Interface through which the DHCPv6 client is connected. |
ipv6 dhcp snooping enable
Syntax
ipv6 dhcp snooping enable
undo ipv6 dhcp snooping enable
View
System view
Default level
2: System level
Parameters
None
Description
Use ipv6 dhcp snooping enable to enable DHCPv6 snooping globally.
Use undo ipv6 dhcp snooping enable to disable DHCPv6 snooping globally.
By default, global DHCPv6 snooping is disabled.
After DHCPv6 snooping is enabled in system view, the DHCPv6 snooping device discards DHCPv6 reply messages received by an untrusted port if any, and does not record DHCPv6 entries.
Examples
# Enable DHCPv6 snooping globally.
<Sysname> system-view
[Sysname] ipv6 dhcp snooping enable
ipv6 dhcp snooping max-learning-num
Syntax
ipv6 dhcp snooping max-learning-num number
undo ipv6 dhcp snooping max-learning-num
View
Layer 2 Ethernet interface view, Layer 2 aggregate interface view
Default level
2: System level
Parameters
number: Maximum number of DHCPv6 snooping entries an interface can learn, in the range of 0 to 8192.
Description
Use ipv6 dhcp snooping max-learning-num to configure the maximum number of DHCPv6 snooping entries an interface can learn.
Use undo ipv6 dhcp snooping max-learning-num to restore the default.
By default, the number of DHCPv6 snooping entries learned by an interface is not limited.
Examples
# Set the maximum number of DHCPv6 snooping entries Layer 2 Ethernet interface GigabitEthernet 3/0/1 can learn to 1000.
<Sysname> system-view
[Sysname] interface gigabitethernet 3/0/1
[Sysname-GigabitEthernet3/0/1] ipv6 dhcp snooping max-learning-num 1000
ipv6 dhcp snooping trust
Syntax
ipv6 dhcp snooping trust
undo ipv6 dhcp snooping trust
View
Layer 2 Ethernet interface view, Layer 2 aggregate interface view
Default level
2: System level
Parameters
None
Description
Use ipv6 dhcp snooping trust to configure a DHCPv6 trusted port.
Use undo ipv6 dhcp snooping trust to restore the default.
By default, all interfaces of a switch with DHCPv6 snooping enabled globally are untrusted ports.
After DHCPv6 snooping is enabled, to make sure DHCPv6 clients can obtain IPv6 addresses from an authorized DHCPv6 server, you need to configure the port that connects to the authorized DHCPv6 server as a trusted port.
Examples
# Configure Ethernet interface GigabitEthernet 3/0/1 as a trusted port.
<Sysname> system-view
[Sysname] interface gigabitethernet 3/0/1
[Sysname-GigabitEthernet3/0/1] ipv6 dhcp snooping trust
ipv6 dhcp snooping vlan enable
Syntax
ipv6 dhcp snooping vlan enable
undo ipv6 dhcp snooping vlan enable
View
VLAN view
Default level
2: System level
Parameters
None
Description
Use ipv6 dhcp snooping vlan enable to enable DHCPv6 snooping for a specific VLAN.
Use undo ipv6 dhcp snooping vlan enable to restore the default.
By default, DHCPv6 snooping is disabled for a VLAN.
After DHCPv6 snooping is enabled globally and then enabled for a VLAN, the DHCPv6 snooping device records DHCPv6 snooping entries according to the DHCPv6 packets received in the VLAN. Meanwhile, upon receiving a DHCPv6 request from a client in the VLAN, the switch forwards the packet through trusted ports rather than any untrusted port in the VLAN, thus reducing network traffic.
Examples
# Enable DHCPv6 snooping for VLAN 2.
<Sysname> system-view
[Sysname] vlan 2
[Sysname-vlan2] ipv6 dhcp snooping vlan enable
reset ipv6 dhcp snooping user-binding
Syntax
reset ipv6 dhcp snooping user-binding { ipv6-address | dynamic }
View
User view
Default level
2: System level
Parameters
ipv6-address: Clears DHCPv6 snooping entries of the specified IPv6 address.
dynamic: Clears all DHCPv6 snooping entries.
Description
Use reset ipv6 dhcp snooping user-binding to clear DHCPv6 snooping entries.
Examples
# Clear all DHCPv6 snooping entries.
<Sysname> reset ipv6 dhcp snooping user-binding dynamic