Search:  

 
 
   All ForumsHot TopicsGallery






how-to block ads


 
Forums » VOIP etc » Voice Over IP - VOIP » MagicJack » Giving priority to MJ traffic (Qos, Tomato firmware)
Search Topic:
Uniqs:
9429
Share Topic:
RSS topic:
toggle:
flat / full
normal / watch
Posting:
New To MagicJack..... »
« Tomato, QoS and "choppy voice"  
page: 1 · 2
AuthorAll Replies


amigo_boy

join:2005-07-22
Tempe, AZ
·Cox HSI
·magicjack.com

Giving priority to MJ traffic (Qos, Tomato firmware)

A few months ago I picked up a spare Linksys WRT54GL because I wanted to play with DD-WRT or Tomato (freeware firmwares with more features than Linksys's firmware). I finally got around to it today.

Wow. It makes a very noticeable difference. I called the special MJ number to echo back anything I say (909-390-0003). I went to www.speedtest.net and started a test while I counted from 1. During the download part of the test, I didn't notice much degradation of my echoed voice. But, during the upload

1. Without Tomato's QoS: my voice was very choppy.
2. When I made a mistake with the QoS settings (the VOIP traffic unintentionally fell into the "low" category) my voice completely cut out.
3. When I got the QoS settings correct, there was absolutely no interference to my voice (and the upload speed fell to 150kbs from 250kbs).

I had some trouble figuring out how to set the QoS. I wasn't sure what the src/dst ports should be.

I ended up setting a QoS rule for the IP address associated with the MJ proxy which I know I connect to (learned from this article: »How to find (and change) which proxy you are using.).

But, this didn't do anything. I spent some time looking at Tomato's QoS -> View Graphs and noticed MJ was connecting to another host (replace "proxy1" in the hostname with "vms1"). I created a QoS rule for the IP of that hostname and suddenly it worked perfectly (while doing the upload portion of the speed test).

Looking back on what I did, it looks like:

1. Ports could be specified. The SIP signaling is UDP destination port 5070 (src port 5060). But, this has no effect on the bandwidth used by the actual speech. The real bandwidth is used by RTP voice on UDP destination ports 10000-20000. (I might be wrong about some details. But, this is based on some things I read, and what I saw MJ actually doing in the Tomato QoS -> view graphs.).

2. Hardcoding MJ IP addresses probably isn't a smart idea. But, I hate to give "highest" priority to 10 thousand ports when only one is used for MJ, and the others might be used for something else. The two MJ IP addresses seem more straightforward to me (proxy1 and vms1). Warning: I understand the responsibility I have to detect deteriorated performance due to IP addresses changing, and relate it to my choice to hardcode IP addresses in the router's QoS settings.

3. Tomato's QoS -> view graphs makes it really easy to see if you got your QoS rules correct. It's like a simplified version of WireShark, showing you which classification any traffic fell into. That's how I found the other connection to the "vms1" host.

4. It took me awhile to get my mind around the idea that QoS applied to incoming traffic probably has no meaning since my router doesn't control the other side sending (except perhaps by dropping packets and causing the other side to resend). QoS only seems to apply to outgoing. But, since most people have a fraction of outgoing speed, that's where they need it most.

I'd definitely recommend this. It made a big (verifiable) difference (with my 250kbs up speed). The only caution is that you can get the QoS rules wrong, making things worse than using no QoS. You really have to pay attention to the "view graphs" to make sure things are being classified like you intend.

In summary, what I did was:

1. Load Tomato 1.21 using the Linksys firmware upgrade facility in the factory firmware.

2. Get the router working without any QoS.

3. Enable QoS on the QoS -> Basic Settings page.
... - Set the max outbound and inbound rate/limit to match what I usually get from speedtest.net.
... - Don't change anything in the outbound or inbound classification names or their percentages. (As mentioned above, I'm not sure what "inbound" percentages would do since you can't control the sender's priority.).

4. Set two "outbound" rules in the QoS -> Classifications page.
... - Dst IP: {the IP address of the proxy1 server which MJ connects to}, UDP, any port, Highest priority, "SIP Signaling"
... - DST IP: {the IP address of the "vms1" host}, UDP, any port, Highest priority, "SIP RTP voice"

5. Move those two rules to the top of the list. Or, at least above any other rule that may catch before these rules (like the default rule giving low priority to "bulk traffic" ports 1024-65535).

6. Watch the QoS -> view graphs to see if things are are being classified as you expect, while connected to the special "echo" phone number mentioned above, and while performing a speed test.

NOTE: Use »How to find (and change) which proxy you are using. to determine which proxy you're using. And then, watch the QoS -> view graphs while connected to the "echo" phone number to find the other IP address MJ connects to when making a call. It should be a similar IP, and the destination port will be between 10000 and 20000.

WARNING: If you hardcode IP addresses in Tomato's QoS, you have to be prepared for deteriorated performance if MJ changes their IP addresses. It will be your responsibility to detect that condition and to know that you *hardcoded* these IP addresses and, if they change, the new IP addresses will fall into the default "low" priority classification in Tomato. !!!! Don't call MJ for help without FIRST checking whether your MJ traffic is being classified by Tomato like you think it should be. !!!!

An alternative to using IP addresses is to set the rules to:
... - Any address, UDP, Dst port: 5070, Highest priority, "SIP Signaling"
... - Any address, UDP, Dst port: 10000-20000, Highest priority, "SIP RTP voice"

This way you're VOIP performance won't fall to "low" if MJ changes their IP addresses. But, you will be giving "highest" classification to a large block of ports which may be used by something else. If something else uses a port in that range, it could interfere with MJ.

Mark


swanboy

join:2001-01-22
Hollywood, FL
·Comcast
·magicjack.com

Mark,

Excellent post. This is very good information. I've been using DD-WRT for my router firmware with integrated QoS, like you are with Tomato. Many people do not know they can incorporate MJ VoIP with QoS. This was a much needed post.

Thanks again!

rmdir

join:2003-03-13
Chicago, IL

Can you give me the specifics on how you set your router up using DD WRT? I added 2 services, using port 5070 and 10000-20000 and set priority to premium. I'm using v24 5/24/2008 as the newer one had a memory leak. Voice is still choppy on the echo test. Unfortunately DD WRT doesn't seem to have a way to show a bandwidth graph by port, just an overall look at throughput.


amigo_boy

join:2005-07-22
Tempe, AZ
·Cox HSI
·magicjack.com


1 edit
said by rmdir See Profile :

Can you give me the specifics on how you set your router up using DD WRT?
I haven't used DD-WRT. You might try a forum specific to DD-WRT, like:

»www.linksysinfo.org/forums/forum···hp?f=142

I would also try TCP Vegas. It's part of the Linux kernal which DD-WRT uses (Tomato doesn't). I've seen DD-WRT users say it works better than QoS. I've seen others say they use it and QoS (with bandwidth set to 0, so DD-WRT only prioritizes traffic, but doesn't cap it. It lets TCP Vegas manage overall throughput depending on the congestion it detects).

There's a really long topic here:

»www.dd-wrt.com/phpBB2/viewtopic.···&start=0

Later in the thread they say the current version has it built in, like something you can enable in the GUI.

This sounds good because a major problem with QoS generally is that you have to specify the max bandwidth, and it has to be accurate. If your available bandwidth changes during the day, then you have to specify the slowest speed. You never take advantage of the higher speed that may be available. (If you specify the higher speed, then you have congestion when lower speeds occur, which will diminish the benefits of using QoS.). If you're on cable with "power boost," you'll never take advantage of that because the router is basically capped at the lowest speed you normally have.

So, TCP Vegas sounds useful because it will detect available bandwidth and shape itself to it.

Mark

KodiacZiller

join:2008-09-04
73368

Thanks for the tutorial.

One thing. In step 6 you link to another post where you explain how to use Wireshark in order to determine the proxy. You don't need to do that with Tomato. All you have to do is click the little "Automatically resolve IP address" check box on the "View Details" screen when placing a test call. This will resolve all IP addresses in the list and you can clearly see both the proxy1 and VMS name resolutions.


amigo_boy

join:2005-07-22
Tempe, AZ
·Cox HSI
·magicjack.com

said by KodiacZiller See Profile :

In step 6 you link to another post where you explain how to use Wireshark in order to determine the proxy. You don't need to do that with Tomato. All you have to do is click the little "Automatically resolve IP address" check box on the "View Details" screen when placing a test call. This will resolve all IP addresses in the list and you can clearly see both the proxy1 and VMS name resolutions.
Thanks. I didn't think of that.

I should have also added a suggestion to set the priority for the two rules to "lowest." Then do the simultaneous echo and speed tests. MJ should be noticeably degraded if the rules are applying.

(If someone has extremely high speeds, like FIOS, maybe not. They'd have to concoct their own tests to put a load on their connection. For me, at 256/1500, setting the rule to "lowest" makes MJ completely unusable during the speed test. No voice gets through at all. So, I definitely know the rule is being applied.).

Mark


amigo_boy

join:2005-07-22
Tempe, AZ
·Cox HSI
·magicjack.com


1 edit
I should add that I played with the inbound QoS. It works well.

On the QoS -> Basic Settings page,
....- Set the "Inbound limit" to the speed you regularly get when performing a test at speedtest.net. (Do the speedtest with no other activity. If you get different speeds, use the lowest.).
....- Set "Highest" to 100%.

That's all their is to it. I was skeptical about this because I've read there's no way to do inbound QoS (because your router can't control the speed at which someone else's router sends data to you. But, I guess it slows down sending acknowledgments which causes the sender to slow down?).

But, it definitely works. It can be tested in the same way I described in the prior posting. However, I tested it using www traffic (just to get a better idea of whether it really does anything).
....- Tomato has two preset rules for "www" on the "classification" page. They are "High" (for the first 512k traffic) and "Low" (for everything over 512k).
....- Just change Inbound "High" and "Low" on the Basic Settings page from "None" to 10%.
....- Visit a web page. It should be immediately obvious that the traffic slowed down.

So, by setting "Highest" to 100%, it will always get priority over any other traffic. The rest of the traffic won't be prioritized and will consume whatever's left (up to 100% if there's no MJ traffic).

My inbound speed is only 1500kbs. So, it wasn't hard for me to saturate my connection and determine MJ was getting priority. Using the simultaneous echo and speed tests, I saw my download speed drop by about 100kbs while speaking to the echo number.

The only thing I don't like about this is that you have to set the outbound and inbound limits conservatively. If your speed varies during the day (or your ISP gives "power boost") you'll never take advantage of it because you have to use the lowest speed you normally obtain. If you specify a higher speed, Tomato will send packets at that speed, and cause congestion (which, from what I've read, can eliminate the gains of using QoS).

That's where DD-WRT looks appealing. From what I've read, you can use TCP Vegas (a feature of the Linux kernal) to avoid congestion. People say using it alone is better than using QoS. Others say using it with QoS works well if the inbound/outbound limits are set to zero. Apparently DD-WRT allows zero, and will just prioritize packets, but not cap anything. The underlying TCP Vegas will control the flow of the entire pipe. (I haven't tried it yet. I'm just basing this on some things I've read.).

Mark


amigo_boy

join:2005-07-22
Tempe, AZ
·Cox HSI
·magicjack.com

reply to amigo_boy
An update re Tomato v. DD-WRT (and TCP Vegas). I burned another WRT54GL I had with DD-WRT v24 SP1. (TCP Vegas is supposed to be enabled by default.).

1. With QoS disabled (with TCP Vegas only), it didn't perform as well as Tomato's QoS.

2. I enabled QoS (no bandwidth limits). DD-WRT's settings don't translate well to the settings I use in Tomato. (I couldn't specify a destination IP address.). I chose the "service" RTP (which examines packets, adding to the CPU's load). I didn't notice any difference compared to #1 above.

In both cases my voice was choppy. I think it was better than the standard Linksys firmware. I saw the speedtest results drop (meaning it was doing something). But, it wasn't as good as Tomato. I went back to my Tomato router and performed the same test. No breakup at all.

Mark

teddy_bear

join:2005-02-06
USA

Re: Giving priority to MJ traffic (QoS, Tomato Firmware)

I'm trying to set up QoS on my ASUS WL-520GU router. Unfortunately I can't get good results no matter what I do...

My actual down- and uplink speeds are 6800/490 kbps. But as soon as I enable QoS on Tomato 1.21ND, my speeds are capped at 3900/380 kbps - no matter what the other settings are! The loss of 40%+ of downlink speed seems too much. What could I be doing wrong??

Setting aside the question of whether or not using QoS will improve my VoIP quality while using torrents or HTTP downloads, how can I enable QoS in Tomato on my router without limiting my download speed permanently at ~60%?

Does anyone get better results with the same router?


amigo_boy

join:2005-07-22
Tempe, AZ
·Cox HSI
·magicjack.com

said by teddy_bear See Profile :

how can I enable QoS in Tomato on my router without limiting my download speed permanently at ~60%?
I'm using Tomato (Linksys WRT54GL). I haven't experienced the slowdown you describe.

For general Tomato questions, it would be better to go here:

»www.linksysinfo.org/forums/forum···hp?f=116

Post your actual QoS basic settings and classifications. My guess is you have something wrong with your QoS settings.

Mark


amigo_boy

join:2005-07-22
Tempe, AZ
·Cox HSI
·magicjack.com

reply to teddy_bear
said by teddy_bear See Profile :

My actual down- and uplink speeds are 6800/490 kbps. But as soon as I enable QoS on Tomato 1.21ND, my speeds are capped at 3900/380 kbps - no matter what the other settings are!
One thought. Are you using a cable tier with "speed boost?" You didn't say how you're measuring your speed. But, if your service has a variable download speed (an initial burst), then you'll lose the benefit of this when setting the inbound speed in Tomato's QoS.

This seems to be a shortcoming of QoS. You have to specify the lowest speed you normally encounter. You can never take advantage of higher speeds. (If you specify a higher speed in Tomato, it could cause congestion, reducing the benefits of QoS.).

Mark

teddy_bear

join:2005-02-06
USA

Thanks amigo_boy! I'm checking the linksysinfo forum now, and will ask there if I don't find the answer...

And no, my cable provider does not use "speed boost" - my speed is stable at 6800/490 kbps. That's what all speed tests show (speedtest.net, or speakeasy.net), and that's what the torrents reach if I unleash them (well, at least download - torrents never reach my upload limit for some reason). What's interesting is that when QoS is activated on Tomato, the download speed is always capped at 3900 - no matter what downlink speed I specify in the settings. I can set it to 1, 4000, 7000 or 100000 - it's still capped at 3900 as long as QoS is enabled ...


amigo_boy

join:2005-07-22
Tempe, AZ
·Cox HSI
·magicjack.com

said by teddy_bear See Profile :

What's interesting is that when QoS is activated on Tomato, the download speed is always capped at 3900 - no matter what downlink speed I specify in the settings. I can set it to 1, 4000, 7000 or 100000 - it's still capped at 3900 as long as QoS is enabled ...
This idea comes from »en.wikibooks.org/wiki/Tomato_Fir···guration . I've never cleared NVRAM on my router. I don't know if there's any risk of bricking your router.

If I were having your trouble I would go into Tomato's Administration->Configuration->Restore Default Configuration-> Erase all data in NVRAM memory.

Maybe power off/on after that's complete. Then reconfigure Tomato, but be sure not to change any inbound settings on the "basic settings" page except the max inbound limit. (I.e., leave everything below the inbound limit set to "none"). And, don't change anything in the "classifications" page.

If that doesn't work, you should post to that Tomato forum I mentioned earlier.

Mark

KodiacZiller

join:2008-09-04
73368

I am on a cable connection with powerboost (8/2, boosts to about 20/4). There is a trade-off between setting QOS and putting MJ traffic as the first priority and not setting QOS and achieving my full Internet speed. I chose the latter. My connection is fast enough that MJ shouldn't be interrupted at all unless I happen to be torrenting or something at the time.


amigo_boy

join:2005-07-22
Tempe, AZ
·Cox HSI
·magicjack.com

said by KodiacZiller See Profile :

I am on a cable connection with powerboost (8/2, boosts to about 20/4).
You might try DD-WRT which uses TCP Vegas (discussed earlier in this thread). I wasn't impressed when I tried it (compared to ordinary QoS with Tomato). But, my speed is 1.5/.5. Maybe it would do better on a faster connection than no QoS (or limiting your powerboost using ordinary QoS with fixed, slower speeds representing your average speed).

Mark

KodiacZiller

join:2008-09-04
73368

said by amigo_boy See Profile :

said by KodiacZiller See Profile :

I am on a cable connection with powerboost (8/2, boosts to about 20/4).
You might try DD-WRT which uses TCP Vegas (discussed earlier in this thread). I wasn't impressed when I tried it (compared to ordinary QoS with Tomato). But, my speed is 1.5/.5. Maybe it would do better on a faster connection than no QoS (or limiting your powerboost using ordinary QoS with fixed, slower speeds representing your average speed).

Mark
I am not crazy about DD-WRT -- the developer is trying to commercialize it and make money on the back of GPL'ed code. There's nothing wrong with that IF the GPL license is adhered to. But, as many on various forums have pointed out, he seems to want to control where DD-WRT can be used (i.e., he only wants it used at home, which might violate the GPL).


amigo_boy

join:2005-07-22
Tempe, AZ
·Cox HSI
·magicjack.com

reply to amigo_boy
said by amigo_boy See Profile :

said by KodiacZiller See Profile :

I am on a cable connection with powerboost (8/2, boosts to about 20/4).
You might try DD-WRT which uses TCP Vegas (discussed earlier in this thread). I wasn't impressed when I tried it (compared to ordinary QoS with Tomato). But, my speed is 1.5/.5. Maybe it would do better on a faster connection than no QoS (or limiting your powerboost using ordinary QoS with fixed, slower speeds representing your average speed).
FYI. There is now an unofficial (modded) version of Tomato 1.22 with TCP Vegas. Just announced here:

»www.linksysinfo.org/forums/showt···?t=59885

Mark


Authority
Obama Biden '12

join:2000-03-29
Beverly Hills, CA
·AT&T Yahoo
·Packet8
·magicjack.com

reply to amigo_boy
Re: Giving priority to MJ traffic (Qos, Tomato firmware)

said by amigo_boy See Profile :

I hate to give "highest" priority to 10 thousand ports when only one is used for MJ, and the others might be used for something else.
What about L7?

»en.wikipedia.org/wiki/L7-filter

Someone should the devs? Looks like feature requests go here:

»sourceforge.net/tracker/?atid=55···c=browse


amigo_boy

join:2005-07-22
Tempe, AZ
·Cox HSI
·magicjack.com

said by Authority See Profile :

What about L7?
That might work. Tomato lets you choose protocols, including RTP (which the port 10000-20000 is carrying). But, I've read that packet inspection adds to the router's CPU load, potentially causing the router to seize up under too much load (like torrents).

Using an IP address seemed simpler to me (even though the IP address will eventually change and hose me).

Mark


Authority
Obama Biden '12

join:2000-03-29
Beverly Hills, CA
·AT&T Yahoo
·Packet8
·magicjack.com

reply to amigo_boy
said by amigo_boy See Profile :

I ended up setting a QoS rule for the IP address associated with the MJ proxy which I know I connect to (learned from this article: »How to find (and change) which proxy you are using.).
A safer solution, which i tried and am using, is to give priority to the entire subnet. The IP may change, less likely the whole subnet.
Thread is
-
Forums » VOIP etc » Voice Over IP - VOIP » MagicJackNew To MagicJack..... »
« Tomato, QoS and "choppy voice"  
page: 1 · 2


Monday, 09-Nov 18:38:17 Terms of Use | Privacy Policy | Hosting by www.nac.net - DSL,Hosting & Co-lo | feedback | contact
over 10 years online! © 1999-2009 dslreports.com.
page compression OFF
Most commented news this week
· [65] VoIP Over 3G Still Not Working For iPhone
· [49] Verizon Keeps Swinging At AT&T
· [31] Bill Would Force ISPs To Block Financial Scams
· [15] Mediacom Hints At 50, 100 Mbps Speeds
· [12] Clearwire To Get Another $1.5 Billion
· [9] 15 States Have Now Gotten Broadband Mapping Money
· [5] AT&T Launching New 7.2 Mbps 3G Modem
Most people now reading
· Google Has Acquired Gizmo5 [VOIP Tech Chat]
· Divorce advice... [General Questions]
· Framed for child porn 151; by a PC virus [Security]
· How in the world am I going to get into college? [General Questions]
· My cat is reluctant to exercise. [General Questions]
· 60 Minutes piece on cyber security last night [Security]
· Windows 7 boot manager editing questions [Microsoft Help]
· [WotLK] Shaman tier 10 is out [World of Warcraft]
· Is Gear Score now the new requirement to get pug invite? [World of Warcraft]
· A fishy CRTC tarriff filed by bell? [TekSavvy]