Open Shortest Path First Ospf
Open Shortest Path First Ospf
Open Shortest Path First Ospf
OSPF
8th CEENet Workshop on Network Technology
NATO ANW
OSPF
Link state or SPF technology
Developed by OSPF Working Group
of IETF (not proprietary)
Designed for TCP/IP Internet
environment
Documented in rfc 1583, rfc 2178
a b A B a 1 . 2
A B C A D c 1 2
1 3
B A a 1 2
c 1 d 2 B C b 3 1
f 1 B E e 2 2
e C B b 3 1
D E C E f 1 1
2
D A c 1 2
D E e 2 1
Link State Announcement (LSA)
E B d 2 2
From A to B, Link a, Cost = 1, Ls seq. E C d 2 1
Num. = 2 E D e 2 1
8th CEENet Workshop 6
OSPF
Budapest, 2002
In Case of a Link Failure
a b A and B send the
A B C information to all
1 3
other nodes about
1 d 2
state of link a and
f 1
e the connectivity is
D E
2 reestablished.
R1
R2
0
0
The Resulting
R3
R4 8
6 0
0
Directed Graph
R5 8 6 6
R6
R7
8 7
6
5
0
Networks and
R8 0 routers are
R9 0
R10 7 0 0 represented by
R11
R12
0 0
0 vertices.
N1 3
N2 3
An edge of cost X
N3 1 1 1 1 connects Vertex A to
Vertex B if the
N4 2
N6 1 1 1
N7
N8
4
3 2
intersection of
N9 1 1 1 Column A and Row B
N10 2
N11 3 is marked with the
N12
N13
8
8
2
cost of the interface.
N14 8
N15 9
N1
N2
path 2
R1 R3
R4
Backbone
Area #0
RIP
Domain
OSPF Domain
UNIX host
• the router redistributes RIP
running routed
into OSPF and vice versa
8th CEENet Workshop 27
OSPF
Budapest, 2002
OSPF Advanatages
No limitation on hop count
Supports classless routing
Routing updates sent only when there is a
change or very rarely
Faster convergence
Better load balancing
Logical definition of areas
Authentication and external routes tagging
---
Common header
Hello protocol
Exchange protocol
Flooding protocol
0 31
OSPF packet header, type = 3 (rq) Request records
Link state type
send in case when
Link State ID sequence number of
the LS is smaller
Advertising router
the other router will
---- answer with a LS
update
IGRP,
Specify network(s) RIP,
OSPF
Network 160.89.0.0
Network 172.30.0.0
Network 172.16.0.0
• Global configuration
OSPF
Select routing protocol(s)
IGRP,
Specify network(s) RIP,
OSPF Network 160.89.0
• Interface configuration
OSPF
Verify address/subnet
mask Network 172.30.0.0
Router (config-router) #
network network-number
• The network subcommand is a
mandatory configuration command
for each IP routing process
8th CEENet Workshop 45
OSPF
Budapest, 2002
OSPF Basic Configuration
Commands
Router (config) #
router ospf 63
network 172.16.5.3 0.0.0.0. area 1
network 172.16.0.0 0.0.255.255 area 0
network 192.168.10.5 0.0.0.0 area 1
8th CEENet Workshop 47
OSPF
Budapest, 2002
OSPF Route Summarization
Area 0 Backbone
Summarization
ABRs
Area 1
x
Minimizes routing table entries
Localizes impact of a topology change
8th CEENet Workshop 48
OSPF
Budapest, 2002
Route Summarization (cont.)
Area 1 ABR Area 0
A B C
Summarization
Routing Table for B
O 131.108.4.0 255.255.252.0
O 131.108.8.0 255.255.252.0
O 131.108.12.0 255.255.252.0
Routing Table for C
O 131.108.16.0 255.255.252.0
O 131.108.20.0 255.255.252.0 IA 131.108.16.0 255.255.240.0
O 131.108.24.0 255.255.252.0
O 131.108.28.0 255.255.252.0
R1# R2#
router ospf 100 router ospf 100
network 172.16.32.0 0.0.31.255 area 1 network 172.16.64.0 0.0.31.255 area 2
network 172.16.96.0 0.0.31.255 area 0 network 172.16.96.0 0.0.31.255 area 0
area 0 range 172.16.96.0 255.255.224.0 area 0 range 172.16.96.0 255.255.224.0
area 1 range 172.16.32.0 255.255.224.0 area 2 range 172.16.64.0 255.255.224.0
8th CEENet Workshop 52
OSPF
Budapest, 2002
OSPF Route Redistribution
OSPF
RIP
IGRP BGP
Enhanced IGRP EGP
IS-IS
Router (config-router) #
172.16.9.1 S0 172.16.62.1
R1 S1
172.16.8.1 172.16.63.1
router rip
network 172.16.0.0
passive-interface serial 0
passive-interface serial 1
default-metric 10
redistribute ospf 109 match internal external 1 external 2
172.16.9.1
OSPF Area 0
R1
R3
172.16.8.1
R2
R2
"Back door" creates
RIP potential loop