VRF Lite Configuration on Cisco IOS

I was configuring some VRF lite and I had two VRFs that I was configuring on 4 Routers in my isp. I was trying to figure out how the other side would know how to separate traffic from the different VRFs. At first I thought well maybe if the other side gets traffic from a VRF it would know. Now that I think of it there would be nothing in the Ethernet/IP header to tell the router anything. The answer is 802.1q which is not obvious because when you think of routers you don’t think of 802.1q unless there is a switch on the other side(router on a stick). To be explicit, you 802.1q encapsulate traffic on sub interfaces on the neighboring routers to transport traffic in different vrfs between routers if you are only using one interface. Networking is awesome :smiley:

R1
interface GigabitEthernet0/2.1
 encapsulation dot1Q 10
 ip vrf forwarding Gandalf
 ip address 192.168.2.1 255.255.255.0
end

R2
interface GigabitEthernet0/0.1
 encapsulation dot1Q 10
 ip vrf forwarding Gandalf
 ip address 192.168.2.2 255.255.255.0
end
1 Like