Layer 3 Switching Software and Feature Configuration Guide, 12.1(10)EY
Configuring QoS Scheduling and PBR

Table of Contents

Configuring QoS Scheduling and PBR
About Scheduling and Weighted Round-Robin
Configuring Precedence to WRR Scheduling
Policy-Based Routing

Configuring QoS Scheduling and PBR


This chapter describes the quality of service (QoS) and Policy-based routing (PBR) features built into your switch router, and how to map QoS scheduling at both the system and interface levels. Unless otherwise noted, the information in this chapter applies to the Catalyst 8540 CSR, Catalyst 8510 CSR, and Catalyst 8540 MSR with Layer 3 functionality. For further information about the commands used in this chapter, refer to the command reference publications in the Cisco IOS documentation set and to the ATM and Layer 3 Switch Router Command Reference.

This chapter includes the following sections:

For more information on Quality of Service, refer to the "IP QoS" chapter in the ATM Switch Router Configuration Guide.

Extensive core Quality of Service (QoS) mechanisms are built into the switch router architecture to ensure policy enforcement and queuing of the ingress port, as well as weighted round-robin (WRR) scheduling at the egress port.

Layer 3 switching QoS is based on IP precedence for partitioning traffic into multiple classes of service. IP precedence uses the three type-of-service precedence bits in the IP header to specify class of service assignment for each packet.

IP precedence can be mapped into adjacent technologies (for example, tag switching or ATM) to deliver end-to-end network QoS policies. This enables service classes to be established with no changes to existing applications and with no complicated network signaling requirements.

The system gathers IP precedence information from the IP header type-of-service field. For an incoming IP packet, the first two (most significant) bits of the service type field determine the delay priority. Layer 3 switching recognizes four QoS classes, Q-0 to Q-3, as summarized in Table 11-1.

Table 11-1   QoS Delay Priorities and Queues

IP Precedence Bits Delay Priority Queue Selected

0 0 0

0 0

Q-0

0 0 1

0 0

Q-0

0 1 0

0 1

Q-1

0 1 1

0 1

Q-1

1 0 0

1 0

Q-2

1 0 1

1 0

Q-2

1 1 0

1 1

Q-3

1 1 1

1 1

Q-3

Your switch router can read the precedence field and switch the packet accordingly, but it cannot reclassify traffic. The edge router or switch is expected to set the precedence field according to its local policy.

The switch router queues packets based on the delay priority and the target next-hop interface.

About Scheduling and Weighted Round-Robin

Frame scheduling becomes increasingly important when an outgoing interface is congested. To handle this situation, network administrators can assign weights to each of the different queues. This provides bandwidth to higher priority applications (using IP precedence), yet still fairly grants access to lower priority queues. The frame schedule affords each queue the bandwidth allotted to it by the network administrator. This mapping is configurable both at the system and interface levels (as described later in this chapter).

The four queues between any pair of interfaces are configured to be part of the same service class. Bandwidth is not explicitly reserved for these four queues. Each of them is assigned a different WRR-scheduling weight, which determines the way they share the interface bandwidth. The WRR weight is user configurable; you can assign a different WRR weight for each queue.


Tip The higher the WRR weight, the higher the effective bandwidth for that particular queue.

You can find the effective bandwidth (in Mbps) for a particular queue with the following formula:

(W/S) x B = n Mbps,

where

W = WRR weight of the specified queue
S = sum of the weight of all active queues on the outgoing interface
B = available bandwidth in Mbps
n = effective bandwidth in Mbps

For example, if W is 4, S is 15, and B is 100, the formula would be (4/15) x 100 = 26 Mbps, and the effective bandwidth for the specified queue in this example is 26 Mbps.

Configuring Precedence to WRR Scheduling

This section describes the Cisco IOS commands necessary to configure QoS mapping at the system and interface levels. The commands described in this section are unique to the Layer 3 switching software.

Layer 3 switching software enables QoS-based forwarding by default. If disabled, issue the following command to enable QoS switching:

Router(config)# [no] qos switching

The no version of this command disables QoS switching on the entire system.

To configure QoS scheduling at the system level, use the following command:

Command Purpose

Router(config)# qos mapping precedence value wrr-weight weight

Sets the mapping between IP precedence and the WRR weight.

To set the precedence back to the default setting for the switch router, use the no version of the qos mapping precedence command.

Table 11-2 shows the default WRR weights for IP precedence.

Table 11-2   IP Precedence and Default WRR Weights

IP Precedence WRR Weight

0

1

1

2

2

4

3

8

For a complete description of the qos mapping precedence command, see the ATM and Layer 3 Switch Router Command Reference.

Mapping QoS Scheduling at the Interface Level

Configuring the QoS mapping at the interface level overrides the system-level mapping. Using the qos mapping precedence wrr-weight command, the network administrator can assign different WRR-scheduling weights for a particular precedence traffic between a pair of interfaces.

To configure QoS scheduling at the interface level, use the following command:

Command Purpose

Router(config)# qos mapping [source source-interface] [destination dest-interface] precedence value wrr-weight weight

Assigns different WRR-scheduling weights for a particular precedence traffic between a pair of interfaces.

The QoS commands are applicable to both Gigabit Ethernet and Fast Ethernet interfaces.

To set the precedence back to the system-level default setting for the switch router, use the no version of the qos mapping precedence wrr-weight command.

Both the source and destination interface parameters are optional. When both are not specified, the system-level QoS mapping is configured. Otherwise, you can specify the source interface, or the destination interface, or both to configure the WRR weight for the traffic streams listed below.

The configuration takes precedence in the following order:

1. Traffic streams with a certain precedence, from a particular source interface to a particular destination interface

2. Traffic streams with a certain precedence to a particular destination interface

3. Traffic streams with a certain precedence from a particular source interface

Verifying the QoS Configuration

To verify the QoS configuration, use the following commands:

Command Purpose

show qos switching

Displays whether QoS-based switching is enabled.

show qos mapping [source source-interface] [destination dest-interface]

Displays effective mapping at either the system level or interface-pair level.

Policy-Based Routing

Policy-based routing (PBR) allows you to do the following:

  • Classify traffic based on extended access list criteria.
  • Set IP Precedence bits.
  • Route specific traffic to engineered paths, which may be required to allow a specific QoS service through the network.

Classification of traffic through PBR is based on standard or named Access Control Lists (ACLs) and IP packet length. Some possible applications for policy routing are to provide equal access, protocol-sensitive routing, source-sensitive routing, routing based on interactive versus batch traffic, or routing based on dedicated links.

For more information on policy-based routing, including configuration examples, refer to the Cisco IOS Quality of Service Solutions Configuration Guide, Release 12.1.

For more information on Quality of Service, refer to the "IP QoS" chapter in the ATM Switch Router Configuration Guide.

Policy-Based Routing Restrictions

The following restrictions apply to policy-based routing (PBR) on the Catalyst 8540 MSR and the Catalyst 8540 CSR:

  • PBR is supported only on the Enhanced Gigabit interface.
  • The IP interface for egress must be supported by the Catalyst 8540 MSR and the Catalyst 8540 CSR.
  • Fast-switched PBR cannot be enabled because the Catalyst 8540 is a line rate switch.
  • When configuring IP QoS to rewrite precedence and PBR to rely on precedence set by an ACL, the classification for PBR uses the original packet precedence, not the rewritten IP QoS value.
  • Changes in the TCAM space for a PBR region must be specified with the sdm policy size command. The changes take effect upon reboot. The default PBR TCAM size is 0.
  • The following commands are supported:
    • match ip address {access-list-number | name} [...access-list-number | name]
    • match length min max

Note    The IP packet length range supported in a route map is 0-1535. A maximum of three non-overlapping length ranges are allowed per interface, including sub-interfaces.

  • The following set command options are supported for PBR:
    • ip precedence
    • ip next-hop
    • interface
    • interface null0.

Note    Due to platform limitations, the set interface null0 command does not generate an "unreachable" message.

  • The following commands are not supported:
    • set ip default next-hop
    • set ip default interface
  • When you configure a policy to rewrite precedence with a next hop interface, the precedence is rewritten only when the packet flows via the supported PBR path. If the next-hop is not accessible, the original precedence is retained since the packet flows via DBR (destination based routing). Figure 11-1 illustrates the supported PBR path for IP packet flow on the Catalyst 8540 MSR and the Catalyst 8540 CSR.

Figure 11-1   IP Packet Flow for PBR