Configuring tcp/ip settings, Configuring dns servers and search domains, Managing network services – Apple Mac OS X Server (Administrator’s Guide) User Manual

Page 564

Advertising
background image

564

Chapter 17

Configuring TCP/IP Settings

You can use networksetup to configure TCP/IP settings:

m To specify a manual configuration for a network service, type “networksetup -setmanual

<network service> <ip address> <subnet mask> <router>”.

m To set the TCP/IP configuration for a specified network service to use DHCP, type

“networksetup -setdhcp <network service> [client id]”.

m To specify an address to use for DHCP, type “networksetup -setmanualwithdhcprouter

<network service> <ip address>”.

m To set the TCP/IP configuration for the specified network service to use BOOTP, type

“networksetup -setbootp <network service>”.

Configuring DNS Servers and Search Domains

You can use networksetup to specify how you want network services to use Domain Name
System (DNS):

m To specify the IP addresses of servers you want a network service to use to resolve

domain names, type “networksetup -setdnsservers <network service> <dns server1>
[dns server2] [...]”. To clear all entries for the network service, type “empty” in place of a
DNS server name.

m Type “networksetup -setsearchdomains <network service> <domain1> [domain2]

[...]” to designate the search domain for the network service. To clear all search domain
entries for the network service, type “empty” in place of the domain name.

Managing Network Services

You can use networksetup to create or rename network services, turn them on or off,
remove them, and change the order in which they’re contacted. This application is also
useful for displaying the names of hardware ports:

m To display all hardware port names, type “networksetup -listallhardwareports”.

m To create a new network service on a port, type “networksetup -createnetworkservice

<new network service> <hardware port>”.

m To duplicate an existing network service, type “networksetup -duplicatenetworkservice

<network service> <new network service name>”.

m To rename a network service, type “networksetup -renamenetworkservice <network

service

>

<new network service name>”.

m To delete a network service, type “networksetup -removenetworkservice <network

service>”. If there is only one network service for a port, you can’t delete it using this
option. Instead, use -setnetworkserviceenabled to turn a network service off.

m To turn a network service on, type “networksetup -setnetworkserviceenabled <network

service> on”.

Advertising
This manual is related to the following products: