DHCP Relay option 82
This section contains examples of DHCP Dynamic Host Configuration Protocol Relay option-82 configuration. DHCP option 82 (Agent Information Option) provides additional security when DHCP is used to allocate network addresses. It enables the DHCP relay agent
A DHCP relay forwards the request from a DHCP client to the DHCP server group and takes the response from the DHCP server group to the DHCP client. to prevent DHCP client
A DHCP client is a hardware device or software that uses DHCP to get the network configuration information from a DHCP Server.
VRF: VRF creates a logically isolated routing table within a single physical network device. Each VRF instance works as an independent routing instance that enables separate network traffic, maintains different routing tables, and provides network isolation. requests from untrusted sources. Service Providers use remote identifier (option 82 sub option 2) for troubleshooting, authentication, and accounting. The DHCP Option 82 Remote ID Format feature adds support for the interpretation of remote-IDs that are inserted by end users. On the relay agent, you can configure information option to add option 82 information to DHCP requests from the clients before forwarding the requests to the DHCP server. When configured with option 82 and remote-id, the server will receive the DHCP request packet with Agent Circuit ID and remote-id.
The two examples below, show how to configure the DHCP Relay option 82:
- Configuration of DHCP Relay option 82 on a physical interface with Agent information and remote-id.
- Configuration of DHCP Relay option 82 on a VLAN interface with Agent information and remote-id.
Topology
Figure 30. DHCP Option 82 interface topology
Physical Interface Configuration
Here, the DHCP Server is running with IP 192.168.1.2 with another pool of subnet 10.10.20.0 configured in the server. Configure a static route to 10.10.20.0 network for DHCP OFFER
packets to reach the Relay Agent.
Relay agent
#configure terminal |
Enter configure mode. |
(config)#ip dhcp relay |
Enable DHCP Relay |
(config)#ip dhcp relay address 192.168.1.2 |
The relay address configured should be server interface address connected to DUT machine
|
(config)#ip dhcp relay information option remote-id hostname |
Enable DHCP Relay information option with both agent circuit id which is sub option 1 of option 82 and remote-id which is sub option 2 of option 82. String support is also provided for remote-id. |
(config)#interface xe5 |
Enter interface mode. |
(config-if)#ip address 10.10.20.2/24 |
Add IP address |
(config-if)#ip dhcp relay |
Configure DHCP relay for the interface connecting to client. |
(config-if)#exit |
Exit from interface mode |
(config)#commit
|
Commit the candidate configuration to the running configuration |
(config)#interface xe4 |
Enter interface mode |
(config-if)#ip address 192.168.1.1/24 |
Configure ipv4 address on the interface xe4 |
(config-if)#ip dhcp relay uplink |
Configure DHCP relay uplink for the interface connecting to server. |
(config-if)#exit |
Exit interface mode. |
(config)#commit
|
Commit the candidate configuration to the running configuration |
Client
#configure terminal |
Enter configure mode. |
(config)#interface xe5 |
Enter interface mode. |
(config-if)#ip address dhcp |
Configure IP address DHCP |
(config-if)#exit |
Exit from interface mode |
(config)#commit
|
Commit the candidate configuration to the running configuration |
Validation
Relay Agent
#show running-config dhcp
!
ip dhcp relay information option remote-id hostname
ip dhcp relay address 192.168.1.2
interface xe5
ip dhcp relay
!
interface xe4
ip dhcp relay uplink
!
#show ip dhcp relay
DHCP relay service is Enabled.
VRF Name: default
Option 82: Enabled
Remote Id: OcNOS
DHCP Servers configured: 192.168.1.2
Interface Uplink/Downlink
--------- -------------
xe5 Downlink
xe4 Uplink
Client
#show ip interface brief | include xe5
xe5 *10.10.20.10 up up
Packet captured at DHCP Server
Bootstrap Protocol (Discover)
Message type: Boot Request (1)
Hardware type: Ethernet (0x01)
Hardware address length: 6
Hops: 1
Transaction ID: 0x4e61176c
Seconds elapsed: 0
Bootp flags: 0x0000 (Unicast)
0... .... .... .... = Broadcast flag: Unicast
.000 0000 0000 0000 = Reserved flags: 0x0000
Client IP address: 0.0.0.0 (0.0.0.0)
Your (client) IP address: 0.0.0.0 (0.0.0.0)
Next server IP address: 0.0.0.0 (0.0.0.0)
Relay agent IP address: 10.10.20.2 (10.10.20.2)
Client MAC address: b8:6a:97:35:d7:9d (b8:6a:97:35:d7:9d)
Client hardware address padding: 00000000000000000000
Server host name not given
Boot file name not given
Magic cookie: DHCP
Option: (53) DHCP Message Type (Discover)
Length: 1
DHCP: Discover (1)
Option: (55) Parameter Request List
Length: 3
Parameter Request List Item: (1) Subnet Mask
Parameter Request List Item: (28) Broadcast Address
Parameter Request List Item: (3) Router
Option: (60) Vendor class identifier
Length: 39
Vendor class identifier: onie_vendor:x86_64-accton_as7326_56x-r0
Option: (82) Agent Information Option
Length: 12
Option 82 Suboption: (1) Agent Circuit ID
Length: 3
Agent Circuit ID: 786535
Option 82 Suboption: (2) Agent Remote ID
Length: 5
Agent Remote ID: 4f634e4f53
Option: (255) End
Option End: 255
Padding