dhcp server option82 link-selection enable

Function

The dhcp server option82 link-selection enable command enables a DHCP server to assign IP addresses based on the Option 82 suboption Link Selection.

The undo dhcp server option82 link-selection enable command disables a DHCP server from assigning IP addresses based on the Option 82 suboption Link Selection.

By default, a DHCP server is disabled from assigning IP addresses based on the Option 82 suboption Link Selection.

Format

dhcp server option82 link-selection enable

undo dhcp server option82 link-selection enable

Parameters

None

Views

System view

Default Level

2: Configuration level

Task Name and Operations

Task Name Operations
dhcp write

Usage Guidelines

Usage Scenario

Generally, after receiving a packet, a DHCP server searches the IP address pool based on the giaddr field, assigns an IP address on the same network segment as the address specified by the giaddr field, and uses the address specified by the giaddr field to communicate with the DHCP relay agent. When EVPN and VXLAN ESI all-active support DHCP relay, to ensure that a DHCP server can correctly assign an address and send a response packet back to the same DHCP relay agent as a request packet, perform the following steps:

  1. Run the dhcp option82 link-selection insert enable and dhcp option82 link-selection subnet-ip-address commands on the DHCP relay agent to enable the DHCP relay agent to insert the Link Selection suboption into a DHCP request packet and set an IP address for the suboption, respectively.
  2. Run the ip relay giaddr command on the DHCP relay agent to change the giaddr field value in the request packet to the IP address of the DHCP relay agent.
  3. Run the dhcp server option82 link-selection enable command on the DHCP server to enable the DHCP server to assign IP addresses based on the Option 82 suboption Link Selection.

Precautions

The function of enabling the DHCP server to assign IP addresses based on Option 60 takes preference over the function of enabling the DHCP server to assign IP addresses based on the Option 82 suboption Link Selection.

Example

# Enable a DHCP server to assign IP addresses based on the Option 82 suboption Link Selection.
<HUAWEI> system-view
[~HUAWEI] dhcp server option82 link-selection enable
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >