Do I have to give up on separate VLANS?

HDMI cable, TV and direct connection

Won’t work, the yellow does not have a HDMI port.

Making progress here. :slight_smile:

So I built a test HA using an old RPi3 B+
Once it was minimally set up, I tried various ha network and ip commands and was able to make these changes without losing connectivity.

  1. ensure the HA hardware is using DHCP with a dynamically assigned address - so if you confuse the config, it should always have a usable IP address that you can connect to.
  2. Confirm the regular network config - on my Unifi switch, the HA instance was on the IoT vlan 20.
  3. Configure the Unifi switch to support multiple VLANS
Port                    active
Native VLAN / Network   IoT (20)
Tagged VLAN Management  Custom
Tagged VLANS            Main (50)

Advanced                Auto
  1. Install the SSH add on to HA.
  2. Add vlan 50 to the HA ethernet port
ha network vlan enu1u1u1 50 --ipv4-method auto --ipv6-method auto

The following commands might be useful

ha network info | more
ip link
ip addr show
ip link delete dev enu1u1u1.50

I restarted the RPi and was able to reconnect to HA on 8123 and over ssh

The settings > system > network now shows the second network interface as a vlan

I’m now setting up Open Thread Border Router using a Sonoff Dongle Plus E, and once I confirm that works, I’ll repeat these steps on the HA Yellow.

Oh yeah I totally forgot about multiple ways of HA installation cause I’m always using HAOS through qemu. But I’m glad you found a way how to set it up! Taking notes. :wink:

What a lot forget to take into account is that Matter relies on ipv6 and mDNS, which i tricky across VLANS because mostly (for matter) it is using the link local address, which not routable, which means link local can’t route acrosss VLANs. Not to say it is impossible to get Matter to work across VLANs, but it it wasn;t designed to work across VLANs.
Multi homing your HA instance is likely the best work around, but there is not going to be a 100% guarantee Matter devices will work across different VLANs without consdierable faffing around.

I am no expert in Matter of course, but this thread has some good information Home Assistant can’t add Matter devices that are in a different VLAN - Configuration / Matter/Thread - Home Assistant Community (home-assistant.io)

2 Likes

This sums it up quite nicely. I’d only want to mention that the resolver integrated in Matter SDK should be able to handle multi homing. But the Home Assistant Matter Server currently scopes link-local addresses which are sent from the Home Assistant companion app. I’ve added a comment to the linked thread.

1 Like

Yeah about that…

I’m running HA connected to 3 VLANS w/ enabled mDNS on all 3 of them… This was let’s say relatively easy to do (even w/ that manual configuration of SLAAC, ehm). BUT! At the same time there is mDNS repeater (avahi) running on my OpenWRT router and thaaaat was something else! It went nuts. :laughing: Collision detection was updating HA’s hostname w/ every packet (incrementing that suffix counter). :laughing: So I had to build my own version of avahi repeater w/ hardcoded macs of all 3 HA’s interfaces as repeater’s “blacklist”.

Hey @davidrapan this looks like what’s been going on here for quite some time, with the caveat that I’ve been playing between Ubiquiti’s implementation and settings for a while, disabling mDNS for the IoT vlan, enabling snooping everywhere, and even assigning my main switch as the querier for each network. This probably slows down the implosion but I can definitely see a ~60% multicast storm logged when I start to see devices loosing connectivity - damn! Ubiquiti has been adding functionalities there over and over again as I guess I’m not the only one, and with every attempt I had some hope but never got super stable.

Now, my story aside, can you expand on how you achieved a non-stormy network a bit more? I’d like to take notes and spend some fun time trying the route you described. As Ubiquiti just added the feature of selecting what functionality should mDNS reflector process or not, and I’m testing what happens with Matter disabled, letting HASSOS handle, the blacklisting idea seems way more sustainable and I think it’s even supported already, so super interested :eyes:

Hi @ErMejoo,

Setup

OpenWRT router manages 3 VLANs and runs avahi mDNS reflector on all.

Problem

Started when Home Assistant joined the network and joined all 3 VLANs with multicast traffic enabled on all adapters.

One device connected to multiple VLANs w/ mDNS reflector enabled will simply reply to its own packets = collisions.

Solution

The mDNS reflector must ignore all mDNS packets with the source mac address of any of the Home Assistant adapters.

Since avahi doesn’t have this feature (filtering packets based on their source mac address), I had to build my own version w/ hardcoded mac addresses of all Home Assistant adapters so that they wouldn’t be reflected anymore.:wink:

1 Like