If the TV casting screen can be found but the NAS name cannot connect, it will automatically detect and assign everything to mDNS management

Last month, my cousin was typing 'fnnas\media' on his study computer to drag a movie. After running in File Explorer for half a minute, a message popped up: 'Network path not found.' He called me over to check, I deleted the name and changed it to \\192.168.31.20\media, and it opened instantly. He asked if the NAS was broken, and I said no, it was you who called out the name but no one answered.
There's something called mDNS managing this behind all this. Why can the TV cast at home be able to find each other, why iPhones can find printers, and why Home Assistant can automatically discover more than forty devices—all because of its messages below. Today, I'll break this down and explain it clearly, because when it breaks down, it's especially confusing—the symptom is always "IP works, name doesn't work," which is the same root cause as when I < a href="https://www.shunot.com/en/nas/1028.html" > TV directly connected to NAS to watch movies.
First, separate the two methods for
mDNS is a different set. It has no servers, or in other words, each device in the network is itself a server. If your computer wants to know what IP your NAS is called, it won't ask anyone, just shouts directly across the entire LAN: "Who's called fnnas?" State the house number! NAS heard it and replied to itself: "I, 192.168.31.20." The
shouting isn't just shouting; there's a fixed routine: the packet is sent from UDP's port 5353 and sent to the multicast address 224.0.0.251, which is equivalent to the group number for all residents in this building. Any device on this network can receive it. Responding to whoever's IP is the answer, the reply packet goes back to 5353. The protocol specifies TTL of 255, making it very clear—this package can only be transferred on this link, not outside.
Therefore, mDNS tubes have a dedicated suffix: .local. fnnas.local is the name recognized by mDNS, which looks very similar to a domain name but doesn't use the same DNS as the internet. Sometimes when I visit the NAS management page, I just type http://fnnas.local:5666 and it opens — it's translated by it.
Why can the living room be connected, but the bedroom can't be opened
?In mDNS documentation, the scope of self-control is called "local link." The four words "local link" literally means: signals are only transmitted through this Layer 2 link, and the router does not help outward by default. I wrote a few lines of Python on a test machine completely isolated from HomeNet, joined the 224.0.0.251 multicast group, and waited for a full eight minutes—not a single packet. Then four name queries were sent to this address, including n100.local and _http._tcp.local, with zero response. No one was on the chain, so shouting hoarse was useless.
This explains two true stories from my family. First: I converted an old router into an AP and set up an IoT private network for smart devices. From that night on, the living room TV could no longer find the camera I had moved in—two networks, no one could cross the multiplex, and no one could hear anyone shouting. The second is even more hidden: a relative came to my house and connected to guest WiFi, tried to cast on their phone, but the living room TV was clearly on but couldn't find it. Visitor Network uses AP quarantine, and quarantine blocks exactly this kind of shout. I wrote about this in this article AP isolation.
So remember this fact: regular DNS asks for names worldwide, mDNS only asks for names on this link. Between them are routers, VLANs, and isolating switches—any one is the same, and the call is cut off. Later, I used a managed switch to set up a VLAN for the surveillance, and the NAS could still be detected by the TV. That's because both are in the mainnet zone and weren't separated. To connect across regions, you need a dedicated mDNS reflector to redirect the message—no need for home use.
Who at home is actually relying on it for a living
?I spent the whole night waiting on the main website using a bug detection tool. The 5353 port was livelier, much busier than I imagined
| Devices/features | registered with | brokenpostures | under the name of the register
|---|---|---|
| Apple device casting (AirPlay) | _airplay._tcp.local | can't find the receiver, the button doesn't appear at all |
| TV box/Chromecast | _googlecast._tcp.local | Casting list is empty |
| Printer Auto Discovers | Printer Name.local | Add Printer List Empty |
| Home Assistant Device Discovery | _homeassistant._tcp.local | The integration page cannot scan a new device, but fortunately HA installed in the NAS is diligent |
| My Feiniu NAS | fnnas.local | \fnnas\ won't open, just change the IP |
These "_xxx._tcp" styles are called another layer of stuff, called DNS-SD, a service discovery that rides on mDNS. To put it plainly: not only can you shout "Who is fnnas?" but also "Who can cast screens" and "Who can print?" The device itself raises its hand. Apple's pipe is called Bonjour, while on Linux it's called Avahi. Different names refer to the same well.
There's also something easy to confuse: the SSDP cast from Android phones is a different multicast protocol (the 239.255.255.250 group). I wrote about this in the article multicast protocol. Both sets of agreements do the same work, each shouting their own channel. So if you can't find it during casting, it depends on whether both sides are on the same channel—luckily, most TVs listen to both ends.
Why is Windows computers most prone to "name failure"? My
cousin's Windows couldn't connect the name when typed, rooted in Microsoft's historical burden. Windows has its own old way of recognizing names: first ask DNS, then mDNS, then LLMNR (port 5355 broadcast), and if that fails, dig up the old NetBIOS calendar (port 137). After four floors, use whichever floor is connected.
Where is the pitfall? Before Windows 10 version 1809, Windows didn't recognize .local at all, nor did it listen to mDNS. On older systems, if you type \fnnas\, it would broadcast to NetBIOS to ask, and the NAS's Samba service happened to return to NetBIOS, so most of the time it was just okay. But once the SMB service shuts down NetBIOS (many new firmware shut down by default), or inserts something that doesn't forward broadcasts, the name dies—and old Windows simply didn't have mDNS as a solution.
My cousin's car is an old version of Win10 that hasn't been updated for years, and this is exactly what it is frustrating. There are two ways: one is to honestly use the IP, the other is to upgrade the system. After 1809, Windows natively recognizes names ending in .local. Typing fnnas.local works to get through, which means mDNS is working. Note that it only parses and does not publish—others can find your Windows via mDNS, but you can't find it using the Windows machine name. This is Microsoft's implementation, frustrating but helpless.
The name sometimes works, sometimes not. Checking
mDNS in this orderis characterized by "mystical": it works today but not tomorrow, living room and bedroom not allowed. I pedaled a lot and built a fixed sequence, following it basically without detours
- Try switching IPs first. IP access is not the same name, but it's really a matter of the name layer, unrelated to network speed or signal. Don't restart the router.
- See if both sides are on the same network. Guest WiFi, IoT private networks, and the WiFi built on optical modems are all different links. Calling out is inherently unacceptable—this is design, not a fault.
- Check the system version. Old Windows doesn't recognize .local, but on Apple and Android phones, Windows 10 1809 and later, Linux all have no issues.
- Check if the group broadcast was blocked. Some routers have aggressive IGMP snooping, placing multicast within the switching chip to prevent flooding, so the terminal can't receive a single packet; The same applies to AP isolating switches. Refer to my article on AP isolation and troubleshooting methods.
- If ruling everything out isn't enough, then stop arguing with the name. For devices like NAS, which are fixed for years, bind a static IP to the router, and all phones and computers can store the IP for access, making it a permanent solution.
My own compromise is: devices like phones and TVs that change daily rely on automatic detection, while NAS and printers are fixed IPs that never move. Automatic discovery is convenient, but it's not as reliable as a fixed house number.
Just to mention safety, don't panic
.mDNS is a shouting system—anyone can respond, and anyone can eavesdrop. This is a huge hole in the enterprise intranet—someone can forge a response and trick you into taking your login credentials, so the company's computer system commonly blocks this path. The risk at home is much lower: if you can't get out of your home chain, outsiders can't respond. If you want to be serious, just don't put unfamiliar devices into the mainnet. Guest networks not only prevent unauthorized access but also keep these discovery protocols out of the door. This is my idea for home VLAN.
A quick technical tip: mDNS runs on UDP, has no connection, and sends without a second thought, so it's light but also loses packets. In environments with heavy interference in the 2.4G band, name resolution occasionally times out, so just retry and it's fine. It's completely different from TCP's retransmission mechanism. I wrote about the division of labor between TCP and UDP in my article
At the end, here's the general order: if the name can't connect, first change the IP to confirm it's the name layer, then check the same different network segments, then check the device's age and multicast switch. If the device doesn't work, just fix the IP. That time, my cousin ended up binding the NAS with a static address of 31.20, and since then, all the IP files stored in the study computer have been the same, and he never got angry about the name again.
