91
Link State Routing In particular OSPF dr. C. P. J. Koymans Informatics Institute University of Amsterdam March 4, 2009 dr. C. P. J. Koymans (UvA) Link State Routing March 4, 2009 1 / 70

Link State Routing - In particular OSPF fileLinkStateRouting InparticularOSPF dr. C.P.J.Koymans InformaticsInstitute UniversityofAmsterdam March4,2009 dr. C.P.J.Koymans (UvA) LinkStateRouting

  • Upload
    voque

  • View
    212

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Link State Routing - In particular OSPF fileLinkStateRouting InparticularOSPF dr. C.P.J.Koymans InformaticsInstitute UniversityofAmsterdam March4,2009 dr. C.P.J.Koymans (UvA) LinkStateRouting

Link State RoutingIn particular OSPF

dr. C. P. J. Koymans

Informatics InstituteUniversity of Amsterdam

March 4, 2009

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

Page 2: Link State Routing - In particular OSPF fileLinkStateRouting InparticularOSPF dr. C.P.J.Koymans InformaticsInstitute UniversityofAmsterdam March4,2009 dr. C.P.J.Koymans (UvA) LinkStateRouting

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 March 4, 2009 2 / 70

Page 3: Link State Routing - In particular OSPF fileLinkStateRouting InparticularOSPF dr. C.P.J.Koymans InformaticsInstitute UniversityofAmsterdam March4,2009 dr. C.P.J.Koymans (UvA) LinkStateRouting

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 March 4, 2009 3 / 70

Page 4: Link State Routing - In particular OSPF fileLinkStateRouting InparticularOSPF dr. C.P.J.Koymans InformaticsInstitute UniversityofAmsterdam March4,2009 dr. C.P.J.Koymans (UvA) LinkStateRouting

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 March 4, 2009 4 / 70

Page 5: Link State Routing - In particular OSPF fileLinkStateRouting InparticularOSPF dr. C.P.J.Koymans InformaticsInstitute UniversityofAmsterdam March4,2009 dr. C.P.J.Koymans (UvA) LinkStateRouting

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 March 4, 2009 5 / 70

Page 6: Link State Routing - In particular OSPF fileLinkStateRouting InparticularOSPF dr. C.P.J.Koymans InformaticsInstitute UniversityofAmsterdam March4,2009 dr. C.P.J.Koymans (UvA) LinkStateRouting

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 March 4, 2009 6 / 70

Page 7: Link State Routing - In particular OSPF fileLinkStateRouting InparticularOSPF dr. C.P.J.Koymans InformaticsInstitute UniversityofAmsterdam March4,2009 dr. C.P.J.Koymans (UvA) LinkStateRouting

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 March 4, 2009 7 / 70

Page 8: Link State Routing - In particular OSPF fileLinkStateRouting InparticularOSPF dr. C.P.J.Koymans InformaticsInstitute UniversityofAmsterdam March4,2009 dr. C.P.J.Koymans (UvA) LinkStateRouting

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 March 4, 2009 8 / 70

Page 9: Link State Routing - In particular OSPF fileLinkStateRouting InparticularOSPF dr. C.P.J.Koymans InformaticsInstitute UniversityofAmsterdam March4,2009 dr. C.P.J.Koymans (UvA) LinkStateRouting

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 March 4, 2009 9 / 70

Page 10: Link State Routing - In particular OSPF fileLinkStateRouting InparticularOSPF dr. C.P.J.Koymans InformaticsInstitute UniversityofAmsterdam March4,2009 dr. C.P.J.Koymans (UvA) LinkStateRouting

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 March 4, 2009 10 / 70

Page 11: Link State Routing - In particular OSPF fileLinkStateRouting InparticularOSPF dr. C.P.J.Koymans InformaticsInstitute UniversityofAmsterdam March4,2009 dr. C.P.J.Koymans (UvA) LinkStateRouting

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 March 4, 2009 10 / 70

Page 12: Link State Routing - In particular OSPF fileLinkStateRouting InparticularOSPF dr. C.P.J.Koymans InformaticsInstitute UniversityofAmsterdam March4,2009 dr. C.P.J.Koymans (UvA) LinkStateRouting

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 March 4, 2009 10 / 70

Page 13: Link State Routing - In particular OSPF fileLinkStateRouting InparticularOSPF dr. C.P.J.Koymans InformaticsInstitute UniversityofAmsterdam March4,2009 dr. C.P.J.Koymans (UvA) LinkStateRouting

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 March 4, 2009 10 / 70

Page 14: Link State Routing - In particular OSPF fileLinkStateRouting InparticularOSPF dr. C.P.J.Koymans InformaticsInstitute UniversityofAmsterdam March4,2009 dr. C.P.J.Koymans (UvA) LinkStateRouting

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 March 4, 2009 10 / 70

Page 15: Link State Routing - In particular OSPF fileLinkStateRouting InparticularOSPF dr. C.P.J.Koymans InformaticsInstitute UniversityofAmsterdam March4,2009 dr. C.P.J.Koymans (UvA) LinkStateRouting

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 March 4, 2009 10 / 70

Page 16: Link State Routing - In particular OSPF fileLinkStateRouting InparticularOSPF dr. C.P.J.Koymans InformaticsInstitute UniversityofAmsterdam March4,2009 dr. C.P.J.Koymans (UvA) LinkStateRouting

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 March 4, 2009 10 / 70

Page 17: Link State Routing - In particular OSPF fileLinkStateRouting InparticularOSPF dr. C.P.J.Koymans InformaticsInstitute UniversityofAmsterdam March4,2009 dr. C.P.J.Koymans (UvA) LinkStateRouting

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 March 4, 2009 10 / 70

Page 18: Link State Routing - In particular OSPF fileLinkStateRouting InparticularOSPF dr. C.P.J.Koymans InformaticsInstitute UniversityofAmsterdam March4,2009 dr. C.P.J.Koymans (UvA) LinkStateRouting

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 March 4, 2009 11 / 70

Page 19: Link State Routing - In particular OSPF fileLinkStateRouting InparticularOSPF dr. C.P.J.Koymans InformaticsInstitute UniversityofAmsterdam March4,2009 dr. C.P.J.Koymans (UvA) LinkStateRouting

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 March 4, 2009 12 / 70

Page 20: Link State Routing - In particular OSPF fileLinkStateRouting InparticularOSPF dr. C.P.J.Koymans InformaticsInstitute UniversityofAmsterdam March4,2009 dr. C.P.J.Koymans (UvA) LinkStateRouting

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 March 4, 2009 12 / 70

Page 21: Link State Routing - In particular OSPF fileLinkStateRouting InparticularOSPF dr. C.P.J.Koymans InformaticsInstitute UniversityofAmsterdam March4,2009 dr. C.P.J.Koymans (UvA) LinkStateRouting

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 March 4, 2009 12 / 70

Page 22: Link State Routing - In particular OSPF fileLinkStateRouting InparticularOSPF dr. C.P.J.Koymans InformaticsInstitute UniversityofAmsterdam March4,2009 dr. C.P.J.Koymans (UvA) LinkStateRouting

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 March 4, 2009 12 / 70

Page 23: Link State Routing - In particular OSPF fileLinkStateRouting InparticularOSPF dr. C.P.J.Koymans InformaticsInstitute UniversityofAmsterdam March4,2009 dr. C.P.J.Koymans (UvA) LinkStateRouting

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 March 4, 2009 12 / 70

Page 24: Link State Routing - In particular OSPF fileLinkStateRouting InparticularOSPF dr. C.P.J.Koymans InformaticsInstitute UniversityofAmsterdam March4,2009 dr. C.P.J.Koymans (UvA) LinkStateRouting

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 March 4, 2009 12 / 70

Page 25: Link State Routing - In particular OSPF fileLinkStateRouting InparticularOSPF dr. C.P.J.Koymans InformaticsInstitute UniversityofAmsterdam March4,2009 dr. C.P.J.Koymans (UvA) LinkStateRouting

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 March 4, 2009 12 / 70

Page 26: Link State Routing - In particular OSPF fileLinkStateRouting InparticularOSPF dr. C.P.J.Koymans InformaticsInstitute UniversityofAmsterdam March4,2009 dr. C.P.J.Koymans (UvA) LinkStateRouting

Pitfalls

Sequence numbers may wrap

Sequence number ordering is not a total ordering,

not even a partial ordering

a < b < c < d < a

Page 27: Link State Routing - In particular OSPF fileLinkStateRouting InparticularOSPF dr. C.P.J.Koymans InformaticsInstitute UniversityofAmsterdam March4,2009 dr. C.P.J.Koymans (UvA) LinkStateRouting

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 March 4, 2009 14 / 70

Page 28: Link State Routing - In particular OSPF fileLinkStateRouting InparticularOSPF dr. C.P.J.Koymans InformaticsInstitute UniversityofAmsterdam March4,2009 dr. C.P.J.Koymans (UvA) LinkStateRouting

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 March 4, 2009 14 / 70

Page 29: Link State Routing - In particular OSPF fileLinkStateRouting InparticularOSPF dr. C.P.J.Koymans InformaticsInstitute UniversityofAmsterdam March4,2009 dr. C.P.J.Koymans (UvA) LinkStateRouting

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 March 4, 2009 14 / 70

Page 30: Link State Routing - In particular OSPF fileLinkStateRouting InparticularOSPF dr. C.P.J.Koymans InformaticsInstitute UniversityofAmsterdam March4,2009 dr. C.P.J.Koymans (UvA) LinkStateRouting

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 March 4, 2009 14 / 70

Page 31: Link State Routing - In particular OSPF fileLinkStateRouting InparticularOSPF dr. C.P.J.Koymans InformaticsInstitute UniversityofAmsterdam March4,2009 dr. C.P.J.Koymans (UvA) LinkStateRouting

ARPANET lockup

S P

Q

R

cba

cba

cba

cba

cba

cba

cba

x

Page 32: Link State Routing - In particular OSPF fileLinkStateRouting InparticularOSPF dr. C.P.J.Koymans InformaticsInstitute UniversityofAmsterdam March4,2009 dr. C.P.J.Koymans (UvA) LinkStateRouting

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 March 4, 2009 16 / 70

Page 33: Link State Routing - In particular OSPF fileLinkStateRouting InparticularOSPF dr. C.P.J.Koymans InformaticsInstitute UniversityofAmsterdam March4,2009 dr. C.P.J.Koymans (UvA) LinkStateRouting

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 March 4, 2009 16 / 70

Page 34: Link State Routing - In particular OSPF fileLinkStateRouting InparticularOSPF dr. C.P.J.Koymans InformaticsInstitute UniversityofAmsterdam March4,2009 dr. C.P.J.Koymans (UvA) LinkStateRouting

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 March 4, 2009 16 / 70

Page 35: Link State Routing - In particular OSPF fileLinkStateRouting InparticularOSPF dr. C.P.J.Koymans InformaticsInstitute UniversityofAmsterdam March4,2009 dr. C.P.J.Koymans (UvA) LinkStateRouting

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 March 4, 2009 16 / 70

Page 36: Link State Routing - In particular OSPF fileLinkStateRouting InparticularOSPF dr. C.P.J.Koymans InformaticsInstitute UniversityofAmsterdam March4,2009 dr. C.P.J.Koymans (UvA) LinkStateRouting

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 March 4, 2009 16 / 70

Page 37: Link State Routing - In particular OSPF fileLinkStateRouting InparticularOSPF dr. C.P.J.Koymans InformaticsInstitute UniversityofAmsterdam March4,2009 dr. C.P.J.Koymans (UvA) LinkStateRouting

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 March 4, 2009 16 / 70

Page 38: Link State Routing - In particular OSPF fileLinkStateRouting InparticularOSPF dr. C.P.J.Koymans InformaticsInstitute UniversityofAmsterdam March4,2009 dr. C.P.J.Koymans (UvA) LinkStateRouting

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 March 4, 2009 17 / 70

Page 39: Link State Routing - In particular OSPF fileLinkStateRouting InparticularOSPF dr. C.P.J.Koymans InformaticsInstitute UniversityofAmsterdam March4,2009 dr. C.P.J.Koymans (UvA) LinkStateRouting

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 March 4, 2009 18 / 70

Page 40: Link State Routing - In particular OSPF fileLinkStateRouting InparticularOSPF dr. C.P.J.Koymans InformaticsInstitute UniversityofAmsterdam March4,2009 dr. C.P.J.Koymans (UvA) LinkStateRouting

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 March 4, 2009 19 / 70

Page 41: Link State Routing - In particular OSPF fileLinkStateRouting InparticularOSPF dr. C.P.J.Koymans InformaticsInstitute UniversityofAmsterdam March4,2009 dr. C.P.J.Koymans (UvA) LinkStateRouting

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 March 4, 2009 20 / 70

Page 42: Link State Routing - In particular OSPF fileLinkStateRouting InparticularOSPF dr. C.P.J.Koymans InformaticsInstitute UniversityofAmsterdam March4,2009 dr. C.P.J.Koymans (UvA) LinkStateRouting

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 March 4, 2009 21 / 70

Page 43: Link State Routing - In particular OSPF fileLinkStateRouting InparticularOSPF dr. C.P.J.Koymans InformaticsInstitute UniversityofAmsterdam March4,2009 dr. C.P.J.Koymans (UvA) LinkStateRouting

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 March 4, 2009 22 / 70

Page 44: Link State Routing - In particular OSPF fileLinkStateRouting InparticularOSPF dr. C.P.J.Koymans InformaticsInstitute UniversityofAmsterdam March4,2009 dr. C.P.J.Koymans (UvA) LinkStateRouting

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 March 4, 2009 23 / 70

Page 45: Link State Routing - In particular OSPF fileLinkStateRouting InparticularOSPF dr. C.P.J.Koymans InformaticsInstitute UniversityofAmsterdam March4,2009 dr. C.P.J.Koymans (UvA) LinkStateRouting

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 March 4, 2009 24 / 70

Page 46: Link State Routing - In particular OSPF fileLinkStateRouting InparticularOSPF dr. C.P.J.Koymans InformaticsInstitute UniversityofAmsterdam March4,2009 dr. C.P.J.Koymans (UvA) LinkStateRouting

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 March 4, 2009 25 / 70

Page 47: Link State Routing - In particular OSPF fileLinkStateRouting InparticularOSPF dr. C.P.J.Koymans InformaticsInstitute UniversityofAmsterdam March4,2009 dr. C.P.J.Koymans (UvA) LinkStateRouting

OSPF Databases

Consistent LSA Databases

LSAs must be acknowledged

LSAs are queued/flagged for transmission

LSAs 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 March 4, 2009 26 / 70

Page 48: Link State Routing - In particular OSPF fileLinkStateRouting InparticularOSPF dr. C.P.J.Koymans InformaticsInstitute UniversityofAmsterdam March4,2009 dr. C.P.J.Koymans (UvA) LinkStateRouting

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 March 4, 2009 27 / 70

Page 49: Link State Routing - In particular OSPF fileLinkStateRouting InparticularOSPF dr. C.P.J.Koymans InformaticsInstitute UniversityofAmsterdam March4,2009 dr. C.P.J.Koymans (UvA) LinkStateRouting

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 March 4, 2009 28 / 70

Page 50: Link State Routing - In particular OSPF fileLinkStateRouting InparticularOSPF dr. C.P.J.Koymans InformaticsInstitute UniversityofAmsterdam March4,2009 dr. C.P.J.Koymans (UvA) LinkStateRouting

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)

Page 51: Link State Routing - In particular OSPF fileLinkStateRouting InparticularOSPF dr. C.P.J.Koymans InformaticsInstitute UniversityofAmsterdam March4,2009 dr. C.P.J.Koymans (UvA) LinkStateRouting

Hierarchical routing

Backbone is area 0

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

ABRs

Backbone (area 0)

1 2 3 4

Page 52: Link State Routing - In particular OSPF fileLinkStateRouting InparticularOSPF dr. C.P.J.Koymans InformaticsInstitute UniversityofAmsterdam March4,2009 dr. C.P.J.Koymans (UvA) LinkStateRouting

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

Page 53: Link State Routing - In particular OSPF fileLinkStateRouting InparticularOSPF dr. C.P.J.Koymans InformaticsInstitute UniversityofAmsterdam March4,2009 dr. C.P.J.Koymans (UvA) LinkStateRouting

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

Some (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 March 4, 2009 32 / 70

Page 54: Link State Routing - In particular OSPF fileLinkStateRouting InparticularOSPF dr. C.P.J.Koymans InformaticsInstitute UniversityofAmsterdam March4,2009 dr. C.P.J.Koymans (UvA) LinkStateRouting

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 Border Router (ASBR)

Participates in another (external) routing protocol

dr. C. P. J. Koymans (UvA) Link State Routing March 4, 2009 33 / 70

Page 55: Link State Routing - In particular OSPF fileLinkStateRouting InparticularOSPF dr. C.P.J.Koymans InformaticsInstitute UniversityofAmsterdam March4,2009 dr. C.P.J.Koymans (UvA) LinkStateRouting

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

Can aggregate summary data

dr. C. P. J. Koymans (UvA) Link State Routing March 4, 2009 34 / 70

Page 56: Link State Routing - In particular OSPF fileLinkStateRouting InparticularOSPF dr. C.P.J.Koymans InformaticsInstitute UniversityofAmsterdam March4,2009 dr. C.P.J.Koymans (UvA) LinkStateRouting

OSPF Network representation and architecture

Autonomous System Border 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 March 4, 2009 35 / 70

Page 57: Link State Routing - In particular OSPF fileLinkStateRouting InparticularOSPF dr. C.P.J.Koymans InformaticsInstitute UniversityofAmsterdam March4,2009 dr. C.P.J.Koymans (UvA) LinkStateRouting

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

If even inter-area summaries are not injected the stub area is called

“totally stubby”

dr. C. P. J. Koymans (UvA) Link State Routing March 4, 2009 36 / 70

Page 58: Link State Routing - In particular OSPF fileLinkStateRouting InparticularOSPF dr. C.P.J.Koymans InformaticsInstitute UniversityofAmsterdam March4,2009 dr. C.P.J.Koymans (UvA) LinkStateRouting

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 March 4, 2009 37 / 70

Page 59: Link State Routing - In particular OSPF fileLinkStateRouting InparticularOSPF dr. C.P.J.Koymans InformaticsInstitute UniversityofAmsterdam March4,2009 dr. C.P.J.Koymans (UvA) LinkStateRouting

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 March 4, 2009 38 / 70

Page 60: Link State Routing - In particular OSPF fileLinkStateRouting InparticularOSPF dr. C.P.J.Koymans InformaticsInstitute UniversityofAmsterdam March4,2009 dr. C.P.J.Koymans (UvA) LinkStateRouting

OSPF packet details OSPF packet header

OSPF packet header

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 March 4, 2009 39 / 70

Page 61: Link State Routing - In particular OSPF fileLinkStateRouting InparticularOSPF dr. C.P.J.Koymans InformaticsInstitute UniversityofAmsterdam March4,2009 dr. C.P.J.Koymans (UvA) LinkStateRouting

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 March 4, 2009 40 / 70

Page 62: Link State Routing - In particular OSPF fileLinkStateRouting InparticularOSPF dr. C.P.J.Koymans InformaticsInstitute UniversityofAmsterdam March4,2009 dr. C.P.J.Koymans (UvA) LinkStateRouting

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 March 4, 2009 41 / 70

Page 63: Link State Routing - In particular OSPF fileLinkStateRouting InparticularOSPF dr. C.P.J.Koymans InformaticsInstitute UniversityofAmsterdam March4,2009 dr. C.P.J.Koymans (UvA) LinkStateRouting

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 March 4, 2009 42 / 70

Page 64: Link State Routing - In particular OSPF fileLinkStateRouting InparticularOSPF dr. C.P.J.Koymans InformaticsInstitute UniversityofAmsterdam March4,2009 dr. C.P.J.Koymans (UvA) LinkStateRouting

OSPF packet details The different kinds of OSPF packets

OSPF Hello packet

0 15 16 23 24 31

Network Mask

HelloInterval Options Rtr Pri

RouterDeadInterval

Designated Router

Backup Designated Router

Neighbor #1...

Neighbor #N

Repeated foreach neighbor

dr. C. P. J. Koymans (UvA) Link State Routing March 4, 2009 43 / 70

Page 65: Link State Routing - In particular OSPF fileLinkStateRouting InparticularOSPF dr. C.P.J.Koymans InformaticsInstitute UniversityofAmsterdam March4,2009 dr. C.P.J.Koymans (UvA) LinkStateRouting

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 March 4, 2009 44 / 70

Page 66: Link State Routing - In particular OSPF fileLinkStateRouting InparticularOSPF dr. C.P.J.Koymans InformaticsInstitute UniversityofAmsterdam March4,2009 dr. C.P.J.Koymans (UvA) LinkStateRouting

OSPF packet details The different kinds of OSPF packets

OSPF DD packet

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 March 4, 2009 45 / 70

Page 67: Link State Routing - In particular OSPF fileLinkStateRouting InparticularOSPF dr. C.P.J.Koymans InformaticsInstitute UniversityofAmsterdam March4,2009 dr. C.P.J.Koymans (UvA) LinkStateRouting

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 Identification of link state database piece

dr. C. P. J. Koymans (UvA) Link State Routing March 4, 2009 46 / 70

Page 68: Link State Routing - In particular OSPF fileLinkStateRouting InparticularOSPF dr. C.P.J.Koymans InformaticsInstitute UniversityofAmsterdam March4,2009 dr. C.P.J.Koymans (UvA) LinkStateRouting

OSPF packet details The different kinds of OSPF packets

OSPF LS request packet

0 31

LS type

Link State ID

Advertising Router

Multipleoccurrences

dr. C. P. J. Koymans (UvA) Link State Routing March 4, 2009 47 / 70

Page 69: Link State Routing - In particular OSPF fileLinkStateRouting InparticularOSPF dr. C.P.J.Koymans InformaticsInstitute UniversityofAmsterdam March4,2009 dr. C.P.J.Koymans (UvA) LinkStateRouting

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 March 4, 2009 48 / 70

Page 70: Link State Routing - In particular OSPF fileLinkStateRouting InparticularOSPF dr. C.P.J.Koymans InformaticsInstitute UniversityofAmsterdam March4,2009 dr. C.P.J.Koymans (UvA) LinkStateRouting

OSPF packet details The different kinds of OSPF packets

OSPF LS Update packet

0 31

# LSAs (N)

LSA #1hhhhhhhhhhhhhhhhhhhhhhhh

hhhhhhhhhhhhhhhhhhhhhhhh

LSA #N

N occurrences

dr. C. P. J. Koymans (UvA) Link State Routing March 4, 2009 49 / 70

Page 71: Link State Routing - In particular OSPF fileLinkStateRouting InparticularOSPF dr. C.P.J.Koymans InformaticsInstitute UniversityofAmsterdam March4,2009 dr. C.P.J.Koymans (UvA) LinkStateRouting

OSPF packet details The different kinds of OSPF packets

OSPF LS Update packet fields

LS Update fields

# LSAs Number of LSAs inside the update packet

LSA 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 March 4, 2009 50 / 70

Page 72: Link State Routing - In particular OSPF fileLinkStateRouting InparticularOSPF dr. C.P.J.Koymans InformaticsInstitute UniversityofAmsterdam March4,2009 dr. C.P.J.Koymans (UvA) LinkStateRouting

OSPF packet details The different kinds of OSPF packets

OSPF LS Acknowledgement packet

0 31

LSA header #1hhhhhhhhhhhhhhhhhhhhhhhh

hhhhhhhhhhhhhhhhhhhhhhhh

LSA header #N

N occurrences

dr. C. P. J. Koymans (UvA) Link State Routing March 4, 2009 51 / 70

Page 73: Link State Routing - In particular OSPF fileLinkStateRouting InparticularOSPF dr. C.P.J.Koymans InformaticsInstitute UniversityofAmsterdam March4,2009 dr. C.P.J.Koymans (UvA) LinkStateRouting

OSPF packet details The different kinds of OSPF packets

OSPF LS Acknowledgement packet fields

LS Acknowledgement fields

LSA header 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 March 4, 2009 52 / 70

Page 74: Link State Routing - In particular OSPF fileLinkStateRouting InparticularOSPF dr. C.P.J.Koymans InformaticsInstitute UniversityofAmsterdam March4,2009 dr. C.P.J.Koymans (UvA) LinkStateRouting

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 March 4, 2009 53 / 70

Page 75: Link State Routing - In particular OSPF fileLinkStateRouting InparticularOSPF dr. C.P.J.Koymans InformaticsInstitute UniversityofAmsterdam March4,2009 dr. C.P.J.Koymans (UvA) LinkStateRouting

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)

LSA type specific content

dr. C. P. J. Koymans (UvA) Link State Routing March 4, 2009 54 / 70

Page 76: Link State Routing - In particular OSPF fileLinkStateRouting InparticularOSPF dr. C.P.J.Koymans InformaticsInstitute UniversityofAmsterdam March4,2009 dr. C.P.J.Koymans (UvA) LinkStateRouting

OSPF packet details Link State Advertisement packets

LSA header

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 March 4, 2009 55 / 70

Page 77: Link State Routing - In particular OSPF fileLinkStateRouting InparticularOSPF dr. C.P.J.Koymans InformaticsInstitute UniversityofAmsterdam March4,2009 dr. C.P.J.Koymans (UvA) LinkStateRouting

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 March 4, 2009 56 / 70

Page 78: Link State Routing - In particular OSPF fileLinkStateRouting InparticularOSPF dr. C.P.J.Koymans InformaticsInstitute UniversityofAmsterdam March4,2009 dr. C.P.J.Koymans (UvA) LinkStateRouting

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 March 4, 2009 57 / 70

Page 79: Link State Routing - In particular OSPF fileLinkStateRouting InparticularOSPF dr. C.P.J.Koymans InformaticsInstitute UniversityofAmsterdam March4,2009 dr. C.P.J.Koymans (UvA) LinkStateRouting

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

dr. C. P. J. Koymans (UvA) Link State Routing March 4, 2009 58 / 70

Page 80: Link State Routing - In particular OSPF fileLinkStateRouting InparticularOSPF dr. C.P.J.Koymans InformaticsInstitute UniversityofAmsterdam March4,2009 dr. C.P.J.Koymans (UvA) LinkStateRouting

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 March 4, 2009 59 / 70

Page 81: Link State Routing - In particular OSPF fileLinkStateRouting InparticularOSPF dr. C.P.J.Koymans InformaticsInstitute UniversityofAmsterdam March4,2009 dr. C.P.J.Koymans (UvA) LinkStateRouting

OSPF packet details Link State Advertisement packets

Router LSA without header (LS type = 1)

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 March 4, 2009 60 / 70

Page 82: Link State Routing - In particular OSPF fileLinkStateRouting InparticularOSPF dr. C.P.J.Koymans InformaticsInstitute UniversityofAmsterdam March4,2009 dr. C.P.J.Koymans (UvA) LinkStateRouting

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 March 4, 2009 61 / 70

Page 83: Link State Routing - In particular OSPF fileLinkStateRouting InparticularOSPF dr. C.P.J.Koymans InformaticsInstitute UniversityofAmsterdam March4,2009 dr. C.P.J.Koymans (UvA) LinkStateRouting

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 March 4, 2009 62 / 70

Page 84: Link State Routing - In particular OSPF fileLinkStateRouting InparticularOSPF dr. C.P.J.Koymans InformaticsInstitute UniversityofAmsterdam March4,2009 dr. C.P.J.Koymans (UvA) LinkStateRouting

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 March 4, 2009 63 / 70

Page 85: Link State Routing - In particular OSPF fileLinkStateRouting InparticularOSPF dr. C.P.J.Koymans InformaticsInstitute UniversityofAmsterdam March4,2009 dr. C.P.J.Koymans (UvA) LinkStateRouting

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 March 4, 2009 64 / 70

Page 86: Link State Routing - In particular OSPF fileLinkStateRouting InparticularOSPF dr. C.P.J.Koymans InformaticsInstitute UniversityofAmsterdam March4,2009 dr. C.P.J.Koymans (UvA) LinkStateRouting

OSPF packet details Link State Advertisement packets

Network LSA without header (LS type = 2)

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 March 4, 2009 65 / 70

Page 87: Link State Routing - In particular OSPF fileLinkStateRouting InparticularOSPF dr. C.P.J.Koymans InformaticsInstitute UniversityofAmsterdam March4,2009 dr. C.P.J.Koymans (UvA) LinkStateRouting

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 March 4, 2009 66 / 70

Page 88: Link State Routing - In particular OSPF fileLinkStateRouting InparticularOSPF dr. C.P.J.Koymans InformaticsInstitute UniversityofAmsterdam March4,2009 dr. C.P.J.Koymans (UvA) LinkStateRouting

OSPF packet details Link State Advertisement packets

Summary LSA without header (type = 3, 4)

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 March 4, 2009 67 / 70

Page 89: Link State Routing - In particular OSPF fileLinkStateRouting InparticularOSPF dr. C.P.J.Koymans InformaticsInstitute UniversityofAmsterdam March4,2009 dr. C.P.J.Koymans (UvA) LinkStateRouting

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 March 4, 2009 68 / 70

Page 90: Link State Routing - In particular OSPF fileLinkStateRouting InparticularOSPF dr. C.P.J.Koymans InformaticsInstitute UniversityofAmsterdam March4,2009 dr. C.P.J.Koymans (UvA) LinkStateRouting

OSPF packet details Link State Advertisement packets

AS External LSA without header (LS type 5)

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 Border RouterFlooded throughout the whole AS

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

Page 91: Link State Routing - In particular OSPF fileLinkStateRouting InparticularOSPF dr. C.P.J.Koymans InformaticsInstitute UniversityofAmsterdam March4,2009 dr. C.P.J.Koymans (UvA) LinkStateRouting

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 March 4, 2009 70 / 70