QoS Cisco Routers

Posted on 2010-01-07
Last Modified: 2012-05-08
Lots of basic questions on QoS...
Does a router only queue and prioritze packets during times of congestion or does applying the service policy to an interface ensure that all data filters through the queue (even if it isn't congested) to make sure all priority traffic is sent first?

What situations would you specify an input policy vs an output policy? Does this apply to packets that switch from one interface to another inside of the router? Example - A packet coming from LAN that is routed out through another interface.

 If you are trying to apply a qos policy on an ethernet interface that is connected at 100Mb but is attached to say Metro Ethernet running at 10Mb. In addition to applying the service policy, Do you need to set the bandwidth lower on the interface (since the router is always going to try to send it 100Mb) for it to effectively prioritze the traffic?

Do routing protocols with precedence 6 and 7 need to be classified or does the router just automatically identify them and send them first?

If I specify to match dcsp cs5 in my class-map is it necessary to also match dscp ef? I'm guessing that cs5 will match anything by the first 3 bits rather than all 6.

Question by:ntssupport
    LVL 9

    Accepted Solution

    Queuing and prioritizing happens during congestion, policing will happen regardless.

    Input policies are for downloading, and output policies are for uploading. Service policies are applied on one interface in one direction. You can have two per interface, one out and one in.

    You don't necessarily need to use the bandwidth command for a MetroE 10mb circuit, you could use a parent policy to police/shape to your CIR, then the child policy would contain your queuing and classification.

    The router will classify its own routing protocol traffic.

    If need clarification or have more questions, ask away!

    Author Comment

    Can you use policing to ensure that all packets that are tagged priority are always sent before any other packets? If so, how?
    LVL 4

    Expert Comment

    Well your router will only "prioritize" packets when link is congested. However, if you have some sort of CAR setup on your circuit through your ISP they may have dedicated bandwidth reserved for certain classifications used to guarantee Voice or Video extra priority through their network. Like if it were a P2P or MPLS.
    LVL 9

    Expert Comment

    Policing won't prioritize, it CAN mark packets to be prioritized by an upstream device, but I don't think that's what you want.

    If you want to prioritize, you can use LLQ. But it only works during congestion because that's the only time it's needed. If nothing is congested the packets will be sent as soon as they're received so you don't need to prioritize.

    Author Comment

    Well here is the policy I tried to put in place but I'm still having call quality issues at times. I guess what probably needs to be done is that I just need to reserve bandwidth for my voip calls. Can you reserve bandwidth by matching dscp markings or does it have to be done via an ACL?
    class-map match-any voip
     match  dscp ef
     match  dscp cs5
     match  precedence 5
     match  dscp cs3
     match  dscp af31
     match  precedence 3
    policy-map qospolicy
     class voip
      priority 2000
     class class-default
    ! Heres the 10mb 
    interface FastEthernet0/1/1
    bandwidth 10400
    service-policy output qospolicy

    Open in new window

    LVL 9

    Expert Comment

    Give us the output of:

    show policy-map int fa0/1/1 out

    We need to see if it is matching properly.

    Author Comment

    here is the output for show policy-map and show queue...If I have the bandwidth set to 10400kb and I am reserving 2000kb where is the rest of my bandwidth going? Available bandwidth shows 5800kb.
    Service-policy output: qospolicy
        Class-map: voip (match-any)
          247456 packets, 53050903 bytes
          5 minute offered rate 386000 bps, drop rate 0 bps
          Match:  dscp ef
            234151 packets, 50090374 bytes
            5 minute rate 377000 bps
          Match:  dscp cs5
            219 packets, 111892 bytes
            5 minute rate 0 bps
          Match:  precedence 5
            0 packets, 0 bytes
            5 minute rate 0 bps
          Match:  dscp cs3
            12713 packets, 2590342 bytes
            5 minute rate 2000 bps
          Match:  dscp af31
            373 packets, 258295 bytes
            5 minute rate 1000 bps
          Match:  precedence 3
            0 packets, 0 bytes
            5 minute rate 0 bps
            Strict Priority
            Output Queue: Conversation 264
            Bandwidth 2000 (kbps) Burst 50000 (Bytes)
            (pkts matched/bytes matched) 1/404
            (total drops/bytes drops) 0/0
        Class-map: class-default (match-any)
          693368 packets, 210938567 bytes
          5 minute offered rate 1368000 bps, drop rate 0 bps
          Match: any
            Flow Based Fair Queueing
            Maximum Number of Hashed Queues 256
            (total queued/total drops/no-buffer drops) 0/0/0
    Input queue: 0/75/0/0 (size/max/drops/flushes); Total output drops: 0
      Queueing strategy: Class-based queueing
      Output queue: 0/1000/64/0 (size/max total/threshold/drops)
         Conversations  0/1/256 (active/max active/max total)
         Reserved Conversations 0/0 (allocated/max allocated)
         Available Bandwidth 5800 kilobits/sec

    Open in new window

    LVL 9

    Expert Comment

    The rest will go to the class-default. Your packets are being matched and forwarded appropriately. So this is for voice traffic? You should be able to use less matching, do you know what the packets are actually marked with?

    What issues are you having exactly?

    Author Comment

    That is why I asked the last question on there...
    If I specify to match dcsp cs5 in my class-map is it necessary to also match dscp ef or precedence 5? Or is cs5 an all inclusive kind of thing?

    I have audible packet loss on calls but I will get it figured out in time as I am just now getting the QoS policy put in place on our network and until I get all of my equipment tagging the packets its hard to say where its coming from.
    LVL 9

    Expert Comment

    What kind of router are you running this policy on? You could also match based on protocol, like SIP or H323, or even RTP. This might be beneficial, instead of trying to mark everything.

    You should only need to match ef, that should be the marking your phones are using. Here's my QoS policy:

    class-map match-any PRIORITY
     description This is all the traffic that gets priority.
     match protocol sip
     match protocol rtcp
     match protocol rtp audio
     match protocol skinny
     match protocol skype
     match protocol dns
    policy-map QoS_OUT
     class PRIORITY
        priority 200


    Author Closing Comment

    thanks for the help

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    IT, Stop Being Called Into Every Meeting

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Suggested Solutions

    It happens many times that access list (ACL) have to be applied to outgoing router interface in order to limit some traffic.This article is about how to test ACL from the router which is not very intuitive for everyone. Below scenario shows simple s…
    We've been using the Cisco/Linksys RV042 for years as: - an internet Gateway - a site-to-site VPN device - a leased line site-to-site subnet-to-subnet interface (And, here I'm assuming that any RV0xx behaves the same way as an RV042.  So that's …
    After creating this article (, I decided to make a video (no audio) to show you how to configure the routers and run some trace routes and pings between the 7 sites…
    After creating this article (, I decided to make a video (no audio) to show you how to configure the routers and run some trace routes and pings between the 7 sites…

    779 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    15 Experts available now in Live!

    Get 1:1 Help Now