Configuring Network Locations in Mac OSX.


This is one of the key reasons why my MAC has been much more useful than Windows because I can get a lot more done with a computer that is more useful.

Introduction

Mac OSX regards the current interfaces as being configured with one or more LOCATIONS. You can have many locations, and each can have completely individual settings such as IPv6, DNS, and more.

Configuring Network Locatons in Mac OSX.

osx-network-location-1.png

Open the Network Preferences tab in the System Preferences and you will see the current seeting for your IP address.

These are not the settings for the Ethernet interface that you want to use so lets create a new Network Location by clikcing the Location drop down.

osx-network-location-2.png

As you can see I already have the default Automatic location plus two others that I use (a Guest wireless network and home network). Lets create a new Network Location by pressing the + button.

osx-network-location-3.png

Enter a name for the location into the dialog box and click done.

osx-network-location-4.png

Changes do not take effect until you press the APPLY button and that’s why it shows as a unknown state.

osx-network-location-5.png

Now the Ethernet is using DHCP to get its IP address, gateway and DNS details.

Which is fine, but for most lab or testing environments, you want to have multiple profiles. So lets configure a manual address, DNS server and some of the other advanced network configuration.

First, make sure you have selected the Ethernet port. I have disabled the Airport (wireless) in this example.

Click ADVANCED to configure the setings for the Ethernet port.

osx-network-location-6.png

We have quite a few options that can be configured from here. Let set a manual IP address, DNS server, and configure the proxy server for this connection.

osx-network-location-7.png

Select the drop down menu to manually configure the IP address.

osx-network-location-8.png

Configure the IP address and the default gateway that you want to use.

osx-network-location-9.png

Configure the DNS

osx-network-location-10.png

I haven’t tested the 802.1x configuration, but this would be useful when testing different 802.1x client configurations.

osx-network-location-11.png

And fill out your proxy configuration. If you are testing for a new proxy deployment this is hugely useful, since you can quickly switch profiles for each of the proxy servers in your cluster.

Click OK to apply these changes.

Switching Locations

You have now configured and applied the Network Profile. You can easily switch between the Locations by open System Preferences, Network, and using the Location menu which is just a bit too manual for me.

This next section covers a tool called Network Location from <a href=”http://networklocationapp.com/”>http://networklocationapp.com/</a> to help automate the switching of locations.

osx-network-location-12

You can always open the System Preferences, Network and change the configured locations. But I use a piece of software call Network Location to provide me with a menu list from the Tool Bar of OSX and that will be the subject of my next post which makes multiple network profiles even easier.

  • http://cisco.markom.info/ Marko Milivojevic

    Really nasty drawback of using locations shows its ugly head if you use built-in VPN client. VPN profiles are not defined as “global” interfaces, rather interfaces local to the current location.

  • http://cisco.markom.info/ Marko Milivojevic

    … on the other hand, 802.1X definitions are “global” – go figure :-)

  • Andy

    Locamatic is a nice free alternative
    http://www.45rpmsoftware.com/45RPM/Locamatic.html

    • http://etherealmind.com Greg Ferro

      I didn’t know about this one. Added to the next post on tools for network switching.

  • Zed

    Why would you need a tool to change location??? just click on the Apple symbol (top left of your screen), it’s there in the drop down

  • Robert Booth

    Not exactly what I was looking for when I found this but it is a great piece of information. What I was looking for was a way to prepend a DNS server (id a local bind server running in a VM) when my interface is setup to use DHCP. I want to include whatever DHCP offers but have the query target my DNS server first. 

    Any Idea?