NAME
nneettwwoorrkksseettuupp - configuration tool for network settings in System Prefer-
ences.SYNOPSIS
nneettwwoorrkksseettuupp [-lliissttnneettwwoorrkksseerrvviicceeoorrddeerr] [-lliissttaallllnneettwwoorrkksseerrvviicceess]
[-lliissttaallllhhaarrddwwaarreeppoorrttss] [-ddeetteeccttnneewwhhaarrddwwaarree]
[-ggeettmmaaccaaddddrreessss hardwareport] [-ggeettccoommppuutteerrnnaammee]
[-sseettccoommppuutteerrnnaammee computername] [-ggeettiinnffoo networkservice]
[-sseettmmaannuuaall networkservice ip subnet router]
[-sseettddhhccpp networkservice [clientid]]
[-sseettbboooottpp networkservice]
[-sseettmmaannuuaallwwiitthhddhhccpprroouutteerr networkservice ip]
[-sseettvv44ooffff networkservice] [-sseettvv66ooffff networkservice]
[-sseettvv66aauuttoommaattiicc networkservice]
[-sseettvv66mmaannuuaall networkservice address prefixLength router]
[-ggeettddnnsssseerrvveerrss networkservice]
[-sseettddnnsssseerrvveerrss networkservice dns1 [dns2] [...]]
[-ggeettsseeaarrcchhddoommaaiinnss networkservice]
[-sseettsseeaarrcchhddoommaaiinnss networkservice domain1 [domain2] [...]]
[-ccrreeaattee66ttoo44sseerrvviiccee networkservicename]
[-sseett66ttoo44aauuttoommaattiicc networkservice]
[-sseett66ttoo44mmaannuuaall networkservice relayAddress]
[-ggeettffttpppprrooxxyy networkservice]
[-sseettffttpppprrooxxyy networkservice domain portnumber authenticated username password]
[-sseettffttpppprrooxxyyssttaattee networkservice on | off]
[-ggeettwweebbpprrooxxyy networkservice]
[-sseettwweebbpprrooxxyy networkservice domain portnumber authenticated username password]
[-sseettwweebbpprrooxxyyssttaattee networkservice on | off]
[-ggeettsseeccuurreewweebbpprrooxxyy networkservice]
[-sseettsseeccuurreewweebbpprrooxxyy networkservice domain portnumber authenticated username password]
[-sseettsseeccuurreewweebbpprrooxxyyssttaattee networkservice on | off]
[-ggeettssttrreeaammiinnggpprrooxxyy networkservice]
[-sseettssttrreeaammiinnggpprrooxxyy networkservice domain portnumber authenticated username password]
[-sseettssttrreeaammiinnggpprrooxxyyssttaattee networkservice on | off]
[-ggeettggoopphheerrpprrooxxyy networkservice]
[-sseettggoopphheerrpprrooxxyy networkservice domain portnumber authenticated username password]
[-sseettggoopphheerrpprrooxxyyssttaattee networkservice on | off]
[-ggeettssoocckkssffiirreewwaallllpprrooxxyy networkservice]
[-sseettssoocckkssffiirreewwaallllpprrooxxyy networkservice domain portnumber authenticated username password]
[-sseettssoocckkssffiirreewwaallllpprrooxxyyssttaattee networkservice on | off]
[-ggeettpprrooxxyybbyyppaassssddoommaaiinnss networkservice]
[-sseettpprrooxxyybbyyppaassssddoommaaiinnss networkservice domain1 [domain2] [...]]
[-ggeettppaassssiivveeffttpp networkservice]
[-sseettppaassssiivveeffttpp networkservice on | off]
[-ggeettaaiirrppoorrttnneettwwoorrkk] [-sseettaaiirrppoorrttnneettwwoorrkk network [password]]
[-ggeettaaiirrppoorrttppoowweerr] [-sseettaaiirrppoorrttppoowweerr on | off]
[-ggeettnneettwwoorrkksseerrvviicceeeennaabblleedd networkservice]
[-sseettnneettwwoorrkksseerrvviicceeeennaabblleedd networkservice on | off]
[-ccrreeaatteenneettwwoorrkksseerrvviiccee networkservicename hardwareport]
[-rreennaammeenneettwwoorrkksseerrvviiccee networkservice newnetworkservicename]
[-dduupplliiccaatteenneettwwoorrkksseerrvviiccee networkservice newnetworkservicename]
[-rreemmoovveenneettwwoorrkksseerrvviiccee networkservice]
[-oorrddeerrnneettwwoorrkksseerrvviicceess service1 [service2] [service3] [...]]
[-ggeettaapppplleettaallkk networkservice]
[-sseettaapppplleettaallkk networkservice on | off]
[-ggeettMMTTUU hardwareport] [-sseettMMTTUU hardwarePort value]
[-lliissttvvaalliiddMMTTUUrraannggee hardwareport] [-ggeettmmeeddiiaa hardwareport]
[-sseettmmeeddiiaa hardwareport subtype [option1] [option2] [...]]
[-lliissttvvaalliiddmmeeddiiaa hardwareport]
[-ccrreeaatteeVVLLAANN name parentdevice tag]
[-ddeelleetteeVVLLAANN name parentdevice tag] [-lliissttVVLLAANNss]
[-lliissttddeevviicceesstthhaattssuuppppoorrttVVLLAANN] [-iissBBoonnddSSuuppppoorrtteedd device]
[-ccrreeaatteeBBoonndd name [device1] [device2] [...]]
[-ddeelleetteeBBoonndd bond] [-aaddddDDeevviicceeTTooBBoonndd device bond]
[-rreemmoovveeDDeevviicceeFFrroommBBoonndd device bond] [-lliissttBBoonnddss]
[-sshhoowwBBoonnddSSttaattuuss bond] [-vveerrssiioonn] [-hheellpp] [-pprriinnttccoommmmaannddss]
DESCRIPTION
The nneettwwoorrkksseettuupp command is used to configure network settings typicallyconfigured in the System Preferences application. The nneettwwoorrkksseettuupp com-
mand requires at least "admin" privileges to run. A list of flags and their descriptions:-lliissttnneettwwoorrkksseerrvviicceeoorrddeerr
Displays a list of network services in the order they are con-
tacted for a connection, along with the corresponding port anddevice for each. An asterisk (*) next to a service means the ser-
vice is inactive.-lliissttaallllnneettwwoorrkksseerrvviicceess
Displays a list of all the network services on the server's hard-
ware ports. An asterisk (*) denotes that a network service is disabled.-lliissttaallllhhaarrddwwaarreeppoorrttss
Displays list of hardware ports with corresponding device name and ethernet address.-ddeetteeccttnneewwhhaarrddwwaarree
Detects new network hardware and creates a default network ser-
vice on the hardware.-ggeettmmaaccaaddddrreessss hardwareport
Displays ethernet (or AirPort) address for hardwareport or device specified.-ggeettccoommppuutteerrnnaammee
Displays the computer name.-sseettccoommppuutteerrnnaammee computername
Sets computer name to. This name is used by AFP and AppleTalk. -ggeettiinnffoo networkservice
Displays the IP address, subnet mask, router, and hardware address for thethat you specify. -sseettmmaannuuaall networkservice ip subnet router
Set the TCP/IP configuration forto manual with IP address set to , Subnet Mask set to , and Router address set to . -sseettddhhccpp networkservice [clientid]
Use this command to set the TCP/IP configuration for the speci-
fiedto use DHCP. The client ID is optional. Specify "Empty" for [clientid] to clear the DHCP client id. -sseettbboooottpp networkservice
Use this command to set the TCP/IP configuration for the speci-
fiedto use BOOTP. -sseettmmaannuuaallwwiitthhddhhccpprroouutteerr networkservice ip
Use this command to specify a manual IP address to use for DHCP for the specified. -sseettvv44ooffff networkservice
Use this command to turn IPv4 off on the specified
vice>. -sseettvv66ooffff networkservice
Use this command to turn IPv6 off on the specified
vice>. -sseettvv66aauuttoommaattiicc networkservice
Use this command to set IPv6 to get its addresses automatically for. -sseettvv66mmaannuuaall ip prefixlength router
Use this command to set IPv6 to get its addresses manually for. Specify the ip address, the prefix length and the router. -ggeettddnnsssseerrvveerrss networkservice
Displays DNS info for. -sseettddnnsssseerrvveerrss networkservice dns1 [dns2] [...]
Use this command to specify the IP addresses of servers you want the specifiedto use to resolve domain names. You can list any number of servers (replace dns1, dns2, and so on with the IP addresses of domain name servers). If you want to clear all DNS entries for the specified network service, type "empty" in place of the DNS server names. -ggeettsseeaarrcchhddoommaaiinnss networkservice
Displays Domain Name info for. -sseettsseeaarrcchhddoommaaiinnss networkservice domain1 [domain2] [...]
Use this command to designate the search domain for the specified. You can list any number of search domains (replace domain1, domain2, and so on with the name of a local domain). If you want to clear all search domain entries for the specified network service, type `Oempty'O in place of the domain name. -ccrreeaattee66ttoo44sseerrvviiccee -<
Use this command to create a new 6 to 4 service with name> . -sseett66ttoo44aauuttoommaattiicc -<
Use this command to set the 6 to 4 service such that it will get the relay address automatically.> -sseett66ttoo44mmaannuuaall -<
Use this command to set the 6 to 4 service such that it will get the relay address manually. Specify the> -< > that you would like to set. -ggeettffttpppprrooxxyy networkservice
Displays FTP proxy (server, port, enabled value) info for
workservice>. -sseettffttpppprrooxxyy networkservice domain portnumber authenticated username
passwordSet FTP proxy for
with and ber>. Turns proxy on. Optionally, specify or for port. Specify
to enable and disable authenticated proxy sup- and if you turn authenticated proxy support on. -sseettffttpppprrooxxyyssttaattee networkservice on | off
Set FTP proxy onto either or . -ggeettwweebbpprrooxxyy networkservice
Displays Web proxy (server, port, enabled value) info for
workservice>. -sseettwweebbpprrooxxyy networkservice domain portnumber authenticated username
passwordSet Web proxy for
with and ber>. Turns proxy on. Optionally, specify or for port. Specify
to enable and disable authenticated proxy sup- and if you turn authenticated proxy support on. -sseettwweebbpprrooxxyyssttaattee networkservice on | off
Set Web proxy onto either or . -ggeettsseeccuurreewweebbpprrooxxyy networkservice
Displays Secure Web proxy (server, port, enabled value) info for. -sseettsseeccuurreewweebbpprrooxxyy networkservice domain portnumber authenticated
username password Set Secure Web proxy forwith and . Turns proxy on. Optionally, specify or for port. Specify
to enable and disable authenticated proxy sup- and if you turn authenticated proxy support on. -sseettsseeccuurreewweebbpprrooxxyyssttaattee networkservice on | off
Set SecureWeb proxy onto either or . -ggeettssttrreeaammiinnggpprrooxxyy networkservice
Displays Streaming proxy (server, port, enabled value) info for. -sseettssttrreeaammiinnggpprrooxxyy networkservice domain portnumber authenticated
username password Set Streaming proxy forwith . Turns proxy on. Optionally, specify
or for cated> to enable and disable authenticated proxy support. Specify and if you turn authenticated proxy support on. -sseettssttrreeaammiinnggpprrooxxyyssttaattee networkservice on | off
Set Streamingproxy onto either or . -ggeettggoopphheerrpprrooxxyy networkservice
Displays Gopher proxy (server, port, enabled value) info for. -sseettggoopphheerrpprrooxxyy networkservice domain portnumber authenticated username
password Set Gopher proxy forwith and . Turns proxy on. Optionally, specify or for port. Specify
to enable and disable authenticated proxy sup- and if you turn authenticated proxy support on. -sseettggoopphheerrpprrooxxyyssttaattee networkservice on | off
Set Gopher proxy onto either or . -ggeettssoocckkssffiirreewwaallllpprrooxxyy networkservice
Displays SOCKS Firewall proxy (server, port, enabled value) info for. -sseettssoocckkssffiirreewwaallllpprrooxxyy networkservice domain portnumber authenticated
username password Set SOCKS Firewall proxy forwith and . Turns proxy on. Optionally, specify or for to enable and disable authenticated proxy support. Specify
cated proxy support on.and if you turn authenti- -sseettssoocckkssffiirreewwaallllpprrooxxyyssttaattee networkservice on | off
Set SOCKS Firewall proxy to eitheror . -ggeettpprrooxxyybbyyppaassssddoommaaiinnss networkservice
Displays Bypass Domain Names for. -sseettpprrooxxyybbyyppaassssddoommaaiinnss networkservice domain1 [domain2] [...]
Set the Bypass Domain Name Servers forto [domain2] [...]. Any number of Domain Name servers can be specified. Specify "Empty" for to clear all Domain Name entries. -ggeettppaassssiivveeffttpp networkservice
Displays whether Passive FTP is on or off for. -sseettppaassssiivveeffttpp networkservice on | off
Set Passive FTP to eitheror . -sseettaauuttoopprrooxxyyuurrll networkservice url
Set proxy auto-config to url for
and enable it. -ggeettaauuttoopprrooxxyyuurrll networkservice
Displays proxy auto-config (url, enabled) info for
vice>. -sseettssoocckkssffiirreewwaallllpprrooxxyyssttaattee networkservice on | off
Set SOCKS Firewall proxy to eitheror . -ggeettaaiirrppoorrttnneettwwoorrkk
Displays current AirPort Network.-sseettaaiirrppoorrttnneettwwoorrkk network [password]
Set AirPort Network tousing optional [password] if specified. -ggeettaaiirrppoorrttppoowweerr
Displays whether AirPort power is on or off.-sseettaaiirrppoorrttppoowweerr on | off
Set AirPort power to eitheror . -ggeettnneettwwoorrkksseerrvviicceeeennaabblleedd networkservice
Displays whether a service is on or off (enabled or disabled).-sseettnneettwwoorrkksseerrvviicceeeennaabblleedd networkservice on | off
Use this command to turn the specified network service on or off (enable or disable).-ccrreeaatteenneettwwoorrkksseerrvviiccee networkservicename hardwareport
Create a service namedon port . The new service will be enabled by default. -rreennaammeenneettwwoorrkksseerrvviiccee networkservice newnetworkservicename
Use this command to rename the specified network service
workservice> to . -dduupplliiccaatteenneettwwoorrkksseerrvviiccee networkservice newnetworkservicename
Use this command to duplicate an existing network service
workservice> and rename it to the specified name
vicename>. -rreemmoovveenneettwwoorrkksseerrvviiccee networkservice
Use this command to delete a network service. You cannot use this command to delete the last remaining service for a hardware port. To do so, you use the -setnetworkserviceen-
abled command.-oorrddeerrnneettwwoorrkksseerrvviicceess service1 [service2] [service3] [...]
Use this command to designate the order network services are con-
tacted on the specified hardware port. Name the network you wantcontacted first, then the second, and so on. Use "listnetworkser-
viceorder" to view current service order. Note: use quotes aroundservice names which contain spaces (ie. "Built-in Ethernet").
-ggeettaapppplleettaallkk networkservice
Displays whether AppleTalk is on or off (enabled or disabled) on. -sseettaapppplleettaallkk networkservice on | off
Set AppleTalk to eitheror (enabled or disabled) on . -sseettMMTTUUAAnnddMMeeddiiaaAAuuttoommaattiiccaallllyy hardwarePort
Set hardwareport or device specified back to automatically set-
ting the MTU and Media.-ggeettMMTTUU hardwareport
Get the MTU value for hardwareport or device specified.-sseettMMTTUU hardwarePort value
Set MTU for hardwareport or device specified.-lliissttVVaalliiddMMTTUURRaannggee hardwareport
List the valid MTU range for hardwareport or device specified.-ggeettMMeeddiiaa hardwareport
Show both the current setting for media and the active media on hardwareport or device specified.-sseettMMeeddiiaa hardwareport subtype [option1] [option2] [...]
Set media for hardwareport or device specified to subtype. Spec-
ify optional [option1] and additional options depending on sub-
type. Any number of valid options can be specified.-lliissttVVaalliiddMMeeddiiaa hardwareport
List valid media options for hardwareport or device name. Enumer-
ates available subtypes and options per subtype.-ccrreeaatteeVVLLAANN name parentdevice tag
Create a VLAN with the name
over the parent device entdevice> and with the tag . -ddeelleetteeVVLLAANN name parentdevice tag
Delete the VLAN with the name
over the parent device entdevice> and with the tag . -lliissttVVLLAANNss
List the VLANs that have been created.-lliissttddeevviicceesstthhaattssuuppppoorrttVVLLAANN
List the devices that support VLANs.-iissBBoonnddSSuuppppoorrtteedd device
Displays YES if the device can be added to a bond. NO if it can-
not.-ccrreeaatteeBBoonndd name [device1] [device2] [...]
Create a bond with the user-defined-name name and optionally add
any listed devices if they support bonding.-ddeelleetteeBBoonndd bond
Delete the bond with the specified device-name.
-aaddddDDeevviicceeTTooBBoonndd device bond
Add device to bond.-rreemmoovveeDDeevviicceeFFrroommBBoonndd device bond
Remove device from bond.-lliissttBBoonnddss
List of all bonds.-sshhoowwBBoonnddSSttaattuuss bond
Display the status of the specified bond.-lliissttppppppooeesseerrvviicceess
List all PPPoE services in the current set.-sshhoowwppppppooeessttaattuuss name
Display the status of the PPPoE service with the specified name.-ccrreeaatteeppppppooeesseerrvviiccee device name account password [pppoeName]
Create a PPPoE service on the specified device with the service name specified.-ddeelleetteeppppppooeesseerrvviiccee service
Delete the service.-sseettppppppooeeaaccccoouunnttnnaammee service account
Set the account name for the service.-sseettppppppooeeppaasssswwoorrdd service password
Set the password for the service.-ccoonnnneeccttppppppooeesseerrvviiccee service
Connect the service.-ddiissccoonnnneeccttppppppooeesseerrvviiccee service
Disconnect the service.-vveerrssiioonn
Displays version of networksetup tool.
-hheellpp Displays a list of all the commands available in the Network Set-
up Tool, with explanatory information.-pprriinnttccoommmmaannddss
Displays a list of commands with no detail. EEXXAAMMPPLLEESSnneettwwoorrkksseettuupp -listallnetworkservices
nneettwwoorrkksseettuupp -setmanual "Built-in Ethernet" 192.168.100.100 255.255.255.0
192.168.100.1nneettwwoorrkksseettuupp -setdnsservers "Built-in Ethernet" 192.168.100.100
192.168.100.12nneettwwoorrkksseettuupp -setsearchdomains "Built-in Ethernet" company.com corp.com
nneettwwoorrkksseettuupp -setwebproxy "Built-in Ethernet" proxy.company.com 80
nneettwwoorrkksseettuupp -setwebproxy "Built-In Ethernet" proxy.company.com 80 On
authusername authpasswordnneettwwoorrkksseettuupp -duplicatenetworkservice "Built-In Ethernet" "Local LAN"
nneettwwoorrkksseettuupp -getdnsservers "Built-In Ethernet"
nneettwwoorrkksseettuupp -setMTU en0 1500
nneettwwoorrkksseettuupp -setMedia en0 autoselect
nneettwwoorrkksseettuupp -setMedia en0 100baseTX half-duplex
nneettwwoorrkksseettuupp -createBond MyBond en0 en1
nneettwwoorrkksseettuupp -addDeviceToBond en0 bond0
FILES/usr/sbin/networksetup
SEE ALSO
systemsetup(8) Mac OS X April 16, 2002 Mac OS X