OSPF Lab 18 : VRF Lite

 LAB 18

pada lab kita kali ini adallah VRF (Virtual Routing and Forwarding) teknologi yang memungkinkan kita membuat dua segment IP Address yang sama di dua interface router yang berbeda tapi, di Routing table yang berbeda. VRF yang dijalankan tanpa MPLS disebut dengan VRF Lite.

langsung aja nih Buat VRF dan Daftarkan Interface ke dalam VRF nya masing masing, sama seperti daftarin vlan ke interface switch.

ISP (R5)

ISP(config)#ip vrf KIRI 
ISP(config-vrf)#exit 
ISP(config)#ip vrf KANAN 
ISP(config-vrf)#exit 
ISP(config)#int f0/0 
ISP(config-if)#ip vrf forwarding KIRI 
ISP(config-if)#ip add 192.168.1.2 255.255.255.0 
ISP(config-if)#no shutdown 
ISP(config-if)#exit

ISP(config)#int f0/1  

ISP(config-if)#ip vrf forwarding KANAN 
ISP(config-if)#ip add 192.168.1.2 255.255.255.0 
ISP(config-if)#no shutdown 
ISP(config-if)#exit

ISP(config)#int g1/0 

ISP(config-if)#ip vrf forwarding KIRI 
ISP(config-if)#ip address 192.168.2.2 255.255.255.0 
ISP(config-if)#no shutdown 
ISP(config-if)#exit

ISP(config)#int g2/0 
ISP(config-if)#ip vrf forwarding KANAN 
ISP(config-if)#ip address 192.168.2.2 255.255.255.0 
ISP(config-if)#no shutdown 
ISP(config-if)#exit

Dan kita akan konfigurasi IP dan Advertise ke OSPF

R1

R1(config)#int f0/0 
R1(config-if)#ip add 192.168.1.1 255.255.255.0 
R1(config-if)#no shutdown 
R1(config-if)#int loopback 0
R1(config-if)#ip address 1.1.1.1 255.255.255.255 
R1(config-if)#exit 
R1(config)#router ospf 1 
R1(config-router)#network 192.168.1.0 0.0.0.255 area 0 
R1(config-router)#network 1.1.1.1 0.0.0.0 area 0 
R1(config-router)#exit

R2

R2(config)#int f0/0 
R2(config-if)#ip add 192.168.1.3 255.255.255.0 
R2(config-if)#no sh 
R2(config-if)#exit  
R2(config)#int loopback 0 
R2(config-if)#ip address 2.2.2.2 255.255.255.255 
R2(config-if)#exit 
R2(config)#router ospf 1 
R2(config-router)#network 192.168.1.0 0.0.0.255 area 0 
R2(config-router)#network 2.2.2.2 0.0.0.0 area 0 
R2(config-router)#exit 

R3

R3(config)#int g1/0 
R3(config-if)#ip add 192.168.2.1 255.255.255.0 
R3(config-if)#no shutdown 
R3(config-if)#int loopback 0 
R3(config-if)#ip address 3.3.3.3 255.255.255.255 
R3(config-if)#exit 
R3(config)#router ospf 1 
R3(config-router)#network 192.168.2.0 0.0.0.255 area 0 
R3(config-router)#network 3.3.3.3 0.0.0.0 area 0

R4

R4(config)#int g1/0 
R4(config-if)#ip address 192.168.2.3 255.255.255.0 
R4(config-if)#no shutdown 
R4(config-if)#int loopback 0 
R4(config-if)#ip address 4.4.4.4 255.255.255.255
R4(config-if)#exit 
R4(config)#router ospf 1 
R4(config-router)#network 192.168.2.0 0.0.0.255 area 0 
R4(config-router)#network 4.4.4.4 0.0.0.0 area 0 
R4(config-router)#exit

Sekarang kita akan konfigurasi OSPF di sisi router ISP

ISP

ISP(config)#router ospf 1 vrf KIRI 
ISP(config-router)#network 192.168.1.0 0.0.0.255 area 0 
ISP(config-router)#network 192.168.2.0 0.0.0.255 area 0 
ISP(config-router)#router ospf 2 vrf KANAN 
ISP(config-router)#network 192.168.1.0 0.0.0.255 area 0 
ISP(config-router)#network 192.168.2.0 0.0.0.255 area 0

Lakukan verifikasi

ISP

ISP(config)#do sh vrf 
 Name Default RD Protocols Interfaces 
 KANAN             ipv4    Fa0/1 Gi2/0 

 KIRI              ipv4    Fa0/0 Gi1/0

ISP#sh ip route vrf KIRI 
Routing Table: KIRI 
Gateway of last resort is not set 
 1.0.0.0/32 is subnetted, 1 subnets 
O 1.1.1.1 [110/2] via 192.168.1.1, 00:14:16, FastEthernet0/0 
 3.0.0.0/32 is subnetted, 1 subnets 
O 3.3.3.3 [110/2] via 192.168.2.1, 00:14:16, GigabitEthernet1/0 
 192.168.1.0/24 is variably subnetted, 2 subnets, 2 masks 
C 192.168.1.0/24 is directly connected, FastEthernet0/0 
L 192.168.1.2/32 is directly connected, FastEthernet0/0 
 192.168.2.0/24 is variably subnetted, 2 subnets, 2 masks 
C 192.168.2.0/24 is directly connected, GigabitEthernet1/0 
L 192.168.2.2/32 is directly connected, GigabitEthernet1/0

ISP#sh ip route vrf KANAN 
Routing Table: KANAN 
Gateway of last resort is not set 
 2.0.0.0/32 is subnetted, 1 subnets 
O 2.2.2.2 [110/2] via 192.168.1.3, 00:06:25, FastEthernet0/1 
 4.0.0.0/32 is subnetted, 1 subnets 
O 4.4.4.4 [110/2] via 192.168.2.3, 00:05:42, GigabitEthernet2/0 
 192.168.1.0/24 is variably subnetted, 2 subnets, 2 masks 
C 192.168.1.0/24 is directly connected, FastEthernet0/1 
L 192.168.1.2/32 is directly connected, FastEthernet0/1 
 192.168.2.0/24 is variably subnetted, 2 subnets, 2 masks 
C 192.168.2.0/24 is directly connected, GigabitEthernet2/0 
L 192.168.2.2/32 is directly connected, GigabitEthernet2/0 

Cek ping ke sesama VRF kiri

R1

R1(config)#do 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 = 56/431/884 ms

Sekarang kita akan cek ke beda VRF

R1

R1(config)#do ping 4.4.4.4 
Type escape sequence to abort. 
Sending 5, 100-byte ICMP Echos to 4.4.4.4, timeout is 2 seconds: 
..... 
Success rate is 0 percent (0/5)



Comments