0
I am trying to prioritize a stream of packets over other packets coming into the router. I am running twitch and some other background process (iperf, other youtube live etc.) and I want to prioritize twitch stream over them. I am using prio of tc to make 3 band.
Commands used:
tc qdisc add dev ppp0 root handle 1: prio bands 3
tc qdisc add dev ppp0 parent 1:1 sfq perturb 16
tc qdisc add dev ppp0 parent 1:2 sfq perturb 16
tc qdisc add dev ppp0 parent 1:3 tbf rate 128kbit buffer 100000 latency 100s
I am getting all the packets in band 2 and some packets on other bands. But I try to put the packets of twitch into band 1 by applying a filter :
tc filter add dev ppp0 parent 1: protocol ip prio 1 u32 match ip sport 443 0xffff flowid 1:1
Nothing actuall happens. Still I am getting the packets in band 2 only.
By the way, if your Internet connection has problems when it is being fully used, the root cause is often bufferbloat (bad queue management in your router or modem breaking the congestion control mechanisms your client devices would be trying to use). Prioritizing traffic usually just heaps the problem up on other traffic rather than solving it. Test for bufferbloat with http://dslreports.com/speedtest and fix that first if you have it.
– Spiff – 2019-06-02T02:20:54.220I am using it as a test environment for a project. Just wanted to see if I can prioritize a network using a scheduler. – sanketsans97 – 2019-06-02T18:27:44.497
I finally was able to figure to that: I first created a prio class and 2 htb classes. Then I assigned the flows to both the particular htb classes. And then whichever flow I needed to prioritze - i put them in prio class
tc qdisc add dev wlp3s0 root handle 1: prio bands 2 priomap 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1;