OSPF link state routing protocol.
rip = route resend every 30s. send full
routing table.
rip = advertise hop count
eigrp = advertise prefix, subnet mask,
metric. -> dicalculated oleh algorithm jadi
distance. ( penentu best path )
^ bandwidth delay reliability by directly
connected.
^ tau kondisi dari directly neighbor
adjacencies.
^ ketika sudah mencapai other side of
neighbor, information ga dikirim beda dengan
OSPF.
=======================
link state = send prefix but only for
specific time ( etc: 30 min ).
- ngirim LSA ( link state adv )
lot of descriptive information on the link!
LSA => DETAIL visibility on interface.
cache on database and keep flooding it.
everybody on area see everything!!
==================
OSPF USE LINK state logic:
- neighbor discovery
- topology database exchange
- route computation
hello packet sent using multicast 224.0.0.5
ospf use IP protocol 89 ( bukan tcp / udp )
ospf use concept of AREA
=================
scenario 1. menggunakan area 0
backbone = area 0
backbone area0
area 10 area 20 area
30
setiap area 10,20,30 ada 1 interface
connected ke area 0
dari area 1 ke area lainnya harus lewat area
0 baru dipermit lewat.
klo ada link direct dari area 10 ke area 20
-> ga bakal jalan. walopun di hubungkan
dengan
area number yg sama.
==================
scenario 2. semua network dijadiin 1 area.
network 1---- network 2 ---- network
3
^ jadi 1 area. bisa pake area number berapa
aja.
etc: area 23.
^ tp ada downsidenya. bakal send semua
information. loadnya bakal gede di tiap
router.
cpu intensive!
- Type-1 Router LSA.
tiap network baru bakal diflood ke semua
area yang bersangkutan!!
====================
1 lsa dicollect stored di database
2 masukin semuanya dan bentuk tree -> type
1 router LSA bakal beratin semua router
karena semua jadi 1 area
3 cari best path taro di routing table
- link state database
-======================
AREA BORDER ROUTER:
router yang terhubung ke router area 0
* connect non backbone area to backbone
area.
6 area connected to area border router = 6
tree.
^ router ABR work really hard.
=======================
- type-3 summary router LSA. ( di ABR )
network yg baru di area x akan di sent ke
area 0 supaya dikenali oleh area 0
=======================
#router ospf <process-id> !! ga harus sama
di router tetangga.
=======================
router id ospf:
1. manually configured !! ga perlu ada di
interface manapun
2. highest ip of any loopback interface
3. highest ip address of any non loopback
interface
=======================
TSHOOT COMMAND
show ip int bri
show ip ospf !! check router-id
show ip ospf database !! muncul area
show ip ospf neig
clear ip ospf process !! restart ospf
process klo dibutuhkan.
=====================
ospf neighborship lbh complex.
- 2 way neighbors
- fully adjacent neighbors
===================
cara konfigurasi ospf pada interface. (
bukan pada router )
interface fastethernet0/0
ip address x.x.x.x y.y.y.y
ip ospf 1 area 1 -> config on
interface
duplex auto
speed auto
klo yang global:
router ospf 1
router-id 20.20.20.20
network 20.20.20.0 0.0.0.255 area 1
================
parameter yg harus match buat neighbor:
- hello interval
- dead interval
- area ID
- subnet mask
- authentication
- stub area flag
==============
hello message parameter depending on network
condition ( no need to match ):
- ospf router ID
- list of neighbors reachable on interface
- router priority
- DR ip address
- BDR ip address
=============
interval:
LAN
hello 10
dead 40
custom hello!
#conf t
#ip ospf hello-interval 5
#ip ospf dead-interval 20
#end
!!check config
#show ip ospf interface fa0/0
** hello and dead timer interval can be
modified to have faster convergen
#ip ospf dead-interval minimal hello-
multiplier multiplier
===========
** klo mo ganti router-id di router,
harus clear ospf process. ( soalnya bakal
ganti di semua database router lainnya ).
!! verify router-id
# show ip protocols
# show ip ospf
# show ip ospf database
==========
MTU issue.
default MTU = 1500 ( bytes of data )
^ default ip MTU + ETHERNET frame ( maximum
legal size )
^ if router need to forward packet larger
than outgoing
interface MTU, it either fragments the
packet or discard
it.
tergantung setting DF ( dont fragment ).
^ klo di set DF, packetnya di drop klo ga
difragment.
2 router yg terkoneksi di cable yang sama
harus punya
MTU yang sama. ( same data link )
^ tetep jadi neighbors tp nanti bakal jadi
issue
EXSTART state abis itu down.
^ di log messsage => " too many
retransmissions "
==========
!! cek via wireshark !!
conf t
int fa0/0
ip mtu 1000
show ip ospf neigh
^ state EXSTART/DR
^ klo mo ngecek processnya bisa pake
wireshark
ip-proto eq 89 !! port 89.
dapet hello packet -> bisa di inspect /
diliat detail ( bagian header )
area ID: 0.0.0.0
hello interval: 10s
sama DB description
OSPF DB Description
Interface MTU: 1000
=================
!! check via debug command di router !!
#debug ip ospf adj
^ OSPF: Nbr 19.19.199.19 has larger
interface MTU !! ketauan errornya
================
!!OSPF Authentication part 1 !!
tujuan: prevent unauthorize router join
neighbor
2 step proces s:
- enable authentication & type
- authentication key must be configured per
interface
!! per interface
# ip ospf authentication [pass]
!! global conf
#area <area-id> authentication <pass>
3 type of authen:
- type 0 : no authentication
- type 1 : clear text authentication
- type 2 : MD5 AUTHEN**
^ capture hello packet klo ga pake md5
kebaca.
- suuport multiple key on same interface.
but does not support key chain.
^ key yang berubah2 tiap selang interval
waktu.
================
!! configure authen to interface subcommand
#ip ospf authentication null ( type 0 )
#ip ospf authentication ( type 1 )
#ip ospf authentication-key <pass> (
type1)
#ip ospf authentication message-digest (
type 2)
#ip ospf message-digest-key <key-id> <pass>
(type 2)
!! same type of authen and same type of key
must be used for auth on both router !!
^ ketika implementasi authentikasi dan ospf
sudah berjalan harus nunggu dead timernya
selesai baru adjacenciesnya putus.
================
!! debug command !!
show ip ospf interface <int>
debug ip ospf hello
debug ip ospf adj
================
!! debug on wireshark !!
filter :
224.0.0.5 -> multicast
224.0.0.6
or unicast
89 -> port ospf
# int fast0/0
# ip ospf 1 area 1
# end
ospf header:
Auth Type: -> liad auth type pake
wireshark port 89
===============
Showing posts with label ospf. Show all posts
Showing posts with label ospf. Show all posts
Sunday, March 18, 2018
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!
=====================
**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!
=====================
Subscribe to:
Posts (Atom)