Table Of Contents
random-detect flow average-depth-factor
Sample Display (Flow-based WRED)
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.
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.
Supported MIBs and RFCs
None.
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.
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 terminalRouter(config)# interface Serial1Router(config-if)# random-detectRouter(config-if)# random-detect flowRouter(config-if)# random-detect flow average-depth-factor 8Router(config-if)# random-detect flow count 16Router(config-if)# endThis part of the example shows how the router is configured after the flow-based WRED commands are issued:
Router# write terminalBuilding configuration...Current configuration:!version 12.0service timestamps debug datetime msec localtimeservice timestamps log uptimeno service password-encryptionservice tcp-small-servers!no logging consoleenable password lab!clock timezone PST -8clock summer-time PDT recurringip subnet-zerono ip domain-lookup!interface Ethernet0no ip addressno ip directed-broadcastno ip mroute-cacheshutdown!interface Serial0no ip addressno ip directed-broadcastno ip mroute-cacheno keepaliveshutdown!interface Serial1ip address 190.1.2.1 255.255.255.0no ip directed-broadcastload-interval 30no keepaliverandom-detectrandom-detect flowrandom-detect flow count 16random-detect flow average-depth-factor 8!router igrp 8network 190.1.0.0!ip classlessno ip http server!line con 0transport input noneline 1 16transport input allline aux 0transport input allline vty 0 4password lablogin!endCommand 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 average-depth-factor
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 flowSyntax 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 Serial1router(config-if)# random-detect flowRelated Commands
random-detect exponential-weighting-constant
random-detect flow average-depth-factor
random-detect flow count
random-detect precedence
show interfaces
show queue
show queueingrandom-detect flow average-depth-factor
To set the multiplier to be used in determining the average depth factor for a flow when flow-based Weighted Random Early Detection (WRED) is enabled, use the random-detect flow average-depth-factor interface configuration command. The no form of this command removes the current flow average depth factor value.
random-detect flow average-depth-factor scaling-factor
no random-detect flow average-depth-factor scaling-factorSyntax 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-depthBefore 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 Serial1router(config-if)# random-detect flowrouter(config-if)# random-detect flow average-depth-factor 8Related Commands
random-detect exponential-weighting-constant
random-detect flow
random-detect flow count
random-detect precedence
show interfaces
show queue
show queueingrandom-detect flow count
To set the flow count for flow-based Weighted Random Early Detection (WRED), use the random-detect flow count interface configuration command. The no form of this command removes the current flow count value.
random-detect flow count number
no random-detect flow count numberSyntax Description
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 Serial1router(config-if)# random-detect flowrouter(config-if)# random-detect flow count 16Related Commands
random-detect exponential-weighting-constant
random-detect flow
random-detect precedence
show interfaces
show queue
show queueingshow 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
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 12.0 command reference documents for a complete description of the entire output.
Sample Display (Flow-based WRED)
The following is sample output from the show interfaces command issued for the Serial1 interface for which flow-based WRED is enabled. The output shows that there are 8 active flow-based WRED flows, that the maximum number of flows active at any time is 9, and the maximum number of possible flows configured for the interface is 16.:
Router# show interface Serial1Serial1 is up, line protocol is upHardware is HD64570Internet address is 190.1.2.1/24MTU 1500 bytes, BW 1544 Kbit, DLY 20000 usec,reliablility 255/255, txload 237/255, rxload 1/255Encapsulation HDLC, loopback not setKeepalive not setLast input 00:00:22, output 00:00:00, output hang neverLast clearing of "show interface" counters 00:17:58Input queue: 0/75/0 (size/max/drops); Total output drops: 2479Queueing strategy: random early detection(RED)flows (active/max active/max): 8/9/16mean queue depth: 27drops: class random tail min-th max-th mark-prob0 946 0 20 40 1/101 488 0 22 40 1/102 429 0 24 40 1/103 341 0 26 40 1/104 235 0 28 40 1/105 40 0 31 40 1/106 0 0 33 40 1/107 0 0 35 40 1/10rsvp 0 0 37 40 1/1030 second input rate 1000 bits/sec, 2 packets/sec30 second output rate 119000 bits/sec, 126 packets/sec1346 packets input, 83808 bytes, 0 no bufferReceived 12 broadcasts, 0 runts, 0 giants, 0 throttles0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored, 0 abort84543 packets output, 9977642 bytes, 0 underruns0 output errors, 0 collisions, 6 interface resets0 output buffer failures, 0 output buffers swapped out0 carrier transitionsDCD=up DSR=up DTR=up RTS=up CTS=upSample Display (DWFQ)
The following is sample output from the show interfaces command when DWFQ is enabled on an interface. Notice that the queueing strategy is listed as "VIP-based fair queuing."
Router# show interfaces FastEthernet1/1/0FastEthernet1/1/0 is up, line protocol is upHardware is cyBus FastEthernet Interface, address is 0007.f618.4448 (bia 00e0)Description: pkt input i/f for WRL tests (to pagent)Internet address is 80.0.2.70/24MTU 1500 bytes, BW 100000 Kbit, DLY 100 usec, rely 255/255, load 1/255Encapsulation ARPA, loopback not set, keepalive not set, fdx, 100BaseTX/FXARP type: ARPA, ARP Timeout 04:00:00Last input never, output 01:11:01, output hang neverLast clearing of "show interface" counters 01:12:31Queueing strategy: VIP-based fair queuingOutput queue 0/40, 0 drops; input queue 0/75, 0 drops30 second input rate 0 bits/sec, 0 packets/sec30 second output rate 0 bits/sec, 0 packets/sec0 packets input, 0 bytes, 0 no bufferReceived 0 broadcasts, 0 runts, 0 giants0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored, 0 abort0 watchdog, 0 multicast0 input packets with dribble condition detected1 packets output, 60 bytes, 0 underruns0 output errors, 0 collisions, 0 interface resets0 babbles, 0 late collision, 0 deferred0 lost carrier, 0 no carrier0 output buffers copied, 0 interrupts, 0 failuresSample Display (DWRED)
The following is sample output from the show interfaces command when DWRED is enabled on an interface. Notice that the packet drop strategy is listed as "VIP-based weighted RED."
Router# show interfaces hssi0/0/0Hssi0/0/0 is up, line protocol is upHardware is cyBus HSSIDescription: 45Mbps to R1Internet address is 200.200.14.250/30MTU 4470 bytes, BW 45045 Kbit, DLY 200 usec, rely 255/255, load 1/255Encapsulation HDLC, loopback not set, keepalive set (10 sec)Last input 00:00:02, output 00:00:03, output hang neverLast clearing of "show interface" counters neverQueueing strategy: fifoPacket Drop strategy: VIP-based weighted REDOutput queue 0/40, 0 drops; input queue 0/75, 0 drops5 minute input rate 0 bits/sec, 0 packets/sec5 minute output rate 0 bits/sec, 0 packets/sec1976 packets input, 131263 bytes, 0 no bufferReceived 1577 broadcasts, 0 runts, 0 giants0 parity4 input errors, 4 CRC, 0 frame, 0 overrun, 0 ignored, 0 abort1939 packets output, 130910 bytes, 0 underruns0 output errors, 0 applique, 3 interface resets0 output buffers copied, 0 interrupts, 0 failuresRelated 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 queueingshow 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
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 Serial1Output queue for Serial1 is 13/0Packet 1, flow id: 264, linktype: ip, length: 118, flags: 0x88source: 190.1.1.3, destination: 190.1.2.2, id: 0x0000, ttl: 59, prot: 0data: 0x0001 0x0203 0x0405 0x0607 0x0809 0x0A0B 0x0C0D0x0E0F 0x1011 0x1213 0x1415 0x1617 0x1819 0x1A1BPacket 2, flow id: 264, linktype: ip, length: 118, flags: 0x88source: 190.1.1.4, destination: 190.1.2.2, id: 0x0000, ttl: 59, prot: 0data: 0x0001 0x0203 0x0405 0x0607 0x0809 0x0A0B 0x0C0D0x0E0F 0x1011 0x1213 0x1415 0x1617 0x1819 0x1A1Bdescribes the fields shown in this display.
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.
Router# show queue serial1Input queue: 0/75/0 (size/max/drops); Total output drops: 303628Queueing strategy: weighted fairOutput queue: 64/1000/64/303628 (size/max total/threshold/drops)Conversations 2/2/256 (active/max active/max total)Reserved Conversations 0/0 (allocated/max allocated)(depth/weight/discards/tail drops/interleaves) 45/4096/1123/0/0Conversation 244, linktype: ip, length: 50source: 55.1.1.1, destination: 66.1.1.2, id: 0x0000, ttl: 59,TOS: 0 prot: 6, source port 55, destination port 55(depth/weight/discards/tail drops/interleaves) 19/4096/302541/0/0Conversation 185, linktype: ip, length: 118source: 55.1.1.1, destination: 66.1.1.2, id: 0x0000, ttl: 59,TOS: 0 prot: 17, source port 20, destination port 20describes the fields shown in this display.
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 queueingshow queueing
To list all or selected configured queueing strategies, use the show queueing privileged EXEC command.
show queueing [custom | fair | priority | red]
Syntax Description
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 customCurrent custom queue configuration:List Queue Args3 10 default3 3 interface Tunnel33 3 protocol ip3 3 byte-count 444 limit 3The 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.
Router# show queueingCurrent fair queue configuration:Interface Discard Dynamic Reservedthreshold queue count queue countSerial0 64 256 0Serial1 64 256 0Serial2 64 256 0Serial3 64 256 0Current priority queue configuration:List Queue Args1 high protocol cdp2 medium interface Ethernet1Current custom queue configuration:Current RED queue configuration:Interface: Ethernet3 Exp-weight-constant: 9Class Min-th Max-th Mark-prob0 20 40 1/101 22 40 1/102 24 40 1/103 26 40 1/104 28 40 1/105 31 40 1/106 33 40 1/107 35 40 1/10rsvp 37 40 1/10The 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 redCurrent RED queue configuration:Interface: Serial1 Exp-weight-constant: 9Class Min-th Max-th Mark-prob0 20 40 1/101 22 40 1/102 24 40 1/103 26 40 1/104 28 40 1/105 31 40 1/106 33 40 1/107 35 40 1/10rsvp 37 40 1/10Max flow count: 16 Average depth factor: 8Related Commands
You can use the master indexes or search online to find documentation of 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 queue