IP Routing: OSPF - PowerPoint PPT Presentation

1 / 28
About This Presentation
Title:

IP Routing: OSPF

Description:

IP Routing: OSPF Network Protocols and Standards Autumn 2003-2004 – PowerPoint PPT presentation

Number of Views:73
Avg rating:3.0/5.0
Slides: 29
Provided by: ZartashA4
Category:
Tags: ospf | areas | multiple | ospf | routing

less

Transcript and Presenter's Notes

Title: IP Routing: OSPF


1
IP Routing OSPF
  • Network Protocols and Standards
  • Autumn 2003-2004

2
OSPF
  • Link State Routing
  • Dijkstra Algorithm
  • Distributed Map concept
  • Flooding protocol for information dissemination
  • Advantages over distance vector
  • Fast, loopless convergence
  • Precise metrics and multiple metrics per link
  • Support for multiple paths to destination

3
OSPF Features
  • Type of Service (TOS) routing
  • Load balancing
  • Multiple routes to a destination
  • Network partitioning
  • Areas made independent of each other
  • Authentication of exchanges between routers
  • Reduction of routing traffic on broadcast
    networks by means of a designated router
  • Support for exchange of information learned from
    other (external) sites

4
Basic Idea
  • Each router has a complete map of the network
  • The map is built by flooding
  • Each router advertises the state of all its
    interfaces (their costs and where they connect
    to)
  • These link state advertisements are flooded
    throughout the network upon reception, the other
    routers repeat them on all their interfaces
  • Advertisements have sequence numbers
  • Given the map, each router uses Dijkstras
    algorithm to compute the shortest path tree from
    itself to all other routers

5
Link State Database
From To Link Distance
A B 1 1
A D 3 1
B A 1 1
B C 2 1
B E 4 1
C B 2 1
C E 5 1
D A 3 1
D E 6 1
E B 4 1
E C 5 1
E D 6 1
Every router has a copy of the distributed map in
memory
6
Link State Database
Database is updated after each change of link
state using Flooding Protocol
From To Link Distance Number
A B 1 Inf 2
A D 3 1 1
B A 1 Inf 2
B C 2 1 1
B E 4 1 1
C B 2 1 1
C E 5 1 1
D A 3 1 1
D E 6 1 1
E B 4 1 1
E C 5 1 1
E D 6 1 1
Router A will advertise Message ltFrom A, To B,
Link 1, distance Infgt
Old messages may pollute the database if we do
not number the messages!
7
Flooding Algorithm
  • Receive a message on an interface and look for
    that same message in the DB. Do one of the
    following
  • Add to the local DB and broadcast incoming
    message on all the interfaces except for the
    incoming if
  • Received record was not in the DB, or
  • Record number in the DB is lower (i.e., a newer
    message is received and others should know it)
  • Transmit only on the incoming interface if
  • Record number in the DB is higher (i.e., the
    neighboring bridge through incoming interface
    must be told that the information sent is too
    old!)
  • Do not transmit anywhere if
  • Record number in DB is the same as the one
    received

8
Map Inconsistencies!
From To Link Dist Num
A B 1 Inf 2
A D 3 1 1
B A 1 Inf 2
B C 2 1 1
B E 4 1 1
C B 2 1 1
C E 5 1 1
D A 3 1 1
D E 6 1 1
E B 4 1 1
E C 5 1 1
E D 6 Inf 2
From To Link Dist Num
A B 1 Inf 2
A D 3 1 1
B A 1 Inf 2
B C 2 1 1
B E 4 1 1
C B 2 1 1
C E 5 1 1
D A 3 1 1
D E 6 Inf 2
E B 4 1 1
E C 5 1 1
E D 6 1 1
What if link 6 also fails after link 1 failed?
DB in Nodes A and D
DB in Nodes B, C, and E
9
Map Inconsistencies!
From To Link Dist Num
A B 1 Inf 2
A D 3 1 1
B A 1 Inf 2
B C 2 Inf 2
B E 4 1 1
C B 2 Inf 2
C E 5 1 1
D A 3 1 1
D E 6 1 1
E B 4 1 1
E C 5 1 1
E D 6 Inf 2
From To Link Dist Num
A B 1 Inf 2
A D 3 1 1
B A 1 Inf 2
B C 2 1 1
B E 4 1 1
C B 2 1 1
C E 5 1 1
D A 3 1 1
D E 6 Inf 2
E B 4 1 1
E C 5 1 1
E D 6 1 1
What if link 2 also fails now? A and D will not
know
DB in Nodes A and D
DB in Nodes B, C, and E
10
Map Inconsistencies!
From To Link Dist Num
A B 1 1 3
A D 3 1 1
B A 1 1 3
B C 2 Inf 2
B E 4 1 1
C B 2 Inf 2
C E 5 1 1
D A 3 1 1
D E 6 1 1
E B 4 1 1
E C 5 1 1
E D 6 Inf 2
From To Link Dist Num
A B 1 1 3
A D 3 1 1
B A 1 1 3
B C 2 1 1
B E 4 1 1
C B 2 1 1
C E 5 1 1
D A 3 1 1
D E 6 Inf 2
E B 4 1 1
E C 5 1 1
E D 6 1 1
What if link 1 is restored? Inconsistency
results!!!
DB in Nodes A and D
DB in Nodes B, C, and E
11
Bringing up Adjacencies
  • Neighboring routers need to align or synchronize
    their databases on a continuous basis
  • Record numbers help!
  • Exchanging complete copies of databases is
    inefficient
  • OSPF defines database description packets
    containing link identifiers and version numbers
    only

12
Bringing up Adjacencies
  • Neighboring routers synchronize their databases
    in two phases
  • Phase 1
  • Routers send complete description of their
    databases
  • Compile a list of records they are interested in
    after receiving the database descriptions
  • Phase 2
  • Each router polls its neighbor for a full copy of
    these interesting records by means of link state
    request packets

13
Securing the Map Updates
  • Coherency of routing is fully dependent upon
    maintaining synchronized copies of databases in
    all nodes
  • Each router is only required to be synchronized
    with its neighbors
  • Measures introduced by OSPF
  • Flooding includes hop-by-hop acknowledgements
  • Database description packets are transmitted in a
    secure fashion
  • Each link state record is protected by a timer
    and is removed from the database if not refreshed
    in due time
  • All records are protected by checksum
  • The messages can be authenticated or encrypted

14
OSPF Algorithm Notation
  • E set of nodes already evaluated
  • R remaining nodes
  • O an ordered list of paths used to find the next
    shortest route
  • P the shortest path in O
  • V the last node in P

15
OSPF Algorithm Dijkstras
  • 1. Initialization
  • Initialize E to contain only the source node S
  • Initialize R to contain all the other nodes
  • Initialize the list of paths O to contain all the
    one hop paths starting from S. Each of these
    paths has a cost equal to the corresponding
    links metric. Sort list O by increasing metrics
  • 2. If list O is empty, or if the first path in O
    has an infinite metric, mark all nodes in R as
    unreachable. The computation is finished

16
OSPF Algorithm Dijkstras
  • 3. Set Pthe shortest path in list O. Remove the
    shortest path from O. Let V be the last node in
    P. If V is already in E, go back to step 2.
    Otherwise, P is the shortest path to V. Move V
    from R to E
  • 4. Last step
  • Build a set of new candidate paths by
    concatenating P and each of the links starting
    from V
  • The cost to these paths is the sum of the cost of
    P and the metric of the link appended to P
  • Insert the new links in the ordered list O, each
    at the rank corresponding to its cost
  • Go to step 2

17
Example
Each node will find a shortest path from itself
to all other nodes Consider node S to see how
Dijkstras algorithm works!
18
Example Link State DB
SA 1 BD 6
SB 5 CA 3
AS 1 CB 1
AB 1 CE 1
AC 3 DB 6
BS 5 DE 2
BA 1 EC 1
BC 1 ED 2
Like every node, S has a complete map of the
network
19
Example
3
C
A
1
1
1
1
S
E
2
5
B
D
6
Underlined paths are shortest at each
iteration () links removed at step 3
20
Another Example
Need paths from A
21
Advantages of OSPF
  • Why is a link state protocol better?
  • Fast, loopless convergence
  • Support for precise metrics and, if needed,
    multiple metrics
  • Support for multiple paths to destination

22
Fast, loopless convergence
  • Fast
  • Distance vector uses Bellman-Ford algorithm and
    converges in O(NM) where N is the number of nodes
    and M is the number of links
  • OSPF uses Dijkstras algorithm where local
    computation involves O(MlogM) computations
  • Transmission of new information is quick by using
    flooding
  • Loopless
  • Immediately after flooding and the computation,
    all routes in the network are same no loops and
    no counting to infinity
  • The loopless features avoids the disruptive
    consequences of routing loops

23
Support for Multiple Metrics
  • Full topology is known for computation
    arbitrarily precise metrics can be used without
    slowing down the convergence
  • Convergence speed is not a function of metrics
  • The precision of computation makes it possible to
    use multiple metrics in parallel
  • Must make consistent decision in all nodes. Why?
  • Possible metrics
  • Throughput
  • Delay
  • Cost
  • Reliability

24
Support for Multiple Metrics
T1 link 1.544Mbps
How to route from D to B? Bandwidth-based DCAB
(1.544Mbps vs. 64kbps) Delay-based DEB (20ms
vs. 295ms)
25
Support for Multiple Paths
  • In complex networks, there are usually several
    almost equivalent routes towards a destination
  • Analysis have proved that splitting traffic over
    multiple paths is more efficient
  • Average delay will be lower
  • Delay variations will also be lower
  • Spreading the traffic also alleviates the effect
    of the disconnection in one single path. Without
    spreading the traffic, if the single path being
    used becomes unavailable, all traffic will be
    routed to the alternate path, causing possible
    congestion

26
Support for Multiple Paths
  • Issues
  • Splitting (or spreading) traffic will lead to
    out-of-order delivery of certain packets
  • Effect on TCP flow control (different delay)
  • A solution is to route packets belonging to the
    same connection over one path and distribute the
    connections rather than the packets over multiple
    available paths

27
Modified Algorithm
  1. Initialize E, R, and O as in the standard SPF
  2. If O is empty, the algorithm is finished
  3. Examine P, the shortest path in O. Remove P from
    O and Let V be the last node in P. If V is
    already in E, continue at step 4. Otherwise, P is
    the shortest path to V. Move V from R to E and
    continue at step 5
  4. If the distance to V is larger than the shortest
    path, ignore P. Otherwise (distance to V is equal
    to the shortest path), P is an equal cost path.
    Move V from R to E. In all cases continue at step
    2
  5. Build the new set of candidate paths, add them to
    O as in standard algorithm and continue at step 2

28
Issues
  • Design of OSPF
  • Separating hosts and routers
  • Broadcast networks (Ethernet, FDDI, )
  • Non-broadcast networks (ATM, X.25, )
  • Splitting very large networks into areas
Write a Comment
User Comments (0)
About PowerShow.com