dhcp option82 insert enable (Bridge domain view)

Function

The dhcp option82 insert enable command enables a device to insert Option 82 into DHCP packets.

The undo dhcp option82 insert enable command disables a device from inserting Option 82 into DHCP packets.

By default, a device is disabled from inserting Option 82 into DHCP packets.

Format

dhcp option82 insert enable

undo dhcp option82 insert enable

Parameters

None

Views

Bridge domain view

Default Level

2: Configuration level

Task Name and Operations

Task Name Operations
dhcp write

Usage Guidelines

Usage Scenario

The Option field in a DHCP packet carries control information and parameters that are not defined in certain common protocols. The Option field consists of the Code, Length, and Value fields. The Option 82 field is an Option field with the Code value 82.

The Option 82 field contains the location information of DHCP hosts, such as information about login interface, VLAN, and address. The Option 82 field helps create DHCP snooping binding entries with accurate interface information. Based on the Option 82 field, the DHCP server assigns IP addresses and policies for DHCP clients. For example, the DHCP server assigns IP addresses in a network segment for the clients that log in from GE 0/1/1. The DHCP server assigns IP addresses in another network segment for the clients that log in from GE 0/1/2.

Configuration Impact

  • After the dhcp option82 insert enable command is run, the device inserts the Option 82 field into a DHCP packet if no Option 82 field exists in the packet. If the Option 82 field exists in a DHCP packet, the device checks whether the Option 82 field contains suboptions. If the Option 82 field contains suboptions, the device does not change the suboptions. If the Option 82 field does not contain suboptions and the suboption format is configured, the device inserts suboptions into the Option 82 field.
  • If the dhcp option82 insert enable command and the dhcp option82 rebuild enable (BD view) command are run in the BD view, the later configuration takes effect.

Precautions

Only the device on which DHCP snooping or DHCP relay is configured can be enabled to insert Option 82 into DHCP packets.

Example

# Enable a device in BD 10 to insert Option 82 into DHCP packets.
<HUAWEI> system-view
[~HUAWEI] bridge-domain 10
[*HUAWEI-bd10] dhcp option82 insert enable
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >