I’ve been a long time consumer of this great forum. Including the long VLAN thread originating from 4y back :D.
But I cannot get my setup working. Here are some details:
HA running on HAOS within a VM on a QNAP NAS
The NAS is connected via 2 different NICs. One in my private network, the 2nd one to my IoT VLAN 30 (specific port on the switch with default VLAN 30)
Both NICs get IPs and the NAS is reachable from both networks
The VM on the NAS is supposed to get IPs from virtual switches (a QNAP-specific thing, where both virtual switches - 1 per network - do get an IP from my router)
BUT the VM and therefore HA do only get an IP from the “private” network
Below is the output of ha net info. I also created a VLAN inteface within HA, just for testing. But esp0s4 doesn’t get an IP and esp0s4.30 only shows up when I assign a static IP to esp0s4 (without getting an actual IP from my router). After tinkering around for 1w+, I need a fresh perspective on it. Thanks for your guidance!
HA is designed and expects a flat subnet to work as intended.
This is because every segmented network is different for IP’s and number of segments and firewalls and sharing rules and about 650495849085 other things.
This does not mean you can’t use them or that they can’t be made to work, it means that to get them working you are the support structure on your own subnet(s). Consider it Advanced mode…
I’m not familiar with your hard/soft config, but I have HA on proxmox as a VM and a Unifi network. I gave it two NICs in proxmox, and set a static IP in the HA network settings, one for each Vlan I can’t remember if I tagged one NIC for the IOT Vlan in proxmox.
It works, although things were working prior with HA on my private side with firewall rules to allow the private Vlan to see into the IOT vlan. I think I created the second interface when I was trying to get Sonos to work , but ended up moving them to their own Vlan which is pretty much open to the private network.
I did run into issues with mdns messages from HA getting relayed from one HA interface to the other which kept HA changing mdns names and wasting CPU to the point of crashing it. More info on that here.
Sounds like you have no DHCP service on one of your networks.
You might get it up and running, but you will have a fight with discovery, because those services are not multihomed and you will probably need to learn a lot about IPv6, if you intend to use Matter or Thread.
Even if you avoid those pitfalls, then HA is not meant to be used as a router and you will get issue from time to time, like the discovery services suddenly shifting adapter after a restart.
If you want to run with VLANs, then put HA and your devices into one VLAN and let the router handle the routing (see the similarity between the function and the device! ) between the VLANs. That means only one interface on the HA server and you might even handle the firewall opening with just port 8123 to HA.
As the NAS literally does get an IP from DHCP running on the router - and all of the other 100+ devices do, I feel it’s a little more complicated than DHCP or DNS…
If QNAP has IPs for both network and only HA cannot reach both network, the issue likely exists at the VM. I dont use VM so can help there but
The “HA net info output” is kinda meaningless.
HAOS uses docker networks and that is what your looking at there I expect. This has nothing to do with external network to host or connections HA to LAN. I say this to keep you out of that rabbit hole if you were thinking to chase this
Curious. what do you see at HAui >> settings >> system >> network >> network adapter?
does it event detect the second adapter? if it does, try deselecting “auto configure” and check all adapters.
You are most likely wrong in your assumption.
You DHCP on the router is not leasing an IP to both your VMs.
One of them or maybe both of them are getting an IP leased from the router on the virtual hypervisor network.
Your router are probably leasing out 192.168.0.0/24 or 192.168.1.0/24.
Your VMs are getting 192.168.66.32 and 192.168.178.43 and my guess is that they both use subnet /24
Correct, the issue already sits on the the VM, as it doesn’t get an IP via NIC2. It does, though via NIC1 as it is the same VM.
The HA UI does show both ENP0S3 and ENP0S4 (in captions, btw. compared to lower caps in the config). The DNS server is also shown (correctly), but no gateway and no IP assigned. Might not have mentioned it before, but if I do assign a static IP within HA to the 66.0/24 network, it doesn’t show up on the router either.
After firing up a simple Alpine linux in a new VM on the QNAP which is bound to NIC2, I know more: the Alpine does get an IP and has network access out of the box [1]. Therefore the problem is most likely within HA. Any further ideas, now that we basically can rule out a networking issue [2]?