Apple Mac OS X Server Network Card User Manual


 
64 Chapter 6 Setting Network Preferences
Managing Network Interface Information
This section describes commands you address to a specific hardware device (for
example,
en0) or port (for example, Built-in Ethernet).
If you prefer to work with network port configurations following the approach used in
the Network preferences pane of System Preferences, see the commands in “Managing
Network Port Configurations” on page 65.
Viewing Port Names and Hardware Addresses
To list all port names:
$ serversetup -getAllPort
To list all port names with their Ethernet (MAC) addresses:
$ sudo networksetup -listallhardwareports
To list hardware port information by port configuration:
$ sudo networksetup -listallnetworkservices
An asterisk (*) in the results marks an inactive configuration.
To view the default (en0) Ethernet (MAC) address of the server:
$ serversetup -getMacAddress
To view the Ethernet (MAC) address of a particular port:
$ sudo networksetup -getmacaddress (
devicename
|"
portname
")
To scan for new hardware ports:
$ sudo networksetup -detectnewhardware
This command checks the computer for new network hardware and creates a default
configuration for each new port.
Viewing or Changing MTU Values
All data that is transmitted over a network travels in data packets. The size of the data
packets is called maximum transmission units (MTU), which if too large or too small will
affect performance. You can use the networksetup tool to change the MTU size for a
port.
To view the MTU value for a hardware port:
$ sudo networksetup -getMTU (
devicename
|"
portname
")
To list valid MTU values for a hardware port:
$ sudo networksetup -listvalidMTUrange (
devicename
|"
portname
")
To change the MTU value for a hardware port:
$ sudo networksetup -setMTU (
devicename
|"
portname
")