I have a Mac connected to my own router, which is connected to the router/modem from my ISP, with the following configurations:
Mac connects to router 192.168.1.1 using DHCP.
Mac DNS is set to 192.168.1.1
On my own router, I can see a number of connected devices:
I can ssh to 192.168.1.4 by IP, but if I try by hostname, it's not recognized:
ssh: Could not resolve hostname rpi-node-4: nodename nor servname provided, or not known
Since the router is aware of hostnames, and the Mac is told to use 192.168.1.1 (the router) as DNS, I expected the Mac to be able to resolve the hostnames, but it doesn't work.
Note that I don't want to manually edit the
/etc/hosts file on the Mac (because I have multiple machines, and because I use dynamic IPs, so I don't want to have to update 3-4 hosts files everytime IPs are re-allocated).
Can someone please tell me where did I mess up?