mDNS Resolution Across LANs

Hi, I ran into an odd behavior with HA mDNS hostname resolution when I separated HA from my main network. I put HA in an IoT vLAN, but for right now there are no firewalls between the main network and IoT network. The two networks are set to allow all traffic between them. I’m new at networking, I’m learning as I go, haven’t gotten to firewalls yet.

When my laptop and HA are on the same IoT network, I see through Wireshark the mDNS query and then HA responds with its IP address, everything works as expected.

Now, when I put my laptop in my main network and I type in “homeassistant.local:8123” in the URL, I see in Wireshark the query going out and my UniFi router responding with the IP address, this confused me a bit. But I learned that mDNS does not go across LANs so I figured that the router/gateway(?) will repeat the request on the IoT network and then respond to me. Assuming this, I pulled up Wireshark in the IoT network and I saw the gateway (192.168.1.1) do the mDNS query for “homeassistant.local”, but HA never replied…

So to sum it up, HA replies to the query when it comes from my laptop when it’s on the same network, but it does not reply to the mDNS query from the gateway when the query originates from the main LAN.

I don’t think this is a UniFi issue as I see the mDNS query, HA just never responds… Any ideas?

You have some kind of mDNS reflection set up?

Not that I am aware of, I’ve never heard of mDNS reflection. I’m using mostly default UniFi settings. I do have a Pi-hole running as my DNS right now. I did not try this experiment without the Pi-hole in the equation.

By default this setting in the UniFi gateway is enabled and contains both networks. That’s about the only thing I noticed that I think is relevant.

Oops, maybe I spoke too soon. It sounds like this UniFi setting I mentioned above is enabling mDNS reflection across the two networks?

If so, it seems to work because I do see the mDNS request from the gateway on the IoT network (192.168.100.1), HA doesn’t respond to that. It does respond when the query comes from 192.168.100.103 (what my laptop was set to when I connected to the IoT network).

Someone can close this. I think I went down a misleading road of mDNS being a problem across LAN, it’s not that. I don’t think it matters what the IP address the mDNS request came in from, HA is being very finicky with the mDNS response. I’m going to post a better question/problem in another thread.

The issue is still here, this thread is just misleading.