- The Need for QoS
- QoS Service Models
- Catalyst QoS Fundamentals
- WAN QoS
- QoS in the Multilayer Switched Network
- Summary
- Configuration Exercise: Configuring QoS on Cisco IOSBased Catalyst Switches
- Review Questions
Configuration Exercise: Configuring QoS on Cisco IOSBased Catalyst Switches
Complete this configuration exercise to familiarize yourself with basic QoS configuration on Cisco IOSbased Catalyst switches as discussed in this chapter.
Required Resources
The resources and equipment required to complete this exercise are as follows (the last two items are optional):
Catalyst 3550
Terminal server or workstation connected directly to the console port of the Catalyst 3550 or out-of-band access to the Catalyst 3550
Cisco IP Phones infrastructure supporting voice calls (this resource verifies the configuration and is not mandatory)
Traffic generator (this resource verifies the configuration and is not mandatory)
Exercise Objective
The purpose of this exercise is to configure a Cisco IOSbased Catalyst switch for the following QoS features:
Classification
Marking
Policing
Congestion management
Congestion avoidance
The exercise exposes topics such as VLANs and spanning tree found in others chapters of this book. Nevertheless, the main purpose of this exercise is to demonstrate a QoS configuration. In this configuration exercise, your goal is to configure a Catalyst 3550 for the following QoS features:
Trust ingress DSCP values for interfaces FastEthernet0/1 through 0/10 when a Cisco IP Phone is attached
Reclassify frames on interface FastEthernet0/11 for a CoS value of 4
Mark ingress TCP Port 30000 frames on interface FastEthernet0/12 with a DSCP value of 16
Apply strict-priority queuing for VoIP traffic
Configure high-priority queues to have a 2-to-1 (2:1) priority over low-priority queues
Network Diagram
Figure 10-18 shows the network layout for this configuration exercise.
Figure 10-18 Network Diagram for Lab Exercise
Command List
In this configuration exercise, you will use the commands listed in Table 10-7, which are in alphabetical order so that you can easily locate the information you need. Refer to this list if you need configuration command assistance during the configuration exercise. The table includes only the specific parameters used in the example and not all the available options for the command.
Table 10-7 Command List for Configuration Exercise
Command |
Description |
access-list access-list-number ?. |
Access list configuration command |
class-map |
Enters the class-map configuration submode |
configure terminal |
EXEC command to enter the configuration mode |
copy running-config startup-config |
Copies the running configuration to NVRAM |
enable |
EXEC command to enter privileged mode |
end |
Configuration EXEC command to end the configuration mode |
exit |
EXEC command to exit a configuration mode to its antecedent mode |
hostname hostname |
Configures switch with a descriptive name |
interface FastEthernet | GigabitEthernet interface |
Configuration command to enter an interface configuration mode |
interface range FastEthernet | GigabitEthernet interfaces |
Configuration command to configure multiple interfaces simultaneously |
interface vlan vlan-id |
Configuration command to enter the VLAN configuration interface mode |
match access-group access-list-number |
Configures class-map matching clauses |
mls qos |
Globally enables QoS |
mls qos trust device cisco-phone |
Interface configuration command for trusting when a Cisco Phone is learned via CDP on the respective interface; works in conjunction with the mls qos trust dscp and mls qos trust cos commands |
mls qos trust dscp |
Interface configuration command for trusting DSCP values for ingress frames |
no shutdown |
Configures an interface in the Administrative UP state |
policy-map policy_map_name |
Enters the policy-map configuration submode |
priority-queue out |
Configures queue 4 on the Catalyst 3550 family of switches as a priority queue |
service-policy input | output policy-map-name |
Maps a policy map to an interface for ingress or egress traffic |
set ip dscp dscp_value |
Policy-map class action for marking DSCP |
show mls qos interface FastEthernet | GigabitEthernet interface |
Displays the trusting configuration of an interface |
spanning-tree portfast |
Configures an interface for the spanning-tree PortFast feature |
Switchport |
Configures an interface for Layer 2 operation |
switchport access vlan vlan-id |
Configures an interface for a specific VLAN-ID |
vlan vlan-id |
Adds or removes a VLAN-ID in the VLAN database |
wrr-queue bandwidth weight1 weight2 weight3 weight4 |
For weight1 weight2 weight3 weight4, enter the ratio that determines the frequency in which the WRR scheduler dequeues packets; separate each value with a space (the range is 1 to 65536) |
wrr-queue cos-map queue-id cos1 ... cos8 |
Configures CoS value to egress queue mapping |
Task 1: Globally Enable QoS
Step 1 Connect the Catalyst switch to a terminal server or directly to the workstation's serial port for in-band connectivity.
Step 2 Globally enable QoS features on the switch.
Switch#configure terminal Switch(config)#mls qos
Step 3 Verify that QoS is globally enabled.
Switch(config)#do show mls qos QoS is enabled
NOTE
The Cisco IOS do command is a recent addition to Cisco IOS to allow execution of privileged mode commands within configuration mode. This command saves the time and annoyance of exiting out and re-entering configuration mode. do is only found in the most recent Cisco IOS version, so it may not be supported in your version. If not, exit configuration mode and type the command (minus the keyword do) in privileged mode.
Recall that for the Catalyst 4000 and 4500 families of switches running Cisco IOS, qos commands are not prefixed with the keyword mls.
Task 2: Configure the Switch to Trust DSCP on Interfaces FastEthernet0/1 Through 0/10 If a Cisco IP Phone Is Attached
Step 1 Enter the range command to configure multiple interfaces simultaneously.
Switch(config)#interface range FastEthernet 0/1 -10
Step 2 Specify an access VLAN for IP Phones (voice VLANs are not used in this exercise).
Switch(config-if-range)#switchport access vlan 500
Step 3 Configure the switch to trust DSCP for incoming frames only if Cisco IP Phones are attached to the interface.
Switch(config-if-range)#mls qos trust dscp Switch(config-if-range)#mls qos trust device cisco-phone
Step 4 Configure the interfaces for spanning-tree PortFast.
Switch(config-if-range)#spanning-tree portfast %Warning: portfast should only be enabled on ports connected to a single host. Connecting hubs, concentrators, switches, bridges, etc... to this interface when portfast is enabled, can cause temporary bridging loops. Use with CAUTION %Portfast will be configured in 10 interfaces due to the range command but will only have effect when the interfaces are in a non-trunking mode.
Step 5 Enable the interfaces.
Switch(config-if-range)#no shutdown
Step 6 Verify the QoS configuration.
Switch#show mls qos interface FastEthernet 0/1 FastEthernet0/1 trust state: not trusted trust mode: trust dscp COS override: dis default COS: 0 DSCP Mutation Map: Default DSCP Mutation Map trust device: cisco-phone
Task 3: Configure the Switch to Classify All Incoming Frames on Interface FastEthernet 0/11 with a CoS Value of 4 for Untagged Frames
Step 1 Enter the interface configuration mode for FastEthernet0/11.
Switch(config)#interface FastEthernet 0/11
Step 2 Configure the interface to classify all ingress frames with a CoS value of 4.
Switch(config-if)#mls qos cos 4
Step 3 Verify the QoS configuration.
Switch#(config-if)#do show mls qos interface FastEthernet 0/11 FastEthernet0/11 trust state: not trusted trust mode: not trusted COS override: dis default COS: 4 DSCP Mutation Map: Default DSCP Mutation Map trust device: none
Task 4: Configure a Policy Map, Class Map, and the Interface Such That All Ingress TCP Port 30000 Packets on FastEthernet0/11 Have Their DSCP Set to 16
Step 1 Configure an access list to match packets on TCP port 30000.
Switch(config)#access-list 100 permit tcp any any eq 30000
Step 2 Configure a traffic profile using a class map.
Switch(config)#class-map TCP-PORT-30k Switch(config-cmap)#match access-group 100 Switch(config-cmap)#exit
Step 3 Configure a policy map to apply the class map in Step 2 to the class action of setting the DSCP to 16.
Switch(config)#policy-map BCMSN Switch(config-pmap)#class TCP-PORT-30k Switch(config-pmap-c)#set ip dscp 16 Switch(config-pmap-c)#exit Switch(config-pmap)#exit
Step 4 Apply the policy-map ingress on interface FastEthernet0/11.
Switch(config)#interface FastEthernet 0/11 Switch(config-if)#service-policy input BCMSN Switch(config-if)#exit
Step 5 Verify the policy-map configuration.
Switch#show policy-map interface FastEthernet 0/11 FastEthernet0/11 service-policy input: BCMSN class-map: TCP-PORT-30k (match-all) 0 packets, 0 bytes 5 minute offered rate 0 bps, drop rate 0 bps match: access-group 100 class-map: class-default (match-any) 0 packets, 0 bytes 5 minute offered rate 0 bps, drop rate 0 bps match: any 0 packets, 0 bytes 5 minute rate 0 bps
Task 5: Configure All Egress Queues Such That CoS Values 4, 6, and 7 Use Queue 3 and a CoS Value of 5 Uses Queue 4
Step 1 Enter the range command to configure multiple interfaces simultaneously.
Switch(config)#interface range FastEthernet 0/1 -24
Step 2 Configure interfaces for appropriate CoS mapping.
Switch(config-if)#wrr-queue cos-map 4 5 Switch(config-if)#wrr-queue cos-map 3 4 6 7 Switch(config-if)#exit
Task 6: Configure Queue 4 as a Strict-Priority Queue
Step 1 Enter the range command to configure multiple interfaces simultaneously.
Switch(config)#interface range FastEthernet 0/1 -24
Step 2 Configure queue 4 as a strict-priority queue.
Switch(config-if)#priority-queue out
Task 7: Configure WRR Weights Such That Queue 3 Receives Twice as Much Service as Any Other Single Queue
Step 1 Enter the range command to configure multiple interfaces simultaneously.
Switch(config)#interface range FastEthernet 0/1 -24
Step 2 Configure queue 3 with twice the service level as that of any other queue.
Switch(config-if)#wrr-queue bandwidth 20 20 40 20
Step 3 Verify the WRR configuration.
Switch#show mls qos interface FastEthernet 0/1 queueing FastEthernet0/1 Egress expedite queue: ena wrr bandwidth weights: qid-weights 1 - 20 2 - 20 3 - 40 4 - 20 when expedite queue is disabled Cos-queue map: cos-qid 0 - 1 1 - 1 2 - 2 3 - 2 4 - 3 5 - 4 6 - 3 7 - 3
Task 8: Verify All Configurations by Viewing Interface Statistics
Switch#show mls qos interface FastEthernet 0/1 statistics FastEthernet0/1 Ingress dscp: incoming no_change classified policed dropped (in bytes) Others: 97663325 87828650 9834675 0 0 Egress dscp: incoming no_change classified policed dropped (in bytes) Others: 30540345 n/a n/a 0 0