5Network Preferences

5

 

Commands you can use to change a server’s network settings.

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 “Network Port Configurations” on page 38.

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.

37

Page 37
Image 37
Apple oxs manual Viewing Port Names and Hardware Addresses