#

Sunday, June 7, 2020

Inter VRF Routing using Simple Static Routes

Inter VRF routing can be achieved by several methods. Following are 6 ways you can do it. There can be some more methods but most commonly you will see one of the following methods in your network.

1. Using static routes
2. Using route maps
3. Import - Export Policies plus Multi-Protocol BGP
4. Connecting two interfaces which belongs to two VRFs
5. Pointing traffic to a Firewall
6. Inter VRF Tunneling

Go here to know how to do inter VRF routing using route maps.
Go here to know how to do inter VRF routing using import export policies.
Go here to know how to do inter VRF tunneling.

In this post I am doing it using simple static routes & his is the most simple method of doing it.

Adding following 2 routes to R2 will do it.

ip route vrf VRF-1 172.16.1.0 255.255.255.0 Ethernet0/1 172.16.1.1
ip route vrf VRF-2 192.168.1.0 255.255.255.0 Ethernet0/0 192.168.1.1

If you are leaking routes between VRFs you must always have a next hop and it cannot be the same router which does the inter VRF routing.


Commands will be like the following..

ip route 192.168.1.0 255.255.255.0 Ethernet0/0 192.168.1.1
ip route vrf VRF-1 172.16.1.0 255.255.255.0 Ethernet0/1 172.16.1.1

Note that in this situation pings originating from default VRF of R2 to the VRF-1 will fail if the source is not specified in the command.









The reason for this that the ping 192.168.1.1 will be sourced from 192.168.1.2 which is not the default VRF.

But traffic from R1 to R3 will flow without issue.

If one of the VRFs is the default VRF, you don't need to specify the next hop for a route but if you do not specify the next hop, you need to remove the source address in the ping command when you ping your own interface which is not in default VRF.

If the commands are like the following;

ip route 192.168.1.0 255.255.255.0 Ethernet0/0
ip route vrf VRF-1 172.16.1.0 255.255.255.0 Ethernet0/1 172.16.1.1

the result will be like in the below captures..


1 comment:

  1. Wagering on pro and faculty sports grew to become legal in September of 2019 with both mobile and in-person betting permitted at multiple of} places. Online sports betting was legalized in Pennsylvania in 2017 and has been rising in recognition ever since. But health experts warn this game-day behavior might rapidly turn out to be an dependancy with long-term health consequences. But as sports betting turns into pervasive—in brick-and-mortar betting parlors and, usually, for anyone with a 우리카지노 cell phone—state playing dependancy providers are underfunded, Whyte and state administrators say, and their focus is on adults.

    ReplyDelete