Virtual Routing and Forwarding (VRF) Meaning
Virtual routing and forwarding (VRF) is a technology that allows multiple instances of a routing table to co-exist within the same router at the same time.
Because the routing instances are independent, overlapping IP addresses can be used without conflicting with each other.
The multiple Routing instances can be made to traverse different path (ie take different outgoing interfaces).
VRFs are the same methods of network isolation/virtualization as VLANs.
Related – VLAN vs VRF
VLANs are used at the L2 and VRFs are L3 tools.VRFs are to routing table like VLANs are to LANs. Using Virtual routing and forwarding we are virtualizing routing table into multiple routing tables, similarly to VLANs used to virtualize LANs.
One could say that VLANs are performing L2 virtualization, VRFs are performing L3 virtualization. VLANs make a single switch look like several switches; Virtual routing and forwarding make a single router look like several routers.
VRF Flavours –VRF and VRF Lite
VRF has earned so much popularity in recent years due to its versatility in Data Centers, Corporate LANs and most importantly in Service provider domain. While we talk about Service providers running MPBGP in MPLS Cloud, VRF is one of the key ingredient responsible for routing multiple customer traffic across same underlying infrastructure. Using VRF in provider MPLS domain increases network security and also allows segregation of customer traffic over WAN even in scenarios of overlapping address space .
Considering the superb performance of VRF, its lighter version (VRF Lite) has been widely embraced in Data Center and Campus LAN environemnts. Unlike full blown VRF, VRF Lite does not require configuration of MPBGP including some pramaters like Route target etc. Infact, it is used in data centers to provide end to end segregation of traffic belonging to different zones likes DMZ, Extranet and Inside Zones. Such an approach has drastically reduced physical infrastructure requirements by using differeent Logical Routing tables (thanks to VRF Lite). It segreates traffic of various traffic zones without the need for dedicated physical devices to perform these tasks.
VRF in Networking : How is VRF configured?
Below scenario will help us understand how virtual routing and forwarding or vrf works in networking and logically separate traffic for multiple customers by having multiple routing tables for each customer VRF.
Related – VRF Route Leaking
In the diagram, PE is the Provider Router connected on FastEthernet 0/0 to C1 and C2 Routers where C1 is customer 1 Router (Allocation under Vlan RED) and C2 is customer 2 Router (Allocation under Vlan GREEN).
1st in order to configure 2 instances of Routing table (1 for the customer under RED instance and 1 for the customer under GREEN instance) we will allocate different VRF to both the customers and assign different RD values as below –
Next, configure subinterface for both the customers. In this case fa0/0.2 for RED vrf customer and fa0/0.3 for GREEN vrf customer. Please note, the IP address at PE end for both the Virtual routing and forwarding will remain the same ie 192.168.1.1.
Now since the configuration is complete, let’s perform the connectivity test.
1st ping from Customer 1 Router towards PE IP address 192.168.1.1 (RED VRF)
2nd ping from customer 2 Router towards PE IP address 192.168.1.1 (GREEN VRF)
Ping test from PE towards customer Routers
I hope I’ve explained myself well. The intent is share the concept of VRF lite and its related terms in simple and easy to understand terms.
To Understand more about What is VRF & understand more concepts of VRF in Networking watch our Video –