What is VRF (Virtual Routing and Forwarding)?
VRF creates multiple, isolated virtual routers inside a single physical router. Each VRF instance has:
- Its own independent routing table
- Its own set of assigned interfaces
- No knowledge of other VRFs or the global routing table
Think of VRFs as the router equivalent of VLANs on a switch, they virtually slice the hardware into separate, secure segments. For a foundational understanding of how this fits into the bigger picture, see this guide on MPLS Explained: What Is Multi-Protocol Label Switching? (Simple Guide).
VRF Example: Red and Blue
- Blue VRF: Contains interfaces GigabitEthernet 0/1 and 0/2, with its own routing table.
- Red VRF: Contains interfaces GigabitEthernet 0/3 and 0/4, with a completely separate routing table.
- Global/Default VRF: Any interface not explicitly assigned to a VRF (e.g., GigabitEthernet 0/0) belongs here.
By default, traffic cannot route between VRFs. If a packet arrives on a Red interface destined for a Blue IP, the router drops it because Red’s routing table has no matching route.
VRF isolation is so complete that you can assign the same IP address to two different interfaces, as long as they belong to different VRFs.
VRF in MPLS Networks
In an MPLS network, VRFs are configured only on PE (Provider Edge) routers. P (Provider) routers, the core switches, handle label switching and have no knowledge of VRFs. To understand the roles of these devices better, check out MPLS Labels, Device Roles & LDP Protocol Explained Simply.
How MPLS Uses VRFs for Customer Isolation
- Customer Sites are Assigned VRFs: On PE routers, each customer connection is placed into a unique VRF (e.g., Green, Blue, Orange).
- Customers Use Overlapping IPs: Because VRFs are independent, two different customers can use the same private IP addresses without conflict, even on the same PE router.
- MP-BGP Shares VRF Info: PE routers use Multiprotocol BGP (MP-BGP) to advertise VRF information to each other. This allows labels to be applied so traffic from CE1 reaches CE2 through the correct VRF. For a deeper look at how BGP functions in this context, see How BGP Is Used in the MPLS Core: Edge Routing Explained.
Upcoming Topics for Full MPLS L3VPN Setup
To complete the MPLS VPN solution, the next video will cover:
- Route Distinguisher (RD): Makes overlapping customer routes unique across the network. These concepts are explained further in MPLS VPNs: RD, RT & VPNv4 Routes Explained Simply.
- Route Target (RT): Controls which VRFs import and export routes.
- VPNv4 Routes: The BGP address family used to carry labeled VRF routes between PEs.
A deep dive into the label distribution process can be found at LDP in MPLS: Label Distribution Protocol Simply Explained.
hello this is Lazarus at Telecom Tech where Telecom and networking Technologies are simply explained today
we'll be simply explaining virtual rooting and forwarding in the context of MLS if you haven't already done so don't
forget to subscribe and enable notifications and don't forget to like this video If you like this video
there's much more to come so this way you can stay tuned now as I mentioned before MLS is a technology that is
rarely implemented alone it is deployed in combination with various other Technologies and protocols to deliver
its innovative and flexible capabilities one of those features that is closely related to MLS and is often deployed
with it are vrfs now vrf stands for virtual rooting and forwarding a vrf instance can be
thought of as a separate rooting domain within the same rooting Hardware Ware each vrf that is configured within a
router has its own rooting table and individual interfaces on such a router are assigned to a particular vrf you can
think of vrfs as a virtual slicing up of a router resulting in multiple individual virtual routers within your
physical Hardware now what do vrfs look like well this diagram here will help us to further visualize vrfs and how they
work here we have a router with four interfaces and we have two vrfs configured on this router we can name
our vrfs whatever we want but I'll call mine red and blue you'll find that colors are often used to name vrfs but
you can use whatever you want now gigabit Ethernet 01 and 02 belong to the vrf called Blue while 03 and 04 belong
to the vrf called red and each vrf creates its own separate rot table now here we can see the rooting table of vrf
blue using this command on The Cisco iOS router that is configured with vrfs the pipe begin Gateway operator that I've
added here simply makes the output begin at the word Gateway so what this actually does is it omits all of the
text with the various codes that appear before this phrase of Gateway of Last Resort is not set in any case the
rooting t here only contains interfaces in vrf blue and the IP addresses of those interfaces it knows nothing of
these other addresses or interfaces as they belong to another vrf similarly we can take a look at the rooting table of
vrf red the IP addresses and interface in this vrf are shown while those in the blue vrf are completely unknown each vrf
is a distinct virtual rooting domain and by default packets cannot be rooted from one vrf to another for example if a
packet comes in on gigabit Ethernet 03 with a destination IP of 1010101 which is the IP address of this
interface here the destination address will be looked up in this rooting table of the red vrf and since there is no
match it will simply be dropped but what happens if we have another interface here that is not a assigned to any vrf
how is that handled interfaces and networks that do not have an explicitly assigned vrf are part of the global
rooting table by default the global rooting table and the interfaces and networks that belong to it can be
thought of collectively as the default vrf meaning any traffic that is not associated with a specific vrf will be
rooted to This Global rooting table now interface gigabit 00 here for example is not explicitly assigned to any vrf so
this interface along with its network will appear in the global rooting table now if we take a look at that Global
rooting table we'll see something like this here you can see the interface gigabit Ethernet 00 and the IP address
that belongs to that interface now you can think of vrfs as virtual distinct and separate routers running within the
physical router in a similar sense as to how vlans virtually segment a switch into multiple virtual switches now these
vrfs are so independent are so separate from each other that you can actually assign the same IP address to two
different interfaces on a router like so as long as those interfaces are in different vrfs in any case that's the
gist of vrfs and how they work within a single router now what bearing does all of this have on an MLs Network well isps
that offer Network Services to their customers want to be able to leverage the same network for hundreds or even
thousands of customers so vrfs are ideal for that separation of traffic in an MLs Network such as this one each customer
site is assigned a vrf and this vrf is configured only within the PE routers so for this particular customer
site with C1 here the interface here on pe1 is configured on a vrf called Green while this one here is configured on a
vrf called Blue now there's an indication here of the default Rd or root distinguisher this is an integral
component of this whole process but we won't talk about it now we'll see it in action in an upcoming video similarly if
we look at pe2 here we have the same vrf green configured on this interface now these vrfs help to differentiate iate
the multiple customers that may exist on each PE router for example another vrf called orange is configured here that
way each customer can use whatever IP addresses they choose even if their IP address spaces actually overlap because
the vrfs are completely independent of each other now here comes the final piece of
the puzzle remember vrfs are only configured on pees pters have nothing nothing to do with vrfs pters in the
context of mLs are just responsible for using label switching to get from one PE router to the other so the big question
is for communication from ce1 to ce2 to take place in such a way so that it is segmented from all other customers how
must pe1 here send traffic so that it will be directed appropriately via the pters to pe2 and to C2 well MLS as we
have said works with a lot of other protocols pe1 and pe2 must share information about the vrfs that they
serve and this is done using multiprotocol bgp now this needs a bit of
explaining remember in a previous video we saw how the MLS network was set up so that the PE routers became ibgp peers in
the examples We examined we used those ibgp peerings to share IP rootes between those PE routers but in this case today
these router are actually sharing information about vrfs now to share in this information about vrfs we use an
additional capability of bgp which is called multiprotocol bgp or MP bgp now this is just a fancy term that's saying
that bgp here can advertise things other than simple IP addresses in this scenario here bgp enables the PE routers
to inform each other of the vrfs that they have so that they can use the appropriate labels to ensure that the
traffic is directed correctly over the MLS topology but in order for MLS to do this
it will require the use of a couple more Technologies and protocols specifically it needs to employ root distinguishers
or RDS which we saw briefly in the output of the roters here but we also need things like root targets or RT
as well as VPN V4 Roots but we won't talk about those here we'll talk about these aspects of mls in the very next
video for now I hope you found this video useful and if you have please click that Thumbs Up Button if you have
any feedback or questions feel free to put those in the comments below I'm always happy to respond to those and
please subscribe to get updates to newly published videos I'm Lazarus at Telecom Tech I hope this video has been helpful
for you and I'd like to thank you for watching
A VRF (Virtual Routing and Forwarding) creates multiple isolated virtual routers inside a single physical router, each with its own routing table and assigned interfaces. This is useful because it allows network segmentation without needing separate hardware, enabling customer isolation in MPLS VPNs and allowing overlapping IP addresses across different VRFs.
VRF maintains strict isolation by giving each instance its own independent routing table and interface assignments. If a packet arrives on an interface in the Red VRF destined for an IP address known only in the Blue VRF, the router drops it because Red's routing table has no matching route. This prevents any cross-VRF traffic unless explicitly configured.
Yes, because VRFs create completely separate routing domains, two customers can use identical private IP addresses (e.g., 10.0.0.1) without conflict, even on the same PE router. This is a key benefit of VRFs in MPLS L3VPNs, as it allows address space overlapping between different customers.
VRFs are configured only on PE (Provider Edge) routers in an MPLS network. P (Provider) routers, which are the core switches, handle label switching and have no knowledge of VRFs. The PE routers use MP-BGP to share VRF information between each other using labels.
Multiprotocol BGP (MP-BGP) is used by PE routers to advertise VRF routing information to each other across the MPLS core. It enables the application of labels so that traffic originating from one customer edge (CE) device reaches another CE through the correct VRF, ensuring end-to-end customer isolation.
Route Distinguishers (RDs) make overlapping customer routes unique across the entire MPLS network by prefixing them with a unique identifier. Route Targets (RTs) control which VRFs import and export routes, determining whether a VRF should learn about routes from other VRFs or the global table, enabling flexible route sharing policies.
VPNv4 routes are the BGP address family used to carry labeled VRF routes between PE routers. They encapsulate the customer's IPv4 route along with the Route Distinguisher and MPLS label, allowing PE routers to differentiate between overlapping private IP addresses from different customers and forward traffic correctly.
Keep this summary
Save it to LunaNotes and it becomes a real note in your library — editable, searchable, and ready to turn into flashcards or a diagram. Free to start.
Save to LunaNotesOr summarise for another video.
32K+ people have turned 65K+ videos into notes
“Very useful tool. I'm using it for the last couple weeks and I'm loving it so far. Makes learning on YouTube a great experience.”
This summary and transcript were automatically generated using AI with the Free YouTube transcript summary tool by LunaNotes.
Related summaries
MPLS VPNs: RD, RT & VPNv4 Routes Explained Simply
This video explains how MPLS VPNs use Route Distinguishers (RDs) and Route Targets (RTs) to differentiate customer networks with overlapping IP addresses. It covers VPNv4 route advertisement, MP-BGP updates, and VPN labels for Layer 3 VPN isolation.
How BGP Is Used in the MPLS Core: Edge Routing Explained
Learn how BGP operates only on the perimeter of an MPLS network, enabling PE routers to share customer routes while core P routers stay label-switching only. This video breaks down the CE/PE/P router roles, IBGP full-mesh on edges, and why MPLS beats IP routing for scalability.
Configure MPLS VPNv4 Routes on Cisco IOS Step-by-Step
Learn how to configure VPNv4 routes on an MPLS backbone using Cisco IOS routers. This tutorial covers underlay setup, OSPF, MPLS/LDP, VRFs, Route Distinguishers, Route Targets, and multi-protocol iBGP peering for VPNv4.
MPLS Explained: What Is Multi-Protocol Label Switching? (Simple Guide)
MPLS is a high-performance network protocol used in ISP core networks to efficiently direct data between nodes using labels instead of IP lookups. It sits between Layer 2 and Layer 3, encapsulates multiple protocols, and is ideal for interconnecting customer sites securely. This video provides a simple introduction to MPLS, comparing it to traditional IP routing and explaining its key benefits.
Basic MPLS Configuration on Cisco IOS: Step-by-Step Guide
Learn how to configure MPLS on Cisco IOS routers in a typical ISP network. This video walks through the full process: eBGP peerings with customers, OSPF underlay, iBGP full mesh among PEs, and finally enabling MPLS with LDP, followed by verification using LFIB and PHP.
Most viewed summaries
A Comprehensive Guide to Using Stable Diffusion Forge UI
Explore the Stable Diffusion Forge UI, customizable settings, models, and more to enhance your image generation experience.
Kolonyalismo at Imperyalismo: Ang Kasaysayan ng Pagsakop sa Pilipinas
Tuklasin ang kasaysayan ng kolonyalismo at imperyalismo sa Pilipinas sa pamamagitan ni Ferdinand Magellan.
Mastering Inpainting with Stable Diffusion: Fix Mistakes and Enhance Your Images
Learn to fix mistakes and enhance images with Stable Diffusion's inpainting features effectively.
Pamamaraan at Patakarang Kolonyal ng mga Espanyol sa Pilipinas
Tuklasin ang mga pamamaraan at patakaran ng mga Espanyol sa Pilipinas, at ang epekto nito sa mga Pilipino.
How to Install and Configure Forge: A New Stable Diffusion Web UI
Learn to install and configure the new Forge web UI for Stable Diffusion, with tips on models and settings.
Found this summary useful?
Take it with you. One click puts it in your own LunaNotes library.
Save to LunaNotes