Setting OSPF Virtual Link Cisco – GNS3 Lab18

Setting OSPF Virtual Link Cisco – GNS3 Lab18

  • R1 FastEthernet 0/0 : 192.168.10.1
  • R1 Loopback 0 : 1.1.1.1
  • R2 FastEthernet 0/0 : 192.168.20.1
  • R2 Loopback 0 : 2.2.2.2
  • R3 FastEthernet 1/0 : 192.168.10.2
  • R3 FastEthernet 2/0 : 192.168.20.2
  • R3 FastEthernet 3/0 : 192.168.30.2
  • R4 FastEthernet 0/0 : 192.168.30.1
  • R4 Loopback 0 : 4.4.4.4

Setting IP address

  • R1
R1# configure terminal
R1(config)# interface fastEthernet 0/0
R1(config-if)# ip address 192.168.10.1 255.255.255.0
R1(config-if)# no shutdown
R1(config-if)# exit

R1(config)# interface loopback 0
R1(config-if)# ip address 1.1.1.1 255.255.255.0
R1(config-if)# exit
  • R2
R2# configure terminal
R2(config)# interface fastEthernet 0/0
R2(config-if)# ip address 192.168.20.1 255.255.255.0
R2(config-if)# no shutdown
R2(config-if)# exit

R2(config)# interface loopback 0
R2(config-if)# ip address 2.2.2.2 255.255.255.0
R2(config-if)# exit
  • R3
R3# configure terminal
R3(config)# interface fastEthernet 1/0
R3(config-if)# ip address 192.168.10.2 255.255.255.0
R3(config-if)# no shutdown
R3(config-if)# exit

R3(config)# interface fastEthernet 2/0
R3(config-if)# ip address 192.168.20.2 255.255.255.0
R3(config-if)# no shutdown
R3(config-if)# exit

R3(config)# interface fastEthernet 3/0
R3(config-if)# ip address 192.168.30.2 255.255.255.0
R3(config-if)# no shutdown
R3(config-if)# exit
  • R4
R4# configure terminal
R4(config)# interface fastEthernet 0/0
R4(config-if)# ip address 192.168.30.1 255.255.255.0
R4(config-if)# no shutdown
R4(config-if)# exit

R4(config)# interface loopback 0
R4(config-if)# ip address 4.4.4.4 255.255.255.0
R4(config-if)# exit

Setting OSPF

  • R1
R1# configure terminal
R1(config)# router ospf 1
R1(config-router)# network 1.1.1.0 0.0.0.255 area 0
R1(config-router)# network 192.168.10.0 0.0.0.255 area 1
R1(config-router)# exit
  • R2
R2# configure terminal
R2(config)# router ospf 1
R2(config-router)# network 2.2.2.0 0.0.0.255 area 0
R2(config-router)# network 192.168.20.0 0.0.0.255 area 1
R2(config-router)# exit
  • R3
R3# configure terminal
R3(config)# router ospf 1
R3(config-router)# network 192.168.10.0 0.0.0.255 area 1
R3(config-router)# network 192.168.20.0 0.0.0.255 area 1
R3(config-router)# network 192.168.30.0 0.0.0.255 area 1
R3(config-router)# exit
  • R4
R4#c onfigure terminal
R4(config)# router ospf 1
R4(config-router)# network 4.4.4.0 0.0.0.255 area 2
R4(config-router)# network 192.168.30.0 0.0.0.255 area 1
R4(config-router)# exit

  • Verifikasi Routing Table R3
R3# show ip ospf neighbor
Neighbor ID     Pri   State           Dead Time   Address         Interface
4.4.4.4           1   FULL/BDR        00:00:32    192.168.30.1    FastEthernet3/0
2.2.2.2           1   FULL/BDR        00:00:32    192.168.20.1    FastEthernet2/0
1.1.1.1           1   FULL/DR         00:00:30    192.168.10.1    FastEthernet1/0

R3# show ip route
Codes: 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

Gateway of last resort is not set
     1.0.0.0/32 is subnetted, 1 subnets
O IA    1.1.1.1 [110/2] via 192.168.10.1, 00:00:53, FastEthernet1/0
     2.0.0.0/32 is subnetted, 1 subnets
O IA    2.2.2.2 [110/2] via 192.168.20.1, 00:00:53, FastEthernet2/0
     3.0.0.0/24 is subnetted, 1 subnets
C       3.3.3.0 is directly connected, Loopback0
C    192.168.30.0/24 is directly connected, FastEthernet3/0
C    192.168.10.0/24 is directly connected, FastEthernet1/0
C    192.168.20.0/24 is directly connected, FastEthernet2/0

Setting OSPF Virtual Link

  • R1
R1# configure terminal
R1(config)# router ospf 1
R1(config-router)# area 1 virtual-link 2.2.2.2
R1(config-router)# area 1 virtual-link 4.4.4.4
R1(config-router)# exit
  • R2
R2# configure terminal
R2(config)# router ospf 1
R2(config-router)# area 1 virtual-link 1.1.1.1
R2(config-router)# area 1 virtual-link 4.4.4.4
R2(config-router)# exit
  • R4
R4# configure terminal
R4(config)# router ospf 1
R4(config-router)# area 1 virtual-link 1.1.1.1
R4(config-router)# area 1 virtual-link 2.2.2.2
R4(config-router)# exit

Verifikasi OSPF Virtual Link

  • R1
R1# show ip ospf neighbor
Neighbor ID     Pri   State           Dead Time   Address         Interface
4.4.4.4           0   FULL/  -           -        192.168.30.1    OSPF_VL1
2.2.2.2           0   FULL/  -           -        192.168.20.1    OSPF_VL0
3.3.3.3           1   FULL/BDR        00:00:36    192.168.10.2    FastEthernet0/0

R1# show ip route
Codes: 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

Gateway of last resort is not set
     1.0.0.0/24 is subnetted, 1 subnets
C       1.1.1.0 is directly connected, Loopback0
     2.0.0.0/32 is subnetted, 1 subnets
O       2.2.2.2 [110/3] via 192.168.10.2, 00:00:26, FastEthernet0/0
O    192.168.30.0/24 [110/2] via 192.168.10.2, 00:01:36, FastEthernet0/0
     4.0.0.0/32 is subnetted, 1 subnets
O IA    4.4.4.4 [110/3] via 192.168.10.2, 00:00:26, FastEthernet0/0
C    192.168.10.0/24 is directly connected, FastEthernet0/0
O    192.168.20.0/24 [110/2] via 192.168.10.2, 00:01:36, FastEthernet0/0
  • R2
R2# show ip ospf neighbor
Neighbor ID     Pri   State           Dead Time   Address         Interface
4.4.4.4           0   FULL/  -           -        192.168.30.1    OSPF_VL1
1.1.1.1           0   FULL/  -           -        192.168.10.1    OSPF_VL0
3.3.3.3           1   FULL/DR         00:00:36    192.168.20.2    FastEthernet0/0

R2# show ip route
Codes: 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

Gateway of last resort is not set
     1.0.0.0/32 is subnetted, 1 subnets
O       1.1.1.1 [110/3] via 192.168.20.2, 00:00:55, FastEthernet0/0
     2.0.0.0/24 is subnetted, 1 subnets
C       2.2.2.0 is directly connected, Loopback0
O    192.168.30.0/24 [110/2] via 192.168.20.2, 00:02:04, FastEthernet0/0
     4.0.0.0/32 is subnetted, 1 subnets
O IA    4.4.4.4 [110/3] via 192.168.20.2, 00:00:55, FastEthernet0/0
O    192.168.10.0/24 [110/2] via 192.168.20.2, 00:02:04, FastEthernet0/0
C    192.168.20.0/24 is directly connected, FastEthernet0/0
  • R4
R4# show ip ospf neighbor
Neighbor ID     Pri   State           Dead Time   Address         Interface
2.2.2.2           0   FULL/  -           -        192.168.20.1    OSPF_VL1
1.1.1.1           0   FULL/  -           -        192.168.10.1    OSPF_VL0
3.3.3.3           1   FULL/DR         00:00:34    192.168.30.2    FastEthernet0/0

R4# show ip route
Codes: 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

Gateway of last resort is not set
     1.0.0.0/32 is subnetted, 1 subnets
O       1.1.1.1 [110/3] via 192.168.30.2, 00:00:59, FastEthernet0/0
     2.0.0.0/32 is subnetted, 1 subnets
O       2.2.2.2 [110/3] via 192.168.30.2, 00:00:59, FastEthernet0/0
C    192.168.30.0/24 is directly connected, FastEthernet0/0
     4.0.0.0/24 is subnetted, 1 subnets
C       4.4.4.0 is directly connected, Loopback0
O    192.168.10.0/24 [110/2] via 192.168.30.2, 00:02:09, FastEthernet0/0
O    192.168.20.0/24 [110/2] via 192.168.30.2, 00:02:09, FastEthernet0/0

Pengujian

  • R1 > ping dari R1 ke R2 dan R4
R1# ping 2.2.2.2
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 2.2.2.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 56/61/68 ms

R1# 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 100 percent (5/5), round-trip min/avg/max = 60/62/72 ms
  • R2 > ping dari R2 ke R1 dan R4
R2# ping 1.1.1.1
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 = 48/61/72 ms

R2# 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 100 percent (5/5), round-trip min/avg/max = 52/62/72 ms
  • R4 > ping dari R4 ke R1 dan R2
R4# ping 1.1.1.1
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 = 56/61/68 ms

R4# ping 2.2.2.2
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 2.2.2.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 52/60/68 ms

herdiana3389

A system administrator with skills in system administration, virtualization, linux, windows, networking, cloud computing, container, etc.