Check Network Connection Type

Milos
New Contributor

Hey folks, apologies if this was posted previously but I could not find anything exact to my problem.

Onto the topic, I have Macs on which I would like to force ethernet connection type instead of Wireless. So far I have been unable to create a search that would list which computers are on the ethernet connection and which ones are on the WiFi.

I noticed when going into a computer directly through search that under Hardware tab there is entry called Primary Network Adapter Type:

I was unable to locate that entry and create advanced search/report that bases on it, also creating extension attribute using Jamf template called Active Network Interface did not produce any results.

 

To summarize, is it possible to generate list of computers and active network connection type using Jamf Pro dashboard only and after that enforce ethernet connection? 

Or this is something that must be done using scripting?

1 ACCEPTED SOLUTION

sdagley
Esteemed Contributor II

@Milos You're going to have to script that, and you'll need a couple of different scripts. To see what type of connection is in use you'll need an Extension Attribute that will run a script every time Jamf Pro collects inventory. That's normally only once a day or week though, so not too useful if you're trying to enforce a wired ethernet versus Wi-Fi connection.

For enforcement you could use a combination of a LaunchDaemon which monitors for a network state change, and if it detects an active wired ethernet connection it could run a script that disable Wi-Fi (and conversely enable Wi-Fi if there's no active Ethernet connection).

That said, normally a Mac is going to prefer a wired ethernet connection over a Wi-Fi connection so unless you've got a requirement that the Wi-Fi connection isn't active while wired ethernet is you shouldn't have to worry about this.

View solution in original post

2 REPLIES 2

sdagley
Esteemed Contributor II

@Milos You're going to have to script that, and you'll need a couple of different scripts. To see what type of connection is in use you'll need an Extension Attribute that will run a script every time Jamf Pro collects inventory. That's normally only once a day or week though, so not too useful if you're trying to enforce a wired ethernet versus Wi-Fi connection.

For enforcement you could use a combination of a LaunchDaemon which monitors for a network state change, and if it detects an active wired ethernet connection it could run a script that disable Wi-Fi (and conversely enable Wi-Fi if there's no active Ethernet connection).

That said, normally a Mac is going to prefer a wired ethernet connection over a Wi-Fi connection so unless you've got a requirement that the Wi-Fi connection isn't active while wired ethernet is you shouldn't have to worry about this.

Milos
New Contributor

Hey @sdagley thank you for the explanation, apologies for late response I had power issues until today.

Now onto the problem itself, we just want to make sure that Mac computers are using Ethernet connection compared to Wireless one.