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 { bas | string circuit-id | vxlan-port | { normal | verbose [ node-identifier { mac | sysname | user-defined node-identifier } ] [ interface ] } [ 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

mdc-admin

Parameters

bas: Specifies the bas mode for padding the Circuit ID sub-option.

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.

vxlan-port: Specifies the mode that uses the VXLAN ID and port number to pad 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 node identifier, interface information, and VLAN ID. The default node identifier is the MAC address of the access node. The default interface information consists of the Ethernet type (fixed to eth), chassis number, slot number, sub-slot number, and interface number.

node-identifier { mac | sysname | user-defined node-identifier }: Specifies the access node identifier.


[NOTE: ]

NOTE:

If sysname is specified as the node identifier, do not include any spaces when you set the device name. Otherwise, the DHCP relay agent fails to add or replace Option 82.


interface: Uses the interface name as the interface information. The padding format for the interface name is always ASCII regardless of the specified padding format.

format: Specifies the padding format for the Circuit ID sub-option.

ascii: Specifies the ASCII padding format.

hex: Specifies the hex padding format.

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 execute this command multiple times, the most recent configuration takes effect.

The padding format for the string mode, the normal mode, or the verbose mode varies by command configuration. Table 12 shows how the padding format is determined for different modes.

Table 12: Padding format for different modes

Keyword (mode)

If no padding format is set

If the padding format is ascii

If the padding format is hex

string circuit-id

The padding format is ASCII, and is not configurable.

N/A

N/A

normal

Hex.

ASCII.

Hex.

verbose

Hex for the VLAN ID.

ASCII for the node identifier, Ethernet type, chassis number, slot number, sub-slot number, and interface number.

ASCII.

ASCII for the node identifier and Ethernet type.

Hex for the chassis number, slot number, sub-slot number, interface number, and VLAN ID.

Examples

# Specify the content 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