Optimizing OpenWRT Routers for Online Gaming

Hello everyone in the forum, I need your help. I've been studying OpenWRT for gaming for a long time, but I have many doubts. I can't configure my Archer C6 v3 for good stability in games, especially in Call of Duty Warzone. I always feel a delay, even though I have a 12ms ping to the server. With the original TP-Link firmware, my ping worsens to 18ms, but with OpenWRT it stabilizes at 12ms. I want to ask some questions and share my setup below for fine-tuning.

My router: Model: Archer C6
Version: v3(US)(BR)(EU)
CPU: MediaTek MT7621DAT
CPU MHz: 880
CPU Cores: 2
Flash MB: 16
RAM MB: 128
WLAN Hardware: MediaTek MT7603EN, MediaTek MT7613BEN
WLAN 2.4GHz: b/g/n
WLAN 5.0GHz: a/n/ac
Ethernet 1Gbit ports: 5
My connection is PPPoE in IPv4 and IPv6
Download: 700mb
Upload: 500mb
Internet: Fiber

Packages installed:
luci-app-adblock
luci-app-https-dns-proxy (configured with Cloudflare DNS)
luci-app-SMQ (status off, currently using Qosmate by Hudra)
luci-app-Qosmate (I find Qosmate easier for setting rules)

Questions:

  1. For routers with 880MHz CPU, should I leave packet steering on or off?
  2. Is creating VLANs better for gaming only when you want to separate Wi-Fi traffic?
  3. Should I open incoming and outgoing ports in the firewall for my games (I usually DMZ the console/PC IP)?
  4. Does IPv6 traffic put a load on IPv4?
  5. Is irqbalanced a good package for gaming?
  6. Regarding MTU, since my ISP gives me 1492, should I set it to 1492 in all device fields instead of 1500?

These are just a few doubts I have, and I hope they can help many. I'll post more questions as they arise. Thank you all in advance!

1 Like

Why do you feel there is a delay? As I understand it, if you're getting 12 ms ping then you're doing really good as far as latency is concerned. So it seems to me it's all working quite well under OpenWrt.

CPU frequency isn't really relevant, it's for distributing packets across multiple cores for processing. This may or may not improve performance, but the only way to know for sure is to try with it on and off.

VLANs are for network management, which may improve performance if you configure the switch to prioritize certain VLANs. But this doesn't come automatically if you just set up VLANs and nothing else.

It depends on the game, but generally you only open ports if you want someone to initiate a new connection to a host inside your network. For example, if you're hosting a game server for your friends.

Outbound traffic never need open ports, nor is inbound traffic that is a response to outbound traffic sent earlier. Keep your ports closed, and be skeptical of anyone that asks you to open ports without sufficient explanation.

Well, if you're streaming from an IPv6 server while streaming from an IPv4 server, they can't both stream at 700 Mbps through your 700 Mbps pipe at the same time. So yes, it technically does put a load. But it's not because it's IPv6, it's because nobody has infinite bandwidth. :slight_smile:

Again, you're just going to have to try it for yourself and see if it works in your situation. My guess is that it's not particularly beneficial on older dual-core processors like MT7621, but I could be wrong.

All operating systems use path MTU discovery to figure this out automatically, you shouldn't need to mess around with this. Unfortunately, sometimes you do because some misguided admins block the ICMP messages needed for this to work. But if everything is working I would keep it as-is.


As a general rule, the defaults are the defaults for a reason and I like to keep them as they are unless I have a compelling reason to change it.

5 Likes

Are you running OpenWRT?

1 no
2 no
3 no
4 no
5 no 7621 support
6 no

Please post link to result of
https://www.waveform.com/tools/bufferbloat
with all your scr)pts undone, preferably on completely reset device.

Please connect to your OpenWrt device using ssh and copy the output of the following commands and post it here using the "Preformatted text </> " button:
grafik
Remember to redact passwords, MAC addresses and any public IP addresses you may have:

ubus call system board
cat /etc/config/network
cat /etc/config/wireless
cat /etc/config/dhcp
cat /etc/config/firewall
2 Likes

I can do this tomorrow, as I'm at work now, but I saw that it said not to leave packet sttering on, for some reason. When I install openwrt it is already active by default

Do not change any setting without measuring before and after.

The issue with the delay is because I always see in my post-mortem camera that the opponent always executes the action first than me, in my game vision I had already spotted the opponent and started the action first and ended up dying, I've already tested it with friends mine with the same ping, and this delay actually happens

What would be your recommendations, please be specific in your answer

Be very exact providing syst€m and connection info first?
Cannot tell itslousy fingers or bad router yet...

1 Like

Sounds more like input lag than bloat but please, still, post the requested dumps as asked.

1 Like

ok, tomorrow I'll post what you asked me to do.

Also:

  • What platform do you actually play CoD Warzone on?
  • How is that device connected?
1 Like

Here it is as requested, this is standard
ubus call system board

root@OpenWrt:~# ubus call system board
{
        "kernel": "5.15.162",
        "hostname": "OpenWrt",
        "system": "MediaTek MT7621 ver:1 eco:3",
        "model": "TP-Link Archer C6 v3",
        "board_name": "tplink,archer-c6-v3",
        "rootfs_type": "squashfs",
        "release": {
                "distribution": "OpenWrt",
                "version": "23.05.4",
                "revision": "r24012-d8dd03c46f",
                "target": "ramips/mt7621",
                "description": "OpenWrt 23.05.4 r24012-d8dd03c46f"
        }
}

/etc/config/network


config interface 'loopback'
	option device 'lo'
	option proto 'static'
	option ipaddr '127.0.0.1'
	option netmask '255.0.0.0'

config globals 'globals'
	option ula_prefix 'xxxxxxxxxxxxxxxx'
	option packet_steering '1'

config device
	option name 'br-lan'
	option type 'bridge'
	list ports 'lan1'
	list ports 'lan2'
	list ports 'lan3'
	list ports 'lan4'

config interface 'lan'
	option device 'br-lan'
	option proto 'static'
	option ipaddr '192.168.1.1'
	option netmask '255.255.255.0'
	option ip6assign '60'

config interface 'wan'
	option device 'wan'
	option proto 'pppoe'
	option username 'xxxxxxxxxxxxxxxxx'
	option password 'xxxxxxxxxxx'
	option ipv6 '0'

config interface 'wan6'
	option device '@wan'
	option proto 'dhcpv6'
	option reqaddress 'try'
	option reqprefix 'auto'

/etc/config/wireless

root@OpenWrt:~# cat /etc/config/wireless

config wifi-device 'radio0'
        option type 'mac80211'
        option path '1e140000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0'
        option channel '10'
        option band '2g'
        option htmode 'HT20'
        option cell_density '1'
        option country 'BR'

config wifi-iface 'default_radio0'
        option device 'radio0'
        option network 'lan'
        option mode 'ap'
        option ssid 'xxxxxxx'
        option encryption 'psk2'
        option key 'ixxxxxxxxxxx'

config wifi-device 'radio1'
        option type 'mac80211'
        option path '1e140000.pcie/pci0000:00/0000:00:01.0/0000:02:00.0'
        option channel '36'
        option band '5g'
        option htmode 'VHT80'
        option disabled '1'

config wifi-iface 'default_radio1'
        option device 'radio1'
        option network 'lan'
        option mode 'ap'
        option ssid 'OpenWrt'
        option encryption 'none'

/etc/config/dhcp

root@OpenWrt:~# cat /etc/config/dhcp

config dnsmasq
        option domainneeded '1'
        option boguspriv '1'
        option filterwin2k '0'
        option localise_queries '1'
        option rebind_protection '1'
        option rebind_localhost '1'
        option local '/lan/'
        option domain 'lan'
        option expandhosts '1'
        option nonegcache '0'
        option cachesize '1000'
        option authoritative '1'
        option readethers '1'
        option leasefile '/tmp/dhcp.leases'
        option resolvfile '/tmp/resolv.conf.d/resolv.conf.auto'
        option nonwildcard '1'
        option localservice '1'
        option ednspacket_max '1232'
        option filter_aaaa '0'
        option filter_a '0'

config dhcp 'lan'
        option interface 'lan'
        option start '100'
        option limit '150'
        option leasetime '12h'
        option dhcpv4 'server'
        option dhcpv6 'server'
        option ra 'server'
        option ra_slaac '1'
        list ra_flags 'managed-config'
        list ra_flags 'other-config'

config dhcp 'wan'
        option interface 'wan'
        option ignore '1'

config odhcpd 'odhcpd'
        option maindhcp '0'
        option leasefile '/tmp/hosts/odhcpd'
        option leasetrigger '/usr/sbin/odhcpd-update'
        option loglevel '4'

/etc/config/firewall

config defaults
	option syn_flood	1
	option input		REJECT
	option output		ACCEPT
	option forward		REJECT
# Uncomment this line to disable ipv6 rules
#	option disable_ipv6	1

config zone
	option name		lan
	list   network		'lan'
	option input		ACCEPT
	option output		ACCEPT
	option forward		ACCEPT

config zone
	option name		wan
	list   network		'wan'
	list   network		'wan6'
	option input		REJECT
	option output		ACCEPT
	option forward		REJECT
	option masq		1
	option mtu_fix		1

config forwarding
	option src		lan
	option dest		wan

# We need to accept udp packets on port 68,
# see https://dev.openwrt.org/ticket/4108
config rule
	option name		Allow-DHCP-Renew
	option src		wan
	option proto		udp
	option dest_port	68
	option target		ACCEPT
	option family		ipv4

# Allow IPv4 ping
config rule
	option name		Allow-Ping
	option src		wan
	option proto		icmp
	option icmp_type	echo-request
	option family		ipv4
	option target		ACCEPT

config rule
	option name		Allow-IGMP
	option src		wan
	option proto		igmp
	option family		ipv4
	option target		ACCEPT

# Allow DHCPv6 replies
# see https://github.com/openwrt/openwrt/issues/5066
config rule
	option name		Allow-DHCPv6
	option src		wan
	option proto		udp
	option dest_port	546
	option family		ipv6
	option target		ACCEPT

config rule
	option name		Allow-MLD
	option src		wan
	option proto		icmp
	option src_ip		fe80::/10
	list icmp_type		'130/0'
	list icmp_type		'131/0'
	list icmp_type		'132/0'
	list icmp_type		'143/0'
	option family		ipv6
	option target		ACCEPT

# Allow essential incoming IPv6 ICMP traffic
config rule
	option name		Allow-ICMPv6-Input
	option src		wan
	option proto	icmp
	list icmp_type		echo-request
	list icmp_type		echo-reply
	list icmp_type		destination-unreachable
	list icmp_type		packet-too-big
	list icmp_type		time-exceeded
	list icmp_type		bad-header
	list icmp_type		unknown-header-type
	list icmp_type		router-solicitation
	list icmp_type		neighbour-solicitation
	list icmp_type		router-advertisement
	list icmp_type		neighbour-advertisement
	option limit		1000/sec
	option family		ipv6
	option target		ACCEPT

# Allow essential forwarded IPv6 ICMP traffic
config rule
	option name		Allow-ICMPv6-Forward
	option src		wan
	option dest		*
	option proto		icmp
	list icmp_type		echo-request
	list icmp_type		echo-reply
	list icmp_type		destination-unreachable
	list icmp_type		packet-too-big
	list icmp_type		time-exceeded
	list icmp_type		bad-header
	list icmp_type		unknown-header-type
	option limit		1000/sec
	option family		ipv6
	option target		ACCEPT

config rule
	option name		Allow-IPSec-ESP
	option src		wan
	option dest		lan
	option proto		esp
	option target		ACCEPT

config rule
	option name		Allow-ISAKMP
	option src		wan
	option dest		lan
	option dest_port	500
	option proto		udp
	option target		ACCEPT

Some basic things:
Add wifi 5GHz - same country, same access point parameters, automatic channel. Much better response time than 2.4 if you use it.
(optionally) usteer or dawn to push clients to 5GHz
Firewall: enable "drop invalid packets" and set wan forward
and i(optionally) nput reject to drop.

Now from wired run a test:
https://www.waveform.com/tools/bufferbloat
Then enable firewall offload and run again.
Your router is not fast enough to run SQM, which means you can only use best of 2 firewall configurations.
If both are bad we can try to add SQM in ouptput direction to make response times a bit better. But not both ways.

2 Likes

@brada4 yes, I turned off packet sttering, and I had a significant improvement, in the wifi part I didn't understand, because when I translate many words in English they are not transferred to our native language in the correct way, the part about enabling Drop invalid packets , I just enabled and saved

You can add PT text copy if in doubt.
Packet steering is required for better bandwidth 9for same weak CPU cause)
Also do waveform measurement in both sides of steering. Measuring with human eyes is very inaccurate, slow dns, slow resource download etc all hurt UX but OpenWRT has little impact on these.

1 Like

I installed Qosmate, it seems to have improved, but I didn't understand your explanation in the firewall part on the wan

Post the measurement results, somebody may have been in your place and ready to share fix.

1 Like

I did as requested

my buffer test.
Qosmate: on
Packet sttering:off

More like measure line without qos and after improve over that if needed.

1 Like