What's new

QoS / RT-NxxU firmware builds for QoS

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

xnor

Occasional Visitor
Hey,

to make discussion about QoS easier I'm splitting off the QoS discussion in Padavan's Custom Firmware thread.

Builds for RT-N56U and RT-N65U and guide can be downloaded from:
rt-nxxu


In case you're a complete Linux newbie:
Connect to your router over SSH (see CommonTips).

Then you can run commands on your router.
Step by step guide is following, comments start with #

Code:
# change directory
cd /etc/storage

# remove (rm) or rename (mv) old script if needed
rm simple_shaper.sh
mv simple_shaper.sh simple_shaper.backup.sh

# directly download the shaper script into the current directory
wget "http://xserv.shell.la/xnor/linux/rt-nxxu/qos/simple_shaper.sh"

# edit the file to fit your setup
# see guide below

# list the file with permissions
ls -l simple_shaper.sh

# add executable permission
chmod +x simple_shaper.sh

# run it
./simple_shaper.sh on
# disable with
./simple_shaper.sh off


If you have an FTP client like filezilla or winscp you can browse to /etc/storage and edit the script with your favorite editor.

You can also download the script on your computer, edit it there, upload it with an FTP client to your router (/etc/storage).

Just make sure you change the permissions to executable (chmod +x) as described above.

Configure the script by following the QoS guide.
 
Last edited:
Build 072 is done for N65, for N56 it is coming soon.

Also added a little tool called hd-idle which you can download separately. It spins down external HDDs after some user-configurable timeout.
 
You're welcome. If you have any suggestions, or want to make the guide more readable or whatever just let me know.

If there's interest I could also show how to split download speed evenly among multiple people (actually IPs), or "shape" download speed in general.
 
Thanks for the work!

I am wondering how to do Qos for VOIP traffic. I think the payload is RTP, and it runs on top of UDP. For Asterisk, I think it is UDP port 10000 to 20000. it would be impossible to list all the ports in the script...

Thanks!
 
I use to run 071 but youtube would auto to 144p no matter what. I'll check out 072 and see how it is.
 
You can specify port ranges: 10000:20000 but that's a pretty huge range.
 
The URL in the first post changed once again due to unreliable DNS service... switched provider so lets hope this one is more reliable.

edit: Oh and I'm running the new 075 build on my RT-N65U, everything works fine so far.
 
Will there be an update to the RT-N56U version to build 075? Seems like it is being forgotten, but maybe there is a reason. Thanks for the work.
 
Curious, the one caveat with the SoC's PPE (hardware NAT processor), is that it cannot be used in conjunction with QoS. Does this traffic shaping have the same issue, in which the PPE is disabled? If so, then much of the capable throughput that the router can handle is decreased because of it. But I was always curious about the PDF for the 388x SoC's because it mentions a hardware QoS ability. I think the newer processors mentions this too.
 
Curious, the one caveat with the SoC's PPE (hardware NAT processor), is that it cannot be used in conjunction with QoS. Does this traffic shaping have the same issue, in which the PPE is disabled? If so, then much of the capable throughput that the router can handle is decreased because of it. But I was always curious about the PDF for the 388x SoC's because it mentions a hardware QoS ability. I think the newer processors mentions this too.

You are right.
The "Hardware offload NAT/Routing IPv4" needs to be disabled for the kernel and traffic shaping tools to "see" and be able to shape all Internet traffic.

What the effects of that are .. I honestly cannot say. I don't have a very fast Internet connection (15 Mbit), and I don't notice any performance degradation. Quite the opposite actually since with shaping I don't get crazy pings or timeouts.
I've seen people using a lot weaker/older routers doing shaping and they had no problem with performance or processing power.

Maybe your situation is different because you have thousands of connections and/or a 100+ Mbit connection? You'd still have to try to see if there are any adverse effects (and if the traffic shaping benefits don't outweigh them!).

RT3883 product brief indeed mentions "QoS" but I have no details on this. It could be as trivial as respecting the ToS (type of service) field in the IP header, which would not be nearly enough.
 
Last edited:
With hardware NAT disabled you will lose offloading ability and then the MIPS will handle most of the packet and NAT processing, which is slower; but the "slower" is in the 200-300Mbps range. It is more of a penalty not to implement some sort of shaping or QoS with your limited bandwidth. Therefore your loss is minimal. However, if you had much more bandwidth and a particular amount of concurrent users you would rather offloading.

Really the basic rule of network is: If the pipe is fat, and the router fast you will not need to implement any packet management. But when things are limited and bandwidth is as well, you will need to handle the flow, especially if TX/egress is very limited and multiple users are using the network. Much of the allocated bandwidth is not for a household, it is for a user. If you have, for example, 15/5 and 4 users this is going to be nothing but asking for some issues and complaints.

I have seen other SoC's mention hardware QoS and I have seen it implemented with Actiontec routers. But It always made me curious as to why the PDF mentioned hardware NAT and QoS unless it was a translation mistake? But also if it is hardware, how come it is not part of the PPE (hardware offloading engine) and can be used in conjunction with it. I would not think it has anything with ToS.
 
With hardware NAT disabled you will lose offloading ability and then the MIPS will handle most of the packet and NAT processing, which is slower; but the "slower" is in the 200-300Mbps range. It is more of a penalty not to implement some sort of shaping or QoS with your limited bandwidth. Therefore your loss is minimal. However, if you had much more bandwidth and a particular amount of concurrent users you would rather offloading.
I see what you mean. In my, and possibly many other scenarios, there's no "loss" however. Increase in CPU usage is negligible (with my bandwidth anyway), and pretty much anything else is a positive effect.


Really the basic rule of network is: If the pipe is fat, and the router fast you will not need to implement any packet management. But when things are limited and bandwidth is as well, you will need to handle the flow, especially if TX/egress is very limited and multiple users are using the network. Much of the allocated bandwidth is not for a household, it is for a user. If you have, for example, 15/5 and 4 users this is going to be nothing but asking for some issues and complaints.
That's close to my scenario. Any kind of down-, or even worse upload, will make the Internet performance extremely bad.

I'm using a bit more advanced script than the simple_shaper.sh, so I'm also splitting download speed among users fairly. I do not want anyone to take up 100% of the bandwidth, no matter if up or down.

You can hit the limits of your modem even with a 100 Mbit connection. One traffic spike can fill up buffers and cause delays, even packet loss. How big the delay will be will depend on your ISP and your modem, but what I'm aiming for here is no increase in latency for critical applications.


I have seen other SoC's mention hardware QoS and I have seen it implemented with Actiontec routers. But It always made me curious as to why the PDF mentioned hardware NAT and QoS unless it was a translation mistake? But also if it is hardware, how come it is not part of the PPE (hardware offloading engine) and can be used in conjunction with it. I would not think it has anything with ToS.
I have no idea about the hardware and what it is capable of.

I mention ToS because it's the implementation in the IP header. Hardware respecting that field in the IP header could be labeled "hardware QoS". BUT: Unless the hardware features some kind of rule engine and language, you cannot do QoS the way you want. And unless the hardware has user-configurable buffers/queues you will have a hard time shaping traffic the way you want.
 
Last edited:
Hi guys, is this the reason why in Access Point mode is not possible to access the traffic monitoring GUI?

I think it is always useful to keep track of user bandwidth, it happens sometime that my iptv has some lags but I cannot understand where is the problem: Internet or my powerline.

Camillo

Inviato dal mio SM-N9005 utilizzando Tapatalk
 
Hi guys, is this the reason why in Access Point mode is not possible to access the traffic monitoring GUI?

I think it is always useful to keep track of user bandwidth, it happens sometime that my iptv has some lags but I cannot understand where is the problem: Internet or my powerline.

Camillo

Inviato dal mio SM-N9005 utilizzando Tapatalk

Because as an AP, that device will only see traffic going between the clients directly connected to it, and the rest of the network. It has no way of seeing the traffic from other clients connected directly to the main router, and no way to know if traffic from its own clients is going to the Internet, or to another client.
 
Because as an AP, that device will only see traffic going between the clients directly connected to it, and the rest of the network. It has no way of seeing the traffic from other clients connected directly to the main router, and no way to know if traffic from its own clients is going to the Internet, or to another client.

Thank you RMerlin,
but You are saying that at least the traffic going into the Access Point would be possible somehow to monitor? Because the web GUI in access point mode hides completely the Traffic Monitor tab.
Camillo
 
Because the web GUI in access point mode hides completely the Traffic Monitor tab.
Camillo

Yes, because people would then start complaining about the traffic monitoring on their AP not showing complete and accurate data.
 
Thank you RMerlin, but if possible I would leave an option to leave it enabled, for example I am going to replace wifi and wired connections of my isp router, but keeping it because I have fiber. And one of the reasons for replacing it is to have traffic monitoring.
Thank you
Best regards
Camillo

Inviato dal mio SM-N9005 utilizzando Tapatalk
 

Latest threads

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top