Identifying an ethernet (MAC) address in Solaris
In a nutshell, running
ifconfig -a as non-root leaves out the MAC address. But using
prtpicl provides the necessary information - go figure!
arp -a and search your own hostname, or for a shorter method:
$ arp `hostname` | cut -d' ' -f4
Note: This does not show any unconfigured NICs.
You could try
netstat -pn | grep SP. Again this provides the MAC address but also does not show unconfigured cards.
prtpicl -c network -v will provide the MAC address. The
:local-mac-address fields will give you what you need. It also provides the MAC addresses for any disabled interfaces.
Solaris 11 *update*
Solaris 11 introduced
dladm which is a very useful command that you can use for checking and setting all data links.
So if we wish to find the ethernet (MAC) addresses of all network interfaces on your Solaris box, we would simply issue the
dladm command with the -m option to get the list of factory MAC addresses, their slot identifiers and their availability. For example:
$ dladm show-phys -m LINK SLOT ADDRESS INUSE CLIENT net0 primary 8:0:27:4:7c:5e yes net0
According to the Oracle Solaris documentation, using
dladm show-linkprop -p mac-address is the definitive answer in Solaris 11.