Connecting with Ethernet AND WiFi - problems

Hi,

I've just set up a new home network based around OpenWRT, comprising an x86 box as router and three hard-wired Linksys WHW03 v2 units as dumb access points (with 802.11r enabled to assist in client roaming).

Everything is working great, and i'm very happy with the new setup, but i'm hitting a weirdness with my Mac.

I want to use my desktop Mac wired primarily, but certain functions (AirDrop, Unlock with Apple Watch etc) require WiFi to be active. And since known WiFi networks are synced via iCloud, this means the Mac also connects to my WiFi network.

However, this is where the problem starts. Say I start with WiFi connected only. I plug in my Ethernet cable, and it eventually switches to Self-Assigned IP. If I then switch off WiFi, after a few seconds it gets a DHCP'd IP address and I can connect to the network / internet.

Then if I switch wifi back on, it connects to WiFi, and both connections appear live, but I can't connect to anything on the internet, or even locally (like opening the OpenWRT router's web interface - ping reports 'no route to host' for both the router at 192.168.1.3 or the AP i'm connected to 192.168.1.11) unless I either unplug the Ethernet cable or disable WiFi.

Any help with this would be greatly appreciated! :slight_smile:

:open_mouth:

Are you saying that you're attempting to have thet client use both Ethernet and WiFi at the same time?

1 Like

Does the rest of your network keep working, when the Mac is connected to both interfaces?

1 Like

Sounds like MAC filter blacklist for the Mac can be handy.

Yes. I just tried the same with a Windows PC, and it worked fine. On my old network setup, which was eero based, the iMac connected on both and was identified twice in the eero interface.

Not a bad idea, so the WiFi can be switched on and attempting to connect, but never actually do so? Might be worthwhile.

But why is it an issue to connect two different ways? The Mac will use the wired connection in preference to the wireless.

Yes, I believe so.

Is that an unsupported configuration as far as OpenWRT is concerned?

Exactly.

Theoretically yes. In practice it may use the connection that came up last. And it is not advised to have to connections in the same network if they are not bridged. And if they are bridged there is high probability for layer 2 loop.

2 Likes

Some distros give Ethernet a lower metric or vice versa.

This works flawlessly on my Linux machine and IMHO it should work on any operating system. Why should I disable WiFi when I plug my Notebook into the docking station!?

On Linux, NetworkManager keeps track of routing and assigns the two default routes a different metric. Hence, the wired connection has precedence. You could check the route metric on the Mac, I suppose!?

Thank you for being among the first voices to suggest this isn't an unreasonable ask :smiley:

This worked great with eero, and I refuse to believe that OpenWRT can't handle it. Its very weird, though - even if I use a static IP on the Ethernet port, it works for a few mins then goes offline again, so its not just some DHCP problem.

One other thing - my router is currently using a slightly older RC version of OpenWRT, which was the newest version I could find pre-packaged as an ova file, since it runs virtualised on a VMWare ESXi server. The version is OpenWrt 21.02.0-rc3 r16172-2aba3e9784 - might I be better off with a newer version?

UPDATE: I just got some RPC errors in the Luci interface - ended up reinstalling Luci and on a whim plugged in the Ethernet cable again on the Mac. The result is that the Mac got an IP and is now connected by both Ethernet and WiFi, with it using Ethernet first. How utterly bizarre that it wasn't working before! It appears to be working fine now.

UPDATE: I just got some RPC errors in the Luci interface - ended up reinstalling Luci and on a whim plugged in the Ethernet cable again on the Mac. The result is that the Mac got an IP and is now connected by both Ethernet and WiFi, with it using Ethernet first. How utterly bizarre that it wasn't working before! It appears to be working fine now.

I wasn't refrencing OpenWrt specifically.

My machines are just configured not to connect to the same network twice. It's important at least in my experience - those things must be known.

As I noted:

I beleive you can set it on some GUIs.

I just have seen no logical reason to do so, until today. Security-wise, it just seem more sensible to maintain the
single WiFi if that's what needed. The use case of course is different than my imagination, likely.

Glad it's working.

In the case of the Mac, I can confirm that it is fine and works properly. I have been doing this for a while (wired is preferred, but the wifi related reasons mentioned by the OP apply as well). The interfaces are treated as individually routed which avoids any potential switching loops, and the system has a service order priority (i.e. metric) for each interface so that there is no ambiguity as to the path that packets should take.

That said, I have seen situations where connecting wired and wireless interfaces does indeed cause major problems with the network itself -- specifically, Peloton bikes would treat the interfaces as a bridge and wouldn't auto-disable one or the other if both were connected (this may or may not have been fixed since the time I helped with that issue). Similarly, Sonos devices are supposed to have STP to prevent switching loop problems, but I experienced major issues with my network when something in their STP algorithm/implementation changed.

So the behavior is very much device/OS dependent. But in the end, it has nothign to do with the router in use.