Setting up QoS for VoIP on Tomato routers

January 17th, 2017 Leave a comment Go to comments

A question we're asked often is, "Why do I need QoS?"  If your VoIP calls already sound every bit as good (or better) than a POTS call, and you never have dropouts or distorted audio, then you don't need QoS.  On the other hand, if you're a heavy or even moderate user of your internet connection, and you aren't lucky enough to have more bandwidth than you can ever use, it is our opinion that QoS is essential.

The best way we know to use Tomato's QoS system is by rate limiting.  That is to say, when we're done, you will have a slight decrease in speed for regular internet traffic.  However, you should be able to make VoIP calls with perfect audio quality.  We admit that these rules are strict, though they are that way for a reason: we want the non-essential traffic to slow down before the link becomes saturated.  In other words, you sacrifice speed for low latency and jitter.  If they cause too great of a speed decrease for you, you may wish to start with these, verify you have good audio quality, and then relax the rules as appropriate for your specific situation.

1) First, navigate to QoS >> Basic Settings. Set Enable QoS, ACK, Prioritize ICMP, and Reset class when changing settings.

2) If your build of Tomato allows you to change the QoS Class Names, name class 1 High and class 2 Low.  For the rest of this article we will be using those names.  You can actually use any names you wish.  The names are unimportant.  The order is important.

3) Set your Default Class to Low.

4) Set your max bandwidth to 66-90% of your actual (measured, not rated) speed.

Example: If your upload speed is 900 kbit/sec, set your Outbound Max Bandwidth Limit to 900 * .66 = 594 kbit/sec.  If your download speed is 15 mbit/sec, you might set your Inbound Max Bandwidth Limit to 15000 * .85 = 12750 kbit/sec.  A higher number gives you more speed for other internet use, but increases the risk of audio quality issues.  A lower number reduces your speed, but also reduces the risk of poor audio quality.  You can experiment to see what works best for your internet connection.

5) Set your Rates / Limits section, for both outbound and inbound as follows:

High: 80% / 100%
Low: 20% / 100%

6) Navigate to QoS >> Classification. You can set up rules in many ways.  If you have assigned static IP addresses to your VoIP equipment, this is an easy way.  Change Any Address to Src IP, input your device's IP address, and change TCP/UDP to UDP.  Set the Class to High.

7) Now, test your setup to be sure it functions correctly. Make a call and navigate to QoS >> View Details.  Sort by the Class column.  If you set everything up correctly, your VoIP traffic will be assigned to the High class, and everything else will be assigned to either Low or Unclassified.
  1. Rajax
    January 17th, 2017 at 20:09 | #1

    I use a router with Tomato firmware. I've heard SIP ALG should be disabled (even on Tomato routers?). I can see a place to disable "SIP", is this the same as "SIP ALG" or are they different? I don't see "SIP ALG" anywhere.

  2. February 19th, 2017 at 12:00 | #2

    Tomato's SIP ALG does work(!), but most retail-level VoIP service providers such as, Callcentric, and Anveo don't require it.  You may disable SIP from within Advanced >> Conntrack/Netfilter in the Tracking / NAT Helpers section.

If you would like a reply to your comment, you must leave your email address! We receive dozens of questions every month from people who don't leave us with any way to contact them, so we have no choice but to ignore the question. We try to reply to as many questions as we can, if we know the email address of the person who asked the question. Thanks in advance for writing in :)

Allowed HTML: <b>, <i>, <em>, <strong>. All other < and > will be replaced with &lt; and &gt;.