beautypg.com

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

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

”.

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

“networksetup -setdhcp [client id]”.

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

”.

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

“networksetup -setbootp ”.

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
[dns server2] [...]”. To clear all entries for the network service, type “empty” in place of a
DNS server name.

m Type “networksetup -setsearchdomains [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

”.

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

”.

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

service

>

”.

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

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

service> on”.

This manual is related to the following products: