1 / 108

IP QoS Principles

IP QoS Principles. Theory and Practice Dimitrios Kalogeras. A Bit of History. The Internet, originally designed for U. S. government use, offered only one service level: Best Effort. No guarantees of transit time or delivery Rudimentary prioritization was available, but it was rarely used.

agourley
Download Presentation

IP QoS Principles

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. IP QoS Principles Theory and Practice Dimitrios Kalogeras

  2. A Bit of History • The Internet, originally designed for U. S. government use, offered only one service level: Best Effort. • No guarantees of transit time or delivery • Rudimentary prioritization was available, but it was rarely used. • Commercialization began in early 1990’s • Private (intranet) networks using Internet technology appeared. • Commercial users began paying directly for Internet use. • Commerce sites tried to attract customers by using graphics. • Industry used the Internet and intranets for internal, shared communications that combined previously-separate, specialized networks -- each with its own specific technical requirements. • New technologies (voice over the Internet, etc.) appeared, designed to capitalize on inexpensive Internet technologies.

  3. The Demands on Modern Networks • Network flexibility is becoming central to enterprise strategy • Rapidly-changing business functions no longer carried out in stable ways, in unchanging locations, or for long time-periods • Network-enabled applications often crucial for meeting new market opportunities, but there’s no time to custom-build a network • Traffic is bursty • Interactive voice, video applications have stringent bandwidth and latency demands • Multiple application networks are being combined into consolidated corporate utility networks • Bandwidth contention as critical transaction traffic is squeezed by web browsing, file transfers, or other low-priority or bulk traffic • Latency problems as interactive voice and video are squeezed by transaction, web browsing, file transfer, and bulk traffic

  4. Definitions • Quality of Service (QoS) classifies network traffic and then ensures that some of it receives special handling. • May track each individual dataflow (sender:receiver) separately. • May include attempts to provide better error rates, lower network transit time (latency), and decreased latency variation (jitter). • Differentiated Class of Service (CoS) is a simpler alternative to QoS. • Doesn't try to distinguish among individual dataflows; instead, uses simpler methods to classify packets into one of a few categories. • All packets within a particular category are then handled in the same way, with the same quality parameters. • Policy-Based Networking provides end-to-end control. • The rules for access and for management of network resources are stored as policies and are managed by a policy server.

  5. QoS Background • Video Streaming Services • Video Conferencing • VoIP • Legacy SNA / DLSw QoS development inspired by new types of applications in IP environment:

  6. QoS Architecture Models • Best Effort Service • Integrated Service • Differentiated Service

  7. Best Effort Service What exactly IP does: • All packets treated equally • Unpredictable bandwidth • Unpredictable delay and jitter

  8. IntServ (RFC1633)

  9. DiffServ (RFC2474/2475)

  10. QoS Architecture Components • Classification • Coloring • Admission Control • Traffic Shaping/Policing • Congestion Management • Congestion Avoidance • Signaling

  11. Statistical Behavior: Random Arrival • In random arrival, the time that each packet arrives is completely independent of the time that any other packet arrives. • If the true situation is that arrivals tend to be evenly spaced, then random arrival calculations will overestimate the queuing delay. • If the true situation is that arrivals are bunched in groups (typical of data flows, such as packets and acknowledgements), then random arrival calculations will underestimate the queuing delay. • Our intuition is usually misleading when we think of random processes. • We tend to assume that queue size increases linearly as the number of customers increases. • But, with random arrival, there is a drastic increase in queue size as the customer arrival rate approaches 80% of the theoretical server capacity. There’s no way to store the capacity that is unused by late customers, but early customers increase the queue.

  12. Random Arrival and Intuition • The surprising increase in queue length is best shown by a graph:

  13. Random Arrival vs. Self-Similar • Although random arrival is very convenient mathematically (it’s relatively simple to do random arrival calculations), it has been shown that much data traffic is self-similar. • Ethernet and Internet traffic flows, in particular, are self-similar. • The rate of initial connections is still random, however. • Self-similar traffic shows the same pattern regardless of changes in scale. • Fractal geometry (e.g., a coastline) is an example. • Self-similar traffic has a heavy tail. • The probabilities of extremely large values (e.g., file lengths of a gigabyte or more) don’t decrease as rapidly, as they would with random distributions of file lengths. • This matches real data traffic behaviors. • Long file downloads mixed with short acknowledgements • Compressed video with action scenes mixed with static scenes

  14. Traffic Classification • Most fundamental QoS building block • The component of a QoS feature that recognizes and distinguishes between different traffic streams • Without classification, all packets are treated the same

  15. Traffic Classification/Admission Control Issues • Always performed at the network perimeter • Makes traffic conform to the internal network policy • Marks packets with special flags (colors) • Colors used afterwards inside the network for QoS management

  16. Meter Admitted Shaper/Policer Classifier Marker Packet Dropped Classification/Admission Control Scheme

  17. Classification Criteria • IP header fields • TCP/UDP header fields • Routing information • Packet Content (NBAR)i.e. HTTP, HTTPS, FTP, Napster etc.

  18. Traffic Coloring Options • IP Precedence • DSCP • QoS Group • 802.1p CoS • ATM CLP • Frame Relay DE

  19. Type-of-Service (RFC791) Precedence D T R Unused Version Length ToS Field Total Length … 0 8 15 31

  20. IP Precedence Values

  21. DSCPDiffserv Code Point DSCP (6 bits) Unused

  22. Classification mechanisms • MQC ( Modular Qos Command Line Interface) • CAR ( Commited Access Rate)

  23. Modular QoS CLI Modular QoS CLI (MQC) • Command syntax introduced in 12.0(5)T • Reduces configuration steps and time • Uniform CLI across all main Cisco IOS-based platforms • Uniform CLI structure for all QoS features

  24. router(config)# class-map [match-any | match-all] class-name • 1.Create Class Map - a traffic class( match access list, input interface, IP Prec, DSCP, protocol (NBAR) src/dst MAC address, mpls exp). router(config)# policy-map policy-map-name • 2. Create Policy Map (Service Policy) - Associate a class map with one or more QoS policies(bandwidth, police, queue-limit, random detect, shape, set prec, set DSCP, set mpls exp). router(config-if)# service-policy {input | output} policy-map-name • 3. Attach Service Policy- Associate the policy map with an input or output interface. Basic MQC Commands

  25. Basic MQC Commands • 1. Create Class Map – defines traffic selection criteria Router(config)# class-map class1 Router(config-cmap)# match ip precedence 5 Router(config-cmap)# exit • 2. Create Policy Map- associates classes with actions Router(config)# policy-map policy1 Router(config-pmap)# class class1 Router(config-pmap-c)# set mpls experimental 5 Router(config-pmap-c)# bandwidth 3000 Router(config-pmap-c)# queue-limit 30 Router(config-pmap)# exit • 3. Attach Service Policy – enforces policy to interfaces Router(config)# interface e1/1 Router(config-if)# service-policy output policy1 Router(config-if)# exit

  26. Classification Configuring Sample IOS 12.1(5)T MQC based class-map match-all premium match access-group name premium ! class-map match-any trash match protocol napster match protocol fasttrack ! policy-map classify class premium set ip precedence priority class trash police 64000 conform-action set-prec-transmit 1 excess-action drop ! ip access-list extended premium permit tcp host 10.0.0.1 any eq telnet ! interface serial 2/1 ip unnumbered loopback 0 service-policy input classify Traffic class definitions QoS policy definition ACL definition QoS Policy attachedto interface

  27. Classification Configuring Sample ip cef ! interface serial 2/1 ip unnumbered loopback 0 rate-limit input access-group 100 64000 8000 8000 conform-action set-prec-transmit 1 exceed-action set-prec-transmit 0 ! access-list 100 permit tcp host 10.0.0.1 any eq http CAR based CAR definition ACL definition

  28. Classification Configuring Sample route-map classify permit 10 match ip address 100 set ip precedence flash ! route-map classify permit 20 match ip next-hop 1 set ip precedence priority ! interface serial 2/1 ip unnumbered loopback 0 ip policy route-map classify ! access-list 1 permit 192.168.0.1 access-list 100 permit tcp host 10.0.0.1 any eq http Route-map based Route-map definitions Route-map attachedto interface ACL definitions

  29. Shaping/Policing • Used to assign more predictive behavior to traffic • Uses Token Bucket model

  30. Tokens v Bc Overflow Tokens C Incoming packets Conform Exceed Token Bucket Model Token Bucket main parameters: • Token Arrival Rate - v • Bucket Depth - Bc • Time Interval – tc • Link Capacity - C Token Bucket characterizes traffic source tc = Bc/v

  31. Token Bucket Model • Bucket is being filled with tokens at a rate v token/sec. • When bucket is full all the excess tokens are discarded. • When packet of size L arrives, bucket is checked for availability of corresponding amount of tokens. • If several packets arrive back-to-back and there are sufficient tokens to serve them all, they are accepted at peak rate (usually physical link speed). • If enough tokens available, packet is optionally colored and accepted to the network and corresponding amount of tokens is subtracted from the bucket. • If not enough tokens, special action on packet is performed.

  32. Token Bucket Model Actions performed on nonconforming packets: • Dropped (Policing) • Delayed in queue either FIFO or WFQ (Shaping) • Colored/Recolored

  33. Token Bucket Model Bucket depth variation effect: • Bc = 0 Constant Bit Rate (CBR) • Bc No Regulation Bucket depth is characteristic of traffic burstiness Maximum number of bytes transmitted over period of time t: A(t)max = Bc+v·t

  34. Excess Burst (Be)Cisco Implementation GTS ( Generic Traffic Shaping) If during previous tcn-1 interval bucket Bc was not depleted (there is no congestion), in the next interval tcnBc+Be bytes are available for burst. In frame relay implementations packets admitted via Be tokens are marked with DE bit.

  35. Excess Burst (Be)Cisco Implementation CBTS (Class Based Traffic Shaping) allows higher throughput in uncongested environment up to peak rate calculated as vPeak = vCIR(1+Be/Bc) Peak rate can be set up manually.

  36. Excess Burst (Be)Cisco Implementation CAR allows RED like behavior: • traffic fitting into Bc always conforms • traffic fitting into Be conforms with probability proportional to amount of tokens left in the bucket • traffic not fitting into Be always exceedsCAR uses the following parameters: • t – time period since the last packet arrival • Current Debt (Dcur) – Amount of debt during current time interval • Compound Debt (Dcomp) – Sum of all Dcur since the last drop • Actual Debt (Dact) – Amount of tokens currently borrowed

  37. Excess Burst (Be)Cisco Implementation Packet of lengthL arrived CAR Algorithm Y ConformAction Bccur – L > 0 Bccur = Bccur – L N Dcur = L - Bccur Bccur = 0 Dcomp = Dcomp + Dcur Dact = Dact + Dcur +v·t Y ExceedAction Dact > Be N Y Dcomp = 0 Dcomp > Be N

  38. Shaping Configuration Sample GTS Based interface serial 2/1 ip unnumbered loopback 0 traffic-shape rate 64000 8000 1000 256 ! interface serial 2/2 ip unnumbered loopback 0 traffic-shape group 100 64000 8000 8000 512 ! access-list 100 permit tcp host 10.0.0.1 any eq http Shaper Definitions ACL definition Shaper can be only used to control egress traffic flow!

  39. Policing Configuration Sample IOS 12.0(5)T CAR Based ip cef interface serial 2/1 ip unnumbered loopback 0 rate-limit output access-group 100 64000 8000 16000 conform-action transmit excess-action drop ! interface serial 2/2 ip unnumbered loopback 0 rate-limit input 128000 16000 32000 conform-action transmit excess-action drop ! access-list 100 permit tcp host 10.0.0.1 any eq http CAR Definitions ACL definition Policer can be used to control ingress traffic flow!

  40. Shaping/Policing Configuration Sample IOS 12.1(5)T MQI Based class-map match-all policed match protocol http class-map match-all shaped match access-group name ftp-downloads ! policy-map bad-boy class policed police 64000 8000 8000 conform-action transmit exceed-action drop class shaped shape average 128000 ! interface serial 2/1 ip unnumbered loopback 0 service-policy output bad-boy ! ip access-list extended ftp-downloads permit tcp any eq ftp-data any Class definitions QoS policy definition QoS Policy attachedto interface ACL definition

  41. CAR Policing Problem Why cannot my traffic reach CIR value? Cause: Improper setting of Bc and Be values CAR is aggressive, as drops excessive packets and the lost data needs to be retransmitted by upper layers (mainly TCP) after timeout. This also causes TCP to shrink its window reducing flow throughput. Cisco Systems recommends the following settings: Bc = 1.5xCIR/8 Be = 2xBc

  42. Congestion Management

  43. Queuing • Traffic burst may temporarily exceed interface capacity • Without queuing this excess traffic will be lost • Queuing allows bursty traffic to be transmitted without drops • Queuing strategy defines order in which packets are transmitted through egress interface • Queuing introduced additional delay which signals to adaptive flows (like TCP) to back off their throughput

  44. Queuing Algorithms • FIFO • Priority (Absolute) • Weighted Round Robin (WRR) • Fair

  45. FIFO • Simplest queuing method with the least CPU overhead • No congestion control • Transmits packets in the order of arrival • High volume traffic can suppress interactive flows • Default queuing for interfaces > 2Mbps (i.e. Ethernet)

  46. FIFO FIFO average queue depth dependence on load

  47. Absolute Priority Queuing • Generic Priority Queuing • Custom Queuing • RTP Priority Queuing • Low Latency Queuing (LLQ)

  48. Simplest QoS Algorithm: Priority Queuing • Stated requirement: • “If <application> has traffic waiting, send it next” • Commonly implemented • Defined behavior of IP precedence

  49. Priority Queuing Implementation Approach • Identify interesting traffic • Access lists • Place traffic in various queues • Dequeue in order of queue precedence

  50. Priority Queuing (PQ) • Interface Hardware • Ethernet • Frame Relay • ATM • Serial Link • Etc. High Traffic Destined for Interface Medium Classify Normal Transmit Queue Output Line Low Q Length Defined by Q Limit Absolute Priority Scheduling Interface Buffer Resources • Classification by: • Protocol (IP, IPX, AppleTalk, SNA, DecNet, Bridge, etc.) • Incoming Interface (EO, SO, S1, etc.)

More Related