
- •QoS Overview
- •“Do I Know This Already?” Quiz
- •QoS: Tuning Bandwidth, Delay, Jitter, and Loss Questions
- •Foundation Topics
- •QoS: Tuning Bandwidth, Delay, Jitter, and Loss
- •Bandwidth
- •The clock rate Command Versus the bandwidth Command
- •QoS Tools That Affect Bandwidth
- •Delay
- •Serialization Delay
- •Propagation Delay
- •Queuing Delay
- •Forwarding Delay
- •Shaping Delay
- •Network Delay
- •Delay Summary
- •QoS Tools That Affect Delay
- •Jitter
- •QoS Tools That Affect Jitter
- •Loss
- •QoS Tools That Affect Loss
- •Summary: QoS Characteristics: Bandwidth, Delay, Jitter, and Loss
- •Voice Basics
- •Voice Bandwidth Considerations
- •Voice Delay Considerations
- •Voice Jitter Considerations
- •Voice Loss Considerations
- •Video Basics
- •Video Bandwidth Considerations
- •Video Delay Considerations
- •Video Jitter Considerations
- •Video Loss Considerations
- •Comparing Voice and Video: Summary
- •IP Data Basics
- •Data Bandwidth Considerations
- •Data Delay Considerations
- •Data Jitter Considerations
- •Data Loss Considerations
- •Comparing Voice, Video, and Data: Summary
- •Foundation Summary
- •QoS Tools and Architectures
- •“Do I Know This Already?” Quiz
- •QoS Tools Questions
- •Differentiated Services Questions
- •Integrated Services Questions
- •Foundation Topics
- •Introduction to IOS QoS Tools
- •Queuing
- •Queuing Tools
- •Shaping and Policing
- •Shaping and Policing Tools
- •Congestion Avoidance
- •Congestion-Avoidance Tools
- •Call Admission Control and RSVP
- •CAC Tools
- •Management Tools
- •Summary
- •The Good-Old Common Sense QoS Model
- •GOCS Flow-Based QoS
- •GOCS Class-Based QoS
- •The Differentiated Services QoS Model
- •DiffServ Per-Hop Behaviors
- •The Class Selector PHB and DSCP Values
- •The Assured Forwarding PHB and DSCP Values
- •The Expedited Forwarding PHB and DSCP Values
- •The Integrated Services QoS Model
- •Foundation Summary
- •“Do I Know This Already?” Quiz Questions
- •CAR, PBR, and CB Marking Questions
- •Foundation Topics
- •Marking
- •IP Header QoS Fields: Precedence and DSCP
- •LAN Class of Service (CoS)
- •Other Marking Fields
- •Summary of Marking Fields
- •Class-Based Marking (CB Marking)
- •Network-Based Application Recognition (NBAR)
- •CB Marking show Commands
- •CB Marking Summary
- •Committed Access Rate (CAR)
- •CAR Marking Summary
- •Policy-Based Routing (PBR)
- •PBR Marking Summary
- •VoIP Dial Peer
- •VoIP Dial-Peer Summary
- •Foundation Summary
- •Congestion Management
- •“Do I Know This Already?” Quiz
- •Queuing Concepts Questions
- •WFQ and IP RTP Priority Questions
- •CBWFQ and LLQ Questions
- •Comparing Queuing Options Questions
- •Foundation Topics
- •Queuing Concepts
- •Output Queues, TX Rings, and TX Queues
- •Queuing on Interfaces Versus Subinterfaces and Virtual Circuits (VCs)
- •Summary of Queuing Concepts
- •Queuing Tools
- •FIFO Queuing
- •Priority Queuing
- •Custom Queuing
- •Weighted Fair Queuing (WFQ)
- •WFQ Scheduler: The Net Effect
- •WFQ Scheduling: The Process
- •WFQ Drop Policy, Number of Queues, and Queue Lengths
- •WFQ Summary
- •Class-Based WFQ (CBWFQ)
- •CBWFQ Summary
- •Low Latency Queuing (LLQ)
- •LLQ with More Than One Priority Queue
- •IP RTP Priority
- •Summary of Queuing Tool Features
- •Foundation Summary
- •Conceptual Questions
- •Priority Queuing and Custom Queuing
- •CBWFQ, LLQ, IP RTP Priority
- •Comparing Queuing Tool Options
- •“Do I Know This Already?” Quiz
- •Shaping and Policing Concepts Questions
- •Policing with CAR and CB Policer Questions
- •Shaping with FRTS, GTS, DTS, and CB Shaping
- •Foundation Topics
- •When and Where to Use Shaping and Policing
- •How Shaping Works
- •Where to Shape: Interfaces, Subinterfaces, and VCs
- •How Policing Works
- •CAR Internals
- •CB Policing Internals
- •Policing, but Not Discarding
- •Foundation Summary
- •Shaping and Policing Concepts
- •“Do I Know This Already?” Quiz
- •Congestion-Avoidance Concepts and RED Questions
- •WRED Questions
- •FRED Questions
- •Foundation Topics
- •TCP and UDP Reactions to Packet Loss
- •Tail Drop, Global Synchronization, and TCP Starvation
- •Random Early Detection (RED)
- •Weighted RED (WRED)
- •How WRED Weights Packets
- •WRED and Queuing
- •WRED Summary
- •Flow-Based WRED (FRED)
- •Foundation Summary
- •Congestion-Avoidance Concepts and Random Early Detection (RED)
- •Weighted RED (WRED)
- •Flow-Based WRED (FRED)
- •“Do I Know This Already?” Quiz
- •Compression Questions
- •Link Fragmentation and Interleave Questions
- •Foundation Topics
- •Payload and Header Compression
- •Payload Compression
- •Header Compression
- •Link Fragmentation and Interleaving
- •Multilink PPP LFI
- •Maximum Serialization Delay and Optimum Fragment Sizes
- •Frame Relay LFI Using FRF.12
- •Choosing Fragment Sizes for Frame Relay
- •Fragmentation with More Than One VC on a Single Access Link
- •FRF.11-C and FRF.12 Comparison
- •Foundation Summary
- •Compression Tools
- •LFI Tools
- •“Do I Know This Already?” Quiz
- •Foundation Topics
- •Call Admission Control Overview
- •Call Rerouting Alternatives
- •Bandwidth Engineering
- •CAC Mechanisms
- •CAC Mechanism Evaluation Criteria
- •Local Voice CAC
- •Physical DS0 Limitation
- •Max-Connections
- •Voice over Frame Relay—Voice Bandwidth
- •Trunk Conditioning
- •Local Voice Busyout
- •Measurement-Based Voice CAC
- •Service Assurance Agents
- •SAA Probes Versus Pings
- •SAA Service
- •Calculated Planning Impairment Factor
- •Advanced Voice Busyout
- •PSTN Fallback
- •SAA Probes Used for PSTN Fallback
- •IP Destination Caching
- •SAA Probe Format
- •PSTN Fallback Scalability
- •PSTN Fallback Summary
- •Resource-Based CAC
- •Resource Availability Indication
- •Gateway Calculation of Resources
- •RAI in Service Provider Networks
- •RAI in Enterprise Networks
- •RAI Operation
- •RAI Platform Support
- •Cisco CallManager Resource-Based CAC
- •Location-Based CAC Operation
- •Locations and Regions
- •Calculation of Resources
- •Automatic Alternate Routing
- •Location-Based CAC Summary
- •Gatekeeper Zone Bandwidth
- •Gatekeeper Zone Bandwidth Operation
- •Single-Zone Topology
- •Multizone Topology
- •Zone-per-Gateway Design
- •Gatekeeper in CallManager Networks
- •Zone Bandwidth Calculation
- •Gatekeeper Zone Bandwidth Summary
- •Integrated Services / Resource Reservation Protocol
- •RSVP Levels of Service
- •RSVP Operation
- •RSVP/H.323 Synchronization
- •Bandwidth per Codec
- •Subnet Bandwidth Management
- •Monitoring and Troubleshooting RSVP
- •RSVP CAC Summary
- •Foundation Summary
- •Call Admission Control Concepts
- •Local-Based CAC
- •Measurement-Based CAC
- •Resources-Based CAC
- •“Do I Know This Already?” Quiz
- •QoS Management Tools Questions
- •QoS Design Questions
- •Foundation Topics
- •QoS Management Tools
- •QoS Device Manager
- •QoS Policy Manager
- •Service Assurance Agent
- •Internetwork Performance Monitor
- •Service Management Solution
- •QoS Management Tool Summary
- •QoS Design for the Cisco QoS Exams
- •Four-Step QoS Design Process
- •Step 1: Determine Customer Priorities/QoS Policy
- •Step 2: Characterize the Network
- •Step 3: Implement the Policy
- •Step 4: Monitor the Network
- •QoS Design Guidelines for Voice and Video
- •Voice and Video: Bandwidth, Delay, Jitter, and Loss Requirements
- •Voice and Video QoS Design Recommendations
- •Foundation Summary
- •QoS Management
- •QoS Design
- •“Do I Know This Already?” Quiz
- •Foundation Topics
- •The Need for QoS on the LAN
- •Layer 2 Queues
- •Drop Thresholds
- •Trust Boundries
- •Cisco Catalyst Switch QoS Features
- •Catalyst 6500 QoS Features
- •Supervisor and Switching Engine
- •Policy Feature Card
- •Ethernet Interfaces
- •QoS Flow on the Catalyst 6500
- •Ingress Queue Scheduling
- •Layer 2 Switching Engine QoS Frame Flow
- •Layer 3 Switching Engine QoS Packet Flow
- •Egress Queue Scheduling
- •Catalyst 6500 QoS Summary
- •Cisco Catalyst 4500/4000 QoS Features
- •Supervisor Engine I and II
- •Supervisor Engine III and IV
- •Cisco Catalyst 3550 QoS Features
- •Cisco Catalyst 3524 QoS Features
- •CoS-to-Egress Queue Mapping for the Catalyst OS Switch
- •Layer-2-to-Layer 3 Mapping
- •Connecting a Catalyst OS Switch to WAN Segments
- •Displaying QoS Settings for the Catalyst OS Switch
- •Enabling QoS for the Catalyst IOS Switch
- •Enabling Priority Queuing for the Catalyst IOS Switch
- •CoS-to-Egress Queue Mapping for the Catalyst IOS Switch
- •Layer 2-to-Layer 3 Mapping
- •Connecting a Catalyst IOS Switch to Distribution Switches or WAN Segments
- •Displaying QoS Settings for the Catalyst IOS Switch
- •Foundation Summary
- •LAN QoS Concepts
- •Catalyst 6500 Series of Switches
- •Catalyst 4500/4000 Series of Switches
- •Catalyst 3550/3524 Series of Switches
- •QoS: Tuning Bandwidth, Delay, Jitter, and Loss
- •QoS Tools
- •Differentiated Services
- •Integrated Services
- •CAR, PBR, and CB Marking
- •Queuing Concepts
- •WFQ and IP RTP Priority
- •CBWFQ and LLQ
- •Comparing Queuing Options
- •Conceptual Questions
- •Priority Queuing and Custom Queuing
- •CBWFQ, LLQ, IP RTP Priority
- •Comparing Queuing Tool Options
- •Shaping and Policing Concepts
- •Policing with CAR and CB Policer
- •Shaping with FRTS, GTS, DTS, and CB Shaping
- •Shaping and Policing Concepts
- •Congestion-Avoidance Concepts and RED
- •WRED
- •FRED
- •Congestion-Avoidance Concepts and Random Early Detection (RED)
- •Weighted RED (WRED)
- •Flow-Based WRED (FRED)
- •Compression
- •Link Fragmentation and Interleave
- •Compression Tools
- •LFI Tools
- •Call Admission Control Concepts
- •Local-Based CAC
- •Measurement-Based CAC
- •Resources-Based CAC
- •QoS Management Tools
- •QoS Design
- •QoS Management
- •QoS Design
- •LAN QoS Concepts
- •Catalyst 6500 Series of Switches
- •Catalyst 4500/4000 Series of Switches
- •Catalyst 3550/3524 Series of Switches
- •Foundation Topics
- •QPPB Route Marking: Step 1
- •QPPB Per-Packet Marking: Step 2
- •QPPB: The Hidden Details
- •QPPB Summary
- •Flow-Based dWFQ
- •ToS-Based dWFQ
- •Distributed QoS Group–Based WFQ
- •Summary: dWFQ Options

456 Chapter 6: Congestion Avoidance Through Drop Policies
Table 6-8 |
WRED Feature Summary |
|
|
|
|
|
Feature |
WRED |
|
|
|
|
Discards packets to avoid congestion |
Yes |
|
|
|
|
Can be enabled on physical interface concurrently with a |
No |
|
queuing tool |
|
|
|
|
|
Can be combined with CBWFQ or LLQ policy map |
Yes |
|
|
|
|
Bases drop decision, at least in part, on different thresholds per |
Yes |
|
precedence or DSCP value |
|
|
|
|
Flow-Based WRED (FRED)
FRED uses flows to identify streams of traffic. A flow is a unidirectional sequence of packets between a source and destination that share the same protocol and transport layer information. The following seven fields are used to determine whether the received packet is a part of an existing flow:
•
•
•
•
•
•
•
Source IP address
Source port number
Destination IP address
Destination port number
Layer 3 protocol
IP precedence/DSCP marking
Interface the packet is received on
FRED overcomes the problem of TCP starvation described in the first section of this chapter. When nonadaptive flows (UDP) compete with adaptive flows (TCP), WRED discards packets from all the flows. However, only the TCP flows adapt, sending less traffic into the network, but UDP flows do not slow down. Queues can become filled with packets from large-volume UDP flows, causing the TCP flows to get progressively less queue space. This phenomenon is called
TCP starvation.
Both WRED and FRED discard packets before tail drop is required, hoping to get the senders of the traffic to slow down, thereby reducing congestion. FRED, however, adds the goal of stopping TCP starvation by watching for hungry UDP flows that try to use too much of a queue. FRED aggressively discards these hungry UDP flows, termed nonadapative flows, preventing these flows from consuming too much of a queue.
To recognize nonadaptive flows, FRED classifies packets into flows. Then FRED classifies each flow into one of three FRED flow types, as listed in Table 6-9.

Flow-Based WRED (FRED) 457
Table 6-9 |
FRED Flow Types |
|
|
|
|
|
|
|
|
|
|
|
Transport |
FRED |
|
Flow Type |
Description |
Protocol |
Discard Policy |
|
|
|
|
|
|
Robust |
Adapts to lost packets by slowing down |
TCP |
Moderate discard rates |
|
|
the rate of sending packets |
|
|
|
|
|
|
|
|
Fragile |
Does not adapt to lost packets by |
UDP |
Low discard rates |
|
|
slowing down, but the number of packets |
|
|
|
|
sent is not excessive |
|
|
|
|
|
|
|
|
Nonadaptive |
Does not adapt to lost packets by |
UDP |
High discard rates |
|
|
slowing down, and the number of |
|
|
|
|
packets sent is excessive |
|
|
|
|
|
|
|
Keep in mind that FRED specifically wants to defeat the UDP flows that consume too many queue entries. FRED still drops some packets from UDP flows when congestion occurs, based on normal WRED logic. For UDP flows, FRED simply decides which flows are taking too much of the queue, classifies these flows as nonadaptive, and discards packets in those flows more aggressively. For other UDP flows that FRED believes are not sending too many packets (fragile flows) FRED discards their packets less frequently.
NOTE UDP does not adapt to packet loss, so by definition, all UDP flows are nonadaptive. However, FRED uses the term “nonadaptive” to categorize those flows that are currently using too much of the queue.
The key to understanding how FRED works is to understand how FRED determines whether a particular UDP flow is fragile or nonadaptive. A couple of simple examples make the logic much more obvious. First, suppose FRED is enabled on a router’s S0/0 interface, and the interface FIFO output queue has 40 queue entries maximum. At a particular point in time, 10 flows exist, called Flow 1, Flow 2, and so on. (Keep in mind that FRED only supports FIFO Queuing.) With a maximum queue depth of 40, and 10 flows, you can think of each flow’s fair share of the queue space to be 40/10, or 4, in this case. FRED multiplies this fair share by a scaling factor, which defaults to 4. The scaling factor is used so that each flow has some capability to burst. This final number, 16 in this case, is the dividing line between fragile flows and nonadaptive flows.
Suppose, for instance, that Flow 1 and Flow 2 both use UDP. Flow 1 has 3 packets in the FIFO output queue, and Flow 2 has 20 packets in the queue. At first glance, it seems that Flow 2 should be considered a nonadaptive flow, because it has many packets in the queue. The calculated value of 4 * 40/10 (scaling factor * maximum queue length/number of flows), or 16, is greater than the number of packets in the queue that are part of Flow 1 (3 packets in the queue).

458 Chapter 6: Congestion Avoidance Through Drop Policies
Therefore, FRED considers Flow 1 to be a fragile flow. Similarly, the calculated value of 16 is smaller than the number of packets in the queue that are part of Flow 2 (20 packets in the queue), so FRED considers Flow 2 to be nonadaptive.
The first example hides one subtlety in how FRED decides which UDP flows are fragile, and which are nonadaptive. Consider the same example, but suppose now that only five flows exist. The formula works out to be 4 * 40/5 = 32. (Notice that the only part of the formula that changes over time is the number of flows; the scaling factor remains static, as does the maximum queue length.) As the number of flows decreases, the threshold that determines whether a flow is nonadaptive increases. If Flow 2 still has 20 packets in the queue, Flow 2 would now be considered to be a fragile flow, with packets discarded less aggressively.
After FRED decides which flows are robust, fragile, and nonadaptive, FRED can apply WREDlike logic to decide whether to discard any packets at all, and if so, what percentage of the packets. Frankly, the published details on how FRED determines the flows are sketchy at best. For you QoS exam takers, the following details about how FRED discards packets for the three types of flows is unlikely to be covered, because the coverage in the corresponding courses is also sketchy, or not even mentioned.
For robust and fragile flows, FRED acts just like WRED in terms of packet discard. FRED still uses the per-precedence or per-DSCP minimum threshold, maximum threshold, and MPD to determine when to discard packets, and how many. You can override the default values for each precedence or DSCP value through configuration, just like with WRED.
For nonadaptive flows, FRED lowers the maximum threshold. By doing so, FRED increases the packet discard rate more quickly. More importantly, lowering the maximum threshold for packets in the flow causes FRED to discard all packets for these nonadaptive flows more quickly than for fragile and robust flows, essentially preventing these flows from consuming the entire queue.
To get a full sense of what happens to nonadaptive flows, consider the following example. For nonadaptive flows, FRED reduces the maximum threshold used for the flow by half of the difference between the maximum and minimum thresholds. FRED and WRED use defaults for precedence 0 as follows: minimum threshold 20, maximum threshold 40, drop percentage 10 percent (MPD=10). FRED reduces the maximum threshold for a precedence 0 nonadaptive flow to 30, because the difference between the maximum and minimum is 20, and half of that is 10. By reducing the maximum threshold by half of the difference between the minimum and maximum, FRED increases the packet discard rate more quickly as the average queue depth nears 30. Most importantly, FRED discards all packets for these nonadaptive precedence 0 flows when the average queue depth reaches 30, preventing these flows from taking over the entire queue.
Table 6-10 lists the terms used by FRED to describe these processes.

|
|
Flow-Based WRED (FRED) 459 |
|
|
|
Table 6-10 FRED Terminology |
|
|
|
|
|
|
Term |
Definition |
|
|
|
|
Average per-flow queue size |
A calculated value, based on the formula maximum queue size/ |
|
|
number of active flows. |
|
|
|
|
Active flow |
A flow that currently has packets in the queue. |
|
|
|
|
Maximum per-flow queue size |
A calculated value, based on the formula (average queue size * |
|
|
scaling factor). (This same formula is used in the previous example |
|
|
that results in an answer of 16.) This value is used to determine |
|
|
which flows are fragile, and which are nonadaptive. |
|
|
|
|
Scaling factor |
Number used in the calculation of maximum per-flow queue size, |
|
|
which may be changed using configuration. |
|
|
|
|
Average depth factor |
Another name for scaling factor. |
|
|
|
FRED Configuration
FRED configuration requires only slightly more effort than does WRED configuration, as long as default configuration values are acceptable. This section shows two FRED configuration examples that involve the same basic scenarios as the first two WRED examples in the previous section. FRED configuration and show commands are listed in Tables 6-11 and 6-12.
Table 6-11 Command Reference for FRED
Command |
Mode and Function |
|
|
random-detect flow |
Interface configuration mode; enables FRED on the |
|
interface. |
|
|
random-detect flow average-depth-factor |
Interface configuration mode; changes scaling factor. |
scaling-factor |
The lower the number, the more aggressively FRED |
|
discards packets for flows using more than their fair |
|
share of the available queue space. |
|
|
random-detect flow count number |
Interface configuration mode; overrides default |
|
setting for the maximum number of concurrent flows |
|
tracked by FRED. (The default is 256.) |
|
|
random-detect precedence precedence |
Interface, class, or random-detect-group configura- |
min-threshold max-threshold mark-prob- |
tion modes; overrides default settings for the speci- |
denominator |
fied precedence, for minimum and maximum WRED |
|
thresholds, and for percentage of packets discarded. |
|
|
continues

460 Chapter 6: Congestion Avoidance Through Drop Policies
Table 6-11 Command Reference for FRED (Continued)
|
Command |
Mode and Function |
|
|
|
|
random-detect dscp dscpvalue min-threshold |
Interface, class, or random-detect-group configura- |
|
max-threshold [mark-probability- |
tion modes; overrides default settings for the speci- |
|
denominator] |
fied DSCP, for minimum and maximum WRED |
|
|
thresholds, and for percentage of packets discarded. |
|
|
|
|
random-detect exponential-weighting- |
Interface, class, or random-detect-group configura- |
|
constant exponent |
tion modes; overrides default settings for exponential |
|
|
weighting constant. Lower numbers make WRED |
|
|
react quickly to changes in queue depth; higher num- |
|
|
bers make WRED react less quickly. |
|
|
|
Table 6-12 Exec Command Reference for FRED |
|
|
|
|
|
|
Command |
Function |
|
|
|
|
show queue interface-name interface-number |
Lists information about the packets that are waiting |
|
[vc [vpi/] vci]] |
in a queue on the interface |
|
|
|
|
show queueing random-detect [interface |
Lists configuration and statistical information about |
|
atm-subinterface [vc [[vpi/] vci]]] |
the queuing tool on an interface |
|
|
|
|
show interfaces |
Mentions whether WRED has been enabled on the |
|
|
interface |
|
|
|
|
show interface random-detect |
Lists information about WRED when distributed |
|
|
WRED is running on a VIP interface |
|
|
|
In the first example, R3 enables FRED on its S0/0 interface. FRED classifies the packets into flows and then decides which flows are currently considered to be robust, fragile, and nonadaptive. Based on the category, FRED decides whether new packets should be discarded.
This example continues the tradition of marking packets at ingress on R3’s E0/0 interface. The marking logic performed by CB marking is as follows:
•
•
•
•
VoIP payload—DSCP EF
HTTP traffic for web pages with “important” in the URL—DSCP AF21
HTTP traffic for web pages with “not-so” in the URL—DSCP AF23
All other—DSCP default
To generate traffic in this network, two voice calls will be made between the analog phones attached to R1 and R4. Multiple web browsers will load the standard page used in this book, with two TCP connections created by each browser—one to get a file with the word “important” in it, and the other getting a file with “not-so” in it. An FTP download of a large file will also

Flow-Based WRED (FRED) 461
be initiated from the Server to Client1. Example 6-4 shows the basic configuration and show commands output. The example uses the familiar network diagram, with the configuration being added to R3.
Figure 6-12 Sample Network for All FRED Examples—Configuration on R3
|
Web traffic is discarded at a |
Note: All IP Addresses Begin 192.168. |
higher rate than VoIP traffic. |
|
|
Client1 |
|
|
Server1 |
1.252 |
2.252 |
|
|
SW1 |
R1 s0/0 |
s0/0 R3 |
SW2 |
1.100 |
|
|
3.100 |
|
|
|
3.254 |
101 |
102 |
|
R4 |
|
|
301 302
Example 6-4 FRED Example Using All Default Values, R3 S0/0
R3#show running-config
Building configuration...
!
!Some lines omitted for brevity
ip cef
!The following class-maps will be used for CB marking policy
!used at ingress to E0/0
!
class-map match-all http-impo
match protocol http url "*important*" class-map match-all http-not
match protocol http url "*not-so*" class-map match-all class-default
match any
class-map match-all voip-rtp match ip rtp 16384 16383
!
! The following policy-map will be used for CB marking
!
continues

462 Chapter 6: Congestion Avoidance Through Drop Policies
Example 6-4 FRED Example Using All Default Values, R3 S0/0 (Continued)
policy-map laundry-list class voip-rtp
set ip dscp ef class http-impo
set ip dscp af21 class http-not
set ip dscp af23 class class-default set ip dscp default
!
call rsvp-sync
!
interface Ethernet0/0
description connected to SW2, where Server1 is connected ip address 192.168.3.253 255.255.255.0
ip nbar protocol-discovery half-duplex
service-policy input laundry-list
!
interface Serial0/0
description connected to FRS port S0. Single PVC to R1. no ip address
encapsulation frame-relay load-interval 30 random-detect random-detect flow clockrate 128000
!
interface Serial0/0.1 point-to-point
description point-point subint global DLCI 103, connected via PVC to DLCI 101 ( R1)
ip address 192.168.2.253 255.255.255.0 frame-relay interface-dlci 101
!
!
! Some lines omitted for brevity
!
R3#show queueing random-detect |
|
|
|
||
Current random-detect configuration: |
|
|
|
||
Serial0/0 |
|
|
|
|
|
|
|
|
|||
Queueing strategy: random early detection (WRED) |
|
|
|||
Exp-weight-constant: 9 (1/512) |
|
|
|
||
Mean queue depth: 36 |
|
|
|
|
|
Max flow count: 256 |
Average depth factor: |
4 |
|
||
Flows (active/max active/max): 2/8/256 |
|
|
|||
class |
Random drop |
Tail drop |
Minimum Maximum |
Mark |
|
|
pkts/bytes |
pkts/bytes |
thresh thresh |
prob |
|
0 |
25/12280 |
12/5651 |
20 |
40 |
1/10 |
1 |
0/0 |
0/0 |
22 |
40 |
1/10 |
2 |
103/125056 |
133/146549 |
24 |
40 |
1/10 |
3 |
0/0 |
0/0 |
26 |
40 |
1/10 |

Flow-Based WRED (FRED) 463
Example 6-4 FRED Example Using All Default Values, R3 S0/0 (Continued)
4 |
0/0 |
0/0 |
28 |
40 |
1/10 |
5 |
641/41024 |
1475/94400 |
31 |
40 |
1/10 |
6 |
0/0 |
0/0 |
33 |
40 |
1/10 |
7 |
0/0 |
0/0 |
35 |
40 |
1/10 |
rsvp |
0/0 |
0/0 |
37 |
40 |
1/10 |
|
|
|
|
|
|
The FRED part of the configuration is again quite short. The configuration lists the randomdetect interface subcommand under serial 0/0, which enables precedence-based WRED on the interface. Because FRED is actually a superset of WRED, you also need to add the randomdetect flow command to the interface. Interestingly, IOS adds the random-detect command to the interface if you only type the random-detect flow command. The rest of the detailed configuration in this example is just like the first WRED example configuration, repeating the CB marking configuration that marks the VoIP, FTP, and two different types of HTTP traffic. (For more information about CB marking, see Chapter 3.)
The only command that lists any new information, as compared with WRED, is the show queueing random-detect interface serial 0/0 command. Most of the output looks familiar: It includes the various IP precedence values, with statistics. Just like with WRED, the command lists per-precedence default values for minimum threshold and maximum threshold. FRED still uses these values when determining the percentage of packets to discard. Specifically new for FRED, the command output lists two values used by the FRED algorithm when deciding to discard packets, namely the maximum flow count and average depth factor. The maximum flow count is the maximum number of unique active flows tracked by FRED. The average depth factor describes the scaling factor as described in the FRED concepts section, used when calculating the maximum per-flow queue size.
Although FRED does track and act on flow information, listing statistics per flow would be cumbersome, because the flows may well be short lived. The show queueing command still lists statistics, but it groups the statistics based on the precedence value (or DSCP value if DSCP-based FRED is used).
The second FRED configuration example uses FRED on the interface again, but this time with DSCP FRED, and a few defaults changed. In fact, Example 6-5 just shows the changed configuration, with most of the configuration staying the same. The same CB marking configuration is used to mark the traffic, for instance, so the details are not repeated in the example. The example uses the familiar network diagram used in Example 6-4.
Example 6-5 DSCP-Based FRED on R3 S0/0
R3#conf t
Enter configuration commands, one per line. End with CNTL/Z. R3(config)#interface serial 0/0
R3(config-if)#random-detect flow ?
average-depth-factor Average depth multiplier (1, 2, 4, 8 or 16)
continues

464 Chapter 6: Congestion Avoidance Through Drop Policies
Example 6-5 DSCP-Based FRED on R3 S0/0 (Continued)
count |
|
max number of dynamic |
flows |
|
|
|
<cr> |
|
|
|
|
|
|
R3(config-if)#random-detect flow average-depth-factor 2 |
|
|||||
R3(config-if)#random-detect flow count 19 |
|
|
|
|||
Number of WRED flows must be a power of 2 (16, 32, |
64, 128, 256, 512, 1024 |
|||||
2048, 4096, 8192, 16384 or 32768) |
|
|
|
|
||
R3(config-if)#random-detect flow count 64 |
|
|
|
|||
R3(config-if)#^Z |
|
|
|
|
|
|
R3# |
|
|
|
|
|
|
R3#show queueing random-detect |
|
|
|
|
||
Current random-detect configuration: |
|
|
|
|
||
Serial0/0 |
|
|
|
|
|
|
Queueing strategy: random early detection |
(WRED) |
|
||||
Exp-weight-constant: 9 (1/512) |
|
|
|
|
||
Mean queue depth: 39 |
|
|
|
|
|
|
|
|
|
|
|||
Max flow count: 64 |
Average depth factor: |
2 |
|
|||
Flows (active/max active/max): 13/13/64 |
|
|
|
|||
dscp |
Random drop |
Tail drop |
Minimum |
Maximum |
Mark |
|
|
pkts/bytes |
pkts/bytes |
thresh |
thresh |
prob |
|
af11 |
0/0 |
0/0 |
33 |
|
40 |
1/10 |
af12 |
0/0 |
0/0 |
28 |
|
40 |
1/10 |
af13 |
0/0 |
0/0 |
24 |
|
40 |
1/10 |
af21 |
19/23334 |
1/1404 |
33 |
|
40 |
1/10 |
af22 |
0/0 |
0/0 |
28 |
|
40 |
1/10 |
af23 |
11/14116 |
0/0 |
24 |
|
40 |
1/10 |
af31 |
0/0 |
0/0 |
33 |
|
40 |
1/10 |
af32 |
0/0 |
0/0 |
28 |
|
40 |
1/10 |
af33 |
0/0 |
0/0 |
24 |
|
40 |
1/10 |
af41 |
0/0 |
0/0 |
33 |
|
40 |
1/10 |
af42 |
0/0 |
0/0 |
28 |
|
40 |
1/10 |
af43 |
0/0 |
0/0 |
24 |
|
40 |
1/10 |
cs1 |
0/0 |
0/0 |
22 |
|
40 |
1/10 |
cs2 |
0/0 |
0/0 |
24 |
|
40 |
1/10 |
cs3 |
0/0 |
0/0 |
26 |
|
40 |
1/10 |
cs4 |
0/0 |
0/0 |
28 |
|
40 |
1/10 |
cs5 |
0/0 |
0/0 |
31 |
|
40 |
1/10 |
cs6 |
0/0 |
0/0 |
33 |
|
40 |
1/10 |
cs7 |
0/0 |
0/0 |
35 |
|
40 |
1/10 |
ef |
11/704 |
2658/170112 |
37 |
|
40 |
1/10 |
rsvp |
0/0 |
0/0 |
37 |
|
40 |
1/10 |
default |
7/7396 |
16/14275 |
20 |
|
40 |
1/10 |
|
|
|
|
|
|
|
The configuration begins with a change from precedence-based FRED to DSCP-based FRED using the random-detect dscp-based interface subcommand. (The configuration already contained the random-detect flow command to enable flow-based WRED.) Two FRED options can be set with the random-detect flow command, as seen in the example. The average depth factor defines the multiple of the average queue space per flow that can be allocated to a single

Flow-Based WRED (FRED) 465
flow before FRED decides to start discarding packets. (Formula: average depth factor * maximum queue depth / number of active flows) The flow count, set to 64 in this example, just sets the maximum number of unique flows tracked by FRED. Just like with WFQ, the setting of the number of flows must be set to a power of 2.
Just like with DSCP-based WRED, the command output for DSCP-based FRED does not differ from the earlier precedence-based FRED example in too many ways. The changes to the default values have been highlighted in the example. The show queueing command contains the only notable difference between the command outputs in the first two examples, now listing information about all the DSCP values recommended in the DSCP RFCs. Notice that the counters point out drops for both AF21 and AF23, which were previously both treated as precedence 2 by precedence-based FRED. Also note that FRED has discarded some voice traffic (DSCP EF) in this example. Because FRED operates on all traffic in the interface FIFO queue, it cannot avoid the possibility of discarding voice traffic.
Table 6-13 summarizes many of the key concepts when comparing WRED and FRED.
Table 6-13 WRED Versus FRED
Feature |
WRED |
FRED |
|
|
|
Discards packets to avoid congestion |
Yes |
Yes |
|
|
|
Can be enabled on the physical interface concurrently with a |
No |
No |
queuing tool |
|
|
|
|
|
Can be combined with CBWFQ or LLQ policy map |
Yes |
No |
|
|
|
Bases drop decision, at least in part, on different thresholds per |
Yes |
Yes |
precedence or DSCP value |
|
|
|
|
|
Bases drop decision, at least in part, on per-flow queue depth |
No |
Yes |
|
|
|