Quality of Service (QoS) An Overview TAC-TOI-01 © 2001, Cisco Systems, Inc. All rights reserved. 1 What Is Quality of Service? The ability of the network to provide better or “special” service to users/applications. Voice - Video - Data Consistent, Predictable Performance TAC-TOI-01 © 2001, Cisco Systems, Inc. All rights reserved. 2 Not All Traffic Is Equal Voice FTP ERP and Mission-Critical Low to Moderate Moderate to High Low Random Drop Sensitive Low High Moderate To High Delay Sensitive High Low Low to Moderate Jitter Sensitive High Low Moderate Bandwidth Traffic Is Grouped into SLAs TAC-TOI-01 © 2001, Cisco Systems, Inc. All rights reserved. 3 Step 1: Identify Traffic and its Requirements • Network audit What is running and when? • Business audit How important is it for business? • Application audit What are it’s requirements from network? • Service levels required TAC-TOI-01 © 2001, Cisco Systems, Inc. All rights reserved. 4 Step 2: Divide the Traffic into Classes and Color It Differentiated IP Services Voice Platinum Class Low Latency Gold Guaranteed: Latency and Delivery Silver Guaranteed Delivery Bronze Best Effort Delivery E-Commerce Application Traffic Traffic Classification E-mail, Web Browsing Voice TAC-TOI-01 © 2001, Cisco Systems, Inc. All rights reserved. 5 What Is a Class? • Single user MAC address, IP address… • Department, customer Sub net, interface… • Application Port numbers, URL… TAC-TOI-01 © 2001, Cisco Systems, Inc. All rights reserved. 6 What Is Coloring? IP Precedence & DiffServ IP Packet Version ToS 1 Len Length Byte ID Offset TTL Proto FCS IP-SA IP-DA Data Type of Service (ToS) IP Precedence • Use ToS field to signal business QoS policies IP Differentiated Service • Differentiate network services across any media or topology Data, Voice, Video TAC-TOI-01 © 2001, Cisco Systems, Inc. All rights reserved. 7 Coloring at Layer 2 and Layer 3 Three Bits Used for CoS (User Priority) Layer 2 802.1Q/p PREAM. SFD DA Layer 3 IPv4 Version ToS Len Length 1 Byte TAC-TOI-01 SA TAG 4 Bytes PT DATA FCS Standard IPV4: Bits 0-2 Called IP Precedence (Three MSB) (DiffServ Uses Six ToS bits…: Bits 0-5, with Two Reserved) ID © 2001, Cisco Systems, Inc. All rights reserved. offset TTL Proto FCS IP-SA IP-DA Data 8 Color the Packets Coloring Engine VolP HTTP FTP Separate “Conform” and “Exceed” Actions VolP HTTP FTP VolP Platinum Class HTTP Gold Class FTP Bronze Class • Color closer to the application • Set the DSCP (DiffServ Code Point) at the edge of network • Avoid host application-based coloring TAC-TOI-01 © 2001, Cisco Systems, Inc. All rights reserved. 9 !! Detour !! Differentiated Services (DiffServ) The Formula for Scalable QoS TAC-TOI-01 © 2001, Cisco Systems, Inc. All rights reserved. 10 The IETF DiffServ Model (RFC-2474,2475,2597,2598) • The idea is VERY simple—Offer service levels for packets: Gold, Silver, Bronze, etc… • What is a service? “Some significant characteristics of packet transmission in one direction across a set of one or more paths within a network (e.g.: Bandwidth,Latency,etc..)”...RFC-2475 • Packets of a particular service are referred to as packets of a particular “class” • Meaningful services constructed using Per-Hop Behaviors (PHB) TAC-TOI-01 © 2001, Cisco Systems, Inc. All rights reserved. 11 The DiffServ Traffic Conditioner Block (TCB) • Classifier: Identifies packets for assignment to Classes • Meter: Checks compliance to traffic parameters (Token Bucket) and passes result to Marker and Shaper/Dropper to trigger particular action for in/outof-profile packets • Marker: Writes/rewrites the DSCP value • Shaper: Delays some packets for them to be compliant with the profile • Dropper: Drops packets that exceed the profile (Bc or Be) TAC-TOI-01 © 2001, Cisco Systems, Inc. All rights reserved. 12 The DiffServ Recipe for Constructing Services • At the Ingress Network-Edge: (Traffic Conditioning Block—TCB) 1) Classify the packets into ‘Classes’ 2) Mark (Color) the packets for purposes of classification in the core 3) Optionally meter a class 4) If performing (3), police or shape the class (at network ingress and/or egress) 5) Queue and/or drop packets toward the core • In the network core: (implementing the PHB) 6) Queue and/or drop packets TAC-TOI-01 © 2001, Cisco Systems, Inc. All rights reserved. 13 How DiffServ Works Step 1: Classifying Packets into Classes • The most popular techniques: Incoming/outgoing interface All/any IP traffic Standard or extended access control list IP RTP ports (real-time traffic) Source/destination MAC address DSCP or IP precedence value (If trusted and marked appropriately) MPLS EXP (experimental bits) (If trusted and marked appropriately) Network-Based Application Recognition (NBAR) • E.g.: all VoIP (RTP) packets between UDP ports 16384 and 16484 belong to the “Premium Class” TAC-TOI-01 © 2001, Cisco Systems, Inc. All rights reserved. 14 The Hook for Scalable IPv4 Packet-Marking and Classification Packets are Marked @ the Edge, for Purposes of Classification in the Core Version ToS Len Length 1 Byte ID offset TTL Proto FCS IP-SA IP-DA Data The IPv4 Header and the Type of Service (ToS) Byte TAC-TOI-01 © 2001, Cisco Systems, Inc. All rights reserved. 15 IPv4 ToS vs. DS-Field (The ToS Byte Is Re-Defined) Just Remember TAC-TOI-01 © 2001, Cisco Systems, Inc. All rights reserved. “DSCP” 16 How DiffServ Works Step 2: Marking Packets of the Defined Classes • Remember that marking can also be in Layer2! • The most popular techniques: IP DSCP—Layer 3 MPLS EXP bits—Layer 2.5 ATM CLP-bit—Layer 2 Frame-relay DE-bit—Layer 2 IEEE 802.1Q/p user-priority bits—Layer 2 • E.g.: The Premium Class (VoIP) packets get marked with IP DSCP—‘101110’ TAC-TOI-01 © 2001, Cisco Systems, Inc. All rights reserved. 17 How DiffServ Works Optional Step 3: Metering (The Token Bucket) • Tokens keep pouring into the bucket at a pre-defined average-rate • If Token available, can transmit a packet • Used by policer and shaper • Explained in detail: Next talk and Sess#: IPS-230 Tokens B—Burst Size p p—Token Arrival Rate Overflow Tokens B Packets Arriving Conform Exceed TAC-TOI-01 © 2001, Cisco Systems, Inc. All rights reserved. 18 Traffic Traffic How DiffServ Works Step 4: MeteringPolicing (Dropping)/Shaping Traffic Rate Traffic Rate Policing Time Traffic Rate Traffic Traffic Time Traffic Rate Shaping Time TAC-TOI-01 © 2001, Cisco Systems, Inc. All rights reserved. Time 19 On Policing… • Policing is used not only to drop out-of-profile packets, but also to re-mark them, and indicate to dropping mechanisms downstream that they should be dropped ahead of the in-profile packets! Web ERP Other Direction of Traffic Flow TAC-TOI-01 © 2001, Cisco Systems, Inc. All rights reserved. 20 On Shaping… • Shaping is commonly used where speed-mismatches exist (e.g.: Going from a HQ site with a T1/E1 connection to a Frame-Relay Network, down to a remote site with a 128Kbps connection) • Shaping involves buffering, and various queuing/scheduling techniques may be used when the shaped rate is reached! FR/ATM WAN T1/E1 128 Kbps Bottleneck Central Site Branch Office Shaping! Direction of Traffic Flow TAC-TOI-01 © 2001, Cisco Systems, Inc. All rights reserved. 21 How DiffServ Works Steps 5&6: PHB by Queuing and/ Dropping • Queuing refers to: (congestion management) Buffering packets when interface is congested Scheduling packets out of the buffer onto the link (Algorithms: FIFO, CBQ, WRR, etc…) Scheduler Outbound Packets Packets in Various Queues TAC-TOI-01 © 2001, Cisco Systems, Inc. All rights reserved. 22 How DiffServ Works Steps 5&6: PHB by Queuing and/ Dropping…(Cont.) • Dropping can happen: At the edge when policing In the edge/core when buffers are exhausted and signal congestion to the end-nodes for back-off (Tail Drop) In the edge/core to do congestion avoidance and signal congestion to the end-nodes that can back-off TAC-TOI-01 © 2001, Cisco Systems, Inc. All rights reserved. 23 The Various PHBs (Using Queuing and Dropping) • Expedited Forwarding (EF): RFC2598 Very low delay, low jitter, assured bandwidth Compare to express mail, with overnight delivery • Assured Forwarding (AF): RFC2597 Assured amount of bandwidth IETF has defined four AF classes Compare to registered mail—very safe, and assured • Class Selector: Backwards compatible with IP precedence for Forwarding Probability (FP) FP(Precedence (x+1)) FP(Precedence (x)) Compare to FP(Express Mail) FP(Priority Mail) • Default: Best effort ~ normal mail TAC-TOI-01 © 2001, Cisco Systems, Inc. All rights reserved. 24 The DiffServ AF PHB (4 Classes, 3 Drop Preferences) AF Class 1: 001dd0 AF Class 2: 010dd0 AF Class 3: 011dd0 AF Class 4: 100dd0 dd = drop preference E.g. AF12 = Class 1, Drop 2, thus “001100” • Four independently forwarded/queued classes • Within each AF class, 3 levels of drop preference Used to increase the probability of dropping, especially when traffic exceeds configured rate/CIR (Out-of-Profile) TAC-TOI-01 © 2001, Cisco Systems, Inc. All rights reserved. 25 Cisco IOS DiffServ • Cisco IOS 12.1(5)T,12.2(1)M and later versions are fully compliant with all the core DiffServ RFCs (RFCs: 2474,2475,2597,2598) • Compliant platforms*: C26xx, C36xx, C72xx, C75xx Other platforms have most of the pieces Full compliancy in the near future… ARM your network with DiffServ! TAC-TOI-01 © 2001, Cisco Systems, Inc. All rights reserved. 26 Back on Track TAC-TOI-01 © 2001, Cisco Systems, Inc. All rights reserved. 27 Step 3: Define Policies for the Classes • Set minimum bandwidth guarantee This is the minimum guaranteed bandwidth to the class all the time • Set maximum bandwidth limits This is the maximum amount of bandwidth class will ever get • Assign priorities to each class Class is treated in a strict priority manner • Manage congestion TAC-TOI-01 © 2001, Cisco Systems, Inc. All rights reserved. 28 Minimum Bandwidth Guarantee/ Priority for a Class “ Policy required: Make sure my platinum class gets a priority treatment and gold class gets a minimum bandwidth guarantee ” TAC-TOI-01 © 2001, Cisco Systems, Inc. All rights reserved. 29 Scheduling Gold 40% Guaranteed: Latency, Delivery Silver 25% Guaranteed: Delivery Bronze 10% Best Effort Step 1: Define Buffering • • • • • Step 2: Define Bandwidth Weights guarantee minimum bandwidth Buffering controls latency Unused capacity is shared amongst the other classes Each queue can be separately configured for QoS Benefits: Maximize transport of paying traffic No loss of service class guarantees No wasted bandwidth as with PVCs TAC-TOI-01 © 2001, Cisco Systems, Inc. All rights reserved. 30 Low Latency Queuing PQ—Voice V V 1 1 Interface WFQ—Data 2 2 PQ WFQ—Data 3 3 3 3 WFQ—Data 4 4 4 4 TAC-TOI-01 © 2001, Cisco Systems, Inc. All rights reserved. WFQ Exhaustive Queuing V V 4 3 2 1 1 WAN Circuit 31 Large Packets “Freeze Out” Voice Voice Packet 60 Bytes Every 20 ms Voice Packet 60 Bytes Every >214 ms Voice Packet 60 Bytes Every >214 ms ~214 ms Serialization Delay Voice 1500 Bytes of Data Voice Voice 1500 Bytes of Data Voice 10 Mbps Ethernet Voice 1500 Bytes of Data Voice 10 Mbps Ethernet 56 Kb WAN • Large packets can cause playback buffer underrun, resulting in slight voice degradation • Jitter or playback buffer can accommodate some delay/delay variation TAC-TOI-01 © 2001, Cisco Systems, Inc. All rights reserved. 32 Large Packets “Freeze Out” Voice Voice Packet 60 Bytes Every 20 ms Voice Packet 60 Bytes Every >214 ms Voice Packet 60 Bytes Every >214 ms ~214 ms Serialization Delay Voice 1500 Bytes of Data Voice Voice 1500 Bytes of Data Voice 10 Mbps Ethernet Voice 1500 Bytes of Data Voice 10 Mbps Ethernet 56 Kb WAN • Large packets can cause playback buffer underrun, resulting in slight voice degradation • Jitter or playback buffer can accommodate some delay/delay variation TAC-TOI-01 © 2001, Cisco Systems, Inc. All rights reserved. 33 Fragmentation Recommendations Assuming 10 ms Max Blocking Delay “Rules of Thumb” 10 ms/Time for 1 Byte at BW = Fragment Size Link Speed 56kbps 64kbps 128kbps 256kbps 512kbps 768kbps 1536kbs TAC-TOI-01 © 2001, Cisco Systems, Inc. All rights reserved. Frag Size 70 Bytes 80 Bytes 160 Bytes 320 Bytes 640 Bytes 1000 Bytes 2000 Bytes X Fragmentation Not Needed if Max Frame Size Is 1500 Bytes 34 Link Fragmentation and Interleaving (LFI) Fragment • Fragment large packets and interleave with voice packets over WAN links • Reassemble at other end of link • Reduces voice delay and jitter TAC-TOI-01 © 2001, Cisco Systems, Inc. All rights reserved. 35 Maximum Rate Limiting “ Policy required: Make sure my bronze traffic does not get more than x kbps of bandwidth at any time TAC-TOI-01 © 2001, Cisco Systems, Inc. All rights reserved. ” 36 Traffic Rate Policing Traffic Traffic Traffic Policing vs. Shaping Traffic Rate Time TAC-TOI-01 © 2001, Cisco Systems, Inc. All rights reserved. Time Shaping Traffic Traffic Time Traffic Rate Traffic Rate Time 37 Policer Web ERP/SAP Trash Pointcast TAC-TOI-01 © 2001, Cisco Systems, Inc. All rights reserved. 38 Shaper Internet Service 128 Kbps Provider (ISP) Cloud T1 Branch Office Bottleneck I Need to Reduce the Pace at Which I Send Packets Central Site • Reduces outbound traffic flow to avoid congestion (via buffering) • Eliminates bottlenecks in topologies with data rate mismatch • Provides mechanism to partition interfaces to match far-end requirements TAC-TOI-01 © 2001, Cisco Systems, Inc. All rights reserved. 39 Congestion Avoidance “ Policy required: Make sure my bronze or silver traffic gets dropped when there is congestion and not gold traffic ” TAC-TOI-01 © 2001, Cisco Systems, Inc. All rights reserved. 40 Weighted Random Early Detection TAC-TOI-01 Gold Silver Bronze High Precedence Medium Precedence Low Precedence Guarantee MissionCritical Apps, e.g., ERP, Customer Care, Unified Messaging E-Mail, Interactive Video, Web E-Fax, FTP © 2001, Cisco Systems, Inc. All rights reserved. 41 Putting it All Together LLQ IF Policer/Marker DSCP Written IP Traffic VolP HTTP FTP VolP HTTP FTP CBWFQ W-RED Queues or WFQ Scheduler • Colored (DSCP set) at ingress • Classified and potentially discarded by WRED (congestion management) • Assigned to the appropriate outgoing queue • Packets are: • Scheduled for transmission by CBWFQ TAC-TOI-01 © 2001, Cisco Systems, Inc. All rights reserved. 42 Policy Packet Classified to Code Point X on Client or Router/Switch RESV PATH Directory RESV PATH RESV PATH Policy Server Response: “Admit the Call and Use the DiffServ Code Point X for Data Flow” Policy Server RSVP (Quantative) Is Used for the Control Path Flow; Data Path Uses an Aggregate as Identified by the DSCP; RSVP Is Used to Signal the Data Path Aggregate TAC-TOI-01 © 2001, Cisco Systems, Inc. All rights reserved. 43 Complete QoS Management Network Wide CONFIGURE TRENDING MONITORING QPM IPM XML XML Device SLAM XML QDM TAC-TOI-01 © 2001, Cisco Systems, Inc. All rights reserved. QDM 44 Cisco IOS IP Network Services Quality of Service Quality of Service TAC-TOI-01 © 2001, Cisco Systems, Inc. All rights reserved. … Directory Policy Management •Introduced in Release 12.1T •Introduced in Release 12.1 Internet Application Technologies Address Mgmt Caching Load Balancing SNA Evolution VPN Multicast Video Voice Security QoS •Class-based Marking •Class-based Shaping •QoS for 1750 Platform •RSVP Support for LLQ •Express Compressed Resource Transport Protocol and TCP Header Compression (CRTP) •Common Open Policy Service for Resource Reservation Protocol (COPS for RSVP) •DOCSIS 1.0+ Quality of Service Enhancements •DOCSIS 1.0+ features for uBR924 Cisco IP Fabric Platforms • IP QoS to ATM CoS integration • CEF-Switched Compressed RTP • Class-Based Weighted Fair Queuing (CBWFQ) • Low Latency Priority Queue with CBWFQ • IP RTP Priority for MLPPP • Frame Relay Fragmentation (FRF.12) 45 For More Information http://www.cisco.com/warp/public/732/ http://www.cisco.com/warp/public/732/Tech/ http://www.cisco.com/warp/public/732/Tech/ quality.shtml Overview: Network-Based Application Recognition TAC-TOI-01 © 2001, Cisco Systems, Inc. All rights reserved. http://wwwin.cisco.com/cmc/cc/so/neso/ ienesv/cxne/nbar_ov.htm 46 Why QoS?? Congestion Scenario #1—Speed Mismatch 100Mbps 2Mbps WAN 1000Mbps 100Mbps Direction of Data-Flow • The #1 Reason for Congestion! • Possibly Persistent when going from LAN to WAN • Usually Transient when going from LAN to LAN! TAC-TOI-01 © 2001, Cisco Systems, Inc. All rights reserved. 47 Why QoS?? Congestion Scenario #2—Aggregation HQ 2Mbps Hubi 512Kbps FR/ATM N*56Kbps Choke Points 1000Mbps S1 S2 Remotej 1000Mbps Choke Point Direction of Data-Flow • Transient Congestion fairly typical! TAC-TOI-01 © 2001, Cisco Systems, Inc. All rights reserved. 48 Why QoS?? Congestion Scenario #3—Confluence Net-1 Core1 Net-2 Core2 STM-64/OC-192c STM-16/OC-48c Net-n • Always need mechanisms to provide guarantees! • Transient Congestion occurs! TAC-TOI-01 © 2001, Cisco Systems, Inc. All rights reserved. 49