Sun Microsystems, Inc.
spacerspacer
spacer www.sun.com docs.sun.com |
spacer
black dot
 
 
15.  Administering IPv6 (Task) Monitoring IPv6 How to Display Network Status Example--Displaying Statistics Per Interface (IPv6/ICMPv6 Counters)  Previous   Contents   Next 
   
 

How to Control the Display Output of IPv6 Related Commands

You can control the output of the netstat and ifconfig commands. Create a file that is named inet_type in the /etc/default directory. Then specify the value of the DEFAULT_IP variable. For more information about the inet_type, see the inet_type(4) man page.

  1. Create the /etc/default/inet_type file.

  2. Make one of the following entries, as needed.

    • To display IPv4 information only, type:

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

      DEFAULT_IP=BOTH

      or

      DEFAULT_IP=IP_VERSION6

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


Examples--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 results:

    % ifconfig -a
    lo0: flags=1000849 mtu 8232 index 1
            inet 120.10.0.1 netmask ff000000 
    le0: flags=1000843 mtu 1500 index 2
            inet 120.46.86.54 netmask ffffff00 broadcast 120.46.86.255
            ether 8:0:20:56:a8 
    lo0: flags=2000849 mtu 8252 index 1
            inet6 ::1/128 
    le0: flags=2000841 mtu 1500 index 2
            ether 8:0:20:56:a8 
            inet6 fe80::a00:fe73:56a8/10 
    le0:1: flags=2080841 mtu 1500 index 2
            inet6 fec0::56:a00:fe73:56a8/64 
    le0:2: flags=2080841 mtu 1500 index 2
            inet6 2::56:a00:fe73:56a8/64
  • When you specify the DEFAULT_IP=IP_VERSION4 variable in the inet_type file, you should have the following results:

    % ifconfig -a
    lo0: flags=849 mtu 8232
            inet 120.10.0.1 netmask ff000000 
    le0: flags=843 mtu 1500
            inet 120.46.86.54 netmask ffffff00 broadcast 120.46.86.255
            ether 8:0:20:56:a8

How to Monitor Only IPv6 Network Traffic

In this procedure, you use the snoop command to display all IPv6 packets.

  1. Become superuser.

  2. On the command line, type the following command.

    # snoop ip6

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

Example--Displaying Only IPv6 Network Traffic

# snoop ip6
Using device /dev/le (promiscuous mode)
fe80::a0:a1 -> ff02::9     IPv6  S=fe80::a0:a1 D=ff02::9 LEN=892
fe80::a0:de -> fe80::a0:a8 IPv6  S=fe80::a0:de D=fe80::a0:a8 LEN=104
fe80::a0:a8 -> fe80::a0:de IPv6  S=fe80::a0:a8 D=fe80::a0:de LEN=104
fe80::a0:a1 -> ff02::9     IPv6  S=fe80::a0:a1 D=ff02::9 LEN=892
fe80::a0:de -> fe80::a0:a8 IPv6  S=fe80::a0:de D=fe80::a0:a8 LEN=104
fe80::a0:a8 -> fe80::a0:de IPv6  S=fe80::a0:a8 D=fe80::a0:de LEN=152
fe80::a0:a1 -> ff02::9     IPv6  S=fe80::a0:a1 D=ff02::9 LEN=892
fe80::a0:de -> fe80::a0:a8 IPv6  S=fe80::a0:de D=fe80::a0:a8 LEN=72
fe80::a0:a8 -> fe80::a0:de IPv6  S=fe80::a0:a8 D=fe80::a0:de LEN=72
fe80::a0:a8 -> fe80::a0:de IPv6  S=fe80::a0:a8 D=fe80::a0:de LEN=72
fe80::a0:de -> fe80::a0:a8 IPv6  S=fe80::a0:de D=fe80::a0:a8 LEN=72

How to Probe All Multihomed Host Addresses

In this procedure, you use the ping command to check all addresses.

  • On the command line, type the following command.

    % ping -a ipng11
    ipng11 (2::102:a00:fe79:19b0) is alive
    ipng11 (fec0::102:a00:fe79:19b0) is alive
    ipng11 (190.68.10.75) is alive

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

How to Trace All Routes

In this procedure, you use the traceroute command to trace all routes.

  • On the command line, type the following command.

    % traceroute -a <hostname>

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

Example--Tracing All Routes

% traceroute -a ipng11
traceroute: Warning: Multiple interfaces found; using 2::56:a0:a8 @ le0:2
traceroute to ipng11 (2::102:a00:fe79:19b0),30 hops max, 60 byte packets
 1  ipng-rout86 (2::56:a00:fe1f:59a1)  35.534 ms  56.998 ms * 
 2  2::255:0:c0a8:717  32.659 ms  39.444 ms *
 3  ipng61.Eng.apex.COM (2::103:a00:fe9a:ce7b)  401.518 ms  7.143 ms *
 4  ipng12-00 (2::100:a00:fe7c:cf35)  113.034 ms  7.949 ms *
 5  ipng11 (2::102:a00:fe79:19b0)  66.111 ms *  36.965 ms

traceroute: Warning: Multiple interfaces found; using fec0::56:a8 @ le0:1
traceroute to ipng11 (fec0::10:b0), 30 hops max, 60 byte packets
 1  ipng-rout86 (fec0::56:a00:fe1f:59a1) 96.342 ms  78.282 ms 88.327 ms
 2  ipng8-tun1 (fec0::25:0:0:c0a8:717)  268.614 ms  508.416 ms  438.774 ms
 3  ipng61.Eng.apex.COM (fec0::103:a00:fe9a:ce7b)  6.356 ms * 713.166 ms
 4  ipng12-00 (fec0::100:a00:fe7c:cf35)  7.409 ms * 122.094 ms
 5  ipng11 (fec0::102:a00:fe79:19b0)  10.620 ms * *

traceroute to ipng11.eng.apex.com (190.68.10.75),30 hops max,40 byte packets
 1  rmpj17c-086.Eng.apex.COM (120.46.86.1)  4.360 ms  3.452 ms  3.479 ms
 2  flrmpj17u.Eng.apex.COM (120.46.17.131)  4.062 ms  3.848 ms  3.505 ms
 3  ipng8.Eng.apex.COM (120.68.7.23)  4.773 ms *  4.294 ms
 4  ipng61.Eng.apex.COM (120.68.10.104)  5.128 ms  5.362 ms *
 5  ipng12-20.Eng.apex.COM (120.68.10.62)  7.298 ms  5.444 ms *
 6  ipng11.Eng.apex.COM (120.68.10.75)  8.053 ms  6.394 ms *
 
 
 
  Previous   Contents   Next