Best settings for gaming QoS+DSCP
Moderator: Moderators
Re: Best settings for gaming QoS+DSCP
Be careful, you cannot use TOS with DSCP, choose to use DSCP or TOS, not both
My configuration worked?
My configuration worked?
Re: Best settings for gaming QoS+DSCP
I still prefer to prioritize only the udp ports and leave ack and tcp aside.
Using basically the same as before:
iptables -t mangle -N qos_in
iptables -t mangle -F qos_in
iptables -t mangle -A PREROUTING -i eth0.2 -j qos_in
iptables -t mangle -A INPUT -i eth0.2 -j qos_in
iptables -t mangle -A FORWARD -i eth0.2 -j qos_in
iptables -t mangle -A qos_in -j DSCP --set-dscp 0
iptables -t mangle -A qos_in -p icmp -j DSCP --set-dscp-class CS6
iptables -t mangle -A qos_in -d 192.168.1.142 -p udp --dport 1024:65535 -j DSCP --set-dscp-class CS6
iptables -t mangle -N qos_out
iptables -t mangle -F qos_out
iptables -t mangle -A OUTPUT -o eth0.2 -j qos_out
iptables -t mangle -A FORWARD -o eth0.2 -j qos_out
iptables -t mangle -A POSTROUTING -o eth0.2 -j qos_out
iptables -t mangle -A qos_out -p icmp -j DSCP --set-dscp-class CS6
iptables -t mangle -A qos_out -s 192.168.1.142 -p udp --sport 1024:65535 -j DSCP --set-dscp-class CS5
sometimes in search of perfection
We forget that when the connection is bad, the problem may be on other players' internet and not ours.
So I will try to keep my settings for now
Using basically the same as before:
iptables -t mangle -N qos_in
iptables -t mangle -F qos_in
iptables -t mangle -A PREROUTING -i eth0.2 -j qos_in
iptables -t mangle -A INPUT -i eth0.2 -j qos_in
iptables -t mangle -A FORWARD -i eth0.2 -j qos_in
iptables -t mangle -A qos_in -j DSCP --set-dscp 0
iptables -t mangle -A qos_in -p icmp -j DSCP --set-dscp-class CS6
iptables -t mangle -A qos_in -d 192.168.1.142 -p udp --dport 1024:65535 -j DSCP --set-dscp-class CS6
iptables -t mangle -N qos_out
iptables -t mangle -F qos_out
iptables -t mangle -A OUTPUT -o eth0.2 -j qos_out
iptables -t mangle -A FORWARD -o eth0.2 -j qos_out
iptables -t mangle -A POSTROUTING -o eth0.2 -j qos_out
iptables -t mangle -A qos_out -p icmp -j DSCP --set-dscp-class CS6
iptables -t mangle -A qos_out -s 192.168.1.142 -p udp --sport 1024:65535 -j DSCP --set-dscp-class CS5
sometimes in search of perfection
We forget that when the connection is bad, the problem may be on other players' internet and not ours.
So I will try to keep my settings for now

TP-Link Archer C7 v2
Gargoyle: 1.10.0
Down: 38MB
Up: 6.5MB
Gargoyle: 1.10.0
Down: 38MB
Up: 6.5MB
Re: Best settings for gaming QoS+DSCP
In my case, eth0.2 is not used. I recommend that you see if your rules are activated with iptables -t mangle -vnL. I suggest you use EF because it activates the "cough" delay minimization marks. and if the games are practically for use with udp but it is also important to have the TCP (flags) active and corrected for a good ping, and you can try icmp type 8.
remember that a connection starts with an ack / syn
remember that a connection starts with an ack / syn
Re: Best settings for gaming QoS+DSCP
I confused!
This is what I used before with openwrt and sqm
This is what I currently use:
iptables -t mangle -A PREROUTING -j DSCP --set-dscp 0
iptables -t mangle -A INPUT -p icmp --icmp-type 0 -j DSCP --set-dscp-class EF
iptables -t mangle -A OUTPUT -p icmp --icmp-type 8 -j DSCP --set-dscp-class EF
iptables -t mangle -A FORWARD -p icmp -j DSCP --set-dscp-class CS6
iptables -t mangle -A FORWARD -d 192.168.1.142 -p udp --sport 1024:65535 -j DSCP --set-dscp-class CS6
iptables -t mangle -A FORWARD -s 192.168.1.142 -p udp --dport 1024:65535 -j DSCP --set-dscp-class CS4
I also changed the direction of the ports in qos gargoyle, it makes more sense:
(download)
Source Port: 1024-65535, Destination: 192.168.1.142, Transport Protocol: UDP
(upload)
Source: 192.168.1.142, Destination Port: 1024-65535, Transport Protocol: UDP
Using the interface in the rule (eth0.2 in this case) is optional.
EF for me,from my ps4 to internet, sometimes causes packet loss.
I believe the misuse of EF on the internet (such as marking torrents as EF) should cause congestion and discard the package at some point.
That's why I like it to set the entry to zero, because many packets arrive marked as EF the wrong way.
This is what I used before with openwrt and sqm
This is what I currently use:
iptables -t mangle -A PREROUTING -j DSCP --set-dscp 0
iptables -t mangle -A INPUT -p icmp --icmp-type 0 -j DSCP --set-dscp-class EF
iptables -t mangle -A OUTPUT -p icmp --icmp-type 8 -j DSCP --set-dscp-class EF
iptables -t mangle -A FORWARD -p icmp -j DSCP --set-dscp-class CS6
iptables -t mangle -A FORWARD -d 192.168.1.142 -p udp --sport 1024:65535 -j DSCP --set-dscp-class CS6
iptables -t mangle -A FORWARD -s 192.168.1.142 -p udp --dport 1024:65535 -j DSCP --set-dscp-class CS4
I also changed the direction of the ports in qos gargoyle, it makes more sense:
(download)
Source Port: 1024-65535, Destination: 192.168.1.142, Transport Protocol: UDP
(upload)
Source: 192.168.1.142, Destination Port: 1024-65535, Transport Protocol: UDP
Using the interface in the rule (eth0.2 in this case) is optional.
EF for me,from my ps4 to internet, sometimes causes packet loss.
I believe the misuse of EF on the internet (such as marking torrents as EF) should cause congestion and discard the package at some point.
That's why I like it to set the entry to zero, because many packets arrive marked as EF the wrong way.
TP-Link Archer C7 v2
Gargoyle: 1.10.0
Down: 38MB
Up: 6.5MB
Gargoyle: 1.10.0
Down: 38MB
Up: 6.5MB
Re: Best settings for gaming QoS+DSCP
when I combined icmp type 0 with type 8 was that I started losing packages
Re: Best settings for gaming QoS+DSCP
how is your rule of icmp type?
TP-Link Archer C7 v2
Gargoyle: 1.10.0
Down: 38MB
Up: 6.5MB
Gargoyle: 1.10.0
Down: 38MB
Up: 6.5MB
Re: Best settings for gaming QoS+DSCP
Hi, I'd like to ask if dscp it's supported by gargoyle v1.6.2
SG TCP/IP Analyzer results:
« TCP Analyzer Results »
Tested on: 2020.01.04 15:47
IP address: 200.32.xxx.xxx
Client OS/browser: Windows 8.1 (Firefox 71.0)
TCP options string: 020405b40103030801010402
MSS: 1460
MTU: 1500
TCP Window: 65536 (not multiple of MSS)
RWIN Scaling: 8 bits (2^8=256)
Unscaled RWIN : 256
Recommended RWINs: 64240, 128480, 256960, 513920, 1027840
BDP limit (200ms): 2621kbps (328KBytes/s)
BDP limit (500ms): 1049kbps (131KBytes/s)
MTU Discovery: ON
TTL: 114
Timestamps: OFF
SACKs: ON
IP ToS: 00000000 (0)
I'm currently using these settings and changed ports for battlefield 4:
iptables -t mangle -A POSTROUTING -j DSCP --set-dscp-class CS0
iptables -t mangle -A POSTROUTING -p icmp -j DSCP --set-dscp-class EF
iptables -t mangle -A POSTROUTING -p udp --match multiport --sport 3659,14000:14016,22990:23006,25200:25300 -j DSCP --set-dscp-class EF
iptables -t mangle -A POSTROUTING -p udp --match multiport --dport 3659,14000:14016,22990:23006,25200:25300 -j DSCP --set-dscp-class EF
Saved these changes and /etc/init.d/firewall restart without issues but I don't know if it's working
SG TCP/IP Analyzer results:
« TCP Analyzer Results »
Tested on: 2020.01.04 15:47
IP address: 200.32.xxx.xxx
Client OS/browser: Windows 8.1 (Firefox 71.0)
TCP options string: 020405b40103030801010402
MSS: 1460
MTU: 1500
TCP Window: 65536 (not multiple of MSS)
RWIN Scaling: 8 bits (2^8=256)
Unscaled RWIN : 256
Recommended RWINs: 64240, 128480, 256960, 513920, 1027840
BDP limit (200ms): 2621kbps (328KBytes/s)
BDP limit (500ms): 1049kbps (131KBytes/s)
MTU Discovery: ON
TTL: 114
Timestamps: OFF
SACKs: ON
IP ToS: 00000000 (0)
I'm currently using these settings and changed ports for battlefield 4:
iptables -t mangle -A POSTROUTING -j DSCP --set-dscp-class CS0
iptables -t mangle -A POSTROUTING -p icmp -j DSCP --set-dscp-class EF
iptables -t mangle -A POSTROUTING -p udp --match multiport --sport 3659,14000:14016,22990:23006,25200:25300 -j DSCP --set-dscp-class EF
iptables -t mangle -A POSTROUTING -p udp --match multiport --dport 3659,14000:14016,22990:23006,25200:25300 -j DSCP --set-dscp-class EF
Saved these changes and /etc/init.d/firewall restart without issues but I don't know if it's working
Re: Best settings for gaming QoS+DSCP
the page is showing only the cs0 rule when you start using udp you will use the dscp EF you can watch by running iptables -t mangle -vnL
Re: Best settings for gaming QoS+DSCP
Hi
I am currently using this
There are micro cuts, so to speak, sometimes my bullets do not register, but it is already very rare.
Other than that, I don't touch anything else on the router.
Recommended:
MTU Default DO NOT use QOS GARGOYLE.
I use DHCP to reserve the range of IP addresses to other devices and my separate IP, so my IP has priority with the DSCP EF. With these rules I could see transmissions without failures while saturating the network with other devices

iptables -t mangle -N qos_plus_up
iptables -t mangle -A PREROUTING -j qos_plus_up
iptables -t mangle -A INPUT -i pppoe-wan -j qos_plus_up
iptables -t mangle -A FORWARD -i pppoe-wan -j qos_plus_up
iptables -t mangle -A qos_plus_up -p tcp -m tcp --tcp-flags PSH PSH -j MARK --set-mark 0x2
iptables -t mangle -A qos_plus_up -p tcp -m tcp --tcp-flags ACK ACK -j MARK --set-mark 0x2
iptables -t mangle -A qos_plus_up -p tcp -m tcp --tcp-flags SYN SYN -j MARK --set-mark 0x2
iptables -t mangle -A qos_plus_up -p tcp -m tcp --tcp-flags RST RST -j MARK --set-mark 0x2
iptables -t mangle -A qos_plus_up -p tcp -m tcp --tcp-flags FIN FIN -j MARK --set-mark 0x2
iptables -t mangle -A qos_plus_up -d 192.168.1.124 -j MARK --set-mark 0x2
iptables -t mangle -A qos_plus_up -p icmp --icmp-type 8 -j MARK --set-mark 0x2 -s 192.168.1.124
iptables -t mangle -A qos_plus_up -s 192.168.1.124 -j DSCP --set-dscp-class EF/101110
iptables -t mangle -A qos_plus_up -d 192.168.1.124 -j DSCP --set-dscp-class EF/101110
iptables -t mangle -A qos_plus_up -s 192.168.1.8/29 -j DSCP --set-dscp-class CS1
iptables -t mangle -A qos_plus_up -j CONNMARK --restore-mark
iptables -t mangle -A qos_plus_up -p udp -m connbytes --connbytes 0:700 --connbytes-dir both --connbytes-mode avgpkt -j DSCP --set-dscp-class EF/101110
iptables -t mangle -N qos_plus_down
iptables -t mangle -A POSTROUTING -o pppoe-wan -j qos_plus_down
iptables -t mangle -A qos_plus_down -p tcp -m tcp --tcp-flags PSH PSH -j MARK --set-mark 0x200
iptables -t mangle -A qos_plus_down -p tcp -m tcp --tcp-flags ACK ACK -j MARK --set-mark 0x200
iptables -t mangle -A qos_plus_down -p tcp -m tcp --tcp-flags SYN SYN -j MARK --set-mark 0x200
iptables -t mangle -A qos_plus_down -p tcp -m tcp --tcp-flags RST RST -j MARK --set-mark 0x200
iptables -t mangle -A qos_plus_down -p tcp -m tcp --tcp-flags FIN FIN -j MARK --set-mark 0x200
iptables -t mangle -A qos_plus_down -s 192.168.1.124 -j MARK --set-mark 0x200
iptables -t mangle -A qos_plus_down -p icmp --icmp-type 8 -j MARK --set-mark 0x200 -s 192.168.1.124
iptables -t mangle -A qos_plus_down -s 192.168.1.124 -j DSCP --set-dscp-class EF/101110
iptables -t mangle -A qos_plus_down -s 192.168.1.8/29 -j DSCP --set-dscp-class CS1
iptables -t mangle -A qos_plus_down -j CONNMARK --save-mark
iptables -t mangle -A POSTROUTING -p icmp --icmp-type 8 -s 192.168.1.124 -j RETURN
iptables -t mangle -A PREROUTING -p icmp --icmp-type 8 -s 192.168.1.124 -j RETURN
iptables -t mangle -A FORWARD -p icmp --icmp-type 8 -s 192.168.1.124 -j RETURN
I am currently using this
There are micro cuts, so to speak, sometimes my bullets do not register, but it is already very rare.
Other than that, I don't touch anything else on the router.
Recommended:
MTU Default DO NOT use QOS GARGOYLE.
I use DHCP to reserve the range of IP addresses to other devices and my separate IP, so my IP has priority with the DSCP EF. With these rules I could see transmissions without failures while saturating the network with other devices

iptables -t mangle -N qos_plus_up
iptables -t mangle -A PREROUTING -j qos_plus_up
iptables -t mangle -A INPUT -i pppoe-wan -j qos_plus_up
iptables -t mangle -A FORWARD -i pppoe-wan -j qos_plus_up
iptables -t mangle -A qos_plus_up -p tcp -m tcp --tcp-flags PSH PSH -j MARK --set-mark 0x2
iptables -t mangle -A qos_plus_up -p tcp -m tcp --tcp-flags ACK ACK -j MARK --set-mark 0x2
iptables -t mangle -A qos_plus_up -p tcp -m tcp --tcp-flags SYN SYN -j MARK --set-mark 0x2
iptables -t mangle -A qos_plus_up -p tcp -m tcp --tcp-flags RST RST -j MARK --set-mark 0x2
iptables -t mangle -A qos_plus_up -p tcp -m tcp --tcp-flags FIN FIN -j MARK --set-mark 0x2
iptables -t mangle -A qos_plus_up -d 192.168.1.124 -j MARK --set-mark 0x2
iptables -t mangle -A qos_plus_up -p icmp --icmp-type 8 -j MARK --set-mark 0x2 -s 192.168.1.124
iptables -t mangle -A qos_plus_up -s 192.168.1.124 -j DSCP --set-dscp-class EF/101110
iptables -t mangle -A qos_plus_up -d 192.168.1.124 -j DSCP --set-dscp-class EF/101110
iptables -t mangle -A qos_plus_up -s 192.168.1.8/29 -j DSCP --set-dscp-class CS1
iptables -t mangle -A qos_plus_up -j CONNMARK --restore-mark
iptables -t mangle -A qos_plus_up -p udp -m connbytes --connbytes 0:700 --connbytes-dir both --connbytes-mode avgpkt -j DSCP --set-dscp-class EF/101110
iptables -t mangle -N qos_plus_down
iptables -t mangle -A POSTROUTING -o pppoe-wan -j qos_plus_down
iptables -t mangle -A qos_plus_down -p tcp -m tcp --tcp-flags PSH PSH -j MARK --set-mark 0x200
iptables -t mangle -A qos_plus_down -p tcp -m tcp --tcp-flags ACK ACK -j MARK --set-mark 0x200
iptables -t mangle -A qos_plus_down -p tcp -m tcp --tcp-flags SYN SYN -j MARK --set-mark 0x200
iptables -t mangle -A qos_plus_down -p tcp -m tcp --tcp-flags RST RST -j MARK --set-mark 0x200
iptables -t mangle -A qos_plus_down -p tcp -m tcp --tcp-flags FIN FIN -j MARK --set-mark 0x200
iptables -t mangle -A qos_plus_down -s 192.168.1.124 -j MARK --set-mark 0x200
iptables -t mangle -A qos_plus_down -p icmp --icmp-type 8 -j MARK --set-mark 0x200 -s 192.168.1.124
iptables -t mangle -A qos_plus_down -s 192.168.1.124 -j DSCP --set-dscp-class EF/101110
iptables -t mangle -A qos_plus_down -s 192.168.1.8/29 -j DSCP --set-dscp-class CS1
iptables -t mangle -A qos_plus_down -j CONNMARK --save-mark
iptables -t mangle -A POSTROUTING -p icmp --icmp-type 8 -s 192.168.1.124 -j RETURN
iptables -t mangle -A PREROUTING -p icmp --icmp-type 8 -s 192.168.1.124 -j RETURN
iptables -t mangle -A FORWARD -p icmp --icmp-type 8 -s 192.168.1.124 -j RETURN
Re: Best settings for gaming QoS+DSCP
Hey Taz
what the marks do?
such as:
MARK --set-mark 0x2
MARK --set-mark 0x200
what the marks do?
such as:
MARK --set-mark 0x2
MARK --set-mark 0x200
TP-Link Archer C7 v2
Gargoyle: 1.10.0
Down: 38MB
Up: 6.5MB
Gargoyle: 1.10.0
Down: 38MB
Up: 6.5MB