Although VRF (virtual routing and forwarding) is not actually part of the MPLS you can think of the VRF as a helper for the MPLS in achieving the MPLS VPN infrastructure, now as I would like to make that a very simple to understand guide , I will address here only the VRF part without any MPLS, also known as VRF Lite.
Simple Topology :
R1 Configuration | R2 Configuration |
! | ! |
As you can see from above I have done something very simple, 2 VRF’s GOLD and SILVER, I have configured sub interface for FastEthernet 0/0 and each is assigned to its own VRF with the ip vrf forwarding <VRF_NAME> command.
see what happen if I try to see my routing table:
R1#sh ip routeCodes: C - connected, S - static, R - RIP, M - mobile, B - BGPD - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter areaN1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2E1 - OSPF external type 1, E2 - OSPF external type 2i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2ia - IS-IS inter area, * - candidate default, U - per-user static routeo - ODR, P - periodic downloaded static routeGateway of last resort is not set
What happen here?! where are my connected interfaces ?!
Well this is the VRF, as you can see from above configuration I have configured only interface assigned to VRF, and the VRF job is to take my router and give each VRF a totally separate virtual ip routing table. you can see the same result is with R2 main routing table.
R2#sh ip routeCodes: C - connected, S - static, R - RIP, M - mobile, B - BGPD - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter areaN1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2E1 - OSPF external type 1, E2 - OSPF external type 2i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2ia - IS-IS inter area, * - candidate default, U - per-user static routeo - ODR, P - periodic downloaded static routeGateway of last resort is not set
So , where is the routing table I have created?!
R1
R1#sh ip route vrf VRF_GOLDRouting Table: VRF_GOLDCodes: C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter areaN1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2E1 - OSPF external type 1, E2 - OSPF external type 2i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2ia - IS-IS inter area, * - candidate default, U - per-user static routeo - ODR, P - periodic downloaded static route
Gateway of last resort is not set20.0.0.0/24 is subnetted, 1 subnets
C 20.0.0.0 is directly connected, FastEthernet0/0.2
R1#sh ip route vrf VRF_SILVERRouting Table: VRF_SILVERCodes: C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter areaN1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2E1 - OSPF external type 1, E2 - OSPF external type 2i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2ia - IS-IS inter area, * - candidate default, U - per-user static routeo - ODR, P - periodic downloaded static route
Gateway of last resort is not set10.0.0.0/24 is subnetted, 1 subnets
C 10.0.0.0 is directly connected, FastEthernet0/0.1
R2
R2#sh ip vrfName Default RD Interfaces
VRF_GOLD <not set> Fa0/0.2VRF_SILVER <not set> Fa0/0.1R2#sh ip route vrf VRF_GOLDRouting Table: VRF_GOLDCodes: C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter areaN1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2E1 - OSPF external type 1, E2 - OSPF external type 2i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2ia - IS-IS inter area, * - candidate default, U - per-user static routeo - ODR, P - periodic downloaded static route
Gateway of last resort is not set20.0.0.0/24 is subnetted, 1 subnets
C 20.0.0.0 is directly connected, FastEthernet0/0.2
Now lets check simple connectivity:
R2#ping 20.0.0.2Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 20.0.0.2, timeout is 2 seconds:.....
Now what is going on?! I am pinging my own interface!!!
Relax again, when working with VRF everything need to be referred with the VRF, ping traceroute…
R2#ping vrf VRF_GOLD 20.0.0.2Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 20.0.0.2, timeout is 2 seconds:!!!!!R2#ping vrf VRF_GOLD 20.0.0.1Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 20.0.0.1, timeout is 2 seconds:.!!!!R2#ping vrf VRF_SILVER 10.0.0.1Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.0.0.1, timeout is 2 seconds:.!!!!
Now I would like to take it one step further and show you that the VRF is locally significant, meaning the router it self have virtual separation there is no tagging or added header’s or anything like MPLS.
R2(config)#ip vrf VRF_AR2(config-vrf)#ip vrf VRF_BR2(config-vrf)#int f0/0.1R2(config-subif)#ip vrf fR2(config-subif)#ip vrf forwarding VRF_A% Interface FastEthernet0/0.1 IP address 10.0.0.2 removed due to enabling VRF VRF_AR2(config-subif)#ip add 10.0.0.2 255.255.255.0R2(config-subif)#int f0/0.2R2(config-subif)#ip vrf forwarding VRF_B% Interface FastEthernet0/0.2 IP address 20.0.0.2 removed due to enabling VRF VRF_BR2(config-subif)#ip add 20.0.0.2 255.255.255.0R2(config-subif)#^ZR2#sh*Mar 1 00:08:58.651: %SYS-5-CONFIG_I: Configured from console by consoleR2#sh ip int bInterface IP-Address OK? Method Status Protocol
FastEthernet0/0 unassigned YES unset up upFastEthernet0/0.1 10.0.0.2 YES manual up upFastEthernet0/0.2 20.0.0.2 YES manual up upR2#sh ip vrfName Default RD Interfaces
VRF_A <not set> Fa0/0.1VRF_B <not set> Fa0/0.2VRF_GOLD <not set>VRF_SILVER <not set>
as you can see from above I have configured 2 new VRF’s and reassign them to the interfaces, replacing old VRF_GOLD and VRF_SILVER, notice I had to reconfigure the ip address, as when assigning VRF to an interface the ip address is removed (I have just assigned the same to each interface)
Now lets test
R2#ping vrf VRF_A 10.0.0.1 repeat 1Type escape sequence to abort.
Sending 1, 100-byte ICMP Echos to 10.0.0.1, timeout is 2 seconds:!Success rate is 100 percent (1/1), round-trip min/avg/max = 200/200/200 ms
Success !!!
Now If you have any doubts
R1#debug ip packet detailIP packet debugging is on (detailed)R1#*Mar 1 00:09:20.979: IP: tableid=1, s=10.0.0.2 (FastEthernet0/0.1), d=10.0.0.1 (FastEthernet0/0.1), routed via RIB*Mar 1 00:09:20.979: IP: s=10.0.0.2 (FastEthernet0/0.1), d=10.0.0.1 (FastEthernet0/0.1), len 100, rcvd 3*Mar 1 00:09:20.983: ICMP type=8, code=0*Mar 1 00:09:20.983: IP: tableid=1, s=10.0.0.1 (local), d=10.0.0.2 (FastEthernet0/0.1), routed via FIB*Mar 1 00:09:20.983: IP: s=10.0.0.1 (local), d=10.0.0.2 (FastEthernet0/0.1), len 100, sending*Mar 1 00:09:20.983: ICMP type=0, code=0R1#un all
Now I could have made it more confusing and switch the names, but why go there take below .net file for GNS and play your self:
autostart = False
[127.0.0.1:7200]workingdir = D:\DYN\Workudp = 10000[[3640]]image = D:\DYN\C3640-JK.BINidlepc = 0x6060d328ghostios = True
chassis = 3640[[ROUTER R1]]model = 3640console = 2000cnfg = R1.cfgslot0 = NM-1FE-TXf0/0 = R2 f0/0x = -221.0y = -91.0[[ROUTER R2]]model = 3640console = 2001cnfg = R2.cfgslot0 = NM-1FE-TXf0/0 = R1 f0/0x = 144.0y = -83.0[GNS3-DATA]configs = .[[NOTE 1]]text = f0/0x = -6.99933176856y = 21.7687899898interface = R2 f0/0
[[NOTE 2]]text = f0/0x = 72.9993317686y = 22.2312100102interface = R1 f0/0
This is the very basic VRF , If you understand that it is the first step to understanding MPLS VPN’s
4 comments:
Hi
That was a really good explanation. Please continue with the MPLS stuff
Regards
Balaji
That was a good explanation and please do continue with the MPLS stuff
Thank you, I will try to post soon some more.
good luck!
Leeson AC Motors
Post a Comment