Cis187 8 QoS
Cis187 8 QoS
Cis187 8 QoS
Overview
Voice
Video
data traffic
Now common practice to combine these into a single multi-service network in
which the varied traffic types coexist.
Overview
Quality of Service
defined
Loss
Loss
TCP Header
UDP Header
Delay or latency
Delay or latency refers to the time it takes for a packet to travel from
As a design rule, voice networks cannot cope with more than 30ms of
jitter.
Jitter in excess of 30ms will result in degraded audio performance.
Excessive jitter in a streaming video environment will result in:
Jerky motion
Loss of video quality
Loss of video
Network availability
Redundancy
Dynamic routing protocols
Hot Standby Routing Protocol (HSRP)
Spanning Tree Protocol (STP)
Provisioning
Quality of Service
requirements for data
Quality of Service
requirements for voice
Best-Effort service
(single interface outbound queue)
Best-Effort service
(single interface outbound queue)
Traffic marking
Traffic marking
Traffic marking
Layer 2
Layer 3
CoS
ToS
ToS
IP DSCP value is the first 6 bits
IP Precedence value is the first 3 bits
The IP Precedence value is actually part of the IP DSCP value.
Therefore, both values cannot be set simultaneously.
DSCP supersedes IP Precedence.
A maximum of:
8 different IP precedence markings
64 different IP DSCP markings
Interface
Interface
service-policy
output policy1
service-policy
output policy1
service-policy
output policy2
policy-map policy1
class class1
bandwidth
queue-limit
random-detect
class class2
bandwidth
queue-limit
random-detect
class-map class1
match input-interface
policy-map policy2
class class1
bandwidth
queue-limit
random-detect
class class3
bandwidth
queue-limit
random-detect
class-map class2
match access-group
access-list
class-map class3
match input-interface
Classification of traffic
The class-map
If more than one match statement exists in the traffic class, use:
class-map match-any
or
class-map match-all
Classify traffic
Switch(config)# class-map match-any cisco
flows as
Switch(config-cmap)# match access-group name test
Switch(config-cmap)# match interface fastethernet 0/1 belonging to a
Identify the traffic or traffic flows
common class
of QoS.
Any traffic which does not belong to the class cisco forms part of the catch-all classdefault class will be given a default bandwidth of 2000 kbps.
IP Precedence
3 bits = 8 possibilities.
Network control and Internetwork control classes are
usually reserved for router-generated packets such as
routing updates, ICMP messages, etc.
To protect packets that are necessary for the health of
the network.
Only 6 usable classes for production.
DSCP
Same
DSCP
Value
IP Packet
IP Precedence
Packets in AF13
will get dropped
before packets in
AF12, before
packets in AF11.
Expedited Forwarding (EF) PHB defines a premium service for video and VoIP.
Recommended DSCP is 101110
Assured Forwarding (AF) PHB defines a method by which BAs can be given
different forwarding assurances.
The AFxy PHB defines four AFx classes: AF1, AF2, AF3, and AF4.
Each class is assigned a certain amount of buffer space and interface
bandwidth, dependent on the SLA with the Service Provider/policy.
Within each AFx class (AFxy) it is possible to specify 3 drop precedence
values.
Classification at
the Access Layer
Layer 2
Layer 3
Assigning CoS on
a per-port basis
Re-writing the
CoS
Example
Set the DSCP field of packets coming from a single IPPhone (called receptionphone) within a switched network.
IP-Phone MAC address is 000.0a00.0111
The creation of the class-map can be verified with the show classmap command
CoS
DSCP 0
16
24
32
40
48
56
IP
Prec
The show mls qos interface command can be used to determine the
policies that are bound to a particular interface on the switch.
Having now defined the action to be taken on FTP packets, the only
remaining step is to tell the switch which interfaces to apply the policy
to.
In this case the policy will be applied to all the interfaces so that QoS
will be maintained regardless of the interface an FTP source may be
connected to.
Scheduling
Suggested Readings
Queuing overview
Queuing
overview
Generalizations on Queuing:
If there is no congestion on the WAN link, traffic prioritization is
not necessary.
If a WAN link is constantly congested, traffic prioritization may not
resolve the problem.
Adding bandwidth might be the appropriate solution.
Custom
CBWFQ
Priority
LLQ (PQ/CBFQ)
WFQ
FQ Fair Queuing
(single interface outbound queue)
T3
addressing.
Common conversation discriminators are as follows (based on a
hash):
Source/destination network address
Source/destination Media Access Control (MAC) address
Source/destination port or socket numbers
Frame Relay data-link connection identifier (DLCI) value
Quality of service/type of service (QoS/ToS) value
The router determines what the actual flows are, not the
administrator.
WFQ is IP Precedence-aware.
This is only pertinent if the IP precedence bit is used
Coming next
Flow #3
17
15 14
10
WFQ starts by sorting traffic that arrives on an egress interface into conversation flows.
Weighted fair
queuing
IP Precedence
Our Value
32768
16384
10920
8192
6552
5456
4680
4096
0-8
Flow #2
3-5
Flow #3
0-8
17
15 14
10
0-8
Flow #2
3-5
Flow #3
0-8
17
15 14
0-8
10
0-8
3-5
Flow #1
0-8
Flow #2
3-5
Flow #3
3-5
20
3-5
0-8
0-8
3-5
0-8
17
15 14
10
FYI
Configuring
weighted
fair queuing
Router(config-if)#fair-queue {congestive-discard-threshold}
FYI
Configuring
weighted
fair queuing
FYI
Configuring
weighted
fair queuing
Flow #1
0-8
Flow #2
3-5
Flow #3
3-5
20
3-5
15 14
0-8
3-5
WFQ
0-8
17
0-8
10
Flow #1
0-8
Flow #2
3-5
3-5
Flow #3
3-5
0-8
20
17
15 14
CBWFQ
0-8
3-5
10
0-8
0-8
3-5
0-8
3-5
3-5
WFQ
CBWFQ
FIFO Queues
CBWFQ
Class
3
1 2
Highest BW
Lowest weight
Highest priority
Bandwidth is configured in the policymap class (later)
CBWFQ (not you) assigns a weight to each configured class instead of each
flow.
Weight is proportional to the bandwidth (you) configured for each class.
Weight is equal to the interface bandwidth divided by the class bandwidth or
can be configured as a percentage.
Weight = Interface bandwidth / class bandwidth
32 = 2,048 kbps / 64 kbps (2,048 kbps = 2 Mbps)
16 = 2,048 kbps / 128 kbps
64 = 2,048 kbps / 32 kbps
A class with a higher bandwidth value will have a lower weight
CBWFQ
Class
3
1 2
Highest BW
Lowest weight
Highest priority
By default, the total amount of bandwidth allocated for all classes must
not exceed 75 percent of the available bandwidth on the interface.
The other 25 percent is used for control and routing traffic.
This is why when you configure a T1 link (and slower), you only get
75% of the bandwidth, unless you turn off queuing.
CBWFQ
Class
3
1 2
Highest BW
Lowest weight
Highest priority
1 2
Highest BW
Lowest weight
Highest priority
Full
Full
Tail drop.
A router simply discards any packet that arrives at the tail end
of a queue that has completely used up its packet-holding
resources.
Default queuing response to congestion.
Tail drop treats all traffic equally and does not differentiate between
classes of service.
CBWFQ and
tail drops
Full
Now, there is very
little traffic that
needs to be sent
out that interface.
When using tail drop, the router drops all traffic that exceeds the queue
limit.
Many TCP sessions then simultaneously go into a slow start.
This reduces the TCP window size.
Consequently, traffic temporarily slows as much as possible.
As congestion is reduced, window sizes begin to increase in
response to the available bandwidth.
Full
Time
Queue
overused
Queue
underused
1. Traffic flows
enter the queue
at different
times
2. When aggregate
3. Under use causes
load exceeds queue
synched TCP window
Tail drops cause
expansion.
synched TCP window
reduction.
WRED
WRED
Based on the profile and the average queue size, WRED calculates
the probability for dropping the current packet and either drops it or
passes it to the output queue.
If the queue is already full, the packet is tail-dropped.
Otherwise, it is eventually sent out on the interface.
WRED monitors the average queue depth in the router and determines
when to begin packet drops based on the queue depth.
When the average queue depth crosses the user-specified
minimum threshold, WRED begins to drop both TCP and UDP
packets with a certain probability.
WRED
WRED
In the following example, the class map class1 is created and defined
Amount of bandwidth in
proportion of the link.
Weight = int bw/ class bw
Enables WRED
The Low Latency Queuing (LLQ) feature provides strict priority queuing for
LLQ
LLQ
No
RED/WRED
LLQ
Configuring LLQ
and
LLQ Example
router(config)# access-list 102 permit udp host 10.10.10.10 host
10.10.10.20 range 16384 20000
router(config)# access-list 102 permit udp host 10.10.10.10 host
10.10.10.20 range 53000 56000
router(config)# class-map voice
router(config-cmap)# match access-group 102
router(config)# policy-map policy1
router(config-pmap)# class voice
router(config-pmap-c)# priority 50
router(config-pmap)# class bar
router(config-pmap-c)# bandwidth 20
router(config-pmap)# class class-default
router(config-pmap-c)# fair-queue
Suggested Readings