Specifications
Chapter 6 Setting Network Preferences 67
Managing Network Port Configurations
Network port configurations are sets of network preferences that can be assigned to a
network interface and then enabled or disabled. The Network pane of System
Preferences stores and displays network settings as port configurations.
Creating or Deleting Port Configurations
To list a port configuration:
$ sudo networksetup -listallnetworkservices
To create a port configuration:
$ sudo networksetup -createnetworkservice
configuration
hardwareport
To duplicate a port configuration:
$ sudo networksetup -duplicatenetworkservice
configuration
newconfig
To rename a port configuration:
$ sudo networksetup -renamenetworkservice
configuration
newname
To delete a port configuration:
$ sudo networksetup -removenetworkservice
configuration
Activating Port Configurations
To see if a port configuration is on:
$ sudo networksetup -getnetworkserviceenabled
configuration
To enable or disable a port configuration:
$ sudo networksetup -setnetworkserviceenabled
configuration
(on|off)
Changing Configuration Precedence
To list the configuration order:
$ sudo networksetup -listnetworkserviceorder
The configurations are listed in the order that they’re tried when a network connection
is established. An asterisk (*) marks an inactive configuration.
To change the order of port configurations:
$ sudo networksetup -ordernetworkservices
config1
config2
[
config3
] [...]
Managing TCP/IP Settings
TCP/IP is a set of layered protocols that allow communication between computers on a
high-speed network. You can use the following commands to change the TCP/IP
settings of a server.