WRED Configuration
This chapter contains a complete sample of configuring WRED.
Topology
Simple configuration of WRED
L2/L3 Interface
The following steps describe how to configure WRED.
#configure terminal | Enter configure mode. |
(config)#qos enable | Enable QoS globally. |
(config)#qos statistics | Enable QoS statistics. |
(config)#class-map type qos match-all C1 | Configure class-map of type qos with name C1, and enter into class-map mode |
(config-cmap-que)#match cos 1 | Configure match cos value 1 |
(config-cmap-que)#exit | Exit out of class-map mode |
(config)#policy-map type qos p1 | Configure plicy-map of type qos with name p1, and enter into policy-map mode |
(config-cmap-que)#class type qos C1 | Enter class-map configuration mode |
(config-cmap-que)# police cir 100 mbps pir 200 mbpsexit | Configure police rate of cir 100 mbps and pir 200 mbpsExit out of class-map mode |
(config-pmap-c-que)#exit | Exit out of policy-class mode |
(config-pmap-qos)#exi | Exit out of policy-class mode |
(config)#policy-map type queuing default p3 | Configure policy-map of type queuing with name p3, and enter into policy-map mode |
(config-cmap-que)#class type queuing default q0 | Enter class type of type queuing default configuration mode for q0 |
(config-pmap-c-que-def)#wrr-queue weight 10 | Configure WRR weight of 10 |
(config-pmap-c-que-def)#random-detect min-threshold 50 max-threshold 80 kbytes | Configure WRED for minimum threshold of 50 kbytest and maximum threshold of 80 kbytes of queue size. |
(config-pmap-c-que-def)#exit | Exit out of class configuration mode |
(config)#interface xe3 | Enter interface mode |
(config-if)#service-policy type queuing output P3 | Attach service-policy p3 of type queuing on out direction |
(config-if)#exit | Exit out of interface mode |
(config)#interface xe2 | Enter interface mode |
(config-if)#service-policy type qos input p1 | Attach service-policy p1 of type qos on in direction |
(config-if)#exit | Exit out of interface mode |
(config)#bridge 1 protocol rstp vlan-bridge | Specify VLAN for bridge 1. |
(config)#vlan database | Enter the VLAN configuration mode. |
(config-vlan)#vlan 2-3 bridge 1 state enable | Enable VLAN (2-3) on bridge 1. Specifying the enable state. |
(config-vlan)#exit | Exit the VLAN configuration mode. |
(config)#interface vlan1.2 | Enter interface mode. |
(config-if)# ip address 10.1.1.2/24 | Configure the IP address. |
(config-if)#exit | Exit the interface mode. |
(config)#interface vlan1.3 | Enter interface mode. |
(config-if)# ip address 20.1.1.1/24 | Configure the IP address. |
(config-if)#exit | Exit the interface mode. |
(config)#interface xe2 | Enter interface mode. |
(config-if)#switchport | Configure xe2 as a Layer 2 port. |
(config-if)#bridge-group 1 | Associate the interface with bridge group 1. |
(config-if)#switchport mode trunk | Configure port as a trunk. |
(config-if)#switchport trunk allowed vlan all | Allow all the VLANs on the xe3 interface. |
(config-if)#exit | Exit the interface mode. |
(config)#interface xe3 | Enter interface mode. |
(config-if)#switchport | Configure xe3 as a Layer 2 port. |
(config-if)#bridge-group 1 | Associate the interface with bridge group 1. |
(config-if)#switchport mode trunk | Configure port as a trunk. |
(config-if)#switchport trunk allowed vlan all | Allow all the VLANs on the xe3 interface. |
(config-if)#exit | Exit the interface mode. |
Validation
Enter the commands below to confirm the configurations.
#show running-config qos
os enable
qos statistics
!
class-map type qos match-all 1
!
class-map type qos match-all C1
match cos 1
!
policy-map type qos p1
class type qos C1
police cir 100 mbps pir 200 mbps
exit
!
!
policy-map type queuing default p3
class type queuing default q0
wrr-queue weight 10
random-detect min-threshold 50 max-threshold 80 kbytes drop-probability 80
exit
!
interface xe2
service-policy type qos input p1
!
interface xe3
service-policy type queuing output p3
#show policy-map interface xe2
Interface xe2
Type QoS statistics status : enabled
Class-map (qos): C1 (match all)
match cos 1
police cir 100 mbps pir 200 mbps
Type Queuing policy-map : default-out-policy
Class-map (queuing): q0
priority
output : 0 packets, 0 bytes
dropped : 0 packets, 0 bytes
Class-map (queuing): q1
priority
output : 0 packets, 0 bytes
dropped : 0 packets, 0 bytes
Class-map (queuing): q2
priority
output : 0 packets, 0 bytes
dropped : 0 packets, 0 bytes
Class-map (queuing): q3
priority
output : 0 packets, 0 bytes
dropped : 0 packets, 0 bytes
Class-map (queuing): q4
priority
output : 0 packets, 0 bytes
dropped : 0 packets, 0 bytes
Class-map (queuing): q5
priority
output : 0 packets, 0 bytes
dropped : 0 packets, 0 bytes
Class-map (queuing): q6
priority
output : 6 packets, 724 bytes
dropped : 0 packets, 0 bytes
Class-map (queuing): q7
priority
output : 0 packets, 0 bytes
dropped : 0 packets, 0 bytes
Class-map (queuing): mc-q0
output : 0 packets, 0 bytes
dropped : 0 packets, 0 bytes
Class-map (queuing): mc-q1
output : 0 packets, 0 bytes
dropped : 0 packets, 0 bytes
Class-map (queuing): mc-q2
output : 0 packets, 0 bytes
dropped : 0 packets, 0 bytes
Class-map (queuing): mc-q3
output : 0 packets, 0 bytes
dropped : 0 packets, 0 bytes
Class-map (queuing): mc-q4
output : 0 packets, 0 bytes
dropped : 0 packets, 0 bytes
Class-map (queuing): mc-q5
output : 0 packets, 0 bytes
dropped : 0 packets, 0 bytes
Class-map (queuing): mc-q6
output : 0 packets, 0 bytes
dropped : 0 packets, 0 bytes
Class-map (queuing): mc-q7
output : 1 packets, 90 bytes
dropped : 0 packets, 0 bytes
Wred/Tail Drop Statistics :
----------------------
green : 0 packets
yellow : 0 packets
red : 0 packets
#show policy-map interface xe3
Interface xe3
Type Queuing policy-map : p3
Class-map (queuing): q0
wrr-queue weight 10
random-detect min-threshold 50 kbytes max-threshold 80 kbytes drop-probability 80 weight 8
output : 0 packets, 0 bytes
dropped : 0 packets, 0 bytes
Class-map (queuing): q1
priority
output : 0 packets, 0 bytes
dropped : 0 packets, 0 bytes
Class-map (queuing): q2
priority
output : 0 packets, 0 bytes
dropped : 0 packets, 0 bytes
Class-map (queuing): q3
priority
output : 0 packets, 0 bytes
dropped : 0 packets, 0 bytes
Class-map (queuing): q4
priority
output : 0 packets, 0 bytes
dropped : 0 packets, 0 bytes
Class-map (queuing): q5
priority
output : 0 packets, 0 bytes
dropped : 0 packets, 0 bytes
Class-map (queuing): q6
priority
output : 0 packets, 0 bytes
dropped : 0 packets, 0 bytes
Class-map (queuing): q7
priority
output : 0 packets, 0 bytes
dropped : 0 packets, 0 bytes
Class-map (queuing): mc-q0
output : 0 packets, 0 bytes
dropped : 0 packets, 0 bytes
Class-map (queuing): mc-q1
output : 0 packets, 0 bytes
dropped : 0 packets, 0 bytes
Class-map (queuing): mc-q2
output : 0 packets, 0 bytes
dropped : 0 packets, 0 bytes
Class-map (queuing): mc-q3
output : 0 packets, 0 bytes
dropped : 0 packets, 0 bytes
Class-map (queuing): mc-q4
output : 0 packets, 0 bytes
dropped : 0 packets, 0 bytes
Class-map (queuing): mc-q5
output : 0 packets, 0 bytes
dropped : 0 packets, 0 bytes
Class-map (queuing): mc-q6
output : 0 packets, 0 bytes
dropped : 0 packets, 0 bytes
Class-map (queuing): mc-q7
output : 0 packets, 0 bytes
dropped : 0 packets, 0 bytes
Wred/Tail Drop Statistics :
----------------------
green : 0 packets
yellow : 0 packets
red : 0 packets
#show queuing interface xe1/2
Egress Queuing for Ethernet ce2/1 [System]
---------------------------------------------------------------------------------------
L0 L1 L2 Group PrioLevel Shape Bandwidth
---------------------------------------------------------------------------------------
q0 - High - -
q1 - High - -
q2 - High - -
q3 - High - -
q4 - High - -
q5 - High - -
q6 - High - -
q7 - High - -