> Only if you know the name already and no two hosts took the same name, assuming it works at all.
We're talking about somebody who knows how to get the IPv4 address of their computer, the hostname is available in basically the same exact place on every single system, and easier to remember, and remains the same on every network unless there's a conflict.
It works as long as the network operator of system admin hasn't gone out of their way to break it.
> Shouldn't those question marks be the hostnames on arp -a? On some networks it shows them, on others it doesn't.
Those question marks will fill in if there is a reverse dns entry in the local DNS server, which is set in IPv4 networks based on the device putting its hostname in the DHCP request. Most consumer combo gateway devices will do this by default as does Windows DHCP, but a lot of business firewall devices don't do it at all or don't do it by default.
Either way, that's not relevant to IPv6, mDNS is the way.
"Most consumer combo gateway devices will do this by default as does Windows DHCP, but a lot of business firewall devices don't do it at all or don't do it by default.": Guess that explains it. I have a home router, but maybe its defaults are more business-like.
I'm pretty frequently in a scenario where I know local v4 addrs but not hostnames, usually on a network that's not my own. But even on my own network cause there's no simple way to discover the names, so not everything is a Linux box I can SSH into to ask the hostname. I'd use mDNS if I could reliably type something in to show all the DNS entries on the LAN, never having to diagnose any issues with this.