Routing Algorithms
1
What is a routing algorithm?
Routing is used to describe the decision procedure by which a node selects one (or more) of its neighbors to forward a packet on its way to an ultimate destination. To design a routing algorithm is to generate a decision-making procedure to perform this function and guarantee delivery of each packet.
2
Routing tables
Routing tables contain information about the topology of the network stored in each node as a working basis for the (local) decision procedure.
3
Routing problem
Table computation The routing tables must be computed when the network is initialized and must be brought up to date if the topology of the network changes. Packet forwarding When a packet is to be sent through the network it must be forwarded using the routing tables.
4
Evaluation in the viewpoint of algorithms
Correctness Efficiency Complexity Robustness (topology change; channel removal; node removal, etc) Adaptiveness (load balancing) Fairness
5
Evaluation in the viewpoint of graphs
Minimum hop Shortest path Minimum propagation delay
6
Open Shortest Path First
Released by RFC 1131, 1247, 1583, 2178, 2328, firstly during late 1980s Link-state interior gateway routing protocol Based on Dijkstra Algorithm Topological changes and converge on a new consensus of the topology
7
OSPF Areas
A collection of networked end systems, routers, and transmission facilities With a unique area number configured into each router To minimize the amount of traffic between different areas
8
Example
Router Area 0 Router
Router
Router
Area 1
Router
Area 2
Router
Router
Router
9
Cont’d
Router types -- internal routers -- Area border routers -- Backbone routers Routing types -- intra-area routing -- inter-area routing
10
Internal Area Routers
Internal area routers must exchange LSAs (link-state advertisements) with other routers in its area by flooding. Convergence can occur quite rapidly.
11
Area Border Routers
Responsible for maintaining topology information in their databases for each of the areas to which they contain interfaces Route summarization
12
Backbone Routers
Responsible for maintaining topology information for the backbone Propagating summarized topology information for each of the other areas
13
Shortest-path Tree
Network’s topology is arranged in the shape of a tree An OSPF router forms the tree’s root The tree gives the complete path to all known destination addresses, either network or host
14
Example
193.1.1.0 Cost=1
FDDI
193.1.2.0
Router 1
Cost=64 Cost=64
Router 2
Cost=64 Cost=1768
Area 0
Router 3 Area 1
Ethernet
Router 4
Ethernet
Router 5
Ethernet Ethernet
Router 6
Cost=10
Ethernet
Area 2
193.1.3.0
193.1.4.0
193.1.5.0
193.1.6.0
15
Cont’d
Root: Router 3
Cost=64 193.1.1.0
Cost=1
193.1.2.0 Cost=64 193.1.5.0 Cost=1768 Cost=10
Cost=64
193.1.4.0
193.1.6.0
16
Cont’d
Destination Hops Away Cumulative Cost 193.1.3.0 0 193.1.1.0 1 64 193.1.2.0 2 65(64+1) 193.1.4.0 2 128(64+64) 193.1.5.0 3 129(64+1+64) 193.1.6.0 3 1833(64+1+1768) 193.1.6.0 4 139(64+1+64+10)
17
All-pairs Shortest-path Problem
The problem of computing a shortest path between any two nodes of a graph is known as the all-pairs shortest-path problem. Centralized Floyd-Warshall algorithm Toueg algorithm for computing simultaneously the routing tables for all nodes in a network.
18
The Floyd-Warshall Algorithm
19
Assumptions
A weighted graph G=(V,E) The graph contains no cycles of total negative weight The weight of a path is 1 defined as ik0 uiui1 The distance from u to v is the lowest weight of any path from u to v ( if no such path exists).
20
Definitions
Let S be a subnet of V. A path is an S-path if for all i, 0