Vrf Lab
Customer1-Site-A(config)#interface loopback 0
Customer1-Site-A(config-if)#ip add 1.1.1.1 255.255.255.255
Customer1-Site-A#conf t
Customer1-Site-A(config)#interface fastEthernet 0/0
Customer1-Site-A(config-if)#ip add 10.10.10.1 255.255.255.252
*Jan 29 07:47:46.035: %SYS-5-CONFIG_I: Configured from console by console
Customer1-Site-A#sh ip int brief
Interface IP-Address OK? Method Status Protocol
FastEthernet0/0 10.10.10.1 YES manual up up
FastEthernet2/0 unassigned YES unset administratively down down
GigabitEthernet3/0 unassigned YES unset administratively down down
FastEthernet4/0 unassigned YES unset administratively down down
Serial5/0 unassigned YES unset administratively down down
Serial5/1 unassigned YES unset administratively down down
Serial5/2 unassigned YES unset administratively down down
Serial5/3 unassigned YES unset administratively down down
FastEthernet6/0 unassigned YES unset administratively down down
FastEthernet6/1 unassigned YES unset administratively down down
Loopback0 1.1.1.1 YES manual up up
Customer1-Site-A#sh ip route
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP
a - application route
+ - replicated route, % - next hop override
Gateway of last resort is not set
1.0.0.0/32 is subnetted, 1 subnets
C 1.1.1.1 is directly connected, Loopback0
10.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C 10.10.10.0/30 is directly connected, FastEthernet0/0
L 10.10.10.1/32 is directly connected, FastEthernet0/0
Customer1-Site-A#conf t
Customer1-Site-A(config)#router eigrp 100
Customer1-Site-A(config-router)#network 1.1.1.1 0.0.0.0
Customer1-Site-A(config-router)#network 10.10.10.0 0.0.0.3
Customer1-Site-A(config-router)#no auto-summary
Customer1-Site-A(config-router)#exit
Customer1-SiteB(config)#interface loopback 0
Customer1-SiteB(config-if)#ip add 2.2.2.2 255.255.255.255
Customer1-SiteB(config)#interface fastEthernet 2/0
Customer1-SiteB(config-if)#ip add 20.20.20.1 255.255.255.252
Customer1-SiteB#sh ip int brief
Interface IP-Address OK? Method Status Protocol
FastEthernet0/0 unassigned YES unset administratively down down
FastEthernet2/0 20.20.20.1 YES manual administratively down down
GigabitEthernet3/0 unassigned YES unset administratively down down
FastEthernet4/0 unassigned YES unset administratively down down
Serial5/0 unassigned YES unset administratively down down
Serial5/1 unassigned YES unset administratively down down
Serial5/2 unassigned YES unset administratively down down
Serial5/3 unassigned YES unset administratively down down
FastEthernet6/0 unassigned YES unset administratively down down
FastEthernet6/1 unassigned YES unset administratively down down
Loopback0 2.2.2.2 YES manual up up
Customer1-SiteB#sh ip route
Gateway of last resort is not set
2.0.0.0/32 is subnetted, 1 subnets
C 2.2.2.2 is directly connected, Loopback0
20.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C 20.20.20.0/30 is directly connected, FastEthernet2/0
L 20.20.20.1/32 is directly connected, FastEthernet2/0
Customer1-SiteB(config)#router eigrp 100
Customer1-SiteB(config-router)#network 2.2.2.2 0.0.0.0
Customer1-SiteB(config-router)#network 20.20.20.0 0.0.0.3
Customer1-SiteB(config-router)#no auto-summary
Customer1-SiteB(config-router)#exit
Customer2 de ospf konfigurasyonu yapalım.
Customer2-Site-A(config)#interface loopback 0
Customer2-Site-A(config-if)#ip add 4.4.4.4 255.255.255.255
Customer2-Site-A#conf t
Customer2-Site-A(config)#interface fastEthernet 0/0
Customer2-Site-A(config-if)#ip add 30.30.30.1 255.255.255.252
Customer2-Site-A(config-if)#no shut
Customer2-Site-A(config)#router
Customer2-Site-A(config)#router ospf 1
Customer2-Site-A(config-router)#router-id 4.4.4.4
Customer2-Site-A(config-router)#network 30.30.30.0 0.0.0.3 area 0
Customer2-Site-A(config-router)#network 4.4.4.4 0.0.0.0 area 0
Customer2-Site-A(config-router)#
Customer2-Site-B(config)#interface loopback 0
Customer2-Site-B(config-if)#ip add 3.3.3.3 255.255.255.255
Customer2-Site-B#conf t
Customer2-Site-B(config)#interface fastEthernet 0/0
Customer2-Site-B(config-if)#ip add 40.40.40.1 255.255.255.252
Customer2-Site-B(config)#router ospf 1
Customer2-Site-B(config-router)#router-id 3.3.3.3
Customer2-Site-B(config-router)#network 3.3.3.3 0.0.0.0 area 0
Customer2-Site-B(config-router)#network 40.40.40.0 0.0.0.3 area 0
Customer2-Site-B#sh ip route
3.0.0.0/32 is subnetted, 1 subnets
C 3.3.3.3 is directly connected, Loopback0
40.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C 40.40.40.0/30 is directly connected, FastEthernet0/0
L 40.40.40.1/32 is directly connected, FastEthernet0/0
Core-Router(config)#ip vrf Customer1
Core-Router(config-vrf)#exit
Core-Router(config)#ip vrf Customer 2
Core-Router#sh ip vrf
Name Default RD Interfaces
Customer1 <not set>
Customer2 <not set>
Core-Router#
Bu vrfler herhangi bir interfaceye map edilmemiş onu ilk başta etmemiz gerekiyor.
Core-Router(config)#interface fastEthernet 0/0
Core-Router(config-if)#ip add 10.10.10.2 255.255.255.252
Core-Router#sh ip int brief
Interface IP-Address OK? Method Status Protocol
FastEthernet0/0 10.10.10.2 YES manual up up
FastEthernet2/0 unassigned YES unset administratively down down
GigabitEthernet3/0 unassigned YES unset administratively down down
FastEthernet4/0 unassigned YES unset administratively down down
Serial5/0 unassigned YES unset administratively down down
Serial5/1 unassigned YES unset administratively down down
Serial5/2 unassigned YES unset administratively down down
Serial5/3 unassigned YES unset administratively down down
FastEthernet6/0 unassigned YES unset administratively down down
FastEthernet6/1 unassigned YES unset administratively down down
Core-Router(config)#interface fastEthernet 0/0
Core-Router(config-if)#ip vrf forwarding ?
Customer1
Customer2
WORD VRF name
Core-Router(config-if)#ip vrf forwarding Customer1
% Interface FastEthernet0/0 IPv4 disabled and address(es) removed due to enabling VRF Customer1
Core-Router#sh ip int brief
Interface IP-Address OK? Method Status Protocol
FastEthernet0/0 unassigned YES manual up up
FastEthernet2/0 unassigned YES unset administratively down down
GigabitEthernet3/0 unassigned YES unset administratively down down
FastEthernet4/0 unassigned YES unset administratively down down
Serial5/0 unassigned YES unset administratively down down
Serial5/1 unassigned YES unset administratively down down
Serial5/2 unassigned YES unset administratively down down
Serial5/3 unassigned YES unset administratively down down
FastEthernet6/0 unassigned YES unset administratively down down
FastEthernet6/1 unassigned YES unset administratively down down
Core-Router#
Core-Router(config)#int fastEthernet 0/0
Core-Router(config-if)#ip add 10.10.10.2 255.255.255.252
Core-Router(config-if)#no shut
Core-Router#sh ip vrf
Name Default RD Interfaces
Customer1 <not set> Fa0/0
Customer2 <not set>
Core-Router#sh ip int brief
Interface IP-Address OK? Method Status Protocol
FastEthernet0/0 10.10.10.2 YES manual up up
FastEthernet2/0 unassigned YES unset administratively down down
Core-Router(config)#interface fastEthernet 2/0
Core-Router(config-if)#ip vrf forwarding Customer2
Core-Router(config-if)#ip address 20.20.20.2 255.255.255.252
Core-Router(config-if)#no shut
Core-Router(config-if)#
Core-Router(config)#router eigrp Customer1
Core-Router(config-router)#address-family ipv4 vrf Customer1 ?
autonomous-system Specify Address-Family Autonomous System Number
Core-Router(config-router)#$ily ipv4 vrf Customer1 autonomous-system 100
Core-Router(config-router-af)#network 10.10.10.0 0.0.0.3
*Jan 29 08:49:01.471: %DUAL-5-NBRCHANGE: EIGRP-IPv4 100: Neighbor 10.10.10.1 (FastEthernet0/0) is up: new adjacency
Core-Router(config-router-af)# network 20.20.20.0 0.0.0.3
*Jan 29 08:49:26.879: %DUAL-5-NBRCHANGE: EIGRP-IPv4 100: Neighbor 20.20.20.1 (FastEthernet2/0) is up: new adjacency
Core-Router(config-router-af)#exit
Core-Router#sh ip route vrf Customer1
Core-Router(config)#interface gigabitEthernet 3/0
Core-Router(config-if)#ip vrf forwarding Customer2
Core-Router(config-if)#ip add 30.30.30.2 255.255.255.252
Core-Router(config)#interface gigabitEthernet 3/0
Core-Router(config-if)#no shut
Core-Router(config)#interface fastEthernet 4/0
Core-Router(config-if)#ip vrf forwarding Customer2
Core-Router(config-if)#ip add 40.40.40.2 255.255.255.252
Core-Router(config-if)#no shut
Core-Router#sh ip route vrf Customer2
Routing Table: Customer2
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP
a - application route
+ - replicated route, % - next hop override
Gateway of last resort is not set
30.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C 30.30.30.0/30 is directly connected, GigabitEthernet3/0
L 30.30.30.2/32 is directly connected, GigabitEthernet3/0
40.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C 40.40.40.0/30 is directly connected, FastEthernet4/0
L 40.40.40.2/32 is directly connected, FastEthernet4/0
Success rate is 100 percent (5/5), round-trip min/avg/max = 4/6/8 ms
Core-Router#sh ip vrf
Name Default RD Interfaces
Customer1 <not set> Fa0/0
Fa2/0
Customer2 <not set> Gi3/0
Fa4/0
Core-Router#
Core-Router(config)#router ospf 2 vrf Customer2
Core-Router(config-router)#network 30.30.30.0 0.0.0.3 area 0
*Jan 29 11:20:19.691: %OSPF-5-ADJCHG: Process 2, Nbr 4.4.4.4 on GigabitEthernet3/0 from LOADING to FULL, Loading Done
Core-Router(config-router)#network 40.40.40.0 0.0.0.3 area 0
Core-Router(config-router)#
*Jan 29 11:20:48.315: %OSPF-5-ADJCHG: Process 2, Nbr 3.3.3.3 on FastEthernet4/0 from LOADING to FULL, Loading Done
Core-Router(config-router)#
Core-Router#sh ip route vrf Customer2
3.0.0.0/32 is subnetted, 1 subnets
O 3.3.3.3 [110/2] via 40.40.40.1, 00:00:50, FastEthernet4/0
4.0.0.0/32 is subnetted, 1 subnets
O 4.4.4.4 [110/2] via 30.30.30.1, 00:01:23, GigabitEthernet3/0
30.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C 30.30.30.0/30 is directly connected, GigabitEthernet3/0
L 30.30.30.2/32 is directly connected, GigabitEthernet3/0
40.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C 40.40.40.0/30 is directly connected, FastEthernet4/0
L 40.40.40.2/32 is directly connected, FastEthernet4/0
Core-Router#
Customer2-Site-A#ping 3.3.3.3
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 3.3.3.3, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 40/68/144 ms
Customer2-Site-A#
Last updated