How to Display Interface Address Assignments
You can use the ifconfig command to display all address assignments as well as just
IPv4 or IPv6 address assignments.
On the command line, type the following command.
For more information on the ifconfig command, see
the ifconfig(1M)
man page.
Example—Displaying Addressing Information for All Interfaces
% 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.146.86.255
ether 8:0:73: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:20ff:fe73:56a8/64
le0:2: flags=2080841 mtu 1500 index 2
inet6 2::56:a00:fe73:56a8/64
|
Example—Displaying Addressing Information for All IPv4 Interfaces
% ifconfig -a4
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
|
Example—Displaying Addressing Information for All IPv6 Interfaces
% ifconfig -a6
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:20ff:fe73:56a8/64
le0:2: flags=2080841 mtu 1500 index 2
inet6 2::56:a00:fe73:56a8/64
ip.6to4tun0: flags=2200041<UP,RUNNING,NONUD,IPv6> mtu 1480 index 11
inet tunnel src 129.146.86.187
tunnel hop limit 60
inet6 2002:8192:56bb::1/64
|
Example—Displaying Addressing Information for the 6to4 Pseudo-Interface
% ifconfig ip.6to4tun0 inet6
6to4tun0: flags=2200041<UP,RUNNING,NONUD,IPv6. mtu 1480 index 11
inet tunnel src 172.16.213.81
tunnel hop limit 60
inet6 2002:ac10:d551::1/64
|