Wednesday, May 22, 2013

Verify Wi-Fi network via command line

It is sometimes useful to get information about the AirPort interface of a computer when connected via the command line. Follow these steps:
  • Open Terminal, enter in the command: cd /System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/
    • ./airport -I - this command lists the current Wi-Fi network the device is connected to
    • ./airport -? - lists all the available options for this specific command line utility
Additionally, the command networksetup -listnetworkserviceorder lists the service order on the computer. This is helpful if you believe wireless connections are causing issues taking precedence over the more reliable ethernet connection. For example, our organization has numerous outside free wireless SSID's being broadcast that only support web traffic over port 80. If wireless is higher in the service order, you could run into a scenario where a Mac hops onto wireless and disconnects you from resources on a local ethernet network.