|
|
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:
Flow-based WRED relies on these two main approaches to remedy the problem of unfair packet drop:
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.
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.
The flow-based WRED feature is supported on these Cisco router platforms:
Perform the following tasks before you configure flow-based WRED:
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.
None.
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:
| Step | Command | Purpose | ||
|---|---|---|---|---|
| ||||
| random-detect flow average-depth-factor scaling-factor | |||
| random-detect flow count number |
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 terminal 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
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.
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 flowThis command has no arguments or keywords.
Flow-based WRED is disabled by default.
Interface configuration
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.
The following example enables flow-based WRED on the Serial1 interface:
router(config)# interface Serial1 router(config-if)# random-detect flow
random-detect exponential-weighting-constant
random-detect flow average-depth-factor
random-detect flow count
random-detect precedence
show interfaces
show queue
show queueing
Syntax Description
scaling-factor | The number 2, 4, 8 or 16. The default value is 4. |
4
Interface configuration
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.
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
random-detect exponential-weighting-constant
random-detect flow
random-detect flow count
random-detect precedence
show interfaces
show queue
show queueing
number | Specify a value from 0 to 215. |
256
Interface configuration
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.
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
random-detect exponential-weighting-constant
random-detect flow
random-detect precedence
show interfaces
show queue
show queueing
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. |
EXEC
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:
Refer to the Cisco IOS Release 12.0 command reference documents for a complete description of the entire output.
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 Serial1
Serial1 is up, line protocol is up
Hardware is HD64570
Internet address is 190.1.2.1/24
MTU 1500 bytes, BW 1544 Kbit, DLY 20000 usec,
reliablility 255/255, txload 237/255, rxload 1/255
Encapsulation HDLC, loopback not set
Keepalive not set
Last input 00:00:22, output 00:00:00, output hang never
Last clearing of "show interface" counters 00:17:58
Input queue: 0/75/0 (size/max/drops); Total output drops: 2479
Queueing strategy: random early detection(RED)
flows (active/max active/max): 8/9/16
mean queue depth: 27
drops: class random tail min-th max-th mark-prob
0 946 0 20 40 1/10
1 488 0 22 40 1/10
2 429 0 24 40 1/10
3 341 0 26 40 1/10
4 235 0 28 40 1/10
5 40 0 31 40 1/10
6 0 0 33 40 1/10
7 0 0 35 40 1/10
rsvp 0 0 37 40 1/10
30 second input rate 1000 bits/sec, 2 packets/sec
30 second output rate 119000 bits/sec, 126 packets/sec
1346 packets input, 83808 bytes, 0 no buffer
Received 12 broadcasts, 0 runts, 0 giants, 0 throttles
0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored, 0 abort
84543 packets output, 9977642 bytes, 0 underruns
0 output errors, 0 collisions, 6 interface resets
0 output buffer failures, 0 output buffers swapped out
0 carrier transitions
DCD=up DSR=up DTR=up RTS=up CTS=up
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/0
FastEthernet1/1/0 is up, line protocol is up
Hardware 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/24
MTU 1500 bytes, BW 100000 Kbit, DLY 100 usec, rely 255/255, load 1/255
Encapsulation ARPA, loopback not set, keepalive not set, fdx, 100BaseTX/FX
ARP type: ARPA, ARP Timeout 04:00:00
Last input never, output 01:11:01, output hang never
Last clearing of "show interface" counters 01:12:31
Queueing strategy: VIP-based fair queuing
Output queue 0/40, 0 drops; input queue 0/75, 0 drops
30 second input rate 0 bits/sec, 0 packets/sec
30 second output rate 0 bits/sec, 0 packets/sec
0 packets input, 0 bytes, 0 no buffer
Received 0 broadcasts, 0 runts, 0 giants
0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored, 0 abort
0 watchdog, 0 multicast
0 input packets with dribble condition detected
1 packets output, 60 bytes, 0 underruns
0 output errors, 0 collisions, 0 interface resets
0 babbles, 0 late collision, 0 deferred
0 lost carrier, 0 no carrier
0 output buffers copied, 0 interrupts, 0 failures
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/0 Hssi0/0/0 is up, line protocol is up Hardware is cyBus HSSI Description: 45Mbps to R1 Internet address is 200.200.14.250/30 MTU 4470 bytes, BW 45045 Kbit, DLY 200 usec, rely 255/255, load 1/255 Encapsulation HDLC, loopback not set, keepalive set (10 sec) Last input 00:00:02, output 00:00:03, output hang never Last clearing of "show interface" counters never Queueing strategy: fifo Packet Drop strategy: VIP-based weighted RED Output queue 0/40, 0 drops; input queue 0/75, 0 drops 5 minute input rate 0 bits/sec, 0 packets/sec 5 minute output rate 0 bits/sec, 0 packets/sec 1976 packets input, 131263 bytes, 0 no buffer Received 1577 broadcasts, 0 runts, 0 giants 0 parity 4 input errors, 4 CRC, 0 frame, 0 overrun, 0 ignored, 0 abort 1939 packets output, 130910 bytes, 0 underruns 0 output errors, 0 applique, 3 interface resets 0 output buffers copied, 0 interrupts, 0 failures
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
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
interface-type | The name of the interface. |
interface-number | The number of the interface. |
Privileged EXEC
This command first appeared in Cisco IOS Release12.0. This command displays statistics for interfaces configured with the fair queueing strategy.
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 Output queue for Serial1 is 13/0 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
Table 1 describes the fields shown in this display.
| Field | Description |
|---|---|
Packet | Packet number. |
flow id | Flow-based WRED number. |
linktype | Protocol name. |
length | Packet length. |
flags | Internal version-specific flags. |
source | Source IP address. |
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.
Router# show queue serial1
Input queue: 0/75/0 (size/max/drops); Total output drops: 303628 Queueing strategy: weighted fair Output 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/0 Conversation 244, linktype: ip, length: 50 source: 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/0 Conversation 185, linktype: ip, length: 118 source: 55.1.1.1, destination: 66.1.1.2, id: 0x0000, ttl: 59, TOS: 0 prot: 17, source port 20, destination port 20
Table 2 describes the fields shown in this display.
| 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. |
destination | Destination IP address. |
id | Packet ID. |
ttl | Time to live count. |
TOS | IP type of service. |
prot | Layer 4 protocol number. |
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
To list all or selected configured queueing strategies, use the show queueing privileged EXEC command.
show queueing [custom | fair | priority | red]
(Optional) Status of the custom queueing list configuration. | |
(Optional) Status of the fair queueing configuration. | |
(Optional) Status of the priority queueing list configuration. | |
(Optional) Status of the Weighted Random Early Detection (WRED) configuration, including configuration of flow-based WRED. |
If no keyword is entered, this command shows the configuration of all interfaces.
Privileged EXEC
This command first appeared in Cisco IOS Release 10.3.
The following is sample output from the show queueing custom command:
Router# show queueing custom
Current custom queue configuration:
List Queue Args
3 10 default
3 3 interface Tunnel3
3 3 protocol ip
3 3 byte-count 444 limit 3
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.
Router# show queueing Current fair queue configuration: Interface Discard Dynamic Reserved threshold queue count queue count Serial0 64 256 0 Serial1 64 256 0 Serial2 64 256 0 Serial3 64 256 0 Current priority queue configuration: List Queue Args 1 high protocol cdp 2 medium interface Ethernet1 Current custom queue configuration: Current RED queue configuration: Interface: Ethernet3 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
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
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
![]()
![]()
![]()
![]()
![]()
![]()
![]()
Posted: Mon Sep 20 18:23:20 PDT 1999
Copyright 1989-1999©Cisco Systems Inc.