Back to Dashboard
Module 41
QoS (Quality of Service) Overview
β Previous Module
Next Module β
# π CCNA 200-301 - Video 41: QoS (Quality of Service) Overview ## Deep Study Notes --- ## π Learning Objectives By the end of this video, you should understand: - What QoS is and why it's needed - QoS models (Best Effort, IntServ, DiffServ) - QoS components (Classification, Marking, Queuing, Shaping, Policing) - QoS tools and mechanisms - QoS on Cisco devices - Network congestion and delay types --- ## π§ Core Concepts ### 1. What is QoS? **Definition:** Quality of Service (QoS) is a set of technologies that manage network resources to ensure predictable and acceptable performance for critical applications by prioritizing certain types of traffic. **Analogy:** Think of QoS like a highway system with different lanes: - **Emergency vehicles (Voice)** get the express lane (highest priority) - **Buses (Video)** get dedicated lanes (high priority) - **Regular cars (Data)** use regular lanes - **Trucks (Background)** use slower lanes - **Traffic police (QoS)** manage and direct traffic to ensure critical vehicles get through ``` βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β WHY QoS IS NEEDED β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€ β β β WITHOUT QoS: β β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β β β β β β β All traffic treated equally: β β β β [Voice] [Data] [Video] [Voice] [Data] [Backup] [Voice] β β β β β β β β Results: β β β β β’ Voice choppy (packet loss, jitter) β β β β β’ Video freezing β β β β β’ Critical applications slow β β β β β’ Network congestion affects everything β β β β β β β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β β β β WITH QoS: β β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β β β β β β β Priority traffic gets preferential treatment: β β β β [Voice][Voice][Video][Data][Backup][Voice][Voice] β β β β βPriority βNext βLowest β β β β β β β β Results: β β β β β’ Voice clear and consistent β β β β β’ Video smooth β β β β β’ Critical apps perform well β β β β β’ Non-critical apps get remaining bandwidth β β β β β β β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β β β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ ``` --- ### 2. Common Network Problems Solved by QoS | Problem | Description | QoS Solution | |---------|-------------|--------------| | **Packet Loss** | Network drops packets during congestion | Prioritization, Queuing | | **Latency** | Delay in packet delivery (milliseconds) | Priority queuing, Low-latency queuing | | **Jitter** | Variation in packet delay | Consistent queuing, Traffic shaping | | **Bandwidth** | Insufficient capacity | Bandwidth allocation, Rate limiting | | **Out-of-Order** | Packets arrive in wrong order | Proper queuing mechanisms | ``` βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β NETWORK PERFORMANCE METRICS β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€ β β β BANDWIDTH: β β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β β β β’ Maximum data transfer rate (Mbps/Gbps) β β β β β’ Limited resource - needs allocation β β β β β’ QoS allocates bandwidth to critical traffic β β β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β β β β LATENCY (Delay): β β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β β β β’ Time for packet to travel from source to destination β β β β β’ Types: β β β β - Propagation delay (distance) β β β β - Serialization delay (putting on wire) β β β β - Queuing delay (waiting in queue) β β β β - Processing delay (router CPU) β β β β β’ Voice requirement: < 150 ms β β β β β’ Video requirement: < 200 ms β β β β β’ Gaming requirement: < 50 ms β β β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β β β β JITTER: β β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β β β β’ Variation in packet delay (difference between min and max) β β β β β’ Voice requirement: < 30 ms β β β β β’ Solved by consistent queuing and priority β β β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β β β β PACKET LOSS: β β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β β β β’ Percentage of packets dropped β β β β β’ Voice requirement: < 1% β β β β β’ Data: can tolerate loss (TCP retransmits) β β β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β β β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ ``` --- ### 3. QoS Models | Model | Description | Complexity | Scalability | |-------|-------------|------------|-------------| | **Best Effort** | No QoS; all traffic treated equally | None | Excellent | | **IntServ (Integrated Services)** | Per-flow reservation (RSVP) | High | Poor | | **DiffServ (Differentiated Services)** | Traffic classes with different priorities | Medium | Excellent | ``` βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β QoS MODELS β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€ β β β BEST EFFORT (No QoS): β β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β β β β β β β All traffic = Same priority β β β β β’ Simple β β β β β’ No guarantees β β β β β’ Suitable for networks with no congestion β β β β β β β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β β β β INTSERV (Integrated Services - RSVP): β β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β β β β β β β Application requests resources: β β β β "I need 64 kbps with <50ms delay for this flow" β β β β β β β β β’ Per-flow reservation β β β β β’ RSVP protocol β β β β β’ End-to-end guarantee β β β β β’ Not scalable for large networks β β β β β β β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β β β β DIFFSERV (Differentiated Services): β β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β β β β β β β Traffic classified into classes: β β β β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β β β β β Voice: Priority 1 (highest) β β β β β β Video: Priority 2 β β β β β β Critical Data: Priority 3 β β β β β β Best Effort: Priority 4 β β β β β β Background: Priority 5 (lowest) β β β β β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β β β β β β β β β’ No per-flow state β β β β β’ Scalable β β β β β’ Most common QoS model β β β β β’ Used in enterprise and service provider networks β β β β β β β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β β β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ ``` --- ### 4. QoS Components ``` βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β QoS COMPONENTS β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€ β β β 1. CLASSIFICATION & MARKING β β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β β β β β β β Classification: Identify traffic type β β β β β’ Based on: IP address, protocol, port, application β β β β β’ ACLs, NBAR (Network Based Application Recognition) β β β β β β β β Marking: Tag traffic for QoS treatment β β β β β’ CoS (Class of Service) - Layer 2 (802.1p) β β β β β’ DSCP (Differentiated Services Code Point) - Layer 3 β β β β β’ IP Precedence - Layer 3 (legacy) β β β β β β β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β β β β 2. QUEUING & DROPPING β β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β β β β β β β Queuing: Manage packets waiting for transmission β β β β β’ FIFO (First-In-First-Out) - default β β β β β’ PQ (Priority Queuing) - strict priority β β β β β’ CQ (Custom Queuing) - bandwidth allocation β β β β β’ WFQ (Weighted Fair Queuing) - flow-based β β β β β’ CBWFQ (Class-Based WFQ) - class-based β β β β β’ LLQ (Low-Latency Queuing) - priority + CBWFQ β β β β β β β β Dropping: Manage congestion β β β β β’ Tail Drop - drop packets when queue full β β β β β’ RED (Random Early Detection) - proactive drop β β β β β’ WRED (Weighted RED) - class-based drop β β β β β β β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β β β β 3. SHAPING & POLICING β β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β β β β β β β Policing: Drop or remark traffic exceeding rate β β β β β’ Rate limiting β β β β β’ Drop excess packets β β β β β’ Applied inbound or outbound β β β β β β β β Shaping: Buffer traffic exceeding rate β β β β β’ Smooth traffic flow β β β β β’ Applied outbound only β β β β β’ Prevents packet loss β β β β β β β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β β β β 4. CONGESTION AVOIDANCE β β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β β β β β β β β’ WRED (Weighted Random Early Detection) β β β β β’ Drop lower-priority packets before queues fill β β β β β’ Prevents TCP global synchronization β β β β β β β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β β β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ ``` --- ### 5. Classification and Marking **Layer 2 Marking - CoS (Class of Service):** | CoS | Priority | Application | DSCP Mapping | |-----|----------|-------------|--------------| | 0 | Best Effort | Default | 0 | | 1 | Background | Bulk data | 8 | | 2 | Spare | Spare | 16 | | 3 | Excellent Effort | Business apps | 24 | | 4 | Controlled Load | Streaming | 32 | | 5 | Voice | Voice, Video | 40 (EF) | | 6 | Network Control | Routing | 48 | | 7 | Network Control | Routing | 56 | **Layer 3 Marking - IP Precedence (3 bits):** | IPP | Name | Application | |-----|------|-------------| | 0 | Routine | Best Effort | | 1 | Priority | Priority | | 2 | Immediate | Immediate | | 3 | Flash | Flash | | 4 | Flash-Override | Flash Override | | 5 | Critical | Voice | | 6 | Internet | Network Control | | 7 | Network | Network Control | **Layer 3 Marking - DSCP (Differentiated Services Code Point):** | DSCP | Binary | Application | |------|--------|-------------| | EF (46) | 101110 | Voice (Expedited Forwarding) | | AF41 (34) | 100010 | Video (Assured Forwarding) | | AF31 (26) | 011010 | High-priority data | | AF21 (18) | 010010 | Medium-priority data | | AF11 (10) | 001010 | Low-priority data | | 0 | 000000 | Best Effort | ``` βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β DSCP AND IP PRECEDENCE β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€ β β β IP Header - ToS (Type of Service) / DSCP Field: β β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β β β 0 1 2 3 4 5 6 7 β β β βββββΌββββΌββββΌββββΌββββΌββββΌββββΌββββ€ β β β β DSCP (6 bits) β ECN (2 bits) β β β β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β β β β DSCP to IP Precedence Mapping: β β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β β β DSCP (bits 0-2) = IP Precedence (3 bits) β β β β Example: DSCP 46 (101110) = IPP 5 (101) β β β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β β β β Common DSCP Values: β β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β β β β’ EF (Expedited Forwarding): 46 - Voice β β β β β’ AF41 (Assured Forwarding): 34 - Video β β β β β’ AF31: 26 - Critical Data β β β β β’ AF21: 18 - Business Data β β β β β’ AF11: 10 - Best Effort β β β β β’ CS0: 0 - Default β β β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β β β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ ``` --- ### 6. QoS Tools and Mechanisms **Marking Configuration:** ```cisco ! Classify traffic using ACL access-list 100 permit tcp any any eq 80 access-list 100 permit tcp any any eq 443 ! Class map class-map match-any WEB-TRAFFIC match access-group 100 ! Policy map with marking policy-map MARK-POLICY class WEB-TRAFFIC set dscp af21 class class-default set dscp default ! Apply to interface interface GigabitEthernet0/0 service-policy input MARK-POLICY ``` **Queuing Configuration (CBWFQ):** ```cisco ! Class maps for different traffic types class-map VOICE match dscp ef class-map VIDEO match dscp af41 class-map DATA match dscp af21 ! Policy map with queuing policy-map QUEUE-POLICY class VOICE priority percent 33 ! Strict priority, 33% bandwidth class VIDEO bandwidth percent 25 ! Guaranteed 25% bandwidth class DATA bandwidth percent 20 ! Guaranteed 20% bandwidth class class-default bandwidth percent 10 ! Remaining bandwidth ! Apply to interface interface GigabitEthernet0/0 service-policy output QUEUE-POLICY ``` --- ### 7. Queuing Mechanisms ``` βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β QUEUING MECHANISMS β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€ β β β FIFO (First-In-First-Out): β β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β β β [Packet1][Packet2][Packet3][Packet4][Packet5] β Transmit β β β β β’ Default on high-speed interfaces β β β β β’ No priority β β β β β’ Simple but no differentiation β β β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β β β β PQ (Priority Queuing): β β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β β β High: [Voice][Voice][Voice] β Transmit first β β β β Medium: [Video][Video] β Transmit when high empty β β β β Normal: [Data][Data] β Transmit when high/medium empty β β β β Low: [Backup][Backup] β Transmit only when all others empty β β β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β β β β CBWFQ (Class-Based Weighted Fair Queuing): β β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β β β β’ Each class gets guaranteed bandwidth β β β β β’ Classes can have different weights β β β β β’ Fair sharing of remaining bandwidth β β β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β β β β LLQ (Low-Latency Queuing): β β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β β β β’ Priority queue + CBWFQ β β β β β’ Priority queue (Voice) always serviced first β β β β β’ Other classes get guaranteed bandwidth β β β β β’ Most common for voice/video deployments β β β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β β β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ ``` --- ### 8. Policing vs. Shaping | Feature | Policing | Shaping | |---------|----------|---------| | **Action** | Drops or remarks excess traffic | Buffers excess traffic | | **Direction** | Inbound or outbound | Outbound only | | **Effect** | Hard rate limit, may drop | Smooth traffic flow | | **Buffer** | No buffer | Uses buffer | | **Delay** | No added delay | Adds delay | | **Best For** | Enforcing strict limits | Smoothing bursty traffic | ``` βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β POLICING vs. SHAPING β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€ β β β POLICING (Drop excess): β β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β β β β β β β Traffic Rate β β β β β² β β β β 1M β ββββ β β β β 800Kβ ββββ β β β β 600Kβ ββββ β β β β 400Kβ ββββ β β β β 200Kβ ββββ β β β β ββββββββββββββββββββββββββββββββββββΊ Time β β β β β β β β β’ Excess packets dropped β β β β β’ No delay β β β β β’ Traffic shaped to line rate β β β β β β β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β β β β SHAPING (Buffer excess): β β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β β β β β β β Traffic Rate β β β β β² β β β β 1M β β β β β 800Kβ ββββ β β β β 600Kβ ββββ β β β β 400Kβ ββββ β β β β 200Kβ ββββ β β β β ββββββββββββββββββββββββββββββββββββΊ Time β β β β β β β β β’ Excess packets buffered β β β β β’ Adds delay β β β β β’ Smooth traffic shape β β β β β β β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β β β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ ``` **Policing Configuration:** ```cisco ! Police traffic to 1 Mbps, burst 8000 bytes policy-map POLICE-POLICY class class-default police 1000000 8000 conform-action transmit exceed-action drop interface GigabitEthernet0/0 service-policy input POLICE-POLICY ``` **Shaping Configuration:** ```cisco ! Shape traffic to 10 Mbps policy-map SHAPE-POLICY class class-default shape average 10000000 interface GigabitEthernet0/0 service-policy output SHAPE-POLICY ``` --- ### 9. QoS Verification Commands | Command | Purpose | |---------|---------| | `show policy-map` | Display policy map configuration | | `show policy-map interface [int]` | Display QoS statistics on interface | | `show class-map` | Display class map configuration | | `show queueing interface [int]` | Display queue statistics | | `show interface [int]` | Display interface statistics (drops) | | `debug policy-map` | Debug QoS policy (use cautiously) | **Example Outputs:** ```cisco Router# show policy-map interface gigabitEthernet 0/0 GigabitEthernet0/0 Service-policy output: QUEUE-POLICY Class-map: VOICE (match-all) 0 packets, 0 bytes 5 minute offered rate 0000 bps, drop rate 0000 bps Match: dscp ef (46) Strict Priority Output Queue: Conversation 264 Bandwidth 33 (%) Bandwidth 33 (kbps) Burst 825 (Bytes) (pkts matched/bytes matched) 0/0 (total drops/bytes drops) 0/0 Class-map: VIDEO (match-all) 0 packets, 0 bytes 5 minute offered rate 0000 bps, drop rate 0000 bps Match: dscp af41 (34) Queueing Output Queue: Conversation 265 Bandwidth 25 (%) Bandwidth 25 (kbps) Max Threshold 64 (packets) (pkts matched/bytes matched) 0/0 (depth/total drops/no-buffer drops) 0/0/0 Class-map: class-default (match-any) 0 packets, 0 bytes 5 minute offered rate 0000 bps, drop rate 0000 bps Match: any Queueing Output Queue: Conversation 266 Bandwidth 10 (%) Bandwidth 10 (kbps) Max Threshold 64 (packets) (pkts matched/bytes matched) 0/0 (depth/total drops/no-buffer drops) 0/0/0 ``` --- ### 10. QoS Best Practices ``` βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β QoS BEST PRACTICES β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€ β β β 1. CLASSIFY TRAFFIC NEAR THE SOURCE β β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β β β β’ Mark traffic as close to the source as possible β β β β β’ Trusted devices can keep markings β β β β β’ Untrusted devices should have markings overwritten β β β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β β β β 2. USE DSCP FOR LAYER 3 MARKING β β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β β β β’ DSCP is the standard for IP networks β β β β β’ Provides 64 classes (vs. 8 for IP precedence) β β β β β’ Backward compatible with IP precedence β β β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β β β β 3. USE LLQ FOR VOICE AND VIDEO β β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β β β β’ Voice requires low latency (LLQ priority queue) β β β β β’ Limit priority queue to 33% of bandwidth β β β β β’ Prevent starvation of other traffic β β β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β β β β 4. CONFIGURE END-TO-END QOS β β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β β β β’ Consistent marking across all devices β β β β β’ Queuing policies on congested interfaces β β β β β’ Policing at network edges β β β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β β β β 5. MONITOR AND ADJUST β β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β β β β’ Monitor drop rates β β β β β’ Adjust bandwidth allocations β β β β β’ Review QoS effectiveness regularly β β β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β β β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ ``` --- ## π§ Complete Configuration Examples ### Lab 1: Basic QoS Marking ```cisco ! Classify voice traffic class-map VOICE match dscp ef ! Classify video traffic class-map VIDEO match dscp af41 ! Classify critical data class-map CRITICAL match dscp af31 ! Policy to mark traffic policy-map MARKING class VOICE set dscp ef class VIDEO set dscp af41 class CRITICAL set dscp af31 class class-default set dscp default ! Apply marking on trusted interface interface GigabitEthernet0/0 service-policy input MARKING ``` --- ### Lab 2: LLQ with CBWFQ ```cisco ! Class maps class-map VOICE match dscp ef class-map VIDEO match dscp af41 class-map DATA match dscp af31 ! Policy with LLQ and CBWFQ policy-map WAN-QOS class VOICE priority percent 30 ! Strict priority (voice) class VIDEO bandwidth percent 25 ! Guaranteed bandwidth (video) class DATA bandwidth percent 20 ! Guaranteed bandwidth (critical data) class class-default bandwidth percent 5 ! Best effort fair-queue ! Fair queuing within default class ! Apply to WAN interface interface Serial0/0/0 service-policy output WAN-QOS ``` --- ### Lab 3: Traffic Shaping ```cisco ! Shape traffic to 10 Mbps on WAN link policy-map SHAPE-WAN class class-default shape average 10000000 service-policy WAN-QOS ! Apply child policy inside shape interface Serial0/0/0 service-policy output SHAPE-WAN ``` --- ## β Exam Tips (For CCNA 200-301) | Topic | What Cisco Tests | |-------|------------------| | **QoS Models** | Best Effort, IntServ (RSVP), DiffServ | | **QoS Components** | Classification, Marking, Queuing, Shaping, Policing | | **DSCP Values** | EF (46), AF41 (34), AF31 (26), AF21 (18), AF11 (10) | | **LLQ** | Priority queue + CBWFQ, used for voice/video | | **Policing vs. Shaping** | Policing (drops), Shaping (buffers) | | **WRED** | Prevents TCP global synchronization | ### Common Exam Scenarios: **Scenario 1:** "Voice traffic requires low latency and jitter. Which queuing mechanism should be used?" - **Answer:** LLQ (Low-Latency Queuing) with priority queue **Scenario 2:** "A WAN link needs to limit traffic to 10 Mbps to match service provider commit rate. Which QoS tool should be used?" - **Answer:** Shaping (buffers excess traffic) **Scenario 3:** "Which QoS marking uses 6 bits in the IP header?" - **Answer:** DSCP (Differentiated Services Code Point) ### Mnemonics: **QoS Models:** **"B.I.D." - Best Effort, IntServ, DiffServ** - **B**est Effort: No QoS - **I**ntServ: Per-flow (RSVP) - **D**iffServ: Class-based **DSCP Values:** **"E for Voice, A for Video"** - **E**F: 46 - Voice - **A**F41: 34 - Video - **A**F31: 26 - Critical Data --- ## π Summary (1-Minute Revision) ``` QoS (Quality of Service): QoS MODELS: βββ Best Effort: No QoS βββ IntServ: RSVP, per-flow βββ DiffServ: Class-based (most common) QoS COMPONENTS: βββ Classification: Identify traffic (ACL, NBAR) βββ Marking: Tag traffic (CoS, DSCP) βββ Queuing: Manage queues (FIFO, PQ, CBWFQ, LLQ) βββ Shaping: Buffer excess traffic βββ Policing: Drop excess traffic βββ Congestion Avoidance: WRED DSCP VALUES: βββ EF (46): Voice βββ AF41 (34): Video βββ AF31 (26): High-priority data βββ AF21 (18): Medium-priority data βββ AF11 (10): Low-priority data βββ 0: Best Effort QUEUING MECHANISMS: βββ FIFO: First-in-first-out βββ PQ: Strict priority βββ CBWFQ: Guaranteed bandwidth per class βββ LLQ: Priority + CBWFQ (best for voice/video) POLICING vs. SHAPING: βββ Policing: Drops excess, inbound/outbound βββ Shaping: Buffers excess, outbound only VERIFICATION: βββ show policy-map interface βββ show class-map βββ show queueing interface ``` --- ## π§ͺ Practice Questions **1. Which QoS model uses RSVP for per-flow reservations?** - A) Best Effort - B) IntServ - C) DiffServ - D) MPLS QoS <details> <summary>Answer</summary> <b>B) IntServ</b> - Integrated Services uses RSVP for per-flow resource reservations. </details> **2. What is the DSCP value for Expedited Forwarding (voice)?** - A) 34 - B) 26 - C) 46 - D) 18 <details> <summary>Answer</summary> <b>C) 46</b> - EF (Expedited Forwarding) is DSCP 46. </details> **3. Which queuing mechanism provides a strict priority queue for low-latency traffic?** - A) FIFO - B) CBWFQ - C) LLQ - D) WFQ <details> <summary>Answer</summary> <b>C) LLQ</b> - Low-Latency Queuing provides a strict priority queue. </details> **4. What is the difference between policing and shaping?** - A) Policing buffers, shaping drops - B) Policing drops, shaping buffers - C) Both drop excess traffic - D) Both buffer excess traffic <details> <summary>Answer</summary> <b>B) Policing drops, shaping buffers</b> - Policing drops excess traffic, shaping buffers it. </details> **5. Which QoS marking is used at Layer 2?** - A) DSCP - B) IP Precedence - C) CoS - D) MPLS EXP <details> <summary>Answer</summary> <b>C) CoS</b> - Class of Service (802.1p) is used for Layer 2 marking. </details> **6. What is the purpose of WRED?** - A) Increase bandwidth - B) Prevent TCP global synchronization - C) Prioritize voice traffic - D) Shape traffic <details> <summary>Answer</summary> <b>B) Prevent TCP global synchronization</b> - WRED drops packets randomly to prevent multiple TCP flows from slowing simultaneously. </details> **7. Which QoS tool is typically applied on WAN interfaces to match service provider CIR?** - A) Policing - B) Shaping - C) Marking - D) Queuing <details> <summary>Answer</summary> <b>B) Shaping</b> - Shaping buffers excess traffic to match the CIR (Committed Information Rate). </details> **8. What is the DSCP value for AF41 (video)?** - A) 46 - B) 34 - C) 26 - D) 18 <details> <summary>Answer</summary> <b>B) 34</b> - AF41 (Assured Forwarding Class 4, Low Drop) is DSCP 34. </details> **9. Which command displays QoS statistics on an interface?** - A) `show qos` - B) `show policy-map interface` - C) `show interface qos` - D) `show queue` <details> <summary>Answer</summary> <b>B) `show policy-map interface`</b> - Displays QoS policy statistics on the interface. </details> **10. What is the recommended maximum percentage for priority queue in LLQ?** - A) 10% - B) 25% - C) 33% - D) 50% <details> <summary>Answer</summary> <b>C) 33%</b> - Priority queue should not exceed 33% to prevent starvation of other traffic. </details> **11. Which QoS mechanism adds delay to traffic to smooth bursts?** - A) Policing - B) Marking - C) Shaping - D) Classification <details> <summary>Answer</summary> <b>C) Shaping</b> - Shaping buffers traffic, adding delay to smooth out bursts. </details> **12. What is the maximum latency requirement for voice traffic?** - A) 50 ms - B) 100 ms - C) 150 ms - D) 200 ms <details> <summary>Answer</summary> <b>C) 150 ms</b> - Voice traffic requires less than 150 ms one-way latency. </details> --- ## π Next Steps After completing Video 41, you should be ready for: - **Video 42:** Queuing Mechanisms (Deep Dive) - **Video 43:** Congestion Avoidance (WRED, RED) **Lab Practice:** 1. Configure classification and marking 2. Configure LLQ for voice and video 3. Configure traffic shaping on WAN link 4. Verify with `show policy-map interface` 5. Test different traffic types 6. Monitor drop rates and queue depths --- **Ready for Video 42?** Share the link or say "next" and I'll continue with Queuing Mechanisms (Deep Dive). I'll continue with **Video 42: Queuing Mechanisms (Deep Dive)** based on the standard CCNA 200-301 curriculum. ---