What's new

How to verify QoS working as intended?

  • 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!

Nerre

Senior Member
I've been trying to se QoS up (because we use VOIP for our telephony). My old router was running M0n0wall and the traffic shaper there was different to set up, so I'm not sure if things are working as they should.

It there some way to get some kind of statistics or similar from QoS to verify that it is working? Doesn't have to be in the web-ui, I can use the command line or write some script.
 
Check out Chapter 9 here http://www.lartc.org/ to verify qdiscs and filters are getting packets. It's overwhelming at first, but well worth the read.

I use iftop to see realtime bandwidth by session, but I could not get it working properly on the router directly. You can use a -tee iptable rule to span the traffic to another linux system or VM where iftop is running.
 
Last edited:
I read that the other days but since I'm using the webui to set up QoS I don't have full control of the filters and qdiscs. I think I have set things up correct, but it would be nice to see some kind of statistics to verify that things are working as intended.

But iftop looked like a good tip, seemed to work on my RT-AC66U. I'll have a look at how to sort it, because it's not the top sessions I want to see, I want to make sure VOIP gets what it needs.

But maybe that is taken card of by the default settings, because I tried running a test at speedtest.net while the phone was used and it seemed to work.
 
Do you get full speed internet with QoS enabled?

Say my speed test result with QoS off is 9.5Mbps, with it on, it drops to 7Mbps.

Anyway to make the highest priority achieve full speed?
 
So, iftop looked fine, but some way it seems to crash the router after a 5-10 seconds:(

I really don't care if I lose a little bandwidth when I get 100 Mpbs fiber (I'm used to 6 Mbps ADSL), it's more important that file transfers and gaming won't kill the phone.
 
Yes I got the same deal on iftop and any other bandwidth console utility on the ac66u, hence my statement about using the -tee option with iptables. Iftop worked great on my RTN16 so I'm a little disappointed in that.

Even if you don't write your own qos tree using lartc.org, you more than likely can still use a mixture of the show commands from that guide to verify things are working properly.

I would just install a Ubuntu virtual machine and -tee your traffic to that virtual IP address. Not only can you use iftop, you could also install the prepackaged ntop http://goo.gl/wDlvq for even more stats. Traffic monitoring on the ac66u is very poor since none of the optware utilities really work.

I posted my old qos tree if you want to try it. This is "entire router has max of 2048kbit, anything marked 30 has max 1120kbit, anything marked 20 has max 600kbit". The marked packets can never use more than the total bandwidth, works great for FPS gaming while several dozen torrents are running.

ip link set imq0 up
tc qdisc del dev imq0 root
tc qdisc add dev imq0 root handle 1: htb
tc class add dev imq0 parent 1: classid 1:1 htb rate 2048kbit
tc class add dev imq0 parent 1:1 classid 1:10 htb rate 1120kbit ceil 1120kbit
tc class add dev imq0 parent 1:10 classid 1:30 htb rate 1120kbit ceil
1120kbit prio 3
tc qdisc add dev imq0 parent 1:30 handle 30: sfq perturb 10
tc class add dev imq0 parent 1:10 classid 1:20 htb rate 600kbit ceil
600kbit prio 4
tc qdisc add dev imq0 parent 1:20 handle 20: sfq perturb 10
tc filter add dev imq0 parent 1:0 prio 3 protocol ip handle 30 fw flowid 1:30
tc filter add dev imq0 parent 1:0 prio 4 protocol ip handle 20 fw flowid 1:20
iptables -t mangle -A PREROUTING -p tcp -s 192.168.1.164 --sport 80 -j
MARK --set-mark 30
iptables -t mangle -A PREROUTING -p tcp -s 192.168.1.185 -j MARK --set-mark 20
iptables -t mangle -A PREROUTING -j IMQ --todev 0

So, iftop looked fine, but some way it seems to crash the router after a 5-10 seconds:(

I really don't care if I lose a little bandwidth when I get 100 Mpbs fiber (I'm used to 6 Mbps ADSL), it's more important that file transfers and gaming won't kill the phone.
 

Similar threads

Latest threads

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

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