VRF: Virtual Routing & Forwarding

Introduction: What is VRF

Virtual routing and forwarding (VRF) is a technology included in IP (Internet Protocol) network routers that allows multiple instances of a routing table to exist in a router and work simultaneously. This increases functionality by allowing network paths to be segmented without using multiple devices. Because traffic is automatically segregated, VRF also increases network security and can eliminate the need for encryption and authentication. Internet service providers (ISPs) often take advantage of VRF to create separate virtual private networks (VPNs) for customers; thus the technology is also referred to as VPN routing and forwarding.

VRF acts like a logical router, but while a logical router may include many routing tables, a VRF instance uses only a single routing table. In addition, VRF requires a forwarding table that designates the next hop for each data packet, a list of devices that may be called upon to forward the packet, and a set of rules and routing protocols that govern how the packet is forwarded. These tables prevent traffic from being forwarded outside a specific VRF path and also keep out traffic that should remain outside the VRF path.

VRFs come handy in a lot of scenarios. A few can be:

Shared datacenters. The datacenter provider can use VRFs to reduce the number of device involved. Eg. If the datacenter is hosting three different customers (that use similar IP subnets) then there might be a need to three different routers.


But if VRF is used, then only one router can be used .

ISP.  ISPs provide links between sites of multiple customers. By the use of VRF it is possible to use the same infrastructure for multiple customer

Without VRF

With VRF


The concept

Each VRF acts as a separate router. Each router will have its own interfaces and its own routing table. The routes in the routing table of one VRF are not visible in any other VRF neither in the global routing table.


A tag is added to each route. This tag is called a Route Distinguisher. This RD is appended to each route making it unique, hence same address spaces can be used in multiple VRFs