dhcp snooping information circuit-id
Use dhcp snooping information circuit-id to configure the padding mode and padding format for the Circuit ID sub-option.
Use undo dhcp snooping information circuit-id to restore the default.
Syntax
dhcp snooping information circuit-id { [ vlan vlan-id ] string circuit-id | { normal | verbose [ node-identifier { mac | sysname | user-defined node-identifier } ] } [ format { ascii | hex } ] }
undo dhcp snooping information circuit-id [ vlan vlan-id ]
Default
The padding mode is normal and the padding format is hex.
Views
Layer 2 Ethernet interface view, Layer 2 aggregate interface view
Predefined user roles
network-admin
Parameters
vlan vlan-id: Specifies a VLAN ID for the Circuit ID sub-option.
string circuit-id: Specifies the string mode, in which the padding content for the Circuit ID sub-option is a case-sensitive string of 3 to 63 characters.
normal: Specifies the normal mode. The padding content includes the VLAN ID and interface number.
verbose: Specifies the verbose mode.
node-identifier { mac | sysname | user-defined node-identifier }: Specifies the access node identifier. The padding content includes the node identifier, Ethernet type (fixed to eth), interface number, and VLAN ID. The node identifier varies by keyword mac, sysname, and user-defined.
mac: Uses the MAC address of the access node as the node identifier. It is the default node identifier.
sysname: Uses the device name as the node identifier. You can set the device name by using the sysname command in system view. The padding format for the device name is always ASCII regardless of the specified padding format.
NOTE: If sysname is used as the node identifier, do not include any space when you set the device name. Otherwise, the DHCP snooping device fails to add or replace the Option 82. | ||
user-defined node-identifier: Uses a case-sensitive string of 1 to 50 characters as the node identifier. The padding format for the specified character string is always ASCII regardless of the specified padding format.
format: Specifies the padding format for the Circuit ID sub-option.
ascii: Specifies the padding format as ASCII.
hex: Specifies the padding format as hex.
Usage guidelines
The Circuit ID sub-option cannot carry information about interface splitting or subinterfaces. For more information about interface splitting and subinterfaces, see Interface Configuration Guide.
If you use this command multiple times, the most recent configuration takes effect.
The padding format for the user-defined string, the normal mode, or the verbose modes varies by command configuration. Table 17 shows how the padding format is determined for different modes.
Table 17: Padding format for different modes
Keyword (mode) | If no padding format is specified | If the padding format is ascii | If the padding format is hex |
---|---|---|---|
string circuit-id | You cannot specify a padding format, and the padding format is always ASCII. | N/A | N/A |
normal | Hex. | ASCII. | Hex. |
verbose | Hex for the VLAN ID. ASCII for the node identifier, Ethernet type, and interface number. | ASCII. | ASCII for the node identifier and Ethernet type. Hex for the interface number and VLAN ID. |
If replace is configured as the handling strategy for DHCP requests that contain Option 82, you must specify the padding mode and padding format for the Circuit ID sub-option. If the handling strategy is keep or drop, you do not need to specify the padding mode and padding format for the Circuit ID sub-option.
Examples
# Configure verbose as the padding mode, device name as the node identifier, and ASCII as the padding format for the Circuit ID sub-option.
<Sysname> system-view [Sysname] interface Ten-GigabitEthernet 1/0/1 [Sysname-Ten-GigabitEthernet1/0/1] dhcp snooping information enable [Sysname-Ten-GigabitEthernet1/0/1] dhcp snooping information strategy replace [Sysname-Ten-GigabitEthernet1/0/1] dhcp snooping information circuit-id verbose node-identifier sysname format ascii
Related commands
dhcp snooping information enable
dhcp snooping information strategy
display dhcp snooping information