Configuring IPv6 address assignment
About IPv6 address assignment
Use one of the following methods to configure IPv6 address assignment:
Configure a static IPv6 address binding in an address pool.
If you bind a DUID and an IAID to an IPv6 address, the DUID and IAID in a request must match those in the binding before the DHCPv6 server can assign the IPv6 address to the requesting client. If you only bind a DUID to an IPv6 address, the DUID in a request must match the DUID in the binding before the DHCPv6 server can assign the IPv6 address to the requesting client.
Specify a subnet and address ranges in an address pool.
Non-temporary address assignment—The server selects addresses from the non-temporary address range specified by the address range command. If no non-temporary address range is specified, the server selects addresses on the subnet specified by the network command.
Temporary address assignment—The server selects addresses from the temporary address range specified by the temporary address range command. If no temporary address range is specified in the address pool, the DHCPv6 server cannot assign temporary addresses to clients.
Restrictions and guidelines
You can specify only one non-temporary address range and one temporary address range in an address pool.
The address ranges specified by the address range and temporary address range commands must be on the subnet specified by the network command. Otherwise, the addresses are unassignable.
Only one prefix pool can be applied to an address pool. 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.
An IPv6 address 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.
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 you use this command to specify only new lifetimes, the settings do not affect existing leases. The IPv6 addresses assigned after the modification will use the new lifetimes.
Procedure
Enter system view.
system-view
(Optional.) Specify the IPv6 addresses excluded from dynamic assignment.
ipv6 dhcp server forbidden-address start-ipv6-address [ end-ipv6-address ] [ vpn-instance vpn-instance-name ]
By default, all IPv6 addresses except for the DHCPv6 server's IP address in a DHCPv6 address pool are assignable.
If the excluded IPv6 address is in a static binding, the address still can be assigned to the client.
Enter DHCPv6 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 address subnet is specified.
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.
(Optional.) Specify a non-temporary IPv6 address range.
address range start-ipv6-address end-ipv6-address [ preferred-lifetime preferred-lifetime valid-lifetime valid-lifetime ]
By default, no non-temporary IPv6 address range is specified, and all unicast addresses on the subnet are assignable.
(Optional.) Specify a temporary IPv6 address range.
temporary address range start-ipv6-address end-ipv6-address [ preferred-lifetime preferred-lifetime valid-lifetime valid-lifetime ]
By default, no temporary IPv6 address range is specified, and the DHCPv6 server cannot assign temporary IPv6 addresses.
(Optional.) Enable EUI-64 address allocation mode.
address-alloc-mode eui-64
By default, EUI-64 address allocation mode is disabled.
This feature enables the DHCPv6 server to obtain the client MAC address in the DHCP request and generates an EUI-64 IPv6 address to assign to the client.
(Optional.) Create a static binding.
static-bind address ipv6-address/addr-prefix-length duid duid [ iaid iaid ] [ preferred-lifetime preferred-lifetime valid-lifetime valid-lifetime ]
By default, no static binding is configured.
To add more static bindings, repeat this step.