This document describes how to apply class-based weighted fair queueing (CBWFQ) and other Cisco IOS® Software-based Quality of Service (QoS) features on an Ethernet subinterface. An Ethernet subinterface is a logical interface in Cisco IOS. You can use the modular QoS command-line interface (CLI) (MQC) to create and apply a service policy to an Ethernet subinterface.
There are no specific requirements for this document.
The information in this document is based on these software and hardware versions:
Cisco IOS Software 12.2(2)T
Cisco 2620 router with a Fast Ethernet network module
The information presented in this document was created from devices in a specific lab environment. All of the devices used in this document started with a cleared (default) configuration. If you are working in a live network, ensure that you understand the potential impact of any command before using it.
For more information on document conventions, refer to Cisco Technical Tips Conventions.
In general, choosing where to apply a policy depends on the QoS features that your policy is activating. An Ethernet subinterface supports the following:
Class-based policing - If you apply a policy with the police command to both the interface and the subinterface, only the subinterface policer is active for the traffic that matches the class. Refer to Traffic Policing for more information.
Class-based marking—refer to Classification Overview for more information.
Class-based shaping—refer to Configuring Class-Based Shaping for more information.
Class-based queueing—Queueing is a special case for Ethernet subinterfaces. See the remainder of this section for more information.
A router begins to queue packets when the number of packets that needs to be transmitted out an interface exceeds the output rate of that interface. The excess packets are then queued. A queueing method can be applied to packets waiting to be transmitted.
Cisco IOS logical interfaces do not inherently support a state of congestion and do not support the direct application of a service policy that applies a queueing method. Instead, you first need to apply shaping to the subinterface using either generic traffic shaping (GTS) or class-based shaping. Refer to Policing and Shaping for more information.
The router prints this log message when an Ethernet subinterface is configured with a service policy that applies queueing without shaping:
router(config)# interface ethernet0/0.1 router(config-subif)# service-policy output test CBWFQ : Not supported on subinterfaces
Note that the same rule applies to a Gigabit Ethernet subinterface.
c7400(config)# interface gig0/0.1 c7400(config-subif)# service-policy ou c7400(config-subif)# service-policy output outFE CBWFQ : Not supported on subinterfaces
In other words, you must configure a hierarchical policy with the shape command at the parent level. Use the bandwidth command for CBWFQ, or the priority command for Low Latency Queueing (LLQ) at lower levels. Class-based shaping limits the output rate and (we can assume) leads to a congested state on the logical subinterface. The subinterface than applies "backpressure," and Cisco IOS begins queueing the excess packets that are held by the shaper.
Follow these steps to apply a hierarchical policy:
Create a child or lower-level policy that configures a queueing mechanism. In the example below, we configure LLQ using the priority command and CBWFQ using the bandwidth command. Refer to Congestion Management Overview for more information.
policy-map child class voice priority 512
Create a parent or top-level policy that applies class-based shaping. Apply the child policy as a command under the parent policy since the admission control for the child class is done based on the shaping rate for the parent class.
policy-map parent class class-default shape average 2000000 service-policy child
Apply the parent policy to the subinterface.
interface ethernet0/0.1 service-policy parent
In this section, you are presented with the information to configure the features described in this document.
Note: To find additional information on the commands used in this document, use the Command Lookup Tool (registered customers only) .
Router 2620A |
---|
hostname 2620A ! ip cef ! class-map match-any dscp46 match ip dscp 46 class-map match-all telnet_ping_snmp match access-group 150 class-map match-all http match access-group 154 class-map match-all pop3_smtp match access-group 153 ! ! policy-map voice_traffic class dscp46 shape average 30000 10000 class telnet_ping_snmp shape average 20000 15440 class pop3_smtp shape average 20000 15440 class http shape average 20000 15440 ! interface FastEthernet0/0 ip address 10.10.247.2 255.255.255.0 duplex auto speed auto ! interface FastEthernet0/0.1 encapsulation dot1Q 1 native ip address 10.1.1.1 255.255.255.0 service-policy output voice_traffic |
This section provides information you can use to confirm your configuration is working properly.
Certain show commands are supported by the Output Interpreter tool, which allows you to view an analysis of show command output.
show policy-map {policy name} - Displays the configuration of all classes for a specified service policy map.
2620A# show policy-map voice_traffic Policy Map voice_traffic Class dscp46 Traffic Shaping Average Rate Traffic Shaping CIR 30000 (bps) Max. Buffers Limit 1000 (Packets) Bc 10000 Class telnet_ping_snmp Traffic Shaping Average Rate Traffic Shaping CIR 20000 (bps) Max. Buffers Limit 1000 (Packets) Bc 15440 Class pop3_smtp Traffic Shaping Average Rate Traffic Shaping CIR 20000 (bps) Max. Buffers Limit 1000 (Packets) Bc 15440 Class http Traffic Shaping Average Rate Traffic Shaping CIR 20000 (bps) Max. Buffers Limit 1000 (Packets) Bc 15440 2620A# show policy-map voice_traffic class dscp46 Class dscp46 Traffic Shaping Average Rate Traffic Shaping CIR 30000 (bps) Max. Buffers Limit 1000 (Packets) Bc 10000
show policy-map interface fast - Displays match counters for all classes of a specified service policy map.
2620A# show policy-map interface fa0/0.1 FastEthernet0/0.1 Service-policy output: voice_traffic Class-map: dscp46 (match-any) 0 packets, 0 bytes 5 minute offered rate 0 bps, drop rate 0 bps Match: ip dscp 46 0 packets, 0 bytes 5 minute rate 0 bps Traffic Shaping Target Byte Sustain Excess Interval Increment Adapt Rate Limit bits/int bits/int (ms) (bytes) Active 30000 2500 10000 10000 333 1250 - Queue Packets Bytes Packets Bytes Shaping Depth Delayed Delayed Active 0 0 0 0 0 no Class-map: telnet_ping_snmp (match-all) 0 packets, 0 bytes 5 minute offered rate 0 bps, drop rate 0 bps Match: access-group 150 Traffic Shaping Target Byte Sustain Excess Interval Increment Adapt Rate Limit bits/int bits/int (ms) (bytes) Active 20000 3860 15440 15440 772 1930 - Queue Packets Bytes Packets Bytes Shaping Depth Delayed Delayed Active 0 0 0 0 0 no Class-map: pop3_smtp (match-all) 0 packets, 0 bytes 5 minute offered rate 0 bps, drop rate 0 bps Match: access-group 153 Traffic Shaping Target Byte Sustain Excess Interval Increment Adapt Rate Limit bits/int bits/int (ms) (bytes) Active 20000 3860 15440 15440 772 1930 - Queue Packets Bytes Packets Bytes Shaping Depth Delayed Delayed Active 0 0 0 0 0 no Class-map: http (match-all) 0 packets, 0 bytes 5 minute offered rate 0 bps, drop rate 0 bps Match: access-group 154 Traffic Shaping Target Byte Sustain Excess Interval Increment Adapt Rate Limit bits/int bits/int (ms) (bytes) Active 20000 3860 15440 15440 772 1930 - Queue Packets Bytes Packets Bytes Shaping Depth Delayed Delayed Active 0 0 0 0 0 no Class-map: class-default (match-any) 926 packets, 88695 bytes 5 minute offered rate 0 bps, drop rate 0 bps Match: any
Note: Class-based shaping works at the interface and subinterface level. Cisco IOS 12.2(2.5) introduces the ability to configure shaping on the main interface and IP addresses on the subinterfaces.
Revision | Publish Date | Comments |
---|---|---|
1.0 |
10-Aug-2005 |
Initial Release |