< Home

dhcpv6 server (system view)

Function

The dhcpv6 server command enables the DHCPv6 server or DHCPv6 PD server function in the system view.

The undo dhcpv6 server command disables the DHCPv6 server or DHCPv6 PD server function in the system view.

By default, the DHCPv6 server or DHCPv6 PD server function is disabled in the system view.

Format

dhcpv6 server { allow-hint | preference preference-value | rapid-commit | unicast } *

undo dhcpv6 server { allow-hint | preference | rapid-commit | unicast } *

Parameters

Parameter

Description

Value

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 server priority in the Advertise packet sent by the device. The DHCPv6 client selects the server with the highest priority based on the server priority in the Advertise packet to assign IPv6 addresses or prefixes.

The value is an integer that ranges from 0 to 255.

By default, the value is 0. A larger value indicates a higher server priority.

rapid-commit

Indicates that the device supports fast address or prefix assignment, that is, two-message exchange.

-

unicast

Specifies unicast communication between the client and server during the address lease renewal process.

-

Views

System view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

When the device functions as a DHCPv6 or DHCPv6 PD server, the DHCPv6 or DHCPv6 PD server function can be enabled in the system view or interface view. If the DHCPv6 or DHCPv6 PD server function is enabled in the interface view, the configuration information only takes effect on the interfaces and only one IPv6 address pool can be specified on an interface.

The DHCPv6 or DHCPv6 PD server and DHCPv6 clients are in different link scopes and a DHCPv6 relay exists. If the DHCPv6 or DHCPv6 PD server function is enabled in the interface view, configuration parameters such as IPv6 addresses or prefixes are assigned only to the clients in one network segment connected to the DHCPv6 relay, because only one IPv6 address pool can be specified on an interface. If configuration parameters such as IPv6 addresses or prefixes need to be assigned to the DHCPv6 clients in multiple network segments through the DHCPv6 relay, enable the DHCPv6 or DHCPv6 PD server function in the system view.

The configuration method of enabling the DHCPv6 or DHCPv6 PD server function in the interface view is affected by the physical interface status. If the interface status is Down, the DHCPv6 or DHCPv6 PD server cannot successfully assign network configuration parameters to clients through the DHCPv6 relay. When the DHCPv6 or DHCPv6 PD server function is enabled in the system view and there are multiple reachable routes between the DHCPv6 relay and DHCPv6 or DHCPv6 PD server, configuration parameters such as IPv6 addresses can be assigned to clients through the DHCPv6 relay as long as one route between the DHCPv6 relay and DHCPv6 or DHCPv6 PD server is reachable. This improves reliability of the configuration information obtained by the clients. In addition, no configuration is required on the interface, which reduces the administrator's maintenance workload.

When functioning as a DHCPv6 or DHCPv6 PD server, the device may be configured with multiple IPv6 address pools. After receiving the DHCPv6 request packets, the DHCPv6 or DHCPv6 PD server chooses the IPv6 address pool based on the following rules:
  • When the device functions as the DHCPv6 server:

    • If a relay exists, the server chooses the address pool that belongs to the same link scope with the configured network prefix (using the link-address command or address prefix) based on the first link-address field that is not 0. The link-address field identifies the link scope of the DHCPv6 clients.
    • If no relay exists, the DHCPv6 server only assigns configuration parameters to clients in DHCPv6 stateless mode cannot be enabled in the system view.

  • When the device functions as the DHCPv6 PD server:

    • If a relay exists, choose the address pool in the same link scope with the configured network prefix (using the link-address command) based on the first link-address field that is not 0. The link-address field identifies the link scope of the DHCPv6 clients.
    • If no relay exists, the DHCPv6 PD server function cannot be enabled in the system view and can be enabled in the interface view, using the dhcpv6 server command.

Prerequisites

  1. The DHCP function has been enabled globally using the dhcp enable command.

  2. The IPv6 function has been enabled globally using the ipv6 command.

Example

# Enable the DHCPv6 server function in the system view, and configure the server priority to 255.

<HUAWEI> system-view 
[HUAWEI] dhcp enable 
[HUAWEI] ipv6 
[HUAWEI] dhcpv6 server preference 255
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >