1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

QoS basic settings with VOIP priority

Discussion in 'Tomato Firmware' started by jenom, Jul 27, 2014.

  1. jenom

    jenom Networkin' Nut Member

    I have a VOIP device connected AFTER a TomatoUSB (shibbys 121) router , which is getting a 6 MBPS cable internet (I know, it is not much !)

    With QoS is disabled, when I downloading 1,2 torrent file, a phone call gets very bad, distorted.
    I want to give priority to VOIP traffic, when a phone is in use, and place limit specially on torrent downloads.
    However, when a phone not in use, I do not want to slow down significantly anything else.

    Can this be done by changing QoS settings??????

    When I looked at QoS basic setting webpage, my understanding is that a second limit box means the maximum limit, but what does the first limit box ?--minimum limit ? reserved limit ????


    I would appreciate, if someone also using VOIP could upload a screenshot of their QoS basic setting page.
    Thanks for any help/suggestion!
     
  2. Mango

    Mango Addicted to LI Member

    I believe you're referring to the selection boxes in the rates/limits section, correct?

    The first box (on the left) is indeed the minimum portion of bandwidth that will be allocated to this class. You're correct that the second box (on the right) is for maximum. Bandwidth in that class will use up to the maximum, if bandwidth is available.

    This means that all the boxes on the left side must add up to 100%.

    Unfortunately, as far as I am aware there is no way to turn on QoS only when a VoIP call is in progress. I've permanently rate limited my outbound bandwidth to about 66% of measured. At least in my experience, I haven't needed to limit inbound as severely. I've had good results with 90% of measured.

    Here are some screens of my setup: http://www.dslreports.com/forum/r29223320-Toastman-QoS-is-awesome
     
    James Good likes this.
  3. James Good

    James Good Reformed Router Member

    Thanks for the useful link there, Mango. What version of Tomato are you using now? I see those screen shots are quite old. I'm still trying to work out how much of Shibby's QOS stuff is working on V121 ARM. I don't believe the QOS - View Details / View Graphs / Transfer Rates are working correctly; I'm seeing odd src and dest addresses, which I believe are somewhat mixed up. Would be great to hear someone say they work correctly, or confirm my suspicions of problems.

    -=James.
     
  4. Mango

    Mango Addicted to LI Member

    I am using: Tomato Firmware v1.28.7505 MIPSR2Toastman-RT K26 USB Std
     
    James Good likes this.
  5. jenom

    jenom Networkin' Nut Member

    thanks for the info and sharing your settings.....I am using Shibby's latest RT-Nxx build.

    meanwhile, I experimented by assigning values to the first box on the left (minimum) and sliced up my bandwidth into small portions and made them a total of 100 %.
    However, this seems like worked as "reserved" bandwidth, and even if that particular process was not in use, the "reserved" bandwidth was taken away.
    As a result, everything slowed down to crawl, from web browser to skype video chat....6 Mb not enough to allocate "reserved" minimum bandwidth to a dozen of processes.....but it might work with higher speed services.
    I have just put a 100 kbps download limit in uTorrent , so it will not suck away the bandwidth from others when there are fast download seeds are available.
     
  6. Mango

    Mango Addicted to LI Member

    That's strange. That shouldn't happen. Was the right box set to 100% for both the outbound and inbound section, and did you set your max bandwidth limit correctly?

    If that was the case, I have no idea why it would restrict your bandwidth that much. The only other thing I could think of to try is to look at View Details and be sure the router is classifying traffic correctly.
     
  7. jenom

    jenom Networkin' Nut Member

    I set some limits in the "right" boxes also, around 70-80 %, because I thought nothing needs to go or could go 100%, when there is a plan in place to share.
     
  8. cloneman

    cloneman Networkin' Nut Member

    To configure QoS for the first time without losing your mind, start with a very, very basic setup.
    Use only 2 classes - default and voip.

    If your connection is 6/1 set your global maximums to 5.5 / 0.7 , or something like that, maybe lower at the beginning while you are testing.

    Use the details page to see if you traffic is actually being classified correctly.

    Your classes should look like this:

    #1 Voip 10% - 30% ( doesn't really matter what you put here), as long as you've got more than 100kbps per phone call. Setting it to 100% doesn't help you, being above the other classes (#1) is what matters.

    #6 Default 5% - 95%


    I would recommend also turning on the Setting for DSL connections even if you don't have DSL (pick any number from the drop down), as this causes unwanted traffic to be pushed out of the way more aggressively during a VoIP call.
     
  9. jenom

    jenom Networkin' Nut Member

    sshot-11.png sshot-10.png QoS webpage settings are very confusing.....maybe only in Shibby's ?
    There are "Class names", where one can type in different names
    I guess, choosing only from the already listed names
    I assume "Class 1 " has the highest priority
    But what "priority" does, if the inbound/outbound limits are already controlling traffic?

    QOS Class Names(Toggle Visibility)
    (Maximum 10 characters, no spaces)
    Priority Class 1
    Priority Class 2
    Priority Class 3
    Priority Class 4
    Priority Class 5
    Priority Class 6
    Priority Class 7
    Priority Class 8
    Priority Class 9
    Priority Class 10

    There is also "Classification" page, where "classes" can be moved up/down...SIP has a number of #16 !
     
    Last edited: Aug 2, 2014
    James Good likes this.
  10. Mango

    Mango Addicted to LI Member

    Priority and limits work together. In the event that two classes have high maximums and low minimums, the higher classes will steal bandwidth from the lower classes. For example:

    Class 1: 5% / 100%
    Class 2: 5% / 100%

    In the event that both Class 1 and Class 2 traffic occurs at the same time, Class 1 will use 95% of available bandwidth, and Class 2 will use the remaining 5% that it is guaranteed.

    As far as I'm aware, the only time classification order is relevant is if rules have overlapping criteria.
     
  11. jenom

    jenom Networkin' Nut Member

    My voip device also a 4 port router..so I will just move it to front of router, after the cable modem
    It has its own QoS, which will automatically grabs enough bandwidth when in use
    Thanks for all the replies!
     
  12. Porter

    Porter LI Guru Member

    @jenom
    If you are successful with your cable modem, that's great.

    If you still need help, here is a guide. I also wrote this maybe for further reference in the common Tomaot topics thread because this is a very common question.

    ----------------------------------------------

    Please just reset your config and start with the default settings.

    I don't remember reading that you measured your bandwidth speed first, so please do that. Just use google to find some site near you. Measure a few times across the day. Those two values are the basis for the next step.

    Enter this measured bandwidth into the according fields on QoS/Basic Settings. Now comes the tricky part: How big a safety margin do you need? This question only applies to ADSL-connections, other connection maybe need 10-15% margin and you are safe. If you an ADSL connection, there are three variables which influence your config: the two bandwidth values and the overhead value. The overhead value is difficult to find out because to know it exactly you need to know the underlying protocols. This isn't feasible for most people so just start with a higher value of 32 or even 40. You can later expoeriment with this calues. A value that is too high might waste bandwidth but you will still have a more stable connection. This is important because of VoIP. As for the bandwidth settings just start with deducing 15% of your maximum measured speeds and enter those. If you don't want to enable the overhead calculating feature, your safety margin should be rather at 30%, because of VoIP and it's high overhead an ADSL connections.

    Next up you need a new filter for your VoIP device. I guess it has a static IP so go to the classification page and make a new filter with an IP setting (the field reads "Any address"). Say 'Src Address' and put in your device's IP. Assign the VoIP class. Add this filter and put it somewhere up with all the other VoIP filters. Maybe just make it the first one in that group.

    You said that bittorrent traffic gives you a hard time so please consider telling your torrent client to use one specific port and just make a new filter for this port on the classification page (src and dst port). Assign the P2P class.

    If you have done all this go to the graphs page and monitor your traffic while you conduct a voice call or while torrenting. Please make sure that the new filters work and that everything ends up where it should be.

    If you run into problems, please always post your whole QoS config (Basic Settings + Classification).
     
  13. WaylonCovil

    WaylonCovil Serious Server Member

    Mango, can you explain the above quote a bit more? I see that I can move items in my classification screen up or down and I'm curious how that affects priority. It almost seems like there are two priorities. The first is the class, and then there's the number. I'm having trouble wrapping my head around when the second priority would come into play.

    Thanks in advance.
     
  14. Porter

    Porter LI Guru Member

    @WaylonCovil
    There is traffic which matches more then one rule/filter. The filter set is traversed from the top down and once one filter matches no other filter can match. This is why the order of the filters is sometimes relevant.
     
    Mango likes this.
  15. WaylonCovil

    WaylonCovil Serious Server Member

    (My apologies for resurrecting a thread that's two months old.)
    Porter, with regard to the above quote, if I have Src Address in my QOS, will that account for for traffic being sent both to and from my VOIP device? Wouldn't my VOIP device be the destination when it's receiving and the source when sending? Would I need two rules?
     
    Last edited: Oct 16, 2014
  16. Porter

    Porter LI Guru Member

    You could just match its IP if this device doesn't do anything else. If you want to match the port, then first set the protocol to TCP/UDP (although you probably just need UDP, but I'm not very knowledgable when it comes to VoIP specifics) and change the field that says "Any Port" to "Src or Dst".
     
  17. mw333

    mw333 Serious Server Member

    What works for me is:

    TCP/UDP Dst Port: 3478,3479,5060-5063,5070,5090 VOIP/Game SIP, Sipgate Stun Services

    and

    TCP/UDP L7: rtp Media RTP

    If your torrent priority is less than media it should work.

    Also, monitor your phone to see what it is doing. For example, not all phones utilize 5060. I have one that uses 5070 and another that uses 5090. The data, however, is rtp.
     

Share This Page