Tomato Qos

< MagicJack‎ | Support Resources‎ | How-To‎ | QoS
The latest reviewed version was checked on 16 August 2017. There are template/file changes awaiting review.

With those settings the QOS engine of Tomato will limit packets that match your QOS rule to 4 megabits. If you have a rule that specifies 50% then the result is a limit of 50 megabits. Since your ISP provides only 10 megabits the packets matched by the 50 megabit rule will not be slowed down at all. Tomato is a small, lean, open source alternative firmware for Broadcom-based routers. I have the RT-AC68U with tomato and qos on. I have a 250mb/s connection. But when i have qos on i only get 150mb/s i think this has to do with CTF but my cpu usage when doing a speed test is only 45%. Is there anything I can do to get faster download with qos. Tomato's inbound QoS is not true 'traffic shaping.' It involves trickery, such as delaying acknowledgments, discarding packets, etc., to (hopefully) cause the sender to slow down, retry, etc. In the experience of the author of this How-To, whatever Tomato is doing, it's very effective.

This article describes how to configure Tomato's QoS feature for use with MagicJack.

The following figures are referred to in this article.

  • Screenshots
  • Figure 1. Basic Settings (Outbound)

  • Figure 2. Basic Settings (Inbound)

  • Figure 3. Classification

  • Figure 4. View Graphs

  • Figure 5. View Details

Overview[edit]

Tomato is a free firmware which replaces the factory firmware of many popular routers. It provides features not found in most consumer-grade routers.

For a full description of Tomato's features, see the Tomato's Wikibook.

For general information about QoS, see the main QoS How-To.

Alternatives[edit]

For information about alternatives, see the main QoS How-To.

Tomato Qos

How to flash Tomato[edit]

This article does not cover the process of flashing your router. You are encouraged to fully understand how to flash before doing it. If done carelessly, you can 'brick your router' (make it unusable). The following suggestions are provided as a starting point:

  • See
    • The installation instructions.
    • The Tomato FAQ.
    • The readme which comes with the Tomato 7-zip file (unarchived using the free 7-zip).
  • For questions (before and after flashing), see the Tomato support forum.
  • If you need to buy a router to use with Tomato, this poll of which router is most commonly used with Tomato may help you gauge which router is 'best' (simply based upon popularity).

Tomato Qos System

How to configure Tomato[edit]

After flashing your router with Tomato, open a web browser to your router's IP address, most likely http://192.168.1.1. This is Tomato's Administration UI. The default login is user = root, password = admin.

Step 1: Basic Settings -- Outbound[edit]

  1. Refer to Figure 1.
  2. Navigate to QoS and Basic Settings.
  3. Make the top of your page look like Figure 1.

However, the Max Bandwidth should be changed to reflect your maximum upload bandwidth. You can go to speedtest.net and run some tests to determine your speed.

Be sure to Save your changes.

Note: Max Bandwidth should be a conservative value. For example, if your speed varies throughout the day, you should use the slowest speed you regularly experience. If you use cable internet, and it has 'speed boost' (a temporary increase in bandwidth), you should take that into consideration too.

The importance of this speed being accurate (and conservative) is that Tomato not only prioritizes packets according to the rules you specify (see Step 3), but it will also throttle the speed at which it sends them. If you set your Max Bandwidth too aggressively, Tomato will send packets too fast, causing congestion which will diminish the benefits of prioritization.

TCP Vegas[edit]

Starting with version 1.23, Tomato includes a new feature called TCP Vegas. You will see it at the bottom of the page. This is an outbound congestion avoidance algorithm built into the Linux kernel. For some people this may work better than QoS. For others, it may improve QoS by reducing the problems associated with variable bandwidth speeds, and specifying your Max Bandwidth to the minimum. The theory is that you could set your Max Bandwidth to represent your actual maximum, and TCP Vegas will avoid congestion due to sending packets faster than the actual maximum at any particular moment. (This is new and results are mixed. Whatever you do should be compared to following the QoS instructions in this document, without TCP Vegas enabled.).

Step 2: Basic Settings -- Inbound[edit]

  1. Refer to Figure 2.
  2. Navigate to QoS and Basic Settings.
  3. Scroll down, and make the bottom of your page look like Figure 2.

However, as described in Step 1, the Max Bandwidth should reflect your max bandwidth.

Be sure to Save your changes.

Note: Step 1's caution about the conservative accuracy of Max Bandwidth applies here too.

If you read the novice introduction to QoS,[1] you will have learned that some controversy exists over inbound QoS. Tomato's inbound QoS is not true 'traffic shaping.' It involves trickery, such as delaying acknowledgments, discarding packets, etc., to (hopefully) cause the sender to slow down, retry, etc.

In the experience of the author of this How-To, whatever Tomato is doing, it's very effective. Others have suggested that setting the outbound Max Bandwidth to a maximum value (all 9s) works better. This may depend on the speed of your internet connection, whether you have a cable provider who uses 'speed boost' (or other conditions which cause the speed to vary). The speed of the author of this How-To is a constant 1600kbs down, and he notice's a considerable improvement using Tomato's inbound QoS feature as described in this section.

The Additional thoughts section contains instructions to test the effectiveness of your QoS. This can be used to test different outbound Max Bandwidth values, including unlimited (all 9s).

Step 3: Classification[edit]

Navigate to QoS and Classification.

Dedicated Computer[edit]

If you use a dedicated computer to run MagicJack only, all you have to do is create the QoS classification rule changing 'Any Address' to the Source (Src) MAC Address of the computer's network interface card's (NIC).

After creating that rule, move it to the top of the list so that it's traffic will be caught first, before other rules may catch it. (For example, if you leave it at the bottom, the Bulk Traffic rule would catch all your VOIP traffic, and it would be categorized as Lowest.).

Tomato qos xbox

Traditional (mixed use) Computer[edit]

  1. Refer to Figure 3.
  2. Make your page look like Figure 3.

This is where you define how traffic should be identified and classified. The classes here relate to the percentages specified in the prior two steps.

On this screen you should add the two highlighted rules seen in Figure 3, using the following values:

  1. MJ SIP signaling
    • Any address
    • UDP
    • Destination (Dst) port: 5060-5070
    • Layer 7: sip
    • Class: Highest.
    • Description: MJ SIP signaling.
  2. MJ RTP voice
    • Any IP address
    • UDP
    • Destination (Dst) port: 10000-30000[2]
    • Layer 7: (In Tomato v. 1.23 use rtp-2. In later versions use rtp. See the important note below.).
    • Class: Highest.
    • Description: MJ RTP voice

Move these rules up, above the Bulk Trafic rule (as shown in Figure 3.).

Qos

The order of the rules is important. If they are after the Bulk Traffic rule, that rule will apply to the MagicJack traffic before these rules are considered.

Also, there's no reason to move them even higher. These rules apply when a connection is created. You'll probably open more web and DNS (hostname lookup) connections than you will telephone calls. There's no reason for Tomato to even consider applying these rules to those more frequent connections.

Be sure to Save your changes.

IMPORTANT: The Layer 7rtp filter did not work prior to Tomato v1.23. In v1.23, only the rtp-2 filter works. In future versions, that fix will be moved into the rtp rule (and the rtp-2 rule may disappear).

Step 4: Check the classification[edit]

  1. Refer to Figure 4.
  2. If your MagicJack is already started, go to the softphone's Menu->Advanced Users->Restart and restart it. Otherwise, connect/start your MagicJack.
  3. Call the special echo number (which will echo what you say back to you): 909-390-0003.
  4. Navigate to QoS and View Graphs.
  5. Click on the slice of the pie that represents Highest.

Note: Refer to the color code on the left side of the screen to understand which slice is Highest. If you place your cursor over a slice of the pie, a bubble-help should tell you which classification it represents.

Qos

NOTE: In Internet Explorer, you must install the Adobe SVG plugin to see the graphs.

Step 5: View classification details[edit]

  1. Refer to Figure 5.
  2. Check Automatically Resolve Addresses.

You should see two items on this page related to 'talk4free.com.' One is to a host named 'proxy1' (the SIP connection). The other is to 'vms1' (the RTP connection).

The city name of both hosts is dependent upon on your location.

Tomato Qos

The 'proxy1' connection occurs when you start MagicJack. It is a control connection. The 'vms1' connection occurs when you place or receive a call. It is the connection which carries the voice traffic (the bulk of traffic).

If you don't see either of these items, you will have to click on other slices of the pie to see where they were classified. If your rules didn't apply, then it probably fell into the 'bulk' rule (which is 'lowest'). Depending on the speed of your connection and whether it was the vms1 (RTP) connection, speaking into the special echo number will probably produce unusable results. Especially if you are doing anything else, like browsing the web.

Alternatively, you can navigate to 'QoS' and 'View Details.' This is the same screen you are on when navigating through the pie chart, but it shows all traffic. You can click the headings ('destination' or 'class') and it will sort everything. This might help you locate either of those servers if you have trouble locating them by going through the pie chart.

Additional thoughts[edit]

  • Remember that the Tomato page contains a link to make a donation. If Tomato is useful, buy the author lunch at McDonald's. (If it's really useful, Super Size it.).
  • It's a good idea to perform steps 4 & 5 occasionally to check that it is operating as expected. And, keep them in mind if your voice quality ever deteriorates significantly. QoS is an excellent tool. But, if the rules don't apply as you expect, it can make things much worse.
    • WARNING: You have the responsibility to check how the rules are being [mis-]applied before reporting a voice-quality problem to MagicJack support.
  • You can use www.speedtest.net to test the effectiveness of your QoS (and any changes you make to the settings suggested by this document). Call the special echo number (see Step 4) and while counting into the phone, start a speed test. The speed test will saturate your connection (down first, then up).
    • You can also use this test to compare the difference between QoS enabled and disabled. (You can disable QoS on the QoS->Basic Settings page.).
    • BTW: If QoS is operating correctly, you should see about 100kbs difference in speedtest results (with and without QoS).
  • Unrelated to QoS (except that unwanted traffic will compete with your voice traffic): By default, Tomato 1.23 has UPnP enabled. The author of this document recommends you navigate to Port Forwarding and UPnP to disable this feature. If you see any ports on that page that have already been opened, delete them (unless you know why they are open). After saving changes to this page, check back to make sure it's still disabled. (Sometimes it takes a couple tries to make the disable take effect.).
    • UPnP allows processes to open ports without your approval. In a perfect world, this seems nice. However, it can be a security hole. And, if something opens a lot of ports without your knowledge, you could have a high amount of traffic consuming bandwidth, degrading your voice quality, without you knowing it.
  1. The basic QoS primer, mentioned on the main QoS How-To page.
  2. On January 23, 2009 it was noticed that this changed from port range 10000-20000 to 10000-30000. It appears MagicJack is now opening ports in the 20000-30000 range. Setting this port range too narrowly will cause the RTP voice traffic to go to the 'Lowest' category, seriously degrading the audio quality.
Retrieved from 'https://en.wikibooks.org/w/index.php?title=MagicJack/Support_Resources/How-To/QoS/Tomato&oldid=3268905'


Choosing a custom firmware for your router is a formidable task. You need to take a lot of factors into account; the firmware’s compatibility with your router, the features that it comes packed with, and whether or not it’s reliable.

Once you’ve established the compatibility, you need to ensure that the third-party firmware that you’re about to install for your router is even worth it before you can move on to following the manufacturer’s instructions and installing it.

In this guide, we’ve detailed the three best custom firmware on the internet, along with their upsides and downsides, that you can get your hands on. So, without further ado, let’s hop straight into it!

DD-WRT vs. Tomato vs. OpenWRT – Everything that You Need to Know!

DD-WRT

DD-WRT is currently the most reputable custom firmware out there. Being over a decade old, this firmware sure has gained its customers’ trust and established itself among enthusiasts.

Pros

Tomato Qos Settings

Not only does the DD-WRT firmware supports more routers (even the low-priced ones) than any other third-party firmware, with the plethora of options available in its interface, you can configure almost everything to your liking.

Since it supports more routers than anyone else, its community is also larger than anyone else’s. This means that you’ll get solutions to any router related problem fairly quickly. You may also find help on issues regarding the routers not supported by DD-WRT.

Furthermore, it comes with a Wake-on-LAN feature, which allows you to remotely turn on your PC and perform the maintenance tasks that are deemed necessary.

When it comes to the security of your networks, it provides you with a robust firewall to make sure that your connections are fully secured. Also, you can easily configure its built-in Open VPN support according to your need.

Finally, to enhance its performance, DD-WRT comes with a pretty impressive QoS feature.

Cons

On the contrary, the complex interface of DD-WRT can be mind-boggling sometimes, especially if you are someone who prefers a simpler, more user-friendly interface. As a result, you would have a hard time navigating the interface and setting everything up.

Tomato

Tomato, well-known for speeding up routers, is another one of the custom firmware that has been in the market for quite some time now.

Pros

With a very simple, direct, and easily understandable interface, it is very user friendly and is perfect for people who do not know a lot about networks.

Recently, the AdvancedTomato project has replaced the classic Tomato firmware by Shibby. As a result, we have found ourselves a more advanced GUI, which allows a real-time monitoring of critically important data.

Network management on AdvancedTomato is more convenient and visually satisfying. Just like DD-WRT, it has a built-in Open VPN and a QoS which you can configure according to your liking.

Cons

Tomato Qos Classification

However, unlike DD-WRT, Tomato does not support a lot of routers, meaning that its benefits are limited to certain routers only. Also, its community is much smaller as compared to DD-WRT.

Tomato Qos

Other than that, there are some features of DD-WRT and OpenWRT that are not supported by the Tomato firmware.

OpenWRT

Tomato Qos Voip Settings

OpenWRT is the oldest of the three open-source custom firmware under inspection in this blog post. Today’s OpenWRT is the union of the original OpenWRT and LEDE.

Pros

The interface of OpenWRT is even more intricate than that of DD-WRT so it offers you even greater customization, making it ideal for technical individuals. Furthermore, it has QoS Support and built-in VPN service just like DD-WRT and Tomato.

What makes it stand out, however, is that unlike both Tomato and DD-WRT, it doesn’t include non-free binary blobs.

Cons

There are only a few routers that OpenWRT supports since it requires the routers to have non-free drivers.

Also, due to its non-friendly and complex layout, not only the process of configuration is a bit time consuming, only those with some knowledge of third-party firmware can fully reap its benefits.

Conclusion

Whichever custom firmware you choose to go for is completely up to you. People who like to tinker and optimize their tech will be far better off with a third-party firmware than they would be with their manufacturer’s.

The custom firmware will be more likely to receive regular updates and there will be a lot more additional features like Open VPN client support and QoS that your manufacturer’s firmware may lack.

All in all, whether it’s streaming, browsing the internet, or any other purpose, you will see a significant boost in your router’s performance using a third-party firmware.