Title: Routing Algorithm Objectives
1Routing Algorithm Objectives
1
3
6
A
4
B
Host
2
Switch or router
5
- Rapid and Accurate packet Delivery
- Adaptability to varying traffic loads
- Congestion avoidance
- Adaptability to link failure or reconfiguration
- Low overhead
Figure 7.23
2Routing Alternatives
- Static Versus Dynamic
- Static routes are manually configured. (not
practical in large or changing networks) - Dynamic routes are automatically determined
(complex and potentially unstable) - Centrally controlled or distributed
- Centrally controlled routes for whole network
are determined in one place and distributed (easy
to optimize globally) - Distributed each router determines routes using
information exchanged with neighbors (more
scaleable, but potentially unstable) - Virtual Circuit and Datagram?
- Datagram each packet is routed using routing
information - Virtual Circuit Route is determined once for
connection using same routing information.
3Virtual Circuit Example
Virtual Circuit
2
7
1
8
B
1
3
3
A
1
6
5
5
4
2
VCI
4
3
5
2
5
C
6
D
2
- Each packet carries a VCI identifying its virtual
circuit - Each router maps VCI to new link and VCI on that
link
Figure 7.24
4Virtual Circuit Routing Tables
Node 3
Incoming Outgoing
Node 6
Node 1
node VC node VC
1 2 6 7
Incoming Outgoing
Incoming Outgoing
1 3 4 4
node VC node VC
node VC node VC
4 2 6 1
3 7 B 8
A 1 3 2
6 7 1 2
3 1 B 5
A 5 3 3
6 1 4 2
B 5 3 1
3 2 A 1
4 4 1 3
B 8 3 7
3 3 A 5
Node 4
Incoming Outgoing
node VC node VC
2 3 3 2
Node 2
Node 5
3 4 5 5
Incoming Outgoing
Incoming Outgoing
3 2 2 3
node VC node VC
node VC node VC
5 5 3 4
C 6 4 3
4 5 D 2
4 3 C 6
D 2 4 5
Figure 7.25
5Datagram Routing for same routes
Node 3
Node 6
Destination Next node
Node 1
Destination Next node
1 1
Destination Next node
2 4
1 3
2 2
4 4
2 5
3 3
5 6
3 3
4 4
6 6
4 3
5 2
5 5
6 3
Node 4
Destination Next node
1 1
2 2
Node 2
Node 5
3 3
Destination Next node
Destination Next node
5 5
1 1
1 4
6 3
3 1
2 2
4 4
3 4
5 5
4 4
6 5
6 6
- Each Packet carries full destination address
- Routing table must identify every destination
(large)
Figure 7.26
6Hierarchical Routing
Destinations reached from this link
Hierarchical Network (destinations grouped by
address)
4 entries
Tables specifiy only unique prefix of destination
Non-hierarchical Network
16 entries
Tables specifiy all destinations
7Link State vs Vector Routing
- Distance vector routing
- Routers maintain tables with cost and next link
to reach each destination - Routers exchange these distance vectors to update
best route - Link state routing
- Routers maintain information about their links
- Routers broadcast link information to all others
to allow optimal routes to be constructed
8Routing based on shortest path
- Each link has an associated cost
- Packet delay (length and/or queuing)
- Link congestion (average buffer length)
- Inverse of link speed
- Objective is to pick the route with the lowest
total cost - Difficult to compute the true optimum
- Costs change rapidly (congestion, broken links)
- Routing algorithms compute an approximation.
Figure 7.28
9Bellman Ford Algorithm
- A shortest path from x to y consists of the sum
of the cost of a link from x to some node (a)
plus a shortest path from a to y. - The shortest path from X to Y can be found by
examining all links from X and minimizing the
sum of the cost of that link and the shortest
path from the node it reaches to Y. - The shortest path can be found by iteration.
10The algorithm
- For all nodes i set Di 0 for d and ? otherwise
- For all nodes i,j set Cij to
- The cost of the direct link between i and j
- ? otherwise
- For each i not the destination do
- Di min(CijDj) for all j (not equal to i)
- Repeat step 3 until no more changes.
11Example cost to node 6
12Least Cost routing tree
2
1
1
3
6
2
4
1
2
2
5
- Nodes exchange distance vectors
- Routing computation is distributed among nodes
- Convergence is generally rapid
Figure 7.29
13Recovery from a broken link
2
1
3
X
6
5
2
3
4
2
1
3
2
5
4
- Nodes periodically recheck routes and discover
outage - During recomputation loops are possible
- All packets eventually route correctly
Figure 7.30
14Recovery can be difficult
(a)
3
1
2
4
1
1
1
(b)
3
1
2
4
X
1
1
- When link between 3 and 4 breaks, nodes 1,2,3
will only slowly increase cost of routes (route
towards the node with the oldest estimate of
cost) - Problem known as counting to Infinity
- Modifications to algorithm to address it.
Figure 7.31
15Split Horizon/Poisoned reverse
3
1
2
4
X
1
1
- Each node sets its cost to the destination as
infinite in the data sent to the node on its
shortest path. - Prevents some forms of slow convergence
16Dijkstras Algorithm
- Works outwards from the source in identifying the
next closest node - Set N s, Ds0, DjCsj
- Find i not in N with minimum Di
- Add i to N (stop if no more nodes)
- Update Djmin(Dj,DiCij)
- Go to step 2.
17Example cost from node 1
18Spanning Tree computed
2
1
1
3
6
2
3
4
2
2
5
Figure 7.32
19Packet Flooding
(a)
- Packets sent on all links
Figure 7.33 - Part 1 of 3
20Fooding stage 2
(b)
- Nodes rebroadcast received packets
Figure 7.33 - Part 2 of 3
21Flooding stage 3
(c)
- Network becomes congested unless old packets
removed - Remove by time to live
- Remove packets that have already been seen
Figure 7.33 - Part 3 of 3
22Deflection Routing
0,0
0,1
1,0
1,1
- Geometry of the network determines normal route
(Self routing) - Packets encountering a busy route take another
- Does not require buffering
- Many network geometries possible.
23Source Routing
3,6,B
6,B
1
3
B
6
A
4
B
Source host
2
Destination host
5
- Source node specifies a complete route
- Reduces work by routers
- Focuses routing effort on the hosts
- Routes can be saved by adding node numbers to
packets as they flow through the network
Figure 7.36
24ATM Networking
- Motivation
- Packet switching is flexible but has high
variable delay (not good for real-time streams) - TDM Switching is predictable but wont handle
bursty traffic and arbitrary rates. - Compromise Solution ATM
- Small fixed size packets or cells (53 bytes) (low
delay) - Virtual circuit routing (small headers)
(efficient, predictable) - Packets fill fixed sized periodic frames.
- Synchronous traffic regular rate of cell
arrival - Asynchronous traffic bursty rate of cell arrival
25ATM and TDM Networking
Voice
Data packets
MUX
Wasted bandwidth
Images
TDM
4 3 2 1 4 3 2 1
4 3 2 1
ATM
4 3 1 3 2 2 1
- TDM each source has fixed slot/bandwidth
- ATM each source produces self describing cells
only when it has something to send
Figure 7.37
26ATM Switching
1
1
voice
67
Switch
video
2
67
N
25
75
video
32
voice
5
25
1
32
67
data
3
39
32
39
3
video
32
61
data
6
61
2
67
N
video
75
N
- Like Virtual Circuit switching each incoming
cell gets new Virtual Channel ID and outgoing link
Figure 7.38
27Virtual Paths in ATM
a
VP3
VP5
a
b
ATM Sw 1
ATM Sw 2
ATM DCC
b
c
ATM Sw 3
c
d
e
VP2
VP1
d
ATM Sw 4
e
Sw switch
- Two levels of adressing Virtual PATH, and
Virtual Channel within a path - Allows paths to be managed as a shared resource
and virtual channels managed locally
Figure 7.39
28View of an ATM Link
Virtual Paths
Physical Link
Virtual Channels
Figure 7.40
29For Next Week
- Exam covering Chapters 5,6, and 7.1-7.6
- 1 hour, like the last, 2 pages of notes
- I will not expect you to remember all the delay
and loss formulas - Following the exam we will cover the remainder of
Chapter 7. - No homework this week but next week there will be
homework for chapter 7.