Lab 2 - OSPF GRE Tunnel
Topologi yang digunakan adalah sbb :
Skenarionya adalah menyambungkan area 3 di router R3 ke area 0 di router R1.
Konfigurasi R1 :
interface Loopback0
ip address 1.1.1.1 255.255.255.255
!
interface FastEthernet0/0
ip address 12.12.12.1 255.255.255.0
!
ip address 1.1.1.1 255.255.255.255
!
interface FastEthernet0/0
ip address 12.12.12.1 255.255.255.0
!
router ospf 1
router-id 1.1.1.1
log-adjacency-changes
area 1 virtual-link 2.2.2.2
network 1.1.1.1 0.0.0.0 area 0
network 12.12.12.1 0.0.0.0 area 1
router-id 1.1.1.1
log-adjacency-changes
area 1 virtual-link 2.2.2.2
network 1.1.1.1 0.0.0.0 area 0
network 12.12.12.1 0.0.0.0 area 1
Konfigurasi R2 :
interface Loopback0
ip address 2.2.2.2 255.255.255.255
!
interface FastEthernet0/0
ip address 12.12.12.2 255.255.255.0
!
interface Serial0/0
ip address 23.23.23.2 255.255.255.0
!
router ospf 2
router-id 2.2.2.2
log-adjacency-changes
network 2.2.2.2 0.0.0.0 area 1
network 12.12.12.2 0.0.0.0 area 1
network 23.23.23.2 0.0.0.0 area 2
Konfigurasi R3 :
interface Loopback0
ip address 3.3.3.3 255.255.255.255
!
interface Serial0/0
ip address 23.23.23.3 255.255.255.0
!
router ospf 3
router-id 3.3.3.3
log-adjacency-changes
network 3.3.3.3 0.0.0.0 area 3
network 23.23.23.3 0.0.0.0 area 2
ip address 3.3.3.3 255.255.255.255
!
interface Serial0/0
ip address 23.23.23.3 255.255.255.0
!
router ospf 3
router-id 3.3.3.3
log-adjacency-changes
network 3.3.3.3 0.0.0.0 area 3
network 23.23.23.3 0.0.0.0 area 2
Hasil cek routing table pada kondisi awal :
R1(config-router)#do sh ip route
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
2.0.0.0/32 is subnetted, 1 subnets
O 2.2.2.2 [110/11] via 12.12.12.2, 00:08:02, FastEthernet0/0
12.0.0.0/24 is subnetted, 1 subnets
C 12.12.12.0 is directly connected, FastEthernet0/0
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
2.0.0.0/32 is subnetted, 1 subnets
O 2.2.2.2 [110/11] via 12.12.12.2, 00:08:02, FastEthernet0/0
12.0.0.0/24 is subnetted, 1 subnets
C 12.12.12.0 is directly connected, FastEthernet0/0
R2(config-router)#do sh ip route
Gateway of last resort is not set
1.0.0.0/32 is subnetted, 1 subnets
O IA 1.1.1.1 [110/11] via 12.12.12.1, 00:00:47, FastEthernet0/0
2.0.0.0/32 is subnetted, 1 subnets
C 2.2.2.2 is directly connected, Loopback0
23.0.0.0/24 is subnetted, 1 subnets
C 23.23.23.0 is directly connected, Serial0/0
12.0.0.0/24 is subnetted, 1 subnets
C 12.12.12.0 is directly connected, FastEthernet0/0
Gateway of last resort is not set
1.0.0.0/32 is subnetted, 1 subnets
O IA 1.1.1.1 [110/11] via 12.12.12.1, 00:00:47, FastEthernet0/0
2.0.0.0/32 is subnetted, 1 subnets
C 2.2.2.2 is directly connected, Loopback0
23.0.0.0/24 is subnetted, 1 subnets
C 23.23.23.0 is directly connected, Serial0/0
12.0.0.0/24 is subnetted, 1 subnets
C 12.12.12.0 is directly connected, FastEthernet0/0
R3(config-router)#do sh ip route
Gateway of last resort is not set
3.0.0.0/32 is subnetted, 1 subnets
C 3.3.3.3 is directly connected, Loopback0
23.0.0.0/24 is subnetted, 1 subnets
C 23.23.23.0 is directly connected, Serial0/0
Gateway of last resort is not set
3.0.0.0/32 is subnetted, 1 subnets
C 3.3.3.3 is directly connected, Loopback0
23.0.0.0/24 is subnetted, 1 subnets
C 23.23.23.0 is directly connected, Serial0/0
Terlihat bahwa pada router R1, R2 dan R3 tidak lengkap menerima routing dari masing - masing area.
Karena yang terhubung ke Area 0 hanya R1, sedangkan R2 dan R3 tidak.
Pertama kita buat GRE Tunnel antara R1 dan R2:
R1(config)#int tun1
R1(config-if)#ip address
R1(config-if)#ip address 102.102.102.1 255.255.255.0
R1(config-if)#tunnel source 12.12.12.1
R1(config-if)#tunnel destination 12.12.12.2
R1(config-if)#router ospf 1
R1(config-router)#network 102.102.102.1 0.0.0.0 area 0
R2(config)#int tun1R1(config-if)#ip address
R1(config-if)#ip address 102.102.102.1 255.255.255.0
R1(config-if)#tunnel source 12.12.12.1
R1(config-if)#tunnel destination 12.12.12.2
R1(config-if)#router ospf 1
R1(config-router)#network 102.102.102.1 0.0.0.0 area 0
R2(config-if)#ip add 102.1
R2(config-if)#ip add 102.102.102.2 255.255.255.0
R2(config-if)#tunnel source 12.12.12.2
R2(config-if)#tunnel destination 12.12.12.1
R2(config-if)#router ospf 2
R2(config-router)#network 102.102.102.2 0.0.0.0 area 0
Kemudian kita buat GRE Tunnel antara R2 dan R3 :
R2(config)#int tun2
R2(config-if)#ip add 203.203.203.2 255.255.255.0
R2(config-if)#tunnel source 23.23.23.2
R2(config-if)#tunnel destination 23.23.23.3
R2(config-if)#router ospf 2
R2(config-router)#network 203.203.203.2 0.0.0.0 area 0
R2(config-if)#ip add 203.203.203.2 255.255.255.0
R2(config-if)#tunnel source 23.23.23.2
R2(config-if)#tunnel destination 23.23.23.3
R2(config-if)#router ospf 2
R2(config-router)#network 203.203.203.2 0.0.0.0 area 0
R3(config)#int tun1
R3(config-if)#ip add 203.203.203.3 255.255.255.0
R3(config-if)#tunnel source 23.23.23.3
R3(config-if)#tunnel destination 23.23.23.2
R3(config-if)#router ospf 3
R3(config-router)#network 203.203.203.3 0.0.0.0 area 0
R3(config-if)#ip add 203.203.203.3 255.255.255.0
R3(config-if)#tunnel source 23.23.23.3
R3(config-if)#tunnel destination 23.23.23.2
R3(config-if)#router ospf 3
R3(config-router)#network 203.203.203.3 0.0.0.0 area 0
Kita cek ip ospf neighbor pada masing - masing router :
R1(config-router)#do sh ip ospf neighbor
Neighbor ID Pri State Dead Time Address Interface
2.2.2.2 0 FULL/ - 00:00:39 102.102.102.2 Tunnel1
2.2.2.2 1 FULL/DR 00:00:34 12.12.12.2 FastEthernet0/0
Neighbor ID Pri State Dead Time Address Interface
2.2.2.2 0 FULL/ - 00:00:39 102.102.102.2 Tunnel1
2.2.2.2 1 FULL/DR 00:00:34 12.12.12.2 FastEthernet0/0
R2(config-router)#do sh ip ospf neighbor
Neighbor ID Pri State Dead Time Address Interface
3.3.3.3 0 FULL/ - 00:00:33 203.203.203.3 Tunnel2
1.1.1.1 0 FULL/ - 00:00:34 102.102.102.1 Tunnel1
1.1.1.1 1 FULL/BDR 00:00:34 12.12.12.1 FastEthernet0/0
3.3.3.3 0 FULL/ - 00:00:31 23.23.23.3 Serial0/0
R3(config-router)#do sh ip ospf neighborNeighbor ID Pri State Dead Time Address Interface
3.3.3.3 0 FULL/ - 00:00:33 203.203.203.3 Tunnel2
1.1.1.1 0 FULL/ - 00:00:34 102.102.102.1 Tunnel1
1.1.1.1 1 FULL/BDR 00:00:34 12.12.12.1 FastEthernet0/0
3.3.3.3 0 FULL/ - 00:00:31 23.23.23.3 Serial0/0
Neighbor ID Pri State Dead Time Address Interface
2.2.2.2 0 FULL/ - 00:00:33 203.203.203.2 Tunnel1
2.2.2.2 0 FULL/ - 00:00:30 23.23.23.2 Serial0/0
Terlihat bahwa OSPF relation sudah terbentuk melalui GRE Tunnel yang sudah kita buat.
Sekarang kita cek routing table dari masing - masing router :
R1(config-router)#do sh ip route
Gateway of last resort is not set
102.0.0.0/24 is subnetted, 1 subnets
C 102.102.102.0 is directly connected, Tunnel1
O 203.203.203.0/24 [110/22222] via 102.102.102.2, 00:09:12, Tunnel1
1.0.0.0/32 is subnetted, 1 subnets
C 1.1.1.1 is directly connected, Loopback0
2.0.0.0/32 is subnetted, 1 subnets
O 2.2.2.2 [110/11] via 12.12.12.2, 01:03:23, FastEthernet0/0
3.0.0.0/32 is subnetted, 1 subnets
O IA 3.3.3.3 [110/22223] via 102.102.102.2, 00:08:20, Tunnel1
23.0.0.0/24 is subnetted, 1 subnets
O IA 23.23.23.0 [110/11175] via 102.102.102.2, 00:12:17, Tunnel1
12.0.0.0/24 is subnetted, 1 subnets
C 12.12.12.0 is directly connected, FastEthernet0/0
Gateway of last resort is not set
102.0.0.0/24 is subnetted, 1 subnets
C 102.102.102.0 is directly connected, Tunnel1
O 203.203.203.0/24 [110/22222] via 102.102.102.2, 00:09:12, Tunnel1
1.0.0.0/32 is subnetted, 1 subnets
C 1.1.1.1 is directly connected, Loopback0
2.0.0.0/32 is subnetted, 1 subnets
O 2.2.2.2 [110/11] via 12.12.12.2, 01:03:23, FastEthernet0/0
3.0.0.0/32 is subnetted, 1 subnets
O IA 3.3.3.3 [110/22223] via 102.102.102.2, 00:08:20, Tunnel1
23.0.0.0/24 is subnetted, 1 subnets
O IA 23.23.23.0 [110/11175] via 102.102.102.2, 00:12:17, Tunnel1
12.0.0.0/24 is subnetted, 1 subnets
C 12.12.12.0 is directly connected, FastEthernet0/0
R2(config-router)#do sh ip route
Gateway of last resort is not set
102.0.0.0/24 is subnetted, 1 subnets
C 102.102.102.0 is directly connected, Tunnel1
C 203.203.203.0/24 is directly connected, Tunnel2
1.0.0.0/32 is subnetted, 1 subnets
O 1.1.1.1 [110/11112] via 102.102.102.1, 00:12:37, Tunnel1
2.0.0.0/32 is subnetted, 1 subnets
C 2.2.2.2 is directly connected, Loopback0
3.0.0.0/32 is subnetted, 1 subnets
O IA 3.3.3.3 [110/11112] via 203.203.203.3, 00:08:52, Tunnel2
23.0.0.0/24 is subnetted, 1 subnets
C 23.23.23.0 is directly connected, Serial0/0
12.0.0.0/24 is subnetted, 1 subnets
C 12.12.12.0 is directly connected, FastEthernet0/0
Gateway of last resort is not set
102.0.0.0/24 is subnetted, 1 subnets
C 102.102.102.0 is directly connected, Tunnel1
C 203.203.203.0/24 is directly connected, Tunnel2
1.0.0.0/32 is subnetted, 1 subnets
O 1.1.1.1 [110/11112] via 102.102.102.1, 00:12:37, Tunnel1
2.0.0.0/32 is subnetted, 1 subnets
C 2.2.2.2 is directly connected, Loopback0
3.0.0.0/32 is subnetted, 1 subnets
O IA 3.3.3.3 [110/11112] via 203.203.203.3, 00:08:52, Tunnel2
23.0.0.0/24 is subnetted, 1 subnets
C 23.23.23.0 is directly connected, Serial0/0
12.0.0.0/24 is subnetted, 1 subnets
C 12.12.12.0 is directly connected, FastEthernet0/0
R3(config-router)#do sh ip route
Gateway of last resort is not set
102.0.0.0/24 is subnetted, 1 subnets
O 102.102.102.0 [110/22222] via 203.203.203.2, 00:09:08, Tunnel1
C 203.203.203.0/24 is directly connected, Tunnel1
1.0.0.0/32 is subnetted, 1 subnets
O 1.1.1.1 [110/22223] via 203.203.203.2, 00:09:08, Tunnel1
2.0.0.0/32 is subnetted, 1 subnets
O IA 2.2.2.2 [110/11112] via 203.203.203.2, 00:09:08, Tunnel1
3.0.0.0/32 is subnetted, 1 subnets
C 3.3.3.3 is directly connected, Loopback0
23.0.0.0/24 is subnetted, 1 subnets
C 23.23.23.0 is directly connected, Serial0/0
12.0.0.0/24 is subnetted, 1 subnets
O IA 12.12.12.0 [110/11121] via 203.203.203.2, 00:09:09, Tunnel1
Gateway of last resort is not set
102.0.0.0/24 is subnetted, 1 subnets
O 102.102.102.0 [110/22222] via 203.203.203.2, 00:09:08, Tunnel1
C 203.203.203.0/24 is directly connected, Tunnel1
1.0.0.0/32 is subnetted, 1 subnets
O 1.1.1.1 [110/22223] via 203.203.203.2, 00:09:08, Tunnel1
2.0.0.0/32 is subnetted, 1 subnets
O IA 2.2.2.2 [110/11112] via 203.203.203.2, 00:09:08, Tunnel1
3.0.0.0/32 is subnetted, 1 subnets
C 3.3.3.3 is directly connected, Loopback0
23.0.0.0/24 is subnetted, 1 subnets
C 23.23.23.0 is directly connected, Serial0/0
12.0.0.0/24 is subnetted, 1 subnets
O IA 12.12.12.0 [110/11121] via 203.203.203.2, 00:09:09, Tunnel1
Terlihat bahwa untuk routing table dari all router saat ini sudah lengkap.
Kita coba test ping dari R1 ke IP Loopback R3 maupun sebaliknya dari R3 ke IP Loopback R1 :
R1(config-router)#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 = 16/24/48 ms
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 = 16/24/48 ms
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 1.1.1.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 20/27/36 ms
Yak, akhirnya ping nya sudah berhasil :)
Tidak ada komentar:
Posting Komentar