routing techniques - ernetisg/networks/slides/routingalgorithm… · switching network design is...
TRANSCRIPT
Routing Techniques
Dr. Indranil Sen Gupta Packet Switching Networks Slide 1
Routing in Circuit Switching Networks
Dr. Indranil Sen Gupta Packet Switching Networks Slide 2
Routing in Circuit Switched Networks
• In large circuit-switched networks, connections often require a path
through more than one switch.
• Routing function in public telecommunication networks has been
traditionally quite simple.
– Switches are organized as a tree structure.
– To add some resilience to the network, additional high-usage trunks are
added that cut across the tree structure to connect exchanges with high
Dr. Indranil Sen Gupta Circuit Switching Slide 3
added that cut across the tree structure to connect exchanges with high
volumes of traffic between them.
– Usually a static approach.
• To cope with growing demands, all providers today use a dynamic
approach.
– Routing decisions are influenced by current traffic conditions.
– Switching nodes have a peer relationship with each other rather than a
hierarchical one.
– Routing is more complex and more flexible.
Method 1: Alternate Routing
• The possible routes to be used between two end offices are
predetermined.
– It is the responsibility of the originating switch to select the
appropriate route for each call.
Dr. Indranil Sen Gupta Circuit Switching Slide 4
• In practice, usually a different set of pre-planned routes is
used for different time periods.
– Takes advantage of different traffic patterns in different time zones
and different times of day.
Alternate Routing Example
Dr. Indranil Sen Gupta Circuit Switching Slide 5
Method 2: Adaptive Routing
• This is designed to enable switches to react to changing
traffic patterns on the network.
– Greater management overhead (switches must exchange
information).
Dr. Indranil Sen Gupta Circuit Switching Slide 6
– Has the potential for more effectively optimizing the use of
network resources.
Routing in Packet Switching Networks
Dr. Indranil Sen Gupta Packet Switching Networks Slide 7
Introduction
• One of the most complex and crucial aspect of packet-
switching network design is routing.
– In most subnets, packets will require multiple hops to make the
journey.
Dr. Indranil Sen Gupta Packet Switching Networks Slide 8
• Routing Algorithm:
– That part of the network layer software responsible for deciding
which output line an incoming packet should be transmitted on.
– For datagrams, this decision has to be taken for every arriving
packet.
– For virtual circuits, routing decisions are made only when a new
virtual circuit is being set up.
Desirable properties in a routing algorithm
• Correctness and simplicity: self-explanatory.
• Robustness: ability of the network to deliver packets via some route
even in the face of failures.
• Stability: the algorithm should converge to equilibrium fast in the
.
Dr. Indranil Sen Gupta Packet Switching Networks Slide 9
face of changing conditions in the network.
• Fairness and optimality: obvious requirements, but conflicting.
X
FDB
CA E
Y
X -> Y
A -> B
C -> D
E -> F
Performance Criteria
• The simplest criterion is to choose the minimum-hop route
through the network.
– Easily measured criterion.
• A generalization is least-cost routing.
Dr. Indranil Sen Gupta Packet Switching Networks Slide 10
• A generalization is least-cost routing.
– A cost is associated with each link.
– For any pair of attached stations, the least cost route through the
network is looked for.
• For either case, several well-known algorithms exists for
finding out the optimum path.
– Dijkstra’s algorithm
– Bellman-Ford algorithm
Routing Strategies
• A large number of routing strategies have evolved over the
years.
• Four key strategies shall be discussed:
– Fixed (Static) routing
Dr. Indranil Sen Gupta Packet Switching Networks Slide 11
– Fixed (Static) routing
– Flooding
– Random routing
– Adaptive routing
Fixed Routing
• A route is selected for each source-destination pair of nodes in the
network.
– Any standard least-cost routing algorithm can be used.
– The routes are fixed; they may only change if there is a change in the
topology of the network.
• How fixed routing may be implemented?
Dr. Indranil Sen Gupta Packet Switching Networks Slide 12
• How fixed routing may be implemented?
– A central routing matrix is created, which is stored at a network control
center.
– The matrix shows, for each source-destination pair of nodes, the identity
of the next node on the route.
– From the main routing matrix, routing tables to be used by each individual
node can be developed.
• Main advantage is simplicity, and works well in a reliable network
with stable load. Disadvantage is its lack of flexibility.
Fixed Routing:
example
Dr. Indranil Sen Gupta Packet Switching Networks Slide 13
Flooding
• Every incoming packet is sent out on every outgoing line
except the one it arrived on.
• Flooding generates vast number of duplicate packets, and
suitable damping mechanism must be used.
Dr. Indranil Sen Gupta Packet Switching Networks Slide 14
suitable damping mechanism must be used.
– A hop counter may be contained in the packet header, which is
decremented at each hop, with the packet being discarded when the
counter reaches zero.
• The sender initializes the hop counter. If no estimate is known, it is
set to the full diameter of the subnet.
– Keep track of which packets have been flooded, to avoid sending
them out a second time.
Dr. Indranil Sen Gupta Packet Switching Networks Slide 15
Flooding (contd.)
• A variation which is slightly more practical is
selective flooding.
– The routers do not send every incoming packet out on every line,
only on those lines that go in approximately the same direction.
• Utilities of flooding:
Dr. Indranil Sen Gupta Packet Switching Networks Slide 16
• Utilities of flooding:
– Flooding is highly robust, and could be used to send emergency
messages (e.g. military applications).
– May be used to initially set up the route in a virtual circuit.
• Flooding always chooses the shortest path, since it explores every
possible path in parallel.
– Can be useful for the dissemination of important information to all
nodes (e.g. routing information).
Random Routing
• This has the simplicity and robustness of flooding with far
less traffic load.
– A node selects only one outgoing path for retransmission of an
incoming packet.
Dr. Indranil Sen Gupta Packet Switching Networks Slide 17
– The outgoing link is chosen at random, excluding the link on
which the packet arrived.
• A refinement is to assign a probability to each outgoing
link and to select the link based on that probability.
• The actually route will typically not be the least-cost route.
– Network must carry a higher than optimum traffic load.
Adaptive Routing
• Routing decisions change as conditions on the network
change.
• Two principle conditions affecting routing decisions:
– Failure: When a node or trunk fails, it can no longer be used as part
Dr. Indranil Sen Gupta Packet Switching Networks Slide 18
– Failure: When a node or trunk fails, it can no longer be used as part
of the route.
– Congestion: When a particular portion of the network become
heavily congested, it is desirable to route packets around the area of
congestion.
• For adaptive routing to be possible, network state
information must be exchanged among the nodes.
– More information exchange ==> better routing ==> more overhead.
Adaptive Routing (contd.)
• Several drawbacks of the approach:
– Routing decision is more complex ==> more processing burden on
the switching nodes.
– Depends on status information that is collected at one place but
Dr. Indranil Sen Gupta Packet Switching Networks Slide 19
used at another ==> traffic overhead increases.
– It may react too quickly to changing network state, thereby
producing congestion-producing oscillation.
• Despite the drawbacks, adaptive routing is widely used.
– Improves performance, as seen by the network user.
– Can aid in congestion control.
Adaptive Routing Algorithms
• Several algorithms shall be discussed.
– Isolated adaptive routing.
– ARPANET: first generation.
– ARPANET: second generation.
Dr. Indranil Sen Gupta Packet Switching Networks Slide 20
– ARPANET: second generation.
– ARPANET: third generation.
Isolated Adaptive Routing
• A node routes an incoming packet to the outgoing link
with the shortest queue length Q.
– Balances load on outgoing links.
– The chosen outgoing link may not be heading in the right direction.
Dr. Indranil Sen Gupta Packet Switching Networks Slide 21
– The chosen outgoing link may not be heading in the right direction.
• To take direction into account, each link emanating from
the node has a bias Bi, for each destination i.
– For each arriving packet heading for node i, the node would
choose the outgoing link that minimizes Q+Bi.
– A node would tend to send packets in the right direction, with a
concession made to current traffic delays.
Isolated Adaptive Routing: an example
Node 4’s Bias Table
for Destination 6
To 2
Dr. Indranil Sen Gupta Packet Switching Networks Slide 22
Next node Bias
1 9
2 6
3 3
5 0
To 1To 3
To 5
Packet arrives from node 1 ==> route through node 5
ARPANET: first generation
• Developed in 1969.
• Distributed adaptive algorithm using delay as the
performance criterion.
• Each node maintains two vectors:
– Di = [ di1 di2 …… din]
Dr. Indranil Sen Gupta Packet Switching Networks Slide 23
i i1 i2 in
– Si = [ si1 si2 ……. sin ]
– Here,
• Di is the delay vector for node i
• dij is the current estimate of minimum delay from node i to node j
• n is the number of nodes
• Si is the successor node vector for node i
• sij is the next node in the current minimum-delay route from i to j
Contd.
• Periodically (every 128 ms), each node exchanges its delay
vector with all of its neighbors.
• Using the incoming delay vectors, a node k updates its
vectors as follows:
Dr. Indranil Sen Gupta Packet Switching Networks Slide 24
vectors as follows:
– dkj = Min [dij + lki] over all i in A
– skj = i, using i that minimizes the expression above
– Here,
• A is the set of neighboring nodes for k
• lki is the current estimate of delay from k to i
Contd.
• The estimated link delay is simply the queue length for that
link.
– In building the new routing table, a node will tend to favor
outgoing links with shorter queues.
Dr. Indranil Sen Gupta Packet Switching Networks Slide 25
– Since queue lengths vary rapidly with time, a thrashing situation
may result.
• A packet continues to seek out areas of low congestion rather than
aiming at the destination.
ARPANET: first generation
Illustrative Example
Dr. Indranil Sen Gupta Packet Switching Networks Slide 26
Figures 12.6, 12.7 from the book by Stallings
ARPANET: second generation
• The previous algorithms had several shortcomings:
– Only queue lengths were considered, and not line speed.
• Higher capacity links were not given the favored status they deserved.
– Queue length is only an artificial measure of delay.
Dr. Indranil Sen Gupta Packet Switching Networks Slide 27
– Queue length is only an artificial measure of delay.
• Processing time of a packet before placing it in the queue may itself
be variable.
– The algorithm responds slowly to congestion and delay increases.
• New algorithm proposed in 1979.
– A distributed adaptive algorithm, using delay as the performance
criterion.
– The delay is measured directly, by timestamping the packets.
ARPANET: third generation
• Problem with the previous approaches was that every node
was trying to obtain the best route for all destinations, and
that efforts conflicted.
• It was concluded that under heavy loads, the goal of
routing should be to give the average route a good path
Dr. Indranil Sen Gupta Packet Switching Networks Slide 28
routing should be to give the average route a good path
instead of attempting to give all routes the best path.
– The designers decided that it was unnecessary to change the
overall routing algorithm.
– It was sufficient to change the function that calculates link costs.
• Done in a way to damp routing oscillations and reduce routing
overheads.
• Uses simple concepts from queuing theory.