Konfigurasi Routing OSPF Pada Cisco



OSPF merupakan kepanjangan dari Open Short Path First, yakni salah satu protokol routing yang digunakan untuk melakukan routing dinamik. OSPF banyak digunakan pada jaringan berskala besar. Salah satu kelebihannya adalah, ospf mampu mengetahui gambaran topologi yang digunakan pada jaringan.

Konfigurasi OSPF Single Area pada Cisco

Pada postingan kali ini kita akan membahas tentang konfigurasi routing ospf pada cisco. Perlu diketahui bahwa ospf dibedakan menjadi 2 berdasarkan area nya, yakni single area (hanya menggunakan area backbone) dan multiarea (menggunakan area backbone dan area lain). Di sini kita akan membahas ospf single area.
Sedikit pembahasan mengenai konfigurasi routing ospf, karena ospf termasuk dalam dynamic routing, maka untuk konfigurasi routing minimal terdiri dari dua langkah yakni mengaktifkan routing ospf pada router kemudian mengadvertise network yang terhubung secara langsung ke router. 

Perintah untuk mengaktifkan routing ospf :
router ospf [proccess_ID]
Untuk proccess ID setiap router tidak harus sama.

Perintah untuk advertise network :
network [network_address] [wildcard_mask] [area]
Jika pada routing eigrp penggunaan wildcard mask adalah opsional (hanya untuk mengadvertise network tertentu), maka pada routing ospf wajib menggunakan wildcard mask. Kemudian untuk area, karena kita akan mengkonfigurasi ospf single area, maka area yang digunakan adalah area 0 (area backbone).
Berikut adalah topologi yang akan digunakan :

Gambar Topologi OSPF
Device Interface IP Address Subnetmask Gateway
R1
FastEthernet 0/0 192.168.1.254 255.255.255.0
N/A
Serial 2/0 100.100.100.1 255.255.255.252
N/A
Serial 3/0 100.100.100.5 255.255.255.252
N/A
R2
FastEthernet 0/0 192.168.2.254 255.255.255.0
N/A
Serial 2/0 100.100.100.6 255.255.255.252
N/A
Serial 3/0 100.100.100.9 255.255.255.252
N/A
R3
FastEthernet 0/0 192.168.3.254 255.255.255.0
N/A
Serial 2/0 100.100.100.2 255.255.255.252
N/A
Serial 3/0 100.100.100.10 255.255.255.252
N/A
PC 1
FastEthernet 0 192.168.1.1 255.255.255.0 192.168.1.254
PC 2
FastEthernet 0 192.168.2.1 255.255.255.0 192.168.2.254
PC 3
FastEthernet 0 192.168.3.1 255.255.255.0 192.168.3.254
Tabel Pengalamatan IP

Untuk konfigurasi dasar seperti mengubah hostname dan memberikan ip address saya anggap semua sudah paham. Selanjutnya adalah melakukan konfigurasi inti yakni routing ospf.

Konfigurasi R1 :

R1(config) router ospf 1
R1(config-router)#network 192.168.1.0 0.0.0.255 area 0  
R1(config-router)#network 100.100.100.0 0.0.0.3 area 0 
R1(config-router)#network 100.100.100.4 0.0.0.3 area 0 
R1(config-router)#passive-interface fa0/0
R1(config-router)#do write
Building configuration...
[OK]
R1(config-router)#

Konfigurasi R2 :

R2(config)#router ospf 1
R2(config-router)#network 192.168.2.0 0.0.0.255 area 0
R2(config-router)#network 100.100.100.4 0.0.0.3 area 0
R2(config-router)#network 100.100.100.8 0.0.0.3 area 0
R2(config-router)#passive-interface fa0/0
R2(config-router)#do write
Building configuration...
[OK]
R2(config-router)#


Konfigurasi R3 :

R3(config) router ospf 1
R3(config-router)#network 192.168.3.0 0.0.0.255 area 0
R3(config-router)#network 100.100.100.8 0.0.0.3 area 0
R3(config-router)#network 100.100.100.0 0.0.0.3 area 0
R3(config-router)#passive-interface fa0/0
R3(config-router)#do write
Building configuration...
[OK]
R3(config-router)#


perintah "passive-interface" berfungsi untuk membuat interface tertentu menjadi pasif. Maksudnya, interface tersebut tidak akan mengirimkan pesan update ke router lain namun hanya menerima pesan update dari router lain. Biasanya passive-interface dikonfigurasikan pada interface yang terhubung ke end host (pc atau laptop).


Verifikasi/Pengujian

Untuk pengujiannya kita dapat melakukan tes ping dari pc satu ke pc lainnya, atau bisa juga dengan melihat tabel routing pada router. Seperti berikut :
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

     100.0.0.0/30 is subnetted, 3 subnets
C       100.100.100.0 is directly connected, Serial2/0
C       100.100.100.4 is directly connected, Serial3/0
O       100.100.100.8 [110/128] via 100.100.100.2, 00:00:59, Serial2/0
                      [110/128] via 100.100.100.6, 00:00:59, Serial3/0
C    192.168.1.0/24 is directly connected, FastEthernet0/0
O    192.168.2.0/24 [110/65] via 100.100.100.6, 00:03:42, Serial3/0
O    192.168.3.0/24 [110/65] via 100.100.100.2, 00:00:59, Serial2/0

R1#show ip route ospf 
     100.0.0.0/30 is subnetted, 3 subnets
O       100.100.100.8 [110/128] via 100.100.100.2, 00:01:52, Serial2/0
                      [110/128] via 100.100.100.6, 00:01:52, Serial3/0
O    192.168.2.0 [110/65] via 100.100.100.6, 00:04:35, Serial3/0
O    192.168.3.0 [110/65] via 100.100.100.2, 00:01:52, Serial2/0

R1#
----------------------------------------------------
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

     100.0.0.0/30 is subnetted, 3 subnets
O       100.100.100.0 [110/128] via 100.100.100.5, 00:02:16, Serial2/0
                      [110/128] via 100.100.100.10, 00:02:16, Serial3/0
C       100.100.100.4 is directly connected, Serial2/0
C       100.100.100.8 is directly connected, Serial3/0
O    192.168.1.0/24 [110/65] via 100.100.100.5, 00:04:59, Serial2/0
C    192.168.2.0/24 is directly connected, FastEthernet0/0
O    192.168.3.0/24 [110/65] via 100.100.100.10, 00:02:37, Serial3/0

R2#show ip route ospf
     100.0.0.0/30 is subnetted, 3 subnets
O       100.100.100.0 [110/128] via 100.100.100.5, 00:02:58, Serial2/0
                      [110/128] via 100.100.100.10, 00:02:58, Serial3/0
O    192.168.1.0 [110/65] via 100.100.100.5, 00:05:41, Serial2/0
O    192.168.3.0 [110/65] via 100.100.100.10, 00:03:19, Serial3/0

R2#
----------------------------------------------
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

     100.0.0.0/30 is subnetted, 3 subnets
C       100.100.100.0 is directly connected, Serial2/0
O       100.100.100.4 [110/128] via 100.100.100.9, 00:03:19, Serial3/0
                      [110/128] via 100.100.100.1, 00:03:19, Serial2/0
C       100.100.100.8 is directly connected, Serial3/0
O    192.168.1.0/24 [110/65] via 100.100.100.1, 00:03:19, Serial2/0
O    192.168.2.0/24 [110/65] via 100.100.100.9, 00:03:38, Serial3/0
C    192.168.3.0/24 is directly connected, FastEthernet0/0

R3#show ip route ospf
     100.0.0.0/30 is subnetted, 3 subnets
O       100.100.100.4 [110/128] via 100.100.100.9, 00:03:30, Serial3/0
                      [110/128] via 100.100.100.1, 00:03:30, Serial2/0
O    192.168.1.0 [110/65] via 100.100.100.1, 00:03:30, Serial2/0
O    192.168.2.0 [110/65] via 100.100.100.9, 00:03:49, Serial3/0

R3#

Terlihat bahwa terdapat entry route menggunakan routing ospf yang ditandai dengan simbol O yang artinya network tersebut dijangkau menggunakan routing ospf.

Sekian pembahasan routing ospf pada kali ini. Semoga dapat menambah wawasan dan memberikan pemahaman tentang konfigurasi routing ospf yang sederhana. Terima kasih.



Load Comments