Network performance issues RPi5 w/ dual RTL8125 2.5GbE

Good morning all!

I have been experimenting with OpenWRT and the Raspberry Pi 5.

My intent is to have a fully controllable and configurable network router that has robust parental controls as well as a plethora of network ability for the home user with multi-Gigabit internet. Good portions of todays consumer routers are serious overpriced and focus solely on Wifi performance.

Well what about us wired guys? I never found any great inexpensive options for just hardline purposes so I started a journey of trying to make my own.

I have been experimenting with OpenWRT as far back at 2016 but back then I was flashing it to existing routers, WRT54G comes to mind.

Anyways, now to my issues so far.

RTL8125 does not auto negotiate 2.5Gbe speeds with my Frontier Fiber ONT. This was present on the FOX222 that I had and the newer one I now have, FRX523. This is easily corrected with waiting till the interface is up and then running "ethtool -s eth1 autoneg on speed 2500 duplex full". It will take the port down again and bring it back up on a 2.5Gbe connections. Wasn't hard to make a automated task on boot to wait for the interface to fully connect then run the command.

Now for the head scratcher. Through my wireless AP I have a wifi connection of 1815/2402 Mbps but through put tests wont go higher than about 100MB/s or 750 Mbps. Processor on the Pi goes no higher than 7% loaded and RAM is more than enough empty, so it doesn't seem like a buffer issue either.

Does anyone have any insight in what else I can do to improve the performance of the Pi5? Also, working on how to make Ad Guard Home persistent through boots, the current method on the OpenWRT forums does not seem to be working for persistence through reboots.

I'm on a snapshot because its the only build that supports this model right now. I looked at the stable releases but they don't have the bcm2712 chipset.

Pi HAT link: http://bit.ly/4eMa60K

|Model| Raspberry Pi 5 Model B Rev 1.0|
|Architecture| ARMv8 Processor rev 1|
|Target Platform| bcm27xx/bcm2712|
|Firmware Version| OpenWrt SNAPSHOT r28124-efc0c4666b / LuCI Master 24.322.80622~a403707|
|Kernel Version| 6.6.61|
|Local Time| 2024-11-22 12:42:39|
|Uptime| 14h 2m 3s|
|Load Average| 0.00, 0.01, 0.00|

root@OpenWrt:~# ubus call system board
{
        "kernel": "6.6.61",
        "hostname": "OpenWrt",
        "system": "ARMv8 Processor rev 1",
        "model": "Raspberry Pi 5 Model B Rev 1.0",
        "board_name": "raspberrypi,5-model-b",
        "rootfs_type": "ext4",
        "release": {
                "distribution": "OpenWrt",
                "version": "SNAPSHOT",
                "revision": "r28124-efc0c4666b",
                "target": "bcm27xx/bcm2712",
                "description": "OpenWrt SNAPSHOT r28124-efc0c4666b",
                "builddate": "1731873294"
        }
}

AP have multi gig port ?

1 Like

Yes, using ASUS XT8 as AP. Im also connected to the "6Ghz" channel on the main AP, which is also the backhaul for an upstream mesh AP. During testing the AP CPU is not even tickled by my tests. I even tried replacing the r8169-firmware with the 8125 firmware directly from RealTek.

Im using a "high performance" SD Card and OpenWRT is the only thing running. My intent is to move to Docker later from a Linux distro after I get all these bugs worked out.

that's irrelevant, it's just as important as mentioning your extension cable where the Pi's hooked up being pink.

Apologies, just trying to be as detailed as possible in case I'm missing something.

1 Like

no worries :slight_smile:

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/dhcp
cat /etc/config/firewall
1 Like

My ISP does not offer IPV6 so I have all that disabled. I also dont have UPNP or other NAT packages installed. Im currently only using dnsmasq until I can get AdGuardHome to be persistent through reboots.

root@OpenWrt:~# ubus call system board
{
        "kernel": "6.6.61",
        "hostname": "OpenWrt",
        "system": "ARMv8 Processor rev 1",
        "model": "Raspberry Pi 5 Model B Rev 1.0",
        "board_name": "raspberrypi,5-model-b",
        "rootfs_type": "ext4",
        "release": {
                "distribution": "OpenWrt",
                "version": "SNAPSHOT",
                "revision": "r28124-efc0c4666b",
                "target": "bcm27xx/bcm2712",
                "description": "OpenWrt SNAPSHOT r28124-efc0c4666b",
                "builddate": "1731873294"
        }
}
root@OpenWrt:~# cat /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'

config device
        option name 'br-lan'
        option type 'bridge'
        list ports 'eth0'
        list ports 'eth2'

config interface 'lan'
        option device 'br-lan'
        option proto 'static'
        option ipaddr '192.168.254.254'
        option netmask '255.255.255.0'
        option ip6assign '60'
        option delegate '0'

config interface 'wan'
        option proto 'dhcp'
        option device 'eth1'
        option peerdns '0'
        list dns 'REDACTED'
        list dns 'REDACTED'
        option delegate '0'
        option hostname '*'

config interface 'eth2'
        option proto 'dhcp'
        option device 'eth2'
        option delegate '0'

config interface 'eth0'
        option proto 'dhcp'
        option device 'eth0'
        option delegate '0'

config route
        option interface 'lan'
        option target '192.168.254.0/24'
        option gateway '192.168.254.254'

config device
        option name 'eth1'
        option macaddr 'REDACTED'

config device
        option name 'eth2'

config device
        option name 'eth0'

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

config dnsmasq
        option domainneeded '1'
        option localise_queries '1'
        option rebind_protection '1'
        option rebind_localhost '1'
        option local '/lan/'
        option domain 'lan'
        option expandhosts '1'
        option cachesize '1000'
        option authoritative '1'
        option readethers '1'
        option leasefile '/tmp/dhcp.leases'
        option resolvfile '/tmp/resolv.conf.d/resolv.conf.auto'
        option localservice '1'
        option ednspacket_max '1232'
        list interface 'eth0'
        list interface 'eth2'
        list interface 'lan'
        list notinterface 'wan'

config dhcp 'lan'
        option interface 'lan'
        option start '100'
        option limit '150'
        option leasetime '12h'
        option dhcpv4 'server'

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 'REDACTED'
        option ip '192.168.254.210'
        list mac 'REDACTED'

config host
        option name 'REDACTED'
        option ip '192.168.254.222'
        list mac 'REDACTED'

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

config defaults
        option input 'REJECT'
        option output 'ACCEPT'
        option forward 'REJECT'
        option synflood_protect '1'

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

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'

what's on the other end of those two ports ?
for eth2 it would be the XT8 ?

eth1 is WAN (FRX523 10Gbps Port)

eth2 is LAN to the XT8 main AP 2.5Gbps port.

eth0 is the RPI5 and is only 1 Gbps. (Not in use.)

Wifi is disabled and is not used on the RPI5.

I should also post that throughput seemed fine on the previous kernel snapshot.

However I didn't test that specifically yet as im not totally sure how to compile from a older version in the OpenWRT builder.

You really should have looked at alderlake-n and n100/ n97 first....

1 Like

I mean I still can. I just happened to have a Pi5 laying around and felt it would be a good learning project. After looking the N100 over it could be comparable in performance but the reviews are so mixed.

I might have found the answer, possibly.

Packet Steering was not enabled.

I have turned that on and will be running new tests. Current setting is 128 but ill test the 256 as well.

I'm thinking because this is a Pi5 it's likely its not using the whole CPU due to this setting. Any thoughts?

It does appear that adjusting this setting is now offloading more to the CPU on the Pi5. I have yet to do a controlled throughput test yet to officially confirm.

I have put my Frankenstein creation with OpenWRT back into service. I fixed the AD Guard not starting on reboot and tested the "Packet Steering". From what I can tell so far is the throughput of the device is now working properly. However, I need to do more testing to know that for sure.

I also identified custom file configurations in the backup function so now I can load backups if I encounter issues.