The dhcp option82 enable command enables a device to insert the Option 82 field to a DHCP message.
The undo dhcp option82 enable command disables a device from inserting the Option 82 field to a DHCP message.
By default, a device does not insert the Option 82 field to a DHCP message.
In the interface view, BD view and port group view
dhcp option82 { insert | rebuild } enable
undo dhcp option82 { insert | rebuild } enable
In the VLAN view
dhcp option82 { insert | rebuild } enable interface interface-type interface-number1 [ to interface-number2 ]
undo dhcp option82 { insert | rebuild } enable interface interface-type interface-number1 [ to interface-number2 ]
Parameter | Description | Value |
---|---|---|
insert |
Enables a device to insert the Option 82 field to a DHCP message. |
- |
rebuild |
Enables a device to forcibly insert the Option 82 field to a DHCP message. |
- |
interface interface-type interface-number1 [ to interface-number2 ] |
Specifies the interface type and number.
|
If this command is run in the VLAN view, the specified interface must have been added to the VLAN. |
VLAN view, Ethernet interface view, GE interface view, MultiGE interface view, XGE interface view, 25GE interface view, 40GE interface view, 100GE interface view, Eth-Trunk interface view, port group view, BD view
Usage Scenario
The Option 82 field records the location of a DHCP client. A device inserts the Option 82 field to a DHCP Request message to notify the DHCP server of the DHCP client location. The DHCP server can assign an IP address and other configurations to the DHCP client, ensuring DHCP client security.
Insert mode: Upon receiving a DHCP Request message without the Option 82 field, the device inserts the Option 82 field. If the DHCP Request message contains the Option 82 field, the device checks whether the Option 82 field contains the remote ID. If so, the device retains the Option 82 field; if not, the device inserts the remote ID.
Rebuild mode: Upon receiving a DHCP Request message without the Option 82 field, the device inserts the Option 82 field. If the DHCP Request message contains the Option 82 field, the device deletes the original Option 82 field and inserts the Option 82 field set by the administrator.
The device handles the reply packets from the DHCP server in the same way regardless of whether the Insert or Rebuild method is used.
The physical interface can insert Option82 to the DHCP packets directly forwarded, but does not insert Option82 to the DHCP packets forwarded through a tunnel.
Prerequisites
DHCP snooping has been enabled on the device, or the device has been configured as a DHCP relay agent.
Precautions