VRF Lite is a networking feature that enables multiple virtual routing tables on a single router, allowing for overlapping IP addresses across different VPNs. This VRF Lite configuration is particularly useful for service providers to manage customer traffic securely and efficiently.
In this Cisco enterprise training article article, we will understand what is VRF lite and how to configure VRF lite in a Cisco Router. The VRF configuration is not only limited to Cisco applications but we have used Cisco router in the configuration example.
VRF Lite is a simplified version of Virtual Routing and Forwarding (VRF) that allows multiple virtual routing tables on a single router without requiring MPLS or MP-BGP.
It enables overlapping IP addresses across different VPNs, facilitating secure traffic segregation within enterprise networks or data centers, making it ideal for environments where multiple customers share the same infrastructure.
VRF (Virtual Routing and Forwarding) and VRF Lite are both technologies that allow for multiple routing instances within a single device, but they differ significantly in their implementation and use cases. The table below shows the difference between VRF and VRF Lite.
You can assign any interface of a router to a VRF using the command "ip vrf forwarding
Once configuration is done and assigned that particular interface in a VRF then all packets received on this interface are routed and forwarded using the associated VRF table. You can compare this concept to the way VLAN trunking works at Layer 2.
To understand the VRF Lite step-by-step configuration on Cisco routers, let's consider a scenario where two routers are connected via two physical links (these links can be sub-interfaces as well) but for simplicity
I have taken two physical links as shown in the below diagram. Based on the scenario some tasks are designed to configure respective VRFs and achieve a result.
● Configure the IP addresses on the two interfaces of R01 and R02 connected per the topology.
● Configure interface GigabitEthernet0/0 on both R01 and R02 so that it belongs to vrf VPN_A.
● Configure interface GigabitEthernet0/1 on both R01 and R02 so that it belongs to vrf VPN_B.
● Configure the following interfaces on R02:
✓ Loopback101 with IP address of 172.16.2.2/24, assigned to vrf VPN_A.
✓ Loopback102 with IP address of 192.168.2.2/24, assigned to vrf VPN_B (As a part of VRF lite configuration)
● Configure default routes on R02 for both VRFs toward R01.
● Configure R01 so that from R02, you have IP connectivity between Loopback101 and Loopback102.
Before moving to the Cisco VRF lite, ensure you have the IP addressing configured as per the diagram above. Here is the initial configuration for the same.
R01:
R02:
R01:
R02:
Start by checking the VRF interfaces and basic IPv4 connectivity. Notice that the verification commands now use the vrf argument to select the specific routing table.
Let’s look at inter-VRF connectivity in detail. First, check the CEF table for VRF VPN_A in R01
It appears accurate and complete. Now ping 172.16.2.2 from within VRF VPN_B in R02 and vice-versa.
VRF Lite operates by allowing packets entering a specific VRF to follow only the routes in that VRF's routing table. Similar to how a Layer 2 trunk spans multiple switches, VRF can extend across multiple devices.
By properly mapping VRFs to links between routers, it enables parallel VPNs across devices, making it the simplest method for creating non-overlapping VPNs in a network.
This configuration supports multiple customers on shared infrastructure while maintaining isolated routing tables for each VPN, enhancing security and efficiency.
Cisco VRF Lite has a limited scope of scalability due to its requirement for a dedicated inter-router link for each VPN. For instance, if you have two routers and need to support 100 VPNs, you must provision 100 connections between the routers—one for each VPN.
These connections can be established using separate interfaces or Layer 2 virtualization techniques, such as Frame-Relay PVC or Ethernet VLANs.
This design can lead to significant management overhead and complexity as the number of VPNs increases, making VRF Lite less suitable for larger-scale deployments compared to full VRF implementations that leverage MPLS.
In a router, all interfaces (physical or sub-interfaces) are in a global VRF by default which is the regular routing table used in non-VRF capable routers.
In a VRF (lite) capable router, you can create a new VRF by issuing the command "ip vrf
The primary purpose of a Route Distinguisher (RD) in VRF Lite is to distinguish prefixes within a router and avoid collisions if two VRFs contain the same prefixes. This is achieved by prepending an 8-byte RD to the 4-byte IPv4 prefix, creating a unique 12-byte VPNv4 address.
There are two common formats for configuring an RD:
1. ASN:NN format: Combines the Autonomous System Number (ASN) and a unique number (NN) representing the VRF within the router or the VPN within the ASN. This format is more popular and commonly used.
2. IP-Address:NN format: Uses the router's IP address and a unique number (NN) representing the VRF name. This format reflects the local significance of the RD, but the ASN:NN format is more widely adopted.
By assigning unique RDs to each VRF, VRF Lite ensures that even if two customers are using the same IPv4 address space, their prefixes are distinguished within the MPLS network, allowing for proper routing and forwarding of traffic
It is possible to associate static routes or dynamic routing protocol processes with the VRFs. In this lab, we work with static routing only. The syntax for a VRF-bound static route is ip route vrf
He is a senior solution network architect and currently working with one of the largest financial company. He has an impressive academic and training background. He has completed his B.Tech and MBA, which makes him both technically and managerial proficient. He has also completed more than 450 online and offline training courses, both in India and ...
More... | Author`s Bog | Book a MeetingWhy do require to use vrf lite anyways ?
Most of the cases it is not required however in some corner cases where you may require to extend your virtual routing table from one router to another then VRF lite is to be configured.
There may be a case when you do not have a budget to have other router for separate routing table then you can divide the router into multiple routing table using VRF and extend that to other router using vrf lite.
Great post with configuration scenario example. I do not have 2 physical links to connect two routers to each other. can this work with sub-interfaces i.e. if router interface is connected to a switch port as trunk port.
Hello Ankit, yes you can configure vrf lite using sub-interfaces of the routers but make sure you have enough bandwidth on these interfaces.