0% found this document useful (0 votes)
27 views31 pages

CC CHP 12

The document discusses routing in packet-switched networks. It describes characteristics of routing functions including correctness, simplicity, robustness, stability, fairness, optimality and efficiency. It discusses performance criteria like minimum hop routes and least cost routing. It describes decision time, place and routing strategies like fixed routing, flooding, random routing and adaptive routing. Adaptive routing changes routes based on failures and congestion but has higher processing burden.

Uploaded by

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

CC CHP 12

The document discusses routing in packet-switched networks. It describes characteristics of routing functions including correctness, simplicity, robustness, stability, fairness, optimality and efficiency. It discusses performance criteria like minimum hop routes and least cost routing. It describes decision time, place and routing strategies like fixed routing, flooding, random routing and adaptive routing. Adaptive routing changes routes based on failures and congestion but has higher processing burden.

Uploaded by

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

TECHNOLOGICAL UNIVERSITY (THANLYIN)

Department of Electronic Engineering

EcE-42002 Computer Communication II

Daw Tin Zar Shwe


Lecturer
Department of Electronic Engineering
1

Chapter 12
Routing in Switched Networks

12.1 Routing in Packet-Switching Networks

12.2 Examples: Routing in Arpanet

12.3 Least-Cost Algorithms

03/13/20
24
12.1 Routing in Packet Switched Network 3

Characteristics
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. Thus, a routing
function must be performed. The requirements for this function include
• Correctness
• Simplicity
• Robustness
• Stability
• Fairness
• Optimality
• Efficiency
03/13/20
24
4

Performance Criteria

 used for selection of route

 simplest is to choose the “minimum hop route”

 can be generalized as “least cost routing”

03/13/20
24
5

Figure 12.1 Example Network Configuration

03/13/20
24
6
Decision Time and Place
Decision time is determined by whether the routing decision is made on a packet or virtual
circuit basis.
The term decision place refers to which node or nodes in the network are responsible for the
routing decision.
The decision time and decision place are independent design variables. For example, in Figure
12.1, suppose that the decision place is each node and that the values depicted are the costs at a given
instant in time: the costs may change.
In a datagram network, the next packet may follow a different route, again determined by each
node along the way.
In a virtual circuit network, each node will remember the routing decision that was made when
the virtual circuit was established, and simply pass on the packets without making a new decision.

03/13/20
24
7
Network Information Source and Update Timing

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.

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

03/13/20
24
8
Routing Strategies
Fixed Routing
 use a single permanent route for each source to destination pair

 determined using a least cost algorithm

 route is fixed

-at least only change when there is a change in the topology of the network

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. Its disadvantage is its lack of flexibility. It does not react to network
congestion or failures

03/13/20
24
9

Fixed Routing Table

03/13/20
24
Routing Strategies 10
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. For
example, if node 1 in Figure 12.1 has a packet to send to node 6, it send a copy of that packet (with
a destination address of 6), to nodes 2, 3, and 4. Node 2 will send a copy to nodes 3 and 4.Node 3
will send a copy to nodes 2, 4, 5 and 6.Node 4 will send a copy to nodes 2, 3, and 5.Eventually, a
number of copies of the packet will arrive at node 6. The packet must have some unique identifier
(e.g., source node and sequence number, or virtual circuit number and sequence number) so that
node 6 knows to discard all but the first copy.

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.

03/13/20
24
10
An example of the latter tactic is shown in Figure 12.3. 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. All packets
received from the third hop are discarded, because the hop count is exhausted.

03/13/20
24
11

Flooding Example

03/13/20
24
13
Routing Strategies
Random Routing
Random routing has the simplicity and robustness of flooding with far less traffic load. 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,

Like flooding, random routing requires the use of no network information. Because the route taken is
random, the actual route will typically not be the least cost route nor the minimum-hop route. Thus, the network
must carry a higher than optimum traffic load, although not nearly as high as for flooding.

03/13/20
24
Routing Strategies
Adaptive Routing
14

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. The principal conditions that
influence routing decisions are
• Failure: When a node or link fails, it can no longer be used as part of a route.
• 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.
There are several drawbacks associated with the use of adaptive routing, compared to fixed routing:
• The routing decision is more complex; therefore, the processing burden on network nodes increases.
• In most cases, adaptive strategies depend on status information that is collected at one place but used at another.
• An adaptive strategy may react too quickly, causing congestion-producing oscillation.
Despite these real dangers, adaptive routing strategies are by far the most prevalent, for two reasons:
• An adaptive routing strategy can improve performance, as seen by the network user.
• An adaptive routing strategy can aid in congestion control. Because an adaptive routing strategy tends to balance loads, it
can delay the onset of severe congestion
03/13/20
24
2

A convenient way to classify adaptive routing strategies is on the basis of information source: local,
adjacent nodes, all nodes. An example of an adaptive routing strategy that relies only on local information is one in
which a node routes each packet to the outgoing link with the shortest queue length, Q. This would have the effect of
balancing the load on outgoing links. However, some outgoing links may not be headed in the correct general
direction.. In this case, each link emanating from the node would have a bias for each destination i, such that lower
values of indicate more preferred directions. For each incoming packet headed for node i, the node would choose the
outgoing link that minimizes Q + . Thus a node would tend to send packets in the right direction, with a concession
made to current traffic delays. As an example, Figure 12.4 show the status of node 4 of Figure 12.1 at a certain point
in time. Node 4 has links to four other node. A packet arrives from node 1 destined for node 6.To which outgoing
link should the packet be routed? Based on current queue lengths and the values of bias for each outgoing link, the
minimum value of Q + is 4, on the link to node 3. Thus, node 4 routes the packet through node 3.

03/13/20
24
17

Going to
node 6

Next Node = minm{B6 + Q}

9+2 = 11
6+3 = 9
3+1 = 4
0+5 = 5

Figure 12.4 Example of Isolated Adaptive Routing


03/13/20
24
12.2 Examples: Routing in ARPANET 18
1st Generations

 1969
 distributed adaptive using estimated delay
• queue length used as estimate of delay
 using Bellman-Ford algorithm
 node exchanges delay vector with neighbors
 update routing table based on incoming information
 problems:
• doesn't consider line speed, just queue length
• queue length is not a good measurement of delay
• responds slowly to congestion
03/13/20
24
2

Figure 12.5 Original ARPANET Routing Algorithm 03/13/20


24
19
ARPANET Routing Strategies
2nd Generation
 1979
 distributed adaptive using measured delay
• using timestamps of arrival, departure & ACK times
 Every 10 seconds, the node computes the average delay on each outgoing link.
 any significant changes in delay, the information is sent to all other nodes using
flooding.
 Each node maintains an estimate of delay on every network link.
 When new information arrives, it recomputes its routing table using Dijkstra’s
algorithm.

03/13/20
24
20
ARPANET Routing Strategies
3rd Generation

 1987
 link cost calculations changed
 measure average delay over last 10 secs and transform into link
utilization estimate
 normalize this based on current value and previous results
 set link cost as function of average utilization

03/13/20
24
21
12.3 Least Cost Algorithms
 basis for routing decisions
 Given a network of nodes connected by bidirectional links, where of a path each link has a cost
associated with it in each direction, define the cost of a path between two nodes as the sum of the
costs of the links traversed. For each pair of nodes, find a path with the least cost.

 Most least-cost routing algorithms in use in packet-switching networks and internets are variations of
one of two common algorithms, known as Dijkstra’s algorithm and the Bellman-Ford algorithm

03/13/20
24
22
Dijkstra’s Algorithm

 finds shortest paths from given source node s to all other nodes

 by developing paths in order of increasing path length

 algorithm runs in stages (next slide)


• each time adding node with next shortest path

 algorithm terminates when all nodes processed by algorithm (in set T)

03/13/20
24
Dijkstra’s Algorithm Method 23

 Step 1 [Initialization]
• T = {s} Set of nodes so far incorporated
• 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 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

03/13/20
24
2
Dijkstra’s Algorithm Example

03/13/20
24
Dijkstra’s
Algorithm Example

Iter T L(2) Path L(3) Path L(4) Path L(5) Path L(6) Path

1 {1} 2 1–2 5 1-3 1 1–4  -  -

2 {1,4} 2 1–2 4 1-4-3 1 1–4 2 1-4–5  -

3 {1, 2, 4} 2 1–2 4 1-4-3 1 1–4 2 1-4–5  -

4 {1, 2, 4, 2 1–2 3 1-4-5–3 1 1–4 2 1-4–5 4 1-4-5–6


5}

5 {1, 2, 3, 2 1–2 3 1-4-5–3 1 1–4 2 1-4–5 4 1-4-5–6


4, 5}

6 {1, 2, 3, 2 1-2 3 1-4-5-3 1 1-4 2 1-4–5 4 1-4-5-6


4, 5, 6}
25
24
Dijkstra’s Algorithm Example

03/13/20
24
Bellman-Ford Algorithm 26

 find shortest paths from given node subject to constraint that paths contain at most one link
 find the shortest paths with a constraint of paths of at most two links and so on
 step 1 [Initialization]
 (n) = ∞, for all n ≠ s
 (s) = 0, for all h
 step 2 [Update]
• for each successive h ≥ 0
 for each n ≠ s, compute: (n)=min[
• connect n with predecessor node j that gives min
• path from s to n terminates with link from j to n

03/13/20
24
Results of Bellman-Ford Example

h Lh(2) Path Lh(3) Path Lh(4) Path Lh(5) Path Lh(6) Path

0  -  -  -  -  -

1 2 1-2 5 1-3 1 1-4  -  -

2 2 1-2 4 1-4-3 1 1-4 2 1-4-5 10 1-3-6

3 2 1-2 3 1-4-5-3 1 1-4 2 1-4-5 4 1-4-5-6

4 2 1-2 3 1-4-5-3 1 1-4 2 1-4-5 4 1-4-5-6

28
27
Example of Bellman-Ford Algorithm

03/13/20
24
2
Results of Bellman-Ford Example

03/13/20
24
2
Comparison
 results from two algorithms agree
 Bellman-Ford
• calculation for node n needs link cost to neighboring nodes plus total cost to each neighbors from s
• each node can maintain set of costs and paths for every other node
• can exchange information with direct neighbors
• can update costs and paths based on information from neighbors and knowledge of link costs
 Dijkstra
• each node needs complete topology
• must know link costs of all links in network
• must exchange information with all other nodes

03/13/20
24

You might also like