Setup VLAN and HA tutorial

I finally ended up manually editing the files under /etc/NetworkManager/system-connections, removing the default and adding 2 new ones (one for each network-interface, I handle VLANs having 1 dedicated interface per VLAN between my switch and hypervisor box to increase throughput without expensive >1Gbps gear)

I very strongly recommend static IPs for everything – that will avoid a LOT of problems and things falling apart if you ever have your network go down (e.g. rebooting router/switch) at the moment something tries to do a call. I didn’t do this at first and my whole system imploded when I was upgrading my router and it took many hours to realize that my nightmares were caused by some things caching old IPs for DNS, and the new router not yet having got the DHCP request to put it in DNS yet. Ever since moving to static IPs everywhere I’ve not had a single issue, even when I have a network connectivity failure the automations and addons keep chugging along flawlessly.

Many consumer routers if you reboot them (or your ISP does, if its an all-in-one modem+router) you will lose the DHCP client list and DNS cached hostnames…which causes the same issues.

Open up the HassOS console, it won’t work thru the sandboxed ssh container.
Log in as “root”
At the ha> prompt type “login” to get to the REAL hassos
At the # prompt, cd to /etc/NetworkManager/system-connections

image

Then, using vi (it only has the most basic editor it seems) you can modify the config files. I put the “original” in a folder called “hold” in case I messed up.

Here is my “internet” connection (the main trusted network)

And then my restricted local-only IoT device network configuration

And then I just connect them to the proper bridge on my hypervisor

I did have to use some trial and error to figure out which “device” in the VM was which NIC on the host…but with 2 choices it wasn’t too hard.
image

6 Likes