Belajar Routing Dinamis – OSPF Part 2

Halo.. balik lagi ke latihan menggunakan protokol OSPF. Sebelumnya kita telah belajar konfigurasi OSPF antar area. Sekarang kita coba menganalisa event-event yang terjadi pada protokol OSPF.

Untuk menganalisa event-event yang terjadi pada protokol OSPF kita harus menggunakan perintah:

debug ip ospf events

Kemudian kita nyalakan router tersebut (jika start dari kondisi off) atau matikan interface yang menghubungkan antara dua router yang menjalankan OSPF kemudian nyalakan kembali.

Contoh hasil event yg terjadi antara router ISP dan JKT via e0/0 (192.168.10.0/24).

*Mar  1 00:42:17.787: OSPF: Interface Ethernet0/0 going Up
*Mar  1 00:42:17.791: OSPF: Send hello to 224.0.0.5 area 1 on Ethernet0/0 from 192.168.10.1
*Mar  1 00:42:19.771: %LINK-3-UPDOWN: Interface Ethernet0/0, changed state to up
*Mar  1 00:42:20.771: %LINEPROTO-5-UPDOWN: Line protocol on Interface Ethernet0/0, changed state to up
*Mar  1 00:42:22.367: OSPF: Rcv hello from 2.2.2.2 area 1 from Ethernet0/0 192.168.10.2
*Mar  1 00:42:22.371: OSPF: 2 Way Communication to 2.2.2.2 on Ethernet0/0, state 2WAY
*Mar  1 00:42:22.371: OSPF: Backup seen Event before WAIT timer on Ethernet0/0
*Mar  1 00:42:22.375: OSPF: DR/BDR election on Ethernet0/0
*Mar  1 00:42:22.375: OSPF: Elect BDR 1.1.1.1
*Mar  1 00:42:22.379: OSPF: Elect DR 2.2.2.2
*Mar  1 00:42:22.379: OSPF: Elect BDR 1.1.1.1
*Mar  1 00:42:22.379: OSPF: Elect DR 2.2.2.2
*Mar  1 00:42:22.383:        DR: 2.2.2.2 (Id)   BDR: 1.1.1.1 (Id)
*Mar  1 00:42:22.383: OSPF: Send DBD to 2.2.2.2 on Ethernet0/0 seq 0x2672 opt 0x52 flag 0x7 len 32
*Mar  1 00:42:22.391: OSPF: End of hello processing
*Mar  1 00:42:27.391: OSPF: Send DBD to 2.2.2.2 on Ethernet0/0 seq 0x2672 opt 0x52 flag 0x7 len 32
*Mar  1 00:42:27.395: OSPF: Retransmitting DBD to 2.2.2.2 on Ethernet0/0 [1]
*Mar  1 00:42:27.439: OSPF: Rcv DBD from 2.2.2.2 on Ethernet0/0 seq 0x10C opt 0x52 flag 0x7 len 32  mtu 1500 s                                                          tate EXSTART
*Mar  1 00:42:27.443: OSPF: NBR Negotiation Done. We are the SLAVE
*Mar  1 00:42:27.443: OSPF: Send DBD to 2.2.2.2 on Ethernet0/0 seq 0x10C opt 0x52 flag 0x2 len 152
*Mar  1 00:42:27.471: OSPF: Rcv DBD from 2.2.2.2 on Ethernet0/0 seq 0x10D opt 0x52 flag 0x3 len 312  mtu 1500                                                           state EXCHANGE
*Mar  1 00:42:27.475: OSPF: Send DBD to 2.2.2.2 on Ethernet0/0 seq 0x10D opt 0x52 flag 0x0 len 32
*Mar  1 00:42:27.475: OSPF: Database request to 2.2.2.2
*Mar  1 00:42:27.475: OSPF: sent LS REQ packet to 192.168.10.2, length 132
*Mar  1 00:42:27.491: OSPF: Rcv DBD from 2.2.2.2 on Ethernet0/0 seq 0x10E opt 0x52 flag 0x1 len 32  mtu 1500 s                                                          tate EXCHANGE
*Mar  1 00:42:27.491: OSPF: Exchange Done with 2.2.2.2 on Ethernet0/0
*Mar  1 00:42:27.491: OSPF: Send DBD to 2.2.2.2 on Ethernet0/0 seq 0x10E opt 0x52 flag 0x0 len 32
*Mar  1 00:42:27.503: OSPF: Synchronized with 2.2.2.2 on Ethernet0/0, state FULL
*Mar  1 00:42:27.503: %OSPF-5-ADJCHG: Process 100, Nbr 2.2.2.2 on Ethernet0/0 from LOADING to FULL, Loading Do                                                          ne
*Mar  1 00:42:27.795: OSPF: Send hello to 224.0.0.5 area 1 on Ethernet0/0 from 192.168.10.1
*Mar  1 00:42:32.355: OSPF: Rcv hello from 2.2.2.2 area 1 from Ethernet0/0 192.168.10.2
*Mar  1 00:42:32.359: OSPF: Neighbor change Event on interface Ethernet0/0
*Mar  1 00:42:32.359: OSPF: DR/BDR election on Ethernet0/0
*Mar  1 00:42:32.363: OSPF: Elect BDR 1.1.1.1
*Mar  1 00:42:32.363: OSPF: Elect DR 2.2.2.2
*Mar  1 00:42:32.363:        DR: 2.2.2.2 (Id)   BDR: 1.1.1.1 (Id)
*Mar  1 00:42:32.367: OSPF: End of hello processing
*Mar  1 00:42:37.795: OSPF: Send hello to 224.0.0.5 area 1 on Ethernet0/0 from 192.168.10.1
*Mar  1 00:42:42.331: OSPF: Rcv hello from 2.2.2.2 area 1 from Ethernet0/0 192.168.10.2
*Mar  1 00:42:42.335: OSPF: End of hello processing

===================

Wow, sungguh panjang bukan? ya begitulah proses adjancecy pada protokol OSPF. Analoginya dalam kehidupan nyata seperti orang saling sapa, kemudian berkenalan dan akhirnya saling bertukar informasi.

Kita coba bahas sedikit demi sedikit mengenai hasil command di atas.

*Mar  1 00:42:17.787: OSPF: Interface Ethernet0/0 going Up
*Mar  1 00:42:17.791: OSPF: Send hello to 224.0.0.5 area 1 on Ethernet0/0 from 192.168.10.1
*Mar  1 00:42:19.771: %LINK-3-UPDOWN: Interface Ethernet0/0, changed state to up
*Mar  1 00:42:20.771: %LINEPROTO-5-UPDOWN: Line protocol on Interface Ethernet0/0, changed state to up

Interface e0/0 pada router ISP sudah nyala kemudian mengirimkan paket HELLO ke 224.0.0.5 (multicast address OSPF) ke area 1 (router JKT). Line protocol (layer 2) pada router ISP juga sudah nyala.

Ingat bahwa informasi Line protocol selalu merujuk ke layer dua (2) interface tersebut. Alamat multicast OSPF berbeda dengan alamat multicast RIP. OSPF: 224.0.0.5 sedangkan multicast RIP: 224.0.0.9

*Mar  1 00:42:22.367: OSPF: Rcv hello from 2.2.2.2 area 1 from Ethernet0/0 192.168.10.2
*Mar  1 00:42:22.371: OSPF: 2 Way Communication to 2.2.2.2 on Ethernet0/0, state 2WAY
*Mar  1 00:42:22.371: OSPF: Backup seen Event before WAIT timer on Ethernet0/0
*Mar  1 00:42:22.375: OSPF: DR/BDR election on Ethernet0/0
*Mar  1 00:42:22.375: OSPF: Elect BDR 1.1.1.1
*Mar  1 00:42:22.379: OSPF: Elect DR 2.2.2.2
*Mar  1 00:42:22.379: OSPF: Elect BDR 1.1.1.1
*Mar  1 00:42:22.379: OSPF: Elect DR 2.2.2.2
*Mar  1 00:42:22.383:        DR: 2.2.2.2 (Id)   BDR: 1.1.1.1 (Id)

Router menerima paket HELLO dari area 1 melalui ethernet 0/0 kemudian menjalin komunikasi dua arah untuk berbagi DBD (database descriptor—berisi Router ID, priority, area ID, hello and dead interval, etc). Namun sebelum itu dia mengecek informasi DR (designated router)/BDR (backup designated router) yang tersimpan pada dirinya untuk nantinya dibandingkan dengan informasi yang didapatkan dari router tetangganya.

*Mar  1 00:42:27.391: OSPF: Send DBD to 2.2.2.2 on Ethernet0/0 seq 0x2672 opt 0x52 flag 0x7 len 32
*Mar  1 00:42:27.395: OSPF: Retransmitting DBD to 2.2.2.2 on Ethernet0/0 [1]
*Mar  1 00:42:27.439: OSPF: Rcv DBD from 2.2.2.2 on Ethernet0/0 seq 0x10C opt 0x52 flag 0x7 len 32  mtu 1500 s                                                          tate EXSTART
*Mar  1 00:42:27.443: OSPF: NBR Negotiation Done. We are the SLAVE
*Mar  1 00:42:27.443: OSPF: Send DBD to 2.2.2.2 on Ethernet0/0 seq 0x10C opt 0x52 flag 0x2 len 152
*Mar  1 00:42:27.471: OSPF: Rcv DBD from 2.2.2.2 on Ethernet0/0 seq 0x10D opt 0x52 flag 0x3 len 312  mtu 1500                                                           state EXCHANGE
*Mar  1 00:42:27.475: OSPF: Send DBD to 2.2.2.2 on Ethernet0/0 seq 0x10D opt 0x52 flag 0x0 len 32
*Mar  1 00:42:27.475: OSPF: Database request to 2.2.2.2
*Mar  1 00:42:27.475: OSPF: sent LS REQ packet to 192.168.10.2, length 132
*Mar  1 00:42:27.491: OSPF: Rcv DBD from 2.2.2.2 on Ethernet0/0 seq 0x10E opt 0x52 flag 0x1 len 32  mtu 1500 s                                                          tate EXCHANGE
*Mar  1 00:42:27.491: OSPF: Exchange Done with 2.2.2.2 on Ethernet0/0
*Mar  1 00:42:27.491: OSPF: Send DBD to 2.2.2.2 on Ethernet0/0 seq 0x10E opt 0x52 flag 0x0 len 32

Proses pengiriman DBD ke router JKT dimulai (EXSTART) dan dilakukan pertukaran DBD (EXCHANGE) dan perbandingan DBD sehingga dapat ditentukan mana yang menjadi MASTER (DR) dan SLAVE (BDR). DR bertanggung jawab terhadap sinkronisasi antar router dalam satu area yang sama. Apabila router DR down, maka router yang ditunjuk sebagai BDR secara otomatis mengambil tanggung jawab DR.

*Mar  1 00:42:27.503: OSPF: Synchronized with 2.2.2.2 on Ethernet0/0, state FULL
*Mar  1 00:42:27.503: %OSPF-5-ADJCHG: Process 100, Nbr 2.2.2.2 on Ethernet0/0 from LOADING to FULL, Loading Do                                                          ne
*Mar  1 00:42:27.795: OSPF: Send hello to 224.0.0.5 area 1 on Ethernet0/0 from 192.168.10.1
*Mar  1 00:42:32.355: OSPF: Rcv hello from 2.2.2.2 area 1 from Ethernet0/0 192.168.10.2
*Mar  1 00:42:32.359: OSPF: Neighbor change Event on interface Ethernet0/0
*Mar  1 00:42:32.359: OSPF: DR/BDR election on Ethernet0/0
*Mar  1 00:42:32.363: OSPF: Elect BDR 1.1.1.1
*Mar  1 00:42:32.363: OSPF: Elect DR 2.2.2.2
*Mar  1 00:42:32.363:        DR: 2.2.2.2 (Id)   BDR: 1.1.1.1 (Id)
*Mar  1 00:42:32.367: OSPF: End of hello processing
*Mar  1 00:42:37.795: OSPF: Send hello to 224.0.0.5 area 1 on Ethernet0/0 from 192.168.10.1
*Mar  1 00:42:42.331: OSPF: Rcv hello from 2.2.2.2 area 1 from Ethernet0/0 192.168.10.2
*Mar  1 00:42:42.335: OSPF: End of hello processing

Proses adjacency antara router ISP dan JKT sudah FULL yang artinya sudah dapat berbagi informasi routing table. Selanjutnya secara periodik router-router tersebut mengirim paket HELLO untuk memastikan eksistensi router-router tetangganya.

Nah, selain area id, hello interval dan dead interval antar router OSPF juga harus memiliki nilai yang sama. Jika berbeda maka adjacency tidak akan terjadi dan router tidak dapat berbagi informasi routing table dengan router tetangganya.

Mari kita coba membuktikannya.

Kita lihat dulu nilai hello interval dan dead interval pada interface router ISP yang terhubung dengan router JKT.

ISP#sh ip ospf int e0/0
Ethernet0/0 is up, line protocol is up
  Internet Address 192.168.10.1/24, Area 1
  Process ID 100, Router ID 1.1.1.1, Network Type BROADCAST, Cost: 10
  Transmit Delay is 1 sec, State BDR, Priority 1
  Designated Router (ID) 2.2.2.2, Interface address 192.168.10.2
  Backup Designated router (ID) 1.1.1.1, Interface address 192.168.10.1
  Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
    oob-resync timeout 40
    Hello due in 00:00:03
  Supports Link-local Signaling (LLS)
  Index 1/2, flood queue length 0
  Next 0x0(0)/0x0(0)
  Last flood scan length is 10, maximum is 10
  Last flood scan time is 0 msec, maximum is 4 msec
  Neighbor Count is 1, Adjacent neighbor count is 1
    Adjacent with neighbor 2.2.2.2  (Designated Router)
  Suppress hello for 0 neighbor(s)

Lihat perintah yang ditebalkan. Hello 10 artinya memiliki nilai interval 10, Dead 40 artinya memiliki nilai interval 40. Nilai tersebut diperoleh dari 4x nilai hello interval.

Kita lihat juga nilai hello interval dan dead interval pada interface router JKT yang terhubung dengan router ISP.

JKT#sh ip ospf int e0/0
Ethernet0/0 is up, line protocol is up
  Internet Address 192.168.10.2/24, Area 1
  Process ID 100, Router ID 2.2.2.2, Network Type BROADCAST, Cost: 10
  Transmit Delay is 1 sec, State DR, Priority 1
  Designated Router (ID) 2.2.2.2, Interface address 192.168.10.2
  Backup Designated router (ID) 1.1.1.1, Interface address 192.168.10.1
  Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
    oob-resync timeout 40
    Hello due in 00:00:00
  Supports Link-local Signaling (LLS)
  Index 2/2, flood queue length 0
  Next 0x0(0)/0x0(0)
  Last flood scan length is 1, maximum is 1
  Last flood scan time is 0 msec, maximum is 4 msec
  Neighbor Count is 1, Adjacent neighbor count is 1
    Adjacent with neighbor 1.1.1.1  (Backup Designated Router)
  Suppress hello for 0 neighbor(s)

Perhatikan lagi perintah yang dicetak tebal. Nilai yang diperoleh sama bukan?

Sekarang kita coba ubah nilai hello interval pada router JKT.

JKT#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
JKT(config)#int e0/0
JKT(config-if)#ip ospf hello-interval 6
JKT(config-if)#end

Kemudian kita lihat hasilnya.

JKT#sh ip ospf int e0/0
Ethernet0/0 is up, line protocol is up
  Internet Address 192.168.10.2/24, Area 1
  Process ID 100, Router ID 2.2.2.2, Network Type BROADCAST, Cost: 10
  Transmit Delay is 1 sec, State DR, Priority 1
  Designated Router (ID) 2.2.2.2, Interface address 192.168.10.2
  No backup designated router on this network
  Timer intervals configured, Hello 6, Dead 24, Wait 24, Retransmit 5
    oob-resync timeout 40
    Hello due in 00:00:05
  Supports Link-local Signaling (LLS)
  Index 2/2, flood queue length 0
  Next 0x0(0)/0x0(0)
  Last flood scan length is 1, maximum is 1
  Last flood scan time is 4 msec, maximum is 4 msec
  Neighbor Count is 0, Adjacent neighbor count is 0
  Suppress hello for 0 neighbor(s)

Kemudian dalam waktu yang tidak lama pasti akan muncul informasi seperti berikut.

JKT#
*Mar  1 01:06:42.495: %OSPF-5-ADJCHG: Process 100, Nbr 1.1.1.1 on Ethernet0/0 from FULL to DOWN, Neighbor Down: Dead timer expired

Karena ada perbedaan nilai hello interval antara router ISP dan JKT maka terjadi Dead timer expired sehingga mengakibatkan putusnya adjacency kedua router tersebut.

Well, sampai di sini dulu belajar tentang OSPF. Silahkan Anda memodifikasi topologi dan lakukan variasi konfigurasi untuk mempelajari OSPF lebih dalam.

🙂

Leave a Reply

Your email address will not be published. Required fields are marked *