I have a Windows 7 computer and a MacOS X 10.6 computer that are connected to the same LAN using a 10$ hub. On MacOS I set the computer name to "mymac.local" in "preferences->sharing". The Windows computer has a static IP address of 192.168.0.10 and the Mac has the address 192.168.0.20. Both have a netmask of 255.255.255.0 and no gateway.
If I issue the command ping mymac.local
from my Windows computer it will successfully ping 192.168.0.20. How did Windows determine that IP 192.168.0.20 is associated with "mymac.local" since there's no DNS on my network? Is it some broadcast? What protocol is used?
It uses the (ancient) NETBIOS protocol and the Windows implementation of its name service, WINS. If a name cannot be resolved by the DNS servers the WINS server is tried or if it isn't defined a NEBIOS call is made.
Note that some routers include a DNS server and add to it the name each DHCP clients provides. If your router supports this capability, then the DNS protocol is actually being used to resolve the name resolution query.
It resolves the .local names using multicast DNS (RFC 6762) as part of zero-configuration networking.
For the sake of completeness and for future (re-)visits to this question, there is another possibility for a Windows (in my case Windows 10) host to resolve hostnames.
Windows 10 has a hosts file, just as any Linux/Unix does and it is found in
%windir%\system32\drivers\etc
.Any entry you put in there manually or via an automation effort will be resolved without any help of an external server or protocol.