Anyone know when HA will receive some attention when it comes to dual-homed setups? My HA servers has NIC’s on two different VLAN’s… Whenever it reboots, it’s kinda a nightmare to ensure the proper NIC is configured as “default”… Otherwise the routing doesn’t work.
What happens in your situation?
I also have dual NIC setup, one “resides” in a secure/trusted VLAN, another (WiFI) in an IOT VLAN without access to WAN and/or other VLANs. As far as I can tell, the first one always gets the default “star” after reboot. Maybe because it’s the wired one, idk.
I’m partly asking because I’m having troubles with routing inside HA. I’ve used two HA instances with Wireguard Add-ons as a site-to-site solution and it abruptly stopped working about a month or so ago without anything changing in my setup, so the “routing does’nt work” part triggered me
Home Assistant is not designed for segmented networks, so very likely not expected to change…
I have a NIC on my IoT vlan and another on a “semi-trusted” vlan for my streaming devices. I WANT/NEED the IOT nic to be the primary, but from about 3 HAOS updates ago, it seems to be random which nic becomes “default”… when the semi-trust nic is default, I have issues. So now before I reboot, I unplug the one on my semi-trusted vlan until after the reboot… Then it seems to be ok.
Then I have to ask… why support more than a single NIC at all?
Don’t know. My guess would be it is an Artifact of the base OS and more difficult to prevent it than not.
¯\(ツ)/¯
Yeah don’t disagree… just not sure it’s terribly difficult to allow setting a primary NIC that ‘sticks’ on reboot… otherwise, the dual home functionality works like a charm.
just following along … may I ask what do you mean by “default” or “primary” NIC?
I presume you mean that it is the interface that the default route uses (typically for getting to the internet), so asking just for clarification.
Both of my vlans allow internet access. When i say default its the ip i use to manage HA via my cloud flare tunnels.
For some reason that gets all botched up suddenly if i keep my non “default” connection plugged in during a reboot.
In theory the UI->Settings->System->Network and under it “Network Adapter” is suppose to allow one to select the “default” interface/NIC. However it has been reported in the past that this doesn’t work (don’t know if it is still the case or not).
However, here is a Community Forum thread on this topic and I’ve selected a particular topic number that may help out. This particular user had multiple interfaces/NICs, each with a default route, but he demonstrates how nmcli could be used to configure a least cost route metric for the default route associated with a chosen interface/NIC so that it will act as the ultimate default. Note: this user didn’t actually do it this exact way, but you’ll get the idea.
I can confirm that setting the “default” doesn’t work… this is the primary problem… However, setting the default route via nmcli sounds like it has some potential! ty!
sorry for late answer… did you try removing the gateway on the one you want to be secondary?
I’ll give it a try… If it truly is a default route problem, this should fix it. I’ll remove the gateway, and give it a few reboots to see what happens.
Update: Doesn’t seem to even let you configure it as blank… even if I blank it out, it simply reverts to whatever it was previously. It’s flaky for sure.
I’m also a bit confused with these 172.30.xxx.xxx IP’s… no idea what integration is using them.
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
0.0.0.0 192.168.3.1 0.0.0.0 UG 0 0 0 enp1s0
0.0.0.0 192.168.80.1 0.0.0.0 UG 0 0 0 enp0s20f0u7
172.30.32.0 0.0.0.0 255.255.254.0 U 0 0 0 hassio
172.30.232.0 0.0.0.0 255.255.254.0 U 0 0 0 docker0
192.168.3.0 0.0.0.0 255.255.255.0 U 0 0 0 enp1s0
192.168.80.0 0.0.0.0 255.255.255.0 U 0 0 0 enp0s20f0u7
➜ ~
The 172.30.23.0/23 and 172.30.232.1./23 are docker network subnets, for addons (dockers). I believe you should leave them be.
I think there was some way to enter ’ ’ as empty gateway for a (virtual)interface, I’ve seen it written somewhere. Can’t remember whether through “ha network” commands or nmcli. I’ll try and look around for it later, I have guests ariving as I write this. There’s also a way to set priority by metric, IIRC (also) through nmcli… Try searching around a bit with those keywords → set empty gateway, set metric, something like that.
That’s the thing… so both of my interfaces are physical… one built-in to the motherboard, the other is USB… AND the metric (when everything is working) is fine… it’s only the occasional reboot where things get outta whack… and to make matters worse, it’s not EVERY reboot… But often enough it makes me crazy but at least the fix is easy (unplug the NIC I don’t want as “primary” and it immediately starts to work).