Easy Toastman QoS setup

This tutorial only describes an easy way of entering QoS rules into your router, without going through the GUI and manually typing them all. You need to understand what these rules do, and after applying the script below, adjust QoS rules as needed for your specific purposes! Blindly using the whole ruleset (which was mainly designed to use on a large network with many clients sharing a single - but fast - internet connection) "as is" may slow down your WAN connection, and cause certain services not to work at all.
Refer to Tomato QoS tutorial for more details.

Here's an easy way to set up Toastman's QoS settings without having to manually enter them in to the GUI which can take a very long time.

In the GUI, navigate to (Tools > System) and paste the following lines in:

nvram set "ct_tcp_timeout=0 1200 20 20 20 20 10 20 20 0"
nvram set "ct_udp_timeout=10 10"
nvram set "qos_enable=1"
nvram set "qos_ack=0"
nvram set "qos_default=8"
nvram set "qos_fin=1"
nvram set "qos_icmp=1"
nvram set "qos_irates=10,10,60,90,0,70,70,70,80,1"
nvram set "qos_orates=5-20,5-20,5-25,5-80,10-80,20-80,5-80,5-80,5-90,1-1"
nvram set "qos_orules=0<<-1<d<53,37,123,3445<0<<0:10<0<DNS,Time,NTP,RSVP>0<<6<s<80<0<<<3<Remote Web Access>0<<-1<d<11999,2300:2400,6073,28800:29100,47624<0<<0:50<1<Some well known games>0<<-1<a<<0<flash<<2<Flash Video (Youtube, etc...)>0<<-1<a<<0<httpvideo<<2<HTTP Video (Youtube, etc...)>0<<6<a<<0<shoutcast<<2<Shoutcast>0<<-1<d<554,1755,5004,5005,6970:7170,8554<0<<<2<RTP,RTSP>0<<-1<d<1935,5060:5063,1719,1720,3478,3479,15000<0<<<2<RTMP,MMS,SIP,H323,STUN>0<<6<d<80,443<0<<0:256<4<WWW,SSL>0<<-1<d<25,465,563,587,110,119,143,220,993,995<0<<<5<Mail (SMTP,POP3,IMAP)>0<<-1<d<1220,1234,5100,6005,6970<0<<<2<QT,Camfrog,VLC>0<<-1<d<1502:1503,1863,3389,5061,5190:5193,7001<0<<<6<MSGR1 - Windows Live>0<<-1<d<194,1720,1730:1732,6660:6669,22555<0<<<6<MSGR2 - Chat Services>0<<-1<d<5000:5010,5050,5100,5222,5223,8000:8002<0<<<6<MSGR3 - Chat Services>0<<-1<x<20:23,6571,6891:6901<0<<256:<7<FTP,SFTP,WLM File Transfers>0<<6<d<80,443<0<<256:<7<HTTP, SSL File Transfers>0<<17<d<1:65535<0<<<9<P2P (uTP, UDP)"
nvram set "qos_pfifo=0"
nvram set "qos_reset=1"
nvram set "qos_rst=1"
nvram set "qos_syn=1"
sleep 2
nvram commit
sleep 10

Now click the "Execute" button and let the magic happen.

If for any reason you want to go back to the default QoS settings without resetting everything to defaults, do the same process with the following lines:

nvram set "ct_tcp_timeout=0 1200 120 60 120 120 10 60 30 0"
nvram set "ct_udp_timeout=30 180"
nvram set "qos_enable=0"
nvram set "qos_ack=1"
nvram set "qos_default=3"
nvram set "qos_fin=0"
nvram set "qos_icmp=0"
nvram unset "qos_irates"
nvram set "qos_orates=80-100,10-100,5-100,3-100,2-95,1-50,1-40,1-30,1-20,1-10"
nvram set "qos_orules=0<<6<d<80,443<0<<0:512<1<WWW>0<<6<d<80,443<0<<512:<3<WWW (512K+)>0<<-1<d<53<0<<0:2<0<DNS>0<<-1<d<53<0<<2:<4<DNS (2K+)>0<<-1<d<1024:65535<0<<<4<Bulk Traffic"
nvram unset "qos_pfifo"
nvram set "qos_reset=0"
nvram set "qos_rst=0"
nvram set "qos_syn=0"
nvram set "qos_obw=230"
nvram set "qos_ibw=1000"
sleep 2
nvram commit
sleep 10


  1. The Sleep timeouts may or may not really be necessary but I put them in just to be safe.
  2. Remember you still have to set your Max Bandwidth limits. I have no way of knowing your speeds so I did not include these. If you're not sure what to set them to, refer to Toastman's post in the link above.

EDIT-By Toastman
These example rules have since been updated and expanded to make them easier to understand and to experiment with. The rules are incorporated into Toastman builds, and will be displayed after clearing NVRAM.

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License