My iMac's name is
windowlick. Every time I reboot it, for some reason it detects that the name
windowlick is already in use on the network and renames itself with a random suffix, e.g.
windowlick (3829) or the like, and it gets a zeroconf/bonjour hostname of
windowlick-2.local instead of the usual
I can manually fix this by going to the Sharing preferences panel, but I'd rather not have to do this, especially since I often do remote access from an external network (via ssh to another machine that gets the incoming port assignment) and if my machine rebooted due to a power failure or a system update I don't like having to guess at the hostname.
My computer gets its IP address via DHCP assignment from the router (a recent Netgear); it also behaved this way on my previous router (an Apple Time Capsule). It has a reserved IP address for its wired Ethernet port, but it connects via both Ethernet and Wi-Fi (which does not have an address reservation). I suspect that something to do with name assignment is doing something weird with the order of operations on the Wi-Fi vs. Ethernet interfaces.
Unfortunately, I cannot simply disable Wi-Fi, as I make use of OS features that require that my Wi-Fi be active (for example, Unlock with Apple Watch).
Is there any way to tell macOS to not be "polite" and rename itself if it sees "another" machine by the same name?
This seems similar to My Mac mini's computer name keeps changing when it resumes from sleep but I don't have the problem when resuming from sleep, it's only after a reboot, and I already have the static IP assignment per the accepted answer on that question. Also, this doesn't happen on my MacBook (which does not have a static assignment).