You can make a difference in the Apple Support Community!

When you sign up with your Apple Account, you can provide valuable feedback to other community members by upvoting helpful replies and User Tips.

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

macOS keeps changing computer name

I've got a popup about there being two computer with the same name on the network.

The OS then change the name to (2), (3), etc.


I know for sure that there's not two computer with the same name on the network.


What can I do?

MacBook Air (13-inch, Early 2014), macOS High Sierra (10.13.1)

Posted on Dec 12, 2017 3:22 PM

Reply
27 replies

Dec 20, 2017 2:10 PM in response to MrHoffman

The local network is a router and wi-fi and wired devices.

Why does that need to be on separate subnets?


The actual name on the network though still seems to be the original one if I check the settings.User uploaded file


When I've googled around I found others with same issue, but earlier version of macOS


macos - Computer name keeps changing OSX 10.10 (14A389) - Ask Different

Dec 22, 2017 1:04 PM in response to zappe

Not quite sure what you are saying as there isn't any MAC address (otherwise known as an ethernet address) associated with the loopback interface since it's just on the machine and not the network - perhaps what you call "mac" is something different? Maybe you could explain (or better post the output of your "netstat -rn" command - change so that no personal info revealed, but don't change so much that you change what is related to what - does that make sense?).


Do you have multiple "lo" type interfaces, e.g. lo0, lo1, etc? Not sure if this is possible under normal circumstances.


You could always remove a redundant interface using appropriate "ifconfig" command in Terminal (do a "man ifconfig" to see details).


Another thing that has helped me in the past is to simply "Make Service Inactive" and wait a bit, then "Make Service Active" for the the appropriate network interface in the System Preferences Network pane. Select the appropriate interface first before clicking the options button.The "Make Service Inactive" option is shown when you click on the options button at the lower left part of the pane:


User uploaded file


Good luck...

Dec 20, 2017 12:15 PM in response to zappe

Usual reason I've encountered for that arising on current versions of macOS is a loop somewhere in the local network topology; where the problematic system can "see" itself via additional network paths. That's usually an incorrectly-configured network such as some wired and Wi-Fi connections, or multiple local network connections.


What's the local network configuration look like? Routers, switches, Wi-Fi devices, wired connections, etc. If there's both wired and wireless, then that usually either needs to be reconfigured into separate IP subnets with an intervening router, or the Wi-Fi device(s) should be switched to its access point mode (if the Wi-Fi device supports that).


I've also occasionally seen this misbehavior with the Bonjour sleep proxies in years past, but whatever was wrong with that was seemingly fixed in some of the now-older Airport and Time Capsule firmware updates.

Dec 20, 2017 4:18 PM in response to zappe

Typically either the Wi-Fi has to be configured as an access point (which effectively makes it "transparent" to IP routing and effectively part of the wired network), or the Wi-Fi and the wired networks should be configured into separate subnets. Having the same IP subnet on either side of a router doesn't tend to work all that well.


Same general issue applies to VPNs too, where having the same IP subnet on each end of the VPN tends to cause IP routing to work less than reliably.


Or disable either Wi-Fi or wired routing on the box; one network connection per box.


I usually configure Wi-Fi as an access point anyway, as that means roaming around a network with more than one Wi-Fi box works far better.

Dec 21, 2017 3:51 PM in response to zappe

An access point is closer to an Ethernet cable in terms of its role in a network. Routers look much deeper into thr network traffic. Access points do not involve IP subnets or IP routing or NAT or other other network-related tasks.


Do you have an access point, or a Wi-Fi router? If you didn’t purchase an access point or didn’t explicitly reconfigure a Wi-Fi router, the device is almost certainly a Wi-Fi router.


Does your Mac have more than one network connection configured, connected, and active? Both Wi-Fi and wired connections active and connected, for instance.


If there are not multiple network paths in the local network within the device providing either firewall/gateway/NAT (common config, often using a Wi-Fi device fulfilling multiple roles) or (less commonly) routing and firewall services for your network, do you have a network device that supports the Bonjour sleep proxy? That’s most commonly either an AirPort or a Time Capsule, but there are probably a few other devices that offer the sleep proxy feature.

Dec 22, 2017 12:19 PM in response to zappe

You need to precede the "set" option with two dashes, not one...


sudo scutil --set computername "xxx"


Do a "man scutil" in a Terminal window if you want to see more details about "scutil" command.


Also, you can try to see what the network looks like by using the "netstat -rn" (to see an IP address list) or "netstat -r" (to see a hostname list) Terminal command. You will see a list of all the known network devices and interfaces - you might even learn what might be conflicting with your existing computer. If you do use the "netstat -r" command, it might take a while to resolve all IP addresses to their actual hostname, so be patient (the "netstat -rn" always will return much faster since no hostname lookups are involved, which can take a while for networks with lots of attached devices).


Good luck...

Dec 22, 2017 4:30 PM in response to zappe

zappe wrote:


I've now set all the names and will see what happens.

Likely won’t help. That’s the command line interface to the Bonjour settings and to some unrelated settings. Which means you can set that or set the name via the GUI, and get the same result.


I tried netstat -r and got two of my computer name..


That command shows some routing data. It’s not (directly) related to having a Bonjour network host “visible” by more than one network path; a loop.


The network interfaces I have is Wi-Fi, Bluetooth PAN, My phone and Thunderbolt Bridge.


Which of those are active and connected? If there is more than one connected and active, pick the fastest and temporarily shut off the others, and see if the Bonjour problem resolves itself. Or provide a little more description on how the different paths might cross-connect into your local network.


Also, please describe your network configuration in a little more detail? What network-related boxes are connected? Switches, Wi-Fi devices, Access Point devices, gateway/firewall/NAT boxes, and that ilk. (What other clients are connected to the local network usually isn‘t relevant to a network loop.)


ps: I’m referring to a network loop here, and not to the IP loopback device. That’s something diferent.

Dec 26, 2017 3:00 PM in response to zappe

Is the router box separate from the Wi-Fi box? If so, is the Wi-Fi network either configured in a different subnet, or configured as an access point? Because if the router and the Wi-Fi are separate boxes (and if the Wi-Fi is configured as a router and not an access point), then there are two routers here, and two routers need to have separate subnets.

macOS keeps changing computer name

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