I have two separate networks 192.168.x.0 and 192.168.y.0. I have devices on both networks that I want HA to control.
I’ve added two network cards (and connected them) to the machine but only one looks to be configured. They should both be getting IP’s from their respective upstream dhcp servers.
Not sure there is anything in that image to indicate HassOS - and I checked before posting. Just an interface listing for hassio but that could appear in other setups as well.
If your two networks are already separately routed, why bother with the dual interface? Your HA instance can access the other net via the router.
I run same setup (HassOS on VMware). Gimme a few minutes to see if HassOS uses similar network setup to other Linux distros.
One more question, was second vNic present and enabled when HassOS was installed?
Running HassOS 3.8. I have running multiple vlans for network seperation. 95% of what HA controls are on my IoT vlan (192.168.x.0/24) but there are a few devices that I cannot place on IoT network that I also want HA to control.
I would prefer to not allow for inter vlan communication that is the reason I have two vNICS installed on the HA instance.
Both vNICS were present and connected at the time of the VM creation.
I am curious of HassOS is limited (by default) to configure only one NIC.
Nice. Was typing from mobile before so wasn’t able to provide much info or a guide. If you have a chance, post back if the nic config is preserved after a reboot. Curious about that as well.
Created an account to say thanks for posting the detailed solution. I was facing the same issue and the steps above helped me get the second NIC up and running. Cheers!
Hello… I hope I can find someone here that could had the same problem…
Considering two network interfaces, on two different VLAN’s (LAN and IOT)… how can I set which is the “default” interface??
More details: using nodered, some nodes act like fake alexa devices and the alexa scans the network to find those fake devices… I don’t know why but some times seems like those fake devices are listening on the “LAN” VLAN which my echo devices are not allowed and it fails… If I deactivate the “LAN” interface and restart hime assistant, alexa find the device.
I need a way to assure that those fake devices listen only on my IOT VLAN.
Hi, I am using the HassOS image in Hyper-V on Windows 10. I have a separate isolated VLAN for IOT and my normal home network both with DHCP servers. The host has two (actually more, but that does not matter here) physical NICs connected to each network set up in virtual switches as external - don’t share with host, so these are for exclusive use to the guest OS (HassOS). The VM is set with two virtual NICs connected to each virtual switch. So in theory HassOS should get my IOT VLAN IP on eth0 and my home network IP on eth1. The goal was to keep IOT devices isolated in their own VLAN, but be able to access HA web admin from any device in my home network.
Unfortunately what happens is that only eth1 gets assigned an IP address when HassOS boots - nevermind which network is it connected to. When I remove the virtual network adapter, eth0 gets an IP assigned. When i run nmcli device connect eth0, it actually works (!) but disconnects eth1 (so I lose access to the server besides the Hyper-V console). It seems that for some reason HassOS only connects on one eth interface.
How to bypass this please? I guess this use scenario with two NICs in separate networks is quite common.
@vlastaw I’m not sure if you figured this out but I just hit this issue. I had HASSOS setup (in a VM, running on proxmox) for about a year now. About 6 months ago I added a 2nd nic which physically connects to my IoT VLAN.
Earlier today I found my HASS randomly can’t connect to anything. I ssh’ed in, and sure enough can’t ping it. It looks like the metric for the IoT VLAN NIC somehow became lower than the normal LAN NIC, which resulted in nothing being accessible (because nothing in that VLAN can access the rest of my network).
To “Fix” this, I simply removed the DNS & Gateway IP from my IoT VLAN NIC (so it only has IP & subnet - previously it was set to DHCP). This is fine for me since this interface is only for talking to devices in that subnet, the system should really use the other NIC for everything else.
Are you able to cast media over your IOT network? My instance SEES all the cast groups i create, and even new speakers I add, but they are always greyed out. I’ve gone into the settings, and changed the multi-cast option to be on the IOT network, saved, shutdown HASSOS vm, and turned it back on.
I can ping the gateway of the IOT network - but for some reason the media/cast is disabled.
Hi! unfortunately your fix does not work on my setup. When ever i remove the dns and the gateway ip from the secondary interface, the ip is automatically added again, even though its on manual. There is something buggy on this network configuration page.
However, manipulating the routing table via nmcli did the trick, but i had to do a remove ipv4.dns first, set the route-metric to 1 for the primary interface and reboot the system. I could not find a way to restart the NetworkManager daemon.
[ Edit: Apologies. Nevermind. I was using the wrong SSH/Terminal add-on. ]
I’ve been using the multi-home solution described by narsaw back in Feb '20 for some time, with no issues.
Today I did a system upgrade, to OS 10.5, supervisor 2023.09.2, and while the interfaces are up, and I can ping them externally, and from an HA ssh session I can ping devices on both networks, I think I have a routing issue. (My Unifi installation on HA isn’t communicating with either of my APs, which I suspect means a routing issue on their interface.)
But I’m hamstrung because nmcli isn’t installed. I don’t recall having to do anything special for nmcli before – has it gone away in the latest release? Can I install it?