Introduction to IP QoS

Similar documents
Advanced Computer Networks

Quality of Service (QoS)

Computer Networking. Queue Management and Quality of Service (QOS)

Principles. IP QoS DiffServ. Agenda. Principles. L74 - IP QoS Differentiated Services Model. L74 - IP QoS Differentiated Services Model

Real-Time Protocol (RTP)

Improving QOS in IP Networks. Principles for QOS Guarantees

Lecture Outline. Bag of Tricks

Basics (cont.) Characteristics of data communication technologies OSI-Model

Lecture 4 Wide Area Networks - Congestion in Data Networks

What Is Congestion? Computer Networks. Ideal Network Utilization. Interaction of Queues

Internet Services & Protocols. Quality of Service Architecture

Master Course Computer Networks IN2097

Master Course Computer Networks IN2097

Congestion Control in Communication Networks

Advanced Lab in Computer Communications Meeting 6 QoS. Instructor: Tom Mahler

Transmission Control Protocol. ITS 413 Internet Technologies and Applications

Congestion in Data Networks. Congestion in Data Networks

Quality of Service in the Internet

QoS Configuration. Overview. Introduction to QoS. QoS Policy. Class. Traffic behavior

Quality of Service in the Internet

ATM Quality of Service (QoS)

Unit 2 Packet Switching Networks - II

UNIT IV TRANSPORT LAYER

Priority Traffic CSCD 433/533. Advanced Networks Spring Lecture 21 Congestion Control and Queuing Strategies

A Preferred Service Architecture for Payload Data Flows. Ray Gilstrap, Thom Stone, Ken Freeman

Mohammad Hossein Manshaei 1393

ADVANCED COMPUTER NETWORKS

Chapter 23 Process-to-Process Delivery: UDP, TCP, and SCTP

different problems from other networks ITU-T specified restricted initial set Limited number of overhead bits ATM forum Traffic Management

Quality of Service (QoS)

IP QOS Theory and Practice. eng. Nikolay Milovanov CCIE SP# 20094

Chapter 6: Congestion Control and Resource Allocation

Network Support for Multimedia

Congestion Control In The Internet Part 2: How it is implemented in TCP. JY Le Boudec 2015

Quality of Service (QoS) Computer network and QoS ATM. QoS parameters. QoS ATM QoS implementations Integrated Services Differentiated Services

CS519: Computer Networks. Lecture 5, Part 4: Mar 29, 2004 Transport: TCP congestion control

CSE398: Network Systems Design

Congestion Control In The Internet Part 2: How it is implemented in TCP. JY Le Boudec 2014

Resource allocation in networks. Resource Allocation in Networks. Resource allocation

Lecture 14: Performance Architecture

Congestion Control In The Internet Part 2: How it is implemented in TCP. JY Le Boudec 2014

What Is Congestion? Effects of Congestion. Interaction of Queues. Chapter 12 Congestion in Data Networks. Effect of Congestion Control

CS321: Computer Networks Congestion Control in TCP

Congestion Control In The Internet Part 2: How it is implemented in TCP. JY Le Boudec 2015

CSCD 433/533 Advanced Networks Spring Lecture 22 Quality of Service

Multicast and Quality of Service. Internet Technologies and Applications

Overview Computer Networking What is QoS? Queuing discipline and scheduling. Traffic Enforcement. Integrated services

H3C S9500 QoS Technology White Paper

Quality of Service in the Internet. QoS Parameters. Keeping the QoS. Leaky Bucket Algorithm

Congestion / Flow Control in TCP

MAHALAKSHMI ENGINEERING COLLEGE TIRUCHIRAPALLI

Network Layer Enhancements

QOS Section 6. Weighted Random Early Detection (WRED)

Module objectives. Integrated services. Support for real-time applications. Real-time flows and the current Internet protocols

Chapter 24 Congestion Control and Quality of Service 24.1

UNIT IV -- TRANSPORT LAYER

Queuing. Congestion Control and Resource Allocation. Resource Allocation Evaluation Criteria. Resource allocation Drop disciplines Queuing disciplines

Communication Networks

Quality of Service II

Topic 4b: QoS Principles. Chapter 9 Multimedia Networking. Computer Networking: A Top Down Approach

Overview. Lecture 22 Queue Management and Quality of Service (QoS) Queuing Disciplines. Typical Internet Queuing. FIFO + Drop tail Problems

Queuing Mechanisms. Overview. Objectives

Quality of Service Monitoring and Delivery Part 01. ICT Technical Update Module

UNIT 2 TRANSPORT LAYER

QUALITY of SERVICE. Introduction

Institute of Computer Technology - Vienna University of Technology. L73 - IP QoS Integrated Services Model. Integrated Services Model

William Stallings Data and Computer Communications. Chapter 10 Packet Switching

Presentation Outline. Evolution of QoS Architectures. Quality of Service Monitoring and Delivery Part 01. ICT Technical Update Module

Congestion Avoidance Overview

Design Intentions. IP QoS IntServ. Agenda. Design Intentions. L73 - IP QoS Integrated Services Model. L73 - IP QoS Integrated Services Model

CS 344/444 Computer Network Fundamentals Final Exam Solutions Spring 2007

Multimedia Networking

Configuring global CAR 73 Overview 73 Configuring aggregate CAR 73 Configuration procedure 73 Configuration example 73

CHAPTER 9: PACKET SWITCHING N/W & CONGESTION CONTROL

Lesson 14: QoS in IP Networks: IntServ and DiffServ

of-service Support on the Internet

Project Computer Networking. Resource Management Approaches. Start EARLY Tomorrow s recitation. Lecture 20 Queue Management and QoS

Lecture 13. Quality of Service II CM0256

WRED Explicit Congestion Notification

Differentiated Services

II. Principles of Computer Communications Network and Transport Layer

Computer Networking Introduction

Congestion Management Overview

Overview. TCP & router queuing Computer Networking. TCP details. Workloads. TCP Performance. TCP Performance. Lecture 10 TCP & Routers

QOS IN PACKET NETWORKS

Common network/protocol functions

Marking Traffic CHAPTER

Lecture 22: Buffering & Scheduling. CSE 123: Computer Networks Alex C. Snoeren

Configuring priority marking 63 Priority marking overview 63 Configuring priority marking 63 Priority marking configuration example 64

Master Course Computer Networks IN2097

Master Course Computer Networks IN2097

Lecture 24: Scheduling and QoS

QoS Technology White Paper

Sharing Bandwidth Fairly During Congestion

QoS for Real Time Applications over Next Generation Data Networks

Modular Quality of Service Overview on Cisco IOS XR Software

Multimedia Applications over Packet Networks

Contents. QoS overview 1

Chapter 6. What happens at the Transport Layer? Services provided Transport protocols UDP TCP Flow control Congestion control

CS 5520/ECE 5590NA: Network Architecture I Spring Lecture 13: UDP and TCP

Transcription:

Introduction to IP QoS Primer to IP Quality of Service Aspects Queuing, Shaping, Classification Agenda IP QoS Introduction Queue Management Congestion Avoidance Traffic Rate Management Classification and Marking IP QoS Primer, v4.3 2 Page 72-1

Why QoS is an Issue for IP Originally, IP was designed for best effort service only simple network (IP), complex end-systems (TCP) no Quality of Service (QoS) Throughput not guaranteed Transmission delay is not bounded great for data but not appropriate for real-time applications Multimedia applications need transmission of voice and video in real-time in a traditional environment (circuit switching) require data flow at a stable rate and constant delay (synchronous behavior) IP QoS Primer, v4.3 3 Why QoS is an Issue for IP Multimedia applications such as video conferencing systems need a lot more bandwidth than applications that were used in the early days of the Internet Traditional Internet applications such as WWW, FTP or TELNET, cannot tolerate packet loss but are less sensitive to variable delays Most real-time applications show just the opposite behavior they can compensate for a reasonable amount of packet loss but are very critical towards high variable delays This means that without any bandwidth control the quality of these real-time streams depends on the bandwidth that is available low or unstable bandwidth causes bad quality in real-time transmissions by leading to dropouts and hangs IP QoS Primer, v4.3 4 Page 72-2

Why QoS is an Issue for IP Until recently the usual approach to satisfy real time constraints was Circuit switching paradigm (e.g. ISDN) reservation of a circuit Connection oriented cell-switching (e.g. ATM) reservation of resources for a virtual circuit to achieve requested QoS In order to make the Internet a real success delay- and bandwidth sensitive traffic should be also delivered over packet-switched, connectionless networks But the Internet is inhomogeneous QoS is given by the weakest link in the chain between sender and receiver IP QoS Primer, v4.3 5 Why QoS is an Issue for IP Today s solution to reduce delay increase service rate (e.g. higher bandwidth) long term process (note: experience shows that short term adaptation by load-dependent dynamic routing does not work well because of oscillation problems) reduce the traffic load for TCP streams e.g. done by slow start and congestion avoidance mechanism (van Jacobson) But over-provisioning the network to achieve enough bandwidth and minimum delay for the worst case traffic scenario cannot be economically justified IP QoS Primer, v4.3 6 Page 72-3

What is QoS? QoS mechanisms manage the available bandwidth according to policies or to grant fairness by distinguishing different traffic classes Goal: Guaranteed lower bounds of quality minimum limits for bandwidth maximum limits for delay QoS does not create bandwidth but manages it so it is used more effectively IP QoS Primer, v4.3 7 QoS Components Signaling Queuing Classification and Marking Integrated Service (RSVP) Differentiated Service (DSCP) Traffic Shaping Congestion Control Admission Control Traffic Policing QoS Policy IP QoS Primer, v4.3 8 Page 72-4

QoS Components Signaling typically used for resource reservation imitated by the end system Queuing applies policy by prioritizing some packets over others done on every intermediate store and forward system (packet switch) and maybe done at the sending end system Classification detection of specific traffic classes or traffic flows done at the network boundary Marking packets belonging to some specific traffic class can be marked (= assigned a label) to request a special service done at the network boundary IP QoS Primer, v4.3 9 QoS Components Traffic shaping smoothens bursty traffic by introducing delay done by the end system or at the network boundary Congestion control reduces packet rate when network congestion occurs Admission control provides QoS features only to dedicated users QoS policy fundamental QoS agreements specifying detail how to handle traffic, traffic classes, signaling, etc. part of a traffic contract Two fundamental IP QoS realization approaches Integrated Service versus Differentiated Services IP QoS Primer, v4.3 10 Page 72-5

ATM QoS Review 1 ATM-DTE QoS Consumer (End System) UNI QoS Provider (Network) VC Setup with QoS Parameters ATM-DCE QoS Routing ATM-DCE ATM-DTE Yes / No Call Admission Control (CAC) QoS signaling ATM-DCE ATM-DTE Traffic Contract (Dynamic On Demand IP QoS Primer, v4.3 11 ATM QoS Review 2 ATM-DTE QoS Consumer (End System) UNI QoS Provider (Network) VC-x with QoS ATM-DCE Marking of Traffic: done by service class (CBR, VBR, ABR, UBR) not part of ATM cells, done implicitly through switching table entries ATM-DTE VC-y with QoS Classifying of Traffic: done by virtual circuit number ATM-DCE ATM-DTE Traffic Shaping Traffic Policing (Usage Parameter Control, UPC): cell discarding, cell marking (CLP), done at ingress switch Traffic Management: queuing per service class, cell discarding based on CLP (Congestion Control), done at core switches IP QoS Primer, v4.3 12 Page 72-6

IP QoS Models Integrated Services Model end-to-end guaranteed QoS for individual flows flow is a stream of packets of the same session connection-oriented approach dynamic QoS mechanism -> requires a signaling protocol RSVP (Resource ReSerVation Protocol, RFC 2205) best suited for private networks Differentiated Service QoS handling according to traffic classes identified by DSCP (Differentiated Services Code Point) based on per hop behavior (PHB) connection-less approach static QoS mechanism -> requires a fixed traffic contract best suited for ISP in order to offer QoS services to customers IP QoS Primer, v4.3 13 IP QoS Scenario: Integrated Services QoS Provider QoS Provider QoS Consumer QoS Consumer Marking of Traffic: done by end system by specifying flows Traffic Shaping: done by end system Signaling: initiated by end system, passed on by routers, done by RSVP Classifying of Traffic: done at every router based on flows Traffic Management: queuing per flow, done by every router Traffic Policing: done at every router Call Admission Control: done at every router IP QoS Primer, v4.3 14 Page 72-7

IP QoS Scenario: Differentiated Services QoS Provider QoS Provider QoS Consumer CE PE PE CE QoS Consumer Traffic Shaping: done by CE router Signaling: not necessary because of static approach Classifying of Traffic: done by PE router based on different parameters (e.g. interface, IP, TCP header) Marking of Traffic: done by PE router by specifying DSCP (service class) Traffic Policing: done at PE router by CAR (Committed Access Rate) Traffic Management: queuing per service class, done by every core router Call Admission Control: done by provider by provisioning network resources for service classes IP QoS Primer, v4.3 15 Final Remark Simplicity let IP succeed over other technologies With the demand for QoS the Internet will lose its simplicity! IP QoS Primer, v4.3 16 Page 72-8

Performance Measure Performance measures used to characterize a connections performance Bandwidth rated throughput capacity of a connection describes the size of the pipe required for the appliaction to communicate over the network Delay serialization delay propagation delay switching / queuing delay Packet Loss packet drops because of congestion corrupted packets because of transmission errors IP QoS Primer, v4.3 17 Agenda IP QoS Introduction Queue Management Congestion Avoidance Traffic Rate Management Classification and Marking IP QoS Primer, v4.3 18 Page 72-9

What's the Purpose of Queuing? To avoid packet loss when temporary traffic bursts occur Queue depth number of packets waiting in the queue small queue depth means low delay! Congestion occurs when the queue overflows subsequent packets are dropped! for the dropped packets the delay increase to infinity! IP QoS Primer, v4.3 19 What is Queue-Management? Queue management means implementing a queuing strategy which packet should be transmitted next if packets are waiting in a queue Several methods were developed FIFO Priority Queuing Class-based or Custom Queuing Fair Queuing (FQ) Weighted Fair Queuing (WFQ) Flow-based Class-based IP QoS Primer, v4.3 20 Page 72-10

FIFO Queuing FIFO queuing is the fastest, simplest, and hence most common solution Only one queue for IP packet switching available Queuing theory shows if traffic increases the delay becomes longer and more variable if load exceeds the service rate of outgoing interface the queue can increase infinitely and hence the router will drop packets caused by lack of buffer memory In case of congestion: No predictable behaviour! usually, complete service degeneration IP QoS Primer, v4.3 21 Principle of FIFO Queuing Input Queue 8 7 6 5 Output Queue 4 3 2 1 IP QoS Primer, v4.3 22 Page 72-11

FIFO Benefits and Drawbacks Benefits + simple and fast + supported on all router platforms Drawbacks - unfair allocation of bandwidth among multiple flows - causes starvation (aggressive flows can monopolize links) - causes jitter (bursts or packet trains temporarily fill the queue) IP QoS Primer, v4.3 23 Priority Queuing High priority packets are placed in the output queue before normal packets Several levels of priority possible prioritising certain protocols and services E.g. IP before SNA, TCP before UDP, Telnet before FTP requires additional (output) queues IP QoS Primer, v4.3 24 Page 72-12

Principle of Priority Queuing Input Queue Low Hi Low Hi Low Low Low Packet Memory Hi Hi Hi Output Queue Hi Hi Hi Hi IP QoS Primer, v4.3 25 Priority Queuing Benefits and Drawbacks Benefits + provides low-delay propagation to high priority packets + supported on most router platforms Drawbacks - all drawbacks of FIFO queuing within a single class - packet identification is a time consuming process - large amounts of high priority traffic may lead to starvation of queues with lower priority Lower priority traffic will be dropped High delay for packets waiting in lower priority queues - manual configuration of classification on every hop IP QoS Primer, v4.3 26 Page 72-13

H H H Institute of Computer Technology - Vienna University of Technology Class-Based Queuing Improvement of priority queuing Packets are sent from several priority queues in a round-robin manner hereby avoiding service starvation of lower priority queues At each turn, depending on the priority of the queue, the router may only send a certain amount of data So, high priority queues are drained much faster than low priority queues But also the traffic with the lowest priority is served periodically IP QoS Primer, v4.3 27 Principle of Class-Based Queuing Input Queue H L M H H H L M Packet Memory L L M H Output Queues High H H H H H H Medium M M M M M M Low L L L L L L IP QoS Primer, v4.3 28 Page 72-14

Class-Based Queuing The router offers a different service quality for each class of traffic hence class-based queuing Time consuming process appropriate on slow links only Class-based queuing (CBQ) is also known as Custom Queuing IP QoS Primer, v4.3 29 Lack of Fairness in CBQ Class-Based Queuing is not fair! CBQ assigns protocols and services to different service classes but ignores session information for example, a misbehaving TCP session could push away other sessions within the same priority level if it produces a huge volume of traffic IP QoS Primer, v4.3 30 Page 72-15

CBQ Benefits and Drawbacks Benefits + guarantees throughput to traffic classes (prevents starvation between traffic classes) + supported on most platforms Drawbacks - all drawbacks of FIFO queuing within a single class - manual configuration of classification on every hop - inaccurate bandwidth allocation - high jitter due to implementation of scheduling IP QoS Primer, v4.3 31 Fair Queuing Traditional datagram switching switch packets independently no memory about the past history Fair queuing introduces state information by separating incoming traffic into well identified flows Packets belonging to the same session build a flow Flow could be recognized by same context e.g. same source and destination IP addresses, same UDP/TCP ports and same TOS / DSCP in IPv4 e.g. same source IP address and same Flow-ID in IPv6 guarantees each flow an equal share of the transmission capacity IP QoS Primer, v4.3 32 Page 72-16

Fair Queuing Theoretical principle determine the number of active flows (conversations) store packets of every conversation in separate queues serve queues round-robin bit-by-bit Time division multiplexing with equal time-slots In praxis packet cannot transmitted one bit at a time but if you know the amount of current conversations you can calculate how many bit/s per conversation should be transmitted on average number of conversations N, Bitrate of link R in 1/seconds time to transmit a bit = N/R IP QoS Primer, v4.3 33 Fair Queuing method if you mark the time of packet arrival (Ta) you can calculate a virtual time Tv Tv = Ta + (packet length in bit) * (N/R) virtual time represents the time when this packet will be completely transmitted using the average rate for that queue hence this time (Tv) can be used for the sending order of the packets queues with longer packets will be served less often than queues with smaller packets the only difference with perfectly fair queuing bit-by-bit the queue that just transmitted a packet is slightly in advance by at most one packet of data IP QoS Primer, v4.3 34 Page 72-17

Weighted Fair Queuing (WFB) Fair queuing gives every flow an equal portion of the link capacity Weighted fair queuing gives certain flows a larger portion of the link capacity certain flows have more weight time division multiplexing with unequal time slots Weighting the traffic can be based on the IP precedence bits in the TOS (Type of Service) field of the IP packet header IP QoS Primer, v4.3 35 Weighted Fair Queuing (WFQ) 2 Types of WFQ Flow-based WFQ active flows with the same IP precedence traffic get the same amount of interface bandwidth active flows with high precedence traffic get a larger amount of interface bandwidth than active flows with lower-precedence traffic Class-based WFQ combination of class-based and WFQ IP QoS Primer, v4.3 36 Page 72-18

WFQ Benefits and Drawbacks Benefits + simple configuration + guarantees throughput to all flows + drops packets of most aggressive flows + supported on most platforms Drawbacks - all drawbacks of FIFO queuing within a single queue - multiple flows can end up in one queue - does not support the configuration of classification - can not provide fixed bandwidth guarantees - performance limitations due to complex classification and scheduling mechanism IP QoS Primer, v4.3 37 Queue Comparison Weighted Fair queuing Priority queuing Custom queuing No queue lists 4 queues 16 queues Low-volume traffic given priority Conversation dispatching Interactive traffic gets priority Works well on speeds Up to 2 Mbps Enabled by default High-priority queue serviced first Packet-by-packet dispatching Critical traffic gets through Designed for Low-bandwidth links Must be configured Round-robin service Threshold dispatching Proportional allocation of bandwidth Designed for Medium speed links Must be configured IP QoS Primer, v4.3 38 Page 72-19

Agenda IP QoS Introduction Queue Management Congestion Avoidance Traffic Rate Management Classification and Marking IP QoS Primer, v4.3 39 TCP s Slow Start and Congestion Avoidance TCP (Transmission Control Protocol) is currently the dominant transport protocol used on the Internet TCP uses Slow Start and Congestion Avoidance in order to find the point of maximal data throughput before congestion occurs, both algorithms have been invented by Van Jacobson mandatory in today s TCP implementations IP QoS Primer, v4.3 40 Page 72-20

Slow Start 3 Sender cwnd=1 1 Data-Segment Receiver Sender 1 Ack Receiver cwnd=2 Sender T 2 Data-Segments Receiver cwnd=2 Sender 2 Acks T Receiver cwnd=4 Sender 4 Data-Segments Receiver cwnd=4 IP QoS Primer, v4.3 41 Congestion Slow start encounters congestion, when TCP segment(s) is (are) dropped by a router Congestion can be detected by the sender through timeouts or duplicate acknowledgements TCP reduces its sending rate with Congestion Avoidance" IP QoS Primer, v4.3 42 Page 72-21

Congestion Avoidance 1 Slow start with congestion avoidance is a sender-imposed flow control Congestion Avoidance requires TCP to maintain a variable called "slow start threshold" (ssthresh) Initially, ssthresh is set to TCPs maximum possible MSS (i.e. 65,535 octets) On detection of congestion, ssthresh is set to half the current window size here, window size means: minimum of advertised window and congestion window (but at least 2 segments) Note: ssthresh marks a safe window size because congestion occurred at a window size of 2 x ssthresh IP QoS Primer, v4.3 43 Congestion Avoidance 2 If the congestion is indicated by a timeout: cwnd is set to 1 -> forcing slow start again a duplicate ack: cwnd is set to ssthresh (= 1/2 current window size) cwnd ssthresh: slow start, doubling cwnd every round-trip time exponential growth of cwnd cwnd > ssthresh: congestion avoidance, cwnd is incremented by MSS MSS / cwnd every time an ack is received linear growth of cwnd IP QoS Primer, v4.3 44 Page 72-22

Slow Start and Congestion Avoidance 20 18 16 14 12 cwnd cwnd=16 High Congestion: Every segment get lost after a certain time Ack missing Low Congestion: only single segment get lost Duplicate Ack cwnd=12 10 8 6 4 Timeout ssthresh = 8 ssthresh = 6 2 round-trip times IP QoS Primer, v4.3 45 Long Term View of TCP Throughput Relative Throughput Rate Duplicate Ack Duplicate Ack Duplicate Ack Duplicate Ack max. achievable throughput ssthresh slow start congestion avoidance congestion avoidance congestion avoidance Time IP QoS Primer, v4.3 46 Page 72-23

Congestion Situations Congestion indicated by duplicate acknowledgements lets TCP oscillate between sstresh and the point of congestion no delays at the point of congestion because of immediate duplicate acks sent by the receiver Congestion indicated by timeout: High delay and slow start necessary! IP QoS Primer, v4.3 47 Congestion with Timeouts Relative Throughput timeout timeout max. achievable throughput congestion avoidance ssthresh slow start slow start Time IP QoS Primer, v4.3 48 Page 72-24

Avoiding Timeouts While duplicate acks only indicate the possibility of congestion, timeouts can be regarded as a clear congestion alert Timeouts let TCP degenerate significantly especially when a lot of TCP streams get synchronized because of a Tail-Drop situation Tail-Drop means that from a certain point on (when the FIFO queue is completely full) all TCP streams will recognize timeouts Remedy: Proactive Queue Management enables routers to detect congestion before queues overflow RED, ECN IP QoS Primer, v4.3 49 Tail-Drop Scenario or Wave effect Queue size 1.Tail-drop causes a large number of TCP sources to change the cwnd size to 1 and enter the slow-start mode at the same time 2.The slow-start operation of a large number of TCP sources is synchronized as all of them enter slow start simultaneously Total queue length slow start slow start Time IP QoS Primer, v4.3 50 Page 72-25

Base Idea for Random Early Detection (RED) Wave Effect causes TCP s throughput oscillation causes inefficient use of network bandwidth What is the problem? routers accept every packet until the moment of congestion then data is lost and timeouts occur error rate before congestion: 0% error rate after congestion: 100% Why not exploit the signaling effect of duplicate acknowledgments to reduce the TCP load before timeouts occur? IP QoS Primer, v4.3 51 Random Early Detection (RED) A router anticipates congestion by observing its queue depth If the queue depth exceeds a certain threshold, the router discards randomly chosen packets This causes the TCP receiver(s) to issue duplicate acks to their TCP sender(s) So the TCP sender(s) will immediately reduce their sending window IP QoS Primer, v4.3 52 Page 72-26

Random Early Detection (RED) The trick is to increase the probability of packet drop after exceeding the threshold So theoretically, congestion will not occur anymore by dropping almost every packet at the end Note: Without RED every single TCP connection experiences the wave effect all waves get synchronized because the network alternates between congestion and non-congestion states RED scrambles these waves providing a higher average TCP throughput IP QoS Primer, v4.3 53 Wave Effect and RED data rate Traditional Congestion average rate drop probability time max queue depth data rate average rate RED drop probability higher average throughput time threshold queue depth max IP QoS Primer, v4.3 54 Page 72-27

RED Packet Drop Probability When the average queue depth is above the minimum threshold, RED starts dropping packets The packet drop rate increases linearly as the average queue size increases, until the average queue size reaches the maximum threshold When the average queue size is above the maximum threshold, all packets are dropped Packet drop probability Mark probability denominator = 1 1 0 Min. threshold Max. threshold Average queue size IP QoS Primer, v4.3 55 WRED (Weighted Random Early Detection) WRED allows selective RED parameters based on IP precedence WRED drops more aggressively for lowprecedence-level packets and less aggressively for high-precedence-level packets IP QoS Primer, v4.3 56 Page 72-28

Flow WRED ( I ) Adaptive TCP flows respond to a congestion signal and reduce their load Non-adaptive UDP flows do not respond to congestion signals and don't slow down So non-adaptive flows(udp) can send packets which higher rate than adaptive flows (TCP) at time of congestion Greedy, non-adaptive flows (UDP) tend to use a higher queue resource than the adaptive flows (TCP) IP QoS Primer, v4.3 57 Flow WRED ( II ) To provide fairness, WRED classifies all arriving packets into the queue based on their flow and precedence WRED used state information to determine the resources for each flow Flows which taking more than their fair share would be penalized IP QoS Primer, v4.3 58 Page 72-29

The Limits of Interpreting Symptoms Only Slow start and congestion avoidance try to maximize the traffic throughput without inclusion of network information host-based congestion control original IP idea: "Keep the network simple!" slow start and congestion avoidance suspects congestion only by observing symptoms of the network Further improvements require an active inclusion of the intermediate network Led to the introduction of an Explicit Congestion Notification, which requires the help from routers that are expecting congestion IP QoS Primer, v4.3 59 Explicit Congestion Notification (ECN) During TCP connection establishment, the ECN capability is negotiated ECN utilizes bit 6 and 7 of the IPv4 TOS field ECT (Explicit Congestion Notification Transport System) CE (Congestion Experienced) additionally ECN requires the two TCP options "ECN-Echo" and "Congestion Window Reduced" (CWR) Then the sender sets the ECT bit in the IP header of all datagram it sends When routers experience congestion they may mark the IP header of such packets with an explicit CE bit flag IP QoS Primer, v4.3 60 Page 72-30

Explicit Congestion Notification (ECN) The receiver detects the CE flag and sets the TCP ECN-Echo flag in its acknowledgement segment If the sender receives this acknowledgement segment with the ECN-echo flag set, the sender reduces its congestion window (-> congestion avoidance) the sender sets the TCP CWR flag in its next segment in order to notify the receiver that the sender has reacted upon the congestion Main advantage: the sender does not have to wait for three duplicate acks to detect the congestion IP QoS Primer, v4.3 61 Explicit Congestion Notification (ECN) 1 1) sets ECT flag in all IP headers 2) Congested router marks outgoing packets with the CE bit 3) IP Packets with CE bit set Sender Receiver 4) Acknowledgements with TCP ECN- Echo flag IP QoS Primer, v4.3 62 Page 72-31

Explicit Congestion Notification (ECN) 2 5) recognizes that Congested router the sender marks outgoing packets has reduced cwnd sets CWR flag in with the CE bit all TCP headers 6) Sender Receiver 7) IP QoS Primer, v4.3 63 Explicit Congestion Notification (ECN) 3 8) recognizes that non congested router router is not congested anymore sets CWR flag in all TCP headers 9) 10) Sender Receiver 12) sees no ECN-echo anymore 11) IP QoS Primer, v4.3 64 Page 72-32

Agenda IP QoS Introduction Queue Management Congestion Avoidance Traffic Rate Management Classification and Marking IP QoS Primer, v4.3 65 Traffic Rate Management To offer QoS in a network, traffic entering the service provider network needs to be policed on the network boundary routers to make sure the traffic rate stays within the service limit CAR (Committed Access Rate) To ensure that traffic conforms to a traffic contract the customer needs traffic shaping TS (Traffic Shaping) Both use the token bucket scheme to report whether a packet is compliant or noncompliant with the rate parameters configured for it Token bucket is simply a measuring tool IP QoS Primer, v4.3 66 Page 72-33

Traffic Policing versus Traffic Shaping Policing Function (CAR) Sends conforming traffic up to the line rate and allows bursts When tokens are exhausted, it can drop packets Shaping Function (TS) Smoothes traffics and send it out at a constant rate When token exhausted, it buffers packets and sends them out later, when tokens are available Works for both input and output traffic When a packet drop ->TCP lowering its window size Implemented for output traffic only TCP can detect and adapt its retransmission timer accordingly. It is more TCP-friendly IP QoS Primer, v4.3 67 Bucket Models Two traffic shaping models are common: Leaky Bucket Token Bucket IP QoS Primer, v4.3 68 Page 72-34

Leaky Bucket Realized as a finite FIFO queue when queue is full, successive packets are discarded Every clock-tick, a fixed number of octets is put onto the network e.g. one packet with 65536 octets or two packets with 32768 octets etc. of course, a 35000 and a 45000 octet packet cannot be send at once IP QoS Primer, v4.3 69 Leaky Bucket Shapes bursty traffic into steady traffic only easy to implement; only bucket depth and leak-rate as parameters Cannot fully utilize the network since it prevents bursts even if there are enough network resources Originated in the ATM world to control the cell rate IP QoS Primer, v4.3 70 Page 72-35

Leaky Bucket Principle Every clock-tick the leaky bucket tries to put a fixed number of octets onto the network IP QoS Primer, v4.3 71 Drawbacks of Constant Rate When large bursts arrive, it would be better to increase the leaky bucket output rate how long does this work before congestion occurs? has the network enough resources at the moment? Solution: Token Bucket IP QoS Primer, v4.3 72 Page 72-36

Token Bucket Token bucket does not receive traffic but tokens Tokens are produced at a constant rate by a token generator Token bucket is control mechanism for a FIFO queue if token bucket is full then all following tokens are dropped IP QoS Primer, v4.3 73 Token Bucket Each token represents a certain amount of octets The FIFO queue may send this amount of octets by consuming one token The FIFO queue may send even more at a time, as long there are tokens in the bucket = Controlled bursts! IP QoS Primer, v4.3 74 Page 72-37

Token Bucket Principle Token Generator T T FIFO Queue T T T T T T Token T T Token Bucket Token controlled burst IP QoS Primer, v4.3 75 Agenda IP QoS Introduction Queue Management Congestion Avoidance Traffic Rate Management Classification and Marking IP QoS Primer, v4.3 76 Page 72-38

Packet Classifier Packet classification means identification Packets can be identified by parameter: source IP-address, destination IP-address, IP-protocol field, source and destination ports flow concept by IP-Precedence or DSCP-field (Differentiated Service Code Point) class concept by flow-id and source IP address (IPv6) IP QoS Primer, v4.3 77 Packet Marking A marker function is used to color the classified traffic by setting either the IP-precedence or the DSCP field done at the network boundary class concept Within the network core a per-hop behavior (PHB) to the packets can be applied based on either the IP-precedence or the DSCP field marked in the packet header IP QoS Primer, v4.3 78 Page 72-39

QoS-Group Internal Marker Is used to mark packets matching certain user-specified classification criteria Is an internal label to the router and is not part of the IP packet header Attributes IP Precedence DSCP QoS Groups Scope of the classification Entire network Entire network Internal to the router only Number of Classes 8 classes (0-7) 64 classes (0-63) 100 classes (0-99) IP QoS Primer, v4.3 79 Page 72-40