VRF BASICS

Virtual routing and forwarding (VRF) is a technology that allows multiple instances of a routing table to co-exist within the same router at the same time. Because the routing instances are independent, overlapping IP addresses can be used without conflicting with each other. The multiple Routing instances can be made to traverse different path (ie take different outgoing interfaces).

 

VRFs are the same methods of network isolation/virtualization as VLANs. VLANs are used at the L2 and VRFs are L3 tools.VRFs are to routing table like VLANs are to LANs. Using VRFs, we are virtualizing routing table into multiple routing tables, similarly to VLANs used to virtualize LANs. One could say that VLANs are performing L2 virtualization, VRFs are performing L3 virtualization. VLANs make a single switch look like several switches; VRFs make a single router look like several routers.

Below scenario will help us understand how VRF works and logically separates traffic for multiple customer by having multiple routing table for each customer VRF.In the diagram , PE is the Provider Router connected on FasEthernet 0/0 to C1 and C2 Routers where C1 is customer 1 Router (Allocation under Vlan RED) and C2 is customer 2 Router (Allocation under Vlan GREEN).

1st in order to configure 2 instances of Routing table (1 for customer under RED instance and 1 for customer under GREEN instance) we will allocate different VRF to both the customers and assign different RD values as below –

PE(config)#ip vrf RED

PE(config-vrf)#rd 2:2

PE(config-vrf)#ip vrf GREEN

PE(config-vrf)#rd 3:3

Next , configure subinterface for both the  customers. In this case fa0/0.2 for RED vrf customer and fa0/0.3 for GREEN vrf customer. Please note , the IP address at PE end for both the VRF will remain the same ie 192.168.1.1.

PE(config)#int fa0/0.2

PE(config-subif)#encapsulation dot1q 2

PE(config-subif)#ip vrf forwarding RED

PE(config-subif)#ip address 192.168.1.1 255.255.255.0

PE(config-subif)#int fa0/0.3

PE(config-subif)#encapsulation dot1q 3

PE(config-subif)#ip vrf forwarding GREEN

PE(config-subif)#ip address 192.168.1.1 255.255.255.0

Now since configuration is complete , lets perform the connectivity test.

1st ping from Customer 1 Router towards PE IP address 192.168.1.1 (RED VRF)

2nd ping from customer 2 Router towards PE IP address 192.168.1.1 (GREEN VRF)

C1#ping 192.168.1.1

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 192.168.1.1, timeout is 2 seconds:

!!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 10/35/70 ms

 

C2#ping 192.168.1.1

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 192.168.1.1, timeout is 2 seconds:

!!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 10/35/70 ms

Ping test from PE towards customer Routers

PE#ping vrf RED 192.168.1.2

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 192.168.1.2, timeout is 2 seconds:

!!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 10/35/70 ms

 

PE#ping vrf GREEN 192.168.1.2

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 192.168.1.2, timeout is 2 seconds:

!!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 10/35/70 ms

Please follow and like us:

Related Post

No Responses

Add Comment

Social Media Auto Publish Powered By : XYZScripts.com
Select your currency