MPLS Scenario: Route Leaking between Global and VRF Routing Table

Today I am going to talk about one of the MPLS scenario where I will specifically talk about the route leaking between the Global and the VRF routing table. I can talk with the topology and the configuration showing how we can do it.

Route leaking between Global Routing Table (GRT) and Virtual Routing and Forwarding (VRF) table is quiet easy using static routes. You either provide the next-hop IP address (for multi-access segment) or point the route out of an interface (point-to-point interface). But in case if you are not using the next-hop IP address on a multi-access segment, route leaking becomes tricky as you cannot use static route.

Let's take an topology and then configure as per the network topology.

Fig 1.1- Network Topology
Below are the configuration on the routers as
!
ip prefix-list GLOBAL permit 10.10.10.0/24
!

The IP prefixes that are defined for import are then processed through a match clause in a route map. IP prefixes that pass through the route map are imported into the VRF.

!
 match ip address prefix-list GLOBAL
!

PBR can be used to leak routes between GRT and VRF. Following is a sample configuration where we are leaking a route from global routing table to VRF

!
ip vrf RED
 rd 1:1
 import ipv4 unicast map GLOBAL_TO_VRF 
!
ip route 10.10.30.0 255.255.255.0 Vlan20
!
ip vrf RouteXP
 rd 1:1
!
interface Vlan10
 description GLOBAL_INTERFACE
 ip address 10.10.10.254 255.255.255.0
!
access-list 101 permit ip 10.10.30.0 0.0.0.255 10.10.10.0 0.0.0.255
!
route-map VRF_TO_GLOBAL permit 10
 match ip address 101
 set global
!
interface Vlan20
 description VRF_RouteXP
 ip vrf forwarding RouteXP
 ip address 10.10.30.254 255.255.255.0
 ip policy route-map VRF_TO_GLOBAL
!

This works well for high end devices like 6500 switch but for devices like 3750, it is not supported. It is a platform limitation as you can see an the error message like :

RouteXP(config)#int vlan 20
RouteXP(config-if)#ip policy route-map VRF_TO_GLOBAL
RouteXP(config-if)#

Mar 21 02:02:48.758: %PLATFORM_PBR-3-UNSUPPORTED_RMAP: Route-map VRF_TO_GLOBAL not supported for Policy-Based Routing


VRF Receive feature can be used to insert the connected GRT subnet as a connected route entry in the VRF routing table.
!
ip vrf RED
 rd 1:1
!
interface Vlan10
 description GLOBAL_INTERFACE
 ip vrf select source
 ip vrf receive RouteXP
 ip address 10.10.10.254 255.255.255.0
end
!
interface Vlan20
 description VRF_RouteXP
 ip vrf forwarding RouteXP
 ip address 10.10.30.254 255.255.255.0
end
!

ip route 10.10.30.0 255.255.255.0 Vlan20