Configuring DHCP snooping to support Option 82

Follow these guidelines when configure DHCP snooping to support Option 82:

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.

  • Configure the padding format for Option 82:dhcp-snooping information format { normal | private private | standard | verbose [ node-identifier { mac | sysname | user-defined node-identifier } ] }

  • Configure the code type for the circuit ID sub-option:dhcp-snooping information circuit-id format-type { ascii | hex }

  • Configure the code type for the remote ID sub-option:dhcp-snooping information remote-id format-type { ascii | hex }

  • Enable sub-option 9:dhcp-snooping information [ vlan vlan-id ] sub-option sub-option-code

Optional.

By default:

  • The padding format for Option 82 is normal.

  • The code type for the circuit ID sub-option depends on the padding format of Option 82. Each field has its own code type.

  • The code type for the remote ID sub-option is hex.

  • Sub-option 9 is not enabled

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.

  • Configure the padding content for the circuit ID sub-option:
    dhcp-snooping information
    [ vlan vlan-id ] circuit-id string circuit-id

  • Configure the padding content for the remote ID sub-option:
    dhcp
    -snooping information [ vlan vlan-id ] remote-id string { remote-id | sysname }

  • Configure the padding content for the sub-option 9:
    dhcp-snooping information
    [ vlan vlan-id ] sub-option sub-option-code [ string user-string&<1-8> ]

Optional.

By default:

  • The padding content for the circuit ID sub-option depends on the padding format of Option 82.

  • The padding content for the remote ID sub-option depends on the padding format of Option 82.

  • Sub-option 9 is not padded.