Need to use Ethernet at work and WiFi at home

Hi - I have to be connected to Ethernet at work in order to access our shared printer. So in the office, my WiFi needs to be off as it will interfere with the connection At home, I will use WiFi to connect. I see in the Network settings you can set up locations, but can my MacBook Pro automatically go to my home setting, and turn on the WiFi, when I arrive home, and turn it off when I arrive at the office? I assume this can be done but I have not been able to find a solution online or in the forum via search. I would prefer a solution that can do this for me versus turning the WiFi on and off. Thanks

This might be helpful

Not an “automatic based on location” solution but there is a way to use BASH scripts to automatically switch off Wi-Fi when you plug in an Ethernet cable. As soon as the cable is disconnected, Wi-Fi gets switched on again.

The solution is described in GitHub at this link. I am no scripting guru but I was able to get this working after following instructions at the link above and some tinkering with permissions. Proceed with caution if you decide to go this route!

You probably just need to set Ethernet as a higher priority connection and just leave wifi on all the time. I’d try this before doing anything else.

3 Likes

I agree. I use wired at school, and WiFi at home. The wired connectio. Is higher priority, and is the default for school. If I happen not to get an IP address at school, it falls back to WiFi. Same setup at home. When in my office and wired, it uses wired. When roaming around, it uses connected.
No locations setup or anything like that.

The easiest solution is definitely to see if you can get away with putting the (wired) Ethernet before the Wi-Fi. If that works, great.

If that doesn’t work, changing locations manually is just about as much hassle as turning Wi-Fi on/off manually, so I don’t see much of a point there.

If you do need to implement something else, I recommend the GitHub link mentioned above. I did basically the same thing several years ago to enable/disable Wi-Fi at home/office and it worked great.

I’m not sure what other options there might be. If you turn off Wi-Fi (either manually or some automated way), and then go home but don’t have a wired connection, there’s no network connection for your Mac to use to determine its location and turn the Wi-Fi back on… unless you turn the Wi-Fi back on and it can connect to a network. So you see the catch-22 you’re in there.

Do you have Keyboard Maestro? It can switch automatically between those scenarios for you based on location/available networks etc.

As noted above, just include both Ethernet and WiFi in your default location and make sure Ethernet is above WiFi in the list.

That’s it. It just works. Been doing it for years.

You only need different locations when you have to have different IP settings… Address settings, or DNS, etc.

1 Like

Thanks…ethernet is set at a higher priority for work but this morning I could not print to the network printer until I turned off the wifi and rebooted. I may have to do this manually each day between work and home.

Thanks - I do and may try this as well.

Another option is ControlPlane.

Do you ever use WiFi at work? If not, remove the ssid from the list so that you don’t automatically connect to the WiFi at work.

1 Like

Try “forgetting” whatever wifi network you’re connecting to at work. If your wifi can’t find a known network it won’t connect to anything so all traffic will have to flow via Ethernet.

So I could be wrong on this, but I’m pretty sure you can use Control Pane to do what you want. It isn’t being actively developed but still works fine for me for similar tasks

Honestly, you shouldn’t have to “use” anything. I use WiFi at home… And when I want to move some large files around I plug into Ethernet and when I am done I unplug the Ethernet and go back to WiFi. I don’t do any thing but plug in the wire and unplug it.

+1 for using controlplane, but it does seem it is not under active development anymore…?

Yes, Ethernet and Wi-Fi can be on at the same time. In fact it is needed for Continuity features like eg. Handoff and AirDrop. I have both on and if I copy big files the system is using Ethernet.

For older versions of macOS this was not the case and then I used an applescript that switched between Wi-Fi and Ethernet if an Ethernet adapter was attached.

Thanks. Here is the issue - at work I am on one IP and at home another. If I have wifi on at work, it still does not allow me to connect properly. They also installed an app called Global Protect which has to be running at work for me to access the ethernet. Right now I am just turning off the wifi in the office and back on when I get home, or when I am off ethernet at work, say in a conference room at work where I need to connect to wifi. It should be fine…thanks all for your feedback and help.