3750/3560 qos sample config

Define global qos settings
Enable qos

mls qos

Map cos4, dscp32 packets to egress queue1(priority queue) threshold3(means full queue). cos4,dscp32 – IPTV traffic:

mls qos srr-queue output cos-map queue 1 threshold 3 4 
mls qos srr-queue output dscp-map queue 1 threshold 3 32 

Map all other traffic to egress queue2:

mls qos srr-queue output cos-map queue 2 threshold 3 0 1 2 3 5 6 7
mls qos srr-queue output dscp-map queue 2 threshold 3 0 1 2 3 4 5 6 7 
mls qos srr-queue output dscp-map queue 2 threshold 3 8 9 10 11 12 13 14 15
mls qos srr-queue output dscp-map queue 2 threshold 3 16 17 18 19 20 21 22 23
mls qos srr-queue output dscp-map queue 2 threshold 3 24 25 26 27 28 29 30 31
mls qos srr-queue output dscp-map queue 2 threshold 3 33 34 35 36 37 38 39
mls qos srr-queue output dscp-map queue 2 threshold 3 40 41 42 43 44 45 46 47
mls qos srr-queue output dscp-map queue 2 threshold 3 48 49 50 51 52 53 54 55
mls qos srr-queue output dscp-map queue 2 threshold 3 56 57 58 59 60 61 62 63

Configure queues
I am going to use queue set 1 for all interfaces. Allocate 20% of reserved buffer pool to queue1 and 80% to queue2, all the rest gets 0%. Reserved buffer pool is buffer memory that is persistently allocated to interface egress buffers. Queue1 does not need big buffer size because it is expedite and is serviced always first.

mls qos queue-set output 1 buffers 20 80 0 0 

Now we define the size of reserved buffer pool. Reserved pool takes memory from common pool, remaining space in common pool can be borrowed by different interfaces. Since I am not planning to use queus 3 and 4, I shrink it’s reserved buffer pool to minimum. Thresholds expressed as a percentage of the queue’s allocated memory.

mls qos queue-set output 1 threshold 3 1 1 1 1 
mls qos queue-set output 1 threshold 4 1 1 1 1 

Actually these settings should not play any role because the buffer sizes for queues 3 and 4 are set to 0.

Define reserved buffer pool for queues 1 and 2. Queue 1 has 20% guarenteed(reserved) from the allocated memory. Queue 1 can borrow from common buffer pool up to 3200% of allocated memory. The same settings for queue 2.

mls qos queue-set output 1 threshold 1 3200 3200 20 3200 
mls qos queue-set output 1 threshold 2 3200 3200 20 3200

Ingress queues can also be configured, but I am not sure it is needed.

Uplink interfaces configuration
Disable queue shaping(srr-queue bandwidth shape). Guarantee 255/(255+1+1) of bandwidth to queue2 and 1/100 per queues 3 and 4 each. Queue 1 weight is not taken in account because it is expedite queue(priority-queue out). Srr-queue bandwidth share is taken in consideration only when interface is oversubscribed, i.e. experiences a congestion.

interface g0/1
 srr-queue bandwidth shape 0 0 0 0
 srr-queue bandwidth share 1 255 1 1  
 priority-queue out
 mls qos trust 
 queue-set 1 
exit

Customer interfaces configuration
The same as uplink configuration, but we do not trust dscp/cos/precendence.

interface g0/2
 srr-queue bandwidth shape 0 0 0 0
 srr-queue bandwidth share 1 255 1 1  
 priority-queue out
 no mls qos trust 
 queue-set 1 
exit

Verify interface configurations and check interface counters:

sh mls qos interface g0/1 ?

Sources of inspiration:
http://blog.internetworkexpert.com/2008/06/26/quick-notes-on-the-3560-egress-queuing/
http://www.cisco.com/en/US/docs/switches/lan/catalyst3750/software/release/12.2_55_se/configuration/guide/swqos.html

Advertisements

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s