OcNOS-DC 6.4.2 : Multi-Protocol Label Switching Guide : Multi-Protocol Label Switching Configuration Guide : DHCP Relay Agent Over L3VPN Configuration
DHCP Relay Agent Over L3VPN Configuration
The DHCP Relay feature was designed to forward DHCP broadcast requests as unicast packets to a configured DHCP server or servers for redundancy. In the L3VPN case, there is a special tunnel which gets created through which all the communication happens. In OcNOS, the interface created is named as tunmpls. This tunnel name is not exposed to the OcNOS control plane .This interface is directly created in the kernel.
DHCP Relay Over L3 VPN for IPv4
Before configuring DHCP Relay, make sure DHCP server and client configurations are done.
DHCP Relay Over L3 VPN Configuration
DHCP Client
 
#configure terminal
Enter the configure mode
(config)#interface xe2
Enter the interface mode.
(config-if)#ip address dhcp
Enable the DHCP on interface
(config-if)#commit
Commit the candidate configuration to the running configuration
 
 
 
PE1(DHCP Relay Agent)P
#configure terminal
Enter the configure mode.
(config)#ip dhcp relay
By default this is enabled. It starts the IP DHCP relay service
(config)#ip vrf vrf1
Configuring non default VRF1
(config-vrf)# rd 10:10
Assign a route distinguisher to VRF
(config-vrf)# route-target both 10:10
Configure a route target for VRF1
(config-vrf)#ip dhcp relay address 11.11.0.1
Configure the DHCP server address.
(config-vrf)# ip dhcp relay uplink l3vpn
Configure the IPv4 DHCP Relay over L3VPN.
(config)#interface xe4
Enter the interface mode
(config-if)#ip vrf forwarding vrf1
Configure VRF forwarding for VRF1
(config-if)#ip address 50.50.50.1/24
Add the IP address.
(config-if)#ip dhcp relay
Configure DHCP relay for the interface connecting to client.
(config-if)#exit
Exit from the interface mode
(config)#interface lo
Enter the interface mode
(config-if)#ip address 1.1.1.1/32 secondary
Set an IP address on the interface
(config-if)#exit
Exit from the interface mode
(config)#router ldp
Enter the router LDP mode
(config-router)#router-id 1.1.1.1
Configure an LDP router ID
(config-router)#exit
Exit from the router LDP mode
(config)#interface xe1
Enter the interface mode
(config-if)# ip address 10.1.1.1/24
Add an IP address
(config-if)# label-switching
Enable the label switching on the interface
(config-if)# enable-ldp ipv4
Enable theIPv4 LDP configuration on the interface.
(config-if)#exit
Exit from the interface mode
(config)#router ospf 100
Enter the router OSPF mode.
(config-router)#network 1.1.1.1/32 area 0.0.0.0
Advertise the loopback address in OSPF.
(config-router)#network 10.1.1.0/24 area 0.0.0.0
Advertise the network address in OSPF.
(config-router)#exit
Exit the router OSPF mode and return to Configure mode.
(config)# router bgp 100
Enter the router BGP mode, ASN: 100
(config-router)# bgp router-id 1.1.1.1
Configure a fixed Router ID (1.1.1.1)
(config-router)# neighbor 3.3.3.3 remote-as 100
Configuring PE2 as iBGP neighbor using it's loopback IP
(config-router)# neighbor 3.3.3.3 update-source lo
Source of routing updates as loopback
(config-router)# address-family ipv4 unicast
Enter into the IPV4 unicast address family
(config-router-af)# neighbor 3.3.3.3 activate
Activate the neighbor in the IPV4 address family
(config-router-af)#exit
Exit the address family mode
(config-router)# address-family vpnv4 unicast
Enter into the address family mode as vpnv4
(config-router-af)# neighbor 3.3.3.3 activate
Activate the neighbor in the VPNv4 address family
(config-router-af)#exit
Exit of Address family mode
(config-router)# address-family ipv4 vrf vrf1
Enter into the address family mode as IPV4 VRF1
(config-router-af)# redistribute connected
Redistribute connected routes
(config-router-af)#exit
Exit the address family mode
(config-router)# commit
Commit the candidate configuration to the running configuration
P
#configure terminal
Enter the configure mode
(config)#interface lo
Enter the interface mode
(config-if)#ip address 2.2.2.2/32 secondary
Set an IP address on the interface
(config-if)#exit
Exit from interface mode
(config)#router ldp
Enter the Router LDP mode.
(config-router)#router-id 2.2.2.2
Configure an LDP router ID.
(config-router)#exit
Exit from the router LDP mode
(config)#interface xe14
Enter the interface mode
(config-if)# ip address 20.1.1.1/24
Add an IP address
(config-if)# label-switching
Enable the label switching on the interface
(config-if)# enable-ldp ipv4
Enable IPv4 LDP configuration on the interface.
(config-if)#exit
Exit from the interface mode
(config)#interface xe1
Enter the interface mode
(config-if)# ip address 10.1.1.2/24
Add an IP address.
(config-if)# label-switching
Enable label switching on the interface
(config-if)# enable-ldp ipv4
Enable IPv4 LDP configuration on the interface.
(config-if)#exit
Exit from the interface mode
(config)#router ospf 100
Enter the Router OSPF mode.
(config-router)#network 3.3.3.3/32 area 0.0.0.0
Advertise the loopback address in OSPF.
(config-router)#network 20.1.1.0/24 area 0.0.0.0
Advertise the network address in OSPF.
(config-router)#network 10.1.1.0/24 area 0.0.0.0
Advertise the network address in OSPF.
(config-router)#exit
Exit the router OSPF mode and return to configure mode
(config)# commit
Commit the candidate configuration to the running configuration
PE2
#configure terminal
Enter the configure mode
(config)#ip vrf vrf1
Configure a non default VRF1
(config-vrf)# rd 10:10
Assign a route distinguisher to VRF
(config-vrf)# route-target both 10:10
Configure a route target for vrf1.
(config)#interface xe48
Enter the interface mode.
(config-if)#ip vrf forwarding vrf1
Configure VFR forwarding for VRF1
(config-if)# commit
Commit the candidate configuration
(config-if)#ip address 11.11.0.2/24
Add an IP address
(config-if)#exit
Exit from the interface mode
(config)#interface lo
Enter the interface mode
(config-if)#ip address 3.3.3.3/32 secondary
Set an IP address on the interface
(config-if)#exit
Exit from interface mode
(config)#router ldp
Enter the router LDP mode
(config-router)#router-id 3.3.3.3
Configure an LDP router ID.
(config-router)#exit
Exit from the router LDP mode
(config)#interface xe14
Enter the interface mode
(config-if)# ip address 20.1.1.2/24
Add an IP address
(config-if)# label-switching
Enable label switching on the interface
(config-if)# enable-ldp ipv4
Enable IPv4 LDP configuration on the interface
(config-if)#exit
Exit from the interface mode
(config)#router ospf 100
Enter the router OSPF mode
(config-router)#network 3.3.3.3/32 area 0.0.0.0
Advertise the loopback address in OSPF
(config-router)#network 20.1.1.0/24 area 0.0.0.0
Advertise the network address in OSPF
(config-router)#exit
Exit router OSPF mode and return to Configure mode
(config)# router bgp 100
Enter the router BGP mode, ASN: 100
(config-router)# bgp router-id 3.3.3.3
Configure a fixed Router ID (3.3.3.3)
(config-router)# neighbor 1.1.1.1 remote-as 100
Configure PE1 as iBGP neighbor using it's loopback IP
(config-router)# neighbor 1.1.1.1 update-source lo
Source the routing updates as loopback
(config-router)# address-family ipv4 unicast
Enter into the IPV4 unicast address family
(config-router-af)# neighbor 1.1.1.1 activate
Activate the neighbor in the IPV4 address family
(config-router-af)#exit
Exit the address family mode
(config-router)# address-family vpnv4 unicast
Enter into address family mode as vpnv4
(config-router-af)# neighbor 1.1.1.1 activate
Activate the neighbor in the vpnv4 address family
(config-router-af)#exit
Exit the address family mode
(config-router)# address-family ipv4 vrf vrf1
Enter into the address family mode as ipv4 vrf vrf1
(config-router-af)# redistribute connected
Redistribute connected routes.
(config-router-af)#exit
Exit of address family mode
(config-router)# commit
Commit the candidate configuration to the running configuration
 
Validation
 
PE1 (DHCP Relay Agent)
PE1#show running-config dhcp
ip vrf vrf1
ip dhcp relay address 11.11.0.1
ip dhcp relay uplink l3vpn
interface xe4
ip dhcp relay
 
PE1#show ip dhcp relay
DHCP relay service is Enabled.
VRF Name: vrf1
Option 82: Disabled
DHCP Servers configured: 11.11.0.1
 
Interface Uplink/Downlink
--------- -------------
xe4 Downlink
l3vpn uplink
Incoming DHCPv4 packets which already contain relay agent option are FORWARDED u
nchanged.
PE1#show ip dhcp relay address
VRF Name: vrf1
DHCP Servers configured: 11.11.0.1
 
Incoming DHCPv4 packets which already contain relay agent option are FORWARDED u
nchanged.
 
DHCP Client
 
#show ip interface brief | include xe2
xe5 *50.50.50.2 up up
 
 
 
DHCP Relay Over L3 VPN for IPv6
Before configuring DHCP Relay, make sure DHCP server and client configurations are done.
.
DHCP Relay Over L3 VPN Configuration
 
DHCP Client
 
#configure terminal
Enter the configure mode
(config)#interface xe2
Enter the interface mode
(config-if)#ipv6 address dhcp
Enable DHCP on interface
(config-if)#commit
Commit the candidate configuration to the running configuration
PE1(DHCP Relay Agent)
#configure terminal
Enter the configure mode.
(config)#ipv6 dhcp relay
By default this will be enabled. It starts the ipv6 dhcp relay service
(config)#ip vrf vrf1
Configure non default VRF1
(config-vrf)# rd 10:10
Assign a route distinguisher to VRF
(config-vrf)# route-target both 10:10
Configure a route target for vrf1.
(config-vrf)# ipv6 dhcp relay address 2002::1
Configure the DHCP server address.
(config-vrf)# ipv6 dhcp relay uplink l3vpn
Configure IPv6 DHCP Relay over L3VPN.
(config)#interface xe4
Enter the interface mode.
(config-if)#ip vrf forwarding vrf1
Configure VRF forwarding for VRF1
(config-if)# ipv6 address 2001::1/64
Add IPv6 address.
(config-if)#ipv6 dhcp relay
Configure DHCP relay for the interface connecting to client.
(config-if)#exit
Exit from the interface mode
(config)#interface lo
Enter the interface mode
(config-if)#ip address 1.1.1.1/32 secondary
Set an IP address on the interface
(config-if)#exit
Exit from the interface mode
(config)#router ldp
Enter the router LDP mode
(config-router)#router-id 1.1.1.1
Configure an LDP router ID
(config-router)#exit
Exit from the router LDP mode
(config)#interface xe1
Enter the interface mode
(config-if)# ip address 10.1.1.1/24
Add IP address
(config-if)# label-switching
Enable label switching on the interface
(config-if)# enable-ldp ipv4
Enable IPv4 LDP configuration on the interface.
(config-if)#exit
Exit from the interface mode
(config)#router ospf 100
Enter the router OSPF mode.
(config-router)#network 1.1.1.1/32 area 0.0.0.0
Advertise loopback address in OSPF
(config-router)#network 10.1.1.0/24 area 0.0.0.0
Advertise network address in OSPF
(config-router)#exit
Exit the router OSPF mode and return to Configure mode.
(config)# router bgp 100
Enter the Router BGP mode, ASN: 100
(config-router)# bgp router-id 1.1.1.1
Configure a fixed Router ID (1.1.1.1)
(config-router)# neighbor 3.3.3.3 remote-as 100
Configure PE2 as iBGP neighbor using it's loopback IP
(config-router)# neighbor 3.3.3.3 update-source lo
Source of routing updates as loopback
(config-router)# address-family ipv4 unicast
Enter into the IPV4 unicast address family
(config-router-af)# neighbor 3.3.3.3 activate
Activate the neighbor in the IPV4 address family
(config-router-af)#exit
Exit the address family mode
(config-router)# address-family vpnv4 unicast
Enter into the address family mode as VPN4
(config-router-af)# neighbor 3.3.3.3 activate
Activate the neighbor in the VPN4 address family
(config-router-af)#exit
Exit the address family mode
(config-router)# address-family vpnv6 unicast
Enter into the address family mode as VPNv6
(config-router-af)# neighbor 3.3.3.3 activate
Activate the neighbor in the vpnv6 address family
(config-router-af)#exit
Exit the address family mode
(config-router)# address-family ipv4 vrf vrf1
Enter into the address family mode as ipv4 vrf vrf1
(config-router-af)# redistribute connected
Redistribute connected routes.
(config-router-af)#exit
Exit the address family mode
(config-router)# address-family ipv6 vrf vrf1
Enter into the address family mode as IPV6 VRF1
(config-router-af)# redistribute connected
Redistribute connected routes.
(config-router-af)#exit
Exit the address family mode
(config-router)# commit
Commit the candidate configuration to the running configuration
 
P
#configure terminal
Enter the configure mode
(config)#interface lo
Enter the interface mode
(config-if)#ip address 2.2.2.2/32 secondary
Set an IP address on the interface
(config-if)#exit
Exit from the interface mode
(config)#router ldp
Enter the router LDP mode
(config-router)#router-id 2.2.2.2
Configure an LDP router ID
(config-router)#exit
Exit from the router LDP mode
(config)#interface xe14
Enter the interface mode
(config-if)# ip address 20.1.1.1/24
Add an IP address.
(config-if)# label-switching
Enable the label switching on the interface
(config-if)# enable-ldp ipv4
Enable the IPv4 LDP configuration on the interface
(config-if)#exit
Exit from the interface mode
(config)#interface xe1
Enter the interface mode
(config-if)# ip address 10.1.1.2/24
Add an IP address.
(config-if)# label-switching
Enable the label switching on the interface
(config-if)# enable-ldp ipv4
Enable the IPv4 LDP configuration on the interface.
(config-if)#exit
Exit from the interface mode
(config)#router ospf 100
Enter the router OSPF mode.
(config-router)#network 3.3.3.3/32 area 0.0.0.0
Advertise the loopback address in OSPF
(config-router)#network 20.1.1.0/24 area 0.0.0.0
Advertise the network address in OSPF.
(config-router)#network 10.1.1.0/24 area 0.0.0.0
Advertise the network address in OSPF.
(config-router)#exit
Exit the router OSPF mode and return to configure mode
(config)# commit
Commit the candidate configuration to the running configuration
 
PE2
#configure terminal
Enter the configure mode.
(config)#ip vrf vrf1
Configure non default VRF1
(config-vrf)# rd 10:10
Assign a route distinguisher to VRF
(config-vrf)# route-target both 10:10
Configure a route target for VRF1
(config)#interface xe48
Enter the interface mode.
(config-if)#ip vrf forwarding vrf1
Configure VRF forwarding for VRF1
(config-if)# commit
Commit the candidate configure
(config-if)# ipv6 address 2002::2/64
Add the IPv6 address
(config-if)#exit
Exit from the interface mode
(config)#interface lo
Enter the interface mode
(config-if)#ip address 3.3.3.3/32 secondary
Set an IP address on the interface
(config-if)#exit
Exit from the interface mode
(config)#router ldp
Enter the Router LDP mode.
(config-router)#router-id 3.3.3.3
Configure an LDP router ID.
(config-router)#exit
Exit from the router LDP mode
(config)#interface xe14
Enter theinterface mode
(config-if)# ip address 20.1.1.2/24
Add an IP address.
(config-if)# label-switching
Enable the label switching on the interface
(config-if)# enable-ldp ipv4
Enable the IPv4 LDP configuration on the interface.
(config-if)#exit
Exit from the interface mode
(config)#router ospf 100
Enter the router OSPF mode
(config-router)#network 3.3.3.3/32 area 0.0.0.0
Advertise the loopback address in OSPF
(config-router)#network 20.1.1.0/24 area 0.0.0.0
Advertise the network address in OSPF
(config-router)#exit
Exit router OSPF mode and return to Configure mode
(config)# router bgp 100
Enter the router BGP mode, ASN: 100
(config-router)# bgp router-id 3.3.3.3
Configure a fixed router ID (3.3.3.3)
(config-router)# neighbor 1.1.1.1 remote-as 100
Configure the PE1 as iBGP neighbor using it's loopback IP
(config-router)# neighbor 1.1.1.1 update-source lo
Source the routing updates as loopback
(config-router)# address-family ipv4 unicast
Enter into the IPV4 unicast address family
(config-router-af)# neighbor 1.1.1.1 activate
Activate the neighbor in the IPV4 address family
(config-router-af)#exit
Exit the of Address family mode
(config-router)# address-family vpnv4 unicast
Enter the into address family mode as vpnv4
(config-router-af)# neighbor 1.1.1.1 activate
Activate the neighbor in the vpnv4 address family
(config-router-af)#exit
Exit the address family mode
(config-router)# address-family vpnv6 unicast
Enter into the address family mode as vpnv6
(config-router-af)# neighbor 1.1.1.1 activate
Activate the neighbor in the VPNv6 address family
(config-router-af)#exit
Exit the address family mode
(config-router)# address-family ipv4 vrf vrf1
Enter into the address family mode as IPv4 VRF1
(config-router-af)# redistribute connected
Redistribute connected routes
(config-router-af)#exit
Exit the address family mode
(config-router)# address-family ipv6 vrf vrf1
Enter into the address family mode as IPV6 VRF1
(config-router-af)# redistribute connected
Redistribute connected routes
(config-router-af)#exit
Exit the address family mode
(config-router)# commit
Commit the candidate configuration to the running configuration
 
Validation
PE1 (DHCP Relay Agent)
PE1#show running-config dhcp
ip vrf vrf1
ipv6 dhcp relay address 2002::1
ipv6 dhcp relay uplink l3vpn
interface xe4
ipv6 dhcp relay
 
PE1#show ipv6 dhcp relay
IPv6 DHCP relay service is Enabled.
VRF Name: vrf1
Option 82: Enabled
DHCPv6 Servers configured: 2002::1
DHCPv6 IA_PD Route injection: Disabled
Interface Uplink/Downlink
--------- -------------
xe4 Downlink
l3vpn uplink
PE1#show ip dhcp relay address
VRF Name: vrf1
DHCPv6 Servers configured: 2002::1
 
DHCP Client
#show ipv6 interface brief | include xe2
xe5 *2001::200 up up