Professional Documents
Culture Documents
3600 Flow-Based WRED
3600 Flow-Based WRED
3600 Flow-Based WRED
Feature Summary
Flow-based Weighted Random Early Detection (WRED) is a feature of WRED that forces WRED
to afford greater fairness to all flows on an interface in regard to how packets are dropped.
WRED relies on a measurement called the average queue length to determine when to drop packets.
When the packet count of the average queue length is in the upper range, WRED begins dropping
packets. At this point, WRED applies a nonzero drop probability to all packets that arrive on an
interface, indiscriminate of the kinds of flows to which the packets belong.
Before you consider the advantages that use of flow-based WRED offers, it helps to think about how
WRED (without flow-based WRED configured) affects different kinds of packet flows. Even before
flow-based WRED classifies packet flows, flows can be thought of as belonging to one of these
categories:
• Nonadaptive flows, which are flows that do not respond to congestion
• Robust flows, which on average have a uniform data rate and slow down in response to
congestion
• Fragile flows, which, though congestion-aware, have fewer packets buffered at a gateway than do
robust flows
Because of its packet-drop behavior—that is, that all flows, even those with relatively fewer packets
in the output queue, are susceptible to packet drop during periods of congestion—WRED tends
toward bias against fragile flows. Though fragile flows have fewer buffered packets, they are dropped
at the same rate as packets of other flows.
Flow-based WRED relies on these two main approaches to remedy the problem of unfair packet
drop:
• It classifies incoming traffic into flows based on parameters such as destination and source
addresses and ports.
• It maintains state about active flows, which are flows that have packets in the output queues.
Flow-based WRED uses this classification and state information to ensure that each flow does not
consume more than its permitted share of the output buffer resources. Flow-based WRED
determines which flows monopolize resources and it more heavily penalizes these flows.
Here is how flow-based WRED ensures fairness among flows: it maintains a count of the number of
active flows that exist through an output interface. Given the number of active flows and the output
queue size, flow-based WRED determines the number of buffers available per flow.
Flow-Based WRED 1
Platforms
To allow for some burstiness, flow-based WRED scales the number of buffers available per flow by
a configured factor and allows each active flow to have a certain number of packets in the output
queue. This scaling factor is common to all flows. The outcome of the scaled number of buffers
becomes the per-flow limit. When a flow exceeds the per-flow limit, the probability that a packet
from that flow will be dropped increases.
Benefits
• Ensures that flows that respond to WRED packet drops by backing off packet transmission are
protected from flows that do not respond to WRED packet drops.
• Prohibits a single flow from monopolizing the buffer resources at an interface.
Restrictions
WRED, custom queueing (CQ), priority queueing (PQ), and weighted fair queueing (WFQ) are
mutually exclusive on an interface. The router software produces an error message if you configure
WRED and any one of these queueing strategies simultaneously.
Platforms
The flow-based WRED feature is supported on these Cisco router platforms:
• Cisco 1600 series.
• Cisco 2500 series
• Cisco 3600 series
• Cisco 4000 series (including 4500 and 4700 series)
• Cisco 7200 series
• On the RSP interface card on a Cisco 7500 series router.
Prerequisites
Perform the following tasks before you configure flow-based WRED:
• Enable WRED, using the random-detect command.
• Optionally, configure the weight factor used in calculating the average queue length using the
random-detect exponential-weighting-constant command.
• Optionally, configure parameters for packets with a specific IP Precedence using the
random-detect precedence command.
For complete information on these tasks and commands, see the Cisco IOS Release 12.0 Quality of
Service Solutions Configuration Guide and the Cisco IOS Release 12.0 Quality of Service Solutions
Command Reference.
Configuration Task
Before you can configure flow-based WRED, you must enable WRED and configure it. For
complete information on the tasks and commands you use, see the Cisco IOS Release 12.0 Quality
of Service Solutions Configuration Guide and the Cisco IOS Release 12.0 Quality of Service
Solutions Command Reference.
To configure an interface for flow-based WRED, use the following commands in the order specified
in interface configuration mode:
Configuration Examples
The following example enables Weighted Random Early Detection (WRED) on the Serial1 interface
and configures flow-based WRED. The random-detect command is used to enable WRED. Once
WRED is enabled, the random-detect flow command can be used to enable flow-based WRED.
Flow-Based WRED 3
Configuration Examples
After flow-based WRED is turned on, the random-detect flow average-depth-factor is used to set
the scaling factor to 8 and the random-detect flow count command is used to set the flow count to
16. The scaling factor is used to scale the number of buffers available per flow and to determine the
number of packets allowed in the output queue for each active flow.
Router#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#interface Serial1
Router(config-if)#random-detect
Router(config-if)#random-detect flow
Router(config-if)#random-detect flow average-depth-factor 8
Router(config-if)#random-detect flow count 16
Router(config-if)#end
This part of the example shows how the router is configured after the flow-based WRED commands
are issued:
Router#write terminal
Building configuration...
Current configuration:
!
version 12.0
service timestamps debug datetime msec localtime
service timestamps log uptime
no service password-encryption
service tcp-small-servers
!
no logging console
enable password lab
!
clock timezone PST -8
clock summer-time PDT recurring
ip subnet-zero
no ip domain-lookup
!
interface Ethernet0
no ip address
no ip directed-broadcast
no ip mroute-cache
shutdown
!
interface Serial0
no ip address
no ip directed-broadcast
no ip mroute-cache
no keepalive
shutdown
!
interface Serial1
ip address 190.1.2.1 255.255.255.0
no ip directed-broadcast
load-interval 30
no keepalive
random-detect
random-detect flow
random-detect flow count 16
random-detect flow average-depth-factor 8
!
router igrp 8
network 190.1.0.0
!
ip classless
no ip http server
!
line con 0
transport input none
line 1 16
transport input all
line aux 0
transport input all
line vty 0 4
password lab
login
!
end
Flow-Based WRED 5
Command Reference
Command Reference
This section documents new or modified commands. All other commands used with this feature are
documented in the Cisco IOS Release 12.0 command references.
• random-detect flow
• random-detect flow average-depth-factor
• random-detect flow count
• show interfaces
• show queue
• show queueing
random-detect flow
To enable flow-based Weighted Random Early Detection (WRED), use the random-detect flow
interface configuration command. The no form of this command disables flow-based WRED.
random-detect flow
no random-detect flow
Syntax Description
This command has no arguments or keywords.
Default
Flow-based WRED is disabled by default.
Command Mode
Interface configuration
Usage Guidelines
This command first appeared in Release 12.0(3)T.
You must use this command to enable flow-based WRED before you can use the random-detect
flow average-depth-factor and random-detect flow count commands to further configure the
parameters of flow-based WRED.
Before you can enable flow-based WRED, you must enable and configure WRED. For complete
information, see the Cisco IOS Release 12.0 Quality of Service Solutions Configuration Guide and
the Cisco IOS Release 12.0 Quality of Service Solutions Command Reference.
Example
The following example enables flow-based WRED on the Serial1 interface:
router(config)# interface Serial1
router(config-if)# random-detect flow
Related Commands
random-detect exponential-weighting-constant
random-detect flow average-depth-factor
random-detect flow count
random-detect precedence
show interfaces
show queue
show queueing
Flow-Based WRED 7
Command Reference
Syntax Description
Syntax Description
Default
4
Command Mode
Interface configuration
Usage Guidelines
This command first appeared in Release 12.0(3)T.
Use this command to specify the scaling factor that flow-based WRED should use in scaling the
number of buffers available per flow and in determining the number of packets allowed in the output
queue for each active flow. This scaling factor is common to all flows. The outcome of the scaled
number of buffers becomes the per-flow limit.
If this command is not used and flow-based WRED is enabled, the average depth scaling factor
defaults to 4.
A flow is considered nonadaptive—that is, it takes up too much of the resources—when the average
flow depth times the specified multiplier (scaling factor) is less than the flow’s depth, that is:
average-flow-depth * (scaling factor) < flow-depth
Before you use this command, you must use the random-detect flow command to enable flow-based
WRED for the interface. To configure flow-based WRED, you also use the random-detect flow
count command.
Example
The following example enables flow-based WRED on the Serial1 interface, sets the scaling factor
for the average flow depth to 8:
router(config)# interface Serial1
router(config-if)# random-detect flow
router(config-if)# random-detect flow average-depth-factor 8
Related Commands
random-detect exponential-weighting-constant
random-detect flow
random-detect flow count
random-detect precedence
show interfaces
show queue
show queueing
Flow-Based WRED 9
Command Reference
Syntax Description
number Specify a value from 0 to 215.
Default
256
Command Mode
Interface configuration
Usage Guidelines
This command first appeared in Release 12.0(3)T.
Before you use this command, you must use the random-detect flow command to enable flow-based
WRED for the interface.
Example
The following example enables flow-based WRED on the Serial1 interface and sets the flow
threshold constant to 16:
router(config)# interface Serial1
router(config-if)# random-detect flow
router(config-if)# random-detect flow count 16
Related Commands
random-detect exponential-weighting-constant
random-detect flow
random-detect precedence
show interfaces
show queue
show queueing
show interfaces
To display statistics for a specific interface or all interfaces on the router, use the show interfaces
EXEC command. The resulting output varies depending on the network for which an interface has
been configured.
show interfaces [type slot / port-adapter / port] (for ports on VIP interface processors in the
Cisco 7500 series routers)
Syntax Description
type (Optional) Type of interface.
slot (Optional) Refer to the appropriate hardware manual for slot information.
port-adapter (Optional) Refer to the appropriate hardware manual for information about port
adapter compatibility.
port (Optional) Refer to the appropriate hardware manual for port information.
Command Mode
EXEC
Usage Guidelines
This command first appeared in Cisco IOS Release 10.0.
The show interfaces command displays statistics for the network interfaces.
The output of the show interfaces command varies based on the interface type and configuration.
This document describes the output related to these feature and services:
• Flow-based WRED
• Distributed weighted fair queueing (DWFQ)
• Weighted Random Early Detection (DWRED)
Refer to the Cisco IOS Release 11.1 command reference documents for a complete description of
the entire output.
Flow-Based WRED 11
Command Reference
Flow-Based WRED 13
Command Reference
Related Commands
custom-queue-list
fair-queue
priority-group
priority-list interface
priority-list queue-limit
queue-list interface
queue-list queue byte-count
random-detect
random-detect flow average-depth-factor
random-detect flow count
show queueing
show queue
To list fair queueing configuration and statistics for a particular interface as flow-based WRED
information, use the show queue privileged EXEC command.
show queue interface-type interface-number
Syntax Description
interface-type The name of the interface.
Command Mode
Privileged EXEC
Usage Guidelines
This command first appeared in Cisco IOS Release12.0. This command displays statistics for
interfaces configured with the fair queueing strategy.
Sample Display
The following is sample output from the show queue command issued for the Serial1 interface for
which flow-based WRED is enabled and configured. The output shows information for each packet
in the queue; the data identifies the packet by number, the flow-based queue to which the packet
belongs, the protocol used, and so forth:
Router#show queue Serial1
Packet 1, flow id: 264, linktype: ip, length: 118, flags: 0x88
source: 190.1.1.3, destination: 190.1.2.2, id: 0x0000, ttl: 59, prot: 0
data: 0x0001 0x0203 0x0405 0x0607 0x0809 0x0A0B 0x0C0D
0x0E0F 0x1011 0x1213 0x1415 0x1617 0x1819 0x1A1B
Packet 2, flow id: 264, linktype: ip, length: 118, flags: 0x88
source: 190.1.1.4, destination: 190.1.2.2, id: 0x0000, ttl: 59, prot: 0
data: 0x0001 0x0203 0x0405 0x0607 0x0809 0x0A0B 0x0C0D
0x0E0F 0x1011 0x1213 0x1415 0x1617 0x1819 0x1A1B
Flow-Based WRED 15
Command Reference
Field Description
destination Destination IP address
id Packet ID.
ttl Time to live count.
prot Layer 4 protocol number.
data Packet data.
The following is sample output from the show queue command when weighted fair queueing
(WFQ) is configured. There are two active conversations on the serial 1 interface. WFQ ensures that
both of these IP data streams, one TCP and other UDP, receive equal bandwidth on the interface
while they have messages in the pipeline.
Field Description
Input Queue Input queue size in packets.
Total output drops Total output packet drops.
Queueing strategy Type of queueing active on this interface.
Output queue Output queue size in packets.
Conversations WFQ conversation number.
Reserved Conversations Total number of reserved WFQ conversations. Default is 256.
depth Queue depth for the conversation in packets.
weight Weight used in WFQ.
discards Number of packet discards for the conversation.
tail drops Number of tail drop packets for the conversation.
interleaves Number of packets interleaved.
linktype Protocol name.
length Packet length.
source Source IP address.
Field Description
destination Destination IP address.
id Packet ID.
ttl Time to live count.
TOS IP type of service.
prot Layer 4 protocol number.
Related Commands
custom-queue-list
fair-queue
priority-group
priority-list interface
priority-list queue-limit
queue-list interface
queue-list queue byte-count
random-detect
random-detect flow average-depth-factor
random-detect flow count
show interfaces
show queueing
Flow-Based WRED 17
Command Reference
show queueing
To list all or selected configured queueing strategies, use the show queueing privileged EXEC
command.
show queueing [custom | fair | priority | red]
Syntax Description
custom (Optional) Status of the custom queueing list configuration.
Default
If no keyword is entered, this command shows the configuration of all interfaces.
Command Mode
Privileged EXEC
Usage Guidelines
This command first appeared in Cisco IOS Release 10.3.
Sample Displays
The following is sample output from the show queueing custom command:
Router# show queueing custom
Current custom queue configuration:
The following is sample output from the show queueing command. There are two active
conversations in the serial interface 0. Weighted fair queueing ensures that both of these IP data
streams—both using TCP—receive equal bandwidth on the interface while they have messages in
the pipeline, even though there is more FTP data in the queue than RCP data.
The following is sample output from the show queueing command with the red keyword specified.
The output shows that the interface is configured for flow-based WRED to ensure fairness among
flows in regard to packet drop. The random-detect flow average-depth-factor command was used
to configure a scaling factor of 8 for this interface. The scaling factor is used to scale the number of
buffers available per flow and to determine the number of packets allowed in the output queue of
each active flow before the queue is susceptible to packet drop. As the output shows, the maximum
flow count for this interface was set to 16 by the random-detect flow count command.
Router# show queueing red
Current RED queue configuration:
Interface: Serial1 Exp-weight-constant: 9
Class Min-th Max-th Mark-prob
0 20 40 1/10
1 22 40 1/10
2 24 40 1/10
3 26 40 1/10
4 28 40 1/10
5 31 40 1/10
6 33 40 1/10
7 35 40 1/10
rsvp 37 40 1/10
Max flow count: 16 Average depth factor: 8
Related Commands
You can use the master indexes or search online to find documentation of related commands.
custom-queue-list
fair-queue
priority-group
Flow-Based WRED 19
Command Reference
priority-list interface
priority-list queue-limit
queue-list interface
queue-list queue byte-count
random-detect
random-detect flow average-depth-factor
random-detect flow count
show interfaces
show queue