dhcp option82 insert enable (interface view)

Function

The dhcp option82 insert enable command enables Option 82 insertion.

The undo dhcp option82 insert enable command disables Option 82 insertion.

By default, Option 82 insertion is disabled.

Format

dhcp option82 insert enable

undo dhcp option82 insert enable

Parameters

None

Views

100GE interface view, 10GE interface view, 25GE interface view, 400GE Layer 2 sub-interface view, 400GE interface view, 40GE interface view, 50GE Layer 2 sub-interface view, 50GE interface view, Eth-Trunk Layer 2 sub-interface view, Eth-Trunk interface view, FlexE sub-interface view, FlexE interface view, GE Layer 2 sub-interface view, GE optical interface view, GE interface view, GE electrical interface view, Global VE sub-interface view, VE sub-interface view, VLANIF interface view, Layer 2 sub-interface view, Sub-interface view

Default Level

2: Configuration level

Task Name and Operations

Task Name Operations
dhcp write

Usage Guidelines

Usage Scenario

The option fields in a DHCP packet store some control information and parameters that are not defined in common protocols. An option field consists of the Code, Length, and Value. The Option 82 field refers to the option field in which the value of Code is 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. DHCP relays specify clients and policies for IP address assignment based on the Option 82 field. For example, the DHCP server assigns IP addresses in a network segment for the clients that logs in from Gigabitethernet 0/1/1. The DHCP server assigns IP addresses in another network segment for the clients that logs in from Gigabitethernet 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 (interface view) command are run in the same view, the last configuration takes effect.

Example

# Enable Option 82 insertion on GE 0/1/6.
<HUAWEI> system-view
[~HUAWEI] dhcp enable
[~HUAWEI] interface GigabitEthernet 0/1/6
[*HUAWEI-GigabitEthernet0/1/6] dhcp option82 insert enable
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >