Slow Download in MT7621

{
        "kernel": "5.15.167",
        "hostname": "OpenWrt",
        "system": "MediaTek MT7621 ver:1 eco:3",
        "model": "D-Link DIR-853 A3",
        "board_name": "dlink,dir-853-a3",
        "rootfs_type": "squashfs",
        "release": {
                "distribution": "OpenWrt",
                "version": "23.05.5",
                "revision": "r24106-10cc5fcd00",
                "target": "ramips/mt7621",
                "description": "OpenWrt 23.05.5 r24106-10cc5fcd00"
        }
}

I have like only 60mbps (supposed to be 250-300 mbps) download speed over 5ghz and upload of 150mbps (150mbps is the max by isp). Why am i not able to reach 250mbps on wifi?

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 'fd9e:a9e0:8d90::/48'

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.21'
        option proto 'pppoe'
        option type 'bridge'
        option username 'pppoe username'
        option password 'password'
        option ipv6 'auto'

config interface 'wan6'
        option device 'wan'
        option proto 'dhcpv6'

config device
        option type '8021q'
        option ifname 'wan'
        option vid '21'
        option name 'wan.21'
config wifi-device 'radio0'
        option type 'mac80211'
        option path '1e140000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0'
        option channel 'auto'
        option band '2g'
        option htmode 'HT40'
        option cell_density '0'

config wifi-iface 'default_radio0'
        option device 'radio0'
        option mode 'ap'
        option encryption 'sae-mixed'
        option ssid '25ghzssid'
        option network 'lan'
        option key 'password'

config wifi-device 'radio1'
        option type 'mac80211'
        option path '1e140000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0+1'
        option channel '157'
        option band '5g'
        option htmode 'VHT80'
        option cell_density '0'
        option country 'mycountrycode'
        option txpower '4'

config wifi-iface 'default_radio1'
        option device 'radio1'
        option mode 'ap'
        option encryption 'sae'
        option ssid '5ghzssid'
        option network 'lan'
        option key 'wifipass'
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 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'

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'

config host
        option name 'laptop'
        option ip '192.168.1.208'
        option mac '48:E7:DA:31:C9:71'
config defaults
        option input 'ACCEPT'
        option output 'ACCEPT'
        option forward 'REJECT'
        option synflood_protect '1'
        option flow_offloading '1'
        option flow_offloading_hw '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'

config rule
        option name 'Allow-DHCP-Renew'
        option src 'wan'
        option proto 'udp'
        option dest_port '68'
        option target 'ACCEPT'
        option family 'ipv4'

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'

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'

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'

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'

config redirect
        option dest 'lan'
        option target 'DNAT'
        option name 'out'
        option family 'ipv4'
        option src 'wan'
        option src_dport '31555'
        option dest_ip '192.168.1.208'
        option dest_port '31555'

config redirect
        option dest 'lan'
        option target 'DNAT'
        option name 'minecraft'
        option family 'ipv4'
        option src 'wan'
        option src_dport '25565'
        option dest_ip '192.168.1.208'
        option dest_port '25565'

config redirect
        option dest 'lan'
        option target 'DNAT'
        option name 'site'
        option src 'wan'
        option src_dport '443'
        option dest_ip '192.168.1.208'
        option dest_port '443'
1 Like

Remove the bridge line below:

This is probably not necessary and can almost certainly be deleted:

Don't use sae-mixed. Select either wpa2 or wpa3, not mixed mode as some clients don't work well with this:

Test via ethernet to verify that you are able to get your ISP's speed tier without issues in general. This will tell us if you have a wifi related config issue or some other problem.

Zero reception from this

As a minimum set wifi country code in both radios and set channel and txpower to auto/default.

default tx power gives much lower speeds at 40mbps, 4dbms gives me the fastest speeds, higher and lower reduces speeds significantly.

ok, no difference

it is necessary because of my ISP, i need to call them to disable plug and plug, but i would want to your use their provided router in the future, if i want to immediately switch out from openwrt. If i delete it, I'll lose internet.

ethernet works fine, with 300mbps down and 150mbps up.

I'm not sure how this relates to the 802.1q stanza that I said you could delete. You've specified wan.21 as the device in the wan interface, so the underlying .1q device should actually be created automatically. That is to say that this 802.1q stanza should be redundant and not necessary.

how do i set vid to 21 for pppoe then? if i remove the device which is the source for wan

You already did...

It is this part (below) that is not needed... that's because the device defined in the wan interface is wan.21 -- the act of adding the .21 to wan causes an 802.1q device to be generated automatically under the hood.... therefore, the stanza below is redundant:

This won't affect your speed issue since your wired connection is actually working as expected. So if you don't want to mess with this, you can leave it alone.

It is cleatly pmtud issue. Fixed in 24.10 when it appears.

Update ruleset.uc from
-- https://github.com/openwrt/firewall4/commit/698a53354fd280aae097efe08803c0c9a10c14c2
or later

wget -O /usr/share/firewall4/templates/ruleset.uc https://github.com/openwrt/firewall4/raw/698a53354fd280aae097efe08803c0c9a10c14c2/root/usr/share/firewall4/templates/ruleset.uc
fw4 check
service firewall restart
# or if it fails restore original file
# cat /rom/usr/share/firewall4/templates/ruleset.uc > /usr/share/firewall4/templates/ruleset.uc

4dbm is not properly applied, it may work like 1m from router with such signal levels

didn't really change anything. Changing it away from 4dbm still makes the speed horrible.

You did not really show any measurements so far.

Ideal 250mbps down 150 up (subscribed speeds from ISP is 300mbps down)

default driver Tx Power (it basically sets to 9dbm) gives 50mbps down 120 up
4dbm Tx Power gives 110mbps down, 120mbps up
everything else, around 60mbps down, 120mbps up

Paste result link wired
https://www.waveform.com/tools/bufferbloat
And wireless
And show current config/wireless

Wired:
https://www.waveform.com/tools/bufferbloat?test-id=dec3d4f4-11a0-4857-a876-9a82ccaab86c
Wireless 5Ghz:
https://www.waveform.com/tools/bufferbloat?test-id=a2e29e17-34c2-4a41-8945-a103738be002
Wireless 2.5Ghz
https://www.waveform.com/tools/bufferbloat?test-id=6507bf42-c7c9-4130-b5fd-ac6aa5bb8696

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

config wifi-iface 'default_radio0'
        option device 'radio0'
        option mode 'ap'
        option encryption 'sae-mixed'
        option ssid 'my25ssid'
        option network 'lan'
        option key 'mypass'

config wifi-device 'radio1'
        option type 'mac80211'
        option path '1e140000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0+1'
        option channel '157'
        option band '5g'
        option htmode 'VHT80'
        option cell_density '0'
        option country 'countrycode'

config wifi-iface 'default_radio1'
        option device 'radio1'
        option mode 'ap'
        option encryption 'sae'
        option ssid 'myssid'
        option network 'lan'
        option key 'mypass'

yes, my wired speeds seem to be as expected (i've posted my speed tests above). So it has to do with something WiFi (pasted the cat /etc/config/wireless above)

can you please post a 5Ghz channel scan "Channel Analysis" to understand if your channel 157 is very busy ...

is this really set in your /etc/config/wireless file or did you post the file modifying the "countrycode"?

usually the "countrycode" is your country code "IT", or other...

https://openwrt.org/docs/guide-user/network/wifi/wifi_countrycode

have you tried setting channel 36 ?

My country code is a two letter code and my 5ghz channel is clean.

1 Like

ok it was just to understand ...

have you tried (if available in your country) channel 36?

https://www.waveform.com/tools/bufferbloat?test-id=a22ac8f1-5cc6-4021-bb93-d5f798a1c6e0
its worse than previous speed tests at higher channels

have you by any chance tried whether wifi performance depends on the client in use (if you have more than one, you can try from another device, smartphone or other) ...

1 Like