Voice quality problems on UC500 - widely variable latencey - how do I reslove this?

Answered Question
May 4th, 2009

I have a UC500 with SIP trunk. I have intermitent voice qualtity problems in the form of broken speech, typically on the far end.

The SIP trunk provider claims the issue is not with him and points to widely varying ping times from his server to my UC500.

The ISP claims he can ping the cable modem consistantly in less that 70ms while the UC500 takes 100-800ms. The ISP will not reveal the IP address of the cable modem (Linksys CM100) so I cannot test this for my self.

The network consists of one phone one PC and one wireless cam so it seems an overloaded connection issue.

How can I find out why my router is doing this?

Thanks!

I have this problem too.
0 votes
Correct Answer by Marcos Hernandez about 7 years 7 months ago

Here is a good document (you will also see it is part of the bigger QoS Design Guide):

http://www.cisco.com/en/US/docs/ios/qos/configuration/guide/qos_mqc_ps6441_TSD_Products_Configuration_Guide_Chapter.html

Your shaping needs to match whatever is guaranteed upstream by the circuit. In your case, since there are no guarantees, I would just  apply the "Bottom" service policy to the WAN interface directly and avoid shaping (Top).


You can determine which codec is being used, by pressing the blue "?" button or "i" button on the IP phone itself while on a call.


Regarding multiple trunks support, this is OK ONLY IF THE SECOND PROVIDER DOES NOT REQUIRE AUTHENTICATION. UC500 can only register with one provider at a time.

Thanks,


Marcos

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 5 (1 ratings)
Loading.
Steven DiStefano Tue, 05/05/2009 - 04:58

SIP Trunk Service Providers who give some SLA or guarantee for bandwidth and QoS (TOS or DSCP) marking of RTP Media and SIP Signaling will place a 'demarcation router' at the small business (in front of the UC520) so the connection is their network and can be maintained and controlled.  This is the only way they can guarantee the network connection from their SIP Infrastructure (Registrar, Proxy, SBC, etc) all the way to your location.

If they dont do this, there is a good chance you have no SLA and in that case you are dependent on whoever your ISP is to carry your connection to the SIP Trunk SP network.  Some people call this BYOB (Bring your own Broadband).   This will usually result in QoS problems since either the bandwidth is not prioritized for marked traffic or isnt enough to carry the number of calls (or even a single call) in times of congestion and high traffic in the ISP network.

In the case of a Cable MSO who may also be offering voice as part of a triple play type solution, they may not want to help you with QoS for SIP signaling and RTP Media packets since you basically commoditized their network (made them cheap plumbing), unless you pay for a higher tiered service that would give you an SLA.

If a SP tells you the pings times to get to you are too long, then I assume you are in the BYOB case, since that is a reflection of the network between you and the SP, not the UC520?

Marcos Hernandez Tue, 05/05/2009 - 05:56

Do you have a policy map (QoS) configured on your WAN link? If so, do you see matches for the different classes? "show policy-map interface fast0/0".


Let us know,

Marcos

mcastrigno Tue, 05/05/2009 - 09:22

Marcos,

Based on the repsonse below I would say there is no policy.

UC520#show policy-map interface fast0/0
UC520#

Thanks,

Matthew

Marcos Hernandez Tue, 05/05/2009 - 10:29

Please apply the following config. Please notice that it assumes an upload speed of 768K and that I will have 2 G.711 calls, each one using 90K. So for your setup, you will need to modify the "priority" command under "class VoIP" (unit is Kbps) and the "shape average" command under the "policy-map Top_Class" "class class-default" (unit is bps). If you are using G.729 on the WAN, use 26Kbps per call, instead of 90Kbps.

! QoS settings:
class-map match-any VoIP
match ip dscp ef
!
class-map match-any Signaling
match ip dscp cs3
match ip dscp af31
!
policy-map Bottom_Class 
class VoIP 
priority 180
class Signaling 
bandwidth 10
class class-default
fair-queue
!
policy-map Top_Class 
class class-default 
shape average 768000
service-policy Bottom_Class 
!
!
interface FastEthernet0/0
service-policy output Top_Class
!

Marcos

mcastrigno Tue, 05/05/2009 - 12:00

Marcos,

The command:

show policy-map FastEthernet0/0

does not show anything but show run does show the following.

Do I have it set properly?

do these other class-map interfere?

Can you tell me where ping traffic fits in the scheme of things? How relevant is it for determing congestion on a network any way?

Thanks,

Matthew

!
ip tftp source-interface Loopback0
!
class-map match-all _class_Voice0
match ip dscp ef
class-map match-all _class_Voice1
match ip dscp cs3
class-map match-any VoIP
match ip dscp ef
match ip dscp cs3
match ip dscp af31
class-map match-any sdm_p2p_kazaa
match protocol fasttrack
match protocol kazaa2
class-map match-any sdm_p2p_edonkey
match protocol edonkey
class-map match-any sdm_p2p_gnutella
match protocol gnutella
class-map match-any sdm_p2p_bittorrent
match protocol bittorrent
class-map match-any Signaling
match ip dscp cs3
match  dscp af31
!
!
policy-map Bottom_class
class VoIP
  priority 180
class Signaling
  bandwidth 10
class class-default
  fair-queue
policy-map Bottom_Class
class VoIP
  priority 180
policy-map Voice
class _class_Voice0
  set cos 6
class _class_Voice1
  set cos 3
policy-map Top_Class
class class-default
  shape average 768000
  service-policy Bottom_Class

Marcos Hernandez Tue, 05/05/2009 - 12:04

The show command is missing the keyword "interface". Also, you need to apply it to the interface (see my post). Finally, ICMP should be tracked in the dfault class.


Marcos

mcastrigno Tue, 05/05/2009 - 17:08

Marcos,

Ok My policy map is set as shown. Does it look right?

I don't know how to track IMCP in the default class, my attempts resulted in "invalid input". Can you help with this?

Thanks,

Matthew

UC520#show policy-map interface fast0/0
FastEthernet0/0

  Service-policy output: Top_Class

    Class-map: class-default (match-any)
      704 packets, 68824 bytes
      5 minute offered rate 1000 bps, drop rate 0 bps
      Match: any
      Traffic Shaping
           Target/Average   Byte   Sustain   Excess    Interval  Increment
             Rate           Limit  bits/int  bits/int  (ms)      (bytes)
           768000/768000    4800   19200     19200     25        2400

        Adapt  Queue     Packets   Bytes     Packets   Bytes     Shaping
        Active Depth                         Delayed   Delayed   Active
        -      0         704       68824     0         0         no

      Service-policy : Bottom_Class

        Class-map: VoIP (match-any)
          0 packets, 0 bytes
          5 minute offered rate 0 bps, drop rate 0 bps
          Match: ip dscp ef (46)
            0 packets, 0 bytes
            5 minute rate 0 bps
          Match: ip dscp cs3 (24)
            0 packets, 0 bytes
            5 minute rate 0 bps
          Match: ip dscp af31 (26)
            0 packets, 0 bytes
            5 minute rate 0 bps
          Queueing
            Strict Priority
            Output Queue: Conversation 72
            Bandwidth 180 (kbps) Burst 4500 (Bytes)
            (pkts matched/bytes matched) 0/0
            (total drops/bytes drops) 0/0

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

Marcos Hernandez Wed, 05/06/2009 - 05:57

Your pings will be recorded in the default class. I see 704 matches, some could be ICMP.


Remember that the sample config I sent was for a 768Kbps link, and two G.711 calls. You need to adjust according to your actual setup.


Have you tried phone calls? Cal you test that and see if the Voice class see matches and the quality is improved?

Thanks,


Marcos

mcastrigno Wed, 05/06/2009 - 09:39

Marcos,

Thank you so much for your continued assistance.

I was only able to do limited testing for unrelated reasons. I will be able to more testing later today. The limited test results were good but it is an intermittent problem to start with so some time will tell. I will attempt to create conditions prevoiulsy demostrated to create the quality problems albeit not exculsivley.


My Internet connection is BYOB affair with 8Mbit DN 1Mbit UP. It differs from the local residential product only in that no ports are blocked. It is a best effort service with no min guaranteed.

Must I define shapping for the entire bandwidth? Does it throttle all traffic to 786K in your example?

How can I tell what coding I am using 711/729? My VPN is not working for some reason so I need to do it from the command line as I have no CCA access at the momment.

At the moment I have only sip trunk but do want to get another if I can get this to work. Do you see any issues with getting another trunk from different provider? So each trunk is from two different SPs?

I still need to know how to assign ICMP to the appropriate class as you mentioned can you help with the commands.

Can you provide a link to a good document that outlines the shaping configuration? No a marketing doc but a how to doc.

Thanks,

Matthew

Correct Answer
Marcos Hernandez Wed, 05/06/2009 - 09:53

Here is a good document (you will also see it is part of the bigger QoS Design Guide):

http://www.cisco.com/en/US/docs/ios/qos/configuration/guide/qos_mqc_ps6441_TSD_Products_Configuration_Guide_Chapter.html

Your shaping needs to match whatever is guaranteed upstream by the circuit. In your case, since there are no guarantees, I would just  apply the "Bottom" service policy to the WAN interface directly and avoid shaping (Top).


You can determine which codec is being used, by pressing the blue "?" button or "i" button on the IP phone itself while on a call.


Regarding multiple trunks support, this is OK ONLY IF THE SECOND PROVIDER DOES NOT REQUIRE AUTHENTICATION. UC500 can only register with one provider at a time.

Thanks,


Marcos

mcastrigno Wed, 05/06/2009 - 11:05

Thanks Marcos.

I will try applying only to the bottom service policy.

Since my existing SIP trunk SP does not use registration, I am assuming I can add a second SP regardless if the require it or not.

Thanks,

Matthew

mcastrigno Wed, 05/06/2009 - 13:23

Marcos,

Below is the latest test result. I tried to load up my network (such as it it) and had a voice call going. The voice qualtiy was perfect. I also did not see the same variation in ping time that I was seeing before. Best I can tell, shaping was taking effect, showing delayed packets. Can you confirm?

Thanks,
Matthew

  Service-policy output: Top_Class

    Class-map: class-default (match-any)
      169795 packets, 111087321 bytes
      5 minute offered rate 771000 bps, drop rate 3000 bps
      Match: any
      Traffic Shaping
           Target/Average   Byte   Sustain   Excess    Interval  Increment
             Rate           Limit  bits/int  bits/int  (ms)      (bytes)
           768000/768000    4800   19200     19200     25        2400

        Adapt  Queue     Packets   Bytes     Packets   Bytes     Shaping
        Active Depth                         Delayed   Delayed   Active
        -      61        169427    110624008 138774    103809933 yes

      Service-policy : Bottom_Class

        Class-map: VoIP (match-any)
          0 packets, 0 bytes
          5 minute offered rate 0 bps, drop rate 0 bps
          Match: ip dscp ef (46)
            0 packets, 0 bytes
            5 minute rate 0 bps
          Match: ip dscp cs3 (24)
            0 packets, 0 bytes
            5 minute rate 0 bps
          Match: ip dscp af31 (26)
            0 packets, 0 bytes
            5 minute rate 0 bps
          Queueing
            Strict Priority
            Output Queue: Conversation 72
            Bandwidth 180 (kbps) Burst 4500 (Bytes)
            (pkts matched/bytes matched) 0/0
            (total drops/bytes drops) 0/0

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

Marcos Hernandez Wed, 05/06/2009 - 13:28

Shaping is definitely kicking in. It would be great if you could try applying the bottom policy map directly (no shaping) to the WAN interface and conduct the same test. Happy to hear we are making progress...

Marcos

mcastrigno Wed, 05/06/2009 - 14:45

Thanks Marcos.

I will try applying the bottom policy map directly tomorrow when someone is back at the office for me to test the voiec call with.

Progress is good!...

mcastrigno Thu, 05/07/2009 - 12:40

Marcos - anyone:

how do I unattach a policy map to an output/

UC520(config-if)#service-policy output Bottom_Class
Policy map Top_Class is already attached
UC520(config-if)#

thanks,

Matthew

Marcos Hernandez Thu, 05/07/2009 - 12:51

You first negate the existing command under the interface (use the "no" keyword in front the command).


Marcos

I can see by your 'show policy' that you are not matching any packets against the class maps. I have noticed on my UC520 as well that it does not match packets based on the DSCP value. Can anyone shed some light on this?

In the example config Marcos gave you:

! QoS settings:
class-map match-any VoIP
match ip dscp ef
!
class-map match-any Signaling
match ip dscp cs3
match ip dscp af31
!

Change to:

class-map match-any VoIP
match ip dscp ef

match protocol rtp audio
!
class-map match-any Signaling
match ip dscp cs3
match ip dscp af31

match protocol sip
!

You should then see matches in your 'show policy' command against the 'protocol' statements.

mcastrigno Wed, 05/06/2009 - 10:22

thanks cmonks.

I will ask Marcos about this and try it too.

Thanks,

Matthew

Marcos Hernandez Wed, 05/06/2009 - 10:43

If there's no congestion, traffic shaping won't kick in. What you are seeing is normal.

Marcos

See my policy, there are hits against the protocol matching, but not the dscp matching. DSCP matching doesnt seem to be working on the UC520.

MCC-UC520#sh policy-map int fa0/0
FastEthernet0/0

  Service-policy output: shape

    Class-map: class-default (match-any)
      1994284 packets, 1015310850 bytes
      5 minute offered rate 133000 bps, drop rate 0 bps
      Match: any
      Queueing
      queue limit 64 packets
      (queue depth/total drops/no-buffer drops) 0/2990/0
      (pkts output/bytes output) 1991062/1011190744
      shape (average) cir 2000000, bc 8000, be 8000
      target shape rate 2000000

      Service-policy : queue

        queue stats for all priority classes:
          Queueing
          queue limit 64 packets
          (queue depth/total drops/no-buffer drops) 0/0/0
          (pkts output/bytes output) 613607/131272150

        Class-map: rtp (match-any)
          613607 packets, 131260600 bytes
          5 minute offered rate 85000 bps, drop rate 0 bps
          Match: ip dscp ef (46)
            0 packets, 0 bytes
            5 minute rate 0 bps
          Match: protocol rtp audio
            613607 packets, 131260600 bytes
            5 minute rate 85000 bps
          Priority: 30% (600 kbps), burst bytes 15000, b/w exceed drops: 0


        Class-map: sip (match-any)
          221 packets, 141573 bytes
          5 minute offered rate 0 bps, drop rate 0 bps
          Match: ip dscp cs3 (24)
            0 packets, 0 bytes
            5 minute rate 0 bps
          Match: protocol sip
            221 packets, 141573 bytes
            5 minute rate 0 bps
          Queueing
          queue limit 64 packets
          (queue depth/total drops/no-buffer drops) 0/0/0
          (pkts output/bytes output) 221/150855
          bandwidth 5% (100 kbps)

        Class-map: class-default (match-any)
          1380457 packets, 883908891 bytes
          5 minute offered rate 45000 bps, drop rate 0 bps
          Match: any
          Queueing
          queue limit 64 packets
          (queue depth/total drops/no-buffer drops/flowdrops) 0/2990/0/2990
          (pkts output/bytes output) 1377234/879767739
          Fair-queue: per-flow queue limit 16

Or, are the DSCP values only matched durring congestion?

Here is the output from another system with the same config.

sh policy-map int fa0/0
FastEthernet0/0

  Service-policy output: SHAPE

    Class-map: class-default (match-any)
      3732539 packets, 902484534 bytes
      5 minute offered rate 171000 bps, drop rate 0 bps
      Match: any
      Queueing
      queue limit 64 packets
      (queue depth/total drops/no-buffer drops) 0/1349/0
      (pkts output/bytes output) 3727415/901582275
      shape (average) cir 2000000, bc 8000, be 8000
      target shape rate 2000000

      Service-policy : QUEUE

        queue stats for all priority classes:
          Queueing
          queue limit 64 packets
          (queue depth/total drops/no-buffer drops) 0/0/0
          (pkts output/bytes output) 1995547/429891306

        Class-map: RTP (match-any)
          1995547 packets, 429891306 bytes
          5 minute offered rate 129000 bps, drop rate 0 bps
          Match: ip dscp ef (46)
            391571 packets, 86723722 bytes
            5 minute rate 0 bps
          Match: protocol rtp audio
            1603976 packets, 343167584 bytes
            5 minute rate 121000 bps
          Priority: 40% (800 kbps), burst bytes 20000, b/w exceed drops: 0


        Class-map: SIP (match-any)
          1143 packets, 720201 bytes
          5 minute offered rate 0 bps, drop rate 0 bps
          Match: ip dscp cs3 (24)
            0 packets, 0 bytes
            5 minute rate 0 bps
          Match: protocol sip
            1143 packets, 720201 bytes
            5 minute rate 0 bps
          Queueing
          queue limit 64 packets
          (queue depth/total drops/no-buffer drops) 0/0/0
          (pkts output/bytes output) 1143/768207
          bandwidth 5% (100 kbps)

        Class-map: class-default (match-any)
          1735850 packets, 471873295 bytes
          5 minute offered rate 44000 bps, drop rate 0 bps
          Match: any
          Queueing
          queue limit 64 packets
          (queue depth/total drops/no-buffer drops/flowdrops) 0/1349/0/1340
          (pkts output/bytes output) 1730725/470922762
          Fair-queue: per-flow queue limit 16

Marcos Hernandez Wed, 05/06/2009 - 12:50

I did some more digging, and starting with 12.4(11)T what you are seeing is expected behavior. It is documented by:


CSCsr39679 Nested class-maps not displaying individual filter level stats

Thanks for insisting here. I wasn't aware of this change of behavior. Notice this is purely cosmetic and does not affect functionality. I know it doesn't help when troubleshooting, but like I said, this is by design.


Thanks a lot,


Marcos

mcastrigno Tue, 05/05/2009 - 09:15

Steve,

Yes I am in a BYOB situation.

The ISP is a cable company but does not offer voice in my area and apparently does not offer an SLA type product.

However, the ISP network is very lightly loaded - a grand total of 15 cusotmers.

Again the ISP claims low latency to the cable modem, the problem lies with cable modem to UC500 or the UC500 and associated network.

The CPU is not overloaded as show by an earlier post.

Matthew

Ramkumar Jayase... Tue, 05/05/2009 - 04:51

Check the cable between router and the modem. Load on the UC500 gets high when you have Firewall rules , VPN configured  and when the internet usage gets high. You can check the CPU utilization using the command show cpu process history .

mcastrigno Tue, 05/05/2009 - 09:03

Here is a ping to my SIP Trunk SP with the utilization query.

At 12% its not the cpu causing the delay.

Sending 5, 100-byte ICMP Echos to 216.82.224.202, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 492/804/988 ms
UC520#show processes
CPU utilization for five seconds: 12%/5%; one minute: 12%; five minutes: 9%
PID QTy       PC Runtime (ms)    Invoked   uSecs    Stacks TTY Process

David Trad Tue, 05/05/2009 - 15:13

Hi There,

Is it possible if you can supply some Tracert to various locations? It would be good to see if there is network congestion on your carriers network.

Also if possible provide us with a trace to your SIP provider, it might indicate how many hops it is taking to get to them, ideally you would be best suited being with someone that peers with your carrier so that way the distance of travel is not very far, but i appreciate that this can not happen in the majority of cases.

Cheers,

David.

mcastrigno Wed, 05/06/2009 - 10:49

Thanks for the Reply David.

I can't trace through the carrier network but I can trace to the SP's server which is clear over in Washington, DC and I am in Idaho.

Good test to make when I select another SIP trunk SP.

Thanks,

Matthew

Actions

This Discussion

Related Content