Escolar Documentos
Profissional Documentos
Cultura Documentos
Raj Jain
Professor of CIS
The Ohio State University
Columbus, OH 43210
Jain@cis.ohio-state.edu
This presentation is available on-line at:
http://www.cis.ohio-state.edu/~jain/cis677-98/
Raj Jain
5-1
Overview
Routing algorithms
ARPAnet routing
Raj Jain
5-2
Routing
Fig 9.5
5-3
Raj Jain
Rooting or Routing
5-4
Routeing or Routing
Routeing: British
Routing: American
Since Oxford English Dictionary is much heavier than
any other dictionary of American English, British
English generally prevalis in the documents produced
by ISO and CCITT; wherefore, most of the
international standards for routing standards use the
routeing spelling.
5-5
Rooting or Routing
5-6
Routeing or Routing
Routeing: British
Routing: American
Since Oxford English Dictionary is much heavier than
any other dictionary of American English, British
English generally prevalis in the documents produced
by ISO and CCITT; wherefore, most of the
international standards for routing standards use the
routeing spelling.
5-7
5-8
Raj Jain
5-9
Dijkstras Algorithm
Goal: Find the least cost paths from a given node to all
other nodes in the network
Notation:
dij = Link cost from i to j if i and j are connected
Dn = Total path cost from s to n
M = Set of nodes so far for which the least cost path is
known
Method:
Initialize: M={s}, Dn = dsn
Find node w M, whose Dn is minimum
Update Dn
Raj Jain
5-10
Example
Raj Jain
5-11
Example (Cont)
1
2
3
4
5
6
M
D2
{1}
2
{1,4}
2
{1,2,4}
2
{1,2,4,5}
2
{1,2,3,4,5} 2
{1,2,3,4,5,6}2
Path
1-2
1-2
1-2
1-2
1-2
1-2
D3
5
4
4
3
3
3
Path
1-3
1-4-3
1-4-3
1-4-5-3
1-4-5-3
1-4-5-3
D4
1
1
1
1
1
1
Path
1-4
1-4
1-4
1-4
1-4
1-4
Table 9.4a
5-12
D5 Path
2
1-4-5
2
1-4-5
2
1-4-5
2
1-4-5
2
1-4-5
D6 Path
4
1-4-5-6
4
1-4-5-6
4
1-4-5-6
Raj Jain
2
4
1
D2
3
1
Path
1
1
4
D3
Path
D4
4
5
Path
D5
Path
D6
Path
1
2
3
4
5
6
Raj Jain
5-13
3
1
1
4
1
1
4
5
D2
Path
D3
Path
D4
Path
D5
Path
D6
Path
{1}
1-2
1-4
{1,2}
1-2
1-2-3
1-4
{1,2,3}
1-2
1-2-3
1-4
1-2-5
1-2-3-6
{1,2,3,5}
1-2
1-2-3
1-2-5-1
1-2-5
1-2-3-6
{1,2,3,4,5}
1-2
1-2-3
1-2-5-1
1-2-5
1-2-3-6
{1,2,3,4,5,6}
1-2
1-2-3
1-2-5-1
1-2-5
1-2-3-6
Raj Jain
5-14
Bellman-Ford Algorithm
Notation:
h = Number of hops being considered
D(h)n = Cost of h-hop path from s to n
Method: Find all nodes 1 hop away
Find all nodes 2 hops away
Find all nodes 3 hops away
Initialize: D(h)n = for all n s; D(h)n = 0 for all h
Find jth node for which h+1 hops cost is minimum
D(h+1)n = minj [D(h)j +Djn]
Raj Jain
5-15
Example
Fig 9.23b
5-16
Raj Jain
Example (Cont)
h
D(h2) Path
D(h3) Path
D(h4) Path
D(h5) Path
D (h6) Path
1 2
1-2 5
1-3
1 1-4
2 2
1-2 4
1-4-3
1 1-4
2 1-4-5 10 1-3-6
3 2
1-2 3
1-5-4-3 1 1-4
2 1-4-5 4
1-4-5-6
4 2
1-2 3
1-5-4-3 1 1-4
2 1-4-5 4
1-4-5-6
Table 9.4b
5-17
Raj Jain
Flooding
Fig 8.11b
5-18
Raj Jain
Flooding
2
6
1
4
5
(a) First hop
6
1
4
5
(b) Second hop
6
1
4
Fig 9.7
5
(c) Third hop
5-19
Raj Jain
Raj Jain
5-20
DestiNext
nation Delay node
D1
S1
D2
D3
D4
1 1,2
1 1,3
1 1,4
(a) Node 1s
routing table
before update
The Ohio State University
Fig 9.9
5-21
Raj Jain
Fig 9.10
Raj Jain
5-22
Fig 9.11
Raj Jain
5-23
Routing Algorithm
Fig 9.12
Raj Jain
5-24
Summary
Raj Jain
5-25
Homework
Raj Jain
5-26