+ All Categories
Home > Documents > Link State Routing - In particular OSPF · LinkStateProtocols Problemsandpitfalls Intermezzo(1)...

Link State Routing - In particular OSPF · LinkStateProtocols Problemsandpitfalls Intermezzo(1)...

Date post: 22-May-2019
Category:
Upload: truongcong
View: 213 times
Download: 0 times
Share this document with a friend
111
Link State Routing In particular OSPF Karst Koymans Informatics Institute University of Amsterdam (version 18.5, 2018/11/30 14:02:15) Tuesday, November 27, 2018 Karst Koymans (UvA) Link State Routing Tuesday, November 27, 2018 1 / 86
Transcript

Link State RoutingIn particular OSPF

Karst Koymans

Informatics InstituteUniversity of Amsterdam

(version 18.5, 2018/11/30 14:02:15)

Tuesday, November 27, 2018

Karst Koymans (UvA) Link State Routing Tuesday, November 27, 2018 1 / 86

1 Link State ProtocolsBasic ideasProblems and pitfalls

2 OSPFRationaleParametersDatabasesNetwork representation and architecture

3 OSPF packet detailsOSPF packet headerThe different types of OSPF packetsLink State Advertisement packets

4 OSPF for IPv6

Karst Koymans (UvA) Link State Routing Tuesday, November 27, 2018 2 / 86

Link State Protocols

Outline

1 Link State ProtocolsBasic ideasProblems and pitfalls

2 OSPFRationaleParametersDatabasesNetwork representation and architecture

3 OSPF packet detailsOSPF packet headerThe different types of OSPF packetsLink State Advertisement packets

4 OSPF for IPv6

Karst Koymans (UvA) Link State Routing Tuesday, November 27, 2018 3 / 86

Link State Protocols Basic ideas

Outline

1 Link State ProtocolsBasic ideasProblems and pitfalls

2 OSPFRationaleParametersDatabasesNetwork representation and architecture

3 OSPF packet detailsOSPF packet headerThe different types of OSPF packetsLink State Advertisement packets

4 OSPF for IPv6

Karst Koymans (UvA) Link State Routing Tuesday, November 27, 2018 4 / 86

Link State Protocols Basic ideas

Link State Protocol

A Link State Protocol

Builds on complete information about the network topology

Uses Dijkstra’s Single Source Shortest Path Tree algorithm

Replaces a distance vector protocol

in the case of more complex topologies

Has a faster convergence time than distance vector protocols

Karst Koymans (UvA) Link State Routing Tuesday, November 27, 2018 5 / 86

Link State Protocols Basic ideas

Link State Packets

Link State Packets (LSPs) represent the state of a router

and its links to the rest of the network

This representation would suffice for point to point links

Broadcast networks (LANs) and NBMA networks are representedby virtual nodes inside the topology

Designated routers (DRs) speak on their behalf

Backed up by Backup Designated routers (BDRs)

Karst Koymans (UvA) Link State Routing Tuesday, November 27, 2018 6 / 86

Link State Protocols Basic ideas

Non-broadcast networks

NBMA

Non-Broadcast Multiple Access

Full mesh of connectivity, but not all at once in one packet

Topological connectivity via elected (B)DR

Point-to-Multipoint

A subset of the collection of all point-to-point links

No full mesh of connectivity

Considered as multiple instances of point-to-point links

Hence no (B)DR is elected

Karst Koymans (UvA) Link State Routing Tuesday, November 27, 2018 7 / 86

Link State Protocols Basic ideas

Learn to know your neighbours

Easy on point to point links

Just send out greetings (Hello packets)

Both ends will become adjacent

A little more advanced on broadcast (and NBMA) networksSend out Hello packets

On broadcast networks using multicast

On NBMA networks manual configuration might be needed

Not all neighbours will become adjacent

Only those that are neighbors in the virtual topology

One of the adjacent routers is always a (B)DR

Karst Koymans (UvA) Link State Routing Tuesday, November 27, 2018 8 / 86

Link State Protocols Basic ideas

LSP generation

Periodic announcements with a long period

Uses the LSRefreshTime parameter, which is 30 minutes

Very much different from RIP, which uses 30 seconds

Triggered updates are sent as soon as there are changes

Detection of a new neighbour (link or node coming up)

Detection of a link or node failure

Change of link cost

Karst Koymans (UvA) Link State Routing Tuesday, November 27, 2018 9 / 86

Link State Protocols Basic ideas

LSP distribution

LSPs are distributed throughout the network

Distribution can’t use the routing database for distant nodes

Why? What is the difference with RIP here?

Ordinary flooding is problematic…, why?

It would need a “TTL” to prevent loops

Even then it may cause exponential multiplication of packets

Smart flooding recognizes identical LSPs

Causing propagation to be tree-like

Karst Koymans (UvA) Link State Routing Tuesday, November 27, 2018 10 / 86

Link State Protocols Basic ideas

LSP distribution

LSPs are distributed throughout the networkDistribution can’t use the routing database for distant nodes

Why? What is the difference with RIP here?

Ordinary flooding is problematic…, why?

It would need a “TTL” to prevent loops

Even then it may cause exponential multiplication of packets

Smart flooding recognizes identical LSPs

Causing propagation to be tree-like

Karst Koymans (UvA) Link State Routing Tuesday, November 27, 2018 10 / 86

Link State Protocols Basic ideas

LSP distribution

LSPs are distributed throughout the networkDistribution can’t use the routing database for distant nodes

Why? What is the difference with RIP here?

Ordinary flooding is problematic…, why?

It would need a “TTL” to prevent loops

Even then it may cause exponential multiplication of packets

Smart flooding recognizes identical LSPs

Causing propagation to be tree-like

Karst Koymans (UvA) Link State Routing Tuesday, November 27, 2018 10 / 86

Link State Protocols Basic ideas

LSP distribution

LSPs are distributed throughout the networkDistribution can’t use the routing database for distant nodes

Why? What is the difference with RIP here?

Ordinary flooding is problematic…, why?

It would need a “TTL” to prevent loops

Even then it may cause exponential multiplication of packets

Smart flooding recognizes identical LSPs

Causing propagation to be tree-like

Karst Koymans (UvA) Link State Routing Tuesday, November 27, 2018 10 / 86

Link State Protocols Basic ideas

LSP distribution

LSPs are distributed throughout the networkDistribution can’t use the routing database for distant nodes

Why? What is the difference with RIP here?

Ordinary flooding is problematic…, why?

It would need a “TTL” to prevent loops

Even then it may cause exponential multiplication of packets

Smart flooding recognizes identical LSPs

Causing propagation to be tree-like

Karst Koymans (UvA) Link State Routing Tuesday, November 27, 2018 10 / 86

Link State Protocols Basic ideas

LSP distribution

LSPs are distributed throughout the networkDistribution can’t use the routing database for distant nodes

Why? What is the difference with RIP here?

Ordinary flooding is problematic…, why?

It would need a “TTL” to prevent loops

Even then it may cause exponential multiplication of packets

Smart flooding recognizes identical LSPs

Causing propagation to be tree-like

Karst Koymans (UvA) Link State Routing Tuesday, November 27, 2018 10 / 86

Link State Protocols Basic ideas

LSP distribution

LSPs are distributed throughout the networkDistribution can’t use the routing database for distant nodes

Why? What is the difference with RIP here?

Ordinary flooding is problematic…, why?

It would need a “TTL” to prevent loops

Even then it may cause exponential multiplication of packets

Smart flooding recognizes identical LSPs

Causing propagation to be tree-like

Karst Koymans (UvA) Link State Routing Tuesday, November 27, 2018 10 / 86

Link State Protocols Basic ideas

LSP distribution

LSPs are distributed throughout the networkDistribution can’t use the routing database for distant nodes

Why? What is the difference with RIP here?

Ordinary flooding is problematic…, why?

It would need a “TTL” to prevent loops

Even then it may cause exponential multiplication of packets

Smart flooding recognizes identical LSPs

Causing propagation to be tree-like

Karst Koymans (UvA) Link State Routing Tuesday, November 27, 2018 10 / 86

Link State Protocols Problems and pitfalls

Outline

1 Link State ProtocolsBasic ideasProblems and pitfalls

2 OSPFRationaleParametersDatabasesNetwork representation and architecture

3 OSPF packet detailsOSPF packet headerThe different types of OSPF packetsLink State Advertisement packets

4 OSPF for IPv6

Karst Koymans (UvA) Link State Routing Tuesday, November 27, 2018 11 / 86

Link State Protocols Problems and pitfalls

Most recent LSP problem

LSPs may arrive out of order

Therefore we need a mechanism to recognize earlier packets

What mechanisms are available for this recognition?

What about using timestamps?

Timestamps cause trouble if clocks

are not synchronised or out of order!

What about using sequence numbers?

Sequence numbers need an ageing procedure

to protect from stale information

for instance when a router reboots

and starts from scratch

Karst Koymans (UvA) Link State Routing Tuesday, November 27, 2018 12 / 86

Link State Protocols Problems and pitfalls

Most recent LSP problem

LSPs may arrive out of order

Therefore we need a mechanism to recognize earlier packets

What mechanisms are available for this recognition?

What about using timestamps?

Timestamps cause trouble if clocks

are not synchronised or out of order!

What about using sequence numbers?

Sequence numbers need an ageing procedure

to protect from stale information

for instance when a router reboots

and starts from scratch

Karst Koymans (UvA) Link State Routing Tuesday, November 27, 2018 12 / 86

Link State Protocols Problems and pitfalls

Most recent LSP problem

LSPs may arrive out of order

Therefore we need a mechanism to recognize earlier packets

What mechanisms are available for this recognition?

What about using timestamps?

Timestamps cause trouble if clocks

are not synchronised or out of order!

What about using sequence numbers?

Sequence numbers need an ageing procedure

to protect from stale information

for instance when a router reboots

and starts from scratch

Karst Koymans (UvA) Link State Routing Tuesday, November 27, 2018 12 / 86

Link State Protocols Problems and pitfalls

Most recent LSP problem

LSPs may arrive out of order

Therefore we need a mechanism to recognize earlier packets

What mechanisms are available for this recognition?

What about using timestamps?

Timestamps cause trouble if clocks

are not synchronised or out of order!

What about using sequence numbers?

Sequence numbers need an ageing procedure

to protect from stale information

for instance when a router reboots

and starts from scratch

Karst Koymans (UvA) Link State Routing Tuesday, November 27, 2018 12 / 86

Link State Protocols Problems and pitfalls

Most recent LSP problem

LSPs may arrive out of order

Therefore we need a mechanism to recognize earlier packets

What mechanisms are available for this recognition?What about using timestamps?

Timestamps cause trouble if clocks

are not synchronised or out of order!

What about using sequence numbers?

Sequence numbers need an ageing procedure

to protect from stale information

for instance when a router reboots

and starts from scratch

Karst Koymans (UvA) Link State Routing Tuesday, November 27, 2018 12 / 86

Link State Protocols Problems and pitfalls

Most recent LSP problem

LSPs may arrive out of order

Therefore we need a mechanism to recognize earlier packets

What mechanisms are available for this recognition?What about using timestamps?

Timestamps cause trouble if clocks

are not synchronised or out of order!

What about using sequence numbers?

Sequence numbers need an ageing procedure

to protect from stale information

for instance when a router reboots

and starts from scratch

Karst Koymans (UvA) Link State Routing Tuesday, November 27, 2018 12 / 86

Link State Protocols Problems and pitfalls

Most recent LSP problem

LSPs may arrive out of order

Therefore we need a mechanism to recognize earlier packets

What mechanisms are available for this recognition?What about using timestamps?

Timestamps cause trouble if clocks

are not synchronised or out of order!

What about using sequence numbers?

Sequence numbers need an ageing procedure

to protect from stale information

for instance when a router reboots

and starts from scratch

Karst Koymans (UvA) Link State Routing Tuesday, November 27, 2018 12 / 86

Link State Protocols Problems and pitfalls

Most recent LSP problem

LSPs may arrive out of order

Therefore we need a mechanism to recognize earlier packets

What mechanisms are available for this recognition?What about using timestamps?

Timestamps cause trouble if clocks

are not synchronised or out of order!

What about using sequence numbers?

Sequence numbers need an ageing procedure

to protect from stale information

for instance when a router reboots

and starts from scratchKarst Koymans (UvA) Link State Routing Tuesday, November 27, 2018 12 / 86

Pitfalls

Sequence numbers may wrap

Sequence number ordering is not a total ordering,

not even a partial ordering

a < b < c < d < e < f < g < h < a

Link State Protocols Problems and pitfalls

Intermezzo (1)

The devilish dice gameSuppose I present to you three dice

With digits between 1 and 6, inclusive, on their sides

Not necessarily all distinct, so possibly with duplicates

For example: A=111223, B=123456, C=444444

You may pick first a dice from the set {A, B, C}

I pick one of the remaining two dice

Then we throw the dice and higher number wins

with payout 1/0/-1 for win/draw/loss

Are you willing to play this game?With an arbitrary set of (known) dice?

Karst Koymans (UvA) Link State Routing Tuesday, November 27, 2018 14 / 86

Link State Protocols Problems and pitfalls

Intermezzo (2)

There are three dice, A, B and C such that

A is better than B

B is better than C

C is better than A

A:114444 B:333333 C:222255

Karst Koymans (UvA) Link State Routing Tuesday, November 27, 2018 15 / 86

Link State Protocols Problems and pitfalls

Intermezzo (2)

There are three dice, A, B and C such that

A is better than B

B is better than C

C is better than A

A:114444

B:333333 C:222255

Karst Koymans (UvA) Link State Routing Tuesday, November 27, 2018 15 / 86

Link State Protocols Problems and pitfalls

Intermezzo (2)

There are three dice, A, B and C such that

A is better than B

B is better than C

C is better than A

A:114444 B:333333

C:222255

Karst Koymans (UvA) Link State Routing Tuesday, November 27, 2018 15 / 86

Link State Protocols Problems and pitfalls

Intermezzo (2)

There are three dice, A, B and C such that

A is better than B

B is better than C

C is better than A

A:114444 B:333333 C:222255

Karst Koymans (UvA) Link State Routing Tuesday, November 27, 2018 15 / 86

ARPANET lockup (real historic event1)

On ARPANET an early version of a link state protocol was used.Suppose we have sequence numbers a, b, c with a < b < c < a.

Why didn’t ageing do its job?1According to Radia Perlman in the “Interconnections” book

Link State Protocols Problems and pitfalls

Lockup solution

Use an age (or ttl) field

which will be increased (or decreased) periodically

and always increase the age (decrease the ttl)by at least one when passing the LSP on

Forgetting this was the main problem

in the total ARPANET lockup

Use a very large sequence number space

and wait for timeouts after overflowwhile reflooding LSPs with maximum age

Causing those to time out prematurely

Karst Koymans (UvA) Link State Routing Tuesday, November 27, 2018 17 / 86

Link State Protocols Problems and pitfalls

Lockup solution

Use an age (or ttl) field

which will be increased (or decreased) periodically

and always increase the age (decrease the ttl)by at least one when passing the LSP on

Forgetting this was the main problem

in the total ARPANET lockup

Use a very large sequence number space

and wait for timeouts after overflowwhile reflooding LSPs with maximum age

Causing those to time out prematurely

Karst Koymans (UvA) Link State Routing Tuesday, November 27, 2018 17 / 86

Link State Protocols Problems and pitfalls

Lockup solution

Use an age (or ttl) field

which will be increased (or decreased) periodically

and always increase the age (decrease the ttl)by at least one when passing the LSP on

Forgetting this was the main problem

in the total ARPANET lockup

Use a very large sequence number space

and wait for timeouts after overflowwhile reflooding LSPs with maximum age

Causing those to time out prematurely

Karst Koymans (UvA) Link State Routing Tuesday, November 27, 2018 17 / 86

Link State Protocols Problems and pitfalls

Lockup solution

Use an age (or ttl) field

which will be increased (or decreased) periodically

and always increase the age (decrease the ttl)by at least one when passing the LSP on

Forgetting this was the main problem

in the total ARPANET lockup

Use a very large sequence number space

and wait for timeouts after overflowwhile reflooding LSPs with maximum age

Causing those to time out prematurely

Karst Koymans (UvA) Link State Routing Tuesday, November 27, 2018 17 / 86

Link State Protocols Problems and pitfalls

Lockup solution

Use an age (or ttl) field

which will be increased (or decreased) periodically

and always increase the age (decrease the ttl)by at least one when passing the LSP on

Forgetting this was the main problem

in the total ARPANET lockup

Use a very large sequence number space

and wait for timeouts after overflowwhile reflooding LSPs with maximum age

Causing those to time out prematurely

Karst Koymans (UvA) Link State Routing Tuesday, November 27, 2018 17 / 86

Link State Protocols Problems and pitfalls

Lockup solution

Use an age (or ttl) field

which will be increased (or decreased) periodically

and always increase the age (decrease the ttl)by at least one when passing the LSP on

Forgetting this was the main problem

in the total ARPANET lockup

Use a very large sequence number space

and wait for timeouts after overflowwhile reflooding LSPs with maximum age

Causing those to time out prematurely

Karst Koymans (UvA) Link State Routing Tuesday, November 27, 2018 17 / 86

Link State Protocols Problems and pitfalls

Lockup solution

Use an age (or ttl) field

which will be increased (or decreased) periodically

and always increase the age (decrease the ttl)by at least one when passing the LSP on

Forgetting this was the main problem

in the total ARPANET lockup

Use a very large sequence number space

and wait for timeouts after overflow

while reflooding LSPs with maximum age

Causing those to time out prematurely

Karst Koymans (UvA) Link State Routing Tuesday, November 27, 2018 17 / 86

Link State Protocols Problems and pitfalls

Lockup solution

Use an age (or ttl) field

which will be increased (or decreased) periodically

and always increase the age (decrease the ttl)by at least one when passing the LSP on

Forgetting this was the main problem

in the total ARPANET lockup

Use a very large sequence number space

and wait for timeouts after overflowwhile reflooding LSPs with maximum age

Causing those to time out prematurely

Karst Koymans (UvA) Link State Routing Tuesday, November 27, 2018 17 / 86

Link State Protocols Problems and pitfalls

Lockup solution

Use an age (or ttl) field

which will be increased (or decreased) periodically

and always increase the age (decrease the ttl)by at least one when passing the LSP on

Forgetting this was the main problem

in the total ARPANET lockup

Use a very large sequence number space

and wait for timeouts after overflowwhile reflooding LSPs with maximum age

Causing those to time out prematurely

Karst Koymans (UvA) Link State Routing Tuesday, November 27, 2018 17 / 86

OSPF

Outline

1 Link State ProtocolsBasic ideasProblems and pitfalls

2 OSPFRationaleParametersDatabasesNetwork representation and architecture

3 OSPF packet detailsOSPF packet headerThe different types of OSPF packetsLink State Advertisement packets

4 OSPF for IPv6

Karst Koymans (UvA) Link State Routing Tuesday, November 27, 2018 18 / 86

OSPF Rationale

Outline

1 Link State ProtocolsBasic ideasProblems and pitfalls

2 OSPFRationaleParametersDatabasesNetwork representation and architecture

3 OSPF packet detailsOSPF packet headerThe different types of OSPF packetsLink State Advertisement packets

4 OSPF for IPv6

Karst Koymans (UvA) Link State Routing Tuesday, November 27, 2018 19 / 86

OSPF Rationale

OSPF advantages (1)

OSPFIntroduces hierarchical routing

OSPF uses only two levels, in contrast to IS-IS

Supports subnets

Uses efficient multicast for flooding

Supports point-to-point, broadcast, NBMA

and point-to-multipoint networks

Uses metrics built on cost, per interface

Karst Koymans (UvA) Link State Routing Tuesday, November 27, 2018 20 / 86

OSPF Rationale

OSPF advantages (2)

OSPF

Supports virtual links for backbone connectivity

Supports load balancing

Supports unnumbered interfaces/networks

Has built in authentication

Karst Koymans (UvA) Link State Routing Tuesday, November 27, 2018 21 / 86

OSPF Rationale

OSPF fun :)

IETF T-shirt

IS − IS = 0

The old time IETF versus ISO controversy

But OSPF in fact really builds on

BBN’s research on SPF

Early versions of OSI’s IS-IS

Karst Koymans (UvA) Link State Routing Tuesday, November 27, 2018 22 / 86

OSPF Rationale

Some OSPF facts

OSPF works directly over IP (not over UDP)

OSPF uses protocol type 89

Current OSPF version is 2

RFC 2328 (Moy, 1998)RFC 2740 (OSPF for IPv6, 1999) ⇒ version 3

Obsoleted by RFC 5340 (2008)

OSPF uses LSA (Link State Advertisement)

terminology instead of LSP (Link State Packet)

Karst Koymans (UvA) Link State Routing Tuesday, November 27, 2018 23 / 86

OSPF Parameters

Outline

1 Link State ProtocolsBasic ideasProblems and pitfalls

2 OSPFRationaleParametersDatabasesNetwork representation and architecture

3 OSPF packet detailsOSPF packet headerThe different types of OSPF packetsLink State Advertisement packets

4 OSPF for IPv6

Karst Koymans (UvA) Link State Routing Tuesday, November 27, 2018 24 / 86

OSPF Parameters

Timers and Overflow

These must be the same for all OSPF neighbours

Otherwise the neighbours won’t talk at all

HelloInterval (default 10 sec)

RouterDeadInterval (default 40 sec)

In the case of a database overflow

external routing information is dropped first

Karst Koymans (UvA) Link State Routing Tuesday, November 27, 2018 25 / 86

OSPF Databases

Outline

1 Link State ProtocolsBasic ideasProblems and pitfalls

2 OSPFRationaleParametersDatabasesNetwork representation and architecture

3 OSPF packet detailsOSPF packet headerThe different types of OSPF packetsLink State Advertisement packets

4 OSPF for IPv6

Karst Koymans (UvA) Link State Routing Tuesday, November 27, 2018 26 / 86

OSPF Databases

Consistent LSA Databases

LSAs must be acknowledged

LSAs (and their acks) are queued/flagged for transmission

LSAs must time out at about the same timeby using triggered (re)distribution of age MaxAge2 packets

for LSAs with an existing sequence number

which must be honored…

…only if there is already an LSA

for this node in the local database

2MaxAge is 1 hour (60 minutes)Karst Koymans (UvA) Link State Routing Tuesday, November 27, 2018 27 / 86

OSPF Network representation and architecture

Outline

1 Link State ProtocolsBasic ideasProblems and pitfalls

2 OSPFRationaleParametersDatabasesNetwork representation and architecture

3 OSPF packet detailsOSPF packet headerThe different types of OSPF packetsLink State Advertisement packets

4 OSPF for IPv6

Karst Koymans (UvA) Link State Routing Tuesday, November 27, 2018 28 / 86

OSPF Network representation and architecture

(Backup) Designated Router

A Designated Router (DR) and

a Backup Designated Router (BDR)

is elected on every multi-access network using Hello packets

The (B)DR represents the network as a virtual node

in the graph and acts on the network’s behalf

The DR/BDR election process is sticky

This is another one of the differences with IS-IS

The priority of routers can be configured

Karst Koymans (UvA) Link State Routing Tuesday, November 27, 2018 29 / 86

Multicast usage

On LANs every router becomes “adjacent” to the Designated Routers

Multicast to AllDRouters (224.0.0.63)

Multicast to AllSPFRouters (224.0.0.53)

There is also a unicast Ack from the DR back to R3OSPFv3 for IPv6 uses FF02::6 and FF02::5

Hierarchical routing

Area 0 is the backbone area

“Limbs” (non-backbone) are all other areas, not equal to 0

Virtual Links

Area 5 is not physically connected to the backbone

A virtual link extends the backbone to the new ABR

and behaves as an unnumbered point to point link

OSPF Network representation and architecture

Inter Area Summary (IAS)

IASs are injected by ABRs

IASs make use of a hub and spoke topology

Summary information is spread “RIP-like”

There are no loops or slow convergence

Virtual links maintain the hub and spoke topology

These virtual spokes are in fact paths through their

“transit area” treated as unnumbered links in the backbone

Karst Koymans (UvA) Link State Routing Tuesday, November 27, 2018 33 / 86

OSPF Network representation and architecture

Router roles

Backbone router

Has at least one interface inside area 0

Internal router

All interfaces are completely within a single area

(backbone or otherwise)

Area Border Router (ABR)

Has an interface inside area 0 and one or more other areas

Autonomous System Boundary Router (ASBR)

Participates in another (external) routing protocol

Karst Koymans (UvA) Link State Routing Tuesday, November 27, 2018 34 / 86

OSPF Network representation and architecture

Area Border Router (ABR)

Attaches to multiple areas

Runs multiple copies of the basic algorithm

One copy for each area

Summarizes area data (destination networks) towards the backbone

Receives summarized data from the backbone about

other areas including the backbone itself

Can aggregate summary data

Karst Koymans (UvA) Link State Routing Tuesday, November 27, 2018 35 / 86

OSPF Network representation and architecture

Autonomous System Boundary Router (ASBR)

Can be part of any area

Interfaces with other routing protocols

BGP, RIP, IS-IS, OSPF, …

Injects external routes into OSPF

ASBR notion is independent of backbone, internal or ABR router

Karst Koymans (UvA) Link State Routing Tuesday, November 27, 2018 36 / 86

OSPF Network representation and architecture

Stub(by) area

A stub(by) area is an area into which no external

routing information is injected by the ABRs

It uses a default route for all external destinations

The default route is injected by all ABRs

A totally stubby area is a stubby area into which

not even inter-area summaries are injected

A not so stubby area is a stubby area inside which certain

external information is originated and flooded locally

Karst Koymans (UvA) Link State Routing Tuesday, November 27, 2018 37 / 86

OSPF packet details

Outline

1 Link State ProtocolsBasic ideasProblems and pitfalls

2 OSPFRationaleParametersDatabasesNetwork representation and architecture

3 OSPF packet detailsOSPF packet headerThe different types of OSPF packetsLink State Advertisement packets

4 OSPF for IPv6

Karst Koymans (UvA) Link State Routing Tuesday, November 27, 2018 38 / 86

OSPF packet details OSPF packet header

Outline

1 Link State ProtocolsBasic ideasProblems and pitfalls

2 OSPFRationaleParametersDatabasesNetwork representation and architecture

3 OSPF packet detailsOSPF packet headerThe different types of OSPF packetsLink State Advertisement packets

4 OSPF for IPv6

Karst Koymans (UvA) Link State Routing Tuesday, November 27, 2018 39 / 86

OSPF packet details OSPF packet header

OSPF packet header (24 bytes)

0 7 8 15 16 31

Version Type Packet length

Router IDArea ID

Checksum AuType

Authentication

Karst Koymans (UvA) Link State Routing Tuesday, November 27, 2018 40 / 86

OSPF packet details OSPF packet header

OSPF packet header fields

OSPF packet header fields

Version 2

Type 1–5 (see next slide)

Packet length Total length, including this header

Router ID ID of packet sending router

Area ID The area a packet belongs to (is destined for)

Checksum One’s complement checksum

AuType Null, Simple or Crypto

Authentication “Pointer to message digest” (Crypto)

Karst Koymans (UvA) Link State Routing Tuesday, November 27, 2018 41 / 86

OSPF packet details OSPF packet header

OSPF packet types

OSPF packet types

Type Meaning

1 Hello

2 Database Description

3 Link State Request

4 Link State Updatea

5 Link State Acknowledgementb

aThese contain the Link State AdvertisementsbDon’t confuse these with LSAs

Karst Koymans (UvA) Link State Routing Tuesday, November 27, 2018 42 / 86

OSPF packet details The different types of OSPF packets

Outline

1 Link State ProtocolsBasic ideasProblems and pitfalls

2 OSPFRationaleParametersDatabasesNetwork representation and architecture

3 OSPF packet detailsOSPF packet headerThe different types of OSPF packetsLink State Advertisement packets

4 OSPF for IPv6

Karst Koymans (UvA) Link State Routing Tuesday, November 27, 2018 43 / 86

OSPF packet details The different types of OSPF packets

OSPF Hello packet (20 + N ∗ 4 bytes)

0 15 16 23 24 31

Network MaskHelloInterval Options Rtr Pri

RouterDeadIntervalDesignated Router

Backup Designated RouterNeighbor #1

...Neighbor #N

Repeated foreach neighborthat is alive

Karst Koymans (UvA) Link State Routing Tuesday, November 27, 2018 44 / 86

OSPF packet details The different types of OSPF packets

OSPF Hello packet fields

Hello fields

Network Mask Subnet mask of link

HelloInterval Interval in seconds between Hello packets

Options Multiple metrics (Ta); no stub area (E); …

Rtr Pri Router priority, used for (B)DR election

RouterDeadInterval Interval to consider a silent neighbor dead

Designated Router IP address of DR

Backup Designated Router IP address of BDR

Neighbor Living neighbor Router IDs

aDeprecated because of lack of experience with TOSKarst Koymans (UvA) Link State Routing Tuesday, November 27, 2018 45 / 86

OSPF packet details The different types of OSPF packets

OSPF DD packet (8 + N ∗ 20 bytes)

0 15 16 23 24 31

Interface MTU Options 00000 I MM

S

DD sequence number

LSA header #1...

LSA header #N

Fragment ofdatabase withonly headers

The LSA headers include age and sequence number

Karst Koymans (UvA) Link State Routing Tuesday, November 27, 2018 46 / 86

OSPF packet details The different types of OSPF packets

OSPF DD packet fields

DD fields

Interface MTU Detection of MTU mismatch

Options Same as for Hello packets

I Init bit (first packet)

M More bit (more packets follow)

MS Master/Slave bit

DD sequence number For use in the lockstep exchange

LSA header Link state database LSA instance identitya

aSpecific LSA instance, including age and sequence number

Karst Koymans (UvA) Link State Routing Tuesday, November 27, 2018 47 / 86

OSPF packet details The different types of OSPF packets

OSPF LS request packet (N ∗ 12 bytes)

0 31

LS type

Link State IDAdvertising Router

Multipleoccurrences

The LS type is a 1 byte quantity.Hence the first three bytes are always zero (0).

Karst Koymans (UvA) Link State Routing Tuesday, November 27, 2018 48 / 86

OSPF packet details The different types of OSPF packets

OSPF LS request packet fields

LS request fields

LS type Link type of the LSA

Link State ID ID of (link type specific part of) the LSA

Advertising Router Router ID of originating router

These three fields are part of the LSA header.Note that these request packets do not include an age or sequence number.Together these entries uniquely identify an LSA, but not an LSA instance.The Database Description packets refer to a specific LSA instance,but still without actual data.

Karst Koymans (UvA) Link State Routing Tuesday, November 27, 2018 49 / 86

OSPF packet details The different types of OSPF packets

OSPF LS Update packet

0 31

# LSAs (N)

LSA #1hhhhhhhhhhhhhhhhhhhhhhhh

hhhhhhhhhhhhhhhhhhhhhhhh

LSA #N

N occurrences

Karst Koymans (UvA) Link State Routing Tuesday, November 27, 2018 50 / 86

OSPF packet details The different types of OSPF packets

OSPF LS Update packet fields

LS Update fields

# LSAs Number of LSAs inside the update packet

LSA #i A complete Link State Advertisement

Link State Updates contain complete and specific instances ofLink State Advertisements (LSAs) with all relevant data.The LSAs have a variable size, depending on LS type.

Karst Koymans (UvA) Link State Routing Tuesday, November 27, 2018 51 / 86

OSPF packet details The different types of OSPF packets

OSPF LS Acknowledgement packet (N ∗ 20 bytes)

0 31

LSA header #1hhhhhhhhhhhhhhhhhhhhhhhh

hhhhhhhhhhhhhhhhhhhhhhhh

LSA header #N

N occurrences

Karst Koymans (UvA) Link State Routing Tuesday, November 27, 2018 52 / 86

OSPF packet details The different types of OSPF packets

OSPF LS Acknowledgement packet fields

LS Acknowledgement fields

LSA header #i A complete Link State Advertisement header

Link State Acknowledgements again refer to specific instances,but contain no actual data.

Karst Koymans (UvA) Link State Routing Tuesday, November 27, 2018 53 / 86

OSPF packet details Link State Advertisement packets

Outline

1 Link State ProtocolsBasic ideasProblems and pitfalls

2 OSPFRationaleParametersDatabasesNetwork representation and architecture

3 OSPF packet detailsOSPF packet headerThe different types of OSPF packetsLink State Advertisement packets

4 OSPF for IPv6

Karst Koymans (UvA) Link State Routing Tuesday, November 27, 2018 54 / 86

OSPF packet details Link State Advertisement packets

Link State Advertisements

Multiple LSAs may be found inside a Link State Update packet

Every LSA consists of

LSA header (20 bytes)

LS(A) type specific content

Karst Koymans (UvA) Link State Routing Tuesday, November 27, 2018 55 / 86

OSPF packet details Link State Advertisement packets

LSA header (20 bytes)

0 15 16 23 24 31

LS age Options LS type

Link State IDAdvertising Router

LS sequence number

LS Checksum Length

Karst Koymans (UvA) Link State Routing Tuesday, November 27, 2018 56 / 86

OSPF packet details Link State Advertisement packets

LSA header fields

LSA header fields

LS age Time in seconds since the LSA was originated

Options Same as for Hello packets

LS type Link type of the LSA (see next slide)

Link State ID ID of (link type specific part of) the LSA

Advertising Router Router ID of originating router

LS sequence number Used for most recent check of LSA packets

LS Checksum The Fletcher checksum of the LSA (without age)

Length Length in bytes of the LSA, including the header

Karst Koymans (UvA) Link State Routing Tuesday, November 27, 2018 57 / 86

OSPF packet details Link State Advertisement packets

LS types

LS types

LS Type Meaning

1 Router LSA

2 Network LSA

3 Network Summary LSA

4 AS Boundary Router Summary LSA

5 AS External LSA

7 NSSA LSA (see next slide)

Topological (1,2), prefix (3,5,7) and mixed (4) informationKarst Koymans (UvA) Link State Routing Tuesday, November 27, 2018 58 / 86

OSPF packet details Link State Advertisement packets

NSSA

NSSA stands for “Not So Stubby Area”

Support for certain external routes throughout the area itself

NSSA uses its own special type (7)

These LSAs are translated at the ABR into ordinary

external LSAs (type 5) for the rest of the OSPF domain

It is common to inject a type 7 default route from the

NSSA boundary router(s) into the NSSA

Karst Koymans (UvA) Link State Routing Tuesday, November 27, 2018 59 / 86

OSPF packet details Link State Advertisement packets

Link State IDs

Link State IDs

LS Type Link State ID meaning

1 Router ID of originating router

2 IP address of the network’s DR

3 The destination network’s prefix

4 Router ID of described ASBR

5 The destination network’s prefix

7 The destination network’s prefix

Karst Koymans (UvA) Link State Routing Tuesday, November 27, 2018 60 / 86

OSPF packet details Link State Advertisement packets

Link State IDs

Link State IDsLS Type Link State ID meaning

1 Router ID of originating router2 IP address of the network’s DR3 The destination network’s prefix4 Router ID of described ASBR5 The destination network’s prefix7 The destination network’s prefix

Router LSA Link State ID

Karst Koymans (UvA) Link State Routing Tuesday, November 27, 2018 61 / 86

OSPF packet details Link State Advertisement packets

Router LSA (LS type = 1) without header

0 7 8 1516 31

0 V E B 0 # Links

Link IDLink Data

Type # TOS MetricTOS 0 TOS metric

repeated# Linkstimes

}# TOS times4

Originated by every routerFlooded throughout the area(s) the router belongs to

4For backward compatibility (but never really implemented or used)Karst Koymans (UvA) Link State Routing Tuesday, November 27, 2018 62 / 86

OSPF packet details Link State Advertisement packets

Router LSA fields

Router LSA fieldsV Router is virtual link endpointE Router is AS Boundary RouterB Router is Area Border Router

# Links Number of router links describedLink ID ID of the connected “network”

Link Data Extra information on “network”Type Type of connected “network”

# TOS Number of extra TOSs (usually 0)Metric Cost of link

Karst Koymans (UvA) Link State Routing Tuesday, November 27, 2018 63 / 86

OSPF packet details Link State Advertisement packets

Router LSA type field

Router LSA type field

Type Meaning

1 Point-to-point link

2 Transit network

3 Stub network

4 Virtual link

Karst Koymans (UvA) Link State Routing Tuesday, November 27, 2018 64 / 86

OSPF packet details Link State Advertisement packets

Router LSA Link ID field

Router LSA Link ID field

Type Meaning

1 Router ID of neighbor router

2 IP address of Designated Router

3 IP (sub)network numbera

4 Router ID of neighbor router

aThis can also be a host (with a /32 mask in the link data)

Karst Koymans (UvA) Link State Routing Tuesday, November 27, 2018 65 / 86

OSPF packet details Link State Advertisement packets

Router LSA Link Data field

Router LSA Link Data field

Type Meaning

1 Originating router’s interface IP address

2 Originating router’s interface IP address

3 Connected (sub)network mask

4 Originating router’s interface IP address

Karst Koymans (UvA) Link State Routing Tuesday, November 27, 2018 66 / 86

OSPF packet details Link State Advertisement packets

Link State IDs

Link State IDs

LS Type Link State ID meaning

1 Router ID of originating router

2 IP address of the network’s DR

3 The destination network’s prefix

4 Router ID of described ASBR

5 The destination network’s prefix

7 The destination network’s prefix

Network LSA Link State IDKarst Koymans (UvA) Link State Routing Tuesday, November 27, 2018 67 / 86

OSPF packet details Link State Advertisement packets

Network LSA (LS type = 2) without header

4 + N ∗ 4 bytes

0 31

Network MaskAttached Router

}Repeated for each attached router

Originated by Designated Router

Flooded throughout the area

No metric included …

…but see RFC 8042 (“OSPF Two-Part Metric”)

Karst Koymans (UvA) Link State Routing Tuesday, November 27, 2018 68 / 86

OSPF packet details Link State Advertisement packets

Network LSA fields

Network LSA fields

Network Mask (Sub)network maska

Attached Router Router ID of router(s) on network

aWhere is the network itself defined?

Karst Koymans (UvA) Link State Routing Tuesday, November 27, 2018 69 / 86

OSPF packet details Link State Advertisement packets

Link State IDs

Link State IDs

LS Type Link State ID meaning

1 Router ID of originating router

2 IP address of the network’s DR

3 The destination network’s prefix

4 Router ID of described ASBR

5 The destination network’s prefix

7 The destination network’s prefix

Summary LSA Link State IDKarst Koymans (UvA) Link State Routing Tuesday, November 27, 2018 70 / 86

OSPF packet details Link State Advertisement packets

Summary LSA (type = 3, 4) without header

0 7 8 31

Network Mask5

0 MetricTOS TOS metric

}for each desired TOS

Originated by Area Border Router

Flooded throughout the area(s)

5Only relevant for type 3Karst Koymans (UvA) Link State Routing Tuesday, November 27, 2018 71 / 86

OSPF packet details Link State Advertisement packets

Summary LSA fields

Summary LSA fields

Network Maska Address mask for the advertised destination

Metric Cost to advertised destination

aOnly relevant for type 3

Karst Koymans (UvA) Link State Routing Tuesday, November 27, 2018 72 / 86

OSPF packet details Link State Advertisement packets

Link State IDs

Link State IDsLS Type Link State ID meaning

1 Router ID of originating router2 IP address of the network’s DR3 The destination network’s prefix4 Router ID of described ASBR5 The destination network’s prefix7 The destination network’s prefix

External LSA Link State ID

Karst Koymans (UvA) Link State Routing Tuesday, November 27, 2018 73 / 86

OSPF packet details Link State Advertisement packets

AS External LSA (LS type 5 and 7) without header

0 7 8 31

Network MaskE 0 Metric

Forwarding addressExternal Route Tag

E TOS TOS metricForwarding addressExternal Route Tag

for each desired TOS

Originated by AS Boundary RouterFlooded throughout the whole AS (type 5)Flooded throughout NSSA (type 7)

Karst Koymans (UvA) Link State Routing Tuesday, November 27, 2018 74 / 86

OSPF packet details Link State Advertisement packets

AS External LSA fields

AS External LSA fields

Network Mask Address mask for the advertised destination

E Only external cost is used

Metric Cost to advertised destination

Forwarding address Comparable to Next Hop in RIP

External Route Tag Comparable to Route Tag in RIP

If the E-flag is not set, the internal cost

to the ASBR is added to the external cost.

Karst Koymans (UvA) Link State Routing Tuesday, November 27, 2018 75 / 86

Representation of routers and networks

Source: RFC 2328

Representation of point to multipoint networks

Source: RFC 2328

Example OSPF network from RFC 2328

Source: RFC 2328

The directed graph for the example network

Source: RFC 2328

The shortest path tree from router RT6

Source: RFC 2328

Router (RT12) and network (N9) LSAs

Source: RFC 2328

OSPF for IPv6

Outline

1 Link State ProtocolsBasic ideasProblems and pitfalls

2 OSPFRationaleParametersDatabasesNetwork representation and architecture

3 OSPF packet detailsOSPF packet headerThe different types of OSPF packetsLink State Advertisement packets

4 OSPF for IPv6

Karst Koymans (UvA) Link State Routing Tuesday, November 27, 2018 82 / 86

OSPF for IPv6

OSPF for IP version 6

Also referred to as OSPFv3

Published as RFC 5340

Extensive, incompatible modification of OSPFv2

Therefore needs a new version number (3)Maybe it should be a completely new protocol

because it doesn’t update OSPFv2’s IPv4 operation

Basic functionality is the same

Flooding, areas, SPT, (B)DRs, …

Karst Koymans (UvA) Link State Routing Tuesday, November 27, 2018 83 / 86

OSPF for IPv6

Important changes

All addressing semantics moved to LSA payload

Works per-link instead of per-subnet

Introduces a new link-LSA

Introduces explicit flooding scope

Link scope, Area scope and AS scope

Removes authentication from packet header

Authentication uses AH and ESP headers

Karst Koymans (UvA) Link State Routing Tuesday, November 27, 2018 84 / 86

OSPF for IPv6

Router and network LSAs

Do not contain address information any more

Only topological connectivity

No IPv6 prefix information

Network protocol independent

Prefix information on transit and stub networks is inside a new

intra-area-prefix-LSA

Link-LSAs now distribute

Link local addresses of routers

IPv6 prefixes used on the link

Option announcements for network LSAs

Karst Koymans (UvA) Link State Routing Tuesday, November 27, 2018 85 / 86

OSPF for IPv6

LSA renamings

Type-3 summary-LSAs are now called

inter-area-prefix-LSAs

Type-4 summary LSAs are now called

inter-area-router-LSAs

Karst Koymans (UvA) Link State Routing Tuesday, November 27, 2018 86 / 86


Recommended