0% found this document useful (0 votes)
37 views18 pages

Routing in Switched Networks: Chapter 19 in Stallings 10 Edition

This document discusses routing in packet switching networks. It covers key topics like routing techniques, performance criteria for routing, and different routing strategies including fixed routing, flooding routing, and adaptive routing. Specific routing elements are also examined, like network information sources, decision time and place, and how routing tables are used for fixed routing.

Uploaded by

Sudeepa Herath
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
37 views18 pages

Routing in Switched Networks: Chapter 19 in Stallings 10 Edition

This document discusses routing in packet switching networks. It covers key topics like routing techniques, performance criteria for routing, and different routing strategies including fixed routing, flooding routing, and adaptive routing. Specific routing elements are also examined, like network information sources, decision time and place, and how routing tables are used for fixed routing.

Uploaded by

Sudeepa Herath
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 18

Routing in Switched Networks

Chapter 19 in Stallings 10th Edition

CS420/520  Axel  Krings Page  1 Sequence  18  Chap  19

Routing in Packet Switching


Networks

• Key  design  issue  for  (packet)  switched  networks


• Select  route  across  network  between  end  nodes
• Characteristics  required:
—Correctness
—Simplicity
—Robustness
—Stability
—Fairness
—Optimality
—Efficiency

CS420/520  Axel  Krings Page  2 Sequence  18  Chap  19

1
Routing in Circuit Switched
Network
• Many  connections  will  need  paths  through  more  
than  one  switch
• Need  to  find  a  route
—Efficiency
—Resilience
• Public  telephone  switches  are  a  tree  structure
—Static  routing  uses  the  same  approach  all  the  time
• Dynamic  routing  allows  for  changes  in  routing  
depending  on  traffic
—Uses  a  peer  structure  for  nodes

CS420/520  Axel  Krings Page  3 Sequence  18  Chap  19

Elements of Routing Techniques for


Packet-­Switching Networks

Table 19.1

Performance Criteria Network Information Source


Number of hops None
Cost Local
Delay Adjacent node
Throughput Nodes along route
All nodes
Decision Time
Packet (datagram) Network Information Update Timing
Session (virtual circuit) Continuous
Periodic
Decision Place Major load change
Each node (distributed) Topology change
Central node (centralized)
Originating node (source)

CS420/520  Axel  Krings Page  4 Sequence  18  Chap  19

2
Performance Criteria
• Used  for  selection  of  route
—Minimum  hop
—Least  cost
—Delay
—Throughput

• Simplest  is  to  choose  “minimum  hop”


• Can  be  generalized  as  “least  cost”  routing
• “least  cost”  is  more  flexible  and  is  more  
common  than  “minimum  hop”

CS420/520  Axel  Krings Page  5 Sequence  18  Chap  19

Example Packet Switched


Network

◆Example
–communicating nodes: node-1 to node-6
–what is of interest?
» Shortest path (1-3-6)
» least cost path (1-4-5-6)

CS420/520  Axel  Krings Page  6 Sequence  18  Chap  19

3
Decision Time and Place
• Time
—Packet  or  virtual  circuit  basis
• Place
—Distributed
• Made  by  each  node
—Centralized
• requires  central  node
—Source
• originating  node

CS420/520  Axel  Krings Page  7 Sequence  18  Chap  19

Network Information Source


and Update Timing
• Routing  decisions  usually  based  on  knowledge  of  network  
— (not  always)
• Distributed  routing
— Nodes  use  local  knowledge
— May  collect  info  from  adjacent  nodes
— May  collect  info  from  all  nodes  on  a  potential  route
• Central  routing
— Collect  info  from  all  nodes
• Update  timing
— When  is  network  info  held  by  nodes  updated?
• Fixed  -­ never  updated
• Adaptive  -­ regular  updates
• Continuous
• Periodic
• Major  load  change
• Topology  change

CS420/520  Axel  Krings Page  8 Sequence  18  Chap  19

4
Routing Strategies
• We  will  discuss  several  strategies:
—Fixed  Routing
—Flooding  Routing
—Random  Routing
—Adaptive  Routing

CS420/520  Axel  Krings Page  9 Sequence  18  Chap  19

Routing Strategies -­ Fixed


Routing

• Use  a  single  permanent  route  for  each  source  to  


destination  pair  of  nodes
• Determined  using  a  least  cost  algorithm
• Route  is  fixed
—Until  a  change  in  network  topology
—Based  on  expected  traffic  or  capacity
• Advantage  is  simplicity
• Disadvantage  is  lack  of  flexibility
—Does  not  react  to  network  failure  or  congestion

CS420/520  Axel  Krings Page  10 Sequence  18  Chap  19

5
Fixed Routing
Tables

CS420/520  Axel  Krings Page  11 Sequence  18  Chap  19

Routing Strategies -­ Flooding


• Packet  sent  by  node  to  every  neighbor
• Eventually  multiple  copies  arrive  at  destination
• No  network  information  required
• Each  packet  is  uniquely  numbered  so  duplicates  
can  be  discarded
• Need  to  limit  incessant  retransmission  of  
packets
—Nodes  can  remember identity  of  packets  
retransmitted
—Can  include  a  hop  count  in  packets

CS420/520  Axel  Krings Page  12 Sequence  18  Chap  19

6
Flooding 2 3

Example
6

3
3
1
4 5
Figure 19.3
(a) First hop

2 2 2
2 3

Assigned Hop

2
2

2
6

Count is 3
1 2

2
2
4 5

(b) Second hop

1
1
1 1 1
1
2 3 1

1
1

1
1
6

1
1
1

1
1

1
1 1 1 1 1
4 5

(c) Third hop


CS420/520  Axel  Krings Page  13 Sequence  18  Chap  19
Figure 19.3 Flooding Example (hop count = 3)

Properties of Flooding
Can  be  used  
All  possible  
Highly   to  send  
routes  are  
robust emergency  
tried messages

At  least  one  
packet  will  have  
taken  minimum  
hop  route

Nodes  directly  or  


indirectly  
connected  to  
source  are  visited

High  traffic  
Security  
Disadvantages: load  
concerns
generated
CS420/520  Axel  Krings Page  14 Sequence  18  Chap  19

7
Random Routing
• Node  selects  one  outgoing  path  for  retransmission  of  
incoming  packet
• Selection  can  be  random  or  round  robin
— Can  select  outgoing  path  based  on  probability  calculation,  i.e.

• Pi   probability  of  selecting  link  i


Ri
Pi =
• Ri data  rate  of  link  i ∑R j
• Sum  is  taken  over  all  outgoing  candidate  links j

• No  network  info  needed


• Route  is  typically  not  least  cost  nor  minimum  hop

CS420/520  Axel  Krings Page  15 Sequence  18  Chap  19

Routing Strategies -­ Adaptive


Routing

• Used  by  almost  all  packet  switching  networks


• Routing  decisions  change  as  conditions  on  the  
network  change  due  to  failure  or  congestion
• Requires  information  about  network
Disadvantages: Decisions  more  complex

Tradeoff  between  quality  of  network  information  and  


overhead
Reacting  too  quickly  can  cause  oscillation

Reacting  too  slowly  means  information  may  be  


irrelevant  
CS420/520  Axel  Krings Page  16 Sequence  18  Chap  19

8
Classification of Adaptive
Routing Strategies
• A  convenient  way  to  classify  is  on  the  basis  of  
information  source

Local   ••Route  to  outgoing  link  with  shortest  queue


••Can  include  bias  for  each  destination

(isolated) ••Rarely  used  -­ does  not  make  use  of  available  
information

Adjacent   ••Takes  advantage  of  delay  and  outage  information

nodes ••Distributed  or  centralized

All  nodes ••Like  adjacent

CS420/520  Axel  Krings Page  17 Sequence  18  Chap  19

To 2

Node 4's Bias To 3


Table for To 1
Destination 6

Next Node Bias


1 9
2 6 To 5
3 3 Node 4
5 0

Figure 19.4 Example of Isolated Adaptive Routing


CS420/520  Axel  Krings Page  18 Sequence  18  Chap  19

9
Isolated Adaptive Routing

Algorithm:
minimize Q + Bi
where
Q is queue length
Bi is bias for destination i
CS420/520  Axel  Krings Page  19 Sequence  18  Chap  19

ARPANET Routing Strategies


1st Generation

• Distributed  adaptive  using  estimated  delay  


—Queue  length  used  as  estimate  of  delay
• Version  of  Bellman-­Ford  algorithm  
• Node  exchanges  delay  vector  with  neighbors
• Update  routing  table  based  on  incoming  
information
• Doesn't  consider  line  speed,  just  queue  length  
and  responds  slowly  to  congestion
CS420/520  Axel  Krings Page  20 Sequence  18  Chap  19

10
Desti- Next Desti- Next
nation Delay node nation Delay node
1 0 — 3 7 5 1 0 —
2 2 2 0 4 2 2 2 2
3 5 3 3 0 2 3 3 4
4 1 4 2 2 0 4 1 4
5 6 3 3 1 1 5 2 4
6 8 3 5 3 3 6 4 4


 

 

 

 

 I1,2 = 2
D1 S1 D2 D3 D4
I1,3 = 5
I1,4 = 1

(a) Node 1's Routing (b) Delay vectors sent to node 1 (c) Node 1's routing table
table before update from neighbor nodes after update and link
costs used in update

Figure 19.5 Original ARPANET Routing Algorithm

CS420/520  Axel  Krings Page  21 Sequence  18  Chap  19

ARPANET Routing Strategies


2nd Generation

• Distributed  adaptive  using  delay  criterion


—Using  timestamps  of  arrival,  departure and  ACK  times
• Re-­computes  average  delays  every  10  seconds
• Any  changes  are  flooded  to  all  other  nodes
• Re-­computes  routing  using  Dijkstra’s  algorithm
• Good  under  light  and  medium  loads
• Under  heavy  loads,  little  correlation  between  
reported  delays  and  those  experienced
CS420/520  Axel  Krings Page  22 Sequence  18  Chap  19

11
ARPANET Routing Strategies (3)

• Third  Generation  (1987)


—Link  cost  calculations  changed
—Measure  average  delay  over  last  10  seconds
—Normalize  based  on  current  value  and  
previous  results

CS420/520  Axel  Krings Page  23 Sequence  18  Chap  19

Least Cost Algorithms


• Basis  for  routing  decisions
— Can  minimize  hop  by  setting  each  link  cost  to  unity
— Can  have  link  value  inversely  proportional  to  capacity
• Given  network  graph
— Nodes  connected  by  bi-­directional  links
— Each  link  has  a  cost  in  each  direction
• Define  cost  of  path  between  two  nodes  as  sum  of  costs  
of  links  traversed
• For  each  pair  of  nodes,  find  a  path  with  the  least  cost
• Link  costs  in  different  directions  may  be  different
— E.g.  length  of  packet  queue

CS420/520  Axel  Krings Page  24 Sequence  18  Chap  19

12
Dijkstra’s Algorithm Definitions
• Find  shortest  paths  from  given  source  to  all  other  nodes,  
by  developing  paths  in  order  of  increasing  path  length
• N =set  of  nodes  in  the  network
• s  = source  node
• T = set  of  nodes  so  far  incorporated  by  the  algorithm
• w(i,  j) =  link  cost  from  node  i  to  node  j
— w(i,  i)  =  0
— w(i,  j)  =  ¥ if  the  two  nodes  are  not  directly  connected
— w(i,  j)  ³ 0  if  the  two  nodes  are  directly  connected
• L(n) = cost  of  least-­cost  path  from  node  s  to  node  n  
currently  known
— At  termination,  L(n) is  cost  of  least-­cost  path  from  s  to  n

CS420/520  Axel  Krings Page  25 Sequence  18  Chap  19

Dijkstra’s Algorithm Method


• Step  1  [Initialization]  
— T  =  {s} Set  of  nodes  so  far  incorporated  consists  of  only  source  node
— L(n)  =  w(s,  n)      for  n  ≠  s
— Initial path  costs  to  neighboring  nodes  are  simply  link  costs
• Step  2 [Get  Next  Node]
— Find  neighboring  node  x  not  in  T  with least-­cost  path  from  s  
— Incorporate  node  into  T
• Step  3 [Update  Least-­Cost  Paths]
— L(n)  =  min[L(n),  L(x)  +  w(x,  n)] for  all  n Ï T
— If  latter  term  is  minimum,  path  from  s  to  n  is  path  from  s  to  x  
concatenated  with  edge  from  x  to  n
• Algorithm terminates  when  all  nodes  have  been  added  to  T

CS420/520  Axel  Krings Page  26 Sequence  18  Chap  19

13
Dijkstra’s Algorithm Notes
• At  termination,  value  L(x)  associated  with  each  
node  x  is  cost  (length)  of  least-­cost  path  from  s  
to  x.
• In  addition,  T  defines  least-­cost  path  from  s  to  
each  other  node
• One  iteration  of  steps  2  and  3  adds  one  new  
node  to  T
—Defines  least  cost  path  from  s  to  that  node

CS420/520  Axel  Krings Page  27 Sequence  18  Chap  19

Example of Dijkstra’s Algorithm

CS420/520  Axel  Krings Page  28 Sequence  18  Chap  19

14
Results of Example
Dijkstra’s Algorithm

CS420/520  Axel  Krings Page  29 Sequence  18  Chap  19

Bellman-­Ford Algorithm
Definitions
• Essential  idea
— first,  find  shortest  paths  from  given  node  subject  to  the  constraint  that  
the  paths  contain  at  most  1  link
— next,  find the  shortest  paths  with  a  constraint  of  paths  of  at  most  2  
links
— and so  on

• Definitions
— s =  source  node
— w(i,  j) = link  cost  from  node  i to  node  j
• w(i,  i)  =  0
• w(i,  j)  =  ¥ if  the  two  nodes  are  not  directly  connected
• w(i,  j)  ³ 0  if  the  two  nodes  are  directly  connected
— h =  maximum  number  of  links  in  path  at  current  stage  of  the  algorithm
• i.e.  h =  max  length  of  a  path  currently  considered
— Lh(n) = cost  of  least-­cost  path  from  s to  n  under  constraint  of  no  more  
than  h links

CS420/520  Axel  Krings Page  30 Sequence  18  Chap  19

15
Bellman-­Ford Algorithm Method
• Step  1  [Initialization]
— L0(n) =  ¥,  for  all  n  ¹ s
— Lh(s) =  0,  for  all  h

• Step  2  [Update]  
— For  each  successive  h ³ 0
• For  each  n ≠  s,  compute

Lh+1 (n) = min[Lh ( j) + w( j, n)]


j

— Connect  n with  predecessor  node  j that  achieves  minimum


— Eliminate any  connection  of  n with  different  predecessor  node  
formed  during  an  earlier  iteration
— Path from  s to  n  terminates  with  link  from  j to  n

CS420/520  Axel  Krings Page  31 Sequence  18  Chap  19

Example of Bellman-­Ford
Algorithm

CS420/520  Axel  Krings Page  32 Sequence  18  Chap  19

16
Results of Bellman-­Ford
Example

CS420/520  Axel  Krings Page  33 Sequence  18  Chap  19

Comparison

• Bellman-­Ford • Dijkstra
— Calculation  for  node  n  needs   — Each  node  needs  complete  
link  cost  to  neighboring  nodes   topology
plus  total  cost  to  each   — Must  know  link  costs  of  all  
neighbor  from  s links  in  network
— Each  node  can  maintain  set  of   — Must  exchange  information  
costs  and  paths  for  every   with  all  other  nodes
other  node
— Can  exchange  information  with  
direct  neighbors
— Can  update  costs  and  paths  
based  on  information  from  
neighbors  and  knowledge  of  
link  costs

CS420/520  Axel  Krings Page  34 Sequence  18  Chap  19

17
Evaluation
Dependent  on  
••Processing   Implementation   Both  converge  
time  of   specific under  static  
algorithms topology  and  
••Amount  of   costs
information  
required  from  
other  nodes If  link  costs  
change,  
algorithms  
attempt  to  
If  link  costs  depend   catch  up
on  traffic,  which   Both  
depends  on  routes   converge  
chosen,  may  have   to  same  
feedback  instability solution

CS420/520  Axel  Krings Page  35 Sequence  18  Chap  19

Summary
• Routing  in  packet-­ • Internet  routing  
switching  networks protocols
—Autonomous  systems
—Characteristics  
—Approaches  to  routing  
—Routing  strategies
—Border  gateway  
• Examples:    Routing  in   protocol
ARPANET —OSPF  protocol
—First  generation:  
Distance  Vector  Routing • Least-­cost  algorithms
—Dijkstra’s algorithm
—Second  generation:    
Link-­State  Routing —Bellman-­Ford  
—Third  generation algorithm
—Comparison  
CS420/520  Axel  Krings Page  36 Sequence  18  Chap  19

18

You might also like