Queuing Mechanisms.

Slides:



Advertisements
Similar presentations
Quality of Service CCDA Quick Reference.
Advertisements

© 2006 Cisco Systems, Inc. All rights reserved.QoS v2.2—5-1 Congestion Management Configuring LAN Congestion Management.
Computer Networks20-1 Chapter 20. Network Layer: Internet Protocol 20.1 Internetworking 20.2 IPv IPv6.
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
© 2006 Cisco Systems, Inc. All rights reserved. ICND v2.3—5-1 Establishing Serial Point-To-Point Connections Configuring Serial Point-To-Point Encapsulation.
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.
Networking Issues in LAN Telephony Brian Yang
School of Information Technologies IP Quality of Service NETS3303/3603 Weeks
Design of QoS Router Terrance Lee. Broadband Internet Architecture Intelligent Access Electronic Switch (Intserv or Diffserv) Switching /Routing QoS Security.
© 2006 Cisco Systems, Inc. All rights reserved. MPLS v2.2—3-1 Frame-Mode MPLS Implementation on Cisco IOS Platforms Configuring Frame-Mode MPLS on Cisco.
Advance Configuration IOS Commands. Overview of Router Modes Router(config)# Router>enable Router#config term Exit Ctrl-Z (end) User EXEC Mode Privileged.
Understanding QoS Fundamentals. The basic overview for QoS is “Who goes 1 st? ” from an exit perspective on a switch or router. ‘Evil Villains’ in the.
TDRE Filtering and QoS TDRE Version The first choice for the mile p.2 IP filtering >With extended access lists >define in router/trafficPolicy.
© 2007 Cisco Systems, Inc. All rights reserved.ICND1 v1.0—4-1 WAN Connections Configuring Serial Encapsulation.
© 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.
© 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.
© 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.
© 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:
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.
Tiziana Ferrari Quality of Service Support in Packet Networks1 Quality of Service Support in Packet Networks Tiziana Ferrari Italian.
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)
Access Control Lists (ACLs)
© 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. 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.
© 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.
Analysis of QoS Arjuna Mithra Sreenivasan. Objectives Explain the different queuing techniques. Describe factors affecting network voice quality. Analyse.
1 © 2003, Cisco Systems, Inc. All rights reserved. CCNP 1 v3.0 Module 1 Overview of Scalable Internetworks.
© 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.
Providing QoS in IP Networks
1 Lecture 15 Internet resource allocation and QoS Resource Reservation Protocol Integrated Services Differentiated Services.
© 2006 Cisco Systems, Inc. All rights reserved. Implementing Secure Converged Wide Area Networks (ISCW) Module 4: Frame Mode MPLS Implementation.
Instructor Materials Chapter 6: Quality of Service
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.
Module 4: Implement the DiffServ QoS Model
Presentation transcript:

Queuing Mechanisms

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 Lesson Aim <Enter lesson aim here.> Inner Mongolia University

Queuing Overview

Objectives Upon completing this lesson, you will be able to: Understand how queuing works on Cisco routers List the most used queuing mechanisms Lesson Aim <Enter lesson aim here.> Inner Mongolia University

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 Inner Mongolia University

Output Interface Queue Structure Forwarder Software Queuing System Hardware Queue (TxQ) Output Interface Always FIFO Any supported queuing mechanism 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. Inner Mongolia University

Bypassing the Software Queue Empty? Hardware Queue Full? Hardware Queue (TxQ) Yes No No Yes Software Queuing System 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 Inner Mongolia University

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. Inner Mongolia University

Software Queuing System Queuing Components Forwarded Packets Software Queuing System Class 1? Add/Drop Queue 1 Hardware Queuing System Class 2? Interface Add/Drop Queue 2 Scheduler Hardware Q Class n? Add/Drop Queue n 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) Inner Mongolia University

Summary Upon completing this lesson, you should be able to: Understand how queuing works on Cisco routers List the most used queuing mechanisms Inner Mongolia University

Lesson Review Which queuing mechanisms do Cisco routers support? When are software queuing mechanisms not used? How does TxQ length affect the software queuing system? Inner Mongolia University

FIFO Queuing

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 Lesson Aim <Enter lesson aim here.> Inner Mongolia University

FIFO Queuing Forwarded Packets FIFO Queuing System Hardware Queuing System Interface FIFO Scheduler All in one queue Tail-drop Queue 1 Hardware Q Newly arriving packets are dropped if the queue is full. FIFO uses one single queue. All packets are classified into one class. Routers serve packets in the first-come, first-serve fashion. The software FIFO queue is basically an extension of the hardware FIFO queue. Inner Mongolia University

Benefits and Drawbacks of FIFO Queuing 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) Inner Mongolia University

Configuring FIFO Queuing Router(config-if)# no fair-queue 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. Inner Mongolia University

Configuring FIFO Queuing (cont.) Router(config-if)# hold-queue <buffers> out 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). Inner Mongolia University

FIFO Example interface Ethernet0/0 ip address 1.1.1.1 255.0.0.0 ! The Ethernet interface has a default bandwidth of 10Mbps. FIFO is the default queuing mechanism, and it does not need to be configured. interface Ethernet0/0 ip address 1.1.1.1 255.0.0.0 ! interface Serial0/0 ip address 2.2.2.2 255.0.0.0 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. Up to 50 frames are allowed to be enqueued before the router will start tail-dropping newly arriving packets. Inner Mongolia University

Monitoring and Troubleshooting FIFO Router# show interface [<interface>] 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 1.1.1.1/8 MTU 1500 bytes, BW 128 Kbit, DLY 20000 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. Inner Mongolia University

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 Inner Mongolia University

Lesson Review Why is FIFO the fastest queuing mechanism? Describe the classification and scheduling of FIFO queuing. List the drawbacks of FIFO queuing. Inner Mongolia University

Priority Queuing

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 Lesson Aim <Enter lesson aim here.> Inner Mongolia University

Priority Queuing System Forwarded Packets Priority Queuing System High? Tail-drop Queue 1 Hardware Queuing System Medium? Tail-drop Queue 2 Pre-emptive Scheduler Interface Hardware Q Normal? Tail-drop Queue 3 Low? Tail-drop Queue 4 Priority queuing (PQ) uses four FIFO queues. Inner Mongolia University

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 Inner Mongolia University

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 Inner Mongolia University

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). Inner Mongolia University

Scheduling Priority Queuing Packet in HIGH queue? No Packet in MEDIUM queue? Yes No Packet in NORMAL queue? Yes No Packet in LOW queue? Yes No Yes Dispatch packet and start checking the HIGH queue again Hardware Q Inner Mongolia University

Benefits and Drawbacks of Priority Queuing 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 Inner Mongolia University

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 Inner Mongolia University

Priority Queuing Classification Router(config)# priority-list list-number protocol protocol-name {high|medium|normal|low} queue-keyword keyword-value Selects the queue based on Layer-3 protocol Additional classification (queue-keyword): fragment (IP packets with non-zero fragment offset) gt/lt <size>: based on packet size (including L2 frame) list <acl>: ACL classification tcp/udp <port>: TCP or UDP port number System and link-level messages are classified in queue high by default Inner Mongolia University

Priority Queuing Classification (cont.) Router(config)# priority-list list-number interface intf {high|medium|normal|low} Classifies the packet based on incoming interface Router(config)# priority-list list-number default {high|medium|normal|low} Classifies all unclassified packets in a default queue Inner Mongolia University

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 Inner Mongolia University

Sample PQ Configuration WAN Core Core E1 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 20 40 60 80 access-list 101 permit tcp any any eq 23 Branch Office Inner Mongolia University

Monitoring Priority Queuing Router# show interface interface Displays information and statistics about queuing on interface Router# show queueing [priority|custom|fair|random-detect] interface Displays queuing parameters on interface Router# show queue interface Displays queue contents Inner Mongolia University

show interface Router#show interface serial 1/0 Serial1/0 is up, line protocol is up Hardware is M4T Internet address is 20.0.0.1/8 MTU 1500 bytes, BW 19 Kbit, DLY 20000 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 18000 bits/sec, 8 packets/sec 5 minute output rate 7000 bits/sec, 8 packets/sec … rest ignored ... Inner Mongolia University

show queueing priority Router#show queueing priority Current priority queue configuration: List Queue Args 1 high protocol ip list 101 1 medium interface Ethernet6/0 The show queueing priority command displays only the nondefault parameters. Inner Mongolia University

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 Inner Mongolia University

Lesson Review When would you use priority queuing? What are the benefits and drawbacks of priority queuing? How many classes does priority queuing support? How does priority queuing schedule packets? Inner Mongolia University

Weighted Fair Queuing

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 Lesson Aim <Enter lesson aim here.> Inner Mongolia University

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. Inner Mongolia University

Weighted Fair Queuing (cont.) Forwarded Packets Weighted Fair Queuing System Flow 1? WFQ drop Queue 1 Hardware Queuing System Flow 2? WFQ drop Queue 2 WFQ Scheduler Interface Hardware Q Flow N? WFQ drop Queue N WFQ uses per-flow FIFO queues. Inner Mongolia University

Weighted Fair Queuing Implementations Implementation parameters: Queuing platform: central CPU or VIP Classification mechanism Weighted fairness Modified tail drop within each queue Inner Mongolia University

WFQ Classification Packets of the same flow end up in the same queue. IP TCP Payload 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 Src. Addr. Dest. Addr. Protocol ToS Src. Port Dest. Port Hash Algorithm A hash algorithm is used to produce the index of the queue where the packet is enqueued. #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. Inner Mongolia University

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. Inner Mongolia University

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. Congestive Discard Policy as of 11.2(9) cfilsfil>What is the exact criterium for the congestive discard policy? agt> We keep track of the queue with the latest "delivery time" - in the example above, Fred called this (probably more accurately "from the deep sub-queue."). If the aggregate is about to be exceeded, we should either drop the new packet, or an existing. If the new one is for an already active queue, and has a "delivery time" later than the last packet on the deepest queue - the new one is dropped. If the deep queue time is later, we enqueue the new packet, and tail-drop from the deepest one. But - I caution you against getting too detailed in how you interpret and test for this. We have refined (some would say corrected :-) :-) this behaviour over the years. - each queue gets 1/4 of limit - each queue gets whole limit - each queue gets whole limit but aggregate applies - ditto, but drop from deep sub-queue - ditto, but always allow at least one (i.e. special case for non-active queue) - and I'm sure there'll be more. So unless it's really crucial in some particular circumstance, try to verify if you are really dependent on this level of detail. If you can observe undesirable behaviour for the network, or for the end-systems/hosts - let us know (even if WFQ is doing what it's designed to do :-) And beware testing other than on recent versions - where you might see the interim behaviours listed above (or others I have forgotten). Implication When the queue has congestive-discard-threshold (default: 64) messages in it, new messages are not enqueued for the conversations whose weighted depth is greatest. Lower bandwidth conversations (which include control message conversations) still enqueue data. A consequence of this is that the Fair Queue may occasionally have more messages in it than its theoretical maximum. Inner Mongolia University

WFQ Insertion and Drop Policy (cont.) N>HQO? N>CDT? No No Enqueue Packet Nth Packet Yes Yes Worst Finish Time? Worst Finish Time? Yes No No Yes Old Drop the packet with the worst finish time (old) and enqueue the Nth packet (new). Congestive Discard Policy as of 11.2(9) cfilsfil>What is the exact criterium for the congestive discard policy? agt> We keep track of the queue with the latest "delivery time" - in the example above, Fred called this (probably more accurately "from the deep sub-queue."). If the aggregate is about to be exceeded, we should either drop the new packet, or an existing. If the new one is for an already active queue, and has a "delivery time" later than the last packet on the deepest queue - the new one is dropped. If the deep queue time is later, we enqueue the new packet, and tail-drop from the deepest one. But - I caution you against getting too detailed in how you interpret and test for this. We have refined (some would say corrected :-) :-) this behaviour over the years. - each queue gets 1/4 of limit - each queue gets whole limit - each queue gets whole limit but aggregate applies - ditto, but drop from deep sub-queue - ditto, but always allow at least one (i.e. special case for non-active queue) - and I'm sure there'll be more. So unless it's really crucial in some particular circumstance, try to verify if you are really dependent on this level of detail. If you can observe undesirable behaviour for the network, or for the end-systems/hosts - let us know (even if WFQ is doing what it's designed to do :-) And beware testing other than on recent versions - where you might see the interim behaviours listed above (or others I have forgotten). Implication When the queue has congestive-discard-threshold (default: 64) messages in it, new messages are not enqueued for the conversations whose weighted depth is greatest. Lower bandwidth conversations (which include control message conversations) still enqueue data. A consequence of this is that the Fair Queue may occasionally have more messages in it than its theoretical maximum. New 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. Inner Mongolia University

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. Inner Mongolia University

Case Study: Interface Congestion Absolute maximum (HQO=10) exceeded; new packet is the last in the TDM system and is dropped Inner Mongolia University

Case Study: Interface Congestion Absolute maximum exceeded (HQO=10); new packet is not the last in the TDM system, so last packet is dropped Inner Mongolia University

Case Study: Flow Congestion CDT exceeded (CDT=8); new packet would be the last in the TDM system and is dropped Inner Mongolia University

Case Study: Flow Congestion CDT exceeded (CDT=8); new packet would not be the last, and packet is enqueued Inner Mongolia University

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. Congestive Discard Policy as of 11.2(9) cfilsfil>What is the exact criterium for the congestive discard policy? agt> We keep track of the queue with the latest "delivery time" - in the example above, Fred called this (probably more accurately "from the deep sub-queue."). If the aggregate is about to be exceeded, we should either drop the new packet, or an existing. If the new one is for an already active queue, and has a "delivery time" later than the last packet on the deepest queue - the new one is dropped. If the deep queue time is later, we enqueue the new packet, and tail-drop from the deepest one. But - I caution you against getting too detailed in how you interpret and test for this. We have refined (some would say corrected :-) :-) this behaviour over the years. - each queue gets 1/4 of limit - each queue gets whole limit - each queue gets whole limit but aggregate applies - ditto, but drop from deep sub-queue - ditto, but always allow at least one (i.e. special case for non-active queue) - and I'm sure there'll be more. So unless it's really crucial in some particular circumstance, try to verify if you are really dependent on this level of detail. If you can observe undesirable behaviour for the network, or for the end-systems/hosts - let us know (even if WFQ is doing what it's designed to do :-) And beware testing other than on recent versions - where you might see the interim behaviours listed above (or others I have forgotten). Implication When the queue has congestive-discard-threshold (default: 64) messages in it, new messages are not enqueued for the conversations whose weighted depth is greatest. Lower bandwidth conversations (which include control message conversations) still enqueue data. A consequence of this is that the Fair Queue may occasionally have more messages in it than its theoretical maximum. Inner Mongolia University

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 Inner Mongolia University

Fair Queuing Finish Time Calculation If Flow F active, then FT(Pk+1) = FT(Pk) + Size(Pk+1) otherwise FT(P0) = Now + Size(P0) FT(A1)=0+100 FT(B1)=50+300 A1[100] B1[300] FT(A2)=100+20 A2[20] WFQ does NOT schedule packets based on their arrival time (as would do FIFO). WFQ does the following: Packet arrival: 1. classify packet in its conversation queue 2. tag the packet with its finish round number: The Finish round number is computed based on the following parameters: - latest finish round number of the packet’s conversation - packet size Scheduling task: Each time the wire is available, WFQ dequeues the packet with lowest finish round number and sends it on the wire FT(B2)=350+300 FT(A3)=120+10 A3[10] B2[300] T 100 70 60 50 Thus the resulting scheduling is: B2 B1 A3 A2 A1 Inner Mongolia University

Weight in WFQ Scheduling WFQ System (Real-Size Packets) Flow with P=001 2 1 Flow with P=000 3 2 1 Precedence-1 packets appear half the real size. Virtual Packet Size = Real Packet Size / (IP Precedence + 1) WFQ System (Virtual-Size Packets) Flow with P=001 4 3 2 1 Precedence-1 flow gets twice as much bandwidth as Precedence-0 flow. Flow with P=000 3 2 1 Hardware FIFO Queue 3 3 2 2 1 1 Inner Mongolia University

Weighted Fair Queuing Finish Time Calculation The finish time is adjusted based on the IP precedence of the packet. If Flow F Active, Then FT(Pk+1) = FT(Pk) + Size(Pk+1)/(IPPrec+1) Otherwise FT(P0) = Now + Size(P0)/(IPPrec+1) IOS implementation scales the finish time to allow integer arithmetic. WFQ does NOT schedule packets based on their arrival time (as would do FIFO). WFQ does the following: Packet arrival: 1. classify packet in its conversation queue 2. tag the packet with its finish round number: The Finish round number is computed based on the following parameters: - latest finish round number of the packet’s conversation - packet size Scheduling task: Each time the wire is available, WFQ dequeues the packet with lowest finish round number and sends it on the wire If Flow F active, then FT(Pk+1) = FT(Pk) + Size(Pk+1)*4096/(IPPrec+1) otherwise FT(P0) = Now + Size(P0)*4096/(IPPrec+1) RSVP packets and high-priority internal packets (PAK-Priority) have special weights (4 and 128). Inner Mongolia University

IP Precedence to Weight Mapping 4096 1 2048 2 1365 3 1024 4 819 5 682 6 585 7 512 32 (virtual IP Precedence) 128 (PAK-Priority) 1024 (virtual IP Precedence) 4 (RSVP) RSVP packets and high-priority internal packets (PAK-Priority) have special weights (4 and 128). Lower weight makes packets appear smaller (preferred). Inner Mongolia University

Weighted Fair Queuing Voice and Data Integration WAN link speed 128 kbps Voice requirements 30 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) Inner Mongolia University

Benefits and Drawbacks of Weighted Fair Queuing 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 Inner Mongolia University

Weighted Fair Queuing Configuration Router(config-intf)# fair-queue [cdt [dynamic-queues [reservable-queues]]] 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) Inner Mongolia University

Weighted Fair Queuing Configuration (cont.) Router(config-intf)# fair-queue [cdt [dynamic-queues [reservable-queues]]] 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) Inner Mongolia University

Weighted Fair Queuing Additional Parameters Router(config-if)# hold-queue max-limit out 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 Inner Mongolia University

Fair Queuing Defaults Fair queuing is enabled by default on: Physical interfaces whose bandwidth is less than or equal to 2.048 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 Inner Mongolia University

Monitoring and Troubleshooting WFQ Router# show interface interface Displays interface delays, including the activated queuing mechanism with the summary information Router# show queue interface Displays detailed information about the WFQ system of the selected interface Inner Mongolia University

show interface Router#show interface serial 1/0 Hardware is M4T Internet address is 20.0.0.1/8 MTU 1500 bytes, BW 19 Kbit, DLY 20000 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 18000 bits/sec, 8 packets/sec 5 minute output rate 11000 bits/sec, 9 packets/sec … rest deleted ... Inner Mongolia University

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: 193.77.3.244, destination: 20.0.0.2, id: 0x0166, ttl: 254, TOS: 0 prot: 6, source port 23, destination port 11033 Conversation 127, linktype: ip, length: 585 source: 193.77.4.111 destination: 40.0.0.2, id: 0x020D, ttl: 252, TOS: 0 prot: 6, source port 23, destination port 11013 Inner Mongolia University

Queuing Comparison Weighted Fair Queuing Priority Queuing Custom 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 Inner Mongolia University

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 Inner Mongolia University

Lesson Review How does WFQ classify packets? When does WFQ drop packets? How does WFQ schedule packets? Inner Mongolia University

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 Inner Mongolia University

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