Skip to main content
Solved

Setting OSX to use Ethernet over Wifi while both are active


Forum|alt.badge.img+7

Hello,

I'd like to create a script to change the service order in network preferences to make Built In Ethernet and Thunderbolt Ethernet preferred over Wifi. We have had trouble with our wifi network getting overloaded and would like all 500 machines to prefer Ethernet, without requiring the user to do anything except plug their machine in using ethernet. I have been Googling/searching JAMF Nation for about an hour and have not come up with any successful solutions other than manually changing the service order in Network Preferences. Does anyone have any experience with networksetup -ordernetworkservices terminal commands or any other methods of completing this who could point me in the right direction?

Best answer by jstine

Thanks!

I found this which worked perfectly:

https://seanvanloon.wordpress.com/2015/02/17/script-to-set-the-service-priority-on-mac-os-x/

View original
Did this topic help you find an answer to your question?

3 replies

  • 0 replies
  • April 21, 2015

There's quite a bit of useful information here:

https://jamfnation.jamfsoftware.com/discussion.html?id=11189


Forum|alt.badge.img+7
  • Author
  • Contributor
  • 33 replies
  • Answer
  • April 21, 2015

Thanks!

I found this which worked perfectly:

https://seanvanloon.wordpress.com/2015/02/17/script-to-set-the-service-priority-on-mac-os-x/


Forum|alt.badge.img+13
  • Honored Contributor
  • 550 replies
  • April 22, 2015

If you Just want to shutoff wifi when you have a working ethernet connection. Found this online a while back, forgot where, but kudos to the author. I run it as a outset login-every script

#!/bin/bash
PORT=$(ifconfig -a |  grep autoselect | grep 100 | cut -c21-23)
  if [ "${PORT:-0}" -eq  100 ] ; then
networksetup -setairportpower en1 off
else
exit 0
fi

LS


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings