OSPF on Cisco

Kali ini kita akan ngelab OSPF. Konsep OSPF sudah saya bahas dalam postingan sebelumnya.  Dalam postingan ini kita hanya fokus ngelab saja ya 🙂 Dalam lab kali ini saya tidak memasukkan client ke dalam topologi. Untuk penggantinya anda dapat menggunakan interface loopback. Interface loopback sering digunakan karena bila sekalipun ada masalah pada inteface fisik di router, interface loopback tidak akan pernah down. Intinya seperti itu.

Topologi

Screenshot_2eUntuk memudahkan ngelab, ip address yang digunakan sesuai dengan nama router. Contoh: di interface fa0/0 ip addressnya 12.12.12.1 karena interface

Konfigurasi

Tambahkan ip address disetiap interface router, contoh:

interface fa0/0ip address 12.12.12.1 255.255.255.0no shutdown

Konfigurasi OSPF di tiap router, contoh:

router ospf 1
network 12.12.12.0 0.0.0.255 area 0

1 adalah process-id ospf
network digunakan untuk menambahkan network agar dapat diadvertise
0.0.0.255
adalah wildcard mask

Untuk router yang ada interface loopbacknya, tambahkan

network 1.1.1.1 0.0.0.0 area 0
passive-inteface lo0

0.0.0.0 adalah wildcard mask dari /32 atau 255.255.255.255
passive-interface digunakan agar interface tersebut tidak menerima/mengirim hello packet

Bila sudah selesai, lihat tabel routing di setiap router

IDN-R1#show ip route 
Codes: C - connected, S - static, I - IGRP, 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, E - EGP
       i - IS-IS, 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
C       1.1.1.1 is directly connected, Loopback0
     5.0.0.0/32 is subnetted, 1 subnets
O       5.5.5.5 [110/3] via 13.13.13.3, 00:46:17, FastEthernet0/1
     12.0.0.0/24 is subnetted, 1 subnets
C       12.12.12.0 is directly connected, FastEthernet0/0
     13.0.0.0/24 is subnetted, 1 subnets
C       13.13.13.0 is directly connected, FastEthernet0/1
     24.0.0.0/24 is subnetted, 1 subnets
O       24.24.24.0 [110/2] via 12.12.12.2, 00:46:37, FastEthernet0/0
     35.0.0.0/24 is subnetted, 1 subnets
O       35.35.35.0 [110/2] via 13.13.13.3, 00:46:27, FastEthernet0/1
     45.0.0.0/24 is subnetted, 1 subnets
O       45.45.45.0 [110/3] via 12.12.12.2, 00:46:17, FastEthernet0/0
                   [110/3] via 13.13.13.3, 00:46:17, FastEthernet0/1
IDN-R2#show ip route
Codes: C - connected, S - static, I - IGRP, 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, E - EGP
       i - IS-IS, 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/2] via 12.12.12.1, 00:48:00, FastEthernet0/0
     5.0.0.0/32 is subnetted, 1 subnets
O       5.5.5.5 [110/3] via 24.24.24.4, 00:47:03, FastEthernet0/1
     12.0.0.0/24 is subnetted, 1 subnets
C       12.12.12.0 is directly connected, FastEthernet0/0
     13.0.0.0/24 is subnetted, 1 subnets
O       13.13.13.0 [110/2] via 12.12.12.1, 00:47:44, FastEthernet0/0
     24.0.0.0/24 is subnetted, 1 subnets
C       24.24.24.0 is directly connected, FastEthernet0/1
     35.0.0.0/24 is subnetted, 1 subnets
O       35.35.35.0 [110/3] via 12.12.12.1, 00:47:03, FastEthernet0/0
                   [110/3] via 24.24.24.4, 00:47:03, FastEthernet0/1
     45.0.0.0/24 is subnetted, 1 subnets
O       45.45.45.0 [110/2] via 24.24.24.4, 00:47:03, FastEthernet0/1
IDN-R3#show ip route 
Codes: C - connected, S - static, I - IGRP, 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, E - EGP
       i - IS-IS, 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/2] via 13.13.13.1, 00:48:44, FastEthernet0/0
     5.0.0.0/32 is subnetted, 1 subnets
O       5.5.5.5 [110/2] via 35.35.35.5, 00:48:03, FastEthernet0/1
     12.0.0.0/24 is subnetted, 1 subnets
O       12.12.12.0 [110/2] via 13.13.13.1, 00:48:44, FastEthernet0/0
     13.0.0.0/24 is subnetted, 1 subnets
C       13.13.13.0 is directly connected, FastEthernet0/0
     24.0.0.0/24 is subnetted, 1 subnets
O       24.24.24.0 [110/3] via 13.13.13.1, 00:48:03, FastEthernet0/0
                   [110/3] via 35.35.35.5, 00:48:03, FastEthernet0/1
     35.0.0.0/24 is subnetted, 1 subnets
C       35.35.35.0 is directly connected, FastEthernet0/1
     45.0.0.0/24 is subnetted, 1 subnets
O       45.45.45.0 [110/2] via 35.35.35.5, 00:48:03, FastEthernet0/1
IDN-R4#show ip route 
Codes: C - connected, S - static, I - IGRP, 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, E - EGP
       i - IS-IS, 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 24.24.24.2, 00:49:12, FastEthernet0/0
     5.0.0.0/32 is subnetted, 1 subnets
O       5.5.5.5 [110/2] via 45.45.45.5, 00:48:55, FastEthernet0/1
     12.0.0.0/24 is subnetted, 1 subnets
O       12.12.12.0 [110/2] via 24.24.24.2, 00:49:12, FastEthernet0/0
     13.0.0.0/24 is subnetted, 1 subnets
O       13.13.13.0 [110/3] via 24.24.24.2, 00:48:55, FastEthernet0/0
                   [110/3] via 45.45.45.5, 00:48:55, FastEthernet0/1
     24.0.0.0/24 is subnetted, 1 subnets
C       24.24.24.0 is directly connected, FastEthernet0/0
     35.0.0.0/24 is subnetted, 1 subnets
O       35.35.35.0 [110/2] via 45.45.45.5, 00:48:55, FastEthernet0/1
     45.0.0.0/24 is subnetted, 1 subnets
C       45.45.45.0 is directly connected, FastEthernet0/1
IDN-R5#show ip route
Codes: C - connected, S - static, I - IGRP, 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, E - EGP
       i - IS-IS, 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 35.35.35.3, 00:49:49, FastEthernet0/1
     5.0.0.0/32 is subnetted, 1 subnets
C       5.5.5.5 is directly connected, Loopback0
     12.0.0.0/24 is subnetted, 1 subnets
O       12.12.12.0 [110/3] via 35.35.35.3, 00:49:49, FastEthernet0/1
                   [110/3] via 45.45.45.4, 00:49:49, FastEthernet0/0
     13.0.0.0/24 is subnetted, 1 subnets
O       13.13.13.0 [110/2] via 35.35.35.3, 00:49:49, FastEthernet0/1
     24.0.0.0/24 is subnetted, 1 subnets
O       24.24.24.0 [110/2] via 45.45.45.4, 00:49:49, FastEthernet0/0
     35.0.0.0/24 is subnetted, 1 subnets
C       35.35.35.0 is directly connected, FastEthernet0/1
     45.0.0.0/24 is subnetted, 1 subnets
C       45.45.45.0 is directly connected, FastEthernet0/0

Kemudian test ping dari router 1 ke looback 0 router 5 dan dari router 5 ke loopback 0 router 1

IDN-R5#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 = 0/0/1 ms

IDN-R5#
IDN-R1#ping 5.5.5.5

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 5.5.5.5, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 0/0/1 ms

IDN-R1#

Kemudian traceroute dari router1 ke loopback 0 router 5

IDN-R1#traceroute 5.5.5.5
Type escape sequence to abort.
Tracing the route to 5.5.5.5

  1   13.13.13.3      1 msec    0 msec    0 msec    
  2   35.35.35.5      0 msec    0 msec    0 msec    
IDN-R1#

Bila diperhatikan, router yang digunakan adalah melalui IDN-R3,  maka sama saja dengan RIPv2 yang sudah saya bahas kemarin ya? iya karena dalam lab ini, saya belum memperlihatkan cost. Akan saya bahas di postingan selanjutnya ya 🙂

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s