Is there a free program for easily managing network locations?

I move around from the office and elsewhere quite a lot. When I'm in the office, I need a static IP, elsewhere I don't. I have network locations set up, but it's extremely tedious opening up Network Preferences to change it essentially every day.

Ideally I'd like an app where I can just select from the taskbar menu, like I can with Wireless networks, or a way to apply the IP config whenever I connect to that specific network.

I've found paying apps, like Sidekick, which are massive overkill (I don't want to shell out £20 for an app I'll only use one function of), I just want a tiny utility. Is there such a thing?


Solution 1:

You can do that with Network locations. You can defined for example two profiles: work (fixed IP) and home (DHCP).

As you said chancing the location from System Preferences is tedious. However you can do the same from the  menu:  > Location.

enter image description here

Solution 2:

Check out something called ControlPlane. I've been using it for a while now and it can automatically change a whole array of settings from networks to printers on your mac depending on where you are like sidekick, but its free and so much better.

Lifehacker and Mac AppStorm featured it not long ago.

Solution 3:

I found an applescript solution that does what I need. I've tweaked it a bit from the original, but it provides a one-button solution for switching my network location.

Here's the code I used:

tell application "System Events"
        tell network preferences

                set activeLocation to the name of current location

                set allLocations to the name of every location
                copy "Quit" to the end of allLocations

                set deleteFromList to {activeLocation}
                set changeLocations to {}
                repeat with i from 1 to count allLocations
                        if {allLocations's item i} is not in deleteFromList then
                                set changeLocations's end to allLocations's item i
                        end if
                end repeat

                if (text of choiceLocation) = "Quit" then
                else
                        do shell script "scselect '" & (text of choiceLocation) & "'"
                end if
        end tell
end tell

Exporting this from AppleScript as an Application, and pinning it to my app bar gives me a one-button Network Location Switcher.