Consolidated Guide to PAN-OS Quality of Service (QoS)

What is Quality of Service (QoS)?

Quality of Service (QoS) on Palo Alto Networks firewalls allows administrators to manage network bandwidth and prioritize critical applications during periods of congestion. By classifying traffic and assigning different levels of service (bandwidth guarantees, priority), QoS ensures that essential applications receive the necessary resources, while less critical traffic can be rate-limited or handled on a best-effort basis.

The primary goal is to improve the performance and reliability of key applications by controlling how bandwidth is allocated on egress interfaces .

Note: PAN-OS QoS is primarily applied on egress to control traffic *leaving* an interface. While QoS Policy rules can match ingress traffic, the actual queuing and bandwidth management occur on the egress interface.

Core QoS Components in PAN-OS

PAN-OS QoS relies on several interconnected components working together:

  1. QoS Interface Settings: Configured directly on the physical or aggregate egress interface. This is where you define the total available egress bandwidth and allocate guaranteed/maximum bandwidth to each of the 8 QoS classes.
  2. QoS Classes: There are 8 predefined, fixed classes ( class 1 to class 8 ). These represent distinct priority queues. Class 1 has the highest priority, and Class 8 has the lowest (best-effort).
  3. QoS Profile: An object that primarily maps traffic to a specific QoS Class (1-8) . Optionally, it can also define DSCP/ToS remarking actions.
  4. QoS Policy Rule: Similar to a Security Policy rule, it matches traffic based on criteria (zone, address, user, application, service, DSCP). Instead of Allow/Deny, its action is to apply a specific QoS Profile to the matched traffic.

Fundamental Order: You MUST configure QoS on the egress interface (defining total bandwidth and class bandwidths) *before* QoS Policy rules referencing that interface can effectively manage traffic.

1. QoS Interface Settings & Bandwidth Management

Enabling QoS and Defining Bandwidth

QoS functionality is enabled and configured on a per-interface basis, typically the external-facing or congested egress interface.

Allocating Bandwidth to Classes

Once QoS is enabled on an interface, you allocate bandwidth to the 8 fixed classes:

Example: On a 100 Mbps interface, you might guarantee 20 Mbps for Class 2 (VoIP) and set its maximum to 30 Mbps. You might guarantee 5 Mbps for Class 6 (Bulk Transfers) and set its maximum to 50 Mbps.

2. QoS Classes & Priority Queuing

The 8 Fixed Classes

PAN-OS uses 8 fixed priority queues (Classes 1-8). You cannot add or remove classes.

Strict Priority Queuing

PAN-OS employs a Strict Priority Queuing mechanism for Classes 1 through 7. This means:

Implication: If higher-priority classes consistently consume all available bandwidth up to their maximums, lower-priority classes might experience packet loss or significant delays, even if they have guaranteed bandwidth configured (as the guarantee only applies during congestion when higher classes aren't demanding *all* the bandwidth).

3. QoS Profile

Mapping Traffic to a Class

A QoS Profile object is simple but essential. Its primary function is to link traffic identified by a QoS Policy rule to one of the 8 QoS classes.

Optional: DSCP/ToS Remarking

QoS Profiles can optionally be used to modify the Differentiated Services Code Point (DSCP) or Type of Service (ToS) value in the IP header of packets matching the associated QoS Policy rule.

4. QoS Policy Rule

Matching Traffic for QoS Treatment

QoS Policy rules determine *which* traffic sessions receive specific QoS treatment.

Interaction with Security Policy: QoS Policy evaluation occurs *after* a session has been allowed by Security Policy. You only apply QoS to traffic that is permitted to pass through the firewall.

How QoS Components Work Together (Workflow)

  1. Interface Configuration: Administrator enables QoS on the egress interface (e.g., ethernet1/1 ), defines its total Egress Max bandwidth, and allocates Guaranteed and Maximum bandwidth limits for each of the 8 QoS classes.
  2. Profile Creation: Administrator creates QoS Profile objects (e.g., Profile-VoIP maps to Class 2 , Profile-Web maps to Class 4 , Profile-Bulk maps to Class 6 ).
  3. Policy Creation: Administrator creates QoS Policy rules.
    • Rule 1: Matches VoIP application traffic, applies Profile-VoIP .
    • Rule 2: Matches web-browsing application traffic, applies Profile-Web .
    • Rule 3: Matches file-transfer application traffic, applies Profile-Bulk .
    • (Default): Traffic not matching Rules 1-3 uses the interface's default profile (e.g., mapping to Class 4 ).
  4. Traffic Processing:
    • A packet arrives at the firewall.
    • Security Policy allows the packet.
    • QoS Policy lookup occurs (top-down). A matching rule is found (e.g., Rule 1 for a VoIP packet).
    • The associated QoS Profile ( Profile-VoIP ) is applied, marking the packet internally for Class 2 treatment.
    • If the profile includes DSCP remarking, the IP header is modified.
    • As the packet prepares to leave the egress interface ( ethernet1/1 ), it's placed into the queue for Class 2 .
    • The interface's QoS scheduler dequeues packets based on strict priority (Class 1 first, then Class 2, etc.), respecting the configured guaranteed/maximum bandwidth limits for each class during periods of congestion.
flowchart TD
    A[Packet Ingress] --> B[Security Policy Lookup]
    B -- Allowed --> C[QoS Policy Lookup]
    C -- Match Rule --> D[Apply QoS Profile]
    D --> E[Assign QoS Class e.g., Class 2]
    E --> F[Optional: Remark DSCP]
    F --> G[Place in Egress Queue for assigned Class]
    subgraph "Egress Interface (e.g., eth1/1)"
        direction TB
        G --> H[QoS Scheduler]
        subgraph Queues
            direction TB
            Q1[Class 1 Queue]
            Q2[Class 2 Queue]
            Q3[...]
            Q8[Class 8 Queue]
        end
        H --> Q1
        H --> Q2
        H --> Q3
        H --> Q8
        style H fill:#f9f,stroke:#333,stroke-width:2px
    end
    H --> I[Transmit Packet]
    B -- Denied --> J[Drop/Reject]
    C -- No Match --> K[Apply Interface Default QoS Profile/Class]
    K --> E

    linkStyle 10 stroke:#f00,stroke-width:2px,color:red

    
Simplified QoS processing flow.

PCNSE Exam Relevance

Understanding QoS is important for the PCNSE exam. Key areas include:

References