Rpi4 < $(community_build)

@anon50098793
Hi
I am using dual wan (mwan3) config with 2x UE300.
One is plugged into the bottom USB 3 port (wan) and the other in the bottom USB 2 port (wanb).
When I reboot the RPi4, I lose internet connectivity after the reboot.
To rectify it, while the RPi4 is powered on I unplug both USB adapters and plug in the wan USB first, it connects automatically to the internet after a few seconds, then I plug in the wanb USB adapter and it also connects automatically to the internet after a few seconds.
Is there a way to fix it so that it can automatically connect after a reboot?

update: script now in build see here

original response

there is no easy way unless you an find a (logiclevel) 'usb3-relay' on alibaba or something...

(edit: a managed switch+vlans is probably the cleanest workable current reliable solution)

I used to provide a 000-nicmove hotplug script for this purpose, although it semi requires advanced skillas and/or a console connection

afaik (limited feedback) 3 people were unable to set it up properly so it has been taken down.

as stated previously on thread.... this should really be addressed at an os level...

the rpi4 is particularly 'random' when it comes to usb assignment... any advanced users facing this issue would also be advised to research / experiment with the various eeprom/config,txt msd or similar options and delays(or removal of)...

Ah okay, I see.
I am not willing to mess around with any other config files if it might complicate upgrading to future builds.
I placed an order for a TP-Link TL-SG108PE, I see it supports VLAN's and at least I will be able to power my UniFi U6-Lite from it also.
Thanks

1 Like

I probably should have got that model also...

got a gs308e this week... and while it's 'ok' for basic internal use... the security on it IMHO is not good enough for unsecure (wan) networks...

I still need a poe for the home... but can never pick one as they all seem to offer one thing and not another...

almost pulled the trigger on some ubiquiti units about 10 times this year... but always change my mind due to reliability concerns...

on the upside ( not that i'd want to really leave it enabled )... the gs-308e(and some other gs models) do have a basic python API... so i'm able to query the switch info from openwrt command line...

writing settings is broken tho... (at least on this model)... but in all honesty i'd probably want to disable the 'app-management' feature on these anyway...

USB assignment is always random, while it may be a trickier on OpenWrt you can usually use serial number to identify an induvidual adapter. Zyxel switches are nice and not that much more expensive fwiw

1 Like

When it comes to managed switches, you should really go for one supported by the realtek target. The stock firmware will be as good as any of the other shit out there, but you can simply replace it with OpenWrt. That's worth the small extra cost IMHO. Which is paying for better hardware (RAM, flash, CPU) anyway.

This means moving up a small step from the "Plus" to the "Smart" swithces in Netgear-speak. I.e. GS308T instead of GS308E. The GS308T support was added a week ago: https://git.openwrt.org/?p=openwrt/openwrt.git;a=commit;h=c829bc1f2c3c47e230905864f2f5f8c759f88ce6

But take the usual care when buying hardware for OpenWrt: Model numbers are recycled by some vendors. For example the Netgear GS108Tv3 (which is the currently available variant) is supported, but the older v1/v2 were based on different hardware and will therefore never be.

Personally I like the ZyXEL GS1900 series. Most of these have presoldered UART headers as an extra bonus. I am using a GS1900-10HP which has a 77W PoE budget and two SFP ports. All working perfectly with OpenWrt. I would definitely recommend it, or the -8HP if you don't need fiber, for anyone looking for a small PoE switch.

I also have a GS108Tv3, which has the advantage that it can optionally be powered by PoE. But like other Netgear switches, this one requires soldering a header for console. It can be converted to OpenWrt without console access, though,

4 Likes

Is the power supply good enough? Maybe during power on with all the components drawing a lot of power, the usb3 adapters do not get the power they need. Do they seem to be working after a cold boot? Can you see them in dmesg or ip link ?

I will just provide some anecdotal notes here; I'm not sure whether they are more broadly applicable or just to OpenWrt RPi4 users (or even more specifically to those who have similarities to my own configuration). I only note these things by virtue of not having seen them elsewhere, so felt it necessary to do so.

If you're attempting to apply SQM to a Wireguard interface, do be sure to include the requisite overhead for your designated protocol. That is, by default 40 for wireguard and then an additional 20 for IPv4 and then a further 20 for IPv6 (if you include it in your network stack). To exemplify: I have a VDSL connection via PPPoE, such that my default overhead is 34. To allow for Wireguard I add 40 for the default configuration, then a further 20 for IPv4. No more than that as I do not have IPv6, such that my overhead in SQM is 94.

Additionally: I have found it to be the case where attached to the Wireguard interface that better performance is gained by not leveraging the NAT argument for SQM; that instead it is preferable to default to the nonat configuration.

Moreover, that it is preferential to use the USB-Ethernet connection for WAN. This, in my own experience, resulted in fewer dropped packets - most notably when using Wireguard. Similarly, using ethtool to disable power saving mechanisms for the USB-Ethernet (WAN) interface resulted in better throughput.

I will again state that my conclusions are wholly anecdotal and seem true in all the tests I've performed in my configuration. I would gladly welcome contradiction as I've little capability to contrast my own experiences with my given configuration.

Thank you for your work, Wulfy23. It's good to see a concerted effort to support a configuration that has not been meant for it by default. Also, as a continuation of my previous post, that it's good to see that proper IRQ balancing has been implemented. IRQBalance in and of itself does precious little beyond initial config (is it even meant to adjust according to load?), but there are certainly lessons to be gleaned from what it does currently.

1 Like

I just flashed OpenWrt on my Pi 4B, connected it with LAN to my PC and opened the LuCI dashboard.

Now I would like to set up the wifi. Unfortunately in LuCI it shows under "Wireless" tab:
radio0 Generic MAC80211 82.11nac Device is not active

What can I do?

go to 'services' check 'wpad' is enabled and started...

go back to wireless, setup... enable and start...

other than that search this thread or the forum for setting your country code...

1 Like

Thank you! It works now.

For others more detailed:

Enable+Start wpad:
→ System → Startup → "wpad" → click on "disabled" to enable it → "restart"

Change country code:
→ Network → Wireless → SSID ap101 → edit → Advanced settings → Country Code: <select-your-country-code>

Change password:
→ Wireless Security → Key: "strongPW"

Save+Restart:
(→ Network → Wireless →) Restart → Save & Apply → Restart

For some reason my lan doesn't get internet from the wan.

For my wan I use eth1 (an usb lan adapter) that works. Via ssh@openwrt I can ping 8.8.4.4 as well as www.google.de ==> so internet works in general.

My lan is a "br-lan" (containing eth0 and wlan0)
What I could find on the internet the firewall looks okay (lan -> wan accept and wan has masquerading).

Any idea whats wrong here?

from what you have said... 'lan' = both wired and wireless...

have you tested both wired and wireless?

this suggests you have a dns issue...

  • where did you configure the dns settings on the router
  • what did you set them to?

Out of the box... openwrt will use dns servers advertised by your wan interface dhcp server...

if you are not using dhcp on your wan interface... then you need to enter which (upstream) dns server your dnsmasq(local dns server) will forward queries to...

via ssh both works:

ping 8.8.4.4
ping www.google.de

So the wan itself has no dns issues (because I entered the dns).
my config:

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

config interface 'wan'
	option proto 'static'
	option ipaddr '192.168.12.36'
	option netmask '255.255.255.0'
	option gateway '192.168.12.1'
	option ifname 'eth1'
	list dns '192.168.12.1'

I tested from both. wired and wireless. both the same. no internet at all (also tried with the pings)

1 Like

the dns server entry under your wan interface applies to the host(router only)...

go into your DNS-SERVER settings and set the upstream dns-server that you will hand out to clients that it will use for requests from clients...

you need a reverse route on your primary router (192.168.12.1)

in future when dealing with multiple networks... please ping each router along the path...

anyway... your issues are not really build specific... so for further assistance... please create a separate thread...

If the firewall configuration is left to defaults, it will work.
@phqzgunsfjror maybe open a new thread to solve it there.

1 Like

Thank you.
After a fresh install internet works on 'lan' now. I also changed the order: at first I configured 'wan' and then the wifi.

Does it support WPA3? I cannot even connect via WPA2. Only WPA seems to work...

the answer to that is complicated... does it work (currently on this os)?, not that i'm aware of...

you can start it but clients probably wont connect...

WPA2 can be made operable...

best to get a real AP

WPA2 doesn't work either... (if I go into my notebook wifi settings, I can see it only takes WPA)

My goal was to test OpenWrt and see whether it can fullfill my requirements but it makes a lot of problems :smiley: