Remix.run Logo
▲ wolrah 2 days ago

> mDNS doesn't work for the average user.

What did mDNS do to hurt you? You are spouting blatant wrongness in this thread.

mDNS is mostly FOR the average user, and it works great for them. AirPlay, Google Cast, Miracast, all mDNS. Google Home, Apple HomeKit, Matter, all mDNS. AirPrint/IPP/Mopria printers, all mDNS. Windows still uses a lot of its own proprietary autodiscovery but even there Microsoft has prioritized mDNS over the old NBT stuff.

> They memorize IP addresses as needed.

No, normal people use names, mostly delivered these days over mDNS. There are millions of consumer-targeted appliances and entry-level DIY projects intended for people who need a picture to not put the SD card in the Raspberry Pi where the instructions, after powering it up, say to open up a browser and navigate to <appliancename>.local (or more often with commercial devices, open the app which will be listening for that specific appliance's service advertisement.

> There must be like 3 end users who actually use mDNS knowingly, which is why the tooling feels like an unhappy path.

You are right on this, most users don't use it knowingly, because it just works and they don't have to know anything about what's been built on top of it.

> Like there's no way to list all hosts, even though the OS presumably knows that somewhere.

No, the OS does not know all hosts, it only knows the hosts that have advertised or probed for conflicting names while it's been attached to the network. If you connect your device to the network after I've connected mine, as long as there's not a name conflict your device has no idea mine exists unless it's advertising services. Service advertisements are cached, but hostnames are not because for obvious reasons you generally aren't going to be accessing most of the hosts on a given network ever. When you need to access whatever.local your device emits a mDNS query looking for A or AAAA records the same as it would for normal DNS, and caches the result based on TTL the same way as it would for a normal DNS record.

> The best you can do is list hosts that advertise services.

You're saying this like there's some other solution which lets you list every host in the network even if it's not advertising services, which...there isn't.

▲mahboi 14 hours ago | parent | next [-]

The question was if someone wants to connect to a device manually, do they use mDNS or IP. But anyway, you gave a list of some of the flakiest services. I've used Macs since the early 2000s, there's no bonjour without some pain. Just had a meeting today where they wanted to AirPlay to the conference room TV and gave up. It's a FAQ how to forcibly AirPlay to a given ip instead of relying on discovery. Many other commercial IoT devices use ad hoc wifi networks, BT, etc for initial setup.

You mentioned newbs using RPis. https://www.raspberrypi.com/documentation/computers/remote-a... "Most methods of connecting to your Raspberry Pi from another machine require you to know the local IP address of your Raspberry Pi" and then, as the main suggested approach, it has you write down the IP displayed onscreen. OctoPrint does suggest mDNS, but with the caveat "if your computer supports bonjour," otherwise says to use the IP.

> You're saying this like there's some other solution which lets you list every host in the network even if it's not advertising services, which...there isn't.

I mean yeah, that's part of the problem. You can blame the devices for having bad defaults, but all of them use ipv4 properly. mDNS is more moving parts.

▲ 2 days ago | parent | prev | next [-]
[deleted]
▲justsomehnguy a day ago | parent | prev [-]

> No, normal people use names, mostly delivered these days over mDNS

You said what I would had said if I had the patience to do so, with only one caveat: most people don't even use the names because most of the time they do the thing, it runs the discovery and show up the devices which did respond.

Sure, there are some people who use mDNS names to SSH to the some machine. Like a dozen on the whole planet.