Professional Documents
Culture Documents
- Carl Sagan
Kevin Wallace
CCIEx2 (Voice and R/S) #7945 R/S,
CCSI #20061
Milk
Bottle
Soldering Iron
Cat 3560
Used on the CCIE Routing and Switching lab
Standalone version of the Cat 3750
Does not support Cisco StackWise technology
Cat 3750
Cisco Catalyst
Quality of Service (QoS) Features
Classification and Marking
Policing
Congestion Management
Congestion Avoidance
SW1(config)#mls qos
IP Precedence Value
CoS Value
MAC ACL
DSCP Value
Layer 3 ACL
Non-IP Frame
CoS = 3
CoS = 3
No CoS
CoS = 0
If the frame does not have a CoS value, assign the ports CoS
value.
QoS Mappings
Once we trust an incoming marking, we can remark that
frame/packet based on a mapping table.
SW1#show mls qos maps cos-dscp
Cos-dscp map:
cos:
0 1 2 3 4 5 6 7
-------------------------------dscp:
0 8 16 24 32 46 48 56
CoS = 3
DSCP = 24
maps ?
cos-dscp map keyword
cos-input queue map keyword
cos-output queue map keyword
dscp-cos map keyword
dscp-input queue map keyword
dscp-mutation map keyword
dscp-output queue map keyword
ip-prec-dscp map keyword
policed-dscp map keyword
Output modifiers
Policing
Policing sets a speed limit for traffic.
Traffic not exceeding the speed limit is
called conforming traffic.
Traffic exceeding the speed limit is called
exceeding traffic.
Policing (cont.)
Based on whether traffic is conforming or exceeding, it can be:
Transmitted
Dropped
Transmitted and Remarked
Policing Example 1
Policing a Single Class of Traffic
Policing Example 2
Policing Multiple Classes of Traffic
SW1(config)#mls qos aggregate-police VOIP-MEDIA-SIGNALING 320000 8000 exceed-action drop
SW1(config)#ip access-list extended RTP
Aggregate Policing
SW1(config-ext-nacl)#permit udp any any range 16384 32767
RTP
SW1(config-ext-nacl)#exit
Rule
SW1(config)#ip access-list extended SCCP
SW1(config-ext-nacl)#permit tcp any eq 2000 any
SCCP
SW1(config-ext-nacl)#permit tcp any any eq 2000
SW1(config-ext-nacl)#exit
SW1(config)#class-map RTP
SW1(config-cmap)#match access-group name RTP
SW1(config-cmap)#exit
SW1(config)#class-map SCCP
SW1(config-cmap)#match access-group name SCCP
SW1(config-cmap)#exit
SW1(config)#policy-map AGGREGATE
SW1(config-pmap)#class RTP
SW1(config-pmap-c)#police aggregate VOIP-MEDIA-SIGNALING
SW1(config-pmap-c)#exit
SW1(config-pmap)#class SCCP
SW1(config-pmap-c)#police aggregate VOIP-MEDIA-SIGNALING
SW1(config-pmap-c)#exit
SW1(config-pmap)#exit
SW1(config)#interface gig 1/0/9
SW1(config-if)#service-policy input AGGREGATE
This configuration limits the combined bandwidth of RTP and SCCP to 320 kbps.
Policing Example 3
Remarking Traffic Using a QoS Map
SW1(config)#mls qos map policed-dscp 24 26 46 to 0
Policed DSCP Mapping
SW1(config)#access-list 100 permit udp any any range 16384 32767
SW1(config)#access-list 101 permit tcp any eq 2000 any
SW1(config)#access-list 101 permit tcp any any eq 2000
SW1(config)#class-map RTP
SW1(config-cmap)#match access-group 100
SW1(config-cmap)#exit
References the Globally Configured
SW1(config)#class-map SCCP
SW1(config-cmap)#match access-group 101
DSCP Mapping
SW1(config-cmap)#exit
SW1(config)#policy-map VOICE
SW1(config-pmap)#class RTP
SW1(config-pmap-c)#police 256000 8000 exceed-action policed-dscp-transmit
SW1(config-pmap-c)#exit
SW1(config-pmap)#class SCCP
SW1(config-pmap-c)#police 32000 8000 exceed-action policed-dscp-transmit
SW1(config-pmap-c)#exit
SW1(config-pmap)#exit
SW1(config)#interface gig 1/0/10
SW1(config-if)#service-policy input VOICE
Policed
This configuration limits uses a policed-dscp mapping (which maps DSCP values
of 24, 26, and 46 to a DSCP value of 0) to specify the exceed actions for the
VOICE policy map.
Policing Example 4
Policing an SVI
SW1(config)#int range gig 1/0/15 - 20
Enable VLAN-Based QoS on
SW1(config-if-range)#mls qos vlan-based
SW1(config-if-range)#exit
SW1(config)#access-list 100 permit udp any any range 16384 32767
SW1(config)#class-map RTP
SW1(config-cmap)#match access-group 100
SW1(config-cmap)#exit
SW1(config)#class-map PORTS
SW1(config-cmap)#match input-interface gig 1/0/15 - gig 1/0/20
SW1(config-cmap)#exit
SW1(config)#policy-map PORT
SW1(config-pmap)#class PORTS
Child Policy Map
SW1(config-pmap-c)#police 256000 8000 exceed-action drop
SW1(config-pmap-c)#exit
SW1(config-pmap)#exit
Some Action (Besides Calling Another
SW1(config)#policy-map VLAN
Policy Map) Must be Specified
SW1(config-pmap)#class RTP
Parent Policy Map
SW1(config-pmap-c)#set dscp 46
Nested
Child
SW1(config-pmap-c)#service-policy PORT
Policy Map
SW1(config-pmap-c)#exit
SW1(config-pmap)#exit
SW1(config)#int vlan 100
SW1(config-if)#service-policy input VLAN
a Range of Ports
This configuration limits RTP traffic Ports Gig 1/0/15 20 to 256 kbps and Marks
RTP Traffic with a DSCP Value of Expedited Forwarding (46).
Congestion Management
(Queuing)
We have lots of things to configure when it comes to queuing:
Defining priority queues
Defining a queue set
Guaranteeing buffer availability
Limiting memory allocation
Specifying buffer allocation
Setting drop thresholds
Ingress Queues
Policing
Marking
Classification
Queue 1
SRR
Traffic
Into
Switch
Policing
Marking
Stack
Ring
Queue 2
Queue 2 (by default) is the priority queue and has 10 percent of the
interfaces bandwidth assigned to it.
Egress Queues
Queue 1
Stack
Ring
Queue 2
SRR
Queue 3
Traffic
Out of
Switch
Queue 4
SW1(config-if)#priority-queue out
Congestion Avoidance
Weighted Tail Drop (WTD)
Threshold 3 100 percent
CoS 5 - 7
Threshold 2 50 percent
CoS 3 - 4
Threshold 1 25 percent
CoS 0 - 2
Queue Sets
A set of output queuing and WTD parameters can be configured for a
queue set.
Port 2 - Queue 4
Port 2 - Queue 3
Port 2 - Queue 2
Port 2 - Queue 1
Port 1 - Queue 4
Port 1 - Queue 3
Port 1 - Queue 2
Port 1 - Queue 1
Queue Set 2
Queue Set 1
Port 2 - Queue 4
Port 2 - Queue 3
Port 2 - Queue 2
Port 2 - Queue 1
Port 1 - Queue 4
Port 1 - Queue 3
Port 1 Queue 2
Queue 1
33
Queue 2
17
Queue 3
25
Queue 4
25
For Queue Set 2, 50 percent of a ports buffer space is allocated for Queue 1. 25 percent is allocated for
Queue 2. 10 percent is allocated for Queue 3. 15 percent is allocated for Queue 4.
For Queue Set 2, output Queue 2 (of 4) has its first drop threshold at 33 percent and its second drop
threshold at 66 percent. 100 percent of Queue 2s allocated buffer space is guaranteed to be available, if
needed. If Queue 2 needs more buffer space, it can borrow from a ports unused buffer space, up to a
maximum of 200 percent of Queue 2s buffer allocation.
Interface Gig 1/0/11 is being assigned to Queue Set 2.
SW1(config)#mls
SW1(config)#mls
SW1(config)#mls
SW1(config)#mls
SW1(config)#mls
qos
qos
qos
qos
qos
srr-queue
srr-queue
srr-queue
srr-queue
srr-queue
output
output
output
output
output
cos-map
cos-map
cos-map
cos-map
cos-map
queue
queue
queue
queue
queue
1
1
2
3
4
threshold
threshold
threshold
threshold
threshold
Queue
1
2
1
2
2
0 1
2 3
4
5
6 7
Threshold CoS
qos
qos
qos
qos
qos
srr-queue
srr-queue
srr-queue
srr-queue
srr-queue
output
output
output
output
output
cos-map
cos-map
cos-map
cos-map
cos-map
queue
queue
queue
queue
queue
1
1
2
3
4
threshold
threshold
threshold
threshold
threshold
1
2
1
2
2
0 1
2 3
4
5
6 7
Threshold 3
Threshold 2
CoS 2, 3
Cos 5
Cos 6, 7
Threshold 1
Cos 0, 1
Queue 1
Cos 4
Queue 2
Queue 3
Queue 4
75 percent of a
ports buffers is
given to Queue #2.
Shared
Available on ingress and egress queues.
A queue is guaranteed a portion of a ports
bandwidth, but is not limited to the guaranteed
amount.
30 percent of a
ports
bandwidth is
guaranteed for
Queue #1.
70 percent of a
ports
bandwidth is
guaranteed for
Queue #2.
Relative
weight for
Queue 1
Relative
weight for
Queue 2
Relative
weight for
Queue 3
Relative
weight for
Queue 4
SRR Example 1
Determine the amount of bandwidth available to each output queue on
interface Gigabit Ethernet 1/0/4.
Inverse
weight for
Queue 1
Inverse
weight for
Queue 2
Shaping not
applied to
Queue 3
Shaping not
applied to
Queue 4
SRR Example 2
Determine the amount of bandwidth limits applied to the output queues
on interface Gigabit Ethernet 1/0/5.
SRR Example 3
Determine the amount of bandwidth guarantees or limits applied to the
output queues on interface Gigabit Ethernet 1/0/6.
The shaping config for a queue (i.e. a non-zero value) overrides the sharing configuration.
BW Limit for Q1 (Mbps): (1/50) * 1000 = 20 Mbps
BW Limit for Q2 (Mbps): (1/50) * 1000 = 20 Mbps
BW for Q3: [40/(40+20)] * (1000-20-20) Mbps = 640 Mbps
BW for Q4: [20/(40+20)] * (1000-20-20) Mbps = 320 Mbps
Total Bandwidth (Mbps) = 20 + 20 + 640 + 320 = 1000 Mbps
Lab Task #1
On switch SW1 interface Gig 1/0/10, you must limit incoming
RTP traffic to 128 kbps. Excess traffic should be remarked to a
PHB of CS1. Assume that the RTP traffic originated from a Cisco
IP Phone.
DEMO
Lab Task #2
On switch SW1 interface Gig 1/0/11 (which is operating at a rate
of 1 Gbps), perform the following tasks:
Enable the outbound priority queue.
Place CoS 4 traffic into Queue 3 Threshold 1.
Limit the bandwidth of traffic leaving Queue 2 to 40 Mbps.
DEMO