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

How to set QoS settings via Script

Discussion in 'Tomato Firmware' started by eangulus, Apr 10, 2014.

  1. eangulus

    eangulus Network Guru Member

    As the title states, need some samples to follow.

    What I am doing is trying out this script: http://tomatousb.org/forum/t-256638/3g-web-gui-support

    This should allow a fallback to 3G when ADSL drops. But obviously the QoS is tuned for DSL and not 3G. So I am wanting to try setting up a script for fallback but make it change the QoS to suite also.
     
  2. rs232

    rs232 Network Guru Member

    Use the following as a starting point. Do adjust your limit/allowance of the classes of your specific case of course...

    Code:
    # settings 1
    service qos stop
    nvram set qos_orates=15-60,30-60,15-35,30-70,20-80,20-70,20-100,10-80,5-40,1-60
    service qos start
    # settings 2
    service qos stop
    nvram set qos_orates=15-60,30-60,15-35,30-70,20-80,20-70,20-30,10-80,5-40,1-60
    service qos restart
    If you want to keep it simple and reduce simply the in/out reference bandwidth (and leave the percentages unmodified) try:

    Code:
    service qos stop
    qos_ibw=2000
    qos_obw=500
    service qos start
    
    HTH
    rs232
     
  3. eangulus

    eangulus Network Guru Member

    Thanks for the start, just unsure how to modify the classifications and also how to adjust the percentages in each class using a script.

    Is there an easier way were I could manually setup using GUI then export the setting to use in a script?
     
  4. rs232

    rs232 Network Guru Member

    Answering your two questions:

    not sure why you would like to modify a classifications via the script, but yes it's possible. To adjust the percentage look at my post:

    nvram set qos_orates=15-60,30-60,15-35,30-70,20-80,20-70,20-100,10-80,5-40,1-60

    that comes from my router, run

    Code:
    nvram show | grep qos
    on your and you'll find your percentages (as per GUI btw)

    Exactly as described above in this replay.

    HTH
    rs232
     
  5. Toastman

    Toastman Super Moderator Staff Member Member

  6. eangulus

    eangulus Network Guru Member

    To answer the question of why, I am currently writing a script to fail back to 3G when ADSL is out. That part so far is fine, only that moving from ADSL to 3G screws up the QoS settings due to the change in average speeds.

    So I wanted to change the QoS to suit 3G when switching to it.

    Thanks for the help btw.

    Toastman with the export settings, it made me think is there a way to dump the 3G QoS settings and the ADSL version to 2 files on a USB Drive attached to router, where I can then just pickup either to implement?
     
  7. Toastman

    Toastman Super Moderator Staff Member Member

    The problem with 3G (any 3G I am aware of) is that there is no stable set of bandwidth maxima that can be used for effective QOS, as the amount of available bandwidth to/from the ISP via the 3G service changes from hour to hour, minute to minute.
     
  8. Marcel Tunks

    Marcel Tunks Networkin' Nut Member

    If you have a router compatible with OpenWRT or dd-wrt's kernel 3.x firmwares, then this is a situation where you may consider something like fq_codel to maintain low latency instead of traffic shaping.
    Addendum:
    It still won't work very well without stable/consistent bandwidth.
     

Share This Page