Figure 1. Basic Settings (Outgoing) |
Figure 2. Basic Settings (Incoming) |
Figure 3. Classification |
Figure 4. View Graphs |
Figure 5. View Details |
This article describes how to configure QoS in Tomato 1.23.[1]
OverviewTomato is a free firmware which can replace the firmware of many popular routers.
QoS is a feature to give priority to some internet traffic at the expense of other traffic. For example, giving higher priority to VOIP (voice) traffic so web browsing and file transfers don't interfere. A basic primer on QoS is available.[2] QoS can dramatically improve voice quality, fixing the oft-reported "choppy voice" problem.
AlternativesSome consumer routers come with QoS features. If you're not comfortable flashing your router with Tomato, or you router is not supported, the instructions below may help you understand your router's features (if present) and how they could be used.
However, Tomato's QoS is highly configurable, giving you much more flexibility. I believe it will produce results superior to the limited QoS features available in some consumer routers.
Finally:
• If you don't feel capable of flashing a router, and your router doesn't have QoS, you may want to consider the Hawking Broadband Booster. This is a black-box implementation of QoS. Just connect it and it will configure itself using pre-configured rules. Many MagicJack users have reported positive results. (However, it's hard to believe it could be as effective as a router with greater flexibility and specificity.).
• If you want to flash your router but it's not supported by Tomato, I recommend the Linksys WRT54GL. Other routers could be better. But, I've used this one. If you're wondering what I recommend, that's the only one I can.
How to configure Tomato 1.23After flashing your router with Tomato, open a browser to 192.161.1.1. This is the Tomato administration UI. The default login is user="root", password="admin".
•
Step 1 (Basic Settings -- Outbound)1. Refer to Figure 1.
2. Navigate to "QoS" and "Basic Settings."
3. Make your page look like Figure 1.
However, the "Max Bandwidth" should be changed to reflect
your max upload bandwidth. You can go to www.speedtest.net and run some tests.
Be sure to "save" your changes.
NOTE: This speed should be conservative. 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 conservatively the slowest max-speed normally encountered) is that Tomato will not only prioritize packets according to the rules you specify (Step 3), but it will 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.
Tomato 1.23 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 kernal. For some people, this may work better than QoS. For others, it may reduce the problems associated with specifying your Max Bandwidth too high. (I haven't used it yet. But, the theory is that you would let Tomato prioritize packets using QoS, but send data as fast as it can. TCP Vegas would control the real sending speed at the operating-system level.).
•
Step 2 (Basic Settings -- Inbound)1. Refer to Figure 2.
2. Navigate to "QoS" and "Basic Settings."
3. Scroll down, and make your page look like Figure 2.
However, as described in Step 1, the "Max Bandwidth" should be changed to reflect your max bandwidth.
Be sure to "save" your changes.
Note: Step 1's caution about (conservative) accuracy applies here too.
If you read the novice introduction to QoS,[3] you will have learned that there is some controversy over inbound QoS. It's not "traffic shaping." It involves delaying acknowledgments, discarding packets, etc., to (hopefully) cause the sender to slow down, retry, etc.
My experience with Tomato is that, whatever it's 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). My speed is a constant 1500kbs down, and I notice a considerable improvement using Tomato's inbound QoS feature as described in the Figure 2.
In the
Additional Thoughts section below, there is information on how 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)1. Refer to Figure 3.
2. Navigate to "QoS" and "Classification."
3. Make your page look like Figure 3.
This is where you define how traffic should be identified and classified. The classes relate to the percentages specified in Steps 1 & 2.
On this screen, you want to add the two highlighted rules using the following values:
4. MJ SIP signaling
- Any IP address
- UDP
- Dest port: 5060-5070
- Layer 7: sip
- Class: Highest.
- Desc: MJ SIP signaling.
5. MJ RTP voice
- Any IP address
- UDP
- Dest port: 10000-20000
- Layer 7: rtp-2
- Class: Highest.
- Desc: MJ RTP voice
6. Move these rules "up" above the "bulk" rule (as shown in Figure 3.).
The order of the rules is important. If they are after the "bulk" rule, then 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 be creating more web and DNS (hostname lookup) connections than you will telephone calls. There's no reason for Tomato to even consider applying them to those more frequent connections.
Be sure to "save" your changes.
NOTE: The Layer 7 "rtp-2" is a temporary fix (or alternative) to Layer 7's "rtp" choice. In the future, this fix may replace "rtp" (or given a different name).
•
Step 4 (Check the classification)1. Refer to Figure 4.
2. Connect your MagicJack and place a call to the special echo number (which will echo what you say back to you) 909-390-0003.
3. Navigate to "QoS" and "View Graphs."
4. Click on the slice of the pie that represents "Highest."
Refer to the color code on the left side of the screen. If you place your cursor over a slice of the pie, it will tell you which classification it represents.
NOTE: In Internet Explorer, you must have the Adobe SVG plugin to see the graphs.
•
Step 5 (View classification details)1. Refer to Figure 5.
2. Check "Automatically Resolve Addresses."
You should see two items on this page related to "talk4free.com." One is for "proxy1" (the SIP connection). The other is for "vms1" (the RTP connection).
The city name may be different depending on your location.
The "proxy1" connection occurs when you start MagicJack. The "vms1" connection only occurs when you place or receive a call.
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 to 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 now, 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• Remember that the Tomato page contains a link to make a donation.[4] 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, 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.• An article on Wikibooks describes Tomato's menu choices.[5] It may not yet be complete for version 1.23.
• 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 disable QoS (see Step 1) and compare what you hear.
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. I recommend you navigate to "Port Forwarding" and "uPnP" to disable this feature. If you see any ports on that page that have already been opened, I would delete them. After saving changes to this page, check back to make sure it's still disabled. (I've seen it take a couple tries to make the disable take effect.).
uPnP allows processes to open ports without your approval. This is generally considered a security hole. And, if something opens a lot of ports without your knowledge, you could have a high amount of traffic consuming bandwidth without knowing it, degrading your voice quality.
[1] »
www.polarcloud.com/tomato[2] »
vonage.nmhoy.net/qos.html[3] ibid.
[4] Supra, note 1.
[5] »
en.wikibooks.org/wiki/To ··· Firmware