network
Use network to specify an IPv6 subnet for dynamic allocation in a DHCPv6 address pool.
Use undo network to restore the default.
Syntax
network { prefix/prefix-length | prefix prefix-number [ sub-prefix/sub-prefix-length ] } [ preferred-lifetime preferred-lifetime valid-lifetime valid-lifetime ] [ export-route ]
undo network
Default
No IPv6 subnet is specified in a DHCPv6 address pool.
Views
DHCPv6 address pool view
Predefined user roles
network-admin
mdc-admin
Parameters
prefix/prefix-length: Specifies the IPv6 subnet for dynamic allocation. The value range for the prefix-length argument is 1 to 128.
prefix prefix-number: Specifies an IPv6 prefix by its ID in the range of 1 to 1024.
sub-prefix/sub-prefix-length: Specifies an IPv6 sub-prefix and its length. The value range for the sub-prefix-length argument is 1 to 128. If the IPv6 prefix is longer than the IPv6 sub-prefix or if you do not specify an IPv6 sub-prefix, the IPv6 subnet defined by the IPv6 prefix is used for dynamic allocation.
preferred-lifetime preferred-lifetime: Sets the preferred lifetime. The value range is 60 to 4294967295 seconds, and the default is 604800 seconds (7 days).
valid-lifetime valid-lifetime: Sets the valid lifetime. The value range is 60 to 4294967295 seconds, and the default is 2592000 seconds (30 days). The valid lifetime must be longer than or equal to the preferred lifetime.
export-route: Advertises the subnet assigned to DHCPv6 clients. If you do not specify this keyword, the subnet will not be advertised.
Usage guidelines
You can specify only one subnet for a DHCPv6 address pool. If you execute the network command multiple times, the most recent configuration takes effect.
Modifying or removing the network command configuration removes assigned addresses in the current address pool.
If you execute the network export-route command multiple times, the most recent configuration takes effect.
The network prefix command does not take effect if the specified IPv6 prefix does not exist. This command takes effect after the IPv6 prefix is created.
The network command defines the IPv6 subnet for dynamic allocation through the prefix/prefix-length arguments or the prefix-number [ sub-prefix/sub-prefix-length ] arguments. The IPv6 subnets cannot be the same in different DHCPv6 address pools.
If the prefix that the ID represents is changed, the IPv6 subnet in this command accordingly changes, and the assigned prefix and address bindings are cleared.
Examples
# Specify the 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
# Create IPv6 prefix 88:99::/32 with the prefix ID 3. Create DHCPv6 address pool 1 and use the IPv6 subnet defined by the IPv6 prefix for dynamic allocation.
<Sysname> system-view [Sysname] ipv6 prefix 3 88:99::/32 [Sysname] ipv6 dhcp pool 1 [Sysname-dhcp6-pool-1] network prefix 3
# Create IPv6 prefix 88:99::/32 with the prefix ID 3. Create DHCPv6 address pool 1 and use IPv6 subnet 88:99:ffff:100::/64 defined by IPv6 prefix 3 and IPv6 sub-prefix 3ffe:501:ffff:100::/64 for dynamic allocation. The first 32 bits of the IPv6 subnet are determined by IPv6 prefix 3. The bits 33 to 64 of the IPv6 subnet are determined by the IPv6 sub-prefix and its length. The prefix length of the IPv6 subnet is the IPv6 sub-prefix length.
<Sysname> system-view [Sysname] ipv6 prefix 3 88:99::/32 [Sysname] ipv6 dhcp pool 1 [Sysname-dhcp6-pool-1] network prefix 3 3ffe:501:ffff:100::/64
Related commands
address range
display ipv6 dhcp pool
temporary address range