Configure QoS on your Cisco router with this template

Using quality of service (QoS) on Cisco network devices helps provide both bandwidth and priority to certain types of network traffic. In this edition of Cisco Routers and Switches, David Davis walks you through the basics of configuring QoS on a Cisco router and shows you how <a href="" target="_blank">our downloadable template</a> makes it easier.

Using quality of service (QoS) on Cisco network devices helps provide both bandwidth and priority to certain types of network traffic. The network administrator tells the network devices which traffic requires what bandwidth and priority.

It's important to understand the difference between bandwidth and priority. As the network devices (switches or routers) encounter the designated traffic, they give that traffic priority by sending it before other traffic; they give the traffic bandwidth by sending more of it than other traffic.

As I mentioned last time, configuring QoS is very complex. There are many different ways of using QoS as well as different types of QoS. Last time, I discussed how to use Cisco IOS AutoQoS to automatically configure a router to give bandwidth and priority to VoIP traffic ("Learn the benefits of Cisco AutoQoS").

This time, let's take a step back and look at how to configure basic QoS for a given scenario using a downloadable template. Let's begin with a sample scenario.

Our sample scenario

Let's say you have a Cisco 871W router at home. You use this router for Skype VoIP service, to play Counter-Strike over the Internet, and for traditional Internet activities (e.g., Web browsing and e-mail).

However, you're experiencing performance issues with your Skype phone service when simultaneously surfing the Web. When downloading a file, your phone service sounds horrible. In addition, your Internet game suffers when you download FTP files.

This is a prime example of how QoS comes in handy—you need to give these different types of traffic the bandwidth and the priority they require. Once you've configured QoS, you should be able to talk on the phone, play your game, and download files—all at the same time—without experiencing any performance issues.

Keep in mind that this is only an example. Once you understand how to configure QoS, you can customize it to fit your organization's needs. In addition, the downloadable template will create the configuration file, and you can modify it to fit your company's needs.

Configure QoS

Let's review the steps to configuring QoS on a Cisco router.

Step 1: Define the traffic

You must tell the router which traffic you want to give QoS, which you can accomplish either using an access control list (ACL) or using Network Based Application Recognition (NBAR). An ACL is the traditional way to define any traffic for a router.

With NBAR, however, the router just recognizes the traffic traveling through the router—it knows that HTTP is HTTP, Skype is Skype, etc. But there's a limited list of protocols and applications that the router recognizes.

While the router won't recognize every single application, each IOS upgrade adds more to the list. In addition, you can create custom application recognition files.

Step 2: Create a class-map

A class-map defines the traffic into groups. For example, you could create a class-map called VoIP traffic and put all VoIP protocols under it.

Step 3: Create a policy-map

A policy-map matches the classes from the class-map with how much bandwidth and/or priority you want to give this traffic.

Step 4: Apply the policy-map to the interface

Like an ACL, you must apply the policy-map to the specific interface you want it to affect. You can apply the policy-map in either output or input mode. Here's the command to use:

service-policy output|input {name of policy-map}

If you're using NBAR to recognize the traffic, you must also use the ip nbar protocol-discovery command on the interface. This enables NBAR to begin looking at the traffic.

Download the QoS template

Now that you know the basic steps to configuring QoS, you can get started with our downloadable QoS template. (This is the same template that TechRepublic's George Ou has used to explain how to configure the Cisco 871W router for basic configurations, advanced 871W configurations, and an IPSec site-to-site VPN.)

Follow these steps:

  1. Download the template.
  2. Open the Excel file, and fill out the yellow sections on the Variables worksheet.
  3. Click the Replace button; it will generate the appropriate QoS configuration on a new sheet called QOS-1.
  4. Copy the configuration from the Excel file, and paste it into the Cisco CLI. You can copy directly from Excel into a Telnet or SSH session or even the console port.

Miss a column?

Check out the Cisco Routers and Switches Archive, and catch up on David Davis' most recent columns.

Want to learn more about router and switch management? Automatically sign up for our free Cisco Routers and Switches newsletter, delivered each Friday!

David Davis has worked in the IT industry for 12 years and holds several certifications, including CCIE, MCSE+I, CISSP, CCNA, CCDA, and CCNP. He currently manages a group of systems/network administrators for a privately owned retail company and performs networking/systems consulting on a part-time basis.