You can control the output of the netstat command to display IPv4 information only or both IPv4 and IPv6 information.
DEFAULT_IP=IP_VERSION4
DEFAULT_IP=BOTH
DEFAULT_IP=IP_VERSION6
For more information, see the inet_type(4) man page.
The following example shows the output when you specify the DEFAULT_IP=BOTH or DEFAULT_IP=IP_VERSION6 variable in the inet_type file:
# ifconfig -a lo0: flags=2001000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL> mtu 8232 index 1 inet 127.0.0.1 netmask ff000000 net0: flags=100001004843<UP,BROADCAST,RUNNING,MULTICAST,DHCP,IPv4,PHYSRUNNING> mtu 1500 index 603 inet 203.0.113.54 netmask ffffff00 broadcast 203.0.113.255 ether 0:1e:68:49:98:80 lo0: flags=2002000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv6,VIRTUAL> mtu 8252 index 1 inet6 ::1/128 net0: flags=120002000841<UP,RUNNING,MULTICAST,IPv6,PHYSRUNNING> mtu 1500 index 603 inet6 fe80::21e:68ff:fe49:9880/10 ether 0:1e:68:49:98:80 net0:1: flags=120002080841<UP,RUNNING,MULTICAST,ADDRCONF,IPv6,PHYSRUNNING> mtu 1500 index 603 inet6 2001:b400:414:6059:21e:68ff:fe49:9880/64
When you specify the DEFAULT_IP=IP_VERSION4 variable in the inet_type file, you should see the following output:
# ifconfig -a lo0: flags=2001000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL> mtu 8232 index 1 inet 127.0.0.1 netmask ff000000 net0: flags=100001004843<UP,BROADCAST,RUNNING,MULTICAST,DHCP,IPv4,PHYSRUNNING> mtu 1500 index 603 inet 203.0.113.54 netmask ffffff00 broadcast 203.0.113.255 ether 0:1e:68:49:98:80