Configuring VLAN adapters on Home Assistant Yellow

Does anyone have any leads on how I might do this, or is just just too much network complexity to ask from the Yellow as configured?

My network is segregated into VLANs as well, and previously could just add network interfaces via Proxmox to the HAOS VM. So to HA, there two interfaces, they handled the VLAN traffic correctly (under the hood), and I was able to configure the interfaces within HA to whatever I wanted (DHCP, static, etc).
This worked perfectly for me, because I have some stuff on my “public” VLAN (XBox, Plex, other media stuff, etc), and IoT stuff on the IoT VLAN (Chinese switches, cameras, etc).

Then I got a Yellow and realized I couldn’t do this anymore. This is the only thread I found that came close to figuring it out, but just like every other thread, instead of directly answering your question, you got a lot of noise about how your network SHOULD be set up, and how HA can’t do this (I have no clue what @WallyR is saying in this thread, I literally can’t follow).

Guess what, it can be set up like how you want. Here’s the answer:

  • Get SSH/console access to your Yellow
  • Use nmcli to set up a 802.1Q VLAN interface
    • You were close, but HA uses NetworkManager to handle network (ahem) management
    • nmcli con add type vlan ifname <vlan name> dev <physical dev> id <vlan id>
    • e.g. for me, that command is nmcli con add type vlan ifname eth1 dev eth0 id 5
    • After this completes, the output of nmcli con show looks like this:
    • If the new VLAN is yellow, check nmcli dev status. Odds are, you’re not sending it VLAN tagged packets, so it’s sitting there not receiving any data. Once I fixed my managed switch to send tagged VLAN packets to that Ethernet port, it turned green and worked right away
  • Set new interface to DHCP
    • It might default to DHCP, but just in case it doesn’t:
    • nmcli device modify eth1 ipv4.method auto
    • nmcli device modify eth1 ipv6.method auto
    • If you want a static IP set at this level, I’d just google it. My rational is that I’ll never remember that I set a static IP way down in the HA host OS, or the minutia of how I got into the OS, so I set it to DHCP and reserve it up in my router.
  • Reboot the host

After a reboot, this is what I see in the OS:


This is what I see in HA:

And I verified all my VLAN 5 stuff is now reachable from HA. No fiddling with exclusive firewall rules and crap.

Hopefully this is what you were looking for.

8 Likes