Transcript Document

CSC 581
Communication Networks II
Chapter 7c: Congestion Control
Dr. Cheer-Sun Yang
What Is Congestion?
• Congestion occurs when the number of packets
being transmitted through the network approaches
the packet handling capacity of the network
• Congestion control aims to keep number of
packets below level at which performance falls off
dramatically
• Data network is a network of queues
• Generally 80% utilization is critical
• Finite queues mean data may be lost
2
Queues at a Node
3
Effects of Congestion
•
•
•
•
Packets arriving are stored at input buffers
Routing decision made
Packet moves to output buffer
Packets queued for output transmitted as fast as
possible
– Statistical time division multiplexing
• If packets arrive to fast to be routed, or to be
output, buffers will fill
• Can discard packets
• Can use flow control
– Can propagate congestion through network
4
Interaction of Queues
5
Ideal
Performance
6
Practical Performance
• Ideal assumes infinite buffers and no
overhead
• Buffers are finite
• Overheads occur in exchanging congestion
control messages
7
Effects of
Congestion No Control
8
Mechanisms for
Congestion Control
9
Congestion Control Techniques
• Packet elimination (implicit congestion
signaling)
• Flow control: using backpressure to regulate
the flow.
• Buffer allocation: used with virtual circuit
(connection-oriented) networks. Buffer size
is considered a credit-based technique.
• Choke packets
10
Implicit Congestion Signaling
• Transmission delay may increase with congestion
• Packet may be discarded
• Source can detect these as implicit indications of
congestion
• Useful on connectionless (datagram) networks
– e.g. IP based
• (TCP includes congestion and flow control - see chapter 17)
• Used in frame relay LAPF
11
Flow Control:Backpressure
• If node becomes congested it can slow down or
halt flow of packets from other nodes
• May mean that other nodes have to apply control
on incoming packet rates
• Propagates back to source
• Can restrict to logical connections generating most
traffic
• Used in connection oriented that allow hop by hop
congestion control (e.g. X.25)
• Not used in ATM nor frame relay
• Only recently developed for IP
12
Explicit Congestion Signaling
• Network alerts end systems of increasing
congestion
• End systems take steps to reduce offered load
• Backwards
– Congestion avoidance in opposite direction to packet
required
• Forwards
– Congestion avoidance in same direction as packet
required
13
Categories of Explicit Signaling
• Binary
– A bit set in a packet indicates congestion
• Credit based: such as a buffer size
– Indicates how many packets source may send
– Common for end to end flow control
• Rate based
– Supply explicit data rate limit
– e.g. ATM
14
Choke Packet
• Control packet
– Generated at congested node
– Sent to source node
– e.g. ICMP source quench
• From router or destination
• Source cuts back until no more source quench
message
• Sent for every discarded packet, or anticipated
• Rather crude mechanism
15
Two kinds of deadlocks
• Store-and-forward deadlock
• Reassembly deadlock
16
B’s buffers containing
Packets destined for
C are full
A’s buffers containing
Packets destined for
B are full
B
A
C
C’s buffers containing
Packets destined for
A are full
17
18
19
Public Data Networks: The X
series protocols
•
•
•
•
X.25
X.3
X.28
X.29
20
Packet-Switched Network Modes
• Virtual circuits
• Datagram
21
22
23
24
25
Example of Packet Switching
Protocol: X.25
• 1976
• Interface between host and packet switched
network
• Almost universal on packet switched networks and
packet switching in ISDN
• Defines three layers
– Physical
– Link
– Packet
26
27
X.21 – Physical Layer
•
•
•
•
•
•
Interface between attached station and link to node
Data terminal equipment DTE (user equipment)
Data circuit terminating equipment DCE (node)
Uses physical layer specification X.21
Reliable transfer across physical link
Sequence of frames
28
LAPB – Data Link Layer
• Link Access Protocol Balanced (LAPB)
– Subset of HDLC
– see chapter 5
29
X.25 Network Layer
• A PDU is called a packet.
• External virtual circuits
• Logical connections (virtual circuits)
between subscribers
30
31
X.25 Use of Virtual Circuits
32
Virtual Circuit Service
• Virtual Call
– Dynamically established
• Permanent virtual circuit
– Fixed network assigned virtual circuit
33
Packet Format
34
35
X.25 Packet Types
• Refer to Table 7.8
36
37
Virtual
Call
38
Congestion
3
6
1
4
8
2
5
7
Copyright 2000 McGraw-Hill LeonGarcia and Widjaja Communication
39
Figure 7.50
Throughput
Controlled
Uncontrolled
Offered load
Copyright 2000 McGraw-Hill LeonGarcia and Widjaja Communication
40
Figure 7.51
Bits per second
Peak rate
Average rate
Time
Copyright 2000 McGraw-Hill LeonGarcia and Widjaja Communication
41
Figure 7.52
Water poured
irregularly
Leaky bucket
Water drains at
a constant rate
Copyright 2000 McGraw-Hill LeonGarcia and Widjaja Communication
42
Figure 7.53
Arrival of a packet at time ta
X’ = X - (ta - LCT)
X’ < 0?
No
Nonconforming
packet
Yes
Yes
X’ = 0
X’ > L?
No
X = X’ + I
LCT = ta
conforming packet
X = value of the leaky bucket counter
X’ = auxiliary variable
LCT = last conformance time
Copyright 2000 McGraw-Hill LeonGarcia and Widjaja Communication
43
Figure 7.54
Nonconforming
Packet
arrival
Time
L+I
Bucket
content
I
* *
*
*
*
** *
Copyright 2000 McGraw-Hill LeonGarcia and Widjaja Communication
*
Time
44
Figure 7.55
MBS
T
L
I
Copyright 2000 McGraw-Hill LeonGarcia and Widjaja Communication
Time
45
Figure 7.56
Incoming
traffic
Leaky bucket 1
PCR and CDVT
Tagged or
dropped
Untagged
traffic
Leaky bucket 2
SCR and MBS
Tagged or
dropped
Untagged traffic
Copyright 2000 McGraw-Hill LeonGarcia and Widjaja Communication
46
Figure 7.57
10 Kbps
(a)
0
1
2
3
Time
1
2
3
Time
1
2
3
Time
50 Kbps
(b)
0
100 Kbps
(c)
0
Copyright 2000 McGraw-Hill LeonGarcia and Widjaja Communication
47
Figure 7.58
Incoming
traffic
Shaped
traffic
Size N
Server
Packet
Copyright 2000 McGraw-Hill LeonGarcia and Widjaja Communication
48
Figure 7.59
Tokens arrive
periodically
Size K
Token
Incoming
traffic
Shaped
traffic
Size N
Server
Packet
Copyright 2000 McGraw-Hill LeonGarcia and Widjaja Communication
49
Figure 7.60
b bytes
instantly
r bytes per
second
t
Copyright 2000 McGraw-Hill LeonGarcia and Widjaja Communication
50
Figure 7.61
(a)
A(t) = b+rt
No backlog
of packets
R(t)
(b)
R(t)
b
R-r
Buffer
occupancy
@1
0
b
R
empty
t
Copyright 2000 McGraw-Hill LeonGarcia and Widjaja Communication
t
51
Figure 7.62
20
Congestion occurs
Congestion
avoidance
15
Congestion
window
Threshold
10
5
Slow
start
0
Round-trip times
Copyright 2000 McGraw-Hill LeonGarcia and Widjaja Communication
52
Figure 7.63
ABR
Total
bandwidth
VBR
CBR
Time
Copyright 2000 McGraw-Hill LeonGarcia and Widjaja Communication
53
Figure 7.64
Forward
RM cell
Data cell
S
D
Backward
RM cell
Switch
S = source
D = destination
Copyright 2000 McGraw-Hill LeonGarcia and Widjaja Communication
54
Figure 7.65
Data cell
EFCI=0
RM cell
CI=0
Data cell
EFCI=1
S
D
Congested
switch
RM cell
CI=1
Copyright 2000 McGraw-Hill LeonGarcia and Widjaja Communication
55
Figure 7.66
ER = 10 Mbps
ER = 5 Mbps
ER = 1 Mbps
S
D
ER = 1 Mbps
Can only
support 5 Mbps
Can only
support 1 Mbps
Copyright 2000 McGraw-Hill LeonGarcia and Widjaja Communication
56
Figure 7.67
Suggested Reading
• Chapter 7.8
57