System Administration Guide: IP Services

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:

    • To display both IPv4 and IPv6 information, type:




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