You are on page 1of 14

OSPF

Risanuri Hidayat
Link State
• Strategy
– send to all nodes (not just neighbors) information about
directly connected links (not entire routing table)
– Each node creates a packet called link-state packet (LSP)
• Link State Packet (LSP) contains
– id of the node that created the LSP
– A list of directly connected neighbor of that node, with
the cost of the link to each directly connected neighbor
– sequence number (SEQNO)
– time-to-live (TTL) for this packet

9 February 2020 OSPF 2


Link State (cont)
• Reliable flooding
– store most recent LSP from each node
– forward LSP to all nodes but one that sent it
– generate new LSP periodically
• increment SEQNO
– start SEQNO at 0 when reboot
– decrement TTL of each stored LSP
• discard when TTL=0

9 February 2020 OSPF 3


Y
LSP
Reliable Flooding
Y
X A
LSP

X A
C B D LSP

C B D

Y Y

X A X A
LSP
LSP LSP

C B D C B D

9 February 2020 OSPF 4


Link State
Router Neighbor Cost
4 5 E A 5
A D G E B 2
4
2 3 1 E D 3
5 E F 2
8
B 10 2 E H E G 1
1 6
2 E H 8
5
2 4 Router Neighbor Cost
C F F C 2

Router Neighbor Cost Router Neighbor Cost F E 2

A B 2 B A 2 F H 4

A D 4 B C 1 Router Neighbor Cost


A E 4 B E 10 G D 5

Router Neighbor Cost Router Neighbor Cost G E 1

D A 4 C B 5 Router Neighbor Cost


D E 3 C F 2 H E 8
D G 5 H F 6
9 February 2020 OSPF 5
Djikstra Algorithm
Candidate Cost Tree Description
total
A,A,0 Router A sebagai root

A,A,0
A,B,2 2 Candidate list dari A ke B, cost 2
A,D,4 4 Candidate list dari A ke D, cost 4
A,E,4 4 Candidate list dari A ke E, cost 4
A,A,0
A,B,2 Cost terendah masuk ke Tree
A,D,4 4
A,E,4 4
B,C,1 3 Semua tetangga B Candidate list
B,E,10 12 Dibuang, kalah dari A,E,4

9 February 2020 OSPF 6


Djikstra Algorithm (2)
Candidate Cost Tree Description
total
A,A,0
A,B,2
B,C,1 Cost terendah masuk ke Tree
A,D,4 4
A,E,4 4
C,F,2 3 Semua tetangga C Candidate list
A,A,0
A,B,2
B,C,1
C,F,2 Cost terendah masuk ke Tree
A,D,4 4
A,E,4 4
F,E,2 7 Semua tetangga F Candidate list
F,H,4 9 F,E,2 kalah dari A,E,4

9 February 2020 OSPF 7


Djikstra Algorithm (3)
Candidate Cost Tree Description
total
A,A,0
A,B,2
B,C,1
C,F,2
A,D,4 Cost terendah masuk ke Tree
A,E,4 4
F,H,4 9
D,E,3 7 Semua tetangga D Candidate list
D,G,5 9 D,E,3 kalah dari A,E,4

9 February 2020 OSPF 8


Djikstra Algorithm (4)
Candidate Cost Tree Description
total
A,A,0
A,B,2
B,C,1
C,F,2
A,D,4
A,E,4 Cost terendah masuk ke Tree
F,H,4 9
D,G,5 9 Kalah dari A,E,4 & E,G,1
E,B,2 6 Semua tetangga E Candidate list
E,D,3 7 E,B,2 & E,D,3 kalah dr A,B,2 & A,D,4
E,F,2 6 Kalah dari A,B-B,C-C,F
E,G,1 5
E,H,8 12 Kalah dari F,H,4

9 February 2020 OSPF 9


Djikstra Algorithm (5)
Candidate Cost Tree Description
total
A,A,0
A,B,2
B,C,1
C,F,2
A,D,4
A,E,4
E,G,1 Cost terendah masuk ke Tree
F,H,4 9

9 February 2020 OSPF 10


Djikstra Algorithm (6)
Candidate Cost Tree Description
total
A,A,0
A,B,2
B,C,1
C,F,2
A,D,4
A,E,4
E,G,1
F,H,4

9 February 2020 OSPF 11


Djikstra Algorithm (7)

4
A D G
4
2 1

B E H
1

2 4
C F

9 February 2020 OSPF 12


Open Shortest First Protocol
(OSPF)
• Menggunakan Prinsip Link-state
• Ukuran maks packet OSPF untuk Cisco = 1500
octets
• Encapsulated di dalam IP header (Protocol = 89)

IP Header OSPF PACKET

OSPF Header OSPF DATA

Packet Type LSP LSP LSP LSP LSP LSP

LSP Header LSP DATA


9 February 2020 OSPF 13
OSPF Packet Header
0 8 16 31
version Type Packet length

Router ID

Area ID

Checksum AuType

Authentication

Authentication

Packet Data

9 February 2020 OSPF 14

You might also like