Cisco 3550 Switch Egress Queuing
For egress, the 3550 supports four queues per interface, with classification into the queues based
on CoS. Scheduling is based on weighted round-robin (WRR) logic, with an optional expedited
(priority) queue.
The Cisco 3550 uses a relatively simple classification scheme, assuming you consider only what
happens when the forwarding decision has been made. These switches make most internal QoS
decisions based on an internal DSCP setting. The internal DSCP has been determined when the
frame is forwarded. So, when a frame has been assigned an internal DSCP and an egress interface,
the following logic determines into which of the four interface output queues the frame is placed:
1. The frame’s internal DSCP is compared to a global DSCP-to-CoS map to determine a CoS
value.
2. The per-interface CoS-to-queue map determines the queue for a frame based on the
assigned CoS.
WRR scheduling works by taking a number of frames from each queue as it cycles through the
queues. The wrr-queue bandwidth command defines the proportion of the number of frames
taken in each cycle, not the number of frames taken in each cycle. For example, the wrr-queue
bandwidth 10 20 30 40 and wrr-queue bandwidth 1 2 3 4 commands configure the same
proportions and are equivalent. The switch is not concerned about allocating bandwidth; in fact,
because frames vary in length, switch WRR logic does not even indirectly define a reserved
minimum bandwidth percentage. However, it does empty the queue slots as defined so that there
is then more space to temporarily store subsequent frames.
The 3550 can be configured to treat egress queue 4 on an interface as a PQ (also called an expedite
queue). To do so, the interface subcommand priority-queue out is configured under the interface.
On the 3550, only queue 4 can become the PQ. If the priority queue is configured, the switch still
applies WRR scheduling to queues 1 through 3, with the scheduler always servicing the PQ next
each time the scheduler looks for the next frame, assuming a new frame has made it to the PQ.
Example 13-5 shows Cisco 3550 egress queuing configuration. By default, the global DSCP-to-
CoS map maps the first eight DSCP values to CoS 0, the next eight to CoS 1, and so on. Also, the
default per-interface CoS-to-queue mapping maps the first two CoS values to queue 1, the next
two to queue 2, and so on. For this example, to show how some of the commands work, the
following nondefault criteria are used:
■ The global DSCP-to-CoS map is changed so that DSCPs 60–63 are mapped to CoS 1.
■ Interface gi0/1’s CoS-to-queue map is changed so that CoS 5 is mapped to queue 4, and CoS
6 and 7 are mapped to queue 3.
460 Chapter 13: Congestion Management and Avoidance
■ The gi0/1 bandwidth ratios are set to 10, 15, 25, and 150.
■ Later, the expedite queue is enabled, giving queues 1, 2, and 3 approximately 20 percent, 30
percent, and 50 percent, respectively, of the bandwidth not consumed by priority queue 4.
Example 13-5 Cisco 3550 Egress Queuing Example
! For the global DSCP-to-CoS map, up to eight DSCPs can be mapped in a single command,
! as seen below. The show mls qos map dscp-cos command shows a grid, with the
! DSCP’s decimal first digit on the left-side column, and the 2nd digit across the
! top.
S1(config)# mls qos map dscp-cos 60 61 62 63 to 1
S1# sh mls qos map dscp-cos
Dscp-cos map:
d1 : d2 0 1 2 3 4 5 6 7 8 9
---------------------------------------
0 : 00 00 00 00 00 00 00 00 01 01
1 : 01 01 01 01 01 01 02 02 02 02
2 : 02 02 02 02 03 03 03 03 03 03
3 : 03 03 04 04 04 04 04 04 04 04
4 : 05 05 05 05 05 05 05 05 06 06
5 : 06 06 06 06 06 06 07 07 07 07
6 : 01 01 01 01
! Next, queue 4 is assigned CoS 5, queue 3 is assigned CoSs 6 and 7. Note that
! the wrr-queue cos-map 3 6 7 command does not remove other CoS values from queue
! 3, but just assigns CoSs 6 and 7 to queue 3. The non-highlighted CoS values in
! the show mls qos int gi 0/1 queue command reflect default settings.
S1(config)# int gi 0/1
S1(config-if)# wrr-queue cos-map 4 5
S1(config-if)# wrr-queue cos-map 3 6 7
S1(config-if)# do show mls qos int gi 0/1 queue | begin Cos-queue
Cos-queue map:
cos-qid
0-1
1-1
2-2
3-2
4-3
5-4
6-3
7-3
! Next, the ratios used by the WRR scheduler are defined. Note that the show
! command lists the exact weights, and that it lists “dis” beside the phrase
! “Egress Expedite Queue,” meaning that the PQ is not yet enabled. Note also that
! the four weights must be values between 1 and 65,536, inclusive.
S1(config)# int gi 0/1
S1(config-if)# wrr-queue bandwidth 10 15 25 150
S1(config-if)# do sh mls qos int gi 0/1 queue
GigabitEthernet0/1
Egress expedite queue: dis
wrr bandwidth weights:
qid-weights
110
215
325
4150
! Finally, the PQ is enabled.
S1(config-if)# priority-queue out
S1(config-if)# do sh mls qos int gi 0/1 queue
GigabitEthernet0/1
Egress expedite queue: ena
wrr bandwidth weights:
qid-weights
1-10
2-15
3-25
4-150 when expedite queue is disabled
! Lines omitted for brevity