jump to navigation

Catatan : OSPF Network Topology with samples July 12, 2009

Posted by ZoeL in Cisco, Routing.
Tags: ,
trackback

Notes & Facts untuk OSPF

  • OSPF yang berjalan diatas media broadcast (ethernet) menggunakan multicast untuk mengirimkan hello-packet ke neighbors
  • OSPF yang berjalan di atas media non-broadcast (frame-relay) menggunakan uncast untuk mengirimkan hello-packet ke neighbors
  • ip ospf priority : 0 – 255
    0 = sama sekali tidak berpartisipasi menjadi DR . BDR
    255 = router/interface akan mempunya kesempatan lebih besar untuk selalu menjadi DR.

  • Untuk topologi network Hub-and-Spoke, rubah ospf priority di router spokes menjadi 0. Tujuannya agar tidak ada spokes yang menjadi DR (DesignatedRouter). Karena kalau ada salah satu spoke berubah menjadi DR, maka konektifitas antara Hub dan spokes lain menjadi bermasalah.
    Hub and Spokes
    untuk interface OSPF yang berjalan di atas media NBMA yang secara default tidak mengirimkan broadcast, routing ke ospf router lain harus secara manual di-define dengan statemen neighbors. Karena ospf yang berjalan di atas NBMA non-broadcast mengirimkan update hello ke neighbors menggunakan unicast, bukan melalui multicast.
    contoh:

    R1 :
    !
    interface FastEthernet0/0
    ip address 1.0.0.1 255.0.0.0
    !
    interface Serial0/0
    ip address 10.0.0.1 255.0.0.0
    encapsulation frame-relay
    frame-relay map ip 10.0.0.4 104
    frame-relay map ip 10.0.0.5 105
    !
    router ospf 1
    network 1.0.0.1 0.0.0.0 area 0
    network 10.0.0.1 0.0.0.0 area 0
    neighbor 10.0.0.4
    neighbor 10.0.0.5

    !

    R2:
    !
    interface FastEthernet0/0
    ip address 4.0.0.4 255.0.0.0
    !
    interface Serial0/0
    ip address 10.0.0.4 255.0.0.0
    encapsulation frame-relay
    ip ospf priority 0
    frame-relay map ip 10.0.0.1 401
    frame-relay map ip 10.0.0.5 401
    no frame-relay inverse-arp
    !
    router ospf 1
    network 4.0.0.4 0.0.0.0 area 0
    network 10.0.0.4 0.0.0.0 area 0
    !

    R3:
    !
    interface FastEthernet0/0
    ip address 5.0.0.5 255.0.0.0
    !
    interface Serial1/0
    ip address 10.0.0.5 255.0.0.0
    encapsulation frame-relay IETF
    ip ospf priority 0
    frame-relay map ip 10.0.0.1 501
    frame-relay map ip 10.0.0.4 501
    no frame-relay inverse-arp
    !
    router ospf 1
    network 5.0.0.5 0.0.0.0 area 0
    network 10.0.0.5 0.0.0.0 area 0
    !

    Catatan:
    Ketika ospf priority di set ke 0, otomatis R2 dan R3 tidak bisa berpartisipasi menjadi DR dan BDR. Karena itu, statemen neighbors tidak bisa dan tidak pelu di lakukan dari R2 dan R3.

  • Agar dapat menjalankan broadcast di atas media NBMA, gunakan command ip ospf network broadcast di interface frame-relay.
    Contoh :
    R1
    !
    interface FastEthernet0/0
    ip address 1.0.0.1 255.0.0.0
    !
    interface Serial0/0
    ip address 10.0.0.1 255.0.0.0
    encapsulation frame-relay
    ip ospf network broadcast
    frame-relay map ip 10.0.0.4 104 broadcast
    frame-relay map ip 10.0.0.5 105 broadcast
    !
    router ospf 1
    network 1.0.0.1 0.0.0.0 area 0
    network 10.0.0.1 0.0.0.0 area 0
    !
    R2
    !
    interface FastEthernet0/0
    ip address 4.0.0.4 255.0.0.0
    !
    interface Serial0/0
    ip address 10.0.0.4 255.0.0.0
    encapsulation frame-relay
    ip ospf network broadcast
    ip ospf priority 0
    frame-relay map ip 10.0.0.1 401 broadcast
    frame-relay map ip 10.0.0.5 401
    no frame-relay inverse-arp
    !
    router ospf 1
    network 4.0.0.4 0.0.0.0 area 0
    network 10.0.0.4 0.0.0.0 area 0
    !

    R3
    !
    interface FastEthernet0/0
    ip address 5.0.0.5 255.0.0.0
    !
    interface Serial1/0
    ip address 10.0.0.5 255.0.0.0
    encapsulation frame-relay IETF
    ip ospf network broadcast
    ip ospf priority 0
    frame-relay map ip 10.0.0.1 501 broadcast
    frame-relay map ip 10.0.0.4 501
    no frame-relay inverse-arp
    !
    router ospf 1
    network 5.0.0.5 0.0.0.0 area 0
    network 10.0.0.5 0.0.0.0 area 0
    !

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

    C    1.0.0.0/8 is directly connected, FastEthernet0/0
    O    4.0.0.0/8 [110/65] via 10.0.0.4, 04:58:09, Serial0/0
    O    5.0.0.0/8 [110/65] via 10.0.0.5, 04:58:09, Serial0/0
    C    10.0.0.0/8 is directly connected, Serial0/0

    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

    O    1.0.0.0/8 [110/65] via 10.0.0.1, 04:58:17, Serial0/0
    C    4.0.0.0/8 is directly connected, FastEthernet0/0
    O    5.0.0.0/8 [110/65] via 10.0.0.5, 04:58:17, Serial0/0
    C    10.0.0.0/8 is directly connected, Serial0/0

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

    Serial0/0 is up, line protocol is up
    Internet Address 10.0.0.1/8, Area 0
    Process ID 1, Router ID 10.0.0.1, Network Type NON_BROADCAST, Cost: 64
    Transmit Delay is 1 sec, State DR, Priority 1
    Designated Router (ID) 10.0.0.1, Interface address 10.0.0.1
    No backup designated router on this network
    ————————- output omitted——————————–
    FastEthernet0/0 is up, line protocol is up
    Internet Address 1.0.0.1/8, Area 0
    Process ID 1, Router ID 10.0.0.1, Network Type BROADCAST, Cost: 1
    Transmit Delay is 1 sec, State DR, Priority 1
    Designated Router (ID) 10.0.0.1, Interface address 1.0.0.1
    ————————- output omitted——————————–

    R2#sh ip ospf int
    Serial0/0 is up, line protocol is up
    Internet Address 10.0.0.4/8, Area 0
    Process ID 1, Router ID 10.0.0.4, Network Type NON_BROADCAST, Cost: 64
    Transmit Delay is 1 sec, State DROTHER, Priority 0
    Designated Router (ID) 10.0.0.1, Interface address 10.0.0.1
    No backup designated router on this network
    ————————- output omitted——————————–
    FastEthernet0/0 is up, line protocol is up
    Internet Address 4.0.0.4/8, Area 0
    Process ID 1, Router ID 10.0.0.4, Network Type BROADCAST, Cost: 1
    Transmit Delay is 1 sec, State DR, Priority 1
    Designated Router (ID) 10.0.0.4, Interface address 4.0.0.4
    No backup designated router on this network
    ————————- output omitted——————————–

    R3#sh ip ospf int
    Serial1/0 is up, line protocol is up
    Internet Address 10.0.0.5/8, Area 0
    Process ID 1, Router ID 10.0.0.5, Network Type NON_BROADCAST, Cost: 64
    Transmit Delay is 1 sec, State DROTHER, Priority 0
    Designated Router (ID) 10.0.0.1, Interface address 10.0.0.1
    No backup designated router on this network
    Timer intervals configured, Hello 30, Dead 120, Wait 120, Retransmit 5
    ———————-output omitted————————–
    FastEthernet0/0 is up, line protocol is up
    Internet Address 5.0.0.5/8, Area 0
    Process ID 1, Router ID 10.0.0.5, Network Type BROADCAST, Cost: 1
    Transmit Delay is 1 sec, State DR, Priority 1
    Designated Router (ID) 10.0.0.5, Interface address 5.0.0.5
    No backup designated router on this network
    ———————-output omitted————————–

Karena hello update di kirim secara multicast, R1 tidak memerlukan statemen neighbor.

  • Pada proses pemilihan DR dan BDR, OSPF tidak support pre-emption. Artinya, kalau DR dan BDR sudah terpilih, dan ada router lain yang memiliki priority lebih tinggi. Tidak otomatis DR berpindah ke router yang memiliki prioritas lebih tinggi. Router tersebut akan berpartisipasi menjadi DR ketika ospf area menjalankan proses eleksi DR/BDR yang baru.
  • Tipe ospf network point-to-multipoint broadcast, tidak support proses eleksi DR dan BDR. Selain itu, hello packet dikirim dengan menggunakan multicast. Statemen broadcast diperlukan ketika melakukan static mapping di frame-relay interface. Pada tipe ospf ini, tidak diperlukan command neighbor.
    .
    Perbedaan lainnya (broadcast / nonbroadcast versus point-to-multipoint), ketika diverifikasi dengan show ip route, ip untuk next-hop dari spokes ke spokes lain berada di interface HUB. Hal ini berbeda dengan tipe broadcast/nonbroadcast yang mana next-hop ip untuk spoke ke spoke adalah interface router spoke tujuan yang mengarah ke frame-relay (serial). Bisa disimpulkan bahwa, dengan menggunakan tipe point-to-multipoint, setiap paket yang ingin dikirim dari spoke ke spoke, akan transit ke hub, dan dikirim menggunakan IP frame-relay dari HUB. Berbeda dengan broadcast / nonbroadcast yang setiap paket akan terlihat langsung dikirim ke tujuan walau sebenarnya transit terlebih dahulu di HUB.Sebagai tambahan, di tipe ospf point-to-multipoint, untuk device yang tidak terhubung langsung (misal: spoke to spoke), koneksi terjalin dengan menggunakan layer3 dan tidak memerlukan mapping layer2.Contoh :
    R1
    !
    interface FastEthernet0/0
    ip address 1.0.0.1 255.0.0.0
    !
    interface Serial0/0
    ip address 10.0.0.1 255.0.0.0
    encapsulation frame-relay
    ip ospf network point-to-multipoint
    frame-relay map ip 10.0.0.4 104 broadcast
    frame-relay map ip 10.0.0.5 105 broadcast
    !
    router ospf 1
    network 1.0.0.1 0.0.0.0 area 0
    network 10.0.0.1 0.0.0.0 area 0
    !
    R2
    !
    interface FastEthernet0/0
    ip address 4.0.0.4 255.0.0.0
    !
    interface Serial0/0
    ip address 10.0.0.4 255.0.0.0
    encapsulation frame-relay
    ip ospf network point-to-multipoint
    frame-relay map ip 10.0.0.1 401 broadcast
    no frame-relay inverse-arp
    !
    router ospf 1
    network 4.0.0.4 0.0.0.0 area 0
    network 10.0.0.4 0.0.0.0 area 0
    !

    R3
    !
    interface FastEthernet0/0
    ip address 5.0.0.5 255.0.0.0
    !
    interface Serial1/0
    ip address 10.0.0.5 255.0.0.0
    encapsulation frame-relay IETF
    ip ospf network point-to-multipoint
    frame-relay map ip 10.0.0.1 501 broadcast
    no frame-relay inverse-arp
    !
    router ospf 1
    network 5.0.0.5 0.0.0.0 area 0
    network 10.0.0.5 0.0.0.0 area 0
    !

    Dari contoh diatas, pada R2 tidak memerlukan static mapping frame-relay ke R3, begitu juga sebaliknya. Ini dikarenakan koneksi point-to multipoint, melihat sebuah end-point sebagai sebuah host network dan bukan sebuah network. Sebagai resultnya, Koneksi IP dari R2 ke R3 hanya menggunakan mapping Layer 3 yang dilakukan oleh R1.

    Sebagai perbandingan dengan, pada tipe koneksi ospf broadcast/nonbroadcast, R2 bisa melakukan ping ke R3 dengan menggunakan serial interface frame-relay R3 sebagai mapping L2 ke L3 (mapping L3-L2 di R2 ada di serial yang menuju frame-relay).  Tetapi untuk koneksi multipoint, mapping static frame-relay hanya cukup di lakukan dari R2 ke R1. Proses ip dari R2 ke R3 dilakukan dengan bantuan Layer 3 yang ada di R1.

    Kesimpulan, pada point-to-multipoint, mapping L2 cukup dilakukan dengan device yang berhubungan langsung (misal R2 ke R1 ata R3 ke R1 dari contoh diatas).

  • Untuk tipe ospf point-to-multipoint Non-Broadcast, statemen neighbor diperlukan agar masing2 router dapat menerima hello-packet. Tetapi berbeda dengan point-to-multipoint broadcast, hello upadate berupa unicast. Bukan Multicast.Contoh :
    R1
    !
    interface FastEthernet0/0
    ip address 1.0.0.1 255.0.0.0
    !
    interface Serial0/0
    ip address 10.0.0.1 255.0.0.0
    encapsulation frame-relay
    ip ospf network point-to-multipoint non-broadcast
    frame-relay map ip 10.0.0.4 104 broadcast
    frame-relay map ip 10.0.0.5 105 broadcast
    !
    router ospf 1
    network 1.0.0.1 0.0.0.0 area 0
    network 10.0.0.1 0.0.0.0 area 0
    neighbor 10.0.0.5
    neighbor 10.0.0.4
    !
    R2
    !
    interface FastEthernet0/0
    ip address 4.0.0.4 255.0.0.0
    !
    interface Serial0/0
    ip address 10.0.0.4 255.0.0.0
    encapsulation frame-relay
    ip ospf network point-to-multipoint non-broadcast
    frame-relay map ip 10.0.0.1 401 broadcast
    no frame-relay inverse-arp
    !
    router ospf 1
    network 4.0.0.4 0.0.0.0 area 0
    network 10.0.0.4 0.0.0.0 area 0
    !

    R3
    !
    interface FastEthernet0/0
    ip address 5.0.0.5 255.0.0.0
    !
    interface Serial1/0
    ip address 10.0.0.5 255.0.0.0
    encapsulation frame-relay IETF
    ip ospf network point-to-multipoint non-broadcast
    frame-relay map ip 10.0.0.1 501 broadcast
    no frame-relay inverse-arp
    !
    router ospf 1
    network 5.0.0.5 0.0.0.0 area 0
    network 10.0.0.5 0.0.0.0 area 0
    !

  • OSPF point-to-point, digunakan untuk router ke router yang bersebelahan. Tidak ada proses eleksi DR dan BDR. Menggunakan broadcast multicast sebagai default untuk mengirimkan hello packet.Contoh:
    R1
    !
    interface FastEthernet0/0
    ip address 1.0.0.1 255.0.0.0
    !
    interface Serial0/0
    ip address 10.0.0.1 255.0.0.0
    encapsulation frame-relay
    ip ospf network point-to-point
    frame-relay map ip 10.0.0.2 102 broadcast
    !
    router ospf 1
    network 0.0.0.0 255.255.255.255 area 0
    !

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

    C    1.0.0.0/8 is directly connected, FastEthernet0/0
    O    2.0.0.0/8 [110/65] via 10.0.0.2, 00:04:36, Serial0/0
    C    10.0.0.0/8 is directly connected, Serial0/0

    R1#sh ip ospf ne

    Neighbor ID     Pri   State           Dead Time   Address         Interface
    10.0.0.2          0   FULL/  –        00:00:35    10.0.0.2        Serial0/0

    R1#sh ip ospf int
    Serial0/0 is up, line protocol is up
    Internet Address 10.0.0.1/8, Area 0
    Process ID 1, Router ID 10.0.0.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 0x0(0)/0x0(0)
    Last flood scan length is 1, maximum is 1
    Last flood scan time is 0 msec, maximum is 0 msec
    Neighbor Count is 1, Adjacent neighbor count is 1
    Adjacent with neighbor 10.0.0.2
    Suppress hello for 0 neighbor(s)
    FastEthernet0/0 is up, line protocol is up
    Internet Address 1.0.0.1/8, Area 0
    Process ID 1, Router ID 10.0.0.1, Network Type BROADCAST, Cost: 1
    Transmit Delay is 1 sec, State DR, Priority 1
    Designated Router (ID) 10.0.0.1, Interface address 1.0.0.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:00
    Index 1/1, flood queue length 0
    Next 0x0(0)/0x0(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)

    R2
    !
    interface FastEthernet0/0
    ip address 2.0.0.2 255.0.0.0
    !
    interface Serial0/3/0
    ip address 10.0.0.2 255.0.0.0
    encapsulation frame-relay
    ip ospf network point-to-point
    frame-relay map ip 10.0.0.1 201 broadcast
    !
    router ospf 1
    network 0.0.0.0 255.255.255.255 area 0
    !

    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

    O    1.0.0.0/8 [110/65] via 10.0.0.1, 00:03:40, Serial0/3/0
    C    2.0.0.0/8 is directly connected, FastEthernet0/0
    C    10.0.0.0/8 is directly connected, Serial0/3/0
    R2#

    R2#sh ip osp ne

    Neighbor ID     Pri   State           Dead Time   Address         Interface
    10.0.0.1          0   FULL/  –        00:00:34    10.0.0.1        Serial0/3/0
    R2#
    R2#sh ip osp inter
    Serial0/3/0 is up, line protocol is up
    Internet Address 10.0.0.2/8, Area 0
    Process ID 1, Router ID 10.0.0.2, 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:02
    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 0 msec
    Neighbor Count is 1, Adjacent neighbor count is 1
    Adjacent with neighbor 10.0.0.1
    Suppress hello for 0 neighbor(s)
    FastEthernet0/0 is up, line protocol is up
    Internet Address 2.0.0.2/8, Area 0
    Process ID 1, Router ID 10.0.0.2, Network Type BROADCAST, Cost: 1
    Transmit Delay is 1 sec, State DR, Priority 1
    Designated Router (ID) 10.0.0.2, Interface address 2.0.0.2
    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:00
    Supports Link-local Signaling (LLS)
    Index 1/1, flood queue length 0
    Next 0x0(0)/0x0(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)
    R2#

  • to be added….

Comments»

No comments yet — be the first.

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

%d bloggers like this: