What are VRFs?
- VRF stands for Virtual Routing and Forwarding.
- What VLANs do for Switches, VRF essentially do for Routers.
- It allows us to run multiple instances of routing tables. Essentially we can virtualise multiple instances of a router and have them run on the same physical router device.
- The same subnet can exist in multiple VRF routing tabled, this allows greater flexibility.
- A VRF instance must be attached to an interface.
- The Routing Tables are logically separate from each other. So if we were to check the routing table for each of these instances, we would only see the routes for that instance and no routes for any other instances.
Lets look at a typical setup.
Lets say we have 3 interfaces on our Router:
And we have 2 VRF instances:
- VRF A
- VRF B
We can assign VRF A to interface g0/1. This means that for traffic coming in to this interface, the VRF A Routing Table will be used to route traffic.
We can also assign VRF B to interface g0/2. This means that for traffic coming in to this interface, the VRF B Routing Table will be used to route traffic.
Now, we still have one interface left – g0/0. When traffic comes through this interface, since no VRF is assigned it will use the normal Global Routing Table.
VRF is useful for WAN MPLS Providers, as allows them to manage multiple customers on the same device.