Giving the ease and simplicity of implementing quality of service on Mikrotik and other GUI-enabled routers, many users have complained about the complexity involved in trying to configure queues on Cisco routers. Some engineers working for service providers prefer to do this using Mikrotik because to them, it is easier.
Queuing customers to subscribed bandwidth is part of Qos. It ensures that the activities of a user do not take up your entire bandwidth, leaving others unable to work. In this simple demonstration, I will share with us on how to implement queuing on a Cisco router, using policy-map. This policy-map will be configured and applied to the interfaces on the Cisco router on which the customers are connected. In the case of customers on VLANs (customers connected using sub-interfaces), the policy-map must be applied to the sub-interfaces on which the customers are connected.
Network Topology
Lab requirements
This lab was performed using gns3 and with Cisco 3745 router, running Cisco IOS Software, 3700 Software (C3745-IPBASEK9-M), Version 12.4(25b), release software (fc1).
How to queue customers to subscribed bandwidth on Cisco routers using policy-map
The configuration commands below show how to successfully queue customers to subscribed bandwidth on Cisco routers with the aid of policy-map. In this demonstration, we have three customers (customers 1, 2 and 3) connected to three physical interfaces (f0/0, f0/1 and f1/0) on the router. Customer 1 is subscribed to 100Mbps, customer 2 is subscribed to 50Mbps, and customer 3 is subscribed to 5mbps upload and 10Mbps download. Since we have no control over what happens on customers’ routers, we need to implement Qos on the core router that will limited the customers to the bandwidths specified above. See below:
Queue configuration for customer1
R1(config)#hostname Core
Core(config)#policy-map customer1
Core(config-pmap)#class class-default
Core(config-pmap-c)#police rate 100000000 bps
Core(config-pmap-c-police)#conform-action transmit
Core(config-pmap-c-police)#exceed-action drop
Core(config-pmap-c-police)#exit
Core(config-pmap-c)#exit
Core(config-pmap)#exit
Core(config)#int f0/0
Core(config-if)#service-policy input customer1
Core(config-if)#service-policy output customer1
Core(config-if)#
Queue configuration for customer 2
Core(config)#policy-map customer2
Core(config-pmap)#class class-default
Core(config-pmap-c)#police rate 50000000 bps
Core(config-pmap-c-police)#conform-action transmit
Core(config-pmap-c-police)#exceed-action drop
Core(config-pmap-c-police)#exit
Core(config-pmap-c)#exit
Core(config-pmap)#exit
Core(config)#int f0/1
Core(config-if)#service-policy input customer1
Core(config-if)#service-policy output customer1
Core(config-if)#
If the subscribed bandwidth is asymmetric, then, different queues will be configured; one for upload and the other, for download. Below is an example for a customer subscribed to 5Mbps upload and 10Mbps download.
You may also like: How to configure VLAN on cisco router
Core(config)#policy-map customer3_up
Core(config-pmap)#class class-default
Core(config-pmap-c)#police rate 5000000 bps
Core(config-pmap-c-police)#conform-action transmit
Core(config-pmap-c-police)#exceed-action drop
Core(config-pmap-c-police)#exit
Core(config-pmap-c)#exit
Core(config-pmap)#exit
Core(config)#policy-map customer3_down
Core(config-pmap)#class class-default
Core(config-pmap-c)#police rate 10000000 bps
Core(config-pmap-c-police)#conform-action transmit
Core(config-pmap-c-police)#exceed-action drop
Core(config)#int f1/0
Core(config-if)#service-policy input customer3_up
Core(config-if)#service-policy output customer3_down