Fixed Internetworking Protocols and Networks

Networking and Communications

Oct 29, 2013 (4 years and 8 months ago)

122 views

1| 2011 | ITIFN
Fixed Internetworking
Protocols and Networks
Path First (OSPF)
Rune Hylsberg Jacobsen
Aarhus School of Engineering
rhj@iha.dk
2| 2011 | ITIFN
Objectives 
Describe the basic features & concepts of link-state
routing protocols.

List the benefits and requirements of link state routing
protocols and compare with distance vector protocols.

Describe the basic operation of link state protocol such
as neighbor discovery, flooding, exchange.

Learn to calculate routes by SPF algorithm.

Describe the background and basic features of OSPF.
3| 2011 | ITIFN
Distance vector versus link state routing 
With distance vector routing, each node has information

Node A: to reach F go to B

Node B: to reach F go to D

Node D: to reach F go to E

Node E: go directly to F

Distance vector routing makes
poor routing decisions if
directions are not completely
correct (e.g., because a node is down).

If parts of the directions is incorrect,
the routing may be incorrect until the
routing algorithms has re-converged.
A
B
C
E
F
D
4| 2011 | ITIFN
Distance vector versus link state routing 
In link state routing, each node has a complete map of
the topology.

If a node fails, each
node can calculate
the new route.

Challenge:
All nodes need
to have a consistent view
of the network.
A
B
C
D
E
F
A
B
C
D
E
F
A
B
C
D
E
F
A
B
C
D
E
F
A
B
C
D
E
F
A
B
C
D
E
F
A
B
C
E
F
D
5| 2011 | ITIFN
Classification of routing protocols

Also known as shortest path first algorithms

These protocols built around Dijkstra’sSPF algorithm
Distance vector
routingprotocols
protocols
Exterior gateway
protocols path
vectors
RIPIGRPEGP
RIPv2EIGRPOSPFv2IS-ISBGPv4
RIPngEIGRP for
IPv6
OSPFv3IS-IS for
IPv6
BGPv4 for
IPv6
Classful
Classless
IPv6
6| 2011 | ITIFN
1.
Each router establishes a relationship (“
”)
with its neighbors (link state routers).
2.
Each router generates
(LSAs)
which are distributed to all routers
1.
3.
Each router maintains a database of all received LSAs
(
topological database
or
), which
describes the network as a graph with weighted edges.
4.
Each router uses its link state database to run a
shortest
path algorithm
(Dijikstra’salgorithm) to produce the
shortest path to each network.
7| 2011 | ITIFN
Link state routing protocols reach convergence:

Each routers learns about its own directly connected networks.

Link state routers exchange hello packet to “meet” other
directly.

Each router builds its own
(LSP) which includes
bandwidth.

After the LSP is created the router
floods
it to all neighbors who
then store the information and then forward it until all routers
have the same information.

Once all the routers have received all the LSPs, the routers then
construct a
topological map
of the network which is used to
determine the best routes to a destination.
8| 2011 | ITIFN
2
5
20
10
2
2010
10
2
2
R2
R1
R3
R4
R5

A
is attached to an interface on a router

eth0
sl0
sl1
sl2
10.1.0.0/16
10.2.0.0/16
10.3.0.0/16
10.4.0.0/16
Type of network: Ethernet
Neighbor routers: None
Type of network: Serial
Neighbor routers: R2
Type of network: Serial
Neighbor routers: R4
Type of network: Serial
Neighbor routers: R3
The numbers on each
9| 2011 | ITIFN
The collection of all LSAs is called the link state database.

Each router has and identical link state database and hence a
complete description of the network.

When neighboring routers discover each other for the first time,
they will exchange their link state databases

The link-state databases are synchronized using reliable flooding.
entry (LSAs)
IP routing
table
SPF
calculation
LSAs are flooded
to other interfaces
database
10| 2011 | ITIFN
Discovery of neighbors 
Routers multicasts
Hello packets
on all interfaces
running the link state routing protocol.

If two routers share a link, they can become neighbors,

After becoming a neighbor, routers
exchange
state databases.
11| 2011 | ITIFN
B
A
1
1
1
Flooding
A
D
B
C
E
AD: From A, to B, link 1, infinite, number = 2
DE: Updates its DB and relays A’s message to E
EC,B:Updates its DB and relay A’s message C & B
CB:Updates its DB and relay A’s message to B
BE:No update, number≤ number in B’s DB; relay to E
ED: No update, number ≤ number in E’s DB; relay to D
DA:No update, number ≤ number in B’s DB; relay to D
A:Update message number and triggers new
route calculation. No further flooding
From
To
Dist.
Num.
have
cost = 1
A
D
3
1
B
C
2
1
C
B
2
1
D
A
3
1
E
B
4
1
E
D
6
1
B
E
4
1
C
E
5
1
D
E
6
1
E
C
5
1
Link 1 breaks. A and B notice. The information is flooded in the network
1
B
A
1

1
1
1
1
1
1
1
1
1
1
1
A
B
1
1
1
A
B
1

1
A
B
1

2
B
A
1

2
12| 2011 | ITIFN
Shortest path (1)

Uses a calculation of “shortest” paths based on a
“distributed map” of the network topology
2
5
20
10
2
2010
10
2
2
The shortest path for host on R2 LAN to reach host on R3 LAN:
R2 to R1 (20) + R1 to R3 (5) + R3 to LAN (2) = 27
R2
R1
R3
R4
R5
13| 2011 | ITIFN
Shortest path (2)

The shortest path to a destination is not necessarily the
path with the least number of hops
2
5
20
10
2
2010
10
2
2
DestinationShortestpathCost
R2 LANR1 to R222
R3 LANR1 to R37
R4 LANR1 to R3to R417
R5 LANR1 to R3 to R4
to R5
27
R2
R1
R3
R4
R5
From source node: R1
Shortest path is 3 hops
14| 2011 | ITIFN
Dijkstra’s algorithm

E: represents a set of nodes for which shortest path already found.

Initialization

E = {S}, D
s
= 0, “Shas distance zero from itself”

Dj
= C
sj
for all j

S, where Csj
connected neighbors j

Step 1
:
find next closest nodei

Find i

Esuch that Di
= min (Dj) for j

E

If Econtains all the nodes, terminate the algorithm

Step 2
:
update minimum costs

For each node j

E

Dj
= min (Dj, D
i+C
ij
)Dj
becomes the minimum distance from s to j
through node i in E.

Go to Step 1
15| 2011 | ITIFN
Execution of Dijkstrasalgorithm
IterationED2
D3
D4
D5
D6
Initial{1}325
∞∞
1{1,3}3
24

3
2{1,2,3}
324
73
3{1,2,3,6}
324
5
3
4{1,2,3,4,6}
324
5
3
5{1,2,3,4,5,6}
32453
1
2
4
5
6
1
1
2
3
2
3
5
2
4
3
1
2
4
5
6
1
1
2
3
2
3
5
2
4
3

3
1
2
4
5
6
1
1
2
3
2
5
2
3
3
4
1
2
4
5
6
1
1
2
3
2
3
5
2
4
3
3
1
2
4
5
6
1
1
2
3
2
5
2
3
3
4
3
1
2
4
5
6
1
1
2
3
2
3
5
2
4
3
3
1
2
4
5
6
1
1
2
3
2
5
2
3
3
3
4
A
shortest path three
from
node 1 to all othernodes has
been calculated.
A
shortest path three
from
node 1 to all othernodes has
been calculated.
16| 2011 | ITIFN
Equal multi-path cost 
Equal cost metric
is a condition where a router has
multiple paths to
the same destination
that all have the same metric.

To solve this dilemma, a router will
-
this means the router sends packets over the multiple exit interfaces
listed in the routing table.
17| 2011 | ITIFN
Link state routing protocol requirements 
Requirements for using a link state routing protocol

Memory requirements

Typically link state routing protocols use more memory

Processing requirements

More CPU processing is required of link state routing protocols

Bandwidth requirements

Initial startup of link state routing protocols can consume lots of
bandwidth
Generally link state routers have to be more powerful devices compared to
distance vector routers. In practice, both distance vector and link state
routing protocols are supported in modern routers.
18| 2011 | ITIFN
Multiple areas 
Need for network
hierarchy
due to large memory
requirement, demanding
route computation and high
large networks.

Areas
act as independent
networks.

Area border routers (ABR)
summarizes routing
information.

Summary records
represents
the link between ABR and a
network in the backbone
area.
Area1
Area4
Area0
BackboneArea
Area2
Area3
Inter-area
routes
Intra-area routes
To another AS
IR
Router classification

Internal Router (IR)

Area Border Router (ABR)

Backbone Router (BR)

Autonomous System Border
Router (ASBR)
Router classification

Internal Router (IR)

Area Border Router (ABR)

Backbone Router (BR)

Autonomous System Border
Router (ASBR)
IR
IR
ABR
ABR
BR
ABR
IR
IR
ABR
ABR
ASBR
External
routes
19| 2011 | ITIFN
Open Shortest Path First (OSPF) protocol 
The OSPF routing protocol is the most important link
state routing protocol on the Internet.

The complexity of OSPF is significant.

Features

Provides authentication of routing messages.

Enables load balancing by allowing traffic to be split evenly
across routes with equal cost.

Type-of-Service (TOS) routing allows to setup different routes
dependent on the TOS field.

Supports subnetting.

Supports multicasting.

Allows hierarchical routing.
20| 2011 | ITIFN
OSPF development timeline 
Background of OSPF

Specification work began in 1987

1989 OSPFv1 released in RFC 1131

This version was experimental & never deployed

1991 OSPFv2 released in RFC 1247

1998 OSPFv2 updated in RFC 2328

1999 OSPFv3 published in RFC 2740
21| 2011 | ITIFN
OSPF packet format
22| 2011 | ITIFN
OSPF packet format
23| 2011 | ITIFN
OSPF LSA format
LSA
LSA
LSA
Data
LSA
Messagetype specification data
24| 2011 | ITIFN
“Lollipop” sequence space

The link state sequence number is increase in
accordance with the “lollipop” sequence space.

N = 2
31
-N+1
N-2
N/2
0
25| 2011 | ITIFN
Example network
26| 2011 | ITIFN
Neighbor discovery
27| 2011 | ITIFN
OSPF’s hello packages 
Hello packets

Discover OSPF neighbors & establish

must agree to become neighbors.

Used by multi-access networks to
elect a DR and a BDR

Contents of a Hello Packet router ID of
transmitting router

OSPF Hello Intervals

Usually multicast (224.0.0.5)

Sent every 30 seconds for NBMA segments

This is the time that must transpire before
the neighbor is considered down

Default time is 4 times the hello interval
Designated Router(DR): DR is responsible
for updating all other OSPF routers
Backup Designated Router (BDR): This
router takes over DRs responsibilities if DR
fails
28| 2011 | ITIFN

The LSA of router 10.10.10.1 is as
follows:

10.10.10.1
= Router ID

10.10.10.1
= Router ID

3
= 2 links plus router itself

10.1.1.1, Metric = 4

10.1.2.1, Metric = 3

10.10.10.1, Metric = 0
Each router sends its LSA to all routers in the network
(using a method called reliable flooding)
29| 2011 | ITIFN
Router-LSA 10.1.10.1 10.1.10.1 0x9b47 0x80000006 0
Router-LSA 10.1.10.2 10.1.10.2 0x219e 0x80000007 1618
Router-LSA 10.1.10.3 10.1.10.3 0x6b53 0x80000003 1712
Router-LSA 10.1.10.4 10.1.10.4 0xe39a 0x8000003a 20
Router-LSA 10.1.10.5 10.1.10.5 0xd2a6 0x80000038 18
Router-LSA 10.1.10.6 10.1.10.6 0x05c3 0x80000005 1680

Each router has a
database which
contains the LSAs
from all other routers
30| 2011 | ITIFN
Regular LSA exchanges
31| 2011 | ITIFN
32| 2011 | ITIFN
OSPF in multi-access networks 
Large networks may experience
extensive flooding
of LSAs

Solution to LSA flooding issue is the
use of

Designated router
(DR)

Backup designated router
(BDR)

DR & BDR selection

Routers are elected to send &

Sending & receiving LSAs

DR others send LSAs via
multicast
224.0.0.6 to DR & BDR

DR forward LSAs via multicast
routers
33| 2011 | ITIFN
Summary of Interior routing protocols

Routingprotocol
Builds
Topological
map
Router can
independently determine the
shortest path to
every network.
ConvergenceA periodic/
event driven
Use of
LSP
Distance vector NoNoSlowGenerally NoNo
34| 2011 | ITIFN
Summary of lecture (1) 
Link state routing protocols are also known as Shortest Path First (SPF)
protocols.

Routers 1st learn of directly connected networks

Routers then say “hello” to neighbors

Routers then build link state packets

Routers then flood LSPs to all neighbors

Routers use LSP database to build a network topology map & calculate the best
path to each destination.

Information about an interface such as

Type of network

35| 2011 | ITIFN
Summary of lecture (2) 
RFC 2328 describes OSPF link state concepts and
operations

OSPF Characteristics

A commonly deployed link state routing protocol

Employs DRs & BDRs on multi-access networks

DRs & BDRs are elected

DR & BDRs are used to transmit and receive LSAs

Uses 5 packet types:

1: HELLO

2: DATABASE DESCRIPTION