How to use Qos

michael Q

Honorable
Oct 13, 2014
59
0
10,630
so my sister downloads her tv shows on the highest option possible and my parents and niece are watching tv and movies on HD and im here with 300 ping constantly and i was told that Qos would help me and i have a brief understanding of how it works but am wondering how do i begin to set it up?
 
Depends on your router. Usually you can configure what "services" you want to take priority from your router. Sometimes you pick ports, some you pick from a list of apps, some are smart and you just pick gaming goes first, surfing second, streaming third, file sharing fourth, etc and the router tries to figure out what's actually gaming and do it.
 
The key word here is DOWNLOAD. Pretty much only the ISP can do QoS which they don't want to bother with. What they currently do is when the connection to your house is full they randomly discard or delay traffic.
What can any router possibly do when the data the want has been dropped and they get other data they don't really want as much.

All the QoS you see on most routers is related to UPLOAD which would mean someone was running say video chat or seeding torrents. When you get a upload overload you can use your router to decide which traffic is more important.

There is a very advanced QoS on some routers that can be used to limit the download but since you have little knowledge I will not go into detail. What it in effect does though is block the other people from running high bandwidth applications. It is the same as if you walked in and unplugged their machine in some cases when you have to limit the bandwidth too low.
 
You can still limit your download, but you need to give up a decent amount of bandwidth for it to work correctly. Like bill001g mentioned, the general notion is you can only QoS data going out. This is true, you can't directly control incoming data, but you can indirectly control it by limiting it, which causes packets to get delayed and dropped, which signals to the sender to back off.

If you have 10Mb up, you can probably shape your bandwidth to 9.95Mb/s and QoS works fine, but on your download, you may need to shape all the way down to 9Mb/s or even 8Mb/s. Because there is a delay on the signalling. The delay between you and your router is a much lower delay than your firewall and someone else on the Internet.

QoS is a very general term. What I would recommend is if you have the technical ability, get a router that supports OpenWRT and use that. It has a type of QoS which is specifically an "AQM", and is the development platform for CoDel, fq_CoDel, and Cake, with Cake being the latest and greatest. It's very simple. Just set your bandwidth, it does the rest. It's like magic. No categorizing, no configuring computers, or anything, just set your bandwidth, it does the rest.
 
QOS only does upload? Fascinating.

When I was taking the Cisco certification, I remember I was able to configure an incoming port for priorities, say process 3 FTP packets before processing 1 Telnet packet, I forget what mechanism the router use to HOLD the traffic. Doesn't networking have a general mechanism that says, wow, congestion, hold it until I tell you to go again?
 
All the stuff you see on incoming is considered traffic classification it is used to mark the packets so as they flow though the network the device know how to treat them. It is technically part of QoS but all ISP remove any type of packet marking when you are running on the internet. Everyone would of course always set his traffic to be higher than his neighbors. So even though you can set all those values even having the feature on a consumer router that has no other purpose than to connect to the internet is stupid. It is really only used in a corporate environment.
This is part of the net neutrality argument where ISP would mark traffic higher for their customers than traffic coming in from other ISP.

The other part of QoS related to traffic queuing only really makes sense on a outbound port. If you received data on a inbound port and the port you can send it to has no congestion ...ie the lan port in home user case why would you ever delay the traffic. This is part of the misconception of QoS. It does not make traffic faster it just chooses which traffic gets delayed. If the ports are not busy then there is no delay no matter what you mark the traffic.

Most the other things you see to attempt to limit traffic are not really QoS. They are placing artificial restrictions on traffic in the hope that one of the error correction mechanisms in the end machines or the server respond. This is in a way a form of congestion notification but it is not as formal. Some traffic it work ok on and others it does not do as well. It is extremely dependent on the implementations of the TCP stack in the servers as well as the client. The biggest issue is most these only work on TCP. Utorrent is pretty much not affected and VPN other than TCP based SSLVPN actually responds to many of these limitation by sending even more data to attempt to recover the lost.

If you could just use QoS to really control inbound traffic nobody would have trouble with denial of service attacks you could just set all that traffic to low priority.
 


QoS is about managing choke points. In the case of an Internet connection, the choke point for downloading is upstream of what you control, With an internal network, you can control everything end-to-end, allowing you to always have full control of QoS.
 
He could try, if his router has the feature, limit their download speeds to prevent bandwidth saturation which can increase ping times? From there it is a matter of using other steps to minimize ping like using a hardwire instead of wireless, etc.

Or are you saying at the router level you cannot control download speeds for clients? The server would send more download packets than your router would accept?
 
This is getting into semantics. You can limit a client download rate BUT that does not by itself solve the problem.

So a server on the internet send at a rate of 10mbit/sec. You then limit it to 5mbit a sec and only give the end client this 5m. You have now configured all the QoS you can. You still are getting 10m eating your bandwidth.

The reason this works on certain things is the end client machine will tell the server it is losing packets the server will then slow it rate of transmission. This function is not technically QoS it is part of the error recovery mechanism in the tcp stack. It is dependent on how the tcp stack in configured in the server. There is no function like this in UDP so if the application is based on UDP.....like utorrent it will not be very effective to limit download. Things like video that is being streamed with UDP will just keep transmitting at whatever rate you tell it and you could drop 100% of it and it will keep transmitting.

So you can do lots of things to attempt to trick end machines into limiting their traffic but this is not QoS.
 
Correct, but a packet needs to be dropped at some point. With proper traffic shaping, you drop packets less often, while having more bandwidth and lower pings.

The problem is bufferbloat. UDP does not have any built in congestion control, but most things that use UDP consume magnitudes less bandwidth. I couldn't care less if a 128kbit VoIP stream doesn't do any congestion control, but I do care when a 40Gb/s TCP stream from Netflix or Youtube doesn't. So we may as well focus on TCP.

Most TCP stacks use packetloss to signal congestion, but by the time the buffers are full and packets finally get dropped, it's too late, the damage is done. You will lose several packets in a row and the sender will back off a whole bunch, and in many cases, several senders will back off at the same time when they all lose some packets at the same time when the buffer fills.

If you do proper traffic shaping, only one sender loses a packet and not several packets. Even better is if ECN is being used and instead of dropping the packet, it instead gets marked that the sender needs to back off. Of course the receiver gets the marked packet, to the receiver needs to relay the message by marking the next ACK to indicate to the sender to back off.