Queuing mechanisms we have discus like LLQ is about managing the front of our queues. RED (Random Early Detection) is about managing the tail of our queue.
When a queue is full, IOS has no place
to put newly arriving packets, so it discards them this phenomenon is called
tail drop.
by default, queues use their maximum
size, and then if any new packets arrived it will discard them until there is
space again in the queue. yes dropped packets may cause significant application
performance degradation when the router interface experiences congestion when
the output queue is full.
Tail drop is bad for the overall
network, especially for TCP traffic, and especially for TCP because when
packets are lost, for whatever reason, TCP senders slow their rate of sending
data. When tail drops occur and multiple packets are lost, the TCP connections
slow even more.
The TCP window size increases
automatically but when TCP segments are dropped, it reduces back to one
segment. The window size then grows exponentially until it reaches half the
window size of what it was when the congestion occurred. The TCP window size
then grows linearly. This process is called a slow start. Meaning that the
overall network load tends to drop after multiple packets are tailed
dropped.
Interestingly, overall throughput can
be improved by discarding a few packets as queues begin to fill, rather than
waiting for the larger impact of tail drops. cisco created weighted random
early detection (WRED). Weighted random early detection Cisco iso deployment of
red Add weight (precedence / DSCP) Selectively prefer to drop packets with
lower QoS markings. Can be applied on the interface or class level.
Now the question is how WRED
works?
Whenever the average queue depth is
below the minimum threshold (20), WRED will not drop any packets at all. Until
the average queue depth is above the minimum threshold (20), WRED will start to
drop a small number of any (random) packets. If the average queue depth
increases, even more, WRED will start dropping a larger percentage of random
packets until it will reach the maximum threshold (45). If the average queue
depth reaches the maximum threshold (45), WRED drops all packets. The MPD (25%)
is the number of packets that WRED drops when we hit the maximum threshold
(45).
MPD (mark probability denominator) IOS
calculates the discard percentage used at the maximum threshold based on the
simple formula 1/MPD.
Enough talk now. Let’s see how to
configure WRED with IP Precedence and DSCP this tech.
Topology:
Goal:
- configure the topology as per the diagram
- configure IP addresses to their ports as per the topology
- configure OSPF 1 routing between router 1 and router 2
- configure WRED default MPD (mark probability denominator)
- configure WRED using IP precedence on router 1 with the following terms.
1. traffic marking with IPP value 0 and 1 allow 22 percent bandwidth
2. traffic marking with IPP value 2 and 3 allow 27 percent bandwidth
3. traffic marking with IPP value 4 and allow 30 percent bandwidth
R1(config)#interface serial 4/0
R1(config-if)#ip address 192.168.1.1 255.255.255.0
R1(config-if)#no shutdown
R1(config-if)#exit
R1(config)#interface fastEthernet 0/0
.R1(config-if)#ip address 172.16.1.1 255.255.0.0
R1(config-if)#no keepalive
R1(config-if)#no shutdown
R1(config-if)#exit
R1(config)#interface loopback 0
R1(config-if)#ip address 10.1.1.1 255.0.0.0
R1(config-if)#no shutdown
R1(config-if)#exit
R1(config)#router ospf 1
R1(config-router)#network 192.168.1.0 255.0.0.0 area 0
R1(config-router)#network 172.16.0.0 255.255.0.0 area 0
R1(config-router)#network 10.0.0.0 255.255.255.0 area 0
R1(config-router)#exit
*Feb 2 13:15:23.675: %OSPF-5-ADJCHG: Process 1, Nbr 20.1.1.1 on Serial4/0 from LOADING to FULL, Loading Done
R1(config)#class-map WRED0_1
R1(config-cmap)#match ip precedence 0 1
R1(config-cmap)#exit
R1(config)#class-map WRED2_3
R1(config-cmap)#match ip precedence 2 3
R1(config-cmap)#exit
R1(config)#class-map WRED4_5
R1(config-cmap)#match ip precedence 4 5
R1(config-cmap)#exit
R1(config)#policy-map prec_WRED
R1(config-pmap)#class WRED0_1
R1(config-pmap-c)#bandwidth percent 22
R1(config-pmap-c)#random-de
R1(config-pmap-c)#random-detect ?
atm-clp-based Enable atm-clp-based WRED as drop policy
clp parameters for each clp value
cos parameters for each cos value
cos-based Enable cos-class-based WRED as drop policy
discard-class parameters for each discard-class value
discard-class-based Enable discard-class-based WRED as drop
policy
dscp parameters for each dscp value
dscp-based Enable dscp-based WRED as drop policy
ecn explicit congestion notification
exponential-weighting-constant weight for mean queue depth calculation
precedence parameters for each precedence value
precedence-based Enable precedence-based WRED as drop policy
<cr>
R1(config-pmap-c)#random-detect
R1(config-pmap-c)#random-detect precedence 0 20 40 10
R1(config-pmap-c)#random-detect precedence 1 24 40 10
R1(config-pmap-c)#exit
R1(config-pmap)#class WRED2_3
R1(config-pmap-c)#bandwidth percent 27
R1(config-pmap-c)#random-detect
R1(config-pmap-c)#random-detect precedence 2 26 40 10
R1(config-pmap-c)#random-detect precedence 3 29 40 10
R1(config-pmap-c)#exit
R1(config-pmap)#class WRED4_5
R1(config-pmap-c)#bandwidth percent 30
R1(config-pmap-c)#random-detect
R1(config-pmap-c)#random-detect precedence 4 31 40 10
R1(config-pmap-c)#random-detect precedence 5 33 40 10
R1(config-pmap-c)#exit
R1(config-pmap)#exit
R1(config)#interface serial 4/0
.R1(config-if)#service-policy output prec_WRED
R1(config-if)#
R1(config-if)#exit
(In the next section we are going to configure DSCP)