QoS w/VoIP settings?

Discussion in 'Tomato Firmware' started by strike, Aug 27, 2009.

  1. strike

    strike Addicted to LI Member

    I recently started using QoS, following as much as possible Toastmans advice, and have been experiencing breaks in the audio of my VoIP. I'm wondering if I have QoS setup correctly, and was hoping some of the QoS gurus here could review and see if there is anything wrong I'm doing or could suggest any additional settings.

    My network:
    Buffalo WHR-HP-G54 / Tomato (Victek mod) v1.25.8515
    Grandstream HT502 on new VT network (behind Buffalo)
    SIP port 5089 forwarded to GSHT502 (UDP/TCP)
    RTP port 18884 forwarded to GSHT502 (UDP/TCP)

    Attached are my configuration settings for QoS and the GS VoIP adapter. I removed most of the default classifications, but kept the ones that made sense to me.

    My download speed is consistently around 6mbps.
    Upload speed is consistently around 350kbps.

    Any advice is appreciated.

    Attached Files:

  2. strike

    strike Addicted to LI Member

    To clarify on the VoIP...

    The audio is actually better now than it was before with my old router, and calls connect no problem. What happens is there are random breaks in the audio where neither party can here the other, that last for about 3 seconds, then both can hear each other again.

    I was thinking this would be indicative of dropped packets, and partly or mostly due to my QoS settings.
  3. occamsrazor

    occamsrazor Network Guru Member

    I can't be sure what the problem is, but you might find it easier to give the Grandstream a static IP address, then give that IP address highest priority.
    SIP/VOIP can actually use a range of ports for the voice traffic (I think) therefore the by-IP-address way is better as it will catch everything going to/from that adapter.
    For example my VOIP box always gets as IP address, so I have to rules set up:

    Highest Priority

    Highest Priority

    It may be unecesssary to have both the To & From, but it doesn't seem to hurt.
  4. strike

    strike Addicted to LI Member

    Makes sense to me. I've updated my rules to include the same, To/From TCP/UDP to its IP, which was already static.
  5. Toastman

    Toastman Super Moderator Staff Member Member

    Hi Strike

    I had a quick look at your setup. You've got the VOIP in highest OK and sufficient bandwidth allocated.

    You don't say what the conditions are when the breaks occur. Is it simultaneous P2P which causes it? If you have this happening when you have no other traffic, no P2P, then it probably isn't tomato at all. Switch off QOS and disable all other machines - the problem should go away. Switch on QOS - does it then come back?

    I would expect P2P to cause trouble, because you have set it to allow outgoing P2P data of up to 195kbps. Traffic to be expected to come back from remote P2P download sites as a result could be many times this and could saturate your downlink. DHT would also take up a lot of bandwidth if you have this enabled. To check this, set P2p to 1% rate and 5% limit, increase the limit slowly after this but based on experience no more than 10%. (You have approx 6 Mbps downlink, nominal 512k uplink???). You can also limit incoming P2P to almost nothing to eliminate this class to begin with.

    To make VOIP work better, there is quite a lot of data on the web, if you search for it. Some of this gives information on setting routers for best performance. Here's how:

    Set your incoming maximum incoming bandwidth limit to about 60% = 3600kbps to make sure there is always sufficient bandwidth available for your VOIP. WHY?? Check the latency v utilization graph in this post http://www.linksysinfo.org/forums/showpost.php?p=345320&postcount=76 to see what the effects are of limiting your incoming data to 60% of max bandwidth (it is the last paragraph). This data is pretty much confirmed by most router manufacturers and research organizations, so if you read any post on a forum that tells you differently, you must make up your mind as to who is more likely to be correct.

    Post back to tell us if you made any progress!
  6. strike

    strike Addicted to LI Member

    Toastman, thanks for the advice.

    We really are not big P2P users, but I hear you and was already re-reading your original QoS thread and looking at how to limit P2P a little more. We do use it, just not 24x7.

    The audio breaks have occurred in what it seems are random times...no heavy P2P use, or anything out of the ordinary. Just basic browsing, IM, and other online apps, but nothing nearly as heavy as P2P AFAIK (wife could be doing something I am not aware of though!). But I have not tested with everything disconnected, etc.

    My uplink is 384 kbps, and it tests mid 300s regularly. I have reduced the uplink further to 275, and will see how that works.

    Will look at P2P settings, and post back after some testing.
  7. strike

    strike Addicted to LI Member

    Moved WWW 512+ to Low and P2P to Lowest category, and changed Basic Outbound per screen shot.

    Attached Files:

  8. Toastman

    Toastman Super Moderator Staff Member Member


    A is still 1 - 35%. while it is just a "little" bit better, you need to set it to less. Try 5% for now. Normal use you may need to limit it to around 10%. More than that, it will allow P2P to saturate your router on occasions. As you are not a heavy P2P user you should find that OK. In your P2P client limit uploads (seeds) to 20 kbps. That will seed a tiny bit but still allow you to use P2P.

    But I don't think, from what yuou say, that P2P is to blame for your jitters. It may be your ISP or some other place. What were the results of switching off QOS? Did the VOIP work better?

    Since you mention your wife may be doing something, have you also considered the possibility that you may have a virus on a PC that is generating traffic? If someone uses bit torrent, you may find DNA is taking your bandwidth (google for bit torrent DNA). You can see how many connections your router has open in the graph page or in advanced / conntrack - list the connections in QOS/View details.
  9. tstrike2000

    tstrike2000 Network Guru Member

    I remember when I used Vonage, I used the MAC address of the NIC the VoIP adapter was using in the QOS instead of the IP address, set that to highest, and made the outgoing bandwidth about 85-90% of my total outgoing bandwidth with very good success.
  10. schweinc

    schweinc Network Guru Member


    2-cents worth. should not have to port forward, VoIP adapter should have a static IP address (and you indicate it does), QoS Inbound Limits can be set to none as you don't want to limit the inbound flow, and the QoS Classification should have the MAC address of the VoIP set to highest and it be the first (top) entry.

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice