Data and Computer Communications: Tenth Edition by William Stallings
Data and Computer Communications: Tenth Edition by William Stallings
Communications
Tenth Edition
by William Stallings
Routing
Routing in Switched Data Networks
"I tell you," went on Syme with passion, "that every
time a train comes in I feel that it has broken past
batteries of besiegers, and that man has won a battle
against chaos. You say contemptuously that when one
has left Sloane Square one must come to Victoria. I
say that one might do a thousand things instead, and
that whenever I really come there I have the sense of
hairbreadth escape. And when I hear the guard shout
out the word 'Victoria', it is not an unmeaning word.
It is to me the cry of a herald announcing conquest. It
is to me indeed 'Victoria'; it is the victory of Adam."
—The Man Who Was Thursday,
G.K. Chesterton
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
Table 19.1
Elements of Routing Techniques
for Packet-Switching Networks
Performance Criteria
Used for selection of route
Simplest is to choose “minimum hop”
Can be generalized as “least cost” routing
Because “least cost” is more flexible it is
more common than “minimum hop”
Decision Time and Place
Decision time
• Packet or virtual circuit basis
• Fixed or dynamically changing
Decision place
• Distributed - made by each node
• More complex, but more robust
• Centralized – made by a designated node
• Source – made by source station
Network Information Source
and Update Timing
Routing decisions usually based on knowledge
of network, traffic load, and link cost
Distributed routing
• Using local knowledge, information from adjacent nodes,
information from all nodes on a potential route
Central routing
• Collect information from all nodes
Nodes directly or
indirectly
connected to
source are visited
High traffic
Security
Disadvantages: load
concerns
generated
Routing Strategies - Random
Routing
Simplicity of flooding with much less traffic load
Node selects one outgoing path for
retransmission of incoming packet
Selection can be random or round robin
Arefinement is to select outgoing path based on
probability calculation
No network information needed
Random route is typically neither least cost nor
minimum hop
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
Improved
performance
Aid in congestion
control
These benefits
depend on the
soundness of the
design and nature of
the load
• Like
adjacent
All nodes
• Takes
advantag
e of
delay
• Route
and to
outgoing
outage
nodes
link with
informati
shortest
on
queue
Adjacent
• Distribut
• Can
ed or
include
centraliz
bias for
ed
each
(isolated)
destinati
on
Local
• Rarely
used -
does not
make use
of information source
of
available
informati
way to classify is on the basis
A convenient
on
Routing Strategies
Classification of Adaptive
ARPANET Routing Strategies
1st Generation
Distance Vector Routing
1969
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
ARPANET Routing Strategies
2nd Generation
Link-State Routing
1979
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
ARPANET Routing Strategies
3rd Generation
1987
Link cost calculation changed
Damp routing oscillations
Reduce routing overhead
Measure average delay over last 10 seconds
and transform into link utilization estimate
Normalize this based on current value and
previous results
Set link cost as function of average utilization
Internet Routing Protocols
Routers are responsible for receiving and
forwarding packets through the interconnected set
of networks
Makes routing decisions based on knowledge of the
topology and traffic/delay conditions of the internet
Routers exchange routing information using a special
routing protocol
Two concepts in considering the routing function:
Routing information
Information about the topology and delays of the internet
Routing algorithm
The algorithm used to make a routing decision for a particular datagram,
based on current routing information
Autonomous Systems (AS)
Exhibits the following characteristics:
Is a set of routers and networks managed by
a single organization
Consists of a group of routers exchanging
information via a common routing protocol
Except in times of failure, is connected (in a
graph-theoretic sense); there is a path
between any pair of nodes
Interior Router Protocol
(IRP)
A shared routing protocol which passes
routing information between routers within
an AS
Custom tailored to specific applications
and requirements
Exterior Router Protocol
(ERP)
Protocol used to pass routing information between routers
in different ASs
Will need to pass less information than an IRP for the
following reason:
If a datagram is to be transferred from a host in one AS to a host
in another AS, a router in the first system need only determine
the target AS and devise a route to get into that target system
Once the datagram enters the target AS, the routers within that
system can cooperate to deliver the datagram
The ERP is not concerned with, and does not know about, the
details of the route
Examples
Path-vector routing
Link-state routing
Distance-Vector Routing
Requires that each node exchange information with
its neighboring nodes
Two nodes are said to be neighbors if they are both
directly connected to the same network
Used in the first-generation routing algorithm for
ARPANET
Each node maintains a vector of link costs for each
directly attached network and distance and next-hop
vectors for each destination
Routing Information Protocol (RIP) uses this
approach
Link-State Routing
Designed to overcome the drawbacks of distance-vector
routing
When a router is initialized, it determines the link cost on
each of its network interfaces
The router then advertises this set of link costs to all other
routers in the internet topology, not just neighboring routers
From then on, the router monitors its link costs
Whenever there is a significant change the router again
advertises its set of link costs to all other routers in the
configuration
The OSPF protocol is an example
The second-generation routing algorithm for ARPANET also
uses this approach
Path-Vector Routing
Alternative to dispense with routing metrics and
simply provide information about which networks can
be reached by a given router and the ASsvisited in
order to reach the destination network by this route
Routing
Table for R6
Dijkstra’s Algorithm
Finds shortest paths from given source
nodesto all other nodes
Develop paths in order of increasing path
length
Algorithm runs in stages
Each time adding node with next shortest
path
Algorithmterminates when all nodes have been
added to T
Dijkstra’s Algorithm Method
Step 1 [Initialization]
T = {s} Set of nodes so far Initial path costs to neighboring
L(n) = w(s, n) for n ≠ s
incorporated nodes are simply link costs
Dijkstra'a Algorithm (s = 1)
Bellman-Ford Algorithm
Find shortest paths from given node
subject to constraint that paths contain at
most one link
Findthe shortest paths with a constraint of
paths of at most two links
Proceeds in stages
Bellman-Ford Algorithm
Step 2 [Update]
For each successive h 0
For each n ≠ s, compute:
Lh+1(n)=minj[Lh(j)+w(j,n)]
Step1 [Initialization] Connect n with predecessor
L0(n) = , for all n s node j that gives min
Lh(s) = 0, for all h 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
Table 19.4(b)
Example of Least-Cost
Routing Algorithms
(using Figure 19.1)
Bellman-Ford Algorithm (s = 1)
Comparison
Bellman-Ford
Calculation for node n
needs link cost to Dijkstra
neighboring nodes plus
Each node needs
total cost to each complete topology
neighbor from s
Must know link costs
Each node can maintain of all links in network
set of costs and paths for
Must exchange
every other node information with all
Can exchange other nodes
information with direct
neighbors
Can update costs and
paths based on
information from
neighbors and knowledge
of link costs
Dependent on
Evaluation
• Processing
time of
algorithms Implementation
• Amount of specific
information
required from
other nodes
Both converge
under static
topology and
costs
If link costs
change,
Both converge
algorithms
to same solution
attempt to catch
If link costs up
depend on
traffic, which
Summary
Internet routing
Routing in packet-
switching networks protocols
Autonomous systems
Characteristics
Approaches to routing
Routing strategies
Border gateway
Examples: Routing in protocol
ARPANET
OSPF protocol
First generation:
Distance Vector
Least-cost algorithms
Routing
Dijkstra’s algorithm
Second generation:
Bellman-Ford
Link-State Routing algorithm
Third generation
Comparison