JavaScript is required to for searching.
Skip Navigation Links
Exit Print View
System Administration Guide: IP Services     Oracle Solaris 10 8/11 Information Library
search filter icon
search icon

Document Information

Preface

Part I Introducing System Administration: IP Services

1.  Oracle Solaris TCP/IP Protocol Suite (Overview)

Part II TCP/IP Administration

2.  Planning Your TCP/IP Network (Tasks)

3.  Introducing IPv6 (Overview)

4.  Planning an IPv6 Network (Tasks)

5.  Configuring TCP/IP Network Services and IPv4 Addressing (Tasks)

6.  Administering Network Interfaces (Tasks)

7.  Configuring an IPv6 Network (Tasks)

8.  Administering a TCP/IP Network (Tasks)

Major TCP/IP Administrative Tasks (Task Map)

Monitoring the Interface Configuration With the ifconfig Command

How to Get Information About a Specific Interface

How to Display Interface Address Assignments

Monitoring Network Status With the netstat Command

How to Display Statistics by Protocol

How to Display the Status of Transport Protocols

How to Display Network Interface Status

How to Display the Status of Sockets

How to Display the Status of Transmissions for Packets of a Specific Address Type

How to Display the Status of Known Routes

Probing Remote Hosts With the ping Command

How to Determine if a Remote Host Is Running

How to Determine if a Host Is Dropping Packets

Administering and Logging Network Status Displays

How to Control the Display Output of IP-Related Commands

How to Log Actions of the IPv4 Routing Daemon

How to Trace the Activities of the IPv6 Neighbor Discovery Daemon

Displaying Routing Information With the traceroute Command

How to Find Out the Route to a Remote Host

How to Trace All Routes

Monitoring Packet Transfers With the snoop Command

How to Check Packets From All Interfaces

How to Capture snoop Output Into a File

How to Check Packets Between an IPv4 Server and a Client

How to Monitor IPv6 Network Traffic

Administering Default Address Selection

How to Administer the IPv6 Address Selection Policy Table

How to Modify the IPv6 Address Selection Table for the Current Session Only

9.  Troubleshooting Network Problems (Tasks)

10.  TCP/IP and IPv4 in Depth (Reference)

11.  IPv6 in Depth (Reference)

Part III DHCP

12.  About DHCP (Overview)

13.  Planning for DHCP Service (Tasks)

14.  Configuring the DHCP Service (Tasks)

15.  Administering DHCP (Tasks)

16.  Configuring and Administering the DHCP Client

17.  Troubleshooting DHCP (Reference)

18.  DHCP Commands and Files (Reference)

Part IV IP Security

19.  IP Security Architecture (Overview)

20.  Configuring IPsec (Tasks)

21.  IP Security Architecture (Reference)

22.  Internet Key Exchange (Overview)

23.  Configuring IKE (Tasks)

24.  Internet Key Exchange (Reference)

25.  IP Filter in Oracle Solaris (Overview)

26.  IP Filter (Tasks)

Part V Mobile IP

27.  Mobile IP (Overview)

28.  Administering Mobile IP (Tasks)

29.  Mobile IP Files and Commands (Reference)

Part VI IPMP

30.  Introducing IPMP (Overview)

31.  Administering IPMP (Tasks)

Part VII IP Quality of Service (IPQoS)

32.  Introducing IPQoS (Overview)

33.  Planning for an IPQoS-Enabled Network (Tasks)

34.  Creating the IPQoS Configuration File (Tasks)

35.  Starting and Maintaining IPQoS (Tasks)

36.  Using Flow Accounting and Statistics Gathering (Tasks)

37.  IPQoS in Detail (Reference)

Glossary

Index

Monitoring the Interface Configuration With the ifconfig Command

You use the ifconfig command to manually assign IP addresses to interfaces and to manually configure interface parameters. In addition, Oracle Solaris startup scripts run ifconfig to configure pseudo interfaces, such as 6to4 tunnel endpoints.

This book contains many tasks that use the various options of the versatile ifconfig command. For a complete description of this command, its options, and its variables, refer to the ifconfig(1M) man page. The basic syntax of ifconfig follows:

ifconfig interface [protocol-family]

How 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 8-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 and also includes the description of how the variable might be displayed on the screen and the type of information that is being provided. 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.

How to Display Interface Address Assignments

Routers and multihomed hosts have more than one interface and, often, more than one IP address assigned to each interface. You can use the ifconfig command to display all addresses that are assigned to the interfaces of a system. You can also use the ifconfig command to display only IPv4 or IPv6 address assignments. To additionally display the MAC addresses of the interfaces, you must first log in as superuser or assume the appropriate role.

For more information on the ifconfig command, see the ifconfig(1M) man page.

  1. On the local system, assume the Network Management role or become superuser.

    Roles contain authorizations and privileged commands. For more information about roles, see Configuring RBAC (Task Map) in System Administration Guide: Security Services.

  2. Obtain information about all interfaces.

    You can use variations of the ifconfig -a command to do the following:

    • View all addresses of all interfaces on the system.

      # ifconfig -a
    • View all IPv4 addresses that are assigned to a system's interfaces.

      # ifconfig -a4
    • If the local system is IPv6-enabled, display all IPv6 addresses that are assigned to a system's interfaces.

      ifconfig -a6

Example 8-2 Displaying Addressing Information for All Interfaces

This example shows entries for a host with solely a primary network interface, qfe0. Nevertheless, the ifconfig output shows that three forms of addresses are currently assigned to qfe0: loopback (lo0), IPv4 (inet), and IPv6 (inet6). In the IPv6 section of the output, note that the line for interface qfe0 displays the link-local IPv6 address. The second address for qfe0 is displayed on the qfe0:1 line.

% ifconfig -a
lo0: flags=1000849 <UP,LOOPBACK,RUNNING,MULTICAST,IPv4> mtu 8232 index 1
        inet 127.0.0.1 netmask ff000000 
qfe0: flags=1004843 <UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2 
        inet 10.0.0.112 netmask ffffff80 broadcast 10.0.0.127
        ether 8:0:20:b9:4c:54 
lo0: flags=2000849 <UP,RUNNING,MULTICAST,IPv6> mtu 8252 index 1
        inet6 ::1/128 
qfe0: flags=2000841 <UP,RUNNING,MULTICAST,IPv6> mtu 1500 index 2
        ether 8:0:20:b9:4c:54 
        inet6 fe80::a00:20ff:feb9:4c54/10 
qfe0:1: flags=2080841 <UP,RUNNING,MULTICAST,ADDRCONF,IPv6> mtu 1500 index 2
        inet6 2001:db8:3c4d:48:a00:20ff:feb9:4c54/64 

Example 8-3 Displaying Addressing Information for All IPv4 Interfaces

This example shows the IPv4 address that is configured for a multihomed host. You do not need to be logged in as superuser to run this form of the ifconfig command.

% ifconfig -a4
lo0: flags=1000849 <UP,LOOPBACK,RUNNING,MULTICAST,IPv4> mtu 8232 index 1
        inet 127.0.0.1 netmask ff000000
qfe0: flags=1004843 <UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2
        inet 10.0.0.112 netmask ffffff80 broadcast 10.0.0.127
        ether 8:0:20:b9:4c:54 
qfe1: flags=1004843 <UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2
        inet 10.0.0.118 netmask ffffff80 broadcast 10.0.0.127
        ether 8:0:20:6f:5e:17

Example 8-4 Displaying Addressing Information for All IPv6 Interfaces

This example shows only the IPv6 addresses that are configured for a particular host. You do not need to be logged in as superuser to run this form of the ifconfig command.

% ifconfig -a6
lo0: flags=2000849 <UP,LOOPBACK,RUNNING,MULTICAST,IPv6> mtu 8252 index 1
        inet6 ::1/128 
qfe0: flags=2000841 <UP,RUNNING,MULTICAST,IPv6> mtu 1500 index 2
        ether 8:0:20:b9:4c:54 
        inet6 fe80::a00:20ff:feb9:4c54/10
qfe0:1: flags=2080841 <UP,RUNNING,MULTICAST,ADDRCONF,IPv6> mtu 1500 index 2
        inet6 2001:db8:3c4d:48:a00:20ff:feb9:4c54/64 

This output from ifconfig shows the following three types of IPv6 address forms that are assigned to the single interface of a host:

lo0

IPv6 loopback address.

inet6 fe80::a00:20ff:feb9:4c54/10

Link-local address that is assigned to the primary network interface.

inet6 2001:db8:3c4d:48:a00:20ff:feb9:4c54/64

IPv6 address, including subnet prefix. The term ADDRCONF in the output indicates that this address was autoconfigured by the host.