RPi4 routing performance numbers

pretty sure you will need kmod-usb-net-rtl8152 https://openwrt.org/packages/pkgdata/kmod-usb-net-rtl8152

1 Like

My configuration file is as following:

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

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

config globals 'globals'
        option ula_prefix 'fdbb:54ac:343f::/48'

config interface 'lan'
        option type 'bridge'
        option ifname 'eth0'
        option proto 'static'
        option ipaddr '192.168.1.2'
        option netmask '255.255.255.0'
        option ip6assign '60'
        option gateway '192.168.1.1'
        option dns '192.168.1.1'

Problem is, when I tried change the ips to 192.168.137.0/24, in order to use the windows network sharing, the RPi 4 didn't get to the WAN through my laptop. So I am still struggling to get the package kmod-usb-net-rtl8152 as you mentioned.

Well, as I run Linux on everything I'd probably just shove the sd card into my laptop or desktop and write the module directly into /root or something... but if you have windows this is less of a possibility. I'm not sure, does the card image include a fat32 partition for such purposes?

otherwise you'd need to change the gateway, dns, and ipaddr but if that didn't work...

next step would be something like use your smart switch to provide lan and wan on port 1 via VLANs.

option ifname 'eth0.1'

for LAN, and eth0.2 for WAN. Make WAN a DHCP client...

make port 8 on your switch untagged for VLAN 2, and plug your ISP device into port 8, plug your pi into port 1... voila you have both LAN and WAN on a single ethernet. at this point you can probably download the package. Then you can reconfigure WAN and reboot.

I do have a Linux machine, perhaps with which I can use to put the package the right place. It would be nice if someone can show me how.

On any relatively recent desktop type linux machine if you slip the card into a cardreader it gets mounted to /media/yourusernamehere/driveIDhere and shows up in nautilus for example. Then you download the module with a web browser, and drag the file from the downloads directory into the appropriate spot on the sd card using nautilus for example. you can put it in /root which is the home directory of the root user.

then you eject the card safely in nautilus, and pull it out and re-plug it into the pi... you boot it up, and then opkg install kmod-usb-net-rtl8152.....ipk

Tried with putting the package in a usb drive, got this:

root@OpenWrt:~# opkg install /mnt/pen/kmod-usb-net-rtl8152_4.19.98-1_aarch64_cor
tex-a72.ipk
Installing kmod-usb-net-rtl8152 (4.19.98-1) to root...
Collected errors:
 * satisfy_dependencies_for: Cannot satisfy the following dependencies for kmod-usb-net-rtl8152:
 *      kmod-usb-net
 * opkg_install_cmd: Cannot install package kmod-usb-net-rtl8152.

I am pretty sure the image of RPi 4 is the same date.

looks like you need a kmod-usb-net generic module as well.

Checked the package directory and found no such 'generic' module.

assuming you're using snapshot, I think it's this: https://downloads.openwrt.org/snapshots/targets/brcm2708/bcm2711/packages/kmod-usb-net_4.19.98-1_aarch64_cortex-a72.ipk

The following modules are needed to install the driver for usb Ethernet dongle:

kmod-usb-core
kmod-usb-net
kmod-mii

And yes, I have successfully installed the driver.

2 Likes

So, some more data here... I've had the RPi as my main router on my ATT gigabit GPON link since about 10 days ago. So far absolutely no hiccups at all with the USB NIC or anything like that. It just works very well. It handles the full speed, as well as Squid proxy, it runs nftables flawlessly (on raspbian, still no definitive idea what's up with nftables on OpenWrt... see another thread for that). It does a custom HFSC based QoS, marks packets with DSCP both directions, etc etc.

I put a cheap USB memory stick in and F2FS filesystem on it for logging, to protect the main SD card. Other than that... it's fabulous.

2 Likes

Fully agreed. I'm really thrilled by the power of this little box.

In addition to the routing task my rpi4b runs yate, a sip server.

Yate registers with my sip provider and all in-house ip-phones register with yate on the rpi4b. So yate acts as a client to the sip provider and as a server to the ip-phones. As a side effect I have calls from phone to phone without using my sip provider.

As dlakelan already said: so far absolutely no hiccups at all or anything like that. It just works very well.

Thanks to all developers for this great gift.

Does Pi4 support VLAN’s on both ports in this setup?

Yes, just set up eth0.2 and eth1.3 or whatever you like.

any experiences with one of those?

no, and my switches are all 1Gbps and I don't have any devices with faster Ethernet, so it's hopeless for me to try, it'd just sync at 1Gbps. I have a bonded link between my server closet and my desk so I can saturate 1Gbps doing file transfers over NFS and not also choke the WiFi access point. that's about the extent of my experience over 1Gbps

@dlakelan
Did you conduct some tests for the WiFi? I am considering the RPi ad an AP but was wondering how the onboard WiFi world do serving couple of clients. Also how much take do you think I could get in open space for a 10+ mbps?

I haven't tested WiFi, but it's limited by two basic factors. The first is the capabilities of the chipset, and the second is the tiny antenna. I think as @moeller0 said somewhere it would make a good management interface where you're accessing the device from short distance to change settings or whatever.

Will it work for other purposes? probably for light duty, say tens of Mbps for a few clients yes. It might be fine as a travel router for example.

Here's the output of iw list, it shows that as an AP it is limited to 2.4GHz and channel 36, 40, 44, 48 with 20MHz channel width in 5GHz

It can do 4 SSIDs in AP mode, or a client and 3 SSIDs

$ iw list
Wiphy phy0
	max # scan SSIDs: 10
	max scan IEs length: 2048 bytes
	max # sched scan SSIDs: 16
	max # match sets: 16
	max # scan plans: 1
	max scan plan interval: 508
	max scan plan iterations: 0
	Retry short limit: 7
	Retry long limit: 4
	Coverage class: 0 (up to 0m)
	Device supports roaming.
	Device supports T-DLS.
	Supported Ciphers:
		* WEP40 (00-0f-ac:1)
		* WEP104 (00-0f-ac:5)
		* TKIP (00-0f-ac:2)
		* CCMP-128 (00-0f-ac:4)
		* CMAC (00-0f-ac:6)
	Available Antennas: TX 0 RX 0
	Supported interface modes:
		 * IBSS
		 * managed
		 * AP
		 * P2P-client
		 * P2P-GO
		 * P2P-device
	Band 1:
		Capabilities: 0x1022
			HT20/HT40
			Static SM Power Save
			RX HT20 SGI
			No RX STBC
			Max AMSDU length: 3839 bytes
			DSSS/CCK HT40
		Maximum RX AMPDU length 65535 bytes (exponent: 0x003)
		Minimum RX AMPDU time spacing: 16 usec (0x07)
		HT TX/RX MCS rate indexes supported: 0-7
		Bitrates (non-HT):
			* 1.0 Mbps
			* 2.0 Mbps (short preamble supported)
			* 5.5 Mbps (short preamble supported)
			* 11.0 Mbps (short preamble supported)
			* 6.0 Mbps
			* 9.0 Mbps
			* 12.0 Mbps
			* 18.0 Mbps
			* 24.0 Mbps
			* 36.0 Mbps
			* 48.0 Mbps
			* 54.0 Mbps
		Frequencies:
			* 2412 MHz [1] (20.0 dBm)
			* 2417 MHz [2] (20.0 dBm)
			* 2422 MHz [3] (20.0 dBm)
			* 2427 MHz [4] (20.0 dBm)
			* 2432 MHz [5] (20.0 dBm)
			* 2437 MHz [6] (20.0 dBm)
			* 2442 MHz [7] (20.0 dBm)
			* 2447 MHz [8] (20.0 dBm)
			* 2452 MHz [9] (20.0 dBm)
			* 2457 MHz [10] (20.0 dBm)
			* 2462 MHz [11] (20.0 dBm)
			* 2467 MHz [12] (20.0 dBm)
			* 2472 MHz [13] (20.0 dBm)
			* 2484 MHz [14] (disabled)
	Band 2:
		Capabilities: 0x1062
			HT20/HT40
			Static SM Power Save
			RX HT20 SGI
			RX HT40 SGI
			No RX STBC
			Max AMSDU length: 3839 bytes
			DSSS/CCK HT40
		Maximum RX AMPDU length 65535 bytes (exponent: 0x003)
		Minimum RX AMPDU time spacing: 16 usec (0x07)
		HT TX/RX MCS rate indexes supported: 0-7
		VHT Capabilities (0x00001020):
			Max MPDU length: 3895
			Supported Channel Width: neither 160 nor 80+80
			short GI (80 MHz)
			SU Beamformee
		VHT RX MCS set:
			1 streams: MCS 0-9
			2 streams: not supported
			3 streams: not supported
			4 streams: not supported
			5 streams: not supported
			6 streams: not supported
			7 streams: not supported
			8 streams: not supported
		VHT RX highest supported: 0 Mbps
		VHT TX MCS set:
			1 streams: MCS 0-9
			2 streams: not supported
			3 streams: not supported
			4 streams: not supported
			5 streams: not supported
			6 streams: not supported
			7 streams: not supported
			8 streams: not supported
		VHT TX highest supported: 0 Mbps
		Bitrates (non-HT):
			* 6.0 Mbps
			* 9.0 Mbps
			* 12.0 Mbps
			* 18.0 Mbps
			* 24.0 Mbps
			* 36.0 Mbps
			* 48.0 Mbps
			* 54.0 Mbps
		Frequencies:
			* 5170 MHz [34] (disabled)
			* 5180 MHz [36] (20.0 dBm)
			* 5190 MHz [38] (disabled)
			* 5200 MHz [40] (20.0 dBm)
			* 5210 MHz [42] (disabled)
			* 5220 MHz [44] (20.0 dBm)
			* 5230 MHz [46] (disabled)
			* 5240 MHz [48] (20.0 dBm)
			* 5260 MHz [52] (20.0 dBm) (no IR, radar detection)
			* 5280 MHz [56] (20.0 dBm) (no IR, radar detection)
			* 5300 MHz [60] (20.0 dBm) (no IR, radar detection)
			* 5320 MHz [64] (20.0 dBm) (no IR, radar detection)
			* 5500 MHz [100] (20.0 dBm) (no IR, radar detection)
			* 5520 MHz [104] (20.0 dBm) (no IR, radar detection)
			* 5540 MHz [108] (20.0 dBm) (no IR, radar detection)
			* 5560 MHz [112] (20.0 dBm) (no IR, radar detection)
			* 5580 MHz [116] (20.0 dBm) (no IR, radar detection)
			* 5600 MHz [120] (20.0 dBm) (no IR, radar detection)
			* 5620 MHz [124] (20.0 dBm) (no IR, radar detection)
			* 5640 MHz [128] (20.0 dBm) (no IR, radar detection)
			* 5660 MHz [132] (20.0 dBm) (no IR, radar detection)
			* 5680 MHz [136] (20.0 dBm) (no IR, radar detection)
			* 5700 MHz [140] (20.0 dBm) (no IR, radar detection)
			* 5720 MHz [144] (disabled)
			* 5745 MHz [149] (disabled)
			* 5765 MHz [153] (disabled)
			* 5785 MHz [157] (disabled)
			* 5805 MHz [161] (disabled)
			* 5825 MHz [165] (disabled)
	Supported commands:
		 * new_interface
		 * set_interface
		 * new_key
		 * start_ap
		 * join_ibss
		 * set_pmksa
		 * del_pmksa
		 * flush_pmksa
		 * remain_on_channel
		 * frame
		 * set_wiphy_netns
		 * set_channel
		 * tdls_oper
		 * start_sched_scan
		 * start_p2p_device
		 * connect
		 * disconnect
		 * crit_protocol_start
		 * crit_protocol_stop
		 * update_connect_params
	Supported TX frame types:
		 * managed: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0
		 * AP: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0
		 * P2P-client: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0
		 * P2P-GO: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0
		 * P2P-device: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0
	Supported RX frame types:
		 * managed: 0x40 0xd0
		 * AP: 0x00 0x20 0x40 0xa0 0xb0 0xc0 0xd0
		 * P2P-client: 0x40 0xd0
		 * P2P-GO: 0x00 0x20 0x40 0xa0 0xb0 0xc0 0xd0
		 * P2P-device: 0x40 0xd0
	software interface modes (can always be added):
	valid interface combinations:
		 * #{ managed } <= 1, #{ P2P-device } <= 1, #{ P2P-client, P2P-GO } <= 1,
		   total <= 3, #channels <= 2
		 * #{ managed } <= 1, #{ AP } <= 1, #{ P2P-client } <= 1, #{ P2P-device } <= 1,
		   total <= 4, #channels <= 1
	Device supports scan flush.
	Device supports randomizing MAC-addr in sched scans.
	Supported extended features:
		* [ 4WAY_HANDSHAKE_STA_PSK ]: 4-way handshake with PSK in station mode
		* [ 4WAY_HANDSHAKE_STA_1X ]: 4-way handshake with 802.1X in station mode
1 Like

Thanks @dlakelan. I think it won't harm to buy one and give it a try. Meanwhile I could install my Pi 3 and see what it gives me in terms of WiFi as AP.

What are the numbers like with openvpn ?