Lab 8: Confi guring QoS
Objective
Implement QoS, mark traffi c, and display and interpret QoS output.
Lab Topology
For this lab, your network design will include two pods of devices. You will be responsible for confi guring the de-vices in both pods. The dede-vices on the left side of the topology are in Pod 1. The dede-vices on the right side of the topology are in Pod 2. P1PC1 and P2PC2 are PC workstations. P1ASW1 and P2ASW2 are access-layer switches. P1DSW1 and P2DSW2 are distribution-layer switches. The access and distribution layers are two of the three layers in the Cisco three-layer hierarchical network model, which also includes the core layer.
The Topology diagram below represents the NetMap in the Simulator. To access each of the devices from within the Simulator, select the device name from the appropriate menu in the Simulator. For example, to access P1ASW1, click the eSwitches button and select P1ASW1 from the drop-down menu.
BCMSN LAB 8
Confi guring QoS
Command Summary
Command
Description
confi gure terminal enters global confi guration mode
enable enters privileged EXEC mode
exit exits from current mode
end returns to privileged EXEC mode
interface fastethernet slot/port enters interface confi guration mode for the specifi ed
Fast Ethernet interface
ping ip_address sends an ICMP echo request shutdown; no shutdown disables; enables an interface access-list access_list_number [dynamic
dy-namic_name [timeout minutes] ] {deny | permit} protocol source source_wildcard destination destina-tion_wildcard [precedence precedence] [tos tos]
[log | log-input]
creates an IP extended ACL
mls qos enables QoS globally
show mls qos verifi es MLS QoS confi guration class-map [match-all | match-any] class_map_
name
creates a class map, and changes to class map confi guratoin mode
match {access-group acl_index_or_name | ip dscp dscp_list | ip precedence ip_precedence_list}
defi nes matching criteria for class map
show class-map verifi es class map
policy-map policy_map_name creates a policy map, and changes to policy map
confi guration mode
class class_map_name defi nes a traffi c classifi cation, and enters policy map
class confi guration mode
set {cos new_cos | ip dscp new_dscp | ip prece-dence new_precedence}
classifi es IP traffi c by setting a new value in the packet
show policy-map [policy_map_name [class
class_name]]
verifi es policy map
service-policy {input policy_map_name | output
policy_map_name}
applies a policy map to an interface
Lab Tasks
Task 1: Enable QoS and Mark Traffi c
Enable QoS globally on each DSW. Use the mls qos command to accomplish this task. Verify that QoS is globally enabled. Use the show mls qos command to accomplish this task.
Separate traffi c into two classes, one for ICMP traffi c and one for TFTP traffi c. First, select these types of traffi c with an Access Control List (ACL). Create Access List 101 to permit all TFTP traffi c. Create Access List 102 to permit all ICMP echo traffi c and echo reply traffi c.
Classify these types of traffi c by mapping the Access Lists to a Class Map. Create a Class Map named
TFTP; match Access List 101 to this class. Create a Class Map named ICMP; match Access List 102 to
this class.
Once the traffi c has been classifi ed, change the IP precedence values for the traffi c so that it can be queued later. Create a Policy Map named Precedence. For the TFTP class, change the IP precedence to
5. For the ICMP class, change the IP precedence to 1.
Apply the policy map to the inbound interfaces of the traffi c. In the Lab Topology, these are the trunks that connect to the ASWs. Use the service-policy command to accomplish this task.
Task 2: Display and Interpret QoS Output
Use the show mls qos command to verify that QoS is enabled.
Verify that the Access Lists are correct. Use the show access-lists command. Verify the Class Map confi guration. Use the show class-map command. Verify the Policy Map confi guration. Use the show policy-map command. Verify the application of the policy to the interface. Use the show run command.
Lab Solutions
Task 1: Enable QoS and Mark Traffi c
mls qos show mls qos
access-list 101 permit udp any any eq tftp access-list 102 permit icmp any any echo access-list 102 permit icmp any any echo-reply class-map tftp match access-group 101 class-map icmp match access-group 102 policy-map precedence class tftp set ip precedence 5 class icmp set ip precedence 1
interface range fastEthernet 0/1 - 4 service-policy input precedence
1. 2. 3. 4. 5. 6. 1. 2. 3. 4. 5. 1. 2. 3. 4. 5. 6.
BCMSN LAB 8
Confi guring QoS
Task 2: Display and Interpret QoS Output
P1DSW1#show mls qos QoS is enabled
P1DSW1#show access-lists Extended IP access list 101 permit udp any any eq tftp Extended IP access list 102 permit icmp any any echo permit icmp any any echo-reply P1DSW1#show class-map
Class Map match-all tftp (id2) Match access-group 101 Class Map match-all icmp (id 3) Match access-group 102
Class Map match-any class-default (id 0) Match any
P1DSW1#show policy-map Policy Map precedence class tftp set ip precedence 5 class icmp set ip precedence 1 P1DSW1#show run ! interface FastEthernet0/1 description P1DSW1 to P1ASW1 switchport mode trunk
switchport trunk encapsulation dot1q service-policy input precedence !
interface FastEthernet0/2
description P1DSW1 to P1ASW1 switchport mode trunk
switchport trunk encapsulation dot1q service-policy input precedence ! 1. 2. 3. 4. 5.
BCMSN LAB 8
Confi guring QoS
interface FastEthernet0/3
description P1DSW1 to P2ASW2 switchport mode trunk
switchport trunk encapsulation dot1q service-policy input precedence !
interface FastEthernet0/4
description P1DSW1 to P2ASW2 switchport mode trunk
switchport trunk encapsulation dot1q service-policy input precedence
BCMSN LAB 8
Confi guring QoS
Sample Initial Confi guration Scripts
P1DSW1 P1DSW1 (continued)
Version 12.1
service timestamps debug uptime service timestamps log uptime no service password-encryption ! hostname P1DSW1 ! ip subnet-zero ip routing ! mls qos !
spanning-tree extend system-id !
class map match-all tftp Match access-group 101 class map match-all icmp Match access-group 102 !
policy map precedence Class tftp set ip precedence 5 Class icmp set ip precedence 1 ! interface FastEthernet0/1 description P1DSW1 to P1ASW1 switchport mode trunk
switchport trunk encapsulation dot1q service-policy input precedence !
interface FastEthernet0/2 description P1DSW1 to P1ASW1 switchport mode trunk
switchport trunk encapsulation dot1q service-policy input precedence !
interface FastEthernet0/3 description P1DSW1 to P2ASW2 switchport mode trunk
switchport trunk encapsulation dot1q service-policy input precedence !
interface FastEthernet0/4 description P1DSW1 to P2ASW2 switchport mode trunk
switchport trunk encapsulation dot1q service-policy input precedence !
interface FastEthernet0/5 switchport mode access ! interface FastEthernet0/6 ! interface FastEthernet0/7 ! interface FastEthernet0/8 ! interface FastEthernet0/9 ! interface FastEthernet0/10 ! interface FastEthernet0/11 description P1DSW1 to P2DSW2 switchport mode trunk
switchport trunk encapsulation dot1q !
interface FastEthernet0/12 description P1DSW1 to P2DSW2 switchport mode trunk
switchport trunk encapsulation dot1q ! interface GigabitEthernet0/1 ! interface GigabitEthernet0/2 ! vtp Server vtp domain bigdomain ! interface Vlan 1 ip address 172.16.1.100 255.255.255.0 no ip route-cache no shutdown ! interface Vlan0011 ip address 172.16.11.100 255.255.255.0 no ip route-cache no shutdown ! router eigrp 100 network 172.16.0.0 ! ip classless no ip http server !
access-list 101 permit udp any any eq tftp access-list 102 permit icmp any any echo access-list 102 permit icmp any any echo-reply !
line con 0
transport input none line aux 0 line vty 0 4 ! no scheduler allocate end