Routing (Cont.)
Routing (Cont.)
1
Routing in Packet Switched Network
2
Routing involves a complex collection of algorithms. This is
due to:
1. Routing requires coordination between all the nodes
of the subnet rather than just a pair of modules as, for
example, in data link and transport layer protocols.
5
Performance Criteria
• The selection of a route is generally based on
some performance criterion.
6
▪ The simplest criterion is to choose the minimum-hop
route through the network. This should minimize the
consumption of network resources.
▪ A generalization of the minimum-hop criterion is least-cost
routing. In this case, a cost is associated with each link,
and, for any pair of attached stations, the route through
the network that accumulates the least cost is sought.
▪ In either the minimum-hop or least-cost approach, the
algorithm for determining the optimum route for any pair
of stations is relatively straightforward, and the processing
time would be about the same for either computation.
▪ Because the least-cost criterion is more flexible, this is
more common than the minimum-hop criterion.
7
Example Packet Switched Network
8
• Fig. illustrates a network in which the two arrowed lines
between a pair of nodes represent a link between these
nodes, and the corresponding numbers represent the
current link cost in each direction.
• The shortest path (fewest hops) from node 1 to node 6 is 1-3-6
(cost = 5 + 5 = 10), but the least-cost path is 1-4-5-6 (cost
= 1 + 1 + 2 = 4). Costs are assigned to links to support
one or more design objectives.
• For example, the cost could be inversely related to the
data rate (i.e., the higher the data rate on a link, the
lower the assigned cost of the link) or the current queuing
delay on the link. In the first case, the least-cost route
should provide the highest throughput. In the second case,
the least-cost route should minimize delay. Example Packet
Switched Network.
9
▪ There are two main performance measures that are
affected by the routing algorithm
1. Throughput (quantity of service), and
2. Average packet delay (quality of service).
10
• When the traffic load offered is relatively low, it will
be fully accepted into the network, that is,
throughput = offered load
11
• Throughput will be greatly affected by the routing
algorithm because typical flow control schemes
operate on the basis of balance between throughput
and delay (i.e., they start rejecting offered load when
delay starts getting excessive).
12
Example
All links have a
capacity of 10 units.
15
Decision Time and Place
Routing decisions are made on the basis of some
performance criterion. Two key characteristics of the decision
are the time and place that the decision is made.
• Time
– Packet or virtual circuit basis
– Fixed or dynamically changing
• Place
– Distributed - made by each node
– Centralized
– Source
16
Decision Time and Place
• Decision time is determined by whether the routing decision
is made on a packet or virtual circuit basis. When the
internal operation of the network is datagram, a routing
decision is made individually for each packet. For internal
virtual circuit operation, a routing decision is made at the
time the virtual circuit is established.
– Distributed routing
19
Network Information Source and
Update Timing
– Central routing
• Fixed,
• Flooding,
• Random, and
• Adaptive.
21
Routing Strategies - Fixed Routing
• For fixed routing, a single, permanent route is configured
for each source-destination pair of nodes in the network. The
routes are fixed, or at least only change when there is a
change in the topology of the network. Thus, the link costs
used in designing routes cannot be based on any dynamic
variable such as traffic. They could, however, be based on
expected traffic or capacity.
• With fixed routing, there is no difference between routing
for datagrams and virtual circuits. All packets from a given
source to a given destination follow the same route. The
advantage of fixed routing is its simplicity, and it should work
well in a reliable network with a stable load. Its disadvantage
is its lack of flexibility. It does not react to network congestion
22
or failures.
Fixed
Routing
Tables
23
▪ The matrix shows, for each source-destination pair of
nodes, the identity of the next node on the route. Note that
it is not necessary to store the complete route for each
possible pair of nodes. Rather, it is sufficient to know, for
each pair of nodes, the identity of the first node on the
route.
▪ In our example, the route from node 1 to node 6 begins
by going through node 4. Again consulting the matrix, the
route from node 4 to node 6 goes through node 5. Finally,
the route from node 5 to node 6 is a direct link to node 6.
Thus, the complete route from node 1 to node 6 is 1-4-5-6.
▪ From this overall matrix, routing tables can be developed
and stored at each node. It follows that each node need
only store a single column of the routing directory . The node's
directory shows the next node to take for each destination.
24
Routing Strategies - Flooding
▪ A packet is sent by a source node to every one of its
neighbors. At each node, an incoming packet is
retransmitted on all outgoing links except for the
link on which it arrived.
27
The label on each packet in the figure indicates the current value of
the hop count field in that packet. A packet is to be sent from
node 1 to node 6 and is assigned a hop count of 3.
• On the first hop, three copies of the packet are created, and the
hop count is decrement to 2.
• For the second hop of all these copies, a total of nine copies are
created. One of these copies reaches node 6, which recognizes that
it is the intended destination and does not retransmit.
• However, the other nodes generate a total of 22 new copies for
their third and final hop. Each packet now has a hope count of 1.
• Note that if a node is not keeping track of packet identifier, it may
generate multiple copies at this third stage.
• All packets received from the third hop are discarded, because the
hop count is exhausted. In all, node 6 has received four additional
copies of the packet.
28
Routing Strategies - Random Routing
• With random routing, a node selects only one outgoing path for
retransmission of an incoming packet. The outgoing link is chosen
at random, excluding the link on which the packet arrived. If all
links are equally likely to be chosen, then a node may simply
utilize outgoing links in a round-robin fashion.
29
Routing Strategies - Adaptive Routing
• In virtually all packet-switching networks, some sort of adaptive
routing technique is used. That is, the routing decisions that
are made change as conditions on the network change.
• For adaptive routing to be possible, information about the state
of the network must be exchanged among the nodes.
• The principal conditions that influence routing decisions are:
1) Failure: When a node or link fails, it can no longer be used
as part of a route.
2) Congestion: When a particular portion of the network is
heavily congested, it is desirable to route packets around
rather than through the area of congestion.
30
▪ There are several drawbacks associated with the use of adaptive
routing, compared to fixed routing:
1. The routing decision is more complex; therefore, the processing
burden on network nodes increases.
2. There is a tradeoff here between the quality of the information
and the amount of overhead. The more information that is
exchanged, and the more frequently it is exchanged, the better
will be the routing decisions that each node makes. On the other
hand, this information is itself a load on the constituent networks,
causing a performance degradation.
3. An adaptive strategy may react too quickly, causing congestion-
producing oscillation, or too slowly, being irrelevant.
31
Routing Strategies - Alternate Routing