link state routing - in particular ospf file1 linkstateprotocols basicideas problemsandpitfalls 2...

91
Link State Routing In particular OSPF dr. C. P. J. Koymans Informatics Institute University of Amsterdam (version 1.2, 2010/03/02 13:33:33) Monday, March 1, 2010 dr. C. P. J. Koymans (UvA) Link State Routing Monday, March 1, 2010 1 / 70

Upload: dinhtram

Post on 22-May-2019

214 views

Category:

Documents


0 download

TRANSCRIPT

Link State RoutingIn particular OSPF

dr. C. P. J. Koymans

Informatics InstituteUniversity of Amsterdam(version 1.2, 2010/03/02 13:33:33)

Monday, March 1, 2010

dr. C. P. J. Koymans (UvA) Link State Routing Monday, March 1, 2010 1 / 70

1 Link State ProtocolsBasic ideasProblems and pitfalls

2 OSPFRationaleParametersDatabasesNetwork representation and architecture

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

Link State Advertisement headerThe different kinds of Link State Advertisements

dr. C. P. J. Koymans (UvA) Link State Routing Monday, March 1, 2010 2 / 70

Link State Protocols

Outline

1 Link State ProtocolsBasic ideasProblems and pitfalls

2 OSPFRationaleParametersDatabasesNetwork representation and architecture

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

Link State Advertisement headerThe different kinds of Link State Advertisements

dr. C. P. J. Koymans (UvA) Link State Routing Monday, March 1, 2010 3 / 70

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 kinds of OSPF packetsLink State Advertisement packets

Link State Advertisement headerThe different kinds of Link State Advertisements

dr. C. P. J. Koymans (UvA) Link State Routing Monday, March 1, 2010 4 / 70

Link State Protocols Basic ideas

Link State Protocol

A Link State Protocol

Builds on complete information about the network topology

Uses Dijkstra’s 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

dr. C. P. J. Koymans (UvA) Link State Routing Monday, March 1, 2010 5 / 70

Link State Protocols Basic ideas

Link State Packets

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

and its links to the rest of the network

This representation suffices for point to point links

Broadcast networks (LANs) and NBMA networks are represented

by virtual nodes inside the topology

Designated routers (DRs) speak on their behalf

dr. C. P. J. Koymans (UvA) Link State Routing Monday, March 1, 2010 6 / 70

Link State Protocols Basic ideas

Non-broadcast networks

NBMA

Non-Broadcast Multiple Access

Full mesh of connectivity

Connectivity via elected DR

Point-to-Multipoint

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

No full mesh of connectivity

No DR is elected

dr. C. P. J. Koymans (UvA) Link State Routing Monday, March 1, 2010 7 / 70

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 networks

Send out hellos using multicast

Not all neighbours will become adjacent

dr. C. P. J. Koymans (UvA) Link State Routing Monday, March 1, 2010 8 / 70

Link State Protocols Basic ideas

LSP generation

Periodic announcements with a long period (like 30 minutes)

Triggered updates when there are changes, which can be

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

Detection of a link or node failure

Change of a link cost

dr. C. P. J. Koymans (UvA) Link State Routing Monday, March 1, 2010 9 / 70

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

It would need a “TTL” to prevent loops

It could cause exponential multiplication of packets

Smart flooding recognizes identical LSPs

Causing propagation to be tree-like

dr. C. P. J. Koymans (UvA) Link State Routing Monday, March 1, 2010 10 / 70

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

It would need a “TTL” to prevent loops

It could cause exponential multiplication of packets

Smart flooding recognizes identical LSPs

Causing propagation to be tree-like

dr. C. P. J. Koymans (UvA) Link State Routing Monday, March 1, 2010 10 / 70

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

It would need a “TTL” to prevent loops

It could cause exponential multiplication of packets

Smart flooding recognizes identical LSPs

Causing propagation to be tree-like

dr. C. P. J. Koymans (UvA) Link State Routing Monday, March 1, 2010 10 / 70

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

It would need a “TTL” to prevent loops

It could cause exponential multiplication of packets

Smart flooding recognizes identical LSPs

Causing propagation to be tree-like

dr. C. P. J. Koymans (UvA) Link State Routing Monday, March 1, 2010 10 / 70

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

It would need a “TTL” to prevent loops

It could cause exponential multiplication of packets

Smart flooding recognizes identical LSPs

Causing propagation to be tree-like

dr. C. P. J. Koymans (UvA) Link State Routing Monday, March 1, 2010 10 / 70

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

It would need a “TTL” to prevent loops

It could cause exponential multiplication of packets

Smart flooding recognizes identical LSPs

Causing propagation to be tree-like

dr. C. P. J. Koymans (UvA) Link State Routing Monday, March 1, 2010 10 / 70

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

It would need a “TTL” to prevent loops

It could cause exponential multiplication of packets

Smart flooding recognizes identical LSPs

Causing propagation to be tree-like

dr. C. P. J. Koymans (UvA) Link State Routing Monday, March 1, 2010 10 / 70

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

It would need a “TTL” to prevent loops

It could cause exponential multiplication of packets

Smart flooding recognizes identical LSPs

Causing propagation to be tree-like

dr. C. P. J. Koymans (UvA) Link State Routing Monday, March 1, 2010 10 / 70

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 kinds of OSPF packetsLink State Advertisement packets

Link State Advertisement headerThe different kinds of Link State Advertisements

dr. C. P. J. Koymans (UvA) Link State Routing Monday, March 1, 2010 11 / 70

Link State Protocols Problems and pitfalls

Most recent LSP problem

LSPs may arrive out of order

Therefore we need a mechanism to recognize older packets

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 aging procedure

to protect from stale information,

for instance when a router reboots and starts from scratch

dr. C. P. J. Koymans (UvA) Link State Routing Monday, March 1, 2010 12 / 70

Link State Protocols Problems and pitfalls

Most recent LSP problem

LSPs may arrive out of order

Therefore we need a mechanism to recognize older packets

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 aging procedure

to protect from stale information,

for instance when a router reboots and starts from scratch

dr. C. P. J. Koymans (UvA) Link State Routing Monday, March 1, 2010 12 / 70

Link State Protocols Problems and pitfalls

Most recent LSP problem

LSPs may arrive out of order

Therefore we need a mechanism to recognize older packets

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 aging procedure

to protect from stale information,

for instance when a router reboots and starts from scratch

dr. C. P. J. Koymans (UvA) Link State Routing Monday, March 1, 2010 12 / 70

Link State Protocols Problems and pitfalls

Most recent LSP problem

LSPs may arrive out of order

Therefore we need a mechanism to recognize older packets

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 aging procedure

to protect from stale information,

for instance when a router reboots and starts from scratch

dr. C. P. J. Koymans (UvA) Link State Routing Monday, March 1, 2010 12 / 70

Link State Protocols Problems and pitfalls

Most recent LSP problem

LSPs may arrive out of order

Therefore we need a mechanism to recognize older packets

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 aging procedure

to protect from stale information,

for instance when a router reboots and starts from scratch

dr. C. P. J. Koymans (UvA) Link State Routing Monday, March 1, 2010 12 / 70

Link State Protocols Problems and pitfalls

Most recent LSP problem

LSPs may arrive out of order

Therefore we need a mechanism to recognize older packets

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 aging procedure

to protect from stale information,

for instance when a router reboots and starts from scratch

dr. C. P. J. Koymans (UvA) Link State Routing Monday, March 1, 2010 12 / 70

Link State Protocols Problems and pitfalls

Most recent LSP problem

LSPs may arrive out of order

Therefore we need a mechanism to recognize older packets

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 aging procedure

to protect from stale information,

for instance when a router reboots and starts from scratch

dr. C. P. J. Koymans (UvA) Link State Routing Monday, March 1, 2010 12 / 70

Pitfalls

Sequence numbers may wrap

Sequence number ordering is not a total ordering,

not even a partial ordering

a < b < c < d < a

Link State Protocols Problems and pitfalls

Intermezzo

The devilish dice

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

dr. C. P. J. Koymans (UvA) Link State Routing Monday, March 1, 2010 14 / 70

Link State Protocols Problems and pitfalls

Intermezzo

The devilish dice

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

dr. C. P. J. Koymans (UvA) Link State Routing Monday, March 1, 2010 14 / 70

Link State Protocols Problems and pitfalls

Intermezzo

The devilish dice

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

dr. C. P. J. Koymans (UvA) Link State Routing Monday, March 1, 2010 14 / 70

Link State Protocols Problems and pitfalls

Intermezzo

The devilish dice

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

dr. C. P. J. Koymans (UvA) Link State Routing Monday, March 1, 2010 14 / 70

ARPANET lockup

S P

Q

R

cba

cba

cba

cba

cba

cba

cba

x

Link State Protocols Problems and pitfalls

Lockup solution

One could use a very large sequence number space

and wait for timeouts after overflow

One could use an age (or ttl) field

and always increase the age (decrease the ttl) by at least one

and furthermore increase (decrease) it periodically

dr. C. P. J. Koymans (UvA) Link State Routing Monday, March 1, 2010 16 / 70

Link State Protocols Problems and pitfalls

Lockup solution

One could use a very large sequence number space

and wait for timeouts after overflow

One could use an age (or ttl) field

and always increase the age (decrease the ttl) by at least one

and furthermore increase (decrease) it periodically

dr. C. P. J. Koymans (UvA) Link State Routing Monday, March 1, 2010 16 / 70

Link State Protocols Problems and pitfalls

Lockup solution

One could use a very large sequence number space

and wait for timeouts after overflow

One could use an age (or ttl) field

and always increase the age (decrease the ttl) by at least one

and furthermore increase (decrease) it periodically

dr. C. P. J. Koymans (UvA) Link State Routing Monday, March 1, 2010 16 / 70

Link State Protocols Problems and pitfalls

Lockup solution

One could use a very large sequence number space

and wait for timeouts after overflow

One could use an age (or ttl) field

and always increase the age (decrease the ttl) by at least one

and furthermore increase (decrease) it periodically

dr. C. P. J. Koymans (UvA) Link State Routing Monday, March 1, 2010 16 / 70

Link State Protocols Problems and pitfalls

Lockup solution

One could use a very large sequence number space

and wait for timeouts after overflow

One could use an age (or ttl) field

and always increase the age (decrease the ttl) by at least one

and furthermore increase (decrease) it periodically

dr. C. P. J. Koymans (UvA) Link State Routing Monday, March 1, 2010 16 / 70

Link State Protocols Problems and pitfalls

Lockup solution

One could use a very large sequence number space

and wait for timeouts after overflow

One could use an age (or ttl) field

and always increase the age (decrease the ttl) by at least one

and furthermore increase (decrease) it periodically

dr. C. P. J. Koymans (UvA) Link State Routing Monday, March 1, 2010 16 / 70

OSPF

Outline

1 Link State ProtocolsBasic ideasProblems and pitfalls

2 OSPFRationaleParametersDatabasesNetwork representation and architecture

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

Link State Advertisement headerThe different kinds of Link State Advertisements

dr. C. P. J. Koymans (UvA) Link State Routing Monday, March 1, 2010 17 / 70

OSPF Rationale

Outline

1 Link State ProtocolsBasic ideasProblems and pitfalls

2 OSPFRationaleParametersDatabasesNetwork representation and architecture

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

Link State Advertisement headerThe different kinds of Link State Advertisements

dr. C. P. J. Koymans (UvA) Link State Routing Monday, March 1, 2010 18 / 70

OSPF Rationale

OSPF advantages (1)

OSPF

Introduces hierarchical routing

Supports load balancing

Supports subnets

Supports unnumbered interfaces/networks

Supports point-to-point, broadcast, NBMA

and point-to-multipoint networks

Supports virtual links for backbone connectivity

dr. C. P. J. Koymans (UvA) Link State Routing Monday, March 1, 2010 19 / 70

OSPF Rationale

OSPF advantages (2)

OSPF

Has built in authentication

Uses efficient multicast for flooding

Uses metrics built on cost, per interface

Is easily extendable for multicast routing (MOSPF)

dr. C. P. J. Koymans (UvA) Link State Routing Monday, March 1, 2010 20 / 70

OSPF Rationale

OSPF fun :)

IETF T-shirt

IS − IS = 0

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

dr. C. P. J. Koymans (UvA) Link State Routing Monday, March 1, 2010 21 / 70

OSPF Rationale

Some OSPF facts

OSPF builds directly upon IP

OSPF uses protocol type 89

Current OSPF version is 2

RFC 2328 (Moy, 1998)

RFC 2740 (OSPF for IPv6) ⇒ version 3

OSPF uses LSA (Link State Advertisement)

terminology in stead of LSP (Link State Packet)

dr. C. P. J. Koymans (UvA) Link State Routing Monday, March 1, 2010 22 / 70

OSPF Parameters

Outline

1 Link State ProtocolsBasic ideasProblems and pitfalls

2 OSPFRationaleParametersDatabasesNetwork representation and architecture

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

Link State Advertisement headerThe different kinds of Link State Advertisements

dr. C. P. J. Koymans (UvA) Link State Routing Monday, March 1, 2010 23 / 70

OSPF Parameters

Timers and Overflow

These must be the same for all OSPF neighbours

HelloInterval (default 10 sec)

RouterDeadInterval (default 40 sec)

In case of database overflow

external routing information is dropped first

dr. C. P. J. Koymans (UvA) Link State Routing Monday, March 1, 2010 24 / 70

OSPF Databases

Outline

1 Link State ProtocolsBasic ideasProblems and pitfalls

2 OSPFRationaleParametersDatabasesNetwork representation and architecture

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

Link State Advertisement headerThe different kinds of Link State Advertisements

dr. C. P. J. Koymans (UvA) Link State Routing Monday, March 1, 2010 25 / 70

OSPF Databases

Consistent LSA Databases

LSA’s must be acknowledged

LSA’s (and their acks) are queued/flagged for transmission

LSA’s must time out at about the same time

by using triggered distribution of age MaxAge packets

which must be honored

but only if there is already an LSA

for this node in the local database

dr. C. P. J. Koymans (UvA) Link State Routing Monday, March 1, 2010 26 / 70

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 kinds of OSPF packetsLink State Advertisement packets

Link State Advertisement headerThe different kinds of Link State Advertisements

dr. C. P. J. Koymans (UvA) Link State Routing Monday, March 1, 2010 27 / 70

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

and acts on its behalf

The DR/BDR election process is sticky

The priority of routers can be configured

dr. C. P. J. Koymans (UvA) Link State Routing Monday, March 1, 2010 28 / 70

Multicast usage

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

Update

Update

Acknowledgement

R SDR

Multicast to AllDRouters (224.0.0.6)

Multicast to AllSPFRouters (224.0.0.5)

Hierarchical routing

Backbone is area 0

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

ABRs

Backbone (area 0)

1 2 3 4

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

ABRs

Backbone (area 0)

1 2 3 4 5

OSPF Network representation and architecture

Inter Area Summaries

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

dr. C. P. J. Koymans (UvA) Link State Routing Monday, March 1, 2010 32 / 70

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

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

dr. C. P. J. Koymans (UvA) Link State Routing Monday, March 1, 2010 33 / 70

OSPF Network representation and architecture

Area Border Router (ABR)

Attaches to multiple areas

Runs multiple copies of the basic algorithm, once 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

dr. C. P. J. Koymans (UvA) Link State Routing Monday, March 1, 2010 34 / 70

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, . . .

Injects external routes into OSPF

ASBR notion is independent of backbone, internal or ABR router

dr. C. P. J. Koymans (UvA) Link State Routing Monday, March 1, 2010 35 / 70

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

A default route is injected by all ABRs

A totally stubby area is a stubby area into which

not even inter-area summaries are injected

dr. C. P. J. Koymans (UvA) Link State Routing Monday, March 1, 2010 36 / 70

OSPF packet details

Outline

1 Link State ProtocolsBasic ideasProblems and pitfalls

2 OSPFRationaleParametersDatabasesNetwork representation and architecture

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

Link State Advertisement headerThe different kinds of Link State Advertisements

dr. C. P. J. Koymans (UvA) Link State Routing Monday, March 1, 2010 37 / 70

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 kinds of OSPF packetsLink State Advertisement packets

Link State Advertisement headerThe different kinds of Link State Advertisements

dr. C. P. J. Koymans (UvA) Link State Routing Monday, March 1, 2010 38 / 70

OSPF packet details OSPF packet header

OSPF packet header (24 bytes)

0 7 8 15 16 31

Version Type Packet length

Router ID

Area ID

Checksum AuType

Authentication

dr. C. P. J. Koymans (UvA) Link State Routing Monday, March 1, 2010 39 / 70

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 originating router

Area ID The area a packet belongs to

Checksum One’s complement checksum

AuType Null, Simple or Crypto

Authentication “Pointer to message digest” (Crypto)

dr. C. P. J. Koymans (UvA) Link State Routing Monday, March 1, 2010 40 / 70

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 Update

5 Link State Acknowledgement

dr. C. P. J. Koymans (UvA) Link State Routing Monday, March 1, 2010 41 / 70

OSPF packet details The different kinds of OSPF packets

Outline

1 Link State ProtocolsBasic ideasProblems and pitfalls

2 OSPFRationaleParametersDatabasesNetwork representation and architecture

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

Link State Advertisement headerThe different kinds of Link State Advertisements

dr. C. P. J. Koymans (UvA) Link State Routing Monday, March 1, 2010 42 / 70

OSPF packet details The different kinds of OSPF packets

OSPF Hello packet (20 + N ∗ 4 bytes)

0 15 16 23 24 31

Network Mask

HelloInterval Options Rtr Pri

RouterDeadInterval

Designated Router

Backup Designated Router

Neighbor #1...

Neighbor #N

Repeated foreach livingneighbor

dr. C. P. J. Koymans (UvA) Link State Routing Monday, March 1, 2010 43 / 70

OSPF packet details The different kinds of OSPF packets

OSPF Hello packet fields

Hello fields

Network Mask subnet mask of link

HelloInterval interval in seconds between hellos

Options multiple metrics (Ta); no stub area (E)

Rtr Pri router priority, used for DR election

RouterDeadInterval interval to consider a silent neighbor dead

Designated Router IP address of designated router

Backup Designated Router IP address of backup designated router

Neighbor (living) neighbor IDs

adeprecated because of lack of experience with TOSdr. C. P. J. Koymans (UvA) Link State Routing Monday, March 1, 2010 44 / 70

OSPF packet details The different kinds of OSPF packets

OSPF DD packet (2 + 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

Partial list ofdatabase

dr. C. P. J. Koymans (UvA) Link State Routing Monday, March 1, 2010 45 / 70

OSPF packet details The different kinds 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 Used for ordering DD packets

LSA header Link state database instance identitya

aIncluding age and sequence number

dr. C. P. J. Koymans (UvA) Link State Routing Monday, March 1, 2010 46 / 70

OSPF packet details The different kinds of OSPF packets

OSPF LS request packet (N ∗ 12 bytes)

0 31

LS type

Link State ID

Advertising Router

Multipleoccurrences

dr. C. P. J. Koymans (UvA) Link State Routing Monday, March 1, 2010 47 / 70

OSPF packet details The different kinds 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

Together these entries uniquely identify an LSA, but not an LSA instance.The Database Description packets refer to a specific LSA instance,but without actual data.

dr. C. P. J. Koymans (UvA) Link State Routing Monday, March 1, 2010 48 / 70

OSPF packet details The different kinds of OSPF packets

OSPF LS Update packet

0 31

# LSA’s (N)

LSA #1hhhhhhhhhhhhhhhhhhhhhhhh

hhhhhhhhhhhhhhhhhhhhhhhh

LSA #N

N occurrences

dr. C. P. J. Koymans (UvA) Link State Routing Monday, March 1, 2010 49 / 70

OSPF packet details The different kinds of OSPF packets

OSPF LS Update packet fields

LS Update fields

# LSA’s Number of LSA’s inside the update packet

LSA #i A complete Link State Advertisement

Link State Updates contain complete and specific instances ofLink State Advertisements with all relevant data.

dr. C. P. J. Koymans (UvA) Link State Routing Monday, March 1, 2010 50 / 70

OSPF packet details The different kinds of OSPF packets

OSPF LS Acknowledgement packet (N ∗ 20 bytes)

0 31

LSA header #1hhhhhhhhhhhhhhhhhhhhhhhh

hhhhhhhhhhhhhhhhhhhhhhhh

LSA header #N

N occurrences

dr. C. P. J. Koymans (UvA) Link State Routing Monday, March 1, 2010 51 / 70

OSPF packet details The different kinds of OSPF packets

OSPF LS Acknowledgement packet fields

LS Acknowledgement fields

LSA header #i A complete Link State Header

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

dr. C. P. J. Koymans (UvA) Link State Routing Monday, March 1, 2010 52 / 70

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 kinds of OSPF packetsLink State Advertisement packets

Link State Advertisement headerThe different kinds of Link State Advertisements

dr. C. P. J. Koymans (UvA) Link State Routing Monday, March 1, 2010 53 / 70

OSPF packet details Link State Advertisement packets

Link State Advertisements

Multiple LSA’s may be found inside a Link State Update packet

Every LSA consists of

LSA Header (20 bytes)

LSA type specific content

dr. C. P. J. Koymans (UvA) Link State Routing Monday, March 1, 2010 54 / 70

OSPF packet details Link State Advertisement packets

LSA header (20 bytes)

0 15 16 23 24 31

LS age Options LS type

Link State ID

Advertising Router

LS sequence number

LS Checksum Length

dr. C. P. J. Koymans (UvA) Link State Routing Monday, March 1, 2010 55 / 70

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

dr. C. P. J. Koymans (UvA) Link State Routing Monday, March 1, 2010 56 / 70

OSPF packet details Link State Advertisement packets

LS types

LS Types

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)

dr. C. P. J. Koymans (UvA) Link State Routing Monday, March 1, 2010 57 / 70

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 LSA’s are translated at the ABR into ordinary

external LSA’s (type 5) for the rest of the OSPF domain

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

NSSA border router(s) into the NSSA.

dr. C. P. J. Koymans (UvA) Link State Routing Monday, March 1, 2010 58 / 70

OSPF packet details Link State Advertisement packets

Link State IDs

Link State IDs

Type Meaning

1 ID of originating router

2 IP address of the network’s DR

3 The destination’s IP network address

4 ID of described ASBR

5 The destination’s IP network address

dr. C. P. J. Koymans (UvA) Link State Routing Monday, March 1, 2010 59 / 70

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 ID

Link Data

Type # TOS metric

TOS 0 TOS metric

repeated# linkstimes

}# TOS times1

Originated by every routerFlooded throughout the area(s)

1For backward compatibilitydr. C. P. J. Koymans (UvA) Link State Routing Monday, March 1, 2010 60 / 70

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

dr. C. P. J. Koymans (UvA) Link State Routing Monday, March 1, 2010 61 / 70

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

dr. C. P. J. Koymans (UvA) Link State Routing Monday, March 1, 2010 62 / 70

OSPF packet details Link State Advertisement packets

Router LSA Link ID field

Router LSA Link ID field

Type Meaning

1 ID of neighbor router

2 IP address of designated router

3 IP (sub)network number

4 ID of neighbor router

dr. C. P. J. Koymans (UvA) Link State Routing Monday, March 1, 2010 63 / 70

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

dr. C. P. J. Koymans (UvA) Link State Routing Monday, March 1, 2010 64 / 70

OSPF packet details Link State Advertisement packets

Network LSA (LS type = 2) without header (4 + N ∗ 4

bytes)

0 31

Network Mask

Attached Router}Repeated for each attached router

Originated by Designated Router

Flooded throughout the area

dr. C. P. J. Koymans (UvA) Link State Routing Monday, March 1, 2010 65 / 70

OSPF packet details Link State Advertisement packets

Network LSA fields

Network LSA fields

Network Mask (Sub)network mask

Attached Router Router ID of router(s) on network

dr. C. P. J. Koymans (UvA) Link State Routing Monday, March 1, 2010 66 / 70

OSPF packet details Link State Advertisement packets

Summary LSA (type = 3, 4) without header

0 7 8 31

Network Mask2

0 metric

TOS TOS metric}for each desired TOS3

Originated by Area Border Router

Flooded throughout the area(s)

2Only relevant for type 33For backward compatibilitydr. C. P. J. Koymans (UvA) Link State Routing Monday, March 1, 2010 67 / 70

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

dr. C. P. J. Koymans (UvA) Link State Routing Monday, March 1, 2010 68 / 70

OSPF packet details Link State Advertisement packets

AS External LSA (LS type 5) without header

0 7 8 31

Network Mask

E 0 metric

Forwarding address

External Route Tag

E TOS TOS metric

Forwarding address

External Route Tag

for each desired TOS4

Originated by AS Boundary RouterFlooded throughout the whole AS

4For backward compatibilitydr. C. P. J. Koymans (UvA) Link State Routing Monday, March 1, 2010 69 / 70

OSPF packet details Link State Advertisement packets

AS External LSA fields

AS External LSA fields

Network Mask Address mask for the advertised destination

E External cost is higher than internal cost

metric Cost to advertised destination

Forwarding address Comparable to Next Hop in RIP

External Route Tag Comparable to Route Tag in RIP

dr. C. P. J. Koymans (UvA) Link State Routing Monday, March 1, 2010 70 / 70