Tuesday, March 9, 2010

Switch QoS

交换机QoS

3750和3560是一样的,两个输入queue,没有priority queue。4个输入队列,队列1是priority。在配置QoS的时候,主要注意mapping,然后把cos5放到queue1中。其他配置参考best practice。

6500需要看不同的板卡。我的经验是打开mls qos后,使用默认配置即可。

access layer信任cos电话,信任dscp from uplink,distribution和core信任dscp。

3750的QoS best practice


! enable QoS on the switch
mls qos
!MAPS
! Re-map CoS (L2) to DSCP
! Cos 2 = AF21 (18) Mission Critical and Delay Sensitive Data
! CoS 3 = AF31 (26) Voice Control
! CoS 4 = AF41 (34) Video
! CoS 5 = EF (46) Voice
! Cos 6 = AF (48) Network Control
! Cos 7 = AF (56) Network Control
mls qos map cos-dscp 0 8 18 26 34 46 48 56

!INPUT QUEUES
! Setup input queue thresholds
mls qos srr-queue input threshold 1 25 80
mls qos srr-queue input threshold 2 25 60
!Set up the ingress queues so that queue 2 is the PQ and dedicated 20% bandwidth
no mls qos srr-queue input priority-queue 1
no mls qos srr-queue input priority-queue 2
mls qos srr-queue input priority-queue 2 bandwidth 20
! Allocate half of the remaining bandwidth to each queue
mls qos srr-queue input bandwidth 50 50
! Assign buffer percentages to each queue
mls qos srr-queue input buffers 70 30
! Ingress Queue Mapping (map CoS values to one of the two queues)
! (Maps CoS 0,1 to Queue 1, CoS 2-7 to queue 2)
no mls qos srr-queue input cos-map
mls qos srr-queue input cos-map queue 1 threshold 3 0
mls qos srr-queue input cos-map queue 1 threshold 2 1
mls qos srr-queue input cos-map queue 2 threshold 1 2 3
mls qos srr-queue input cos-map queue 2 threshold 2 4 6 7
mls qos srr-queue input cos-map queue 2 threshold 3 5
! Ingress DSCP Queue Mapping
no mls qos srr-queue input dscp-map
mls qos srr-queue input dscp-map queue 1 threshold 2 8 9 10 11 12 13 14 15
mls qos srr-queue input dscp-map queue 1 threshold 3 0 1 2 3 4 5 6 7
mls qos srr-queue input dscp-map queue 2 threshold 1 16 17 18 19 20 21 22 23
mls qos srr-queue input dscp-map queue 2 threshold 1 24 25 26 27 28 29 30 31
mls qos srr-queue input dscp-map queue 2 threshold 2 32 33 34 35 36 37 38 39
mls qos srr-queue input dscp-map queue 2 threshold 2 48 49 50 51 52 53 54 55
mls qos srr-queue input dscp-map queue 2 threshold 2 56 57 58 59 60 61 62 63
mls qos srr-queue input dscp-map queue 2 threshold 3 40 41 42 43 44 45 46 47
!OUTPUT QUEUES

! Setup Egress Thresholds and Memory Allocation
mls qos queue-set output 1 threshold 1 138 138 92 138
mls qos queue-set output 1 threshold 2 40 70 92 400
mls qos queue-set output 1 threshold 3 36 70 100 318
mls qos queue-set output 1 threshold 4 20 50 67 400
! Egress Queue Mapping (map CoS values to one of the four queues)
no mls qos srr-queue output cos-map
mls qos srr-queue output cos-map queue 1 threshold 3 5
mls qos srr-queue output cos-map queue 2 threshold 3 6 7
mls qos srr-queue output cos-map queue 2 threshold 2 4
mls qos srr-queue output cos-map queue 3 threshold 3 3
mls qos srr-queue output cos-map queue 3 threshold 2 2
mls qos srr-queue output cos-map queue 4 threshold 2 1
mls qos srr-queue output cos-map queue 4 threshold 3 0
!! Egress DSCP Queue Mapping
no mls qos srr-queue output dscp-map
mls qos srr-queue output dscp-map queue 1 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
mls qos srr-queue output dscp-map queue 2 threshold 2 32 33 34 35 36 37 38 39
mls qos srr-queue output dscp-map queue 3 threshold 3 24 25 26 27 28 29 30 31
mls qos srr-queue output dscp-map queue 3 threshold 2 16 17 18 19 20 21 22 23
mls qos srr-queue output dscp-map queue 4 threshold 2 8 9 10 11 12 13 14 15
mls qos srr-queue output dscp-map queue 4 threshold 3 0 1 2 3 4 5 6 7

! Set up egress queue buffer sizes
mls qos queue-set output 1 buffers 20 30 10 40
interface range fastEthernet1/0/1 - 24
srr-queue bandwidth shape 10 0 0 0
srr-queue bandwidth share 10 30 20 40
priority-queue out
interface range gigabitEthernet1/0/1 - 2
srr-queue bandwidth shape 10 0 0 0
srr-queue bandwidth share 10 30 20 40
priority-queue out

! Ports that connect to IP Phones:
Interface range fastEthernet1/0/1 - 24
! trust the CoS from the phone
mls qos trust cos
! trust the phone - CDP needs to be enabled for this
mls qos trust device cisco-phone
! re-mark anything from the phone's PC port to 0 - don't do this if using softphone though!
switchport priority extend cos 0
! Trunk Ports that are uplinks:
interface range gig1/0/1 - 2
! trust CoS
mls qos trust cos

No comments: