Documente Academic
Documente Profesional
Documente Cultură
08/02/2011
Introduction to QOS
What is QOS?
QOS models
QOS operations
QOS design principles
Network’s behavior:
Treats all traffic the same and on a first come, first
served basis.
Drawbacks
Delivers data if it can, with no assurances of
reliability, delay bounds, or throughput. So basically
no QoS ;)
Network’s behavior:
Applications requests a specific level of service before
starting to send data.
Drawbacks
Requires explicit signaling through protocol (RSVP)
Overhead in network services, scalability issues.
Network’s behavior:
Smaller number of aggregated flows follow the
behavior implemented on each hop (‘Per Hop
Behavior’).
Drawbacks
Needs standardized policies at each hop to ensure
end-to-end services
Policer
LLQ T
X
Class Gold
Scheduler R Wire
Class Silver I
N
G
Post-Queueing
WRED Shaper
Policy Actions
Queuing and
Classification Pre-Queuing Post-Queuing
Scheduling
Congestion
Link Efficiency
Classify Traffic Immediate Actions Management
Mechanisms
and Avoidance
Voice Voice
Realtime Interactive-Video
Video Streaming Video
Call Signaling Call Signaling Call Signaling
IP Routing
Network Control
Network Management
Critical Data Mission-Critical Data
Critical Data
Transactional Data
Bulk Data Bulk Data
Presentation_ID
Time
Cisco Confidential 17
The Solution
QoS Requires Lifecycle Management
CB Zone
Satellite Quality
High Quality Fax Relay, Broadcast
PSTN
IP WAN
Propagation
CODEC Queuing Serialization and Network Jitter Buffer
Fixed
G.729A: 25 ms Variable Variable (3.3 s/Km) + 20–50 ms
Network Delay
(Variable)
Voice
3
Voice
Reconstructed Voice Sample
3
Loss ≤ 1%
17–106 kbps guaranteed priority
bandwidth per call • Smooth
150 bps (+ layer 2 overhead) • Benign
guaranteed bandwidth for • Drop sensitive
voice-control traffic per call • Delay sensitive
CAC must be enabled • UDP priority
30pps
“P” and “B” Frames
128–256 Bytes
15pps
32Kbps
1025–1500 Bytes
37% 65–128 Bytes
1%
129–256 Bytes
513–1024 Bytes 34%
20%
257–512 Bytes
8%
Loss ≤ 1%
Minimum priority bandwidth
guarantee required is
Video-stream + 10–20% • Bursty
e.g., a 384 kbps stream could require up • Drop sensitive
to 460 kbps of priority bandwidth • Delay
sensitive
CAC must be enabled
• UDP priority
512–1023 253–511
Bytes Bytes
1024–1518
Bytes
128–252 65–127
Bytes Bytes
7 6 5 4 3 2 1 0
Standard IPv4
IP Precedence Unused
DiffServ Code Point (DSCP) IP ECN DiffServ Extensions
Payload 3 2 1 0
MPLS EXP S
1. Default PHB: 0
2. Class Selector PHB: IP Precedence
3. Assured Forwarding PHB: AF
4. Expedite Forwarding PHB: EF
Policing
Traffic
Traffic
Shaping
Traffic
Traffic
Traffic Rate
Traffic Rate
Regulates traffic
flow to an
average or peak
bit rate.
CBS EBS
No No
B<Tc B<Te
PBS CBS
No No
B>Tp B>Tc
Traffic Shaping Limits the Transmit Rate to a Value Lower Than Line Rate
Video 2 2
3 3
Data
Bandwidth
100% Utilization
Time
Tail Drop
Three Traffic Flows Another Traffic Flow
Start at Different Times Starts at This Point
Presentation_ID Cisco Confidential 48
Scheduling Tools
Congestion Avoidance Algorithms
TAIL DROP
WRED Queue
3 3
1 0
1 2 1 2 0 2 0 3 2 1 3
0
3
Queueing algorithms manage the front of the queue
0
Which packets get transmitted first
3
Congestion avoidance algorithms manage the tail of
the queue
Which packets get dropped first when queuing buffers fill
Weighted Random Early Detection (WRED)
WRED can operate in a DiffServ-compliant mode
Drops packets according to their DSCP markings
WRED works best with TCP-based applications, like data
100%
50%
Average
0 Queue
Begin Begin Begin Size
Dropping Dropping Dropping
AF13 AF12 AF11 Max Queue
Length
(Tail Drop)
Version ToS
Len ID Offset TTL Proto FCS IP SA IP DA Data
Length Byte
IPv4 Packet
7 6 5 4 3 2 1 0
DiffServ Code Point (DSCP) ECT CE
policy-map test
class one
priority 100
Basically: this is how class two
bandwidth 300
you should configure class three
Quality of Service on drop
class class-default
Cisco Routers. police 75000 5000
fair-queue
!
interface Ethernet0/0
ip address 10.48.77.104 255.255.255.0
service-policy output test
!
Presentation_ID Cisco Confidential 55
Why was MQC developed ?
policy-map <map-name>
class <class-map-name-1>
<policy-1>
<policy-n>
class <class-map-name-n>
<policy-n>
class class-default
<policy-default>
Or logical :
Subinterface, PVC, DLCI, Tunnel, Virtual-Template, Dialer,
Multilink.
policy-map parent
class class-default
shape average <CIR>
service-policy child
Interface ge1/1.1
service-policy output parent
ge1/1
policy-map cbwfq
class voice
Priority Queue
priority percent 10
class data
bandwidth percent 60 Min – 6M, Max – 10M, Excess – 1
class ftp
bandwidth remaining ratio 10
Min – 0, Max – 128K, Excess – 10
shape average 128000
class class-default
bandwidth remaining ratio 20 Min – 0, Max – 10M, Excess – 20
random-detect
WRED
The random-detect command is used to enable [W]RED on a class of traffic. Drop-
probability controls the probability of dropping the packet when the queue size reaches the
maximum threshold
Random-detect precedence/dscp/cos/clp min-threshold <value> bytes/packets/ms max-
threshold <value> bytes/packets/ms drop-probability <value>
Queue-limit
The queue-limit command is used to tune the limit on the queue associated with
a particular class of traffic. The command takes one parameter, which defines
the maximum depth the queue is allowed to reach prior to tail drop occurring.
The depth of the queue can be specified in units of packets,
bytes/kbytes/mbytes/gbytes, or in terms of the time it takes to drain the queue
at its minimum guaranteed service rate.
queue-limit <value> packets/bytes/ms
AutoQoS—VoIP AutoQoS—Enterprise
Focus on Voice vs. Data Up to 10 Classes
IP Routing
Interactive Voice
Interactive Voice Interactive Video
Streaming Video
Telephony Signaling
Transactional/Interactive
Network Management
All Other Traffic Bulk Data
Best Effort
Scavenger
!
!
class-map match-any AutoQoS-VoIP-RTP-Trust
interface Multilink2001100117
match ip dscp ef
bandwidth 768
class-map match-any AutoQoS-VoIP-Control-Trust
ip address 10.1.102.2 255.255.255.0
match ip dscp cs3
service-policy output AutoQoS-Policy-Trust
match ip dscp af31
ip tcp header-compression iphc-format
!
no cdp enable
!
ppp multilink
policy-map AutoQoS-Policy-Trust
ppp multilink fragment delay 10
class AutoQoS-VoIP-RTP-Trust
ppp multilink interleave
priority percent 70
ppp multilink group 2001100117
class AutoQoS-VoIP-Control-Trust
ip rtp header-compression iphc-format
bandwidth percent 5
!
class class-default
…
fair-queue
!
!
interface Serial2/0
bandwidth 768
no ip address
encapsulation ppp
auto qos voip trust
no fair-queue
ppp multilink
ppp multilink group 2001100117
!
Cisco AutoQoS
AutoDiscovery
Policy Traffic Class DSCP
Cisco AutoQoS
Application and IP Routing CS6
Class-Maps
Protocol Types
Match Statements Interactive Voice EF
Transactional/Interactive AF21
Best Effort 0
Scavenger CS1
<policy continued>
!
policy-map AutoQoS-Policy-Se4/0-Parent
class class-default
shape average 256000
service-policy AutoQoS-Policy-Se4/0
!
interface Serial4/0 point-to-point
frame-relay interface-dlci 100
class AutoQoS-FR-Serial4/0-100
!
map-class frame-relay AutoQoS-FR-Serial4/0-100
frame-relay cir 256000
frame-relay mincir 256000
frame-relay fragment 320
service-policy output AutoQoS-Policy-Se4/0-Parent
Global
Impact
Scope of Damage
Regional
Networks Next Gen
Infrastructure
Multiple Hacking, Flash
Threats,
Networks Third Gen Massive Worm
Multiserver DoS, Driven DDoS,
Individual Second Gen DDoS, Blended Negative
Networks Macro Viruses, Threat (Worm+ Payload Viruses,
Trojans, Email, Virus+ Trojan), Worms, and
Single Server Turbo Worms, Trojans
Individual First Gen DoS, Limited Widespread
Computer Boot Viruses Targeted Hacking System Hacking
2—Propagation
Mechanism
3—Payload
L3VPN
Internet
L2VPN
BBDSL
MetroE
Teleworker
Output
Input from the Control
to the Control Plane
Plane
Control Plane Policing Silent Mode
(Alleviating DoS Attack) (Reconnaissance Prevention)
Processor
Switched
Packets
NAT
CEF/FIB Lookup
CEF Input Forwarding Path
Presentation_ID Cisco Confidential 83
Data Plane Policing (Scavenger-Class QoS)
Part One: First Order Anomaly Detection
Normal/Abnormal Threshold
Police
Queuing Will Engage When Links Become Congested and Traffic Previously
Marked as Scavenger Is Dropped Aggressively
Presentation_ID Cisco Confidential 85
NBAR Known-Worm Policing
NBAR vs. Code Red Example
Frame IP Packet TCP Segment Data Payload
L2VPN
BBDSL
MetroE
Protect the Control Plane
• Control plane policing
Teleworker
L3 Classification L2
Application
IPP PHB DSCP CoS
Routing 6 CS6 48 6
Voice 5 EF 46 5
Video Conferencing 4 AF41 34 4
Streaming Video 4 CS4 32 4
Mission-Critical Data 3 AF31* 26 3
Call Signaling 3 CS3* 24 3
Best Effort
≥ 25%
Scavenger/Bulk ≤
5%
Real-Time ≤
33%
Critical Data
Best Effort
Bulk ≥ 25%
4%
Scavenger/ Voice
Streaming-Video Bulk 5% 18%
Real-Time
≤ 33%
Critical Data
Network Management
Transactional Data
Interactive Video
15%
Mission-Critical Data
Internetwork-
Call-Signaling Control
Presentation_ID Cisco Confidential 94
At-a-Glance Summaries