Configuring the DHCPv6 server on an interface
About configuring the DHCPv6 server on an interface
Enable the DHCP server and configure one of the following address/prefix assignment methods on an interface:
Apply an address pool on the interface—The DHCPv6 server selects an IPv6 address/prefix from the applied address pool for a requesting client. If there is no assignable IPv6 address/prefix in the address pool, the DHCPv6 server cannot to assign an IPv6 address/prefix to a client.
Configure global address assignment on the interface—The DHCPv6 server selects an IPv6 address/prefix in the global DHCPv6 address pool that matches the server interface address or the DHCPv6 relay agent address for a requesting client.
If you configure both methods on an interface, the DHCPv6 server uses the specified address pool for address assignment without performing global address assignment.
Restrictions and guidelines
An interface cannot act as a DHCPv6 server and DHCPv6 relay agent at the same time.
Do not enable DHCPv6 server and DHCPv6 client on the same interface.
You can apply an address pool that has not been created to an interface. The setting takes effect after the address pool is created.
Procedure
Enter system view.
system-view
Enter interface view.
interface interface-type interface-number
Enable the DHCPv6 server on the interface.
ipv6 dhcp select server
By default, the interface does not act as a DHCP server or a DHCP relay agent, and discards DHCPv6 packets from DHCPv6 clients.
Configure an assignment method.
Configure global address assignment.
ipv6 dhcp server { allow-hint | preference preference-value | rapid-commit } *
By default, desired address/prefix assignment and rapid assignment are disabled, and the default preference is 0.
Apply a DHCPv6 address pool to the interface.
ipv6 dhcp server apply pool pool-name [ allow-hint | preference preference-value | rapid-commit ] *