Transcript Chapter
IP QoS
Andy Chien Cisco Systems © 2001, Cisco Systems, Inc.
Why IP QoS?
•
Application X is slow!
•
Video broadcast occasionally stalls!
•
Phone calls over IP are no better than over satellite!
•
Phone calls have really bad voice quality!
•
ATM (the money-dispensing-type) are non responsive!
•
...
© 2001, Cisco Systems, Inc. IP QoS Introduction-2
Because ...
•
Application X is slow! (not enough BANDWIDTH )
•
Video broadcast occasionally stalls! (DELAY temporarily increases – JITTER )
•
Phone calls over IP are no better than over satellite! (too much DELAY )
•
Phone calls have really bad voice quality! (too many phone calls – ADMISSION CONTROL )
•
ATM (the money-dispensing-type) are non responsive! (too many DROPs )
•
...
© 2001, Cisco Systems, Inc. IP QoS Introduction-3
What Causes ...
•
Lack of bandwidth
– multiple flows are contesting for a limited amount of bandwidth
•
Too much delay
– packets have to traverse many network devices and links that add up to the overall delay
•
Variable delay
– sometimes there is a lot of other traffic which results in more delay
•
Drops
– packets have to be dropped when a link is congested © 2001, Cisco Systems, Inc. IP QoS Introduction-4
IP
Available Bandwidth
IP IP IP 256 kbps 512 kbps 10 Mbps 100 Mbps
• •
BW max = min(10M, 256k, 512k, 100M)=256kbps BW avail = BW max /Flows Maximum available bandwidth equals the bandwidth of the weakest link Multiple flows are contesting for the same bandwidth resulting in much less bandwidth being available to one single application.
© 2001, Cisco Systems, Inc. IP QoS Introduction-5
End-to-end Delay
IP IP IP IP Propagation delay (P1) Processing and queuing delay (Q1) Propagation delay (P2) Processing and queuing delay (Q2) Propagation delay (P3) Processing and queuing delay (Q3) Propagation delay (P4) Delay = P1 + Q1 + P2 + Q2 + P3 + Q3 + P4 = X ms
• •
End-to-end delay equals a sum of all propagation, processing and queuing delays in the path Propagation delay is fixed, processing and queuing delays are unpredictable in best-effort networks © 2001, Cisco Systems, Inc. IP QoS Introduction-6
Processing and Queuing Delay
Forwarding IP IP IP IP Processing Delay Queuing Delay Propagation Delay
• • •
Processing Delay is the time it takes for a router to take the packet from an input interface and put it into the output queue of the output interface. Queuing Delay is the time a packets resides in the output queue of a router.
Propagation or Serialization Delay is the time it takes to transmit a packet.
© 2001, Cisco Systems, Inc. IP QoS Introduction-7
Packet Loss
Forwarding IP IP IP IP IP Tail-drop
• •
Tail-drops occur when the output queue is full. These are the most common drops which happen when a link is congested. There are also many other types of drops that are not as common and may require a hardware upgrade (input drop, ignore, overrun, no buffer, ...). These drops are usually a result of router congestion. © 2001, Cisco Systems, Inc. IP QoS Introduction-8
How to Increase Available Bandwidth?
TCP Header Compression RTP Header Compression cTCP data Compress the Headers IP TCP data
• • • •
Compress the Payload Compressed packet Stacker Predictor Priority Queuing (PQ) Custom Queuing (CQ) Modified Deficit Round Robin (MDRR) Class-based Weighted Fair Queing (CB-WFQ) Upgrade the link. The best solution but also the most expensive.
Take some bandwidth from less important applications.
Compress the payload of layer-2 frames.
Compress the header of IP packets.
© 2001, Cisco Systems, Inc. IP QoS Introduction-9
How to Reduce Delay?
TCP Header Compression RTP Header Compression cRTP data IP Compress the Headers UDP RTP data
• • • •
Compress the Payload Compressed packet Stacker Predictor Priority Queuing (PQ) Custom Queuing (CQ) Strict Priority MDRR IP RTP prioritization Class-based Low-latency Queuing (CB-LLQ) Upgrade the link. The best solution but also the most expensive.
Forward the important packets first.
Compress the payload of layer-2 frames (it takes time).
Compress the header of IP packets.
© 2001, Cisco Systems, Inc. IP QoS Introduction-10
How to Prevent Packet Loss?
Weighted Random Early Detection (WRED) IP data Dropper Custom Queuing (CQ) Modified Deficit Round Robin (MDRR) Class-based Weighted Fair Queuing (CB-WFQ)
• • •
Upgrade the link. The best solution but also the most expensive.
Guarantee enough bandwidth to sensitive packets.
Prevent congestion by randomly dropping less important packets before congestion occurs © 2001, Cisco Systems, Inc. IP QoS Introduction-11
Which Applications Have Which QoS Requirements?
Throughput Delay Loss Jitter Interactive (e.g. Telnet) Batch (e.g. FTP) Fragile (e.g. SNA) Low High Low Low Not Important Low Low Low None Not Important Not Important Not Important Voice Low Low and Predictable Low Low Video High Low and Predictable Low
•
Enterprise networks are typically focused on providing QoS to applications Low © 2001, Cisco Systems, Inc. IP QoS Introduction-12
Which Services can be Implemented in a Network?
Throughput Delay Loss Jitter Gold Silver Bronze Best Effort Guaranteed Guaranteed Guaranteed Limitted No Guarantee Low No Guarantee No Guarantee No Guarantee Low No Guarantee No Guarantee No Guarantee Low No Guarantee No Guarantee No Guarantee . . .
. . .
. . .
. . .
. . .
•
Service provider networks typically offer services based on source and destination addresses © 2001, Cisco Systems, Inc. IP QoS Introduction-13
How can QoS be Applied?
•
Best effort
– no QoS is applied to packets (default behavior)
•
Integrated Services
model – applications signal to the network that they require special QoS
•
Differentiated Services
model – the network recognizes classes that requires special QoS © 2001, Cisco Systems, Inc. IP QoS Introduction-14
Integrated Services
•
The Internet was initially based on a
best effort
packet delivery service
•
Today's Internet carries many more different applications than 20 years ago
•
Some applications have special bandwidth and/or delay requirements
•
The
Integrated Services
model (RFC1633) was introduced to guarantee a predictable behavior of the network for these applications © 2001, Cisco Systems, Inc. IP QoS Introduction-15
IntServ Building Blocks
request Local Admission Control Remote Admission Control request Policy Enforcement Point (PEP) request Local Admission Control request reserve reserve reserve reserve Policy Decision Point (PDP)
• •
Resource Reservation is used to identify an application (flow) and signal if there are enough available resources for it Admission Control is used to determine if the application (flow) can get the requested resources © 2001, Cisco Systems, Inc. IP QoS Introduction-16
Reservation and Admission Protocols
•
The resource
ReSerVation Protocol
(
RSVP
) was developed to communicate resource needs between hosts and network devices (RFC 2205-2215)
•
Common Open Policy Service
(
COPS
) was developed to offload admission control to a central policy server (RFC 2748-2753) © 2001, Cisco Systems, Inc. IP QoS Introduction-17
RSVP-enabled Applications
•
RSVP is typically used by applications carrying voice or video over IP networks (initiated by a host)
•
RSVP with extensions is also used by MPLS Traffic Engineering to establish MPLS/TE tunnels (initiated by a router) © 2001, Cisco Systems, Inc. IP QoS Introduction-18
IntServ Implementation Options
RSVP 1) Explicit RSVP on each network node 2) 3) Class of Service or Best Effort RSVP ‘pass-through’ and CoS transport - map RSVP to CoS at network edge - pass-through RSVP request to egress RSVP at network edges and ‘pass-through’ with - best-effort forwarding in the core (if there is enough bandwidth in the core) © 2001, Cisco Systems, Inc. IP QoS Introduction-19
Explicit RSVP Transport IntServ End-to-End
RSVP
•
All Routers WFQ applied per flow based on RSVP requests © 2001, Cisco Systems, Inc. IP QoS Introduction-20
RSVP Pass-Through IntServ - DiffServ Integration
RSVP RSVP Precedence Classifier Premium Standard
•
Ingress Router RSVP protocol Mapped to classes Passed through to egress © 2001, Cisco Systems, Inc. WRED
•
Backbone WRED applied based on class
• •
Egress Router RSVP protocol sent on to destination WFQ applied to manage egress flow IP QoS Introduction-21
IntServ Support in IOS
•
RSVP and Weighted Fair Queuing supported since ’95
•
RSVP signaling for VoIP calls supported on all VoIP platforms
•
IOS supports hop-by-hop and pass-through RSVP
•
RSVP-to-DSCP (DiffServ Code Point) mapping (RSVP proxy) in 12.1T
© 2001, Cisco Systems, Inc. IP QoS Introduction-22
Benefits and Drawbacks of the IntServ Model
+
RSVP benefits:
•
Explicit resource admission control (end to end)
•
Per-request policy admission control (authorization object, policy object)
•
Signaling of dynamic port numbers (for example, H.323)
–
RSVP drawbacks:
•
Continuous signaling due to stateless architecture
•
Not scalable © 2001, Cisco Systems, Inc. IP QoS Introduction-23
Common Open Policy Service
•
Common Open Policy Service
(COPS) provides the following benefits when used with RSVP:
–
Centralized management of services
–
Centralized admission control and authorization of RSVP flows
•
RSVP-based QoS solutions become more scalable © 2001, Cisco Systems, Inc. IP QoS Introduction-24
Differentiated Services Model
•
Differentiated Services model
describes services associated with traffic classes
•
Complex traffic classification and conditioning is performed at network edge resulting in a per-packet
Differentiated Services Code Point
(
DSCP
).
•
No per-flow/per-application state in the core
•
Core only performs simple
‘per-hop behavior's’
on traffic aggregates
•
Goal is Scalability © 2001, Cisco Systems, Inc. IP QoS Introduction-25
Additional Requirements
•
Wide variety of services and provisioning policies
•
Decouple service and application in use
•
No application modification
•
No hop-by-hop signaling
•
Interoperability with non-DS-compliant nodes
•
Incremental deployment © 2001, Cisco Systems, Inc. IP QoS Introduction-26
DiffServ Elements
•
The service defines QoS requirements and guarantees provided to a traffic aggregate;
•
The conditioning functions are used to realize services; and per-hop behaviors
•
The DS field value ( DS code point ) is used to mark packets to select a per-hop behavior
•
Per-hop Behavior (PHB) is realized using a particular QoS mechanism
•
Provisioning classes is used to allocate resources to traffic © 2001, Cisco Systems, Inc. IP QoS Introduction-27
Why is Provisioning Important?
•
QoS does not create bandwidth!
•
QoS manages bandwidth usage among multiple classes
•
QoS gives better service to a well provisioned class with respect to another class © 2001, Cisco Systems, Inc. IP QoS Introduction-28
Topological Terminology
DS interior node DS Ingress Boundary node DS Egress Boundary node Boundary link Upstream DS domain Downstream DS domain DS region © 2001, Cisco Systems, Inc. Traffic Stream = set of flows Behaviour Aggregate (flows with the same DSCP) IP QoS Introduction-29
Traffic Terminology
•
Flow : a single instance of an application-to application flow of packets which is identified by source address, source port, destination address, destination port and protocol id.
•
Traffic stream : an administratively significant set of one or more flows which traverse a path segment. A traffic stream may consist of a set of active flows which are selected by a particular classifier.
•
Traffic profile : a description of the temporal properties of a traffic stream such as average and peak rate and burst size.
© 2001, Cisco Systems, Inc. IP QoS Introduction-30
Traffic Terminology
•
Behavior Aggregate (BA)
is a collection of packets with the same DS code point crossing a link in a particular direction.
•
Per-Hop Behavior
(queuing in a node) externally observable forwarding behavior applied at a DS-compliant node to a DS behavior aggregate.
•
PHB Mechanism
: a specific algorithm or operation (e.g., queuing discipline) that is implemented in a node to realize a set of one or more per-hop behaviors.
© 2001, Cisco Systems, Inc. IP QoS Introduction-31
Packet Header Terminology
DSCP field: 6bits Former ToS byte = new DS field Unused: 2bits
•
DS code point : a specific value of the DSCP portion of the DS field, used to select a PHB (Per-Hop Behavior; forwarding and queuing method)
•
DS field : the IPv4 header ToS octet or the IPv6 Traffic Class octet when interpreted in conformance with the definition given in RFC2474 . The bits of the DSCP field encode the DS code point, while the remaining bits are currently unused.
© 2001, Cisco Systems, Inc. IP QoS Introduction-32
DSCP Encoding
•
Three pools:
–
“
xxxxx0
”
–
“
xxxx11
” Standard Action Experimental/Local Use
–
“
xxxx01
” EXP/LU (possible std action)
•
Default DSCP: “
000000
”
•
Default PHB:
FIFO
,
tail-drop
© 2001, Cisco Systems, Inc. IP QoS Introduction-33
DSCP
DS field DROP Precedence DSCP
Class#1 Class #2 Class #3
CU
Class #4
Low Drop Precedence Medium Drop Prec High Drop Precedence
AF11 (001010) 10 AF12 (001100) 12 AF13 (001110) 14
High Priority = EF = 101110 = 46
AF21 (010010) 18 AF22 (010100) 20 AF23 (010110) 22 AF31 011010) 26 AF32 011100) 28 AF33 (011110) 30 AF41 (100010) 34 AF42 (100100) 36 AF43 (100110) 38
Best Effort = 000000 = 0 © 2001, Cisco Systems, Inc. IP QoS Introduction-34
DSCP Usage DS Code point selects per-hop behavior (PHB) throughout the network
•
Default
PHB
•
Class Selector
(IP precedence) PHB
•
Expedited Forwarding
(EF) PHB
•
Assured Forwarding
(AF) PHB © 2001, Cisco Systems, Inc. IP QoS Introduction-35
Backward Compatibility Using the Class Selector
•
Non-DS compliant node: node that does not interpret the DSCP correctly or that does not support all the standardized PHB’s
•
Legacy node: a non-DS compliant node that interprets IPv4 ToS such as defined by
RFC791
and
RFC1812
.
•
DSCP is backward compatible with IP Precedence (Class Selector Code point, RFC 1812) but not with the ToS byte definition from RFC 791 (“DTR” bits) © 2001, Cisco Systems, Inc. IP QoS Introduction-36
Class Selector Code Point
•
Compatibility with current IP precedence usage (RFC 1812)
•
“
xxx000
” DS code points
•
Differentiates probability of timely forwarding (PTF)
–
PTF (xyz000) >= PTF(abc000) if xyz > abc © 2001, Cisco Systems, Inc. IP QoS Introduction-37
Expedited Forwarding
•
Expedited Forwarding (EF) PHB:
–
Ensures a minimum departure rate
–
Guarantees bandwidth – the class is guaranteed an amount of bandwidth with prioritized forwarding
–
Polices bandwidth – the class is not allowed to exceed the guaranteed amount (excess traffic is dropped)
•
DSCP value: “ 101110 ”; looks like IP precedence 5 to non-DS compliant devices © 2001, Cisco Systems, Inc. IP QoS Introduction-38
EF PHB Implementations
•
Priority Queuing
•
IP RTP Prioritization
•
Class-based Low-latency Queuing (CB-LLQ)
•
Strict Priority queuing within Modified Deficit Round Robin (MDRR) on GSR © 2001, Cisco Systems, Inc. IP QoS Introduction-39
Assured Forwarding
•
Assured Forwarding
(AF) PHB:
–
Guarantees bandwidth
–
Allows access to extra bandwidth if available
•
Four standard classes (af1, af2, af3 and af4)
•
DSCP value range: “
aaadd0
” where “aaa” is a binary value of the class and “dd” is drop probability © 2001, Cisco Systems, Inc. IP QoS Introduction-40
AF Encoding
Class Value AF1 001
dd
0 AF2 AF3 AF4 010dd0 011dd0 100dd0 Drop Probability ( dd ) Low Value 01 Medium High 10 11
• •
Each AF class uses three DSCP values Each AF class is independently forwarded with its guaranteed bandwidth
•
Differentiated RED is used within each class to prevent congestion within the class © 2001, Cisco Systems, Inc. IP QoS Introduction-41
AF PHB Definition
•
A DS node MUST allocate a configurable, minimum amount of forwarding resources (buffer space and bandwidth) per AF class
•
Excess resources may be allocated between non-idle classes. The manner must be specified.
•
Reordering of IP packets of the same flow is not allowed if they belong to the same AF class © 2001, Cisco Systems, Inc. IP QoS Introduction-42
AF PHB Implementation
•
CBWFQ (4 classes) with WRED within each class
•
(M)DRR with WRED within each class
•
Optionally Custom Queuing (does not support differentiated dropping) © 2001, Cisco Systems, Inc. IP QoS Introduction-43
Router Functions
Defragmentation Decompression (payload, header) Source-based qos-label/precedence setting Destination-based qos-label/precedence setting Rate-limiting Class-based marking Policy-based-routing . . .
Rate-limiting Random dropping Shaping Compression (payload, header) Fragmentation Queuing and scheduling . . .
Input I/O Input Processing Forwarding Output Processing Output I/O Process switching Fast/optimum switching Netflow switching CEF switching
• •
Depending on the configuration, a router may perform a number of actions prior to forwarding a packet (input processing) Depending on the configuration, a router may perform a number of actions prior to enqueuing a packet in the hardware queue (output processing) © 2001, Cisco Systems, Inc. IP QoS Introduction-44
IP QoS Actions
• • • • •
Classification – Each class-oriented QoS mechanism has to support some type of classification (access lists, route maps, class maps, etc.) Metering – Some mechanisms measure the rate of traffic to enforce a certain policy (e.g. rate limiting, shaping, scheduling, etc.) Dropping – Some mechanisms are used to drop packets (e.g. random early detection) Policing rate limit based on the metering (excess traffic is dropped ) – Some mechanisms are used to enforce a Shaping rate limit based on the metering (excess traffic is delayed ) – Some mechanisms are used to enforce a © 2001, Cisco Systems, Inc. IP QoS Introduction-45
IP QoS Actions
•
Marking – Some mechanisms have the capability to mark packets based on classification and/or metering (e.g. CAR, class-based marking, etc.)
•
Queuing – Each interface has to have a queuing mechanism
•
Forwarding – There are several supported forwarding mechanisms (process switching, fast switching, CEF switching, etc.) © 2001, Cisco Systems, Inc. IP QoS Introduction-46
DiffServ Mechanisms
Meter Inbound traffic stream Classifier Marker Conditioner Shaping Dropping Queuing Scheduling Dropping
• •
Most traditional QoS mechanisms include extensive built-in classifiers
– – – – –
Committed Access Rate (CAR) QoS Policy Propagation via BGP (QPPB) Route-maps Queuing mechanisms ...
Modular QoS CLI from other actions (first implemented in 12.0(5)T) separates classifier
–
Includes all traditional classifiers + Network Based Application Recognition (NBAR) © 2001, Cisco Systems, Inc. IP QoS Introduction-47
DiffServ Mechanisms
Meter Classifier Marker Conditioner Inbound traffic stream Shaping Dropping
•
Token Bucket model is used for metering
– – – – – – – –
Committed Access Rate (CAR) Generic Traffic Shaping (GTS) Frame Relay Traffic Shaping (FRTS) Class-based Weighted Fair Queuing (CB-WFQ) Class-based Low Latency Queuing (CB-LLQ) Class-based Policing Class-based Shaping IP RTP Prioritization © 2001, Cisco Systems, Inc. Queuing Scheduling Dropping IP QoS Introduction-48
DiffServ Mechanisms
Meter Inbound traffic stream Classifier
•
Marker is used to set:
– – – – – – –
IP precedence DSCP QoS group MPLS experimental bits Frame Relay DE bit ATM CLP bit IEEE 802.1Q or ISL CoS © 2001, Cisco Systems, Inc. Marker Conditioner Shaping Dropping Queuing Scheduling Dropping
•
Marking mechanisms:
– –
Comitted Access Rate (CAR) QoS Policy Propagation through BGP (QPPB)
– –
Policy-based Routing (PBR) Class-based Marking IP QoS Introduction-49
Comparison of Markers
Marker IP precedence DSCP QoS group MPLS experimental bits Frame Relay DE bit ATM CLP bit IEEE 802.1Q or ISL CoS © 2001, Cisco Systems, Inc. Preservation Value range Throught a network 8 values, 2 reserved (0 to 7) Throught a network Local to a router 64 values, 32 are standard (0 to 63) 100 values (0 to 99) Throughout an MPLS network (optionally throughout an entire IP network) Throughout a Frame Relay network Throughout an ATM network Throughout a LAN switched network 8 values 2 (0 or 1) 2 values (0 or 1) 8 values values (0 to 7) IP QoS Introduction-50
DiffServ Mechanisms
Meter Inbound traffic stream Classifier Marker Conditioner Shaping Dropping
•
Shaping mechanisms:
–
Generic Traffic Shaping (GTS)
–
Frame Relay Traffic Shaping (FRTS)
–
Class-based Shaping
–
Hardware shaping on ATM VC Queuing Scheduling Dropping © 2001, Cisco Systems, Inc. IP QoS Introduction-51
DiffServ Mechanisms
Meter Inbound traffic stream Classifier Marker Conditioner Shaping Dropping Queuing Scheduling Dropping
•
Dropping mechanisms
–
Committed Access Rate (CAR) and Class-based Policing can drop packets that exceed the contractual rate
–
Weighted Random Early Detection nearing congestion (WRED) can randomly drop packets when an interface is © 2001, Cisco Systems, Inc. IP QoS Introduction-52
DiffServ Mechanisms
Meter Inbound traffic stream Classifier Marker Conditioner Shaping Dropping Forwarding Queuing Scheduling Dropping
•
Cisco Express Forwarding
(CEF) is recommended from IOS 12.0
•
Some QoS features work only in combination with CEF © 2001, Cisco Systems, Inc. IP QoS Introduction-53
DiffServ Mechanisms
Meter Inbound traffic stream Classifier Marker Conditioner Shaping Dropping Forwarding
• •
Traditional queuing mechanisms
–
FIFO , Priority Queuing (PQ), Custom Queuing (CQ)
•
Weighted Fair Queuing (WFQ) family
–
WFQ , dWFQ , CoS-based dWFQ , QoS-group dWFQ Advanced queuing mechanisms
–
Class-based WFQ , Class-based LLQ Queuing Scheduling Dropping © 2001, Cisco Systems, Inc. IP QoS Introduction-54
DiffServ Mechanisms
Meter Inbound traffic stream Classifier Marker Conditioner Shaping Dropping Forwarding Queuing Scheduling Dropping
•
Tail drop
on queue congestion
•
WFQ
has an improved tail-drop scheme
•
WRED
randomly drops packets when nearing congestion © 2001, Cisco Systems, Inc. IP QoS Introduction-55
© 2001, Cisco Systems, Inc. IP QoS Introduction-56