Skip to main content
Solved

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

  • October 15, 2018
  • 4 replies
  • 55 views

Forum|alt.badge.img+10

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.

Best answer by emilh

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#responseChild50056

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

4 replies

Forum|alt.badge.img+7
  • Contributor
  • Answer
  • October 15, 2018

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#responseChild50056

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


Forum|alt.badge.img+10
  • Author
  • Valued Contributor
  • October 15, 2018

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.


Forum|alt.badge.img+3
  • New Contributor
  • October 16, 2018

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


Forum|alt.badge.img+10
  • Author
  • Valued Contributor
  • October 17, 2018

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.