System Administration Guide: IP Services
Previous Next

Administering and Logging Network Status Displays

The following tasks show how to check the status of the network by using well-known networking commands.

How to Control the Display Output of IP-Related Commands

You can control the output of the netstat and ifconfig commands to display IPv4 information only, or both IPv4 and IPv6 information.

  1. Create the /etc/default/inet_type file.
  2. Add one of the following entries to /etc/default/inet_type, as required for your network:
    • To display IPv4 information only:

      DEFAULT_IP=IP_VERSION4
    • To display both IPv4 and IPv6 information:

      DEFAULT_IP=BOTH

      Or

      DEFAULT_IP=IP_VERSION6

      For more information about the inet_type file, see the inet_type(4) man page.


    Note - The -4 and -6 flags in the ifconfig command override the values set in the inet_type file. The -f flag in the netstat command also overrides the values set in the inet_type file.


Example 8-14 Controlling Output to Select IPv4 and IPv6 Information
  • When you specify the DEFAULT_IP=BOTH or DEFAULT_IP=IP_VERSION6 variable in the inet_type file, you should have the following output:

    % ifconfig -a
    lo0: flags=1000849 mtu 8232 index 1
            inet 10.10.0.1 netmask ff000000 
    qfe0: flags=1000843 mtu 1500 index 2
            inet 10.46.86.54 netmask ffffff00 broadcast 10.46.86.255
            ether 8:0:20:56:a8 
    lo0: flags=2000849 mtu 8252 index 1
            inet6 ::1/128 
    qfe0: flags=2000841 mtu 1500 index 2
            ether 8:0:20:56:a8 
            inet6 fe80::a00:fe73:56a8/10 
    qfe0:1: flags=2080841 mtu 1500 index 2
            inet6 2001:db8:3c4d:5:a00:fe73:56a8/64 
  • When you specify the DEFAULT_IP=IP_VERSION4 or DEFAULT_IP=IP_VERSION6 variable in the inet_type file, you should have the following output:

    % ifconfig -a
    lo0: flags=849 mtu 8232
            inet 10.10.0.1 netmask ff000000 
    qfe0: flags=843 mtu 1500
            inet 10.46.86.54 netmask ffffff00 broadcast 10.46.86.255
            ether 8:0:20:56:a8

How to Log Actions of the IPv4 Routing Daemon

If you suspect a malfunction of routed, the IPv4 routing daemon, you can start a log that traces the daemon's activity. The log includes all packet transfers when you start the routed daemon.

  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. Create a log file of routing daemon actions:
    # /usr/sbin/in.routed /var/log-file-name

    Caution - On a busy network, this command can generate almost continuous output.


Example 8-15 Network Log for the in.routed Daemon

The following example shows the beginning of the log that is created by the procedure How to Log Actions of the IPv4 Routing Daemon.

-- 2003/11/18 16:47:00.000000 --
Tracing actions started
RCVBUF=61440
Add interface lo0  #1   127.0.0.1      -->127.0.0.1/32   
   <UP|LOOPBACK|RUNNING|MULTICAST|IPv4> <PASSIVE> 
Add interface hme0 #2   10.10.48.112    -->10.10.48.0/25   
    <UP|BROADCAST|RUNNING|MULTICAST|IPv4> 
turn on RIP
Add    10.0.0.0        -->10.10.48.112      metric=0  hme0  <NET_SYN>
Add    10.10.48.85/25  -->10.10.48.112      metric=0  hme0  <IF|NOPROP>

How to Trace the Activities of the IPv6 Neighbor Discovery Daemon

If you suspect a malfunction of the IPv6 in.ndpd daemon, you can start a log that traces the daemon's activity. This trace is displayed on the standard output until terminated. This trace includes all packet transfers when you start the in.ndpd daemon.

  1. Assume the Primary Administrator role, or become superuser, on the local IPv6 node.

    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. Start a trace of the in.ndpd daemon.
    # /usr/lib/inet/in.ndpd -t
  3. Terminate the trace as needed by typing Control-C.
Example 8-16 Trace of the in.ndpd Daemon

The following output shows the beginning of a trace of in.ndpd.

# /usr/lib/inet/in.ndpd -t
Nov 18 17:27:28 Sending solicitation to  ff02::2 (16 bytes) on hme0
Nov 18 17:27:28         Source LLA: len 6 <08:00:20:b9:4c:54>
Nov 18 17:27:28 Received valid advert from fe80::a00:20ff:fee9:2d27 (88 bytes) on hme0
Nov 18 17:27:28         Max hop limit: 0
Nov 18 17:27:28         Managed address configuration: Not set
Nov 18 17:27:28         Other configuration flag: Not set
Nov 18 17:27:28         Router lifetime: 1800
Nov 18 17:27:28         Reachable timer: 0
Nov 18 17:27:28         Reachable retrans timer: 0
Nov 18 17:27:28         Source LLA: len 6 <08:00:20:e9:2d:27>
Nov 18 17:27:28         Prefix: 2001:08db:3c4d:1::/64
Nov 18 17:27:28                 On link flag:Set
Nov 18 17:27:28                 Auto addrconf flag:Set
Nov 18 17:27:28                 Valid time: 2592000
Nov 18 17:27:28                 Preferred time: 604800
Nov 18 17:27:28         Prefix: 2002:0a00:3010:2::/64
Nov 18 17:27:28                 On link flag:Set
Nov 18 17:27:28                 Auto addrconf flag:Set
Nov 18 17:27:28                 Valid time: 2592000
Nov 18 17:27:28                 Preferred time: 604800
Previous Next