- Cisco and Tele2 IoT: Co-Innovation Broadens IoT Benefits Across Industries
- Black Friday deal: Save up to $1,100 on this Sony Bravia 7 and Bar 8 bundle at Amazon
- Grab the 55-inch Samsung Odyssey Ark for $1,200 off at Best Buy ahead of Black Friday
- Page Not Found | McAfee Blog
- What Are the Latest Docker Desktop Enterprise-Grade Performance Optimizations | Docker
3560/3750 Qos in Deep dive
Qos Flowing mechanism#
Classification >>> Policing/Marking >>> InputQ Mapping/Input queuing >>> Ingress scheduling > Stack Ring > OutputQ mapping/Output queuing > Egress Scheduling
Here the example commented with some lines omitted. Please bear in mind, that these examples don’t cover all the possibilities.
!— Policing/Marking
mls qos map policed-dscp 46 to 0 !— how traffic is marked if it is policed
mls qos map cos-dscp 0 8 16 26 32 46 48 56 !— map cos values to dscp values, should match with dscp-cos map
!— Ingress Scheduling
mls qos srr-queue input bandwidth 90 10 !— Q1, Q2 values are weights, minimum bandwidth guarantee if there is congestion
!— Input Queuing
mls qos srr-queue input threshold 1 8 16 !— queue 1 threshold 1 and 2, thresold 3 non-configurable 100
mls qos srr-queue input threshold 2 34 66 !— queue 2…
mls qos srr-queue input buffers 67 33 !— buffer allocation Q1 and Q2
!— InputQ Mapping
mls qos srr-queue input cos-map queue 1 threshold 2 1 !— CoS 1 will be dropped when Q1 is at level T2=16%
mls qos srr-queue input cos-map queue 1 threshold 3 0 !— CoS 0 will be dropped when Q1 is at level T3=100%
mls qos srr-queue input cos-map queue 2 threshold 1 2
mls qos srr-queue input cos-map queue 2 threshold 2 4 6 7 !— CoS 4,6,7 will be dropped when Q2 is at level T2=66%
mls qos srr-queue input cos-map queue 2 threshold 3 3 5
mls qos srr-queue input dscp-map queue 1 threshold 2 9 10 11 12 13 14 15 !— DSCPs will be dropped when Q1 is at level T2=16%
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 1 threshold 3 32
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 2 33 34 35 36 37 38 39 48
mls qos srr-queue input dscp-map queue 2 threshold 2 49 50 51 52 53 54 55 56
mls qos srr-queue input dscp-map queue 2 threshold 2 57 58 59 60 61 62 63
mls qos srr-queue input dscp-map queue 2 threshold 3 24 25 26 27 28 29 30 31
mls qos srr-queue input dscp-map queue 2 threshold 3 40 41 42 43 44 45 46 47
!— OutputQ Mapping
mls qos srr-queue output cos-map queue 1 threshold 3 5 !— CoS 5 will be dropped when Q1 is at level T3=100%(queue-set 1)
mls qos srr-queue output cos-map queue 2 threshold 3 3 6 7 ! Cos 3 6 7 are mapped to Queue 2 and will be dropped at threshold 3
mls qos srr-queue output cos-map queue 3 threshold 3 2 4
mls qos srr-queue output cos-map queue 4 threshold 2 1 !— CoS 1 will be dropped when Q4 is at level T2=50%(queue-set 1)
mls qos srr-queue output cos-map queue 4 threshold 3 0
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 24 25 26 27 28 29 30 31
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 3 threshold 3 16 17 18 19 20 21 22 23
mls qos srr-queue output dscp-map queue 3 threshold 3 32 33 34 35 36 37 38 39
mls qos srr-queue output dscp-map queue 4 threshold 1 8 !— DSCP 8 will be dropped when Q4 is at level T1=20%(queue-set 1)
mls qos srr-queue output dscp-map queue 4 threshold 2 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
!— Output Queuing
Queue Configuration:
Egress queue configuration allows you to configure two queue sets. Each queue set has the option to configure the buffer size and threshold value for the four egress queues. Then, you can apply any one of the queue sets to any of the ports. By default, queue set 1 is assigned to all the ports when you enable QoS on the switch.
!— 2 queue sets configurable [ queue-sets are used to set threshold values ] , just one applied per port
mls qos queue-set output 1 threshold 1 138 138 92 138 !— qs1 Q1, T1 138%, T2 138%, T3 100%(omitted), reserved 92%, max 138%
mls qos queue-set output 1 threshold 2 138 138 92 400
mls qos queue-set output 1 threshold 3 36 77 100 318
mls qos queue-set output 1 threshold 4 20 50 67 400
mls qos queue-set output 2 threshold 1 149 149 100 149
mls qos queue-set output 2 threshold 2 118 118 100 235
mls qos queue-set output 2 threshold 3 41 68 100 272
mls qos queue-set output 2 threshold 4 42 72 100 242
mls qos queue-set output 1 buffers 10 10 26 54 !— buffer allocation Q1, Q2, Q3, Q4
mls qos queue-set output 2 buffers 16 6 17 61
mls qos !— enables QoS Globally. Its is required .
!
!— Classification/Policing/Marking
class-map match-all SCCP_SIGNALING
match access-group name SCCP_SIGNALING
class-map match-all VOICE_MEDIA !— define class to classify traffic
match access-group name VOICE_MEDIA !— match ACL
!
!
!— Classification/Policing/Marking
policy-map POLICY_VOICE !— policy traffic
class VOICE_MEDIA !— select class to be policed
set dscp ef !— mark traffic as ef
police 768000 8000 exceed-action policed-dscp-transmit !— mark traffic from DSCP 46 to 0(BE) if 768kbps is exceeded
class SCCP_SIGNALING
set dscp cs3
police 256000 8000 exceed-action drop !— drop traffic if 256kbps bandwidth is exceeded
!
!
!— Classification
interface FastEthernet1/0/4
switchport access vlan 101
switchport mode access
switchport voice vlan 102
mls qos cos 1 !— untagged frames (from the PC) are tagged with CoS 1
mls qos trust device cisco-phone !— trust cos if a Cisco Phone is detected via CDP
mls qos trust cos !— trust cos value of tagged frames
spanning-tree portfast
!
interface FastEthernet1/0/5
switchport access vlan 101
switchport mode access
switchport voice vlan 102
switchport priority extend cos 1 !— mark with CoS 1 every packet on the phone’s switchport
mls qos trust cos
spanning-tree portfast
!
!
Default Scheduler Configuration:
The priority queue is disabled. Both the shaped and shared mode are configured for the SRR. Shaped mode weights override the shared mode value. Therefore, the net result is queue 1 is serviced in shaped mode and queues 2, 3, and 4 are serviced in shared mode. This means queue 1 is serviced with an absolute value that is (1/25) percent, or four percent, of the bandwidth. Queues 2, 3 and 4 are serviced at 25 percent of the bandwidth. If the bandwidth is available, then queues 2, 3 and 4 can be serviced at more than 25 percent of the bandwidth.
Distribution1#show mls qos int gigabitEthernet 1/0/20 queueing GigabitEthernet1/0/20 Egress Priority Queue : disabled Shaped queue weights (absolute) : 25 0 0 0 !> This means queue 1 is serviced with an absolute value that is (1/25) percent, or four percent, of the bandwidth Shared queue weights : 25 25 25 25 !>> Queues 2, 3 and 4 are serviced at 25 percent of the bandwidth The port bandwidth limit : 100 (Operational Bandwidth:100.0) The port is mapped to qset : 1
! Syntax Example for Sharing # srr-queue bandwidth share <Queue1> <Queue2> <Queue3> <Queue4>
interface FastEthernet1/0/7
!— Egress Scheduling – PQ Q1 – Overwriting order: Priority Queue > Shaped > Shared
srr-queue bandwidth share 10 10 60 20 !— weight value, 10/(10+60+20)
! Syntax Example for Shaping # srr-queue bandwidth shape <Queue1> <Queue2> <Queue3> <Queue4>
srr-queue bandwidth shape 10 0 0 0 !— absolute value, 1/10 [ Here the 10 is percentage bandwidth of interface . and zero mean don’t shape ]
priority-queue out !— PQ enabled . Enabling Queue 1 which is priority queue in 3560/3750 switch. priority queue is different for each hardware .
Note: All four queues participate in the SRR unless the priority queue is enabled, in which case the first bandwidth weight is ignored and is not used in the ratio calculation. Priority queue is serviced until empty before the other queues are serviced. You enable the priority queue by using the priority-queue out interface configuration command.
interface FastEthernet1/0/8
service-policy input POLICY_VOICE !— MQC
!— Classification
mls qos trust device cisco-phone
mls qos trust cos
!— Classification/Policing/Marking
ip access-list extended SCCP_SIGNALING
permit tcp any any eq 2000
ip access-list extended VOICE_MEDIA !— ACL used on the class-map, identify specific traffic based on protocols, ports…
permit udp 192.168.102.0 0.0.0.255 any range 16385 32767
!
==================================== OUTPUTS =========================================
Verification and troubleshooting commands
SW1-HQ-3750#show mls qos !— Check if QoS is enabled globally
QoS is enabled
QoS ip packet dscp rewrite is enabled
Classification/Policing/Marking
SW1-HQ-3750#show mls qos int f1/0/5 !— QoS status on the specified port
FastEthernet1/0/5
trust state: trust cos
trust mode: trust cos
trust enabled flag: ena
COS override: dis
default COS: 0
DSCP Mutation Map: Default DSCP Mutation Map
Trust device: none
qos mode: port-based
SW1-HQ-3750#show policy-map POLICY_VOICE !— Policy actions
Policy Map POLICY_VOICE
Class VOICE_MEDIA
set dscp ef
police 768000 8000 exceed-action policed-dscp-transmit
Class SCCP_SIGNALING
set dscp cs3
police 256000 8000 exceed-action drop
SW1-HQ-3750#show mls qos int f1/0/8 policers !— Policy status on the specified port
FastEthernet1/0/8
policymap=POLICY_VOICE
type=Single, id=1 rate=768000, qlimit=8000, drop=0
markdown dscp=0
type=Single, id=2 rate=256000, qlimit=8000, drop=1
markdown dscp=0
SW1-HQ-3750#show mls qos maps policed-dscp !— Policed DSCP action, for instance DSCP 46 to 0
Policed-dscp map:
d1 : d2 0 1 2 3 4 5 6 7 8 9
—————————————
0 : 00 01 02 03 04 05 06 07 08 09
1 : 10 11 12 13 14 15 16 17 18 19
2 : 20 21 22 23 24 25 26 27 28 29
3 : 30 31 32 33 34 35 36 37 38 39
4 : 40 41 42 43 44 45 00 47 48 49
5 : 50 51 52 53 54 55 56 57 58 59
6 : 60 61 62 63
Map tables
SW1-HQ-3750#show mls qos maps cos-dscp !— cos to dscp mapping
Cos-dscp map:
cos: 0 1 2 3 4 5 6 7
——————————–
dscp: 0 8 16 26 32 46 48 56
Ingress Queuing and Scheduling
SW1-HQ-3750#show mls qos input-queue !— Input queue configuration
Queue : 1 2
———————————————-
buffers : 67 33
bandwidth : 90 10
priority : 0 10
threshold1: 8 34
threshold2: 16 66
SW1-HQ-3750#show mls qos maps cos-input-q !— Input queue COS mapping
Cos-inputq-threshold map:
cos: 0 1 2 3 4 5 6 7
————————————
queue-threshold: 1-3 1-2 2-1 2-3 2-2 2-3 2-2 2-2
SW1-HQ-3750#show mls qos maps dscp-input-q !— Input queue DSCP mapping
Dscp-inputq-threshold map:
d1 :d2 0 1 2 3 4 5 6 7 8 9
————————————————————
0 : 01-03 01-03 01-03 01-03 01-03 01-03 01-03 01-03 01-01 01-02
1 : 01-02 01-02 01-02 01-02 01-02 01-02 02-01 02-01 02-01 02-01
2 : 02-01 02-01 02-01 02-01 02-03 02-03 02-03 02-03 02-03 02-03
3 : 02-03 02-03 01-03 02-02 02-02 02-02 02-02 02-02 02-02 02-02
4 : 02-03 02-03 02-03 02-03 02-03 02-03 02-03 02-03 02-02 02-02
5 : 02-02 02-02 02-02 02-02 02-02 02-02 02-02 02-02 02-02 02-02
6 : 02-02 02-02 02-02 02-02
Egress Queuing and Scheduling
SW1-HQ-3750#show mls qos queue-set 1 !— Output queue set 1 configuration
Queueset: 1
Queue : 1 2 3 4
———————————————-
buffers : 10 10 26 54
threshold1: 138 138 36 20
threshold2: 138 138 77 50
reserved : 92 92 100 67
maximum : 138 400 318 400
SW1-HQ-3750#show mls qos maps dscp-output-q !— Output queue DSCP mapping
Dscp-outputq-threshold map:
d1 :d2 0 1 2 3 4 5 6 7 8 9
————————————————————
0 : 04-03 04-03 04-03 04-03 04-03 04-03 04-03 04-03 04-01 04-02
1 : 04-02 04-02 04-02 04-02 04-02 04-02 03-03 03-03 03-03 03-03
2 : 03-03 03-03 03-03 03-03 02-03 02-03 02-03 02-03 02-03 02-03
3 : 02-03 02-03 03-03 03-03 03-03 03-03 03-03 03-03 03-03 03-03
4 : 01-03 01-03 01-03 01-03 01-03 01-03 01-03 01-03 02-03 02-03
5 : 02-03 02-03 02-03 02-03 02-03 02-03 02-03 02-03 02-03 02-03
6 : 02-03 02-03 02-03 02-03
SW1-HQ-3750#show mls qos int f1/0/8 queueing !— Check port egress queuing
FastEthernet1/0/8
Egress Priority Queue : disabled
Shaped queue weights (absolute) : 25 0 0 0
Shared queue weights : 25 25 25 25
The port bandwidth limit : 100 (Operational Bandwidth:100.0)
The port is mapped to qset : 1