Business

Switch network settings with ease

Every time you move your Mac laptop—from the office to home, from home to the neighborhood coffee shop—you must adjust its network settings. Ethernet or Airport? VPN or no?

You could change all those settings manually, each time you move. Or you could—and should—use the Location feature built into the Mac OS X’s Network system preference pane instead. Locations are saved profiles that you use to ensure your laptop is using the right network adapters and VPN settings for your current whereabouts, whether you’re at work, at home, at the coffee shop, or anywhere else.

Here’s a quick guide to the basics of using Locations, some not-so-basic tips, and some recommendations for third-party programs that can extend your Mac’s location awareness even further.

Creating a new location

When you open the Network preference pane (System Preferences -> Network), the location drop-down is right there at the top, showing the selected location. Below that, you should see a list of currently available network adapters on the left, and settings you’ve assigned to those adapters on the right.

When Leopard is initially installed, there’s only one location in that list: Automatic. It represents whatever network settings you’re currently using.

You can set up a new location by clicking on Assist Me, and then clicking on Assistant to launch the Network Setup Assistant. The Assistant will set up a new location based on your current network settings. It will prompt you to select a name for the location, select an Internet connection method, and then supply some parameters for that connection.

Unfortunately, the Assistant doesn’t pick up some network settings you might have already entered, such as AirPort network passwords. Fortunately, there are a couple of other ways to create new locations.

Location drop-down
From the Network preference pane, open the Location drop-down menu to get a list of your locations; from here, you can add, delete, duplicate, and rename them.

My preferred method is to go back to the Network preferences pane and select Edit Locations from the Location drop-down menu. In the subsequent dialog box, click on the plus sign (+) to add a new location. Alternatively, you can select an existing location in the Edit Locations dialog, then select Duplicate Location from the action menu below (the one with the gear icon). In either case, you can then give your new location a name and click on Done.

You could just rename the Automatic profile: select Edit Locations, double-click on the Automatic location, and type in a new name. Or you could select a location then choose Rename from the gear menu.

Adjusting your settings

Whether you’re adjusting a new or existing location, changing settings is the same.

With the location you want to edit selected in the Network preference pane drop-down, you can add a new adapter by clicking the plus-sign (+) at the bottom of the adapter list. Click on the minus sign (-) to remove adapters you don’t need.

The latter can be particularly useful, because it makes odd network events—such as your Airport and Ethernet connections conflicting with one another—less likely. If, for example, there are multiple Ethernet adapters listed for a given location, but you only ever use one, get rid of the extra three.

If you occasionally use different Ethernet connections in a given location, you can select the ones you use least and select Make Service Inactive from the drop-down action menu; that way, they’ll stay in the list but won’t be used. Making a given adapter inactive can also be useful for preserving network settings, which you’ll lose if you delete the adapter altogether.

Once you’ve pruned the adapter list, open the Action menu again and choose Set Service Order. You can then drag the adapters into order, from most to least desired network connection. For instance, if you’d prefer to use Ethernet when tethered, but want AirPort to kick in automatically when you unplug, drag Ethernet to the top and put AirPort below that.

Make sure you give the adapters descriptive names. Those names are stored by location, so you can use the action menu’s Rename Service item to explain which Ethernet network you want to use or which VPN connection is in place.

To configure specific settings for an adapter, click on it in the list. Its settings will appear in the right-hand pane; those settings will vary by the kind of adapter.

For Ethernet adapters, for example, you can choose to configure the connection using DHCP (a common setting for networks where a gateway assigns an address) or manually (useful when you have a static network address that you need in a given location, such as on a corporate network).

Clicking on the Advanced button gives you access to more granular settings; these, again, vary by location and adapter. For instance, if you have Gigabit Ethernet available at your office and you regularly transfer large files, you might want to click on Advanced for the Ethernet adapter in your Office location, choose the Ethernet tab, select Manually from the pop-up menu, and choose Jumbo (9,000) from the MTU menu. This setting wouldn’t be appropriate for slower networks.

As of Leopard, each location’s AirPort adapter now has its own set of Wi-Fi network profiles. In previous versions of OS X, all wireless networks that you’d ever connected to would appear in every location. Network passwords are still shared, however, through the system-wide Keychain.

When you’re done making changes, click on Apply, and those changes are saved into the currently displayed location.

To switch among locations, choose the location name from Apple -> Location, or from the Location pop-up menu in the Network preference pane.

Other location managers

OS X’s built-in location management tools are fine for changing network settings. But what if you want to change other system settings depending on where you are? Or what if you’d rather not have to tell your Mac where you are, but have it identify and change locations for you? Two third-party programs—MarcoPolo and NetworkLocation—can help with both.

David Symonds’ MarcoPolo ( ) (donation requested) divides location awareness into Contexts (a profile), Evidence Source (items to monitor for change), Rules (what changes to look for), and Actions (what to do on arriving or leaving a context).

Marco Polo
With Marco Polo, you can change all sorts of systems settings--not just network specs--based on location.

For instance, you could configure Marco Polo to reconfigure your system completely when events as simple as plugging in an Ethernet cable or attaching a USB keyboard occur.

MarcoPolo lets you set a Confidence level for each rule so that you can have some wiggle room about whether or not your current environment meets the target you set. That can be useful if, for example, you use the same keyboard model in different locations; you’d assign that event a lower confidence than, say, the detection of a Wi-Fi network with a certain name.

Marco Polo supports an extensive list of actions that can be triggered by these events. That list includes network settings—including changing the network location, engaging a VPN, switching Wi-Fi or Bluetooth on or off—but it also includes system-wide settings, such as launching applications, muting audio, even changing the Desktop pattern. You can set actions to occur when you arrive or depart, too, although departure rules require that the laptop stays on when the context changes.

Centrix.ca’s Network Location ( ) takes a far simpler approach for triggering a change—but with an interesting twist.

NetworkLocation
Using the Skyhook Wi-Fi triangulation system, Network Location can tell where you are physically and adjust system settings accordingly.

Like Marco Polo, Network Location monitors for changes in your network connections. You can also choose to trigger a location change based on a network name, its unique adapter address, the status of Ethernet, and any connected devices.

The twist is that the program can also monitor where you are physically, using the Skyhook Wi-Fi positioning system. Using a database of public access points, Skyhook can triangulate your position based on your position relative to nearby Wi-Fi signals; the company says it’s accurate to within a few dozen feet. (Skyhook is the service that first-generation iPhones and all iPod touch models use to determine their location; it’s a supplement to GPS on the iPhone 3G.) An AutoLocate tab in NetworkLocation lets you set a trigger to change system settings based on Skyhook’s location-finding; you can set the tolerances for distance with a slider.

The software’s Locations tab lets you define locations and associated actions, which include sets of application tasks (opening a URL, turning Apple Mail’s check interval to a different value, or running a script in Terminal), as well as system tasks (changing brightness, locking the Keychain, or changing the time zone).

However you do it, managing and changing locations should be an essential tool in any mobile Mac user’s repertoire. It’ll save you time and ensure that you stay connected, wherever you are.

[Glenn Fleishman writes constantly about networking and is the author of Take Control of Your 802.11n AirPort Network (Take Control Ebooks).]

recommended for you

NetworkLocation 3.0.5

Read more »

Subscribe to the Apple @ Work Newsletter

Comments