© 2001, Cisco Systems, Inc. Queuing Mechanisms. © 2001, Cisco Systems, Inc. QOS v1.0—3-2 Objectives Upon completing this module, you will be able to:

Slides:



Advertisements
Similar presentations
© 2006 Cisco Systems, Inc. All rights reserved.QoS v2.2—5-1 Congestion Management Configuring LAN Congestion Management.
Advertisements

Chapter 9: Access Control Lists
Configuring Transparent Bridging and Integrated Routing and Bridging
1 CNPA B Nasser S. Abouzakhar Queuing Disciplines Week 8 – Lecture 2 16 th November, 2009.
Top-Down Network Design Chapter Thirteen Optimizing Your Network Design Copyright 2010 Cisco Press & Priscilla Oppenheimer.
Basic IP Traffic Management with Access Lists
Leon-Garcia & Widjaja: Communication Networks Copyright ©2000 The McGraw Hill Companies A Little More on Chapter 7 And Start Chapter 8 TCP/IP.
© 2006 Cisco Systems, Inc. All rights reserved.QoS v2.2—5-1 Congestion Management Configuring FIFO and WFQ.
Managing Network Performance Queuing & Compression.
© 2006 Cisco Systems, Inc. All rights reserved. Module 4: Implement the DiffServ QoS Model Lesson 4.10: Deploying End-to-End QoS.
© 2006 Cisco Systems, Inc. All rights reserved. Optimizing Converged Cisco Networks (ONT) Module 4: Implement the DiffServ QoS Model.
Differentiated Services. Service Differentiation in the Internet Different applications have varying bandwidth, delay, and reliability requirements How.
Networking Issues in LAN Telephony Brian Yang
School of Information Technologies IP Quality of Service NETS3303/3603 Weeks
Advance Configuration IOS Commands. Overview of Router Modes Router(config)# Router>enable Router#config term Exit Ctrl-Z (end) User EXEC Mode Privileged.
TDRE Filtering and QoS TDRE Version The first choice for the mile p.2 IP filtering >With extended access lists >define in router/trafficPolicy.
© 2006 Cisco Systems, Inc. All rights reserved. Module 4: Implement the DiffServ QoS Model Lesson 4.5: Configuring CBWFQ and LLQ.
© 2001, Cisco Systems, Inc. Traffic Shaping and Policing.
© 2006 Cisco Systems, Inc. All rights reserved. Optimizing Converged Cisco Networks (ONT) Module 4: Implement the DiffServ QoS Model.
© Janice Regan, CMPT 128, CMPT 371 Data Communications and Networking Network Layer ICMP and fragmentation.
© 2006 Cisco Systems, Inc. All rights reserved. QOS Lecture 4 - Introducing QOS.
© 2006 Cisco Systems, Inc. All rights reserved. Optimizing Converged Cisco Networks (ONT) Module 4: Implement the DiffServ QoS Model.
3.4: Using MQC for Implementing QoS
© 2006 Cisco Systems, Inc. All rights reserved. Optimizing Converged Cisco Networks (ONT) Module 4: Implement the DiffServ QoS Model.
© 2001, Cisco Systems, Inc. Classification and Marking.
CHAPTER 8 Quality of Service. Integrated services (IntServ) Ensure that a specific flow of traffic is going to receive the appropriate level of bandwidth.
CSE QoS in IP. CSE Improving QOS in IP Networks Thus far: “making the best of best effort”
Quality of Service (QoS)
Top-Down Network Design Chapter Thirteen Optimizing Your Network Design Oppenheimer.
© 2001, Cisco Systems, Inc. Signaling Mechanism. © 2001, Cisco Systems, Inc. QOS v1.0—7-2 Objectives Upon completing this module, you will be able to:
Congestion Avoidance. Inner Mongolia University Objectives  Upon completing this module, you will be able to:  Describe random early detection (RED)
© 2002, Cisco Systems, Inc. All rights reserved..
© 2006 Cisco Systems, Inc. All rights reserved. Module 4: Implement the DiffServ QoS Model Lesson 4.2: Using NBAR for Classification.
© 2001, Cisco Systems, Inc. IP over MPLS. © 2001, Cisco Systems, Inc. QOS v1.0—11-2 Objectives Upon completing this module, you will be able to: Describe.
© 2001, Cisco Systems, Inc. Modular QoS CLI Classification.
ACL & QoS.
S6C10 - Queuing Which Packet Gets Processed First.
© 2006 Cisco Systems, Inc. All rights reserved. Optimizing Converged Cisco Networks (ONT) Module 3: Introduction to IP QoS.
Page 1 Chapter 11 CCNA2 Chapter 11 Access Control Lists : Creating ACLs, using Wildcard Mask Bits, Standard and Extended ACLs.
© 2006 Cisco Systems, Inc. All rights reserved. Optimizing Converged Cisco Networks (ONT) Module 3: Introduction to IP QoS.
© 2007 Cisco Systems, Inc. All rights reserved.ICND1 v1.0—4-1 LAN Connections Configuring a Cisco Router.
Queuing Mechanisms.
1 © 2003, Cisco Systems, Inc. All rights reserved. CCNP 1 v3.0 Module 1 Overview of Scalable Internetworks.
Efficient Cache Structures of IP Routers to Provide Policy-Based Services Graduate School of Engineering Osaka City University
© 2006 Cisco Systems, Inc. All rights reserved. Optimizing Converged Cisco Networks (ONT) Module 3: Introduction to IP QoS.
Mr. Mark Welton.  Quality of Service is deployed to prevent data from saturating a link to the point that other data cannot gain access to it  QoS allows.
NetPro-ITI Ethernet LANs. Microsegmentation Microsegmentation of the Network.
© 2006 Cisco Systems, Inc. All rights reserved. Optimizing Converged Cisco Networks (ONT) Module 4: Implement the DiffServ QoS Model.
© 2006 Cisco Systems, Inc. All rights reserved. QOS Lecture 7 - Queuing Implementations.
1 Fair Queuing Hamed Khanmirza Principles of Network University of Tehran.
© 2006 Cisco Systems, Inc. All rights reserved. Module 4: Implement the DiffServ QoS Model Lesson 4.3: Introducing Queuing Implementations.
Queue Scheduling Disciplines
© 2005 Cisco Systems, Inc. All rights reserved. BGP v3.2—7-1 Optimizing BGP Scalability Improving BGP Convergence.
Chapter 6. Configuring Queuing to Manage Traffic.
© 2001, Cisco Systems, Inc. Modular QoS CLI Service Policy.
© 2006 Cisco Systems, Inc. All rights reserved. Module 4: Implement the DiffServ QoS Model Lesson 4.6: Congestion Avoidance.
© 2006 Cisco Systems, Inc. All rights reserved. 3.2: Implementing QoS.
Lecture 8 -Traffic Management
An End-to-End Service Architecture r Provide assured service, premium service, and best effort service (RFC 2638) Assured service: provide reliable service.
Providing QoS in IP Networks
Scheduling for QoS Management. Engineering Internet QoS2 Outline  What is Queue Management and Scheduling?  Goals of scheduling  Fairness (Conservation.
1 Lecture 15 Internet resource allocation and QoS Resource Reservation Protocol Integrated Services Differentiated Services.
Instructor Materials Chapter 6: Quality of Service
QoS & Queuing Theory CS352.
Topics discussed in this section:
Top-Down Network Design Chapter Thirteen Optimizing Your Network Design Copyright 2010 Cisco Press & Priscilla Oppenheimer.
Maximizing the Benefits of Switching
© 2008 Cisco Systems, Inc. All rights reserved.Cisco ConfidentialPresentation_ID 1 Chapter 6: Quality of Service Connecting Networks.
Configuring a Cisco Router
Module 4: Implement the DiffServ QoS Model
Presentation transcript:

© 2001, Cisco Systems, Inc. Queuing Mechanisms

© 2001, Cisco Systems, Inc. QOS v1.0—3-2 Objectives Upon completing this module, you will be able to: Describe and configure FIFO queuing Describe and configure priority queuing (PQ) Describe and configure custom queuing (CQ) Describe and configure basic weighted fair queuing (WFQ), distributed WFQ, ToS-based distributed WFQ, and QoS-group-based distributed WFQ Describe and configure modified deficit round robin (MDRR) queuing Describe and configure IP RTP Prioritization

Queuing Overview © 2001, Cisco Systems, Inc. QOS v1.0—3-3

© 2001, Cisco Systems, Inc. QOS v1.0—3-4 Objectives Upon completing this lesson, you will be able to: Understand how queuing works on Cisco routers List the most used queuing mechanisms

© 2001, Cisco Systems, Inc. QOS v1.0—3-5 Queuing in Cisco IOS Cisco routers running Cisco IOS have a number of different queuing mechanisms This module focuses on the following: –First In First Out (FIFO) –Priority Queuing (PQ) –Custom Queuing (CQ) –Weighted Fair Queuing (WFQ) with the different distributed versions –Modified Deficit Round Robin (MDRR) –IP RTP Prioritization These mechnisms are implemented as software queues

© 2001, Cisco Systems, Inc. QOS v1.0—3-6 Output Interface Queue Structure Each interface has its hardware and software queuing system. The hardware queuing system (transmit queue, or TxQ) always uses FIFO queuing. The software queuing system can be selected and configured depending on the platform and Cisco IOS version. Hardware Queue (TxQ) Hardware Queue (TxQ) Software Queuing System Software Queuing System Output Interface Forwarder Any supported queuing mechanism Always FIFO

© 2001, Cisco Systems, Inc. QOS v1.0—3-7 Bypassing the Software Queue When a packet is being forwarded, the router will bypass the software queue if: –The software queue is empty, and –The hardware queue is not full Software Queue Empty? Software Queue Empty? Hardware Queue Full? Hardware Queue Full? Hardware Queue (TxQ) Hardware Queue (TxQ) YesNo Software Queuing System Software Queuing System YesNo

© 2001, Cisco Systems, Inc. QOS v1.0—3-8 Hardware Queue (TxQ) Size Routers determine the length of the hardware queue based on the configured bandwidth of the interface. Long TxQ may result in poor performance of the software queue. Short TxQ may result in a large number of interrupts which causes high CPU use and low link use.

© 2001, Cisco Systems, Inc. QOS v1.0—3-9 Software Queuing System Hardware Queuing System Hardware Queuing System Queuing Components Each queuing mechanism has three main components that define it: –Classification (selecting the class) –Insertion policy (determining whether a packet can be enqueued) –Service policy (scheduling packets to be put into the hardware queue) Class 1? Class 2? Class n? Queue 1 Queue 2 Queue n Scheduler Interface Forwarded Packets Hardware Q Add/Drop

© 2001, Cisco Systems, Inc. QOS v1.0—3-10 Summary Upon completing this lesson, you should be able to: Understand how queuing works on Cisco routers List the most used queuing mechanisms

© 2001, Cisco Systems, Inc. QOS v1.0—3-11 Lesson Review 1.Which queuing mechanisms do Cisco routers support? 2.When are software queuing mechanisms not used? 3.How does TxQ length affect the software queuing system?

FIFO Queuing © 2001, Cisco Systems, Inc. QOS v1.0—3-12

© 2001, Cisco Systems, Inc. QOS v1.0—3-13 Objectives Upon completing this lesson, you will be able to: Describe FIFO queuing Describe the drawbacks of FIFO queuing Configure FIFO queuing on Cisco routers Monitor and troubleshoot FIFO queuing

© 2001, Cisco Systems, Inc. QOS v1.0—3-14 FIFO Queuing The software FIFO queue is basically an extension of the hardware FIFO queue. FIFO Queuing System Hardware Queuing System Hardware Queuing System All in one queue All in one queue Queue 1 FIFO Scheduler FIFO Scheduler Interface Forwarded Packets Hardware Q Tail-drop All packets are classified into one class. Newly arriving packets are dropped if the queue is full. FIFO uses one single queue. Routers serve packets in the first-come, first-serve fashion.

© 2001, Cisco Systems, Inc. QOS v1.0—3-15 Benefits and Drawbacks of FIFO Queuing  Benefits Simple and fast (one single queue with a simple scheduling mechanism) Supported on all platforms Supported in all switching paths Supported in all IOS versions – 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)

© 2001, Cisco Systems, Inc. QOS v1.0—3-16 Configuring FIFO Queuing Router(config-if)# FIFO queuing is enabled by default on all interfaces. that have a default bandwidth of more than 2 Mbps Weighted fair queuing is enabled if the bandwidth is less than 2 Mbps. Disable WFQ to enable FIFO on interfaces that have less than 2 Mbps of bandwidth. no fair-queue

© 2001, Cisco Systems, Inc. QOS v1.0—3-17 Configuring FIFO Queuing (cont.) Router(config-if)# FIFO queuing allows a maximum of 40 packets to be stored in the output queue. This command can be used to increase or decrease the maximum number of buffered packets. A large value can be set to support longer bursts (fewer drops, more buffer usage). A small value can be set to prevent bursts (more drops). hold-queue out

© 2001, Cisco Systems, Inc. QOS v1.0—3-18 FIFO Example interface Ethernet0/0 ip address ! interface Serial0/0 ip address no fair-queue hold-queue 50 out ! interface Ethernet0/0 ip address ! interface Serial0/0 ip address no fair-queue hold-queue 50 out ! The serial interface (A/S) has a default bandwidth of 128 kbps. WFQ is the default queuing mechanism, and it has to be disabled to enable FIFO queuing. The serial interface (A/S) has a default bandwidth of 128 kbps. WFQ is the default queuing mechanism, and it has to be disabled to enable FIFO queuing. The Ethernet interface has a default bandwidth of 10Mbps. FIFO is the default queuing mechanism, and it does not need to be configured. The Ethernet interface has a default bandwidth of 10Mbps. FIFO is the default queuing mechanism, and it does not need to be configured. Up to 50 frames are allowed to be enqueued before the router will start tail-dropping newly arriving packets.

© 2001, Cisco Systems, Inc. QOS v1.0—3-19 Monitoring and Troubleshooting FIFO Router# The command displays information about the selected interface(s). Router#show interface Serial0/0 Serial0/0 is up, line protocol is up Hardware is PowerQUICC Serial Internet address is /8 MTU 1500 bytes, BW 128 Kbit, DLY usec, reliability 255/255, txload 1/255, rxload 1/255 Encapsulation HDLC, loopback not set Keepalive set (10 sec) Last input 00:00:02, output 00:00:04, output hang never Last clearing of "show interface" counters never Queueing strategy: fifo Output queue 0/50, 0 drops; input queue 0/75, 0 drops 5 minute input rate 0 bits/sec, 0 packets/sec 5 minute output rate 0 bits/sec, 0 packets/sec … Router#show interface Serial0/0 Serial0/0 is up, line protocol is up Hardware is PowerQUICC Serial Internet address is /8 MTU 1500 bytes, BW 128 Kbit, DLY usec, reliability 255/255, txload 1/255, rxload 1/255 Encapsulation HDLC, loopback not set Keepalive set (10 sec) Last input 00:00:02, output 00:00:04, output hang never Last clearing of "show interface" counters never Queueing strategy: fifo Output queue 0/50, 0 drops; input queue 0/75, 0 drops 5 minute input rate 0 bits/sec, 0 packets/sec 5 minute output rate 0 bits/sec, 0 packets/sec … The queue is currently empty (0/50). There can be a maximum of 50 frames in the queue (0/50). FIFO queuing is enabled on an interface with a default bandwidth of 128kbps. show interface [ ]

© 2001, Cisco Systems, Inc. QOS v1.0—3-20 Summary Upon completing this lesson, you should be able to: Describe FIFO queuing Describe the drawbacks of FIFO queuing Configure FIFO queuing on Cisco routers Monitor and troubleshoot FIFO queuing

© 2001, Cisco Systems, Inc. QOS v1.0—3-21 Lesson Review 1.Why is FIFO the fastest queuing mechanism? 2.Describe the classification and scheduling of FIFO queuing. 3.List the drawbacks of FIFO queuing.

© 2001, Cisco Systems, Inc. Priority Queuing QOS v1.0—3-22

© 2001, Cisco Systems, Inc. QOS v1.0—3-23 Objectives Upon completing this lesson, you will be able to: Describe priority queuing Describe the benefits and drawbacks of priority queuing Configure priority queuing on Cisco routers Monitor and troubleshoot priority queuing

© 2001, Cisco Systems, Inc. QOS v1.0—3-24 Priority Queuing Priority queuing (PQ) uses four FIFO queues. Priority Queuing System Hardware Queuing System Hardware Queuing System High? Queue 1 Pre-emptive Scheduler Pre-emptive Scheduler Interface Forwarded Packets Hardware Q Tail-drop Medium? Queue 2 Tail-drop Normal? Queue 3 Tail-drop Low? Queue 4 Tail-drop

© 2001, Cisco Systems, Inc. QOS v1.0—3-25 Priority Queuing Classification Priority queuing classification for IP supports these options: –Source interface –IP access list (standard and extended) –Packet size (greater or smaller than specified) –Fragments –TCP source or destination port numbers –UDP source or destination port numbers

© 2001, Cisco Systems, Inc. QOS v1.0—3-26 Priority Queuing Classification (cont.) Priority queuing also supports classification of other protocols with these options: –Protocol-specific access list (if available for the specified protocol) –Packet size (greater or smaller than specified) Some of the supported protocols are: –IPX –CLNS –DECnet –AppleTalk –VINES –DLSw

© 2001, Cisco Systems, Inc. QOS v1.0—3-27 Priority Queuing Insertion Policy Each queue has a maximum number of packets that it can hold (queue size). After a packet is classified to one of the following queues, the router will enqueue the packet if the queue limit has not been reached (tail-drop within each class).

© 2001, Cisco Systems, Inc. QOS v1.0—3-28 Scheduling Priority Queuing Packet in HIGH queue? Packet in HIGH queue? Packet in MEDIUM queue? Packet in MEDIUM queue? Packet in NORMAL queue? Packet in NORMAL queue? Packet in LOW queue? Packet in LOW queue? Hardware Q Yes No Dispatch packet and start checking the HIGH queue again Dispatch packet and start checking the HIGH queue again

© 2001, Cisco Systems, Inc. QOS v1.0—3-29 Benefits and Drawbacks of Priority Queuing  Benefits Provides low-delay propagation to high-priority packets Supported on most platforms Supported in all IOS versions (above 10.0) – Drawbacks All drawbacks of FIFO queuing within a single class Starvation of lower-priority classes when higher- priority classes are congested Manual configuration of classification on every hop

© 2001, Cisco Systems, Inc. QOS v1.0—3-30 Configuring Priority Queuing Configure priority lists –Configure classification –Select a queue –Set maximum queue size Apply the priority list to outbound traffic on an interface

© 2001, Cisco Systems, Inc. QOS v1.0—3-31 Priority Queuing Classification Selects the queue based on Layer-3 protocol Additional classification (queue-keyword): –fragment (IP packets with non-zero fragment offset) –gt/lt : based on packet size (including L2 frame) –list : ACL classification –tcp/udp : TCP or UDP port number System and link-level messages are classified in queue high by default Router(config)# priority-list list-number protocol protocol-name {high|medium|normal|low} queue-keyword keyword-value

© 2001, Cisco Systems, Inc. QOS v1.0—3-32 Priority Queuing Classification (cont.) Router(config)# Classifies all unclassified packets in a default queue Classifies the packet based on incoming interface priority-list list-number interface intf {high|medium|normal|low} priority-list list-number default {high|medium|normal|low}

© 2001, Cisco Systems, Inc. QOS v1.0—3-33 Priority Queuing Scheduling and Dropping Parameters Router(config)# priority-list list-number queue-limit high medium normal low Specifies the maximum queue size of individual priority queues Assigns priority queuing definition to an interface Router(config-if)# priority-group list

© 2001, Cisco Systems, Inc. QOS v1.0—3-34 Core WAN Core Branch Office E0 E1 Sample PQ Configuration interface serial0 priority-group 1 priority-list 1 protocol ip high list 101 priority-list 1 interface ethernet 0 medium priority-list 1 default normal priority-list 1 queue-limit access-list 101 permit tcp any any eq 23 interface serial0 priority-group 1 priority-list 1 protocol ip high list 101 priority-list 1 interface ethernet 0 medium priority-list 1 default normal priority-list 1 queue-limit access-list 101 permit tcp any any eq 23

© 2001, Cisco Systems, Inc. QOS v1.0—3-35 show interface interface Router# Displays information and statistics about queuing on interface Monitoring Priority Queuing show queueing [priority|custom|fair|random-detect] interface Router# Displays queuing parameters on interface show queue interface Router# Displays queue contents

© 2001, Cisco Systems, Inc. QOS v1.0—3-36 show interface Router#show interface serial 1/0 Serial1/0 is up, line protocol is up Hardware is M4T Internet address is /8 MTU 1500 bytes, BW 19 Kbit, DLY usec, rely 255/255, load 93/255 Encapsulation HDLC, crc 16, loopback not set Keepalive set (10 sec) Last input 00:00:00, output 00:00:00, output hang never Last clearing of "show interface" counters never Input queue: 0/75/0 (size/max/drops); Total output drops: 0 Queueing strategy: priority-list 1 Output queue (queue priority: size/max/drops): high: 0/20/0, medium: 0/40/0, normal: 0/60/0, low: 0/80/0 5 minute input rate bits/sec, 8 packets/sec 5 minute output rate 7000 bits/sec, 8 packets/sec … rest ignored... Router#show interface serial 1/0 Serial1/0 is up, line protocol is up Hardware is M4T Internet address is /8 MTU 1500 bytes, BW 19 Kbit, DLY usec, rely 255/255, load 93/255 Encapsulation HDLC, crc 16, loopback not set Keepalive set (10 sec) Last input 00:00:00, output 00:00:00, output hang never Last clearing of "show interface" counters never Input queue: 0/75/0 (size/max/drops); Total output drops: 0 Queueing strategy: priority-list 1 Output queue (queue priority: size/max/drops): high: 0/20/0, medium: 0/40/0, normal: 0/60/0, low: 0/80/0 5 minute input rate bits/sec, 8 packets/sec 5 minute output rate 7000 bits/sec, 8 packets/sec … rest ignored...

© 2001, Cisco Systems, Inc. QOS v1.0—3-37 show queueing priority The show queueing priority command displays only the nondefault parameters. Router#show queueing priority Current priority queue configuration: List Queue Args 1 high protocol ip list medium interface Ethernet6/0 Router#show queueing priority Current priority queue configuration: List Queue Args 1 high protocol ip list medium interface Ethernet6/0

© 2001, Cisco Systems, Inc. QOS v1.0—3-38 Summary Upon completing this lesson, you should be able to: Describe priority queuing Describe the benefits and drawbacks of priority queuing Configure priority queuing on Cisco routers Monitor and troubleshoot priority queuing

© 2001, Cisco Systems, Inc. QOS v1.0—3-39 Lesson Review 1.When would you use priority queuing? 2.What are the benefits and drawbacks of priority queuing? 3.How many classes does priority queuing support? 4.How does priority queuing schedule packets?

© 2001, Cisco Systems, Inc. Custom Queuing QOS v1.0—3-40

© 2001, Cisco Systems, Inc. QOS v1.0—3-41 Objectives Upon completing this lesson, you will be able to: Describe custom queuing Describe the benefits and drawbacks of custom queuing Configure custom queuing on Cisco routers Monitor and troubleshoot Custom Queuing

© 2001, Cisco Systems, Inc. QOS v1.0—3-42 Custom Queuing Custom queuing (CQ) uses 16 FIFO queues for user-defined traffic classes. Custom Queuing System Hardware Queuing System Hardware Queuing System Class 1? Queue 1 Round - Robin Scheduler Round - Robin Scheduler Interface Forwarded Packets Hardware Q Tail Drop Class 2? Queue 2 Tail Drop Class 16? Queue 16 Tail Drop

© 2001, Cisco Systems, Inc. QOS v1.0—3-43 Custom Queuing Classification Custom queuing classification for IP includes these options: –Source interface –IP access list (standard and extended) –Packet size (greater or smaller than specified) –Fragments –TCP source or destination port numbers –UDP source or destination port numbers Custom queuing classification is identical to that of Priority queuing.

© 2001, Cisco Systems, Inc. QOS v1.0—3-44 Custom Queuing Insertion Policy Each queue has a maximum number of packets that it can hold (queue size). After a packet is classified to one of the following queues, the router will enqueue the packet if the queue limit has not been reached (tail-drop within each class).

© 2001, Cisco Systems, Inc. QOS v1.0—3-45 Custom Queuing Scheduling Custom queuing uses a round-robin service policy. Each queue is allowed to forward a configurable amount of bytes (threshold) in one round. Packet in Queue N? Packet in Queue N? Hardware Q Yes No Dispatch Packet Dispatch Packet Is Queue N over the threshold? Is Queue N over the threshold? No Next Queue (increase N) Next Queue (increase N) Yes

© 2001, Cisco Systems, Inc. QOS v1.0—3-46 Custom Queuing Scheduling Parameters The threshold (byte-count) parameter specifies the lower boundary on how many bytes the system allows to be delivered from a given queue during a particular cycle. The router is allowed to send the entire packet even if the sum of all bytes is more than the threshold Threshold (byte-count) = 3000 Up to 4499 bytes can be forwarded in one round in the worst case.

© 2001, Cisco Systems, Inc. QOS v1.0—3-47 CQ Design Guideline Configure the amount to remove from a queue in each round to configure the proportional “weight” of the queue. The amounts to remove should approximate a small multiple of the interface’s MTU. The ratio between largest and smallest queue should be a small positive integer, not more than 10:1.

© 2001, Cisco Systems, Inc. QOS v1.0—3-48 BW (Queue 1) = bc1/(bc1+bc2+bc3) = 4500/9000 = 50% Delay (Queue 1) = (bc2+bc3)/Bandwidth = 562ms BW (Queue 1) = bc1/(bc1+bc2+bc3) = 4500/9000 = 50% Delay (Queue 1) = (bc2+bc3)/Bandwidth = 562ms Delay vs. Bandwidth Allocation Worst-case Delay (Queue 1) = [(bc2+1499) +(bc3+1499)]/Bandwidth = 937ms Round - Robin Scheduler Round - Robin Scheduler 64 kbps Queue 1 Queue 2 Queue 3 MTU=1500

© 2001, Cisco Systems, Inc. QOS v1.0—3-49 Worst-Case Delay MTU=1500, byte count (4500, 3000, 1500) Max(delay)=( )*8/64000=1312 ms MTU=1000, byte count (4500, 3000, 1500) Max(delay)=( )*8/64000=1187 ms MTU=250, byte count (450, 300, 150) Max(delay)=( )*8/64000=156 ms Expected delay=( )*8/64000=125 ms Custom queuing is not appropriate for a low- delay environment. Changing the MTU and byte counts might be a workaround.

© 2001, Cisco Systems, Inc. QOS v1.0—3-50 Benefits and Drawbacks of Custom Queuing  Benefits Guarantees throughput to traffic classes (prevents starvation between traffic classes) Supported on most platforms Supported in all IOS versions (above 10.0) – 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

© 2001, Cisco Systems, Inc. QOS v1.0—3-51 Custom Queuing Classification queue-list list-number protocol protocol-name queue-number queue-keyword keyword-value Router(config)# Classifies the packet into a custom queue based on protocol and other protocol-specific criteria Selection criteria identical to priority queuing queue-list list-number interface incoming-intf queue-number Router(config)# Classifies the packet into a custom queue based on incoming interface

© 2001, Cisco Systems, Inc. QOS v1.0—3-52 Custom Queuing Classification (cont.) queue-list list-number default queue-number Router(config)# Classifies all unclassified packets into a default queue custom-queue list-number Router(config-if)# Starts custom queuing on an interface and assigns a specified CQ definition to the interface

© 2001, Cisco Systems, Inc. QOS v1.0—3-53 Custom Queuing Scheduling Parameters queue-list list queue queue-number byte-count bc Router(config)# Specifies the lower boundary on how many bytes the system allows to be delivered from a given queue during one round-robin cycle Default: 1500 bytes queue-list list queue queue-number limit limit Router(config)# Specifies the maximum number of packets in a queue Incoming packets are tail-dropped if the limit is exceeded Default: 20

© 2001, Cisco Systems, Inc. QOS v1.0—3-54 Custom Queuing with Pre-emptive Queues Custom Queuing System Hardware Queuing System Hardware Queuing System Class 1? Queue 1 Round - Robin Scheduler Round - Robin Scheduler Int er-face Forwarded Packets Hardware Q Tail Drop Class 2? Queue 2 Tail Drop Class 16? Queue 16 Tail Drop Class 0? Queue 0 Tail Drop Pre-emptive Scheduler Pre-emptive Scheduler Custom queuing has Queue 0 for system and link-level messages that use pre- emptive scheduling. Queue 1 is the lowest custom queue that is serviced by the round- robin scheduler.

© 2001, Cisco Systems, Inc. QOS v1.0—3-55 Custom Queuing with Pre-emptive Queues (cont.) Custom Queuing System Hardware Queuing System Hardware Queuing System Class 1? Queue 1 Round - Robin Scheduler Round - Robin Scheduler Inter-face Forwarded Packets Hardware Q Tail Drop Class 2? Queue 2 Tail Drop Class 16? Queue 16 Tail Drop Custom queues can be configured to use the pre-emptive scheduler. Queue 2 is now the lowest custom queue that is serviced by the round-robin scheduler. Class 0? Queue 0 Tail Drop Pre-emptive Scheduler Pre-emptive Scheduler

© 2001, Cisco Systems, Inc. QOS v1.0—3-56 Custom Queuing Scheduling Parameters Set the lowest queue to be treated as the custom queue. Queues below the specified queue are pre-emptive priority queues (Q1 having the highest priority). Queue 0 is always treated as pre-emptive. –System and link-level messages are classified in Q0 by default. queue-list list-number lowest-custom queue-number Router(config)#

© 2001, Cisco Systems, Inc. QOS v1.0—3-57 Core WAN Core Branch Office E0 E1 Custom Queuing Example interface serial 1/0 custom-queue-list 5 ! queue-list 5 protocol ip 1 list 101 queue-list 5 queue 1 limit 40 queue-list 5 lowest-custom 2 queue-list 5 interface ethernet 0/0 2 queue-list 5 queue 2 byte-count 3000 queue-list 5 protocol ip 3 queue-list 5 queue 3 byte-count 5000 queue-list 5 default 4 ! access-list 101 permit ip any any precedence 5 interface serial 1/0 custom-queue-list 5 ! queue-list 5 protocol ip 1 list 101 queue-list 5 queue 1 limit 40 queue-list 5 lowest-custom 2 queue-list 5 interface ethernet 0/0 2 queue-list 5 queue 2 byte-count 3000 queue-list 5 protocol ip 3 queue-list 5 queue 3 byte-count 5000 queue-list 5 default 4 ! access-list 101 permit ip any any precedence 5

© 2001, Cisco Systems, Inc. QOS v1.0—3-58 Custom Queuing–show interface Router#show interface serial 1/0 Serial1/0 is up, line protocol is up Hardware is M4T Internet address is /8 MTU 1500 bytes, BW 19 Kbit, DLY usec, rely 255/255, load 107/255 Encapsulation HDLC, crc 16, loopback not set Keepalive set (10 sec) Last input 00:00:00, output 00:00:00, output hang never Last clearing of "show interface" counters never Input queue: 0/75/0 (size/max/drops); Total output drops: 0 Queueing strategy: custom-list 5 Output queues: (queue #: size/max/drops) 0: 0/20/0 1: 0/40/0 2: 0/20/0 3: 0/20/0 4: 0/20/0 5: 0/20/0 6: 0/20/0 7: 0/20/0 8: 0/20/0 9: 0/20/0 10: 0/20/0 11: 0/20/0 12: 0/20/0 13: 0/20/0 14: 0/20/0 15: 0/20/0 16: 0/20/0 … rest ignored... Router#show interface serial 1/0 Serial1/0 is up, line protocol is up Hardware is M4T Internet address is /8 MTU 1500 bytes, BW 19 Kbit, DLY usec, rely 255/255, load 107/255 Encapsulation HDLC, crc 16, loopback not set Keepalive set (10 sec) Last input 00:00:00, output 00:00:00, output hang never Last clearing of "show interface" counters never Input queue: 0/75/0 (size/max/drops); Total output drops: 0 Queueing strategy: custom-list 5 Output queues: (queue #: size/max/drops) 0: 0/20/0 1: 0/40/0 2: 0/20/0 3: 0/20/0 4: 0/20/0 5: 0/20/0 6: 0/20/0 7: 0/20/0 8: 0/20/0 9: 0/20/0 10: 0/20/0 11: 0/20/0 12: 0/20/0 13: 0/20/0 14: 0/20/0 15: 0/20/0 16: 0/20/0 … rest ignored...

© 2001, Cisco Systems, Inc. QOS v1.0—3-59 show queueing custom Router#show queueing custom Current custom queue configuration: List Queue Args 5 3 default 5 1 protocol ip list interface Ethernet0/0 5 1 byte-count 3000 limit byte-count 5000 Router#show queueing custom Current custom queue configuration: List Queue Args 5 3 default 5 1 protocol ip list interface Ethernet0/0 5 1 byte-count 3000 limit byte-count 5000 The show queueing custom command displays only the nondefault parameters.

© 2001, Cisco Systems, Inc. QOS v1.0—3-60 Summary Upon completing this lesson, you should be able to: Describe custom queuing Describe the benefits and drawbacks of custom queuing Configure custom queuing on Cisco routers Monitor and troubleshoot custom queuing

© 2001, Cisco Systems, Inc. QOS v1.0—3-61 Lesson Review 1.When would you use custom queuing? 2.What are the benefits and drawbacks of custom queuing? 3.How many classes does custom queuing support? 4.How does custom queuing schedule packets?

© 2001, Cisco Systems, Inc. Weighted Fair Queuing QOS v1.0—3-62

© 2001, Cisco Systems, Inc. QOS v1.0—3-63 Objectives Upon completing of this lesson, you will be able to: Describe WFQ Describe the benefits and drawbacks of WFQ Configure WFQ on Cisco routers Monitor and troubleshoot WFQ

© 2001, Cisco Systems, Inc. QOS v1.0—3-64 Weighted Fair Queuing Queuing algorithm should fairly share the bandwidth among flows by: –Reducing response time for interactive flows by scheduling them to the front of the queue –Preventing high volume conversations from monopolizing an interface Implementation: Messages are sorted into conversations (flows) and transmitted by the order of the last bit crossing the flow channel. Unfairness is reinstated by introducing “weight” (IP Precedence) to give proportionately more bandwidth to flows with higher weight.

© 2001, Cisco Systems, Inc. QOS v1.0—3-65 Weighted Fair Queuing (cont.) WFQ uses per-flow FIFO queues. Weighted Fair Queuing System Hardware Queuing System Hardware Queuing System Flow 1? Queue 1 WFQ Scheduler WFQ Scheduler Interface Forwarded Packets Hardware Q Flow 2? Queue 2 Flow N? Queue N WFQ drop

© 2001, Cisco Systems, Inc. QOS v1.0—3-66 Weighted Fair Queuing Implementations Implementation parameters: –Queuing platform: central CPU or VIP –Classification mechanism –Weighted fairness Modified tail drop within each queue

© 2001, Cisco Systems, Inc. QOS v1.0—3-67 WFQ Classification IPTCPPayload Src. Addr. Dest. Addr. ProtocolToSSrc. Port Dest. Port Hash Algorithm #queue (index of the queue) Packets of the same flow end up in the same queue. The ToS field is the only parameter that might change, causing packets of the same flow to end up in different queues. WFQ classification uses these parameters: Source IP address Destination IP address Source TCP or UDP port Destination TCP or UDP port Transport protocol Type of service (ToS) field WFQ classification uses these parameters: Source IP address Destination IP address Source TCP or UDP port Destination TCP or UDP port Transport protocol Type of service (ToS) field A hash algorithm is used to produce the index of the queue where the packet is enqueued.

© 2001, Cisco Systems, Inc. QOS v1.0—3-68 WFQ Classification Details A fixed number of per-flow queues is configured. A hash function is used to translate flow parameters into queue number. System packets (eight queues) and RSVP flows (if configured) are mapped into separate queues. Two or more flows could map into the same queue, resulting in lower per-flow bandwidth. Important: The number of queues configured has to be larger than the expected number of flows.

© 2001, Cisco Systems, Inc. QOS v1.0—3-69 WFQ Insertion and Drop Policy WFQ has two modes of dropping: –Early dropping when the congestive discard threshold (CDT) is reached –Aggressive dropping when the hold-queue out limit (HQO) is reached WFQ always drops packets of the most aggressive flow.

© 2001, Cisco Systems, Inc. QOS v1.0—3-70 WFQ Insertion and Drop Policy (cont.) HQO (hold-queue out limit) is the maximum. number of packets that the WFQ system can hold. CDT (congestive discard threshold) is the threshold when WFQ starts dropping packets of the most aggressive flow. N is the number of packets in the WFQ system when the Nth packet arrives. N>CDT? N>HQO? Worst Finish Time? Worst Finish Time? Worst Finish Time? Worst Finish Time? Enqueue Packet Enqueue Packet Nth Packet Drop the packet with the worst finish time (old) and enqueue the Nth packet (new). No Yes No Yes New Old

© 2001, Cisco Systems, Inc. QOS v1.0—3-71 Case Study The WFQ system can hold a maximum of ten packets (hold-queue limit). Early dropping (of aggressive flows) should start when there are eight packets (congestive discard threshold) in the WFQ system.

© 2001, Cisco Systems, Inc. QOS v1.0—3-72 Case Study: Interface Congestion Absolute maximum (HQO=10) exceeded; new packet is the last in the TDM system and is dropped

© 2001, Cisco Systems, Inc. QOS v1.0—3-73 Case Study: Interface Congestion Absolute maximum exceeded (HQO=10); new packet is not the last in the TDM system, so last packet is dropped

© 2001, Cisco Systems, Inc. QOS v1.0—3-74 Case Study: Flow Congestion CDT exceeded (CDT=8); new packet would be the last in the TDM system and is dropped

© 2001, Cisco Systems, Inc. QOS v1.0—3-75 Case Study: Flow Congestion CDT exceeded (CDT=8); new packet would not be the last, and packet is enqueued

© 2001, Cisco Systems, Inc. QOS v1.0—3-76 Drop Mechanism Within WFQ: Exception Exception: A packet classified into an empty subqueue is never dropped. The packet precedence has no effect on the dropping scheme.

© 2001, Cisco Systems, Inc. QOS v1.0—3-77 WFQ Scheduling Each packet is tagged with its finish time in a virtual TDM system. The scheduler selects the packets with the earliest finish time tag (thus, the packet that leaves the virtual TDM the earliest). Reference: “On the Efficient Implementation of Fair Queuing," Keshav, Berkeley, 1994

© 2001, Cisco Systems, Inc. QOS v1.0—3-78 FT(B2)= B2[300] FT(A3)= A3[10] FT(A2)= A2[20] FT(B1)= B1[300] A1[100] FT(A1)=0+100 T B2B1A3A2A1 Thus the resulting scheduling is: If Flow F active, then FT(P k+1 ) = FT(P k ) + Size(P k+1 ) otherwise FT(P 0 ) = Now + Size(P 0 ) Fair Queuing Finish Time Calculation

© 2001, Cisco Systems, Inc. QOS v1.0—3-79 Weight in WFQ Scheduling Flow with P=001 Flow with P=000 WFQ System (Real-Size Packets) Flow with P=001 Flow with P=000 WFQ System (Virtual-Size Packets) Precedence-1 packets appear half the real size. Hardware FIFO Queue Precedence-1 flow gets twice as much bandwidth as Precedence-0 flow. Virtual Packet Size = Real Packet Size / (IP Precedence + 1)

© 2001, Cisco Systems, Inc. QOS v1.0—3-80 If Flow F Active, Then FT(P k+1 ) = FT(P k ) + Size(P k+1 )/(IPPrec+1) Otherwise FT(P 0 ) = Now + Size(P 0 )/(IPPrec+1) Weighted Fair Queuing Finish Time Calculation If Flow F active, then FT(P k+1 ) = FT(P k ) + Size(P k+1 )*4096/(IPPrec+1) otherwise FT(P 0 ) = Now + Size(P 0 )*4096/(IPPrec+1) The finish time is adjusted based on the IP precedence of the packet. IOS implementation scales the finish time to allow integer arithmetic. RSVP packets and high-priority internal packets (PAK-Priority) have special weights (4 and 128).

© 2001, Cisco Systems, Inc. QOS v1.0—3-81 IP Precedence to Weight Mapping RSVP packets and high-priority internal packets (PAK-Priority) have special weights (4 and 128). Lower weight makes packets appear smaller (preferred) (virtual IP Precedence) 32 (virtual IP Precedence) IP Precedence 4 (RSVP) 128 (PAK-Priority) Weight

© 2001, Cisco Systems, Inc. QOS v1.0—3-82 Weighted Fair Queuing Voice and Data Integration WAN link speed128 kbps Voice requirements30 kbps VoIP is Precedence 5 (counts as 6 data sessions) 1 VoIP session, 5 data sessions –Voice gets up to 6/(6+5)*128 = 69 kbps (enough) 1 VoIP session, 20 data sessions –Voice gets up to 6/(6+20)*128 = 29 kbps (problem)

© 2001, Cisco Systems, Inc. QOS v1.0—3-83 Benefits and Drawbacks of Weighted Fair Queuing  Benefits Simple configuration (classification does not have to be configured) Guarantees throughput to all flows Drops packets of most aggressive flows Supported on most platforms Supported in all IOS versions (above 11.0) – 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 mechanisms

© 2001, Cisco Systems, Inc. QOS v1.0—3-84 Weighted Fair Queuing Configuration Congestive discard threshold (CDT) –Number of messages allowed in the WFQ system before the router starts dropping new packets for the longest queue –Value can range from 1 to 4096 (default is 64) fair-queue [cdt [dynamic-queues [reservable-queues]]] Router(config-intf)#

© 2001, Cisco Systems, Inc. QOS v1.0—3-85 Weighted Fair Queuing Configuration (cont.) dynamic-queues –Number of dynamic queues used for best-effort conversations (values are: 16, 32, 64, 128, 256, 512, 1024, 2048, and 4096–the default is 256) reservable-queues –Number of reservable queues used for reserved conversations in the range 0 to 1000 (used for interfaces configured for features such as RSVP - the default is 0) fair-queue [cdt [dynamic-queues [reservable-queues]]] Router(config-intf)#

© 2001, Cisco Systems, Inc. QOS v1.0—3-86 hold-queue max-limit out Router(config-if)# Specifies the maximum number of packets that can be in all output queues on the interface at any time The default value for WFQ is 1000 Under special circumstances WFQ can consume a lot of buffers, which may require lowering this limit Weighted Fair Queuing Additional Parameters

© 2001, Cisco Systems, Inc. QOS v1.0—3-87 Fair Queuing Defaults Fair queuing is enabled by default on: –Physical interfaces whose bandwidth is less than or equal to Mbps –Interfaces configured for Multilink PPP Fair queuing is disabled: –If you enable the autonomous or silicon switching engine mechanisms –For any sequenced encapsulation: X.25, SDLC, LAPB, reliable PPP

© 2001, Cisco Systems, Inc. QOS v1.0—3-88 Monitoring and Troubleshooting WFQ show interface interface Router# Displays interface delays, including the activated queuing mechanism with the summary information show queue interface Router# Displays detailed information about the WFQ system of the selected interface

© 2001, Cisco Systems, Inc. QOS v1.0—3-89 show interface Router#show interface serial 1/0 Hardware is M4T Internet address is /8 MTU 1500 bytes, BW 19 Kbit, DLY usec, rely 255/255, load 147/255 Encapsulation HDLC, crc 16, loopback not set Keepalive set (10 sec) Last input 00:00:00, output 00:00:00, output hang never Last clearing of "show interface" counters never Input queue: 0/75/0 (size/max/drops); Total output drops: 0 Queueing strategy: weighted fair Output queue: 0/1000/64/0 (size/max total/threshold/drops) Conversations 0/4/256 (active/max active/max total) Reserved Conversations 0/0 (allocated/max allocated) 5 minute input rate bits/sec, 8 packets/sec 5 minute output rate bits/sec, 9 packets/sec … rest deleted... Router#show interface serial 1/0 Hardware is M4T Internet address is /8 MTU 1500 bytes, BW 19 Kbit, DLY usec, rely 255/255, load 147/255 Encapsulation HDLC, crc 16, loopback not set Keepalive set (10 sec) Last input 00:00:00, output 00:00:00, output hang never Last clearing of "show interface" counters never Input queue: 0/75/0 (size/max/drops); Total output drops: 0 Queueing strategy: weighted fair Output queue: 0/1000/64/0 (size/max total/threshold/drops) Conversations 0/4/256 (active/max active/max total) Reserved Conversations 0/0 (allocated/max allocated) 5 minute input rate bits/sec, 8 packets/sec 5 minute output rate bits/sec, 9 packets/sec … rest deleted...

© 2001, Cisco Systems, Inc. QOS v1.0—3-90 show queue Router#show queue serial 1/0 Input queue: 0/75/0 (size/max/drops); Total output drops: 0 Queueing strategy: weighted fair Output queue: 2/1000/64/0 (size/max total/threshold/drops) Conversations 2/4/256 (active/max active/max total) Reserved Conversations 0/0 (allocated/max allocated) (depth/weight/discards/tail drops/interleaves) 1/4096/0/0/0 Conversation 124, linktype: ip, length: 580 source: , destination: , id: 0x0166, ttl: 254, TOS: 0 prot: 6, source port 23, destination port (depth/weight/discards/tail drops/interleaves) 1/4096/0/0/0 Conversation 127, linktype: ip, length: 585 source: destination: , id: 0x020D, ttl: 252, TOS: 0 prot: 6, source port 23, destination port Router#show queue serial 1/0 Input queue: 0/75/0 (size/max/drops); Total output drops: 0 Queueing strategy: weighted fair Output queue: 2/1000/64/0 (size/max total/threshold/drops) Conversations 2/4/256 (active/max active/max total) Reserved Conversations 0/0 (allocated/max allocated) (depth/weight/discards/tail drops/interleaves) 1/4096/0/0/0 Conversation 124, linktype: ip, length: 580 source: , destination: , id: 0x0166, ttl: 254, TOS: 0 prot: 6, source port 23, destination port (depth/weight/discards/tail drops/interleaves) 1/4096/0/0/0 Conversation 127, linktype: ip, length: 585 source: destination: , id: 0x020D, ttl: 252, TOS: 0 prot: 6, source port 23, destination port 11013

© 2001, Cisco Systems, Inc. QOS v1.0—3-91 Queuing Comparison Weighted Fair QueuingPriority QueuingCustom Queuing No queue lists Low-volume traffic given priority Conversation dispatching Interactive traffic gets priority Works well on speeds up to 2 Mbps Enabled by default 4 queues High-priority queue serviced first Packet-by-packet dispatching Critical traffic gets through Designed for low-bandwidth links Must configure 16 queues Round-robin service Threshold dispatching Proportional allocation of bandwidth Designed for medium-speed links Must configure

© 2001, Cisco Systems, Inc. QOS v1.0—3-92 Summary Upon completing this lesson, you should be able to: Describe WFQ Describe the benefits and drawbacks of WFQ Configure WFQ on Cisco routers Monitor and troubleshoot WFQ

© 2001, Cisco Systems, Inc. QOS v1.0—3-93 Lesson Review 1.How does WFQ classify packets? 2.When does WFQ drop packets? 3.How does WFQ schedule packets?

© 2001, Cisco Systems, Inc. Distributed Weighted Fair Queuing QOS v1.0—3-94

© 2001, Cisco Systems, Inc. QOS v1.0—3-95 Objectives Upon completing this lesson, you will be able to: Describe and configure DWFQ Describe and configure ToS-based DWFQ Describe and configure QoS-group-based DWFQ Monitor and troubleshoot DWFQ

© 2001, Cisco Systems, Inc. QOS v1.0—3-96 Distributed WFQ The term “distributed” is used primarily for features available on Versatile Interface Processors (VIPs) on Cisco 7x00 routers. Cisco IOS supports four versions of DWFQ: –Flow-based DWFQ –ToS-based DWFQ –QoS-group-based DWFQ –Distributed class-based WFQ This lesson focuses on the first three versions of DWFQ.

© 2001, Cisco Systems, Inc. QOS v1.0—3-97 Flow-Based DWFQ Flow-based DWFQ looks the same as RSP/low-end WFQ, but... Flow-based dWFQ System Hardware Queuing System Hardware Queuing System Flow 1? Queue 1 WFQ Scheduler WFQ Scheduler Interface Forwarded Packets Hardware Q Flow 2? Queue 2 Flow N? Queue N WFQ drop

© 2001, Cisco Systems, Inc. QOS v1.0—3-98 Flow-Based DWFQ Classification IPTCPPayload Src. Addr. Dest. Addr. ProtocolSrc. Port Dest. Port Hash Algorithm #queue (9-bit index of the queue) The number of queues is 512 (not tunable). ToS is not used for classification (except in IOS version 11.1CC). WFQ classification uses these parameters: Source IP address Destination IP address Source TCP or UDP port Destination TCP or UDP port Transport protocol A hash algorithm is used to produce the index of the queue where the packet is enqueued.

© 2001, Cisco Systems, Inc. QOS v1.0—3-99 DWFQ Insertion and Drop Policy DWFQ drops packets when both the individual queue limit and aggregate queue limit are reached. DWFQ is not as strict with aggressive flows as nondistributed WFQ. This insertion and drop policy is the same for all three versions of DWFQ (flow-based, ToS-based, and QoS-group- based).

© 2001, Cisco Systems, Inc. QOS v1.0—3-100 DWFQ Insertion and Drop Policy (cont.) M>IQL? N>AQL? Enqueue packet Enqueue packet Nth packet No Yes QL (queue limit) is the maximum number of packets the selected queue can hold. AQL (aggregate queue limit) is the maximum number of packets that the DWFQ system can hold. IQL (individual queue limit) is the maximum number of packets that an individual queue of a congested DWFQ system can hold. N is the number of packets in the DWFQ system when the Nth packet arrives. M is the number of packets in the queue into which the packet is classified. M>QL? Yes No

© 2001, Cisco Systems, Inc. QOS v1.0—3-101 Flow-Based DWFQ Scheduling Uses calendar queuing (optimized version of scheduling based on finish time; more jitter) Weight (IP Precedence) is not used for scheduling purposes (pure fair queuing) Flow-Based DWFQ System Hardware Queuing System Hardware Queuing System Queue 1 D WFQ Scheduler (Calendar Queuing) D WFQ Scheduler (Calendar Queuing) Interface Hardware Q Queue 2 Queue N Calendar Queue Packets are scheduled (ordered) in advance for faster transfer to the hardware queue.

© 2001, Cisco Systems, Inc. QOS v1.0—3-102 Configuring Flow-Based DWFQ fair-queue Router(config-if)# The command enables DWFQ on an interface connected to a VIP2-40 or newer interface processor. For all other interfaces, this command enables RSP- based WFQ. DWFQ can be configured on interfaces but not on subinterfaces. DWFQ is not supported on Fast EtherChannel, tunnel, or other logical or virtual interfaces (MPPP).

© 2001, Cisco Systems, Inc. QOS v1.0—3-103 Configuring Flow-Based DWFQ (cont.) fair-queue aggregate-limit aggregate-packets Router(config)# The total number of packets in all output queues before some packets may be dropped fair-queue individual-limit individual-packets Router(config)# The maximum individual per-flow queue size during periods of congestion Defaults: Aggregate limit depends on the transmission rate and the available buffer space on the VIP; individual limit is half of the aggregate limit Don’t change the defaults unless necessary

© 2001, Cisco Systems, Inc. QOS v1.0—3-104 Flow-Based DWFQ Example DWFQ on a Fast Ethernet interface DWFQ system should not contain more than 200 packets No queue should accept new packets when the DWFQ system is congested and the queue is longer than 30 packets interface FastEthernet 1/1/0 ip address fair-queue fair-queue aggregate-limit 200 fair-queue individual-limit 30 ! interface FastEthernet 1/1/0 ip address fair-queue fair-queue aggregate-limit 200 fair-queue individual-limit 30 !

© 2001, Cisco Systems, Inc. QOS v1.0—3-105 show interface Router#show interfaces FastEthernet1/1/0 FastEthernet1/1/0 is up, line protocol is up Hardware is cyBus FastEthernet Interface, address is 0007.f Description: pkt input i/f for WRL tests (to pagent) Internet address is /24 MTU 1500 bytes, BW Kbit, DLY 100 usec, rely 255/255, load 1/255 Encapsulation ARPA, loopback not set, keepalive not set, 100BaseTX/FX ARP type: ARPA, ARP Timeout 04:00:00 Last input never, output 01:11:01, output hang never Last clearing of "show interface" counters 01:12:31 Queueing strategy: VIP-based fair queuing Output queue 0/40, 0 drops; input queue 0/75, 0 drops 30 second input rate 0 bits/sec, 0 packets/sec 30 second output rate 0 bits/sec, 0 packets/sec … rest deleted... Router#show interfaces FastEthernet1/1/0 FastEthernet1/1/0 is up, line protocol is up Hardware is cyBus FastEthernet Interface, address is 0007.f Description: pkt input i/f for WRL tests (to pagent) Internet address is /24 MTU 1500 bytes, BW Kbit, DLY 100 usec, rely 255/255, load 1/255 Encapsulation ARPA, loopback not set, keepalive not set, 100BaseTX/FX ARP type: ARPA, ARP Timeout 04:00:00 Last input never, output 01:11:01, output hang never Last clearing of "show interface" counters 01:12:31 Queueing strategy: VIP-based fair queuing Output queue 0/40, 0 drops; input queue 0/75, 0 drops 30 second input rate 0 bits/sec, 0 packets/sec 30 second output rate 0 bits/sec, 0 packets/sec … rest deleted...

© 2001, Cisco Systems, Inc. QOS v1.0—3-106 show interface fair-queue Router#show interface fastethernet 1/1/0 fair FastEthernet 1/1/0 queue size 0 pkts output 0, wfq drops 0, nobuffer drops 0 WFQ: aggregate queue limit 200 individual queue limit 30 max available buffers 0 Router#show interface fastethernet 1/1/0 fair FastEthernet 1/1/0 queue size 0 pkts output 0, wfq drops 0, nobuffer drops 0 WFQ: aggregate queue limit 200 individual queue limit 30 max available buffers 0 Displays DWFQ statistics

© 2001, Cisco Systems, Inc. QOS v1.0—3-107 Benefits and Drawbacks of Flow- Based DWFQ  Benefits Automatic classification High performance – Drawbacks Does not support the configuration of classification Does not use IP Precedence as weight Only supported on Cisco 7x00 series routers with VIP2-40 or newer

© 2001, Cisco Systems, Inc. QOS v1.0—3-108 ToS-Based DWFQ ToS-based DWFQ has four classes ToS-based dWFQ System Hardware Queuing System Hardware Queuing System Class 1? Queue 1 D WFQ Scheduler D WFQ Scheduler Interface Forwarded Packets Hardware Q Class 2? Queue 2 Class 4? Queue 4 WFQ drop Class 3? Queue 3 WFQ drop

© 2001, Cisco Systems, Inc. QOS v1.0—3-109 ToS-based dWFQ Classification IPPayload XXX #queue (2-bit index of the queue) The number of queues is 4 (fixed) Classification is based on the two low-order IP precedence bits ToS-based dWFQ Classification uses the two low-order IP precedence bits to classify packets IP Prec. IP precedence Queue 10 and 4 Queue 21 and 5 Queue 32 and 6 Queue 43 and 7

© 2001, Cisco Systems, Inc. QOS v1.0—3-110 ToS-Based DWFQ Scheduling One weight per class configured as a percentage –Sum of all weights must be =< 99 –Some bandwidth needed for Class 0 Tail drop within each queue First release: 11.1cc, 12.0

© 2001, Cisco Systems, Inc. QOS v1.0—3-111 Enables ToS-based distributed WFQ Configuring ToS-Based DWFQ fair-queue tos Router(config-intf)# tos number - two low-order precedence bits (only Classes 1, 2, and 3 can be configured with weight; Class 0 takes the remaining bandwidth) weight - percentage of the output link bandwidth allocated to this class (the sum for all classes cannot exceed 99) Defaults: unclassified traffic is assigned to Class 0 Class , Class , Class Class 0 has the remaining weight (100%-W1-W2-W3); default 10 fair-queue tos num weight weight Router(config-intf)#

© 2001, Cisco Systems, Inc. QOS v1.0—3-112 Configures maximum number of packets allowed in the selected queue If not configured, the default is individual limit If queue limit is not configured, it is set to the number of available buffers multiplied by weight Configuring ToS-Based DWFQ (cont.) fair-queue tos num limit class-packets Router(config-if)# fair-queue aggregate-limit aggregate-packets Router(config-if)# If aggregate limit is not configured, it is set to the number of available buffers fair-queue individual-limit individual-packet Router(config-if)# If individual limit is not configured, it is set to one-quarter of the number of available buffers

© 2001, Cisco Systems, Inc. QOS v1.0—3-113 ToS-Based DWFQ Configuration Example interface Hssi0/0/0 ip address fair-queue tos fair-queue tos 1 weight 20 fair-queue tos 1 limit 27 fair-queue tos 2 weight 30 fair-queue tos 2 limit 27 fair-queue tos 3 weight 40 fair-queue tos 3 limit 27 ! interface Hssi0/0/0 ip address fair-queue tos fair-queue tos 1 weight 20 fair-queue tos 1 limit 27 fair-queue tos 2 weight 30 fair-queue tos 2 limit 27 fair-queue tos 3 weight 40 fair-queue tos 3 limit 27 !

© 2001, Cisco Systems, Inc. QOS v1.0—3-114 show interface fair-queue Router#show interfaces fair-queue Hssi0/0/0 queue size 0 pkts output 947, wfq drops 0, nobuffer drops 0 WFQ: aggregate queue limit 386 individual queue limit 96 max available buffers 386 Class 0: weight 10 limit 20 qsize 0 pkts output 947 drops 0 Class 1: weight 20 limit 27 qsize 0 pkts output 0 drops 0 Class 2: weight 30 limit 27 qsize 0 pkts output 0 drops 0 Class 3: weight 40 limit 27 qsize 0 pkts output 0 drops 0 Router#show interfaces fair-queue Hssi0/0/0 queue size 0 pkts output 947, wfq drops 0, nobuffer drops 0 WFQ: aggregate queue limit 386 individual queue limit 96 max available buffers 386 Class 0: weight 10 limit 20 qsize 0 pkts output 947 drops 0 Class 1: weight 20 limit 27 qsize 0 pkts output 0 drops 0 Class 2: weight 30 limit 27 qsize 0 pkts output 0 drops 0 Class 3: weight 40 limit 27 qsize 0 pkts output 0 drops 0

© 2001, Cisco Systems, Inc. QOS v1.0—3-115 Benefits and Drawbacks of ToS- Based DWFQ  Benefits Automatic classification Guarantees throughput to all classes High performance – Drawbacks All drawbacks of FIFO queuing within a single class Does not support the configuration of classification Only four classes are supported Unusual interpretation of IP Precedence (high-priority packets with IP Precedence 6 and 7 share queues with lower-priority packets with IP Precedence 2 and 3) Only supported on Cisco 7x00 Series routers with VIP2-40 or newer

© 2001, Cisco Systems, Inc. QOS v1.0—3-116 QoS-Group-Based DWFQ QoS-group-based DWFQ supports 100 classes. QoS-Group-Based DWFQ System Hardware Queuing System Hardware Queuing System Class 1? Queue 1 D WFQ Scheduler D WFQ Scheduler Interface Forwarded Packets Hardware Q Class 2? Queue 2 Class 100? Queue 100 WFQ drop

© 2001, Cisco Systems, Inc. QOS v1.0—3-117 Buffer Header Buffer Header QoS-Group-Based DWFQ Classification The number of queues is 100. Classification is based on the QoS group parameter. The parameter is local to the router, and it has to be set by some other QoS mechanism: –Policy-based routing (PBR) –Committed access rate (CAR) –QoS Policy Propagation on BGP (QPPB) –Class-based marking –Class-based policing Packet Buffer Frame Header Frame Header IP Header IP Header Payload QoS Group QoS Group

© 2001, Cisco Systems, Inc. QOS v1.0—3-118 QoS-Group-Based DWFQ Scheduling Scheduling is identical to that of ToS-based DWFQ One weight per class configured as a percentage –Sum of all weights must be =< 99 –Some bandwidth needed for Class 0 Tail drop within each queue

© 2001, Cisco Systems, Inc. QOS v1.0—3-119 Configuring QoS-Group-Based DWFQ Enables ToS-based distributed WFQ fair-queue qos-group Router(config-intf)# qos-group number - Classes 1 through 99 can be configured with weight; Class 0 takes the remaining bandwidth weight - percentage of the output link bandwidth allocated to this Class (the sum for all Classes cannot exceed 99) Defaults: unclassified traffic is assigned to class 0 Class , Class , Class Class 0 has the remaining weight (100%-W1-W2-W3); default 10 fair-queue qos-group num weight weight Router(config-intf)#

© 2001, Cisco Systems, Inc. QOS v1.0—3-120 Configuring QoS-Group-Based DWFQ (cont.) Configures individual queue depth –Class packets–maximum number of packets allowed in the queue for the class during periods of congestion If not configured, the default is individual limit, which is half of the aggregate queue limit fair-queue qos-group num limit class-packets Router(config-intf)# fair-queue aggregate-limit aggregate-packets fair-queue individual-limit individual-packet fair-queue aggregate-limit aggregate-packets fair-queue individual-limit individual-packet Router(config-intf)#

© 2001, Cisco Systems, Inc. QOS v1.0—3-121 QoS-Group-Based DWFQ Example QoS-group-based dWFQ can be used to implement mapping of different parameters into the QoS group: –Assume another mechanism has been configured to translate QoS class information into the QoS group (e.g., QPPB). –Use QoS-group-based DWFQ output queuing. Example: –allocate 10% to class 1 traffic. –allocate 30% to class 2 traffic. –allocate 60% to other traffic.

© 2001, Cisco Systems, Inc. QOS v1.0—3-122 QoS-Group Based DWFQ Configuration Example interface FastEthernet1/0/0 bgp-policy destination ip-qos-map !... ! interface Hssi0/0/0 ip address bgp-policy destination ip-prec-map fair-queue qos-group fair-queue aggregate-limit 60 fair-queue qos-group 1 weight 10 fair-queue qos-group 2 weight 30 fair-queue qos-group 2 limit 27 ! interface FastEthernet1/0/0 bgp-policy destination ip-qos-map !... ! interface Hssi0/0/0 ip address bgp-policy destination ip-prec-map fair-queue qos-group fair-queue aggregate-limit 60 fair-queue qos-group 1 weight 10 fair-queue qos-group 2 weight 30 fair-queue qos-group 2 limit 27 !

© 2001, Cisco Systems, Inc. QOS v1.0—3-123 Monitoring QoS-Group-Based DWFQ Router#show interfaces fair-queue Hssi0/0/0 queue size 0 pkts output 4, wfq drops 0, nobuffer drops 0 WFQ: aggregate queue limit 60 individual queue limit 96 max available buffers 386 Class 0: weight 60 limit 231 qsize 0 pkts output 4 drops 0 Class 1: weight 10 limit 38 qsize 0 pkts output 0 drops 0 Class 2: weight 30 limit 27 qsize 0 pkts output 0 drops 0 Router#show interfaces fair-queue Hssi0/0/0 queue size 0 pkts output 4, wfq drops 0, nobuffer drops 0 WFQ: aggregate queue limit 60 individual queue limit 96 max available buffers 386 Class 0: weight 60 limit 231 qsize 0 pkts output 4 drops 0 Class 1: weight 10 limit 38 qsize 0 pkts output 0 drops 0 Class 2: weight 30 limit 27 qsize 0 pkts output 0 drops 0

© 2001, Cisco Systems, Inc. QOS v1.0—3-124 Benefits and Drawbacks of QoS- Group-Based DWFQ  Benefits Guarantees throughput to all classes A large number of classes (100) High performance – Drawbacks All drawbacks of FIFO queuing within a single class Requires other QoS mechanisms to set QoS group Only supported on Cisco 7x00 Series routers with VIP2-40 or newer

© 2001, Cisco Systems, Inc. QOS v1.0—3-125 DWFQ Summary VIPManual100QoS group QoS DWFQ RSP/low- end/VIP Manual 64 Manual CBWFQ* VIPManual4 IP Precedence ToS DWFQ VIPNo512Per-flow DWFQ RSP/low-end Yes (IP Precedence) 16 to 4096Per-flow WFQ ImplementationWeighted Fairness ClassesClassification * Class-based WFQ is covered in the module “Modular QoS CLI Service Policy”

© 2001, Cisco Systems, Inc. QOS v1.0—3-126 Summary Upon completing this lesson, you should be able to: Describe and configure DWFQ. Describe and configure ToS-based DWFQ Describe and configure QoS-group-based DWFQ Monitor and troubleshoot DWFQ

© 2001, Cisco Systems, Inc. QOS v1.0—3-127 Lesson Review 1.What are the different DWFQ mechanisms? 2.What are the main differences between the different versions of DWFQ? 3.What platforms support DWFQ?

© 2001, Cisco Systems, Inc. Modified Deficit Round Robin QOS v1.0—3-128

© 2001, Cisco Systems, Inc. QOS v1.0—3-129 Objectives Upon completing this lesson, you will be able to: Describe MDRR queuing Describe the benefits and drawbacks of MDRR queuing Configure MDRR queuing on Cisco GSR routers Monitor and troubleshoot MDRR

© 2001, Cisco Systems, Inc. QOS v1.0—3-130 Modified Deficit Round Robin Deficit round robin (DRR) is a class-based queuing mechanism available on Cisco GSRs. MDRR supports eight classes. Low-latency queuing is introduced in the MDRR.

© 2001, Cisco Systems, Inc. QOS v1.0—3-131 MDRR Architecture MDRR supports eight classes (8 round robin queues; one can be high- priority). MDRR is implemented on the receive side (in front of the crossbar switching fabric) and on the transmit side (in front of an interface). Modified Deficit Round Robin Hardware Queuing System or Crossbar Switching Fabric Hardware Queuing System or Crossbar Switching Fabric Class 1? VOQ 1 MDRR Scheduler MDRR Scheduler Forwarded Packets Class 2? VOQ 2 Class 8? VOQ 8 Tail-drop WRED Tail-drop WRED Tail-drop WRED Tail-drop WRED Tail-drop WRED Tail-drop WRED

© 2001, Cisco Systems, Inc. QOS v1.0—3-132 MDRR Features Deficit round robin (DRR) uses eight virtual output queues (VOQs) to prevent head-of-line blocking. DRR can use weighted random early detection (WRED) within each class to prevent congestion within the class. Modified DRR (MDRR) can have one high-priority queue for delay-sensitive traffic being serviced in either of the two supported modes: –Strict priority –Alternate priority

© 2001, Cisco Systems, Inc. QOS v1.0—3-133 MDRR Classification MDRR supports classification of any IP Precedence into any of the eight virtual output queues. One of the eight queues can be used as low-latency queue. IP Precedence 0 IP Precedence 0 IP Precedence 1 IP Precedence 1 IP Precedence 7 IP Precedence 7 VOQ 0 VOQ 1 VOQ 2 VOQ 7

© 2001, Cisco Systems, Inc. QOS v1.0—3-134 MDRR Insertion and Drop Policy MDRR uses a traditional tail-drop scheme if a queue is congested. MDRR can also use weighted random early detection (WRED) to prevent congestion. Virtual Output Queue Tail Drop or WRED Tail Drop or WRED

© 2001, Cisco Systems, Inc. QOS v1.0—3-135 DRR Scheduling Service policy for one queue in one round: 1.Add MTU+(Weight-1)*512 tokens to the token bucket. 2.Transmit packets until tokens are used up or the queue is empty. 3.Reset the token bucket to 0 if the queue is empty. Otherwise remember the deficit (how much more tokens were used than available). 4.Start serving the next queue. VOQ 0 VOQ 1 VOQ 7 Each queue can transmit a configured amount of bytes in one round: MTU + (weight-1)*512 Round Robin Scheduler

© 2001, Cisco Systems, Inc. QOS v1.0—3-136 MDRR Scheduling with Strict Priority Queue Service policy for MDRR with strict priority: 1.Transmit packets from the strict priority low-latency queue until the queue is empty. 2.Serve the next-in-line round-robin queue. 3.Start serving the low-latency queue again. VOQ 0 VOQ 1 VOQ 7 The strict priority, low-latency queue is not limited by the token bucket mechanism. Round- Robin Scheduler LL Queue Strict Priority Queuing

© 2001, Cisco Systems, Inc. QOS v1.0—3-137 MDRR Scheduling with Alternate Priority Queue Service policy for MDRR with alternate priority: 1.Transmit packets from the alternate priority, low-latency queue until the tokens are used up or the queue is empty. 2.Serve the next-in-line round-robin queue 3.Start serving the low-latency queue again. VOQ 0 VOQ 1 VOQ 7 The alternate priority queue is using the token bucket to limit the amount of bytes it can transmit in one round. Round- Robin Scheduler LL Queue Alternate Priority Queuing

© 2001, Cisco Systems, Inc. QOS v1.0—3-138 Benefits and Drawbacks of MDRR  Benefits Accurate bandwidth allocation (takes into account the deficit from the previous round as opposed to custom queuing) Prevents head-of-line blocking in front of the crossbar switching fabric Supports low-latency queuing (strict priority and alternate priority) High performance – Drawbacks Limited classification tools (only IP Precedence) Limited number of classes (only eight) Supported only on Cisco Series GSRs

© 2001, Cisco Systems, Inc. QOS v1.0—3-139 Configuring Interface MDRR cos-queue-group cos-queue-group-name Router(config)# Create a queue group template and enter CoS queue group configuration mode. precedence precedence queue {queue-number|low-latency} Router(config-cos-que)# Map IP Precedence to a queue. queue queue-number weight Router(config-cos-que)# Set the weight of a queue.

© 2001, Cisco Systems, Inc. QOS v1.0—3-140 Configuring Interface MDRR (cont.) tx-cos cos-queue-group-name Router(config-if)# Associate a CoS queue group name with the transmit queues on an interface. queue low-latency {alternate-priority weight|strict-priority} Router(config-cos-que)# Specify the type of low-latency queue.

© 2001, Cisco Systems, Inc. QOS v1.0—3-141 Configuring Receive MDRR slot-table-cos slot-table-name Router(config)# Define a slot table name and enter slot table configuration mode. destination slot {slot-number|all} cos-queue-group-name Router(config-slot-cos)# Define destination slot parameters for this slot table name. rx-cos-slot line-card-number cos-queue-group-name Router(config)# Link a slot-table-cos template to a line card.

© 2001, Cisco Systems, Inc. QOS v1.0—3-142 MDRR Example interface POS3/0 ip address tx-cos C4template ! cos-queue-group C4template precedence 0 queue 0 precedence 1 queue 1 precedence 2 queue 1 precedence 3 queue 2 precedence 4 queue 2 precedence 5 queue low-latency precedence 6 queue 3 precedence 7 queue 3 queue 0 10 queue 1 20 queue 2 40 queue low-latency alternate-priority 80 exit ! interface POS3/0 ip address tx-cos C4template ! cos-queue-group C4template precedence 0 queue 0 precedence 1 queue 1 precedence 2 queue 1 precedence 3 queue 2 precedence 4 queue 2 precedence 5 queue low-latency precedence 6 queue 3 precedence 7 queue 3 queue 0 10 queue 1 20 queue 2 40 queue low-latency alternate-priority 80 exit !

© 2001, Cisco Systems, Inc. QOS v1.0—3-143 Monitoring and Troubleshooting MDRR Router#show cos statistics Slot Dest slot 5 cos-queue-group: C7template... Queue Lengths To Fabric Queues (DRR configured) C7template Queue Average High Water Mark Weight Low latency Router#show cos statistics Slot Dest slot 5 cos-queue-group: C7template... Queue Lengths To Fabric Queues (DRR configured) C7template Queue Average High Water Mark Weight Low latency show cos statistics Router# Display MDRR statistics

© 2001, Cisco Systems, Inc. QOS v1.0—3-144 Summary Upon completing this lesson, you should be able to: Describe MDRR queuing Describe the benefits and drawbacks of MDRR queuing Configure MDRR queuing on Cisco GSR routers Monitor and troubleshoot MDRR

© 2001, Cisco Systems, Inc. QOS v1.0—3-145 Lesson Review 1.Describe the scheduling mechanism of MDRR. 2.Which two types of low-latency queuing does MDRR support? 3.What are the benefits and drawbacks of MDRR? 4.Where can MDRR be applied?

© 2001, Cisco Systems, Inc. IP RTP Prioritization QOS v1.0—3-146

© 2001, Cisco Systems, Inc. QOS v1.0—3-147 Objectives Upon completing this lesson, you will be able to: Describe IP RTP Prioritization Describe the benefits and drawbacks of IP RTP Prioritization Configure IP RTP Prioritization on Cisco routers Monitor and troubleshoot IP RTP Prioritization

© 2001, Cisco Systems, Inc. QOS v1.0—3-148 IP RTP Prioritization IP RTP Prioritization provides low-latency queuing when used in combination with WFQ or CBWFQ. It can be used only for UDP traffic with predictable port numbers. It is usually used for VoIP traffic. IP RTP Prioritization is limited to prevent starvation of other traffic.

© 2001, Cisco Systems, Inc. QOS v1.0—3-149 IP RTP Prioritization (cont.) IP RTP prioritization adds one high-priority queue to WFQ. Hardware Queuing System Hardware Queuing System Interface Forwarded Packets Hardware Q Weighted Fair Queuing System Flow 1? Queue 1 WFQ Scheduler Flow 2? Queue 2 Flow N? Queue N WFQ drop High Priority? High Priority? RTP Scheduler RTP Scheduler WFQ drop

© 2001, Cisco Systems, Inc. QOS v1.0—3-150 IP RTP Priority Classification IP RTP Prioritization classifies packets based on the UDP Port number. Classification is specified by a range of UDP port numbers. UDP port In range? UDP port In range? IP UDP Payload UDP Destination port RTP Queue WFQ Queuing System WFQ Queuing System Yes No Forwarded Packets

© 2001, Cisco Systems, Inc. QOS v1.0—3-151 IP RTP Priority Insertion and Drop Policy IP RTP Prioritization limits the amount of high-priority traffic. Excess traffic is dropped. Packet within contract? Packet within contract? RTP Queue Yes No Token Bucket Token Bucket Classified Packets

© 2001, Cisco Systems, Inc. QOS v1.0—3-152 Benefits and Drawbacks of IP RTP Prioritization  Benefits Adds low-latency queuing to WFQ and CB- WFQ Prevents starvation of other traffic – Drawbacks Poor classification options Obsoleted by class-based low-latency queuing

© 2001, Cisco Systems, Inc. QOS v1.0—3-153 ip rtp priority starting-port port-range bandwidth Router(config-if)# Creates a separate priority queue for VoIP packets and specifies maximum bandwidth available to voice traffic Maximum bandwidth shall always be slightly larger than the actually required bandwidth due to jitter in the network and the Layer 2 overhead Only UDP packets with a destination port number in the configured range are classified into this queue Configuring IP RTP Prioritization max-reserved-bandwidth percent Router(config-if)# Specifies the maximum bandwidth percentage that can be allocated to class-based WFQ and priority RTP traffic The remaining bandwidth is available to flow-classified, best-effort traffic and control packets Default: 75% of the interface bandwidth can be reserved

© 2001, Cisco Systems, Inc. QOS v1.0—3-154 IP RTP Prioritization Example interface Serial0/0 bandwidth 128 ip address encapsulation ppp fair-queue ip rtp priority ! interface Serial0/0 bandwidth 128 ip address encapsulation ppp fair-queue ip rtp priority ! Router#show queue serial0/0 Input queue: 0/75/0/0 (size/max/drops/flushes); Total output drops: 0 Queueing strategy: weighted fair Output queue: 0/1000/64/0 (size/max total/threshold/drops) Conversations 0/1/256 (active/max active/max total) Reserved Conversations 0/0 (allocated/max allocated) Available Bandwidth 46 kilobits/sec Router# Router#show queue serial0/0 Input queue: 0/75/0/0 (size/max/drops/flushes); Total output drops: 0 Queueing strategy: weighted fair Output queue: 0/1000/64/0 (size/max total/threshold/drops) Conversations 0/1/256 (active/max active/max total) Reserved Conversations 0/0 (allocated/max allocated) Available Bandwidth 46 kilobits/sec Router# Up to 75% of configured bandwidth is reservable. BW avail = BW * BW RTP

© 2001, Cisco Systems, Inc. QOS v1.0—3-155 Summary Upon completing this lesson, you should be able to: Describe IP RTP Prioritization Describe the benefits and drawbacks of IP RTP Prioritization Configure IP RTP Prioritization on Cisco routers Monitor and troubleshoot IP RTP Prioritization

© 2001, Cisco Systems, Inc. QOS v1.0—3-156 Lesson Review 1.When would you use IP RTP Prioritization? 2.What are the drawbacks of IP RTP Prioritization? 3.How many high-priority queues does IP RTP Prioritization support?

© 2001, Cisco Systems, Inc. QOS v1.0—3-157 Module Summary Upon completing this module, you should be able to: Describe and configure FIFO queuing Describe and configure priority queuing (PQ) Describe and configure custom queuing (CQ) Describe and configure basic weighted fair queuing (WFQ), distributed WFQ, ToS-based distributed WFQ, and QoS-group-based distributed WFQ Describe and configure modified deficit round robin (MDRR) queuing Describe and configure IP RTP Prioritization

© 2001, Cisco Systems, Inc. Queuing Mechanisms-158