The dhcpv6 server command enables the DHCPv6 server function on an interface.
The undo dhcpv6 server command disables the DHCPv6 server function on an interface.
By default, the DHCPv6 server function on an interface is disabled.
dhcpv6 server pool-name [ allow-hint | preference preference-value | rapid-commit | unicast ] *
undo dhcpv6 server
Parameter |
Description |
Value |
---|---|---|
pool-name |
Specifies the name of the DHCPv6 address pool configured on an interface. |
The value is a string of 1 to 31 characters without spaces. The value contains digits, letters, underscores (_), and dots (.). |
allow-hint |
Specifies the DHCPv6 server to allocate addresses, prefixes, and prefix lengths based on the DHCPv6 client requests. If the allow-hint parameter is specified, the server preferentially allocates addresses, prefixes, and prefix lengths based on the client requests. If the address, prefix, and prefix length requested by a client are not within the address pool or have been allocated to another client, the server ignores the client request and allocates another available address, prefix, and prefix length to the client. |
- |
preference preference-value |
Specifies the priority of the DHCPv6 server carried in the Advertise message sent by the DHCPv6 server. The DHCPv6 client chooses to obtain an IP address or prefix from the DHCPv6 server with the highest priority based on the server priority carried in the Advertise message. |
The value is an integer that ranges from 0 to 255. The default value is 0. A larger value indicates a higher priority of the DHCPv6 server. |
rapid-commit |
Configures the DHCPv6 server to support fast address prefix allocation. |
- |
unicast |
Specifies the unicast communication between the DHCPv6 client and DHCPv6 server during IPv6 address lease. |
- |
VLANIF interface view, Eth-Trunk interface view, GE interface view, XGE interface view, MultiGE interface view, MultiGE sub-interface view, 25GE interface view, 40GE interface view, 100GE interface view, Eth-Trunk sub-interface view, GE sub-interface view, XGE sub-interface view, 25GE sub-interface view, 40GE sub-interface view, 100GE sub-interface view
Usage Scenario
The dhcpv6 server command is used on DHCP servers. If an IPv6 address pool is referenced by an interface, the interface assigns addresses or address prefixes in the address pool to clients after receiving the DHCPv6 Request messages.
Prerequisites
DHCP functions have been enabled globally using the dhcp enable command.
IPv6 functions have been enabled globally using the ipv6 command.
IPv6 functions have been enabled using the ipv6 enable command in the interface view.
Precautions
# Associate DHCPv6 address pool Pool1 with VLANIF100 and set the priority of pool1 to 255.
<HUAWEI> system-view [HUAWEI] dhcp enable [HUAWEI] ipv6 [HUAWEI] interface vlanif 100 [HUAWEI-Vlanif100] ipv6 enable [HUAWEI-Vlanif100] dhcpv6 server pool1 preference 255
<HUAWEI> system-view [HUAWEI] dhcp enable [HUAWEI] ipv6 [HUAWEI] interface gigabitethernet 0/0/1 [HUAWEI-GigabitEthernet0/0/1] undo portswitch [HUAWEI-GigabitEthernet0/0/1] ipv6 enable [HUAWEI-GigabitEthernet0/0/1] dhcpv6 server pool1 preference 255