Você está na página 1de 14

Link State Routing

In particular OSPF (Open Shortest Path First)

Link State Protocol


Complete information about network topology Uses Dijkstras Shortest Path Tree algorithm Replaces RIP for more complex topologies Faster convergence time

Link State Packets


LSPs represent the state of a router and its links to the rest of the network Works directly for point to point links Broadcast networks (LANs) and NBMA networks are represented by virtual nodes inside the topology Designated routers speak on their behalf

3 Monday, March 12, 2007

Non-broadcast networks
NBMA Non-broadcast Multiple Access Full mesh of connectivity (with DR) Point-to-Multipoint Collection of point-to-point links No full mesh of connectivity (without DR)

Learn to know your neighbours


Easy on point to point links Just send out greetings (hello packets) to the other side A little more advanced on broadcast networks Send out HELLOs using multicast Not all neighbours will become adjacent

LSP generation
Periodic announcements (long period) Triggered updates when there are changes New neighbour Change of link cost Link failure

6 Monday, March 12, 2007

LSP distribution
LSPs are distributed throughout the network Cannot use the routing database (chicken/egg problem) Ordinary ooding is problematic Needs TTL to prevent loops Generates exponential behavior Smart ooding recognizes identical LSPs

Most recent LSP problem


LSPs may arrive out of order Needs a mechanism to recognize older packets Timestamps? Can lock up if clocks are not synchronised or out of order! Sequence numbers with an aging procedure

Pitfalls
Sequence numbers may wrap Sequence number comparison is not a total linear order Cyclic behaviour is possible

c a<b<c<a a b
9

Monday, March 12, 2007

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:333333

B:222255

C:114444
10

ARPANET lockup
ba ac cb S xcba P ab ca bc Q c b a c b a R
11

Lockup solution
Large sequence number space Wait for timeouts after overow Age eld Always increase at least by one Increase periodically

12 Monday, March 12, 2007

OSPF advantages (1)


Introduces hierarchical routing Supports load balancing Supports subnets Supports unnumbered interfaces/networks

13

OSPF advantages (2)


Built in authentication Uses multicast for ooding Metrics built on cost, per interface, per TOS This is optional and not used much Chicken/egg problem again Easily extendable for multicast routing (MOSPF)

14

OSPF fun :)
IETF T-shirt IS - IS = 0 Old time IETF versus ISO controversy But OSPF really builds on BBNs research on SPF Early versions of OSIs IS-IS

15 Monday, March 12, 2007

Some OSPF facts


OSPF builds directly upon IP Uses protocol type 89 Current 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

16

Timers and Overow


These must be the same for all OSPF routers HelloInterval (default 10 sec) RouterDeadInterval (default 40 sec) In case of database overow external routing information is dropped rst

17

Consistent LSP databases


LSPs must be acknowledged LSPs are queued/agged for transmission LSPs must time out at about the same time triggered distribution of age MaxAge packets which must be honored

18 Monday, March 12, 2007

(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 congured

19

Multicast usage
On LANs every router becomes adjacent to the Designated Router
Link State Update Link State Ack

R Multicast to AllDRouters (224.0.0.6)

DR (BDR)

Multicast to AllSPFRouters (224.0.0.5)

20

Hierarchical routing
Backbone Area 0 Limbs (non-backbone subsystems) Areas 0

Backbone (area 0) ABRs 1 2 3 4


21 Monday, March 12, 2007

Virtual links
Area 5 Not physically linked to the backbone Virtual link created to a real ABR Behaves as an unnumbered point to point link inside the backbone area

Backbone (area 0) 5 1 2 3 4
22

Inter area summaries


Injected by ABRs Hub and spoke topology Summary information is spread RIP-like No loops or slow convergence Virtual links maintain hub and spoke point to point tunneled through an area

23

Router roles
Backbone router Has an interface to the backbone Internal router All interfaces inside a single area Area Border Router (ABR) Has an interface in two or more areas Autonomous System Border Router (ASBR) Participates in other (external) routing protocol

24 Monday, March 12, 2007

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

25

Stub area
Area into which no external routing information is injected by the ABRs 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 totally stubby

26

OSPF packet header


version packet type router ID area ID checksum authentication type packet length

authentication data

27 Monday, March 12, 2007

OSPF packet types


Hello Database Description Link State Request Link State Update Link State Acknowledgement

28

OSPF hello packet


network mask hello interval options priority router dead interval designated router backup designated router neighbor #1 neighbor #N

29

OSPF DD packet
MTU options ags DD sequence number LSA header #1 LSA header #N

30 Monday, March 12, 2007

OSPF LS request packet


LS type #1 link state ID #1 advertising router #1 LS type #N link state ID #N advertising router #N

31

OSPF LS update packet


Number of LSAs LSA #1 LSA #N

32

OSPF LS Ack packet


LSA header #1

LSA header #N

33 Monday, March 12, 2007

Link State Advertisements


Multiple LSAs may be found inside a Link State Update packet Every LSA consists of LSA Header (20 bytes) LSA type specic content

34

LS(A) header
LS age options link state ID advertising router LS sequence number LS checksum length LS type

35

LSA types
Router LSA (type 1) Network LSA (type 2) Network Summary LSA (type 3) AS Boundary Router Summary LSA (type 4) AS External LSA (type 5)

36 Monday, March 12, 2007

NSSA
Not So Stubby Area Support for certain external routes throughout the area itself Uses its own special type (7) Translated at the ABR into ordinary external route for the rest of the OSPF AS

37

Router LSA (LS type = 1)


reserved E B reserved link ID link data link type TOS #1 TOS #N # of TOS reserved reserved metric #N repeat for every link TOS 0 metric metric #1 number of links

Originated by every router Flooded throughout the area(s)

38

Network LSA (LS type = 2)


network mask attached router #1 attached router #N

Originated by Designated Router Flooded throughout the area


39

Monday, March 12, 2007

Summary LSA (type = 3, 4)


network mask for type 3 (0 for type 4) TOS #1 TOS #N metric #N metric #1

Originated by Area Border Router Flooded throughout the area(s)


40

External LSA (LS type 5)


E TOS #1 network mask metric #1 forwarding address #1 external route tag #1 E TOS #N metric #N forwarding address #N external route tag #N

Originated by AS Border Router Flooded throughout the whole AS

41

Monday, March 12, 2007

Você também pode gostar