Bermain OSPF pake gns3

Topologi Jaringan OSPF
Topologi Jaringan OSPF
Gambar diatas adalah gambaran topologi jaringan dari gns3. semua router menggunakan cisco ios 3660. untuk R1 dan R4 aku tambahkan modul NM-4T pada slot-1 dan membuat keduanya terkoneksi secara point-to-point. berikut konfigurasi start-up setiap router sebelum bermain-main dengan ospf
R1
R1#sh ip int brief
Interface IP-Address OK? Method Status Protocol
FastEthernet0/0 172.30.49.1 YES manual up up
FastEthernet0/1 unassigned YES unset administratively down down
Serial1/0 10.1.14.1 YES manual up up
Serial1/1 unassigned YES unset administratively down down
Serial1/2 unassigned YES unset administratively down down
Serial1/3 unassigned YES unset administratively down down
R4
R4#sh ip int brief
Interface IP-Address OK? Method Status Protocol
FastEthernet0/0 172.30.50.4 YES manual up up
FastEthernet0/1 unassigned YES NVRAM administratively down down
Serial1/0 10.1.14.2 YES manual up up
Serial1/1 unassigned YES NVRAM administratively down down
Serial1/2 unassigned YES NVRAM administratively down down
Serial1/3 unassigned YES NVRAM administratively down down
R2
R2#sh ip int brief
Interface IP-Address OK? Method Status Protocol
FastEthernet0/0 172.30.50.2 YES NVRAM up up
FastEthernet0/1 unassigned YES NVRAM administratively down down
R3
R3#sh ip int brief
Interface IP-Address OK? Method Status Protocol
FastEthernet0/0 172.30.50.3 YES NVRAM up up
FastEthernet0/1 unassigned YES NVRAM administratively down down
Sekarang mari kita mulai mengkonfigurasi setiap router agar semua network bisa terhubung menggunakan protokol OSPF :D [mode semangka,eh semangat: on :D ]
R1
R1#conf t
Enter configuration commands, one per line. End with CNTL/Z.
R1(config)#router ospf 1
R1(config-router)#network 172.30.49.0 0.0.0.255 area 0
R1(config-router)#network 10.1.14.1 0.0.0.3 area 0
R1(config-router)#^Z
R1#sh ip ospf
Routing Process “ospf 1” with ID 172.30.49.1
Supports only single TOS(TOS0) routes
Supports opaque LSA
Supports Link-local Signaling (LLS)
Initial SPF schedule delay 5000 msecs
Minimum hold time between two consecutive SPFs 10000 msecs
Maximum wait time between two consecutive SPFs 10000 msecs
Incremental-SPF disabled
Minimum LSA interval 5 secs
Minimum LSA arrival 1000 msecs
LSA group pacing timer 240 secs
Interface flood pacing timer 33 msecs
Retransmission pacing timer 66 msecs
Number of external LSA 0. Checksum Sum 0×000000
Number of opaque AS LSA 0. Checksum Sum 0×000000
Number of DCbitless external and opaque AS LSA 0
Number of DoNotAge external and opaque AS LSA 0
Number of areas in this router is 1. 1 normal 0 stub 0 nssa
External flood list length 0
Area BACKBONE(0) (Inactive)
Number of interfaces in this area is 2
Area has no authentication
SPF algorithm last executed 00:00:07.520 ago
SPF algorithm executed 2 times
Area ranges are
Number of LSA 1. Checksum Sum 0x0019BB
Number of opaque link LSA 0. Checksum Sum 0×000000
Number of DCbitless LSA 0
Number of indication LSA 0
Number of DoNotAge LSA 0
Flood list length 0
R1#sh ip ospf int
Serial1/0 is up, line protocol is up
Internet Address 10.1.14.1/30, Area 0
Process ID 1, Router ID 172.30.49.1, Network Type POINT_TO_POINT, Cost: 64
Transmit Delay is 1 sec, State POINT_TO_POINT,
Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
oob-resync timeout 40
Hello due in 00:00:01
Index 2/2, flood queue length 0
Next 0×0(0)/0×0(0)
Last flood scan length is 0, maximum is 0
Last flood scan time is 0 msec, maximum is 0 msec
Neighbor Count is 0, Adjacent neighbor count is 0
Suppress hello for 0 neighbor(s)
FastEthernet0/0 is up, line protocol is up
Internet Address 172.30.49.1/24, Area 0
Process ID 1, Router ID 172.30.49.1, Network Type BROADCAST, Cost: 1
Transmit Delay is 1 sec, State DR, Priority 1
Designated Router (ID) 172.30.49.1, Interface address 172.30.49.1
No backup designated router on this network
Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
oob-resync timeout 40
Hello due in 00:00:01
Index 1/1, flood queue length 0
Next 0×0(0)/0×0(0)
Last flood scan length is 0, maximum is 0
Last flood scan time is 0 msec, maximum is 0 msec
Neighbor Count is 0, Adjacent neighbor count is 0
Suppress hello for 0 neighbor(s)
perhatikan yang di highlight, router-id jika tidak di hard-code pada saat konfigurasi, maka yang dipakai adalah ip address dari interface aktif yang paling tinggi, kita lihat diatas router-id yang dipakai adalah 172.30.49.1.
setelah mengaktifkan ospf pada int fa0/0 dan s1/0,gunakan perintah sh ip ospf dan sh ip ospf int untuk melihat status proses ospf pada router. pada network point-to-point tidak diperlukan adanya DR/BDR, sehingga pada int s1/0 kita lihat state-nya adalah POINT_TO_POINT sedangkan pada int fa0/0 state-nya adalah DR karena interface tersebut terkoneksi pada network BROADCAST dan tidak ada router lain dalam network tersebut sehingga R1 otomatis terpilih sebagai DR, cmiiw :P
yak, mari kita lanjutkan ke R4, yang merupakan router terdekat dengan R1, untuk ini saya akan mengaktifkan debug ospf dengan perintah debug ip ospf adj untuk melihat proses neighboring terjadi, ohya, untuk sementara saya aktifkan interface yang terhubung dengan R1 dulu, interface fa0/0 belakangan deh… :D
R4
R4#debug ip ospf adj
OSPF adjacency events debugging is on
R4#conf t
Enter configuration commands, one per line. End with CNTL/Z.
R4(config)#router ospf 1
R4(config-router)#network 10.1.14.0 0.0.0.3 area 0
R4(config-router)#^Z
R4#
*Mar 1 00:41:19.967: OSPF: Interface Serial1/0 going Up
R4#
*Mar 1 00:41:20.039: %SYS-5-CONFIG_I: Configured from console by console
R4#
*Mar 1 00:41:20.471: OSPF: Build router LSA for area 0, router ID 172.30.50.4, seq 0×80000001
*Mar 1 00:41:21.251: OSPF: 2 Way Communication to 172.30.49.1 on Serial1/0, state 2WAY
*Mar 1 00:41:21.255: OSPF: Send DBD to 172.30.49.1 on Serial1/0 seq 0×2618 opt 0×52 flag 0×7 len 32
*Mar 1 00:41:21.275: OSPF: Rcv DBD from 172.30.49.1 on Serial1/0 seq 0x1C65 opt 0×52 flag 0×7 len 32 mtu 1500 state EXSTART
*Mar 1 00:41:21.275: OSPF: First DBD and we are not SLAVE
*Mar 1 00:41:21.275: OSPF: Rcv DBD from 172.30.49.1 on Serial1/0 seq 0×2618 opt 0×52 flag 0×2 len 52 mtu 1500 state EXSTART
*Mar 1 00:41:21.275: OSPF: NBR Negotiation Done. We are the MASTER
*Mar 1 00:41:21.275: OSPF: Send DBD to 172.30.49.1 on Serial1/0 seq 0×2619 opt 0×52 flag 0×3 len 52
*Mar 1 00:41:21.275: OSPF: Database request to 172.30.49.1
*Mar 1 00:41:21.275: OSPF: sent LS REQ packet to 10.1.14.1, length 12
*Mar 1 00:41:21.283: OSPF: Rcv DBD from 172.30.49.1 on Serial1/0 seq 0×2619 opt 0×52 flag
R4#0×0 len 32 mtu 1500 state EXCHANGE
*Mar 1 00:41:21.283: OSPF: Send DBD to 172.30.49.1 on Serial1/0 seq 0x261A opt 0×52 flag 0×1 len 32
*Mar 1 00:41:21.291: OSPF: Rcv DBD from 172.30.49.1 on Serial1/0 seq 0x261A opt 0×52 flag 0×0 len 32 mtu 1500 state EXCHANGE
*Mar 1 00:41:21.291: OSPF: Exchange Done with 172.30.49.1 on Serial1/0
*Mar 1 00:41:21.291: OSPF: Synchronized with 172.30.49.1 on Serial1/0, state FULL
*Mar 1 00:41:21.291: %OSPF-5-ADJCHG: Process 1, Nbr 172.30.49.1 on Serial1/0 from LOADING to FULL, Loading Done
*Mar 1 00:41:26.791: OSPF: Build router LSA for area 0, router ID 172.30.50.4, seq 0×80000002
R4#u all
All possible debugging has been turned off
R4#sh ip ospf nei
Neighbor ID Pri State Dead Time Address Interface
172.30.49.1 0 FULL/ – 00:00:38 10.1.14.1 Serial1/0
begitu saya mengaktifkan ospf pada interface s1/0 dengan perintah network 10.1.14.0 0.0.0.3 area 0, saat itu pula router mulai mengirimkan paket hello ke interface tersebut dan mengecek apakah ada router lain (yang tentunya ada R1 di seberang sana) pada network yang terhubung dengan interface tersebut, sehingga saat itu pula akan muncul pesan-pesan yang muncul dilayar karena command debug ip ospf adj akan menampilkan semua pesan yang berhubungan dengan neighbor adjacency.
dari pesan-pesan yang muncul dilayar, coba perhatikan yang saya highlight, kita bisa mengetahui proses neighboring seperti yang dibahas dalam postingan sebelumnya konsep ospf bagian1.
saya gunakan perintah u all untuk menghentikan pendebugan sehingga pesan-pesan yang bermunculan pada layar berhenti, dan dengan perintah sh ip ospf nei kita bisa mengetahui dengan router mana saja router kita menjalin hubungan ketetanggaan (neighbor adjacency). seperti kita lihat di atas, router ini (R4) menjalin hubungan ketetanggaan dengan router dengan router-id 172.30.49.1 yang ternyata adalah router-id dari R1 melalui address 10.1.14.1 yang merupakan IP address dari interface yang terhubung pada network point-to-point.
mari kita lanjutkan dengan mengaktifkan int fa0/0 R4, yang merupakan interface yang terhubung dengan network dimaan R2 dan R3 juga terhubung kesana, disini kita akan coba melihat proses pemilihan DR dan BDR
R4
R4#conf t
Enter configuration commands, one per line. End with CNTL/Z.
R4(config)#router ospf 1
R4(config-router)#network 172.30.50.0 0.0.0.255 area 0
R4(config-router)#^Z
sekarang saya akan mengaktifkan ospf pada R3 dan dengan menggunakan perintah debug ip ospf adj kita bisa memperhatikan proses pemilihan DR dan BDR, untuk penjelasan bagaimana proses pemilihan DR/BDR silahkan lihat postingan sebelumnya konsep ospf bagian2 :D
R3
R3#debug ip ospf adj
OSPF adjacency events debugging is on
R3#conf t
Enter configuration commands, one per line. End with CNTL/Z.
R3(config)#router ospf 1
R3(config-router)#network 172.30.50.0 0.0.0.255 area 0
R3(config-router)#^Z
*Mar 1 01:10:52.823: OSPF: end of Wait on interface FastEthernet0/0
*Mar 1 01:10:52.823: OSPF: DR/BDR election on FastEthernet0/0
*Mar 1 01:10:52.823: OSPF: Elect BDR 172.30.50.3
*Mar 1 01:10:52.827: OSPF: Elect DR 172.30.50.4
*Mar 1 01:10:52.827: OSPF: Elect BDR 172.30.50.3
*Mar 1 01:10:52.827: OSPF: Elect DR 172.30.50.4
*Mar 1 01:10:52.831: DR: 172.30.50.4 (Id) BDR: 172.30.50.3 (Id)
*Mar 1 01:10:57.855: OSPF: Database request to 172.30.50.4
*Mar 1 01:10:57.855: OSPF: sent LS REQ packet to 172.30.50.4, length 24
*Mar 1 01:10:57.863: OSPF: Rcv DBD from 172.30.50.4 on FastEthernet0/0 seq 0x3A6 opt 0×52 flag0x1 len 32 mtu 1500 state EXCHANGE
*Mar 1 01:10:57.863: OSPF: Exchange Done with 172.30.50.4 on FastEthernet0/0
*Mar 1 01:10:57.863: OSPF: Send DBD to 172.30.50.4 on FastEthernet0/0 seq 0x3A6 opt 0×52 flag 0×0
*Mar 1 01:10:57.863: OSPF: Synchronized with 172.30.50.4 on FastEthernet0/0, state FULL
*Mar 1 01:10:57.863: %OSPF-5-ADJCHG: Process 1, Nbr 172.30.50.4 on FastEthernet0/0 from LOADING to FULL, Loading Done
well, iya iya, saya ngaku, ada beberapa pesan dari debug yang tidak saya ikutkan diatas, harap maklum terlalu banyak pesan dari debugging ospf adj, jadi saya kopi paste kan yang penting-penting saja, itu tuh yang di highlight merah :d
untuk menghemat postingan, saya aktifkan R2 tanpa debugging
R2
R2#conf t
Enter configuration commands, one per line. End with CNTL/Z.
R2(config)#router ospf 1
R2(config-router)#network 172.30.50.0 0.0.0.255 area 0
R2(config-router)#^Z
yak, semua router sudah menjalankan protokol ospf,, horeee…. mari kita cek, apakah konfigurasi berjalan dengan benar, jika semua konfigurasi ospf berjalan dengan benar, maka pada R2 akan mengenali network kantor 172.30.49.0/24, mari kita cek
R2
R2#sh 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
172.30.0.0/24 is subnetted, 2 subnets
C 172.30.50.0 is directly connected, FastEthernet0/0
O 172.30.49.0 [110/66] via 172.30.50.4, 00:01:59, FastEthernet0/0
10.0.0.0/30 is subnetted, 1 subnets
O 10.1.14.0 [110/65] via 172.30.50.4, 00:01:59, FastEthernet0/0
coba perhatikan yang di higlight merah, ya benar, itu adalah network kantor, hehe… :D
sekarang mari kita lihat siapa aja neighbor yang dimiliki R2
R2
R2#sh ip ospf nei
Neighbor ID Pri State Dead Time Address Interface
172.30.50.3 1 FULL/BDR 00:00:34 172.30.50.3 FastEthernet0/0
172.30.50.4 1 FULL/DR 00:00:33 172.30.50.4 FastEthernet0/0
bisa kita lihat diatas, R3 dengan router-id 172.30.50.3 1 terpilih sebagai BDR, R4 dengan router-id 172.30.50.4 1  sebagai DR, hal itu menunjukkan router ini (R2) tidak terpilih sebagai DR ataupun BDR, jika kita ingat, pemilihan DR/BDR didasarkan pada router-priority, dan jika tidak ada router yang diset priority-nya maka pemilihan didasarkan berdasarkan router-id terbesar.

These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google
  • Furl
  • Reddit
  • Spurl
  • StumbleUpon
  • Technorati

2 Responses to this post

  1. rudy on Jumat, 22 Oktober 2010 pukul 08.49.00 WIB

    protok ini apakah,..
    hanya ada di router cisco,,,/???
    ada g' gan di linux or di mikrotik,..
    protokol ini,...

  2. Unknown on Jumat, 29 Oktober 2010 pukul 14.05.00 WIB

    @rudy: hmm, sepertinya gk da, cz linux itu kn OS sedangkan artikel ini membahas ttg konfigurasi routing protokol,, jd gk ada d linux. tp untuk mikrotik saya kurang tau.. :)