Transcript
8/13/2019 Arquitectura de Redes QoS 14
1/15
07/01/20
Congestion Avoidance
Introducing Congestion Avoidance
Introducing RED
Configuring Class-Based Weighted RED Configuring Explicit Congestion Notification
Introducing Congestion Avoidance
Behavior of a TCP Sender
Sender sends N bytes (as much as credit
allows) Start credit (window size) is small
To avoid overloading network queues
Increases credit exponentially
To gauge network capability
8/13/2019 Arquitectura de Redes QoS 14
2/15
07/01/20
Behavior of a TCP Receiver
Receiver schedules an ACK on receipt of next
message.
TCP acknowledges the next segment it
expects to receive, not the last segment it
received.
In the example, N+1 is blocked, so the
receiver keeps acknowledging N+1 (the next
segment it expects to receive).
TCP Slow Start
If ACK acknowledges something
Updates credit and sends
If not, presumes it indicates a lost packet
Sends first unacknowledged messageright away
Halves current credit (slows down)
Increases slowly to gauge networkthroughput
Multiple Drops in TCP
If multiple drops occur in the same session:
Current TCPs wait for time-out
Selective acknowledge may be a
workaround
New fast retransmit phase takes several
round-trip times to recover
8/13/2019 Arquitectura de Redes QoS 14
3/15
07/01/20
Managing Interface Congestion
with Tail Drop
Router interfaces experience congestion when the output queue
is full:
Additional incoming packets are tail-dropped
Dropped packets may cause significant application
performance degradation
Tail drop has significant drawbacks
Tail Drop Limitations
Tail drop should be avoided because it contains significant
flaws:
TCP synchronization
TCP starvation
No differentiated drop
TCP Synchronization
Multiple TCP sessions start at different times.
TCP window sizes are increased.
Tail drops cause many packets of many sessions to be dropped
at the same time.
TCP sessions restart at the same time (synchronized).
8/13/2019 Arquitectura de Redes QoS 14
4/15
07/01/20
TCP Delay, Jitter and Starvation
Constant high buffer usage (long queue) causes delay.
More aggressive flows can cause other flows to starve.
No differentiated dropping occurs.
Introducing RED
Random Early Detection
Tail drop can be avoided if congestion is prevented.
RED is a mechanism that randomly drops packets before aqueue is full.
RED increases drop rate as the average queue size increases.
RED result:
TCP sessions slow down to the approximate rate of output-link bandwidth.
Average queue size is small (much less than the maximumqueue size).
TCP sessions are desynchronized by random drops.
8/13/2019 Arquitectura de Redes QoS 14
5/15
07/01/20
RED Profiles
RED Modes
RED has three modes:
No drop: When the average queue size is between 0 and theminimum threshold
Random drop: When the average queue size is between theminimum and the maximum threshold
Full drop (tail drop):When the average queue size is atmaximum threshold or above
Random drop should prevent congestion (prevent tail drops)
TCP Traffic Before RED
TCP synchronizationprevents average link utilization close to
the link bandwidth.
Tail dropscause TCP sessions to go into slow-start.
8/13/2019 Arquitectura de Redes QoS 14
6/15
07/01/20
TCP Traffic After RED
Average link utilization is much closer to link bandwidth.
Random dropscause TCP sessions to reduce window sizes.
Applying Congestion Avoidance
Configuring Class-Based Weighted RED
8/13/2019 Arquitectura de Redes QoS 14
7/15
07/01/20
WREDcan use multiple different RED profiles.
Each profile is identified by:
Minimum threshold
Maximum threshold Maximum drop probability
WRED profile selection is based on:
IP precedence(8 profiles)
DSCP(64 profiles)
WRED drops less important packets more aggressively thanmore important packets.
WRED can be applied at the interface, VC, or class level.
Weighted Random Early Detection
Class-Based WRED
Class-based WRED is available when configured in combination
with CBWFQ only.
Using CBWFQ with WRED allows the implementation of
DiffServ Assured Forwarding PHB.
Class-based configuration of WRED is identical to standalone
WRED.
WRED Building Blocks
8/13/2019 Arquitectura de Redes QoS 14
8/15
07/01/20
WRED Profiles
WRED profiles can be manually set.
WRED has 8 default value sets for precedence-based WRED.
WRED has 64 default value sets for DSCP-based WRED.
IP Precedence and
Class Selector Profiles
DSCP-Based WRED
(Expedited Forwarding)
8/13/2019 Arquitectura de Redes QoS 14
9/15
07/01/20
DSCP-Based WRED
(Assured Forwarding)
Configuring CB-WRED
class-map [match-any | match-all] class-name
router(config)#
policy-mappolicy-name
router(config)#
service-policy {input | output}policy-map-name
router(config-if)#
1. Create class map: Used for matching packets to a specified class
2. Create policy map (service policy):Specifies a traffic policy that canbe attached to one or more interfaces
3. Attach service policy:Associates the policy map to an outputinterface or VC
Configuring CB-WRED (Cont.)
random-detect
router(config-pmap-c)#
Enables IP precedence-based WRED in the selected classwithin the service policy configuration mode.
Default service profile is used.
Command can be used at the interface, per-VC (with random-detect-group), or the class level (service-policy).
Precedence-based WRED is the default mode.
WRED treats non-IP traffic as precedence 0.
8/13/2019 Arquitectura de Redes QoS 14
10/15
07/01/20
Changing the WRED Traffic Profile
random-detect precedenceprecedence min-threshold
max-threshold mark-prob-denominator
Changes WRED profile for specified IP precedence value.
Packet drop probability at maximum threshold is:
1 / mark-prob-denominator
Non-weighted RED is achieved by using the same WRED profile
for all precedence values.
router(config-pmap-c)#
WRED takes the average queue size to determine the current
WRED mode (no drop, random drop, full drop).
High values of N allow short bursts.
Low values of N make WRED more burst-sensitive.
Default value (9) should be used in most scenarios.
Average output queue size with N=9 is
Qave(t+1) = Qave(t) * 0.998 + Q t* 0.002
Changing WRED Sensitivity to Bursts
random-detect exponential-weighting-constant n
router(config-pmap-c)#
Example: CBWFQ Using IP Precedence with CB-WRED
Enable CBWFQ to prioritize traffic according to these
requirements: Class mission-criticalis marked with IP precedence values
3 and 4 (3 is high-drop, 4 is low-drop) and should get 30%
of interface bandwidth.
Class bulkis marked with IP precedence values 1 and 2 (1
is high-drop, 2 is low-drop) and should get 20% of interface
bandwidth.
All other traffic should be per-flow fair -queued.
Use differentiated WRED to prevent congestion in all three
classes.
8/13/2019 Arquitectura de Redes QoS 14
11/15
07/01/20
Example: CBWFQ Using IP Precedence with CB-WRED
Configuring DSCP-Based CB-WRED
random-detect dscp-based
Enables DSCP-based WRED.
Command can be used at the interface, per-VC (with random-detect-group), or the class level (service-policy).
Default service profile is used.
The WRED random-detect command and the WFQ queue-limitcommand are mutually exclusive for class policy.
router(config-pmap-c)#
Changing the WRED Traffic Profile
random-detect dscp dscpvalue min-threshold max-thresholdmark-prob-denominator
router(config-pmap-c)#
Changes WRED profile for specified DSCP value
Packet drop probability at maximum threshold is:1 / mark-prob-denominator
8/13/2019 Arquitectura de Redes QoS 14
12/15
07/01/20
Example: CB-WRED Using DSCP with CBWFQ
Enable CBWFQ to prioritize traffic according to theserequirements:
Class mission-criticalis marked using DSCP AF2 and should
get 30% of interface bandwidth. Class bulk is marked using DSCP AF1 and should get 20% of
interface bandwidth.
All other traffic should be per-flow fair-queued.
Use differentiated WRED to prevent congestion in all threeclasses.
Make sure the new configurations still conform to the designand implementation from the previous example.
Example: CB-WRED Using DSCP with CBWFQ (Cont.)
Monitoring CB-WRED
show policy-map interface interface-name
router#
Displays the configuration of all classes configured for all servicepolicies on the specified interface
router#show policy-map interface Ethernet 0/0
Ethernet0/0
Service-policy output: Policy1
Class-map: Mission-critical (match-all)
0 packets, 0 bytes 5 minute offered rate 0 bps, drop rate 0 bps
Match: ip precedence 2 Match: ip dscp 18 20 22
Weighted Fair Queueing
Output Queue: Conversation 265
Bandwidth 30 (%) Bandwidth 3000 (kbps)
(pkts matched/bytes matched) 0/0
(depth/total drops/no-buffer drops) 0/0/0
exponential weight: 9
mean queue depth: 0
Dscp Transmitted Random drop Tail drop Minimum Maximum Mark
(Prec) pkts/bytes pkts/bytes pkts/bytes threshold threshold probability
0(0) 0/0 0/0 0/0 20 40 1/10
1 0/0 0/0 0/0 22 40 1/10
2 0/0 0/0 0/0 24 40 1/10
...
8/13/2019 Arquitectura de Redes QoS 14
13/15
07/01/20
Configuring Explicit Congestion Notification
Explicit Congestion Notification
TCP congestion controls are not suited to applications that
are sensitive to delay or packet loss.
ECN (RFC 3168) removes need to rely on packet loss as a
congestion indicator.
ECN marks packets instead of dropping them when the
average queue length exceeds a specific threshold value.
Routers and end hosts can use ECN marking as a signal that
the network is congested and send packets at a slower rate.
ECN Field Defined
8/13/2019 Arquitectura de Redes QoS 14
14/15
07/01/20
ECN and WRED
ECN is an extension to WRED.
Congestion in WRED is indicated based on the average
queue length exceeding a specific threshold value.
If the number of packets in the queue is below the minimum
threshold, packets are transmitted.
Treatment is identical to a network using only WRED.
If the number of packets in the queue is above the maximum
threshold, packets are tail-dropped.
Treatment is identical to a network using only WRED.
ECN and WRED (Cont.)
If the number of packets in the queue is between the minimum and
maximum threshold, one of three scenarios can occur:
ECN-capable endpoints and WRED determine that the packet
should be dropped based on the drop probability:
ECT and CE bits for the packet are changed to 1 and the
packet is transmitted.
Non ECN-capable endpoints:
The packet may be dropped based on the WRED drop
probability.
The network is experiencing congestion:
Both the ECT and CE are already set. The packet istransmitted and no further marking is required.
Configuring ECN-Enabled WRED
random-detect ecn
router(config-pmap-c)#
Enables ECN.
ECN can be used whether WRED is based on the IP precedence
or DSCP value.
ECN must be configured through MQC.
router(config)# policy-map MyPolicy
router(config-pmap)# class class-defaultrouter(config-pmap-c)# bandwidth percent 70
router(config-pmap-c)# random-detect
router(config-pmap-c)# random-detect ecn
8/13/2019 Arquitectura de Redes QoS 14
15/15
07/01/20
Monitoring ECN-Enabled WRED
show policy-map [policy-map]
router#
Displays the configuration of all classes for a specified servicepolicy map or all classes for all existing policy maps
router#show policy-map
Policy Map MyPolicy
Class class-default
Weighted Fair Queueing
Bandwidth 70 (%)
exponential weight 9
explicit congestion notification
class min-threshold max-threshold mark-probability
----------------------------------------------------------
----------------------------------------------------------
0 - - 1/10
1 - - 1/10
2 - - 1/10
3 - - 1/10
. . .
show policy-map interface interface-name
router#
Displays the configuration of all classes configured for all service
policies on the specified interface
router#show policy-map interface Serial4/1
Serial4/1
Service-policy output:policy_ecn
Class-map:prec1 (match-all)
1000 packets, 125000 bytes
30 second offered rate 14000 bps, drop rate 5000 bps
Match:ip precedence 1
Weighted Fair Queueing
Output Queue:Conversation 42
Bandwidth 20 (%)
Bandwidth 100 (kbps)(pkts matched/bytes matched) 989/123625
(depth/total drops/no-buffer drops) 0/455/0
exponential weight:9
explicit congestion notification
Monitoring ECN-Enabled WRED (Cont.)
mean queue depth:0class Transmitted Random drop Tail drop Minimum Maximum Mark
pkts/bytes pkts/bytes pkts/bytes threshold threshold probability0 0/0 0/0 0/0 20 40 1/10
1 545/68125 0/0 0/0 22 40 1/102 0/0 0/0 0/0 24 40 1/103 0/0 0/0 0/0 26 40 1/104 0/0 0/0 0/0 28 40 1/105 0/0 0/0 0/0 30 40 1/106 0/0 0/0 0/0 32 40 1/107 0/0 0/0 0/0 34 40 1/10rsvp 0/0 0/0 0/0 36 40 1/10
class ECN Markpkts/bytes
0 0/01 43/53752 0/03 0/04 0/0
5 0/06 0/07 0/0
rsvp 0/0
Monitoring ECN-Enabled WRED (Cont.)
top related