Configuring DHCP snooping to support Option 82
Follow these guidelines when configure DHCP snooping to support Option 82:
You can only enable DHCP snooping to support Option 82 on Layer 2 Ethernet interfaces, and Layer 2 aggregate interfaces.
If a Layer 2 Ethernet interface is added to an aggregation group, enabling DHCP snooping to support Option 82 on the interface will not take effect. After the interface quits the aggregation group, the configuration will be effective.
Option 82 support requires configuration on both the DHCP server and the device enabled with DHCP snooping. See "Configuring DHCP server" for DHCP server configuration of this kind.
If the handling strategy of the DHCP-snooping-enabled device is configured as replace, you need to configure a padding format for Option 82. If the handling strategy is keep or drop, you need not configure any padding format.
If the Option 82 is padded with the device name, the device name must contain no spaces. Otherwise, the DHCP-snooping device will drop the message. You can use the sysname command to specify the device name. For more information about this command, see Fundamentals Command Reference.
If DHCP snooping and QinQ work together or the DHCP snooping device receives a DHCP packet with two VLAN tags, and the normal or verbose padding format is adopted for Option 82, DHCP snooping fills the VLAN ID field of sub-option 1 with outer VLAN tag.inter VLAN tag. For example, if the outer VLAN tag is 10 (a in hexadecimal) and the inner VLAN tag is 20 (14 in hexadecimal), the VLAN ID is 000a.0014.
To configure DHCP snooping to support Option 82:
Step | Command | Remarks | |
---|---|---|---|
1. Enter system view. | system-view | N/A | |
2. Enter interface view. | interface interface-type interface-number | N/A | |
3. Enable DHCP snooping to support Option 82. | dhcp-snooping information enable | Disabled by default. | |
4. Configure the handling strategy for requests containing Option 82. | dhcp-snooping information strategy { append | drop | keep | replace } | Optional. replace by default. | |
5. Configure Option 82 in the non-user-defined padding format. |
| Optional. By default:
Hex configuration applies to private padding format only. The code type configuration for the circuit ID sub-option and remote ID sub-option apply to non-user-defined Option 82 only. For sub-option 9, when append strategy is adopted, the sysname and the primary IP address of the Loopback0 interface are padded. When some other strategy is adopted, only the sysname is padded. | |
6. Configure user-defined Option 82. |
| Optional. By default:
|