Advanced Traffic Shaping

Discussion in 'Tomato Firmware' started by draftvader, May 12, 2010.

  1. draftvader

    draftvader Addicted to LI Member

    This morning I finally took control of the main router in my apartment block. The previous "manager" had implemented Robert Mytkowski's excellent traffic shaping script. The previous manager's script had too many variables, so I have generated my own, much simpler, script with 2 ip ranges, 2 priorities and 2 bandwidth allocations. The early testing looks good.

    With this in place I was wondering how to do the following:
    Add 0 (highest) priority for web surfing (port 80)
    Add 1 (high) priority for streaming media (also port this possible) and online gaming (I have specific games in mind (Runescape and WOW).
    Add 2/3 (normal/low) priority for torrent and file sharing apps (I use JDownloader)

    I am really not sure whether this is possible with Tomato on the Linksys WRT54G, but it would be nice and I would get a LOT less complaints.

    Many thanks in advance.
  2. karogyoker

    karogyoker Addicted to LI Member

    Online games should be the highest priority, not web surfing.
    If a game delays 50ms it's noticeable, but if a page loads 200ms later, it's not.
  3. Porter

    Porter LI Guru Member

    Usually you don't delete a script because it has too many variables nor because it is too complex. What's the real reason for the change?

    I really don't get how you generated your script when at the same time you are asking about how to put in some basic rules. Why aren't you using the Tomato GUI? Or if you think Tomato can't do what you want, why didn't you paste the output of the Script-Generator?

    As far as I know JDownloader is only for http-downloads, so splitting up http for browsing and http for downloading might be difficult.
  4. karogyoker

    karogyoker Addicted to LI Member

    You can create rules where you can specify the amount of data transfered by the connection. At the GUI in classification.

    So if you specify low priority if transfered data is more than 512k (or less), then it's a download, not a web page.
  5. Porter

    Porter LI Guru Member

    Unfortunately that's only true for traffic in outbound direction as the description says. So you are back to using the generator or your own rule-coding skills.
  6. draftvader

    draftvader Addicted to LI Member

    Thank you for your help

    Porter: I removed the previous script because I did not write it and I have no basis for understanding it. I used the generator, know the parameters I have input and now can build on a script I understand. I find it a useful way to learn.

    OK. So, I CAN assign ports to bittorrents, etc. What would be an example script showing how to assign a priority to a port number?
  7. Porter

    Porter LI Guru Member

    As I take it you don't want to write your own script by hand but to use the generator? Because writing it yourself takes a lot of knowledge and time.

    This looks like a good starting point: You will find more through google.

    Telling you specific rules is a bit paradox because you don't write rules with the generator, the generator does this for you...
    If you need some example configuration open the generator, go to step 3 and left-click in the window and in the context-menu choose "Automatically share banwidth..." and choose the option you like. The rates are probably far from your liking but now you have some examples.

    The generator has the ability to save not only the script but the whole project to a file. If there are problems you could post your project file here.

    Please be sure to also read this thread, especially some of the first posts by Toastman:
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice