Escolar Documentos
Profissional Documentos
Cultura Documentos
Protocol
UNDERSTANDING THE BASICS OF OSPF
Martin Brown
NETWORK SECURITY ENGINEER
@martinbrown2k
The basics of OSPF
ge-0/0/0 ge-0/0/1
fe-0/0/7 fe-0/0/7
fe-0/0/0 fe-0/0/0
SRX-01 SRX-02
Introduction to Our Layer 3 Environment
ge-0/0/0 ge-0/0/1
10.10.10.0/24 172.16.100.0/24
fe-0/0/1 SRX-03 fe-0/0/1
10.1.1.0/24 172.16.1.0/24
fe-0/0/7 fe-0/0/7
fe-0/0/0 fe-0/0/0
192.168.0.0/24
SRX-01 SRX-02
Types of Routing Protocol
Static
Distance vector
- RIP
Link state
- OSPF
- ISIS
Path Vector
- BGP
‘Hybrid’
- EIGRP
Distance Vector Routing Protocols
1Gb 1Gb
10Gb
Distance vector routing
protocols can cause routing
loops. In order to prevent this,
they can use a mechanism called
“split horizon”
Split Horizon
Prevents a router from advertising learned routes out of the
same interface it received the route advertisement on.
In other words, one router will say to another “do not tell me
what I’ve just told you”.
Distance Vector Protocol Default Behavior
I have access
2 to network
10.1.1.0/24
172.16.1.0/24
3
1
10.1.1.0/24
Distance Vector Protocol Default Behavior
172.16.1.0/24
3
1
I have access
to network
10.1.1.0/24
10.1.1.0/24
Distance Vector Protocol Default Behavior
I have access
2 to network
10.1.1.0/24
172.16.1.0/24
3
1
I have access
to network
10.1.1.0/24 I have some
10.1.1.0/24
data for 10.1.1.2
Link State Routing Protocols
Link state protocols use link speeds to find
the best path
The metric is known as “cost”
These protocols cannot take into account
congestion
Routers share their database with a
‘master’ router
Use of a database prevents routing loops
Link state protocols are able to scale well
Link State Routing Protocols
= 1100
= 21
100 1000
10Mb 1.5Mb
10.1.1.2 172.16.1.20
1Gb 1Gb
10 10
10Gb
1
Path Vector Routing Protocols
198.51.100.10 203.0.113.2
“Hybrid” Routing Protocols
LSAs
- Link state advertisements
- Contains reachable subnet information
LSDB
- Link state database
- Used to store subnet information
Areas
- Segmentation of the OSPF domain
Basic OSPF Operation
A B E
D
Routers running OSPF will
usually use the destination IP
addresses 224.0.0.5 and
224.0.0.6 to send hello packets
and LSA’s onto the network
segment
Multicast
Is a way of sending the same packet to specific nodes on
a network segment without sending a broadcast to all
nodes. Switches can copy the packet and send it to
subscribers of the multicast stream.
Basic OSPF Operation
A B E
D
OSPF Version 2 – RFC 1247
1 hour E 1 hour
Martinsville 2 hours
C H
F
Thank you for the road trip, I needed a
vacation, but weren’t we supposed to be
talking about networking?
Yes we were, absolutely
So, what has driving between cities have to
do with a dynamic routing protocol?
Believe it or not, quite a bit
Calculating the Best Path
Edsger Dijkstra developed an algorithm
which calculated shortest paths
This became known as the SPF or Dijkstra
algorithm
Routing protocols prefer to use the best
network path
OSPF uses the SPF algorithm to find the
lowest cost network path
The SPF algorithm was first tested on road
maps
Network Maps Instead of Road Maps
B D
G
1 hour
1 hour E 1 hour
Martinsville 2 hours
C H
F
Network Maps Instead of Road Maps
B D
G
1Gb
1Gb E 1Gb
A 1Gb
C H
F
SPF Algorithm
O(|E|+|V|log|V|)
OSPF Databases
10.2.2.0/24 E
172.16.11.0/24
A 10.8.8.0/24
C H
F
Populating the LSDB
D
B
G
10.5.5.0/24
10.2.2.0/24 E
172.16.11.0/24
A 10.8.8.0/24
C H
F
Populating the LSDB
D
B
G
10.5.5.0/24
10.2.2.0/24 E
172.16.11.0/24
A 10.8.8.0/24
C H
F
LSDB Raw Data
A
OSPF has 3 databases; LSDB,
candidate database and the SPF
database
Candidate Database
A
SPF Database
A
Types of routing protocol
Summary
Versions of OSPF
OSPF framework
SPF algorithm
OSPF link-state, candidate and SPF
databases