arp cache name?

My MBAir, when polled by "arp -a" has the name "mac.lan" associated with it's IP address. All my other Macs are identified by their real hostname, which is their real computer name. What do I need to do in my MBAir to fix that?

MacBook Air (M2, 2022)

Posted on Dec 12, 2025 7:46 PM

Reply
7 replies

Dec 14, 2025 11:15 AM in response to Dannymac22

With arp -a, I get a mix of static host names from local DNS services shown, and DHCP-addressed boxes with no host names shown, and a box with an Intel MAC using a self-assigned IP address¹.


Some things to check include the three places macOS sets the names to be used by the Mac host:

sudo scutil --get HostName 
sudo scutil --get LocalHostName
sudo scutil --get ComputerName
# then if appropriate...
sudo scutil --set HostName HostName.example.com 
sudo scutil --set LocalHostName HostName
sudo scutil --set ComputerName FriendlyHostName


Also check your local DNS server² translations, and check your DHCP server and router too, particularly checking for any router firmware updates or router oddities. arp uses the same DNS resolution as do other command-line tools, though confusingly macOS uses its own separate DNS caching and the command-line tools bypass this cache. The name shown by arp can be populated from the DHCP server, if that's configured and able.


There's one other similar discussion, albeit without resolution: Hostname changed to "Mac.lan" for no reas… - Apple Community



¹Hmmmmmmmmm. Off to look at that.

²This if a DNS server is running locally, and some of those poking at arp can be running local DNS servers.

Dec 14, 2025 10:30 AM in response to Dannymac22

If your literal unquoted string is "mac.lan" then either of the following should replace the arp output with your current hostname without any need to reboot. The second example to keep the columns aligned:

arp -a | sed "s/^mac\.lan/$(hostname)/1"
arp -a -l | sed "s/^mac\.lan /$(hostname)/1"


On my M4 Mac Mini Pro running Tahoe 26 .2, I receive the unquoted "mac" instead of the hostname. When I replace that entry in the above sed examples, it is replaced by my hostname.

arp cache name?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.