Pages

Wednesday, March 14, 2018

ospf documentation 101

ospf


**whyy ospfF??


2 link state protocol yg sering dipakai saat ini:
IS-IS   -> masuk k Service provider
OSPF


rip = generate updates every 30s.
- nothing changed, full RIP updates anyway.

> 25 rip updates

misal 50. harus ngirim multiple packet. karena RIP max cmn 25 router 




eigrp  = hybrid.
full updates setelah adjacency dibuilt, routing updates cm saat terjadi perubahan d network
partial update.
not every 30ss.

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

router running link state protocol dont send routing update packets.

link state router yg telah membuat formed adjacencies exchange link states updates. (yg berisi Link State Advertisement).
LSAnya dimasukin ke database.


state of convergence = synchronized link state databases.

djikstra algorithm / SPF (shortest path first algorithm)  -> mengubh database jd routing tbl.



#show ip ospf database
#show ip route ospf

110
====================================



LSA sequence number -> dicek di database ada entry / enggk.
klo di liink tersebut g ada, baru diflood ke setiap ospf-enabled interface except the interface LSA comin from.


sequence number same = LSA Is ignored, no action taken.


sequence number lower: router ignore update and transmit lsa back to original sender.


sequence number higher =  router add LSA to its db and send LSAcknowledgement back to original sender.  router flood lsa and updates its own routing table by running spf algorithm against the now-updated db.




ospf send summary LSA ke setiap router lain tiap 30 menit. atau pas terjadi perubahan topology.


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



ospf router must become neighbors by forming adjacency.

- agree on area number
- hello and dead timer setting / stub area
- same link authentication




#router ospf 1  (id)

** hello packet.
digunakan untuk 2 main task:
- discovery potential neighbors
- renew existing adjacencies


ospf enabled interface send hello packet at regularly scheduled interval.(*)

hello di ethernet sent every 10s  (tergantung tipe networknya)
hello di serial link sent every 30s
ospf hello have dest ip 224.0.0.5 ( class D ).


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

ospf
ospf v2
ospf v3   -> ipv6


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

r1# router ospf 1
  # network 10.1.1.0 0.0.0.255 area 0
  #show ip ospf neigh


r2# router ospf 1
  # network 10.1.1.0 0.0.0.255 area 0


r3# router ospf 1
  # network 10.1.1.0 0.0.0.255 area 0   -> kosong


#debug ip ospf hello
mismatched hello parameters from 10.1.1.1
DEAD  R 40  C 40 , hello  r 10  c 10,  mask R 255.255.255.0  C 255.255.255.240   ! salahnya disini

r = received
c = local


#u all     ! buat matiinnya debug.

solusi: ganti network mask

# show ip ospf neigh     ! buat cek lg.


network mask harus match ya!!!


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

** dead timer **

ospf dead timer is 4 times hello time default.

hello = 10   dead = 40s
hello = 30   dead = 120s

dead time adjacencies gonna be down.


#ip ospf hello-interval 5
!! ketika diganti 5second
!! dead times otomatis berubah jd 20

#

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


#show ip protocols
#debug ip ospf
#debug ip ospf adj
#clear ip ospf process





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





ada 2 jenis link state protocol:

ospf and IS-IS.

IS-IS buat SP. -> g ada di ccna R&S.


advantage link state over distance vector like rip:

rip:
-default behavior routing update on regular schedule ( every 30s )
-full update

klo ada 51 routes packet,  dicopyin semua ke router tetangga!

eigrp:
full updates only after adjacency is built between 2 router. After that routing
updates reflect only changes to the network.


ospf:
- LS router formed adjancies exchange link state update (LSU), which contain LSA (link state advertisement).  ->  dimasukin ke link state database
setelah convergence, router memiliki synchronized link state database.


#show ip ospf database   # liad database ospf


dijkstra algorithm -> ngambil dari database buat dijadiin routing table.



#show ip route ospf     # liad route ospf


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

LSA Sequence number.


LSA 172.12.23.0 / 27   ->   lemme check my ospf db for that same entry.

ketika router 2 nerima LSA. check di database. klo ga ada lgsung ngeflood ke OSPF enabled interface kecuali interface LSA yg dateng dari interface tsb.



klo ada di db, dia lgsung nyari sequence numbernya.



* LSA SAMA = ignored

* LSA lower = router ignored update dan mentransmit LSU ( containing LSA ) balik ke sender.  ( soalnya old information, ini loh info terbaru db nya ).



* LSA higher = router add LSA KE Database dan mengirim LSAcknowledge back to original sender. router flood LSA dan update ke routing tablenya sndiri.

* initial exchange lsa takes place, there will not be another exchange unless there is change in network topology. also send out a summary LSA Every 30 min.

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

ospf router:
- must aggree on area number,
- hello and dead timer setting
- area is a stub area?

========================
hello packet:
- dynamic discovery potential nei
- renewing existing adjancencies.
- disend scheduled interval depending network type. -> ethernet tiap 10s. serial link tiap 30s.
- hello packet -> destination ip 224.0.0.5 ( from class d )



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

network mask, helloInt, DeadInt field in the received hello packet musst be checked against the values configured for the receiving interface. Any mismatch
causes processing to stop and packet to be dropped.

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


R1# router ospf1
#network 10.1.1.0 0.0.0.255 area 0

R2# router ospf 1
network 10.1.1.0 0.0.0.255 area 0

R3# router ospf 1
network 10.1.1.0 0.0.0.255 area 0


#show ip ospf neigh

#debug ip ospf hello   # turn on debug          # cari mismatched hello param
#u all                 # turn off debug


hello parameter:
-hello timer
-dead timer
-network mask

Dead R 40  -> received
      C 40  -> configured locally      #2 ini harus match!

Hello R 10
C 10               # 2 ini jg hrs match!

Mask R 255.255.255.0
C 255.255.255.240           # subnetnya ga match! harus ganti!

#conf t
#int fast 0/0
#ip address 10.1.1.3 255.255.255.0


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

#show ip ospf neigh


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


pas di debug
ada 2 way communication   -> bagus linknya. hampir adjacency!
( tgl balikin unicast ke source hello. Dari multicast. trs jadi neighbors :D)

sama

prepare dbase exchange


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

state EXSTART
state EXCHANGEL

send LS REQ  ( link state request )


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

down: no hellos

attemps:?!

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

exstart : pengecekan sequence number

exchange : packet contain description link state db

terakhir loading:  router now send link state request (LSR) packet to almost - neighbor

FULL: Router databases are synched and adjacency has been formed.


========================
convergence: di setiap router memiliki informasi tentang view network tetangganya. ( similar view of network n accurate)

kendala di rip: slow convergence of distance vector protocol can lead to suboptimal routing and routing loops.  (layer 3 )



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

link state converge almost immediately upon a change in network.

ospf menggunakan dr dan bdr (designated router dan backup designated router) to make network
convergence fast and order!

DR
BDR
RID

PELAJARIN konsepnya lagi!



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


1 comment: