0% found this document useful (0 votes)
3 views

Routing (Cont.)

Routing in packet-switched networks involves determining paths for data packets from source to destination, utilizing various algorithms to ensure efficiency and reliability. Key performance criteria include throughput and average packet delay, with strategies such as fixed, flooding, random, and adaptive routing employed to manage network traffic. The effectiveness of routing algorithms is crucial in maintaining low delays and high throughput, especially under varying network loads.

Uploaded by

Maha Shiha
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views

Routing (Cont.)

Routing in packet-switched networks involves determining paths for data packets from source to destination, utilizing various algorithms to ensure efficiency and reliability. Key performance criteria include throughput and average packet delay, with strategies such as fixed, flooding, random, and adaptive routing employed to manage network traffic. The effectiveness of routing algorithms is crucial in maintaining low delays and high throughput, especially under varying network loads.

Uploaded by

Maha Shiha
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 32

Routing in Switched Networks

1
Routing in Packet Switched Network

• The primary function of a packet switching


network is to accept packets from a source
station and deliver them to a destination station.

• To accomplish this, a path or route through the


network must be determined; generally, more
than one route is possible.

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.

2. The routing system must cope with link and node


failures, requiring redirection of traffic and an update
of the databases maintained by the system.

3. To achieve high performance, the routing algorithm


may need to modify its routes when some areas within
the network become congested.
3
Routing in Packet Switched Network
▪ Key design issue for packet switched networks.
▪ Select route across network between end nodes.
▪ Characteristics required:
– Correctness
– Simplicity
– Robustness
– Stability
– Fairness
– Optimality
– Efficiency
4
Routing in Packet Switched Network
• Robustness has to do with the ability of the network
to deliver packets via some route in the face of
localized failures and overloads.

• A tradeoff also exists between fairness and


optimality. Some performance criteria may give higher
priority to the exchange of packets between nearby
stations compared to an exchange between distant
stations. This policy may maximize average throughput
but will appear unfair to the station that primarily
needs to communicate with distant stations.

5
Performance Criteria
• The selection of a route is generally based on
some performance criterion.

• Simplest is “minimum hop” (route that passes


through the least number of nodes)

• Can be generalized as “least cost”

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).

▪ Routing interacts with flow control in determining these


performance measures by feedback.

10
• When the traffic load offered is relatively low, it will
be fully accepted into the network, that is,
throughput = offered load

• When the offered load is excessive, a portion will be


rejected by the flow control algorithm and
throughput = offered load - rejected load

• The traffic accepted into the network will experience


an average delay per packet that will depend on the
routes chosen by the routing algorithm.

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).

• Therefore, as the routing algorithm is more successful


in keeping delay low, the flow control algorithm allows
more traffic into the network.

12
Example
All links have a
capacity of 10 units.

If all traffic is routed


through the middle
link(4,6), congestion
occurs.

If, instead, paths


(I - 3 - 6) and (2 - 5 -
6) are used, the
average delay is
small.
13
• For the same network, assume that the offered loads at nodes I
and 2 are 5 and 15 units, respectively.
• If routing from node 2 to the destination is done along a single
path, then at least 5 units of offered load will have to be rejected
since all path capacities equal 10.
Suppose that the traffic originating
at node 2 is evenly split between
the two paths 2 - 4 - 6 and 2 - 5 - 6,
while the traffic originating at
node I is routed along 1 - 3 - 6.
Then, the traffic arrival rate on
each link will not exceed 75% of
capacity, the delay per packet will
be reasonably small, and (given a
good flow control scheme) no
portion of the offered load will be
rejected.
14
• In conclusion, the effect of good routing is to increase
throughput for the same value of average delay per
packet under high offered load conditions and to
decrease average delay per packet under low and
moderate offered load conditions.

• The routing algorithm should be operated so as to keep


average delay per packet as low as possible for any
given level of offered load.

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.

• In the simplest case, all subsequent packets using that


virtual circuit follow the same route. In more sophisticated
network designs, the network may dynamically change the
route assigned to a particular virtual circuit in response to
changing conditions (e.g., overload or failure of a portion of the
17
network).
Decision Time and Place
• The decision place refers to which node or nodes in the
network are responsible for the routing decision. Most common is
distributed routing, in which each node has the responsibility of
selecting an output link for routing packets as they arrive.
• For centralized routing, the decision is made by some
designated node, such as a network control center. The danger
of this latter approach is that the loss of the network control
center may block operation of the network.
• The distributed approach is perhaps more complex but is also
more robust.
• A third alternative, used in some networks, is source routing.
The routing decision is actually made by the source station
rather than by a network node and is then communicated to the
18 network.
Network Information Source and
Update Timing
Most routing strategies be based on knowledge of the network
topology, traffic load, and link cost.

– Distributed routing

▪ With distributed routing, in which the routing decision is


made by each node, the individual node may make use of
only local information, such as the cost of each outgoing link.
Each node might also collect information from adjacent
(directly connected) nodes, such as the amount of
congestion experienced at that node.

19
Network Information Source and
Update Timing
– Central routing

▪ In the case of centralized routing, the central node typically


makes use of information obtained from all nodes.

▪ For all information source categories (adjacent nodes, all


nodes), update timing depends on the routing strategy.

▪ For a fixed strategy, the information is never updated. For


an adaptive strategy, information is updated from time to
time to enable the routing decision to adapt to changing
conditions.
20
Routing Strategies
A large number of routing strategies have evolved
for dealing with the routing requirements of packet-
switching networks, we survey four key strategies:

• 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.

▪ Eventually , a number of copies of the packet will


arrive at the destination. The packet must have
some unique identifier (e.g., source node and
sequence number, or virtual circuit number and
sequence number) so that the destination knows
to discard all but the first copy .
25
▪ Unless something is done to stop the incessant
retransmission of packets, the number of packets
in circulation just from a single source packet grows
without bound.

▪ One way to prevent this, is to include a hop count


field with each packet. The count can originally be
set to some maximum value, such as the diameter
of the network. Each time a node passes on a
packet, it decrements the count by one. When the
count reaches zero, the packet is discarded.
Flooding
Example

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.

• A refinement of this technique is to assign a probability to each


outgoing link and to select the link based on that probability. The
probability could be based on data rate, or on fixed link costs.

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

You might also like