Configuring IPv6 prefix assignment
About IPv6 prefix assignment
Use the following methods to configure IPv6 prefix assignment:
Configure a static IPv6 prefix binding in an address pool—If you bind a DUID and an IAID to an IPv6 prefix, the DUID and IAID in a request must match those in the binding before the DHCPv6 server can assign the IPv6 prefix to the DHCPv6 client. If you only bind a DUID to an IPv6 prefix, the DUID in the request must match the DUID in the binding before the DHCPv6 server can assign the IPv6 prefix to the DHCPv6 client.
Apply a prefix pool to an address pool—The DHCPv6 server dynamically assigns an IPv6 prefix from the prefix pool in the address pool to a DHCPv6 client.
Restrictions and guidelines
When you configure IPv6 prefix assignment, follow these restrictions and guidelines:
An IPv6 prefix can be bound to only one DHCPv6 client. You cannot modify bindings that have been created. To change the binding for a DHCPv6 client, you must delete the existing binding first.
One address pool can have only one prefix pool applied. You cannot modify prefix pools that have been applied. To change the prefix pool for an address pool, you must remove the prefix pool application first.
You can apply a prefix pool that has not been created to an address pool. The setting takes effect after the prefix pool is created.
Procedure
Enter system view.
system-view
(Optional.) Specify the IPv6 prefixes excluded from dynamic assignment.
ipv6 dhcp server forbidden-prefix start-prefix/prefix-len [ end-prefix/prefix-len ] [ vpn-instance vpn-instance-name ]
By default, no IPv6 prefixes in the prefix pool are excluded from dynamic assignment.
If the excluded IPv6 prefix is in a static binding, the prefix still can be assigned to the client.
Create a prefix pool.
ipv6 dhcp prefix-pool prefix-pool-number prefix { prefix-number | prefix/prefix-len } assign-len assign-len [ vpn-instance vpn-instance-name ]
This step is required for dynamic prefix assignment.
If you specify an IPv6 prefix by its ID, make sure the IPv6 prefix is in effect. Otherwise, the configuration does not take effect.
Enter DHCP address pool view.
ipv6 dhcp pool pool-name
Specify an IPv6 subnet for dynamic assignment.
network { prefix/prefix-length | prefix prefix-number [ sub-prefix/sub-prefix-length ] } [ preferred-lifetime preferred-lifetime valid-lifetime valid-lifetime ]
By default, no IPv6 subnet is specified for dynamic assignment.
The IPv6 subnets cannot be the same in different address pools.
If you specify an IPv6 prefix by its ID, make sure the IPv6 prefix is in effect. Otherwise, the configuration does not take effect.
Configure the prefix assignment. Choose the options to configure as needed:
Configure a static prefix binding:
static-bind prefix prefix/prefix-len duid duid [ iaid iaid ] [ preferred-lifetime preferred-lifetime valid-lifetime valid-lifetime ]
By default, no static prefix binding is configured.
To add multiple static IPv6 prefix bindings, repeat this step.
Apply the prefix pool to the address pool:
prefix-pool prefix-pool-number [ preferred-lifetime preferred-lifetime valid-lifetime valid-lifetime ]
By default, static or dynamic prefix assignment is not configured for an address pool.