1219chicho
Occasional Visitor
I'm sure they got it but if not me or v
Thank you Fresh for all the hardworkThis post has been edited a trillion times. It is worthwhile to reread it for latest discoveries!
Here's a quick investigation into Gaming download traffic, specifically Steam content.
Code:steam download QOS container: "Others - 0x80130000" - (Would actually be Net Control without script over-riding rule 22) dscp: cs1 (0x20 = 0010 00) size: 1500 src ip: varies, depends on the CDN IP options header: does not exist type: tcp sport: 443 dport: dynamic ( ephemeral ports 49152-65535) data: encrytped, no discernible pattern steam download QOS container: "Gaming" dscp: cs1 (0x20 = 0010 00) size: 1500 src ip: varies, depends on the CDN IP options header: does not exist type: tcp sport: 80 dport: dynamic ( ephemeral ports 49152-65535) data: no discernible pattern CS:S QOS container: "Gaming" dscp: cs1 (0x20 = 0010 00) size: variable, but typically 100-600 src ip: varies on the hoster IP options header: does not exist type: udp sport: dynamic ( typically 27015 27016, but depends on individual hoster configuration ) dport: 27005 data: patterns found
Data was parsed using wireshark.
As you can see, game downloads will go into either "Others" or "Gaming".
The results are the same for console game downloads.
As a work around, use these two rules to supplement the existing gaming rule. (Original gaming rule is included in the code snippet below for reference)
DO NOT FORGET to configure the IP range corresponding to your gaming devices on the gaming rule. 192.168.1.100/30 will have to changed a total of 4 times. Your clients will need manual dhcp assignment.Code:realtc filter add dev br0 protocol all prio 2 u32 match ip dst 192.168.1.100/30 match mark 0x80000000 0x8000ffff flowid ${Gaming} #Gaming - Routes Unidentified Traffic into "Gaming", instead of "Others", for the LAN clients specified realtc filter add dev br0 protocol all prio 2 u32 match ip dst 192.168.1.100/30 match ip sport 443 0xffff flowid ${Downloads} #Gaming - Routes port 443 traffic (https), for specified LAN clients, into "Downloads" realtc filter add dev br0 protocol all prio 2 u32 match mark 0x80080000 0xc03f0000 match ip sport 80 0xffff flowid ${Downloads} #Gaming - Routes "Gaming" traffic coming from port 80 into "Downloads"
This should work well for gaming devices since I do not think game are ever hosted on ports 80/443 themselves. Matchmaking is a different story, since that might be done on port 80/443, but we are more interested in prioritizing actual ingame traffic and NOT matchmaking, so it works out perfectly!
For those of you who also want an upload equivalent, try this.
Code:iptables -D POSTROUTING -t mangle -o eth0 -s 192.168.1.100/30 -m mark --mark 0x40000000/0x4000ffff -j MARK --set-mark ${Gaming_mark} #Gaming - Routes Unidentified Traffic into "Gaming", instead of "Others", from specified LAN devices in rule (line 1/2) iptables -A POSTROUTING -t mangle -o eth0 -s 192.168.1.100/30 -m mark --mark 0x40000000/0x4000ffff -j MARK --set-mark ${Gaming_mark} #Gaming - Routes Unidentified Traffic into "Gaming", instead of "Others", from specified LAN devices in rule (line 2/2) iptables -D POSTROUTING -t mangle -o eth0 -s 192.168.1.100/30 -p tcp --dport 443 -j MARK --set-mark ${Downloads_mark} #Gaming - Routes port 443 traffic (https), from specified LAN clients, into "Downloads" (line 1/2) iptables -A POSTROUTING -t mangle -o eth0 -s 192.168.1.100/30 -p tcp --dport 443 -j MARK --set-mark ${Downloads_mark} #Gaming - Routes port 443 traffic (https), from specified LAN clients, into "Downloads" (line 1/2) realtc filter add dev br0 protocol all prio 2 u32 match mark 0x40080000 0xc03f0000 match ip dport 80 0xffff flowid ${Downloads} #Gaming - Routes "Gaming" traffic going to port 80 into "Downloads"
---
More adavnced QOS rules are also possible. It should be possible capture the results of the DNS look ups, insert those results into an ipset, and then mark those IP's in iptables with a desired qos packet mark.
While these advanced rules sounds simple, I am not familiar in how to set this up.
I see that the skynet script and selective routing for netflix threads use this method. This means there are significant resources available on this forum to learn how this method works and is implemented.
I would like to look into this when I have some time, but it won't be done anytime soon as QOS does everything I would like it to do.
Enjoy!!> The gaming rule struggle should be complete.