Tech

Guides
 

Configure QoS on your Cisco router with this template

By David Davis, Special to ZDNet Asia
Monday, December 11, 2006 10:32 AM
Using quality of service on Cisco network devices helps provide both bandwidth and priority to certain types of network traffic.

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.

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.



WORTHWHILE?

0

0 votes
Blog

Talkback 2 comments

Hi David,

I set up my 871 router similar to your template but for SIP/RTP rather than Skype. When I called a phone behind the router and ran a speedtest at the same time, I could still hear some distortion in the voice. If I just upload a large file there is no distortion, whether I use a Cisco router or a small Linksys router that presumably has no QoS. The curious thing is the router statistics below showed little congestion, only 2 packets were in the priority queue. What do you think I did wrong?

cisco871#show policy-map interface FastEthernet4
FastEthernet4

Service-policy output: luxonQoS

Class-map: VoIP-rtp (match-any)
4371 packets, 935394 bytes
5 minute offered rate 36000 bps, drop rate 0 bps
Match: protocol rtp audio
4371 packets, 935394 bytes
5 minute rate 36000 bps
Queueing
Strict Priority
Output Queue: Conversation 40
Bandwidth 120 (kbps) Burst 3000 (Bytes)
(pkts matched/bytes matched) 2/428
(total drops/bytes drops) 0/0
QoS Set
dscp ef
Packets marked 4371

Class-map: VoIP-signal (match-any)
48 packets, 14092 bytes
5 minute offered rate 0 bps, drop rate 0 bps
Match: protocol sip
18 packets, 7612 bytes
5 minute rate 0 bps
Match: protocol rtcp
30 packets, 6480 bytes
5 minute rate 0 bps
Queueing
Output Queue: Conversation 41
Bandwidth 80 (kbps)Max Threshold 64 (packets)
(pkts matched/bytes matched) 18/7612
(depth/total drops/no-buffer drops) 0/0/0
QoS Set
dscp cs3
Packets marked 48

Class-map: class-default (match-any)
2580 packets, 1811073 bytes
5 minute offered rate 46000 bps, drop rate 0 bps
Match: any
Queueing
Flow Based Fair Queueing
Maximum Number of Hashed Queues 32
(total queued/total drops/no-buffer drops) 0/0/0
- Wei
(web link)
Posted by Wei J on Sunday, January 07 2007 10:58 AM

My router configuration can be found at the link below:
cisco871confg
Posted by Wei J on Sunday, January 07 2007 12:07 PM


Guest user

Guest user

Level: 
Joined: —
Already a member? Log in »



 

Loading...

Whitepapers / Case Studies

Downloads

Network Administration News


Tech Jobs Now!

Tags

  1. apple iphone
  2. blog
  3. china
  4. google inc.
  5. industry
  6. information technology
  7. internet
  8. microsoft corp.
  9. mobile
  10. network
  11. phone
  12. revenue
  13. security
  14. software
  15. strategy
  16. team
  17. u.s.
  18. web
  19. web sites
  20. yahoo! inc.