Macbook be connected via wired or wireless network, but not both at the same time. Is it achievable?

Bernard_Huang
Contributor III

Hi,

Is there a way to setup the network settings within a Macbook so that it connects to network via Wired, or wireless, but not both?

A practical example would be:
- A person with a Macbook, would normally be on wireless network, walking around the office.
- When he/she finds a desk, he/she will plug it in a desk. The Macbook will switch to wired network, and switch off all wifi.
- When he/she walks away from desk, the Macbook will be unplugged. At this moment, the Macbook will switch off wired network, and switch on wifi again.

The end goal here is to have one connection happening so the Macbook can only have one IP address at a time. I believe by Macbook default, you can set which network connectivity has priority, but I want the second connection to be completely off.

Thanks in advance.

1 ACCEPTED SOLUTION

emilh
New Contributor III

Hi!

We use this bash script/launchdaemon combo in our computer labs. It's been working perfectly on 10.11 through 10.13, looks like it also works fine on 10.14.

https://www.jamf.com/jamf-nation/discussions/1441/disable-airport-when-ethernet-is-active#responseCh...

A bit further down in that thread there's a more simple solution that might work just as well.

View solution in original post

4 REPLIES 4

emilh
New Contributor III

Hi!

We use this bash script/launchdaemon combo in our computer labs. It's been working perfectly on 10.11 through 10.13, looks like it also works fine on 10.14.

https://www.jamf.com/jamf-nation/discussions/1441/disable-airport-when-ethernet-is-active#responseCh...

A bit further down in that thread there's a more simple solution that might work just as well.

Bernard_Huang
Contributor III

Thanks @emilh !

Your link to the other discussion did indeed contain the information I need.
Will need a few test cycles, but fairly confident it would work since it's built into JAMF.

Praisethesun
New Contributor II

Hi Bernard,

I did a quick search for you - how comfortable are you with scripting? Thats what the best solution seems to be:

https://apple.stackexchange.com/questions/278060/can-i-disable-wifi-automatically-if-there-is-an-ethernet-connection

Bernard_Huang
Contributor III

Thanks @Praisethesun

I tried
https://www.jamf.com/jamf-nation/discussions/1441/disable-airport-when-ethernet-is-active#responseChild50056 already, and it is working as expected.

So no need to investigate anything else.