Many advanced network configuration commands can be reached with the scutil command line tool. Launch Terminal.app and run:
ENABLE_EXPERIMENTAL_SCUTIL_COMMANDS=1 scutil --net, then type help and press the Return key to see the available options.
For example:
localhost:~ user$ ENABLE_EXPERIMENTAL_SCUTIL_COMMANDS=1 scutil --net set "Automatic" selected > help Available commands: help : list available commands f.read file : process commands from file quit [!] : quit commit : commit any changes apply : apply any changes create interface[ | ] create protocol create service [ | [ ]] create set [setName] disable protocol [ ] disable service [ | ] enable protocol [ ] enable service [ | ] remove protocol [ ] remove service [ | ] remove set [ | ] select interface | | $child | $service | $vlan | $bond | $bridge select protocol select service | select set | set interface context-sensitive-arguments (or ? for help) set protocol context-sensitive-arguments (or ? for help) set service [ name ] [ order new-order ] [ rank ( | First | Last | Never) [temp] ] set set [ name setName ] | [ current ] show interfaces show interface [ | ] show protocols show protocol [ ] show services [ all ] show service [ | ] show sets show set [ | ] update : update the network configuration >
Mac OS X Hints
http://hints.macworld.com/article.php?story=20131216083254449