↪️
ccie.nyquist.eu
  • Table of Contents
  • Layer 2 Technologies
    • Ethernet Switching
      • L2 Switch Operations
      • Spanning Tree
        • 802.1d – STP
        • 802.1w – RSTP
        • 802.1s – MSTP
      • VTP 101
      • Private VLANs
      • VLANs
      • EtherChannel 101
    • Layer 2 WAN Protocols
      • HDLC
        • HDLC 101
      • PPP
        • PPP 101
        • PPP Authentication - PAP
        • PPP Authentication – CHAP
        • PPP Authentication – EAP
        • PPP Multilink
        • PPPoFR – PPP over Frame Relay
        • PPPoE – PPP over Ethernet
      • Frame Relay
        • Frame Relay 101
        • Frame Relay 102
        • Frame Relay Encapsulations – IETF vs Cisco
        • Multilink Frame Relay
        • Frame Relay Switching
        • Routing over Frame Relay
      • Bridging
        • Bridging on a router
        • MTU 101
    • Wireless
      • Wireless Principles
      • Wireless Implementations
      • Wireless Roaming
      • Wireless Authentication
        • WPA2 PSK
        • WPA2 802.1X
  • IPv4
    • IPv4 Addressing
      • Backup Interfaces
      • FHRP 101
      • DHCP 101
      • DNS 101
      • ARP 101
      • IPv4 101
      • Tunnel Interfaces
        • GRE Tunnels
      • BFD – Bidirectional Forwarding Detection
    • IPv4 Routing
      • How the routing table is built
        • How CEF works
        • Routing Order of Operations
        • NSF – Non Stop Forwarding
      • RIP
        • RIP 101
      • EIGRP
        • EIGRP 101
        • EIGRP Metric
        • More EIGRP Features
      • OSPF
        • OSPF 101
        • OSPF Areas
        • OSPF LSAs
        • OSPF Mechanics
      • IS-IS
        • IS-IS 101
        • IS-IS Mechanics – CLNP
      • BGP
        • BGP 101
        • BGP Attributes
        • More BGP
      • Route Redistribution
      • Policy based Routing
      • PfR 101 – Perfromance Routing
      • ODR
  • IPv6
    • IPv6-101
    • IPv6 Routing
    • Interconnecting IPv6 and IPv4
  • MPLS
    • MPLS 101
    • MPLS L3 VPN
  • Multicast
    • Multicast 101
    • PIM 101
    • IGMP 101
    • Inter Domain Multicast
    • IPv6 Multicast
    • Multicast features on switches
  • Security
    • NAT 101
    • NAT for Overlapping Networks
    • ACLs 101
    • ACLs 102
    • Cisco IOS Firewall
    • Zone Based Firewall
    • AAA 101
    • Controlling CLI Access
    • Control Plane
    • Switch Security
      • Switchport Traffic Control
      • Switchport Port Security
      • DHCP Snooping and DAI
      • 802.1x
      • Switch ACLs
    • IPSec VPN 101
      • IKE / ISAKMP 101
      • IPSEC Crypto Maps 101
      • IPSEC VTI 101
      • DMVPN 101
    • EAP 101
  • Network Services
    • NTP 101
    • HTTP 101
    • File Transfer 101 – TFTP & FTP
    • WCCP 101
  • QoS
    • QoS 101
    • Classification and Marking
    • Congestion Management
      • Legacy Congestion Management
      • SPD – Selective Packet Discard
      • CBWFQ
      • IP RTP Priority
    • Congestion Avoidance – WRED
    • Policing and Shaping
      • CAR 101
    • Compression and LFI
      • Header and Payload Compression
      • LFI for MultiLink PPP
    • Frame Relay QoS
      • Per VC Frame Relay QoS
    • RSVP 101
    • Switching QoS
  • Network Optimization
    • NetFlow 101 – TNF – Traditional NetFlow
    • NetFlow 102 – FNF – Flexible NetFlow
    • IP SLA 101
    • IP Accounting 101
    • Logging 101
    • SNMP and RMON 101
    • Cisco CLI Tips and Tricks
    • AutoInstall
    • Enhanced Object Tracking
    • Troubleshooting 101
    • SPAN, RSPAN, ERSPAN
  • Network Architecture
    • Hierarchical Network Architecture
    • SD Access
    • SD WAN
Powered by GitBook
On this page
  • Classification
  • Defining a CBWFQ Policy
  • Low Latency Queuing (LLQ)
  • Enabling CBWFQ on an interface

Was this helpful?

  1. QoS
  2. Congestion Management

CBWFQ

PreviousSPD – Selective Packet DiscardNextIP RTP Priority

Last updated 3 years ago

Was this helpful?

Class Based WFQ is configured using MQC. With CBWFQ, you use the same idea of , only this time, instead of using the IP_Priority to assign a weight for each flow, like in , you can classify traffic on different criteria and then assign a weight for each class. Class weight is derived from the bandwidth that is configured in the policy.

Classification

See .

Defining a CBWFQ Policy

R(config)# policy-map CBWFQ-POLICY
! Up to 64 classes can be used in a CBWFQ Policy:
R(config-pmap)# class CLASS
R(config-pmap-c)# bandwidth {KBPS | [remaining] percent PERCENT} 
! In a single policy you can use only values in kbps or only values in percent, not both

The bandwidth can be expressed as an absolute value in kbps, or as a percentage of the interface bandwidth or of the available remaining bandwidth. By default, only 75% of the interface bandwidth can be assigned. The remaining 25% is used by the router for L2 overhead, routing traffic and best-effort traffic (class-default). This limit can be changed per interface, using:

R(config-if)# max-reserved-bandwidth PERCENT

The value used for bandwidth can be found using:

R# show interface INTERFACE | i BW
  MTU 1500 bytes, BW 10000 Kbit, DLY 1000 usec,

And can be changed with the interface command:

R(config-if)# bandwidth KBPS

Remember there is a “default-class” that matches all the previously unmatched traffic. The bandwidth for this traffic is taken from the remaining 25% of reserved bandwidth, or whatever is left after the max-reserved-bandwidth is set.

The “default-class” uses FIFO queuing. However, this can be changed to Fair Queuing with the command:

R(config-pmap-c)# fair-queue

You can also configure the queue length for each class, using:

R(config-pmap-c)# queue-limit LENGTH

Once the queue-limit was reached, packets are dropped. You can use RED to prevent tail-drop.

Low Latency Queuing (LLQ)

LLQ brings the feature of a strict priority queue to CBWFQ. The strict priority queue will always be serviced first. You can have more than one classes defined as priority classes, but they will all be assigned to the same priority queue. The other classes will be serviced in a normal CBWFQ fashion. In the event of congestion, policing is used, so that the priority queue will not use more than the bandwidth that was allocated. To define the priority queue, use:

R(config-pmap-c)# priority {KBPS | percent PERCENT} [BURST]
! The value used for bandwidth must include the L2 overhead

In a class that was configured with the priority command, you can’t use the bandwidth or queue-limit commands. Furthermore, when using LLQ inside a policy, the other classes can only set bandwidth as relative remaining percent. The default setting for Burst size is used to handle voice-like non-bursty traffic, but this can be changed, by setting BURST size.

LLQ is not compatible with WRED, but can work together with IP RTP Priority, which takes precedence.

Enabling CBWFQ on an interface

You enable CBWFQ on an interface by specifying a service-policy where at least one class uses the bandwidth or the priority command. Not every command is available in a policy that sets CBWFQ as the queueing mechanism. Also, these policies can only be applied in the outgoing direction. To configure CBWFQ, use:

R(config-if)# service-policy output CBWFQ-POLICY

You can only enable CBWFQ on interfaces with default Queuing. This means FIFO (high speed interfaces) or WFQ (serial interfaces with speeds lower than E1 – 2048kbps). To verify the configuration, use:

R#show interface INTERFACE | b Queue
  Queueing strategy: Class-based queueing
  Output queue: 0/1000/64/0 (size/max total/threshold/drops)
     Conversations  0/1/256 (active/max active/max total)
     Reserved Conversations 2/2 (allocated/max allocated)
     Available Bandwidth 7116 kilobits/sec
! Same result as:
R# show queue INTERFACE
! or
R# show queuing interface INTERFACE

The interfaces configured for CBWFQ will also appear in the output of:

R# show queueing fair
Current fair queue configuration:

Interface           Discard    Dynamic  Reserved  Link    Priority
threshold  queues   queues    queues  queues
FastEthernet0/0     64         256      256       8       1
Serial1/0           64         256      0         8       1
Serial1/1           64         256      0         8       1

A more useful command is probably:

R1#sh policy-map interface f0/0
 FastEthernet0/0

  Service-policy output: CBWFQ-PERCENT

    Class-map: HTTP (match-all)
      0 packets, 0 bytes
      5 minute offered rate 0 bps, drop rate 0 bps
      Match: access-group 101
      Queueing
        Output Queue: Conversation 265
        Bandwidth 20 (%)
        Bandwidth 2000 (kbps)Max Threshold 64 (packets)
        (pkts matched/bytes matched) 0/0
        (depth/total drops/no-buffer drops) 0/0/0

    Class-map: SSH (match-all)
      0 packets, 0 bytes
      5 minute offered rate 0 bps, drop rate 0 bps
      Match: access-group 102
      Queueing
        Output Queue: Conversation 266
        Bandwidth 30 (%)
        Bandwidth 3000 (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)
      184 packets, 18839 bytes
      5 minute offered rate 0 bps, drop rate 0 bps
      Match: any
Weighted Fair Queueing
Flow-Based WFQ
Classification using MQC