This article will give you the possibility to configure QoS classification and marking. Before you jump in and start configuring this, I advise you to go over this article from the Intense School website.

It’s important to go over this article to have fresh information about Quality of Service and what can it do to improve the services offered by the network.

I created two Packet Tracer files for this simulation:

  • configuring_qos_init.pkt: this is the starting point of your configuration task.
  • configuring_qos_final.pkt: this simulation has the final configuration applied to the routers and you can use it to compare to your configuration and see if you missed anything.

Regarding the topology, on the subnets where a PC is connected, the router’s interface has an IP address whose last octet is .1 and last octet of the PC’s IP address is .100. The default gateway of the PC is the router’s IP address.

For instance, on the subnet with PC_1: PC_1 has the IP address of 10.10.10.100/24 and R1’s interface IP address is 10.10.10.1/24.

Each router has a loopback address in the form of 1.1.1.X/32, where X is the router number. For instance, the loopback address of R2 is 1.1.1.2/32.

Also, each subnet between the routers is written on the topology and every router is using as the last octet its router number. For instance, on the subnet 10.10.23.0/24, R2 has 10.10.23.2/24 and R3 has 10.10.23.3/24.

All three routers are running OSPF in area 0 so that the end hosts (PC_1 and PC_2) will have connectivity between them.

Task 1 requirements:

  1. On R3 configure a class-map that will match all packets with precedence of 5.
  2. On R3 configure a class-map that will match all packets with precedence of 3.
  3. On R3 configure a policy-map that will use all the three class-maps configured above.
  4. On R3 apply the policy-map just configured on the input direction on the interface towards R2.

Task 1 verification:

  1. Use ‘show class-map’ to check the configured class-maps.
  2. Use ‘show policy-map interface’ to check if the policy-map was applied on the interface and if there was a match.

Task 1 hints:

  1. Use ‘class-map match-all PREC_5’ to configure the class-map name that will match the precedence of 5.
  2. Use ‘match precedence 5’ inside the class-map to match the precedence of 5.
  3. Use ‘policy-map POLICY_IN’ to configure the policy-map that will use the class-maps defined above.
  4. Use ‘class PREC_5’ to reference the class-maps defined above inside the policy-map.
  5. Use ‘service-policy input POLICY_OUT’ to configure the policy-map on the interface.

Task 2 requirements:

  1. On R1 create an access-list that will permit the ICMP packets between PC_1 and PC_2.
  2. On R1 configure a class-map that will match the TELNET protocol called HOSTS_TELNET.
  3. On R1 configure a class-map that will match the access-list number created at step a called HOSTS_ICMP.
  4. On R1 configure a policy-map that will reference both class-maps previously created.
  5. For HOSTS_TELNET class-map set the precedence of 5.
  6. For HOSTS_ICMP class-map set the precedence of 3.
  7. On R1 on the interface towards R2 apply the policy-map on the output direction.

Task 2 verification:

  1. Use ‘show class-map’ to check the configured class-maps.
  2. Use ‘show policy-map interface’ to check if the policy-map was applied on the interface and if there was a match.

Task 2 hints:

  1. Use ‘access-list 101 permit icmp host 10.10.10.100 host 10.10.20.100’ to configure an access-list for traffic between the hosts.
  2. Use ‘class-map match-all HOSTS_ICMP’ to create the class-map that will match the ICMP traffic.
  3. Use ‘match access-group 101’ to match the access-list.
  4. Use ‘match protocol telnet’ to match the TELNET protocol for the other class-map.
  5. Use ‘policy-map POLICY_OUT’ to create a policy-map that will reference the two class-maps already created.
  6. Use ‘set precedence’ command to set preference 5 for TELNET traffic and precedence 3 for ICMP traffic.
  7. Use ‘service-policy input POLICY_IN’ to configure the policy-map on the interface.

    VERIFICATION:

    After you configured both R1 and R3 here is how you can check if everything is correct:

  • Go to PC_1 and send ICMP packets to PC_2.
  • Go to PC_1 and from the command line do a telnet to 10.10.20.100.

If everything is correct, you should see a similar output as the one below:

R3# show  policy-map interface 
 GigabitEthernet0/0

  Service-policy input: POLICY_IN

    Class-map: PREC_5 (match-all)
      4 packets, 176 bytes
      5 minute offered rate 7 bps, drop rate 0 bps
      Match: precedence 5

    Class-map: PREC_3 (match-all)
      280 packets, 35840 bytes
      5 minute offered rate 719 bps, drop rate 0 bps
      Match: precedence 3

    Class-map: class-default (match-any)
      0 packets, 0 bytes
      5 minute offered rate 0 bps, drop rate 0 bps
      Match: any

R3#

Every time you send ICMP packets or do a TELNET to PC_2, the counters for class-maps PREC_5 and PREC_3 should increase.

This is just the basics. Cisco IOS allows you to match on multiple parameters of the packets or on multiple packets types. Also the policy-map allows you to alter multiple parameters of the packets, not only the precedence.