Option 82 configuration example

Network requirements

As shown in Figure 28, the DHCP relay agent (Router A) replaces Option 82 in DHCP requests before forwarding them to the DHCP server (Router B).

To use Option 82, you must also enable the DHCP server to handle Option 82.

Configuration procedure

# Specify IP addresses for the interfaces. (Details not shown.)

# Enable DHCP.

<RouterA> system-view
[RouterA] dhcp enable

# Enable the DHCP relay agent on GigabitEthernet 1/0/1.

[RouterA] interface gigabitethernet 1/0/1
[RouterA-GigabitEthernet1/0/1] dhcp select relay

# Specify the IP address of the DHCP server on the relay agent.

[RouterA-GigabitEthernet1/0/1] dhcp relay server-address 10.1.1.1

# Enable the DHCP relay agent to handle Option 82, and perform Option 82 related configuration.

[RouterA-GigabitEthernet1/0/1] dhcp relay information enable
[RouterA-GigabitEthernet1/0/1] dhcp relay information strategy replace
[RouterA-GigabitEthernet1/0/1] dhcp relay information circuit-id string company001
[RouterA-GigabitEthernet1/0/1] dhcp relay information remote-id string device001