VRF Lite Configuration on Cisco IOS

This topic is to discuss the following lesson:

1 Like

Hi Rene,

Thank you for your efforts. I was waiting for VRF tutorial for a long time. You have explained this clearly. BTW, do you have plan to upload Inter-VRF routing with MP-BGP ? :slight_smile:

Hi Ronie,

You are welcome, glad you like it. I’ll add inter-VRF routing with MP-BGP / MPLS for sure :slight_smile:



Congrats for share this excellent explanation!!! I’m from Brazil and I don’t have a good English, but I can understand each word, sentence that you used in this article. I never had understood about this subject, maybe because I really didn’t study it with attention and deeply. I’m a beginner Network Admin and when I saw this article in my feed I started to read it and understand it and I’m amazing how you can teach it like this way.

But I have a doubt where I can’t see in examples above. Using this topology, if tomorrow for any reason Blue and Red make a partnership and decide them share your resource between hosted at Blue1 and Red2. How could ISP route the traffic between them?Maybe this article contain the answer, but I can see it.

Again, Thanks for share your knowledge, keep it and go ahead!!!

P.S: Sorry for my English mistakes, but I’m not a native English speaker.


Hi Gabriel,

I’m glad to hear that you like it! Your question is a good one. If you want to use “shared services” between VRFs then there are two solutions:

  1. You can use MP-BGP to exchange routes between VRFs.
  2. Use EVN: http://networklessons.com/cisco/cisco-evn-easy-virtual-network/

I’ll create some examples for MP-BGP.



Thanks your attention!!! I’ll study more about this concept.

Please, keep this excellent job!


Glad to hear you like it!

I am eager to see ur article regarding this subject as well. :slight_smile:


Thanks for this Rene, a very detailed explanation. i also simulate this and it’s much easier to understand.
Just a question, i just tried something on what will happened and correct me if im wrong on this one, the 4 connected routers are in VRF right? Blue and Red, 2 of each. On ISP router, i tried to input the command " router ospf 1" and it gives me an error of:

%OSPF-4-NORTRID: OSPF process 1 failed to allocate unique router-id and cannot start

what it means is, it cant locate a router ID right? so on this one, OSPF locates router ID through the global routing table?

So when i input the correct one “router ospf 1 vrf BLUE”, the ospf process 1 will get the router-id based on the VRF BLUE table right?


1 Like

Hi John,

I think you got it :slight_smile:

The interfaces of the ISP router are all in VRFs, there’s nothing left in the global routing table now. When you do a regular “router ospf” then it’s for the global routing table and since there are no IP addresses there, OSPF will tell you that it can’t pick a router ID.

When you use “router ospf vrf” then it will start the process only for that VRF.


Thanks Rene, im now studying EVN, and you mention that

“When we use VRF lite we have to configure sub-interfaces for each VRF on the Gigabit3 interfaces of ISP1 and ISP2. Each sub-interface belongs to a different VRF and uses 802.1Q encapsulation to differentiate the different VRFs.”

but there’s no scenario here in VRF lite where you configure 2 ISP and have a subinterface both on each.

1 Like

Hi John,

I think you already figured it out but just in case someone else reads it…:slight_smile: In this example, I used some physical interfaces to show how VRFs work. In reality however an ISP might have a lot of sub-interfaces that will be used in VRFs.

This is one of the “sales” pitches of EVN, it automatically creates the sub-interfaces with the correct tags and everything. In the EVN example I do have the two ISP routers.


Excellent stuff!

Thanks Rene, great tutorial.

Let us know when you do a tutorial for MP-BGP, that is of particular interest to me as we will become responsible for a network using MP-BGP in the near future.



Hi Rene, I found the MP-BGP tutorial @ https://networklessons.com/bgp/multiprotocol-bgp-mp-bgp-configuration/ so no need to follow up on this one :slight_smile:

Hi Ian,

Good to hear you found it, if you want to see some more MP-BGP in action, take a look at some of the MPLS VPN lessons.


A few notes on this lab, beginner steps that someone (like myself) might get tripped up on.

Make sure your interfaces are UP.

(config) interface fastethernet 0/0
(config) no shutdown

If you don’t have any UP interfaces, well common sense. Things don’t work, you can’t ping also you might not have a source address to ping from!

You will get error: % VRF Blue does not have a usable source address

You can add loopbacks into your VRF, if you don’t have enough real interfaces on your router.

(config) interface loopback 0/0
(config -if) ip vrf forwarding red
(config -if) ip address

Hi Rene,
Can you also explain internet access via VRF lite.

Hi Rene,

I have to ask one question for this VF life. As per lab design, Now i want to communicate red customer and blue customer. Because I want to use one router in our network and i will create two vrf in this router. At this time, some of user need to communicate with another vrf user (inter vrf routing). Is it possible for my design?


Hi Mark,

There are two options for inter VRF routing:

  • You can use MP-BGP and import/export, this is pretty much the same as what I did in my MPLS VPN examples. You can do this without MPLS though.
  • You could use static routes that "leak" from the VRF into the global routing table.
  • If you want to use a routing protocol like OSPF within your VRFs then you should use BGP to import/export the routes between VRFs.

    Let me know if you need an example for this.