Go to main content

Configuring and Managing Network Components in Oracle® Solaris 11.3

Exit Print View

Updated: December 2017
 
 

Monitoring IP Interfaces and Addresses

Use the ipadm command to monitor and obtain information about IP interfaces and their properties. By itself, the command displays general information about IP interfaces on the system. However, you can also use various subcommands to restrict the information that you want to display by using the following command syntax:

ipadm show-* other-arguments interface
  • To obtain only interface information, use the show-if subcommand.

  • To obtain only address information, use the show-addr subcommand.

  • To obtain information about interface properties, use the show-ifprop subcommand.

  • To obtain information about address properties, use the show-addrprop subcommand.

For an explanation of all of the fields that are displayed by the ipadm show-* commands, see the ipadm(1M) man page.

Obtaining General Information About IP Interfaces

The ipadm command provides a comprehensive picture of the system's interfaces. Using the command without accompanying subcommands displays default information about all of the system's IP interfaces. For example:

# ipadm
NAME         CLASS/TYPE STATE     UNDER  ADDR
lo0          loopback   ok        --     --
lo0/v4       static     ok        --     127.0.0.1/8
lo0/v6       static     ok        --     ::1/128
net0         ip         ok        --     --
net0/v4      static     ok        --     203.0.113.233/23
net0/v4      dhcp       ok        --     203.0.113.234/23
ipmp0        ipmp       degraded  --     --
ipmp0/v6     static     ok        --     2001:db8:1:2::4c08/32
net1         ip         failed    ipmp0  --
net1/v6      addrconf   ok        --     2001:db8:124:4fff:fe58:1831/32
net2         ip         ok        ipmp0  --
net2/v6      addrconf   ok        --     2001:db8:214:4fff:fe58:1832/32
iptun0       ip         ok        --     --
iptun0/v4    static     ok        --     198.51.110.5->198.51.110.75
iptun0/v6    static     ok        --     2001:db8:10:5->2001:db8:223:75
iptun0/v6a   static     ok        --     2001:db8:1a0:7::10:5->2001:db8:7a82:64::223:75

    The previous output displays the following information:

  • IP interfaces.

  • Class of each interface.

  • State of each interface.

  • Status of the interface: either a “stand alone” IP interface or an underlying interface for another type of interface configuration. In the example, net1 and net2 are underlying interfaces of ipmp0, as indicated in the UNDER column.

  • Address objects that are associated with the interface. Address objects identify a specific IP address. These address objects are listed and indented under the NAME heading to distinguish them from interface names.

  • Type of IP address, which is indented under the CLASS/TYPE heading and which can be static, dhcp and so on.

  • Actual addresses listed under the ADDRESS column.

Obtaining Information About IP Interfaces

For information about IP interfaces, use the ipadm show-if interface command. If you do not specify an interface, the information covers all of the interfaces on the system.

The fields in the command output refer to the following information:

IFNAME

Refers to the interface whose information is being displayed.

CLASS

Refers to the class of interface, which can be one of four:

  • ip refers to an IP interface

  • ipmp refers to an IPMP interface

  • vni refers to a virtual interface

  • loopback refers to a loopback interface, which is automatically created. Except for the loopback interface, you can manually create the remaining 3 interface classes.

STATE

Refers to the status of the interface, which can be one of the following: ok, offline, failed, down, or disabled.

The status failed applies to IPMP groups and can refer to a datalink or an IP interface that is down and cannot host traffic. If the IP interface belongs to an IPMP group, then the IPMP interface can continue to receive and send traffic by using other active IP interfaces in the group.

The status down refers to an IP interface that is switched offline by the administrator.

The status disable refers to the IP interface that is unplumbed by using the ipadm disable-if command.

ACTIVE

Indicates whether the interface is being used to host traffic, and is set to either yes or no.

OVER

Applies only to the IPMP class of interfaces and refers to the underlying interfaces that constitute the IPMP interface or group.

The following is an example of the information that the command displays:

# ipadm show-if
IFNAME       CLASS        STATE     ACTIVE     OVER
lo0          loopback     ok        yes        --
net0         ip           ok        yes        --
net1         ip           ok        yes        --
tun0         ip           ok        yes        --

Obtaining Information About IP Interface Properties

Use the ipadm show-ifprop interface command to obtain information about the properties of IP interfaces. If you do not specify a property or an interface, then information about all of the properties of all of the IP interfaces on the system is displayed.

The fields in the command output refer to the following:

IFNAME

Refers to the IP interface whose information is being displayed.

PROPERTY

Refers to a property of the interface. An interface can have several properties.

PROTO

Refers to the protocol to which the property applies, which can be either IPv4 or IPv6.

PERM

Refers to the allowed permissions of a given property, which can be read only, write only, or both.

CURRENT

Indicates the current value of the property in the active configuration.

PERSISTENT

Refers to the value of the property that is reapplied when the system is rebooted.

DEFAULT

Indicates the default value of the specified property.

POSSIBLE

Refers to a list of values that can be assigned to the specified property. For numeric values, a range of acceptable values is displayed.


Note -  If any field value is unknown, such as when an interface does not support the property whose information is being requested, the value is displayed as a question mark (?).

The following example shows the type of information that the show-ifprop subcommand displays:

# ipadm show-ifprop -p mtu net1
IFNAME  PROPERTY  PROTO  PERM  CURRENT  PERSISTENT  DEFAULT  POSSIBLE
net1    mtu       ipv4   rw    1500      --         1500     68-1500
net1    mtu       ipv6   rw    1500      --         1500     1280-1500

Obtaining Information About IP Addresses

For information about IP addresses, use the ipadm show-addr interface command. If you do not specify an interface, then the information about all of the IP addresses that are on the system is displayed.

The fields in the command output refer to the following:

ADDROBJ

Specifies the address object whose IP address is being listed.

TYPE

Indicates whether the IP address is static, dhcp, or addrconf. The addrconf value indicates that the address was obtained by using stateless or stateful address configuration.

STATE

Describes the status of the address object in the active configuration. For a full list of these values, see the ipadm(1M) man page.

ADDR

Specifies the IP address that is configured over the interface. The address can be IPv4 or IPv6. A tunnel interface displays both local and remote addresses.

For more information about tunnels, see Chapter 5, Administering IP Tunnels in Administering TCP/IP Networks, IPMP, and IP Tunnels in Oracle Solaris 11.3.

The following is an example of the information that the show-addr subcommand provides:

# ipadm show-addr
ADDROBJ          TYPE       STATE     ADDR
lo0/v4           static     ok        127.0.0.1/8
net0/v4          static     ok        198.51.100.3/24
tun0/v4          static     ok        203.0.113.1-->203.0.113.2

If you specify an interface with the command and the interface has multiple addresses, information that is similar to the following is displayed:

# ipadm show-addr net0
ADDROBJ          TYPE       STATE     ADDR
net0/v4          static     ok        198.51.100.3/24
net0/v4a         static     ok        192.0.2.1/24
net0/v4bc        static     ok        203.0.113.1

An address object that is displayed as interface/? indicates that the address was configured on the interface by an application that did not use libipadm APIs. Such applications are not under the control of the ipadm command, which requires that the address object name use the format interface/user-defined-string. For examples of assigning IP addresses, see How to Configure an IPv4 Interface.

Obtaining Information About IP Address Properties

For information about IP address properties, use the ipadm show-addrprop addrobj command. To list all of the properties, omit the addrobj option. To list a single property for all of the IP addresses, specify just that property. To display all of the properties of a specific address, specify just the addrobj option.

The fields in the command output refer to the following:

ADDROBJ

Refers to the address object whose properties are being listed.

PROPERTY

Refers to a property of the address object. An address object can have several properties.

PERM

Refers to the allowed permissions of a given property, which can be read only, write only, or both.

CURRENT

Refers to the actual value of the property in the present configuration.

PERSISTENT

Refers to the value of the property that is reapplied when the system is rebooted.

DEFAULT

Indicates the default value of the specified property.

POSSIBLE

Refers to a list of values that can be assigned to the specified property. For numeric values, a range of acceptable values is displayed.

The following is an example of the type of information that the show-addrprop subcommand displays:

# ipadm show-addrprop net1/v4
ADDROBJ   PROPERTY     PERM   CURRENT         PERSISTENT  DEFAULT          POSSIBLE
net1/v4   broadcast    r-     198.51.100.255  --          198.51.100.255   --
net1/v4   deprecated   rw     off             --          off              on,off
net1/v4   prefixlen    rw     24              24          24               1-30,32
net1/v4   private      rw     off             --          off              on,off
net1/v4   transmit     rw     on              --          on               on,off
net1/v4   zone         rw     global          --          global           --