User`s guide
Network Setup Tool 47
If you want to clear all DNS entries for the specified network service, type “empty” in place of
the DNS server name.
Example command:
networksetup -setdnsservers "Built-in Ethernet" empty
Designate Search Domains
Use this command to designate the search domain for the network service. List any number
of search domains (replace domain1 and so on with the name of a local domain).
-setsearchdomains <network service> <domain1> [domain2] [...]
Example command:
networksetup -setsearchdomains "Built-in Ethernet" company.com
corp.com
If you want to clear all search domain entries for the network service, type “empty” in place
of the domain name.
Example command:
networksetup -setsearchdomains "Built-in Ethernet" empty
Managing Network Services
You can use the Network Setup Tool to create or rename network services, turn them on or
off, remove them, and change the order they’re contacted. The
-listallhardwareports
command displays the names of the hardware ports.
Create a New Network Service
Use this command to create a new network service with the specified name on the specified
port.
-createnetworkservice <new network service> <hardware port>
Example command:
networksetup -createnetworkservice "Built-in Ethernet2" "Built-in
Ethernet"
Duplicate an Existing Network Service
Use this command to duplicate an existing network service and name the new service.
-duplicatenetworkservice <network service> <new network service name>
Example command:
networksetup -duplicatenetworkservice "Built-in Ethernet" "Built-in
Ethernet2"
LL2133.book Page 47 Friday, May 24, 2002 11:17 AM