In Oracle Solaris 11, there is no single command that replaces the information that is displayed in the output of the ifconfig –a command. However, in most cases, using the ipadm command without any options provides very similar information.
To determine which command to use as a replacement for the ifconfig command, refer to the following information:
Use the ipadm command without any options to display basic information about a system's interfaces:
# ipadm NAME CLASS/TYPE STATE UNDER ADDR lo0 loopback ok -- -- lo0/v4 static ok -- 127.0.0.1/8 lo0/v6 static ok -- ::1/128 net0 ip ok -- -- net0/v4 dhcp ok -- 10.134.64.65/24 net0/v6 addrconf ok -- fe80::214:4fff:fefb:bbf0/10
For MAC address information, use the dladm command with the following options:
# dladm show-linkprop -p mac-address -o link,effective
Display detailed IP interface state or property information as follows:
# ipadm show-if -o ifname,class,state,current,over # ipadm show-ifprop -o ifname,property,proto,current
Display detailed IP address state or property information as follows:
# ipadm show-addr -o addrobj,type,state,current,addr # ipadm show-addrprop -o addrobj,property,current
Display IP tunnel configuration details as follows:
# dladm show-iptun
The following are situations in which you might still opt to use the ifconfig command:
To display the logical interface number for any given address or a link index number. The ipadm does not display this information and some applications still use these numbers.
As a diagnostic tool, the ifconfig command can provide additional information that you might not be able to obtain by using the dladm and ipadm commands.
The following two examples compare differences between the output of the ifconfig and the output of the ipadm command when used to obtain similar information about a system's datalink (net0).
# ifconfig net0 net0: flags=100001000942<BROADCAST,RUNNING,PROMISC,MULTICAST,IPv4,PHYSRUNNING> mtu 1500 index 4 inet 0.0.0.0 netmask 0 ether 0:d0:b7:b9:a5:8c # ifconfig net0 inet6 net0: flags=120002000940<RUNNING,PROMISC,MULTICAST,IPv6,PHYSRUNNING> mtu 1500 index 4 inet6 ::/10
# ipadm show-if -o ifname,class,state,current,over net0 IFNAME CLASS STATE CURRENT OVER net0 ip down bm46-------- -- sekon# ipadm show-ifprop -o ifname,property,proto,current net0 IFNAME PROPERTY PROTO CURRENT net0 arp ipv4 on net0 forwarding ipv4 off net0 metric ipv4 0 net0 mtu ipv4 1500 net0 exchange_routes ipv4 on net0 usesrc ipv4 none net0 forwarding ipv6 off net0 metric ipv6 0 net0 mtu ipv6 1500 net0 nud ipv6 on net0 exchange_routes ipv6 on net0 usesrc ipv6 none net0 group ip -- net0 standby ip off