0% found this document useful (0 votes)
22 views108 pages

Unit IV Slides

Uploaded by

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

Unit IV Slides

Uploaded by

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

1

Packet Networks
1 3
6

2 Node
5
(switch or router)

• Three possible (loopfree) routes from 1 to 6:


– 1-3-6, 1-4-5-6, 1-2-5-6
• Which is “best”?
– Min delay? Min hop? Max bandwidth? Min cost?
Max reliability? 2
1 3
6 Routing Tables
4

2 Node
5
(switch or router)
Node 3

Node 1 Destination Next node Node 6


Destination Next node 1 1 Destination Next node
2 4 1 3
2 2
4 4 2 5
3 3
4 4 5 6 3 3
6 6 4 3
5 2
6 3 5 5

Node 4
Destination Next node
1 1
2 2
Node 2 Node 5
3 3
Destination Next node Destination Next node
5 5
1 1 6 3 1 4
3 1 2 2
4 4 3 4
5 5 4 4 3
6 5 6 6
Routing Protocols
Introducing routing
⚫ Routing is the process that a router uses to
forward packets toward the destination
network.
⚫ A router makes decisions based upon the
destination IP address of a packet.
⚫ In order to make the correct decisions,
routers must learn the direction to remote
networks.

4
Routing Protocols

5
Static route operation

⚫ Static route operations can be divided into


these three parts:
⚫ Network administrator configures the route
⚫ Router installs the route in the routing table
⚫ Packets are routed using the static route
⚫ Since a static route is manually configured,
the administrator must configure the static
route on the router using the ip route
command.
6
7
B. Static vs Dynamic Routing

• Static Routing
– Set up manually, do not change; requires administration
– Works when traffic predictable & network is simple
– Used to override some routes set by dynamic algorithm
– Used to provide default router
• Dynamic Routing
– Adapt to changes in network conditions
– Automated
– Calculates routes based on received updated network state
information
8
Routing Algorithm: Classification
A. Centralized vs Distributed Routing
• Centralized Routing
– All routes determined by a central node
– All state information sent to central node
– Problems adapting to frequent topology changes
– Does not scale
• Distributed Routing
– Routes determined by routers using distributed algorithm
– State information exchanged by routers
– Adapts to topology and other changes
– Better scalability
9
10
11
12
C. Flat vs Hierarchical Routing

• Flat Routing
– All routers are peers
– Does not scale
• Hierarchical Routing
– Partitioning: Domains, autonomous systems,
areas...
– Some routers part of routing backbone
– Some routers only communicate within an area
– Scales 13
• Example: Hierarchical Addresses and Routing

0000 0100
0001 0101
0010 1 4 0110
0011 0111
3
R1 R2
2 5
1000 1100
1001 00 1 00 3 1101
1010 01 3 01 4 1110
1011 10 2 10 3 1111
11 3 11 5

– Prefix indicates network where host is attached


– Routing tables require 4 entries each
14
• Example: Non-Hierarchical Addresses and Routing

0000 0001
0111 0100
1010 1 4 1011
1101 1110
3
R1 R2
2 5
0011 0011
0110 0000 1 0001 4 0101
1001 0111 1 0100 4 1000
1100 1010 1 1011 4 1111
… … … …

⚫ No relationship between addresses & routing


proximity
⚫ Routing tables require 16 entries each
15
Types of Routing Protocols
Classifying Routing Protocols
•Dynamic Routing Protocol
Types
•Distance Vector
•Routing Information
Protocol(RIP)
•Interior Gateway
Routing Protocol(IGRP)
•Enhanced Interior
Gateway Routing
Protocol(EIGRP)
•Link State
•Open Shortest Path
First(OSPF)
•Intermediate System to
Intermediate
System(ISIS)
•Path Vector
•Border Gateway
Protocol(BGP)
Approaches to Shortest Path Routing

• There are two basic approaches to least-cost routing in a communication network

• There are two basic approaches to shortest-path routing:


1. Link State Routing
2. Distance Vector Routing
Approaches to Shortest Path Routing

1. Link State Routing


➢ Link-state routing requires that all routers know about the paths reachable by all other routers in the
network.
➢ Link-state information is flooded throughout the link-state domain to ensure all routers posses a
synchronized copy of the area's link-state database.
➢ From this common database, each router constructs its own relative shortest-path tree, with itself as
the root, for all known routes.

2. Distance Vector Routing


➢ Distance vector routing is so named because it involves two factors: the distance,
or metric, of a destination, and the vector, or direction to take to get there. Routing
information is only exchanged between directly connected neighbors.
– Each node knows the distance (=cost) to its directly connected neighbors
– A node sends a list to its neighbors with the current distances to all nodes
– If all nodes update their distances, the routing tables eventually converge
Shortest Path Routing
Shortest Paths Problem
• Many possible paths connect any given source and to any
given destination
• Routing involves the selection of the path to be used to
accomplish a given transfer
• Typically it is possible to attach a cost or distance to a link
connecting two nodes
• Routing can then be posed as a shortest path problem
20
Routing Metrics
Means for measuring desirability of a path
• Path Length = sum of costs or distances
• Possible metrics
– Hop count: rough measure of resources used
– Reliability: link availability; BER
– Delay: sum of delays along path; complex & dynamic
– Bandwidth: “available capacity” in a path
– Load: Link & router utilization along path
– Cost: $$$

21
Shortest Path Protocols

Distance Vector Protocols


• Neighbors exchange list of distances to destinations
• Best next-hop determined for each destination
• Bellman-Ford (distributed) shortest path algorithm

Link State Protocols


• Link state information flooded to all routers
• Routers have complete topology information
• Shortest path (& hence next hop) calculated
• Dijkstra (centralized) shortest path algorithm 22
6.3.1 Distance Vector
Do you know the way to San Jose?

San Jose 596

23
Distance Vector
Local Signpost Table Synthesis
• Direction • Neighbors exchange table
• Distance entries
• Determine current best
Routing Table next hop
For each destination list: • Inform neighbors
– Periodically
• Next Node
– After changes
• Distance dest next dist

24
Shortest Path to SJ
Focus on how nodes find their shortest
path to a given destination node, i.e. SJ San
Jose

Dj
Cij
j
i
Di If Di is the shortest distance to SJ from i
and if j is a neighbor on the shortest path,
then Di = Cij + Dj 25
But we don’t know the shortest paths
i only has local info
from neighbors San
Dj' Jose
j'
Cij'
Dj
Cij j
i
Cij” Pick current
Di j"
Dj" shortest path
26
Why Distance Vector Works
SJ sends
accurate info

San
2 Hops
1 Hop
From SJ
Jose
3 Hops From SJ
From SJ

Hop-1 nodes
calculate current
(next hop, dist), &
Accurate info about SJ send to neighbors
ripples across network, 27
Shortest Path Converges
Bellman-Ford Algorithm
⚫ Consider computations for one destination d
⚫ Initialization
⚫ Each node table has 1 row for destination d
⚫ Distance of node d to itself is zero: Dd=0
⚫ Distance of other node j to d is infinite: Dj=, for j d
⚫ Next hop node nj = -1 to indicate not yet defined for j  d
⚫ Send Step
⚫ Send new distance vector to immediate neighbors across local link
⚫ Receive Step
⚫ At node j, find the next hop that gives the minimum distance to d,

⚫ Minj { Cij + Dj }
⚫ Replace old (nj, Dj(d)) by new (nj*, Dj*(d)) if new next node or distance
⚫ Go to send step

28
Bellman-Ford Algorithm
⚫ Now consider parallel computations for all destinations d
⚫ Initialization
⚫ Each node has 1 row for each destination d
⚫ Distance of node d to itself is zero: Dd(d)=0
⚫ Distance of other node j to d is infinite: Dj(d)=  , for j  d
⚫ Next node nj = -1 since not yet defined
⚫ Send Step
⚫ Send new distance vector to immediate neighbors across local link
⚫ Receive Step
⚫ For each destination d, find the next hop that gives the minimum
distance to d,
⚫ Minj { Cij+ Dj(d) }
⚫ Replace old (nj, Di(d)) by new (nj*, Dj*(d)) if new next node or distance
found
⚫ Go to send step
29
Iteration Node 1 Node 2 Node 3 Node 4 Node 5

Initial (-1, ) (-1, ) (-1, ) (-1, ) (-1, )


1
2
3

Table entry Table entry


@ node 1 @ node 3
for dest SJ for dest SJ
2 3
1 1 San
5 2

4
Jose
3 1 3 6

2
2 5
4
30
Iteration Node 1 Node 2 Node 3 Node 4 Node 5

Initial (-1, ) (-1, ) (-1, ) (-1, ) (-1, )


1 (-1, ) (-1, ) (6,1) (-1, ) (6,2)
2
3

D3=D6+1
n3=6
D6=0
2 3 1
1 1
5 2
0
4 San
3 6
1 3
Jose
2 5 2
4
2
D5=D6+2 D6=0
n5=6 31
Iteration Node 1 Node 2 Node 3 Node 4 Node 5

Initial (-1, ) (-1, ) (-1, ) (-1, ) (-1, )


1 (-1, ) (-1, ) (6, 1) (-1, ) (6,2)
2 (3,3) (5,6) (6, 1) (3,3) (6,2)
3

3 1
2 3
1 1
5 2
3 0
4 San
3 6
1 3
Jose
2 2
5
4
6 2
32
Iteration Node 1 Node 2 Node 3 Node 4 Node 5

Initial (-1, ) (-1, ) (-1, ) (-1, ) (-1, )


1 (-1, ) (-1, ) (6, 1) (-1, ) (6,2)
2 (3,3) (5,6) (6, 1) (3,3) (6,2)
3 (3,3) (4,4) (6, 1) (3,3) (6,2)

1
3 2 3
1 1
5 2
3 0
4 San
3 6
1 3
Jose
2
2 5
4
6 4 2
33
Iteration Node 1 Node 2 Node 3 Node 4 Node 5

Initial (3,3) (4,4) (6, 1) (3,3) (6,2)


1 (3,3) (4,4) (4, 5) (3,3) (6,2)
2
3

1 5
3 2
3
1 1
5 2
3 0
4 San
3 6
1 3
Jose
2
2 5
4 4
2
Network disconnected; Loop created between nodes 3 and 4 34
Iteration Node 1 Node 2 Node 3 Node 4 Node 5

Initial (3,3) (4,4) (6, 1) (3,3) (6,2)


1 (3,3) (4,4) (4, 5) (3,3) (6,2)
2 (3,7) (4,4) (4, 5) (5,5) (6,2)
3

5
37 2
3
1 1
5 53 2
0
4 San
3 6
1 3
Jose
2
2 5
4
4 2
35
Node 4 could have chosen 2 as next node because of tie
Iteration Node 1 Node 2 Node 3 Node 4 Node 5

Initial (3,3) (4,4) (6, 1) (3,3) (6,2)


1 (3,3) (4,4) (4, 5) (3,3) (6,2)
2 (3,7) (4,4) (4, 5) (5,5) (6,2)
3 (3,7) (4,6) (4, 7) (5,5) (6,2)

5 7
7 2 3
1 1
5 2
5 0
4 San
3 6
1 3
Jose
2 5 2
4
46 2

Node 2 could have chosen 5 as next node because of tie 36


Iteration Node 1 Node 2 Node 3 Node 4 Node 5

1 (3,3) (4,4) (4, 5) (3,3) (6,2)


2 (3,7) (4,4) (4, 5) (2,5) (6,2)
3 (3,7) (4,6) (4, 7) (5,5) (6,2)
4 (2,9) (4,6) (4, 7) (5,5) (6,2)

79 2 7
3
1 1
5 2
5 0
4 San
3 6
1 3
Jose
2
2 5
4
6 2

Node 1 could have chose 3 as next node because of tie 37


Counting to Infinity Problem
(a) 1 2 3 4
1 1 1 Nodes believe best
path is through each
(b) 1 2 3 X 4 other
1 1
(Destination is node 4)
Update Node 1 Node 2 Node 3

Before break (2,3) (3,2) (4, 1)


After break (2,3) (3,2) (2,3)
1 (2,3) (3,4) (2,3)
2 (2,5) (3,4) (2,5)
3 (2,5) (3,6) (2,5)
4 (2,7) (3,6) (2,7)
5 (2,7) (3,8) (2,7)
… … … … 38
Problem: Bad News Travels
Slowly
Remedies
⚫ Split Horizon
⚫ Do not report route to a destination to the
neighbor from which route was learned
⚫ Poisoned Reverse
⚫ Report route to a destination to the neighbor
from which route was learned, but with infinite
distance
⚫ Breaks erroneous direct loops immediately
⚫ Does not work on some indirect loops
39
Split Horizon with Poison Reverse
(a) 1 2 3 4
1 1 1 Nodes believe best
path is through
(b) 1 2 3 X 4 each other
1 1

Update Node 1 Node 2 Node 3


Before break (2, 3) (3, 2) (4, 1)
After break (2, 3) (3, 2) (-1, ) Node 2 advertizes its route to 4 to
node 3 as having distance infinity;
node 3 finds there is no route to 4

1 (2, 3) (-1, ) (-1, ) Node 1 advertizes its route to 4 to


node 2 as having distance infinity;
node 2 finds there is no route to 4

2 (-1, ) (-1, ) (-1, ) Node 1 finds there is no route to 4

40
6.3.2. Link-State Algorithm
⚫ Basic idea: two step procedure
⚫ Each source node gets a map of all nodes and link metrics (link state) of the
entire network
⚫ Find the shortest path on the map from the source node to all destination nodes
⚫ Broadcast of link-state information
⚫ Every node i in the network broadcasts to every other node in the network:
⚫ ID’s of its neighbors: Ni=set of neighbors of i
⚫ Distances to its neighbors: {Cij | j Ni}
⚫ Flooding is a popular method of broadcasting packets

41
Dijkstra Algorithm: Finding shortest paths in order

Find shortest paths from Closest node to s is 1 hop away


source s to all other
destinations 2nd closest node to s is 1 hop
away from s or w”
3rd closest node to s is 1 hop
w' away from s, w”, or x

z
w
x
s z'
w"
x' 42
Dijkstra’s algorithm
⚫ N: set of nodes for which shortest path already found
⚫ Initialization: (Start with source node s)
⚫ N = {s}, Ds = 0, “s is distance zero from itself”
⚫ Dj=Csj for all j  s, distances of directly-connected neighbors
⚫ Step A: (Find next closest node i)
⚫ Find i  N such that
⚫ Di = min Dj for j  N
⚫ Add i to N
⚫ If N contains all the nodes, stop
⚫ Step B: (update minimum costs)
⚫ For each node j  N
Minimum distance from s to
⚫ Dj = min (Dj, Di+Cij)
j through node i in N 43

⚫ Go to Step A
Execution of Dijkstra’s algorithm
2 2 ✓
1 3 1 1 3 1
6 6 ✓
5 2 5 2
3 3
1 4 1 4✓ 2
2
3 3
2 2
✓ 4 5 4 5

Iteration N D2 D3 D4 D5 D6
Initial {1} 3 2✓ 5  
1 {1,3} 3✓ 2 4  3
2 {1,2,3} 3 2 4 7 3 ✓
3 {1,2,3,6} 3 2 4 ✓ 5 3
4 {1,2,3,4,6} 3 2 4 5 ✓ 3
5 {1,2,3,4,5,6} 3 2 4 5 3
44
Shortest Paths in Dijkstra’s Algorithm
2 3 1 2 3 1
1 1
6 6
5 2 5 2
3 3
1 4 2 1 4 2
3 3
2 2
4 5 4 5
2 3 1 2 3 1
1 1
6 6
5 2 5 2
3 3
1 4 2 1 4 2
3 3
2 2
4 5 4 5

2 3 1 2 3 1
1 1
6 6
5 2 5 2
3 3
1 4 2 1 4 2
3 3
2 2 45

4 5 4 5
Reaction to Failure
⚫ If a link fails,
⚫ Router sets link distance to infinity & floods the network with an update
packet
⚫ All routers immediately update their link database & recalculate their
shortest paths
⚫ Recovery very quick
⚫ But watch out for old update messages
⚫ Add time stamp or sequence # to each update message
⚫ Check whether each received update message is new
⚫ If new, add it to database and broadcast
⚫ If older, send update message on arriving link

46
Why is Link State Better?
⚫ Fast, loopless convergence
⚫ Support for precise metrics, and multiple metrics if necessary
(throughput, delay, cost, reliability)
⚫ Support for multiple paths to a destination
⚫ algorithm can be modified to find best two paths

47
Specialized Routing
⚫ Flooding
⚫ Useful in starting up network
⚫ Useful in propagating information to all nodes

⚫ Deflection Routing
⚫ Fixed, preset routing procedure
⚫ No route synthesis
Flooding
Send a packet to all nodes in a network
⚫ No routing tables available

⚫ Need to broadcast packet to all nodes (e.g. to


propagate link state information)

Approach
⚫ Send packet on all ports except one where it
arrived
⚫ Exponential growth in packet transmissions
1 3
6

2
5

Flooding is initiated from Node 1: Hop 1 transmissions


1 3
6

2
5

1 3
6

2
5

Flooding is initiated from Node 1: Hop 2 transmissions


1 3 1 3
6 6

4 4

2 2
5 5

1 3
6

2
5

Flooding is initiated from Node 1: Hop 3 transmissions


Limited Flooding
⚫ Time-to-Live field in each packet limits number of hops to
certain diameter
⚫ Each switch adds its ID before flooding; discards repeats
⚫ Source puts sequence number in each packet; switches
records source address and sequence number and discards
repeats
Deflection Routing
⚫ Network nodes forward packets to preferred port
⚫ If preferred port busy, deflect packet to another port
⚫ Works well with regular topologies
⚫ Manhattan street network
⚫ Rectangular array of nodes
⚫ Nodes designated (i,j)
⚫ Rows alternate as one-way streets
⚫ Columns alternate as one-way avenues
⚫ Bufferless operation is possible
⚫ Proposed for optical packet networks
⚫ All-optical buffering currently not viable
0,0 0,1 0,2 0,3

1,0 1,1 1,2 1,3


Tunnel from
last column to
first column or
2,0 2,1 2,2 2,3 vice versa

3,0 3,1 3,2 3,3


Example: Node (0,2)→(1,0)
busy

0,0 0,1 0,2 0,3

1,0 1,1 1,2 1,3

2,0 2,1 2,2 2,3

3,0 3,1 3,2 3,3


Source Routing
⚫ Source host selects path that is to be followed by a packet
⚫ Strict: sequence of nodes in path inserted into header
⚫ Loose: subsequence of nodes in path specified
⚫ Intermediate switches read next-hop address and remove address
⚫ Source host needs link state information or access to a route server
⚫ Source routing allows the host to control the paths that its information
traverses in the network
⚫ Potentially the means for customers to select what service providers
they use
Chapter 7
Packet-Switching Networks
Traffic Management
Packet Level
Flow Level
Flow-Aggregate Level

www.Bookspar.com | Website for Students | VTU - Notes -


Question Papers
Traffic Management
Vehicular traffic management Packet traffic management
⚫ Traffic lights & signals control flow of ⚫ Multiplexing & access mechanisms to
traffic in city street system control flow of packet traffic
⚫ Objective is to maximize flow with ⚫ Objective is make efficient use of
tolerable delays network resources & deliver QoS
⚫ Priority Services ⚫ Priority
⚫ Police sirens ⚫ Fault-recovery packets
⚫ Cavalcade for dignitaries ⚫ Real-time traffic
⚫ Bus & High-usage lanes ⚫ Enterprise (high-revenue) traffic
⚫ Trucks allowed only at night ⚫ High bandwidth traffic
Time Scales & Granularities
⚫ Packet Level
⚫ Queueing & scheduling at multiplexing points
⚫ Determines relative performance offered to packets over a short time scale
(microseconds)
⚫ Flow Level
⚫ Management of traffic flows & resource allocation to ensure delivery of QoS
(milliseconds to seconds)
⚫ Matching traffic flows to resources available; congestion control
⚫ Flow-Aggregate Level
⚫ Routing of aggregate traffic flows across the network for efficient utilization of
resources and meeting of service levels
⚫ “Traffic Engineering”, at scale of minutes to days
End-to-End QoS

Packet buffer


1 2 N–1 N

⚫ A packet traversing network encounters delay and


possible loss at various multiplexing points
⚫ End-to-end performance is accumulation of per-hop
performances
Scheduling & QoS
⚫ End-to-End QoS & Resource Control
⚫ Buffer & bandwidth control → Performance

⚫ Admission control to regulate traffic level

⚫ Scheduling Concepts
⚫ fairness/isolation

⚫ priority, aggregation,

⚫ Fair Queueing & Variations


⚫ Weighted fair queuing (WFQ), Packet by Packet generalized
processor sharing policy (PGPS)
⚫ Guaranteed Service
⚫ WFQ, Rate-control

⚫ Packet Dropping
⚫ aggregation, drop priorities
FIFO Queueing
Packet buffer
Arriving
packets
Transmission
Packet discard
link
when full

⚫ All packet flows share the same buffer


⚫ Transmission Discipline: First-In, First-Out
⚫ Buffering Discipline: Discard arriving packets if buffer is full
(Alternative: random discard; pushout head-of-line, i.e. oldest, packet)
FIFO Queueing
⚫ Cannot provide differential QoS to different packet flows
⚫ Different packet flows interact strongly

⚫ Statistical delay guarantees via load control


⚫ Restrict number of flows allowed (connection admission control)

⚫ Difficult to determine performance delivered

⚫ Finite buffer determines a maximum possible delay


⚫ Buffer size determines loss probability
⚫ But depends on arrival & packet length statistics

⚫ Variation: packet enqueueing based on queue thresholds


⚫ some packet flows encounter blocking before others

⚫ higher loss, lower delay


FIFO Queueing with Discard Priority
(a)
Packet buffer
Arriving
packets
Transmission
Packet discard link
when full

(b)
Packet buffer
Arriving
packets
Transmission
link
Class 1 Class 2 discard
discard when threshold
when full exceeded
Head Of Line (HOL)
Priority Queueing
Packet discard
when full
Transmission
High-priority
link
packets

Low-priority When
packets high-priority
Packet discard queue empty
when full
⚫ High priority queue serviced until empty
⚫ High priority queue has lower waiting time
⚫ Buffers can be dimensioned for different loss probabilities
⚫ Surge in high priority queue can cause low priority queue to
saturate
HOL Priority Features

⚫ Provides differential QoS


⚫ Pre-emptive priority: lower classes invisible
⚫ Non-preemptive priority: lower classes impact higher
classes through residual service times
⚫ High-priority classes can hog all of the bandwidth &
starve lower priority classes
⚫ Need to provide some isolation between classes
Earliest Due Date Scheduling
Sorted packet buffer
Arriving
Tagging
packets
unit
Transmission
Packet discard link
when full

⚫ Queue in order of “due date”


⚫ packets requiring low delay get earlier due date
⚫ packets without delay get indefinite or very long due dates
Fair Queueing / Generalized Processor
Sharing
Packet flow 1
Approximated bit-level
round robin service
Packet flow 2
C bits/second


… Transmission
Packet flow n link

⚫ Each flow has its own logical queue: prevents hogging; allows
differential loss probabilities
⚫ C bits/sec allocated equally among non-empty queues
⚫ transmission rate = C / n(t), where n(t)=# non-empty queues
⚫ Idealized system assumes fluid flow from queues
⚫ Implementation requires approximation: simulate fluid system;
sort packets according to completion time in ideal system
Buffer 1 Fluid-flow system:
at t=0 both packets served
at rate 1/2
Buffer 2 1
at t=0 Both packets
complete service
at t = 2
t
0 1 2

Packet from
Packet-by-packet system:
buffer 2 waiting
buffer 1 served first at rate 1;
then buffer 2 served at rate 1.
1
Packet from buffer 2
being served
Packet from t
buffer 1 being 0 1 2
served
2 Fluid-flow system:
Buffer 1
at t=0 both packets served
at rate 1/2
Buffer 2 1
at t=0 Packet from buffer 2
served at rate 1
t
0 2 3

Packet from Packet-by-packet


buffer 2 fair queueing:
waiting buffer 2 served at rate 1
1
Packet from
buffer 1
served at t
0 1 2 3
rate 1
Buffer 1 Fluid-flow system:
at t=0 packet from buffer 1
served at rate 1/4;
Buffer 2
at t=0 1
Packet from buffer 1
served at rate 1
Packet from buffer 2
t
served at rate 3/4 0 2
1

Packet from Packet-by-packet weighted fair queueing:


buffer 1 waiting buffer 2 served first at rate 1;
then buffer 1 served at rate 1
1
Packet from buffer 1 served at rate 1

Packet from t
buffer 2 0 1 2
served at rate 1
Packetized GPS/WFQ

Sorted packet buffer


Arriving
Tagging
packets
unit
Transmission
Packet discard link
when full

⚫ Compute packet completion time in ideal system


⚫ add tag to packet
⚫ sort packet in queue according to tag
⚫ serve according to HOL
Bit-by-Bit Fair Queueing
⚫ Assume n flows, n queues
⚫ 1 round = 1 cycle serving all n queues
⚫ If each queue gets 1 bit per cycle, then 1 round = # active queues
⚫ Round number = number of cycles of service that have been
completed
rounds Current Round #

⚫ If packet arrives to idle queue:


Finishing time = round number + packet size in bits
⚫ If packet arrives to active queue:

Finishing time = finishing time of last packet in queue + packet size


Number of rounds = Number of bit transmission opportunities

Rounds

Buffer 1
Buffer 2


Buffer n

Packet of length
Packet completes k bits begins
transmission transmission
k rounds later at this time

Differential Service:
If a traffic flow is to receive twice as much bandwidth as a
regular flow, then its packet completion time would be half
Computing the Finishing Time
⚫ F(i,k,t) = finish time of kth packet that arrives at time t to flow i
⚫ P(i,k,t) = size of kth packet that arrives at time t to flow i
⚫ R(t) = round number at time t
Generalize so R(t) continuous, not discrete
rounds
R(t) grows at rate inversely
proportional to n(t)

⚫ Fair Queueing:(take care of both idle and active cases)


F(i,k,t) = max{F(i,k-1,t), R(t)} + P(i,k,t)
⚫ Weighted Fair Queueing:
F(i,k,t) = max{F(i,k-1,t), R(t)} + P(i,k,t)/wi
WFQ and Packet QoS
⚫ WFQ and its many variations form the basis for providing
QoS in packet networks
⚫ Very high-speed implementations available, up to 10 Gbps
and possibly higher
⚫ WFQ must be combined with other mechanisms to provide
end-to-end QoS
Buffer Management
⚫ Packet drop strategy: Which packet to drop when buffers full
⚫ Fairness: protect behaving sources from misbehaving sources
⚫ Aggregation:
⚫ Per-flow buffers protect flows from misbehaving flows
⚫ Full aggregation provides no protection
⚫ Aggregation into classes provided intermediate protection
⚫ Drop priorities:
⚫ Drop packets from buffer according to priorities
⚫ Maximizes network utilization & application QoS
⚫ Examples: layered video, policing at network edge
⚫ Controlling sources at the edge
Early or Overloaded Drop

Random early detection:


⚫ drop pkts if short-term avg of queue exceeds threshold

⚫ pkt drop probability increases linearly with queue length

⚫ mark offending pkts

⚫ improves performance of cooperating TCP sources

⚫ increases loss probability of misbehaving sources


Random Early Detection (RED)
⚫ Packets produced by TCP will reduce input rate in response
to network congestion
⚫ Early drop: discard packets before buffers are full
⚫ Random drop causes some sources to reduce rate before
others, causing gradual reduction in aggregate input rate

Algorithm:
⚫ Maintain running average of queue length
⚫ If Qavg < minthreshold, do nothing
⚫ If Qavg > maxthreshold, drop packet
⚫ If in between, drop packet according to probability
⚫ Flows that send more packets are more likely to have
packets dropped
Packet Drop Profile in RED

Probability of packet drop


1

0
minth maxth full

Average queue length


Chapter 7
Packet-Switching Networks
Traffic Management at the Flow
Level
Congestion occurs when a surge of traffic overloads network
resources Congestion

3 6

1
4
8

2
7
5

Approaches to Congestion Control:


• Preventive Approaches: Scheduling & Reservations
• Reactive Approaches: Detect & Throttle/Discard
Ideal effect of congestion control:
Resources used efficiently up to capacity available

Throughput
Controlled

Uncontrolled

Offered load
Open-Loop Control
⚫ Network performance is guaranteed to all traffic flows that
have been admitted into the network
⚫ Initially for connection-oriented networks
⚫ Key Mechanisms
⚫ Admission Control
⚫ Policing
⚫ Traffic Shaping
⚫ Traffic Scheduling
Admission Control
⚫ Flows negotiate contract with network
⚫ Specify requirements:
Peak rate Traffic descriptor
⚫ Peak, Avg., Min Bit rate
Bits/second

⚫ Maximum burst size


Average rate
⚫ Delay, Loss requirement
⚫ Network computes resources needed
⚫ “Effective” bandwidth
⚫ If flow accepted, network allocates
resources to ensure QoS delivered as
Time long as source conforms to contract
Typical bit rate demanded by
a variable bit rate information
source
Policing
⚫ Network monitors traffic flows continuously to ensure they meet their
traffic contract
⚫ When a packet violates the contract, network can discard or tag the
packet giving it lower priority
⚫ If congestion occurs, tagged packets are discarded first
⚫ Leaky Bucket Algorithm is the most commonly used policing
mechanism
⚫ Bucket has specified leak rate for average contracted rate
⚫ Bucket has specified depth to accommodate variations in arrival rate
⚫ Arriving packet is conforming if it does not result in overflow
Leaky Bucket algorithm can be used to police arrival rate of
a packet stream

water poured
irregularly Leak rate corresponds to
long-term rate

leaky bucket Bucket depth corresponds to


maximum allowable burst
arrival

1 packet per unit time


water drains at
Assume constant-length
a constant rate
packet as in ATM

Let X = bucket content at last conforming packet arrival


Let ta – last conforming packet arrival time
Leaky Bucket Algorithm
Arrival of a packet at time ta

Depletion rate:
X’ = X - (ta - LCT) 1 packet per unit time

Interarrival time L+I = Bucket Depth


Current bucket
content Yes I = increment per arrival,
X’ < 0?
nominal interarrival time

Non-empty No X’ = 0

Nonconforming Yes empty


X’ > L?
packet

arriving packet
No
would cause
overflow X = X’ + I X = value of the leaky bucket counter
LCT = ta X’ = auxiliary variable
conforming packet LCT = last conformance time

conforming packet
Leaky Bucket Example
I=4 L=6 Nonconforming
Packet
arrival

Time

L+I

Bucket
content

* * * * * * * * * Time

Non-conforming packets not allowed into bucket & hence not


included in calculations
Policing Parameters
T = 1 / peak rate
MBS = maximum burst size
I = nominal interarrival time
sustainable rate =1/I
(Long term average rate allowed for the confirming traffic)

 L 
MBS = 1 +  
 I −T 
MBS

Time
T L I
Dual Leaky Bucket
Dual leaky bucket to police PCR, SCR, and MBS:

Incoming Tagged or
Leaky bucket 1
traffic dropped
SCR and MBS

Untagged traffic

Leaky bucket 2 Tagged or


PCR and CDVT dropped

PCR = peak cell rate


CDVT = cell delay variation tolerance
SCR = sustainable cell rate
Untagged traffic MBS = maximum burst size
Traffic Shaping
Traffic shaping Policing Traffic shaping Policing

1 2 3 4

Network A Network C
Network B
Egress node Ingress node

⚫ Networks police the incoming traffic flow


⚫ Traffic shaping is used to ensure that a packet
stream conforms to specific parameters
⚫ Networks can shape their traffic prior to passing it to
another network
Leaky Bucket Traffic Shaper
Size N
Incoming traffic Shaped traffic
Server

Packet

⚫ Buffer incoming packets


⚫ Play out periodically to conform to parameters
⚫ Surges in arrivals are buffered & smoothed out
⚫ Possible packet loss due to buffer overflow
⚫ Too restrictive, since conforming traffic does not
need to be completely smooth
Token Bucket Traffic Shaper
Tokens arrive
periodically

An incoming packet must


have sufficient tokens
before admission into the
network Size K
Token

Size N
Incoming traffic Shaped traffic
Server

Packet
⚫ Token rate regulates transfer of packets
⚫ If sufficient tokens available, packets enter network without delay
⚫ K determines how much burstiness allowed into the network
Token Bucket Shaping Effect
The token bucket constrains the traffic from a source to
be limited to b + r t bits in an interval of length t

b = the bucket size r = token rate t = given time period

b+rt
b bytes instantly

r bytes/second

t
Packet transfer with Delay Guarantees
A(t) = b+rt Bit rate > R > r
(a) e.g., using WFQ No backlog
Token Shaper of packets
R(t)

1 2

Buffer Buffer
(b) occupancy Empty
occupancy
at 1 at 2
t t
0 b b
R R-r

⚫ Assume fluid flow for information


⚫ Token bucket allows burst of b bytes 1 & then r bytes/second
⚫ Since R>r, buffer content @ 1 never greater than b byte
⚫ Thus delay @ mux < b/R
⚫ Rate into second mux is r<R, so bytes are never delayed
Delay Bounds with WFQ / PGPS
⚫ Assume
⚫ traffic shaped to parameters b & r
⚫ schedulers give flow at least rate R>r
⚫ H hop path
⚫ m is maximum packet size for the given flow
⚫ M maximum packet size in the network
⚫ Rj transmission rate in jth hop
⚫ Maximum end-to-end delay that can be experienced
by a packet from flow i is:
b ( H − 1)m H M
D + +
R R j =1 R j
Scheduling for Guaranteed Service
⚫ Suppose guaranteed bounds on end-to-end delay across the
network are to be provided
⚫ A call admission control procedure is required to allocate
resources & set schedulers
⚫ Traffic flows from sources must be shaped/regulated so that
they do not exceed their allocated resources
⚫ Strict delay bounds can be met
Current View of Router Function
Routing Reservation Mgmt.
Agent Agent Agent

Admission
Control

[Routing database] [Traffic control database]

Classifier Pkt. scheduler


Input
Internet
driver
forwarder Output driver
What is congestion ?
⚫ What is congestion ?
◆ The aggregate demand for bandwidth exceeds the available capacity of a
link.

⚫ What will be occur ?


◆ Performance Degradation
• Multiple packet losses
• Low link utilization (low Throughput)
• High queueing delay
• Congestion collapse

101
What is congestion ? - 2

Congestion Control

Open-loop control Closed-loop control


• Mainly used in circuit • Mainly used in packet switched network
switched network (GMPLS) • Use feedback information: global & local

Implicit feedback control Explicit feedback control


• End-to-end congestion control • Network-assisted congestion control
• Examples: • Examples:
TCP Tahoe, TCP Reno, TCP Vegas, etc. IBM SNA, DECbit, ATM ABR, ICMP source
quench, RED, ECN

102
Closed-Loop Flow Control
⚫ Congestion control
⚫ feedback information to regulate flow from sources into network
⚫ Based on buffer content, link utilization, etc.
⚫ Examples: TCP at transport layer; congestion control at ATM level
⚫ End-to-end vs. Hop-by-hop
⚫ Delay in effecting control
⚫ Implicit vs. Explicit Feedback
⚫ Source deduces congestion from observed behavior
⚫ Routers/switches generate messages alerting to congestion
End-to-End vs. Hop-by-Hop Congestion
Control
Source Packet flow Destination

(a)

Source Destination

(b)

Feedback information
Implicit vs. Explicit feedback
⚫ Implicit feedback Congestion Control

◆ Network drops packets when congestion occur


◆ Source infers congestion implicitly
• time-out, duplicated ACKs, etc.
◆ Example: end-to-end TCP congestion Control
◆ Simple to implement but inaccurate
• implemented only at transport layer (e.g., TCP)

105
Implicit vs. Explicit feedback - 2
⚫ Explicit feedback Congestion Control
◆ Network component (e.g., router) provides congestion indication explicitly
to sources
• use packet marking, or RM cells (in ATM ABR control)
◆ Examples: DECbit, ECN, ATM ABR CC, etc.
◆ Provide more accurate information to sources
◆ But is more complicate to implement
• Need to change both source and network algorithm
• Need cooperation between sources and network component

106
Traffic Engineering
Traffic management at flow aggregate level

⚫ Management exerted at flow aggregate level


⚫ Distribution of flows in network to achieve efficient utilization of
resources (bandwidth)
⚫ Shortest path algorithm to route a given flow not enough
⚫ Does not take into account requirements of a flow, e.g. bandwidth requirement
⚫ Does not take account interplay between different flows
⚫ Must take into account aggregate demand from all flows
Constrained Shortest path routing

3 6 3 6

1 1
4 7 4 7

2 2
8 8
5 5

(a) (b)

Shortest path routing Better flow allocation


congests link 4 to 8 distributes flows
more uniformly

You might also like