Configure the DHCP Relay to Support Option82
Network Requirements
- On the DHCP relay device, Option82 is enabled.
- For Option82 sub-option Remote ID, specify the content as 0102030405.
- The DHCP relay Device2 adds Option82 in a request packet and forwards the request to DHCP server. The DHCP server then allocates IP addresses in the 1.0.0.0/24 network segment to the client.
Network Topology
![Networking for Configuring the DHCP Relay to Support Option82](/storage/images/Document/Maipu/ip-protocol/topology-for-dhcp-relay-support-option-82.jpg)
Figure 3-4 Networking for Configuring the DHCP Relay to Support Option82
Configuration Steps
Step 1: Configure VLAN, and add the port to the corresponding VLAN. Configure the IP address of the interface (omitted).
Step 2: Configure the DHCP server.
Device1# configure terminal
Device1(config)#interface vlan2
Device1(config-if-vlan2)#ip dhcp server
Device1(config-if-vlan2)#exit
Device1(config)#ip dhcp pool dynamic-pool
Device1(dhcp-config)#network 1.0.0.0 255.255.255.0
Device1(dhcp-config)#default-router 1.0.0.1
Device1(dhcp-config)#exit
|
#Configure the static route to the segment 1.0.0.0/24.
Device1(config)#ip route 1.0.0.0 255.255.255.0 2.0.0.2
|
Step 3: Configure the DHCP relay device Device2 and Option82 parameters.
#Configure the IP address of the DHCP relay server as 2.0.0.1.
Device2(config)#interface vlan3
Device2(config-if-vlan3)#ip dhcp relay
Device2(config-if-vlan3)#ip dhcp relay server-address 2.0.0.1
|
#Enable Option82, and configure the sub option remote-ID as 0102030405.
Device2(config)#ip dhcp relay information option
Device2(config)#ip dhcp relay information remote-id hex 0102030405
|
Step 4: Check the result.
Query the information of the IP address distributed for the client on Device1.
Device1#show ip dhcp pool danymic-pool1 lease
IP Address MAC Address Vendor Id Type Time Left(s)
------------- ---------------- ------------- ------- ----------
1.0.0.2 0001.7a6a.0268 Global Lease 107992
On the DHCP client, query one IP address of the segment 1.0.0.0/24 got by the network card.
On the DHCP server, capture the packet, and you can verify that the remote-id of option82 in the discover packet received by the server is 0102030405.
![note](/storage/images/Document/Maipu/note-icon.jpg)
-
After Option82 is enabled, its sub-option Circuit ID is filled with the receiving interface index and the system ID of the relay device.