DHCP-Relay with different VRFs
This chapter explains about DHCP Relay package to make Relay talk to different VRFs when Client and Server are running in different VRFs.
DHCP Relay for IPv4 with different VRFs
Before configuring DHCP Relay, make sure DHCP server and client configurations are done.
Figure 32. DHCP Relay Configuration
DHCP Agent
#configure terminal |
Enter configure mode. |
(config)#feature dhcp |
Enable the feature dhcp. This is enabled in default. |
(config)#ipv4 dhcp relay |
By default this will be enabled. It starts the ipv4 dhcp relay service. |
(config)# ip vrf vrf1 |
Configure IP VRF |
(config)# ip dhcp relay address 10.10.10.2 global |
Configure DHCP relay address |
(config)#interface xe1 |
Enter interface mode. |
(config-if)#ip address 10.10.10.1/24 |
Configure ipv4 address on the interface xe1. |
(config-if)#ip dhcp relay uplink |
Configure relay uplink on the device connecting the server. |
(config-if)#exit |
Exit interface mode. |
(config)#commit |
Commit the candidate configuration to the running |
(config)#interface xe2 |
Enter interface mode. |
(config)#ip vrf forwarding vrf1 |
Configure IP VRF forwarding |
(config-if)#ip address 20.20.20.1/24 |
Configure ipv4 address on the interface xe2. |
(config-if)#ip dhcp relay |
Relay should be configured on the interface connecting to the client. |
(config-if)#exit |
Exit interface mode. |
(config)#commit |
Commit the candidate configuration to the running |
Validation Commands
#show running-config dhcp
interface eth0
ip address dhcp
!
ip vrf vrf1
ip dhcp relay address 10.10.10.2 global
!
interface xe2
ip dhcp relay
!
interface xe1
ip dhcp relay uplink
!
#show ip dhcp relay
DHCP relay service is Enabled. VRF Name: vrf1
Option 82: Disabled
DHCP Servers configured:
10.10.10.2 default
Interface Uplink/Downlink
xe2 Downlink
VRF Name: default
Interface Uplink/Downlink
xe1 Uplink
Incoming DHCPv4 packets which already contain relay agent option are FORWARDED
unchanged.
#show ip dhcp relay address
VRF Name: vrf1
DHCP Servers configured:
10.10.10.2 default
Incoming DHCPv4 packets which already contain relay agent option are FORWARDED unchanged.