1

For the sake of this question, I'm trying to access the server from a MacBook Pro, running MacOS 10.15.2.

I have a home server running Debian that I want to be able to access from both within and outside of my home network. I have the outside part up and working, and I can access my server within the network using the internal IP address (but not the full name as I would from outside). Since using the internal IP is a bit of a pain, I'd be fine with connecting just using the hostname while internal to my network, which I've given as aurora. It is my understanding that this should work fine and shouldn't require editing of hosts or anything.

For a period of a few hours this worked fine, then I cleared the DNS cache on my Mac and it no longer works. While trying to diagnose the issue, I noticed that the ARP cache on my Mac laptop seems to briefly pick up the hostname of some devices on the network and then forgets them. Here is the terminal output for arp -a, run about 10 seconds apart.

me@Cumulus ~ % arp -a
myrouter (192.168.1.1) at <MAC> on en0 ifscope [ethernet]
? (192.168.1.123) at <MAC> on en0 ifscope [ethernet]
? (192.168.1.144) at <MAC> on en0 ifscope [ethernet]
arcus (192.168.1.145) at <MAC> on en0 ifscope [ethernet]
cumulus (192.168.1.146) at <MAC> on en0 ifscope permanent [ethernet]
? (192.168.1.255) at ff:ff:ff:ff:ff:ff on en0 ifscope [ethernet]
broadcasthost (255.255.255.255) at ff:ff:ff:ff:ff:ff on en0 ifscope [ethernet]

<About 10 seconds later, no other commands have been run>

me@Cumulus ~ % arp -a
? (192.168.1.1) at <MAC> on en0 ifscope [ethernet]
? (192.168.1.123) at <MAC> on en0 ifscope [ethernet]
? (192.168.1.144) at <MAC> on en0 ifscope [ethernet]
? (192.168.1.145) at <MAC> on en0 ifscope [ethernet]
? (192.168.1.146) at <MAC> on en0 ifscope permanent [ethernet]
? (192.168.1.255) at ff:ff:ff:ff:ff:ff on en0 ifscope [ethernet]
broadcasthost (255.255.255.255) at ff:ff:ff:ff:ff:ff on en0 ifscope [ethernet]

Note how the first call had at least the names of my laptop and (in this case) my phone, but in the second call seems to have forgotten those. The other IPs are things like a HomePod or a Hue bridge which normally do identify themselves by name but now aren't as well.

When this was working previously the host names for a number of devices on my network were visible when running arp -a. Is this expected behavior and the fact that it ever worked at all was a fluke? Or should this be working and I am missing something configuration-wise on my Mac that got cleared when I cleared the DNS cache?

  • The ARP cache is a red herring. The ARP cache only caches numeric IP addresses and corresponding MAC addresses; the arp command asks the system resolver (which uses the system cache) if there's a name corresponding to the addresses, and if it gets a name back it lists that instead of the raw number. My question is: where is it getting that name in the first place? The system resolver doesn't get name-number associations by magic, there has to be a mechanism. My guess is that the local router is acting as a DNS server, and faking entries for local devices, inconsistently. Maybe. – Gordon Davisson Dec 31 '19 at 23:38
  • Ah yes, that clears things up. Thank you! I definitely would not be surprised if my router (A Linksys home router) is up to some sort of silliness. Each device is correctly recognized by name at the router according to its control panel, so I know it’s getting that far. I’ll just have to do some digging to find out why those names aren’t propagating down to my computer for resolution purposes. – fergu Dec 31 '19 at 23:51
  • Do some DNS testing. Try host <computerIP> <routerIP> (e.g. host 192.168.1.145 192.168.1.1) and see if you get names back. Try multiple times. Also, what DNS server addresses is your Mac using? If it has multiple ones listed (e.g. the router and some external DNS server(s)) you may get inconsistent resolution depending on which one it queries. – Gordon Davisson Jan 1 at 0:14

You must log in to answer this question.

Browse other questions tagged .