System Administration Guide: IP Services

ProcedureHow to Get Information About a Specific Interface

Use the ifconfig command to determine basic information about the interfaces of a particular system. For example, a simple ifconfig query can tell you the following:

The following procedure shows how to use the ifconfig command to obtain basic configuration information about a system's interfaces.

  1. On the local host, assume the Primary Administrator role, or become superuser.

    The Primary Administrator role includes the Primary Administrator profile. To create the role and assign the role to a user, see Chapter 2, Working With the Solaris Management Console (Tasks), in System Administration Guide: Basic Administration.

  2. Obtain information about a particular interface.


    # ifconfig interface
    

    The output from the ifconfig command has the following format:

    • Status line

      The first line in the ifconfig command output includes the interface name and status flags currently associated with the interface. Also, the status line includes the maximum transmission unit (MTU) that is configured for the particular interface and an index number. Use the status line to determine the current state of the interface.

    • IP address information line

      The second line of the ifconfig output includes the IPv4 address or IPv6 address that is configured for the interface. For an IPv4 address, the configured netmask and broadcast address are also displayed.

    • MAC address line

      When you run the ifconfig command as superuser or with a similar role, the ifconfig output contains a third line. For an IPv4 address, the third line shows the MAC address (Ethernet layer address) that is assigned to the interface. For an IPv6 address, the third line in the output shows the link-local address that the IPv6 in.ndpd daemon generates from the MAC address.


Example 7–1 Basic Interface Information From the ifconfig Command

The following example shows how to obtain information about the eri interface on a particular host by using the ifconfig command.


# ifconfig eri
eri0: flags=863<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 1
      inet 10.0.0.112 netmask ffffff80 broadcast 10.8.48.127
      ether 8:0:20:b9:4c:54 
	

The next table describes the variable information in an ifconfig query. The preceding output is used as an example.

Variable 

Screen Output 

Description 

Interface name 

eri0

Indicates the device name of the interface whose status was requested in the ifconfig command.

Interface status 

flags=863<UP

Displays the status of the interface, including any flags that are currently associated with the interface. Here you can determine whether the interface is currently initialized (UP) or not initialized (DOWN).

Broadcast status 

BROADCAST

Indicates that the interface supports IPv4 broadcasts. 

Transmission status 

RUNNING

Indicates that the system is transmitting packets through the interface. 

Multicast status 

MULTICAST, IPv4

Shows that the interface supports multicast transmissions. The example interface supports IPv4 multicast transmissions. 

Maximum transmission unit 

mtu 1500

Shows that this interface has a maximum transfer size of 1500 octets. 

IP address 

inet 10.0.0.112

Displays the IPv4 or IPv6 address that is assigned to the interface. Example interface eri0 has the IPv4 address 10.0.0.112.

Netmask 

netmask ffffff80

Displays the IPv4 netmask of the particular interface. Note that IPv6 addresses do not use netmasks. 

MAC address 

ether 8:0:20:b9:4c:54

Shows the interface's Ethernet layer address.