Checking the IP address and netmask

Use the ifconfig command to confirm that the IP address and netmask are correct. Invoke ifconfig with the name of the network interface that you want to examine.

For example, to check the first Ethernet interface, enter:

ifconfig en0

en0: flags=2000063<UP,BROADCAST,NOTRAILERS,RUNNING,NOECHO>
  inet 100.100.83.136 netmask 0xffffff00 broadcast 100.100.83.255
  inet6 fe80::214:5eff:fe4d:6045/64
  tcp_sendspace 131072 tcp_recvspace 65536 rfc1323 0

If the specified interface does not exist, ifconfig replies:

No such device

The ifconfig command displays multiple lines of output. The first line shows the interface's name and characteristics. Check for these characteristics:

Table 1. ifconfig command output
Field Value
UP The interface is ready for use. If the interface is down, use the ifconfig command to initialize it. For example:
ifconfig en0 up
If the interface does not come up, replace the interface cable and try again. If it still fails, use the diag command to check the device.
RUNNING The interface is working. If the interface is not running, the driver for this interface may not be properly installed, or the interface is not properly configured. Review all the steps necessary to install this interface, looking for errors or missed steps.
Note: The ifconfig command displays only the configuration and not the functional state of the adapter. It is possible that the configured state might be UP but some other problem is preventing communications.

The remaining output from the ifconfig command includes information for each address configured on the interface. Check these fields to make sure the network interface is properly configured.

See the ifconfig man page for more information.

Using the arp command

Use the arp command to view what is currently held to be the IP addresses associated with nodes listed in a host's arp cache. For example:

arp -a

flounder (100.50.81.133) at 8:0:4c:0:12:34 [ethernet]
cod (100.50.81.195) at 8:0:5a:7a:2c:85 [ethernet]
pollock (100.50.81.147) at 10:0:5a:5c:36:b9 [ethernet]

This output shows what the host node currently believes to be the IP and MAC addresses for nodes flounder, cod, seahorse and pollock. (If IP address takeover occurs without Hardware Address Takeover, the MAC address associated with the IP address in the host's arp cache may become outdated. You can correct this situation by refreshing the host's arp cache.)

See the arp man page for more information.