beautypg.com

Retrieving your server’s network configuration, Configuring tcp/ip settings, Configuring dns servers and search domains – Apple Mac OS X Server (version 10.2.3 or later) User Manual

Page 603

background image

Tools for Advanced Administrators

603

Retrieving Your Server’s Network Configuration

You can use networksetup to find out about the network services on a remote server:

m To display a list of network services in the order in which they are contacted for a

connection along with the corresponding ports and devices, type “networksetup -
listnetworkserviceorder”. An asterisk (*) next to a service means the service is inactive.

m To display a list of all network services, type “networksetup -listallnetworkservices”. An

asterisk (*) next to a service means the service is inactive.

m To display a list of hardware ports with corresponding device names and Ethernet

addresses, type “networksetup -listallhardwareports”.

m To detect new hardware and create a default network service on the hardware, type

“networksetup -detectnewhardware”.

m To display the IP address, subnet mask, router, and Ethernet address for a particular

network service, type “networksetup -getinfo ”.

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.

LL0395.Book Page 603 Wednesday, November 20, 2002 11:44 AM