Congestion Avoidance

So far we've talked about how devices should behave when the network is congested. But what if we can prevent network congestion from happening? What are our options for avoiding network congestion in the first place?

11.4.1. Weighted Random Early Detection (WRED)

WRED attempts to avoid network congestion by selectively dropping packets based on IP Precedence. Packets with a higher Precedence value are more likely to get through the router during periods of network congestion while packets with a lower Precedence value are more likely to get dropped. Another way to think of this is to replace the word Detection with Drop, because that's what WRED is all aboutdropping packets. By dropping packets, the router hopes to cause the network device that is transmitting the packets to decrease its transmission rate. It's similar, in a sense, to not answering when someone calls your name. With TCP, the device receiving packets sends an acknowledgement of each packet. The transmitting then knows that the packet was actually received. By dropping packets (and also not acknowledging them), the transmitting device will eventually discover that its packets are being dropped or lost and should automatically decrease its transmission rate as a result.

On the other hand, for real-time streaming applications that use UDP instead of TCP, dropping packets won't affect the transmission rate.

11.4.1.1. Configuring WRED on an interface

To enable WRED, we use the command random-detect.

interface Serial0 ip unnumbered Ethernet0 random-detect

We can verify that it's working by reading the output from the show interface command. The relevant line in the output, highlighted in bold, says Random Early Detection (RED), which to the router is the same thing as WRED.

Router>show interface serial0 Serial0 is down, line protocol is down Hardware is HD64570 Interface is unnumbered. Using address of Ethernet0 (192.168.2.1) MTU 1500 bytes, BW 1544 Kbit, DLY 20000 usec, reliability 255/255, txload 1/255, rxload 1/255 Encapsulation HDLC, loopback not set Keepalive set (10 sec) Last input never, output 50w5d, output hang never Last clearing of "show interface" counters never Input queue: 0/75/0/0 (size/max/drops/flushes); Total output drops: 0 Queueing strategy: random early detection(RED)

 

11.4.1.2. Using WRED instead of Tail-drop in CBWFQ

In the CBWFQ section, we claimed that an advantage of CBWFQ is that it allows you to use WRED along with it. And in Table 11-3, we noted that we could use WRED instead of tail-drop . Tail-drop is the default packet dropping mechanism; it does not differentiate among various packet types.

A router drops packets during periods of network congestion when it has filled up its queues. And with tail-drop, once the queues are full, the router simply starts dropping packets of any traffic type. Obviously, it's best to drop less important packets, so WRED is far superior to tail-drop.

To make WRED a part of your CBWFQ routing policy, we use the same command (random-detect) in our policy-map.

policy-map policy1 class low-priority-class bandwidth 50 random-detect

Категории