dhcp relay information circuit-id
Use dhcp relay information circuit-id to configure the padding mode and padding format for the Circuit ID sub-option of Option 82.
Use undo dhcp relay information circuit-id to restore the default.
Syntax
dhcp relay information circuit-id { string circuit-id | { normal | verbose [ node-identifier { mac | sysname | user-defined node-identifier } ] } [ format { ascii | hex } ] }
undo dhcp relay information circuit-id
Default
The padding mode is normal and the padding format is hex.
Views
Interface view
Predefined user roles
network-admin
Parameters
string circuit-id: Specifies the string mode that uses a case-sensitive string of 3 to 63 characters as the content of the Circuit ID sub-option.
normal: Specifies the normal mode, in which the padding content consists of the VLAN ID and port number.
verbose: Specifies the verbose mode. The padding content includes the VLAN ID and interface number.
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 relay agent 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 11 shows how the padding format is determined for different modes.
Table 11: 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. |
Examples
# Specify the padding mode as verbose, node identifier as the device name, and the padding format as ASCII for the Circuit ID sub-option.
<Sysname> system-view [Sysname] interface vlan-interface 10 [Sysname-Vlan-interface10] dhcp relay information enable [Sysname-Vlan-interface10] dhcp relay information strategy replace [Sysname-Vlan-interface10] dhcp relay information circuit-id verbose node-identifier sysname format ascii
Related commands
dhcp relay information enable
dhcp relay information strategy
display dhcp relay information