Quick script to get MAC addresses from all adapters.

Here is a quick script to get all the MAC addresses on an AIX LPAR.

for i in `lsdev -Ccadapter|grep ent|awk '{print $1}'`
do
echo "MAC address for $i is `netstat -v | grep -p $i | grep Hardware`"
done

This will give a MAC address where it is applicable.

Published
Categorized as AIX, FAQs

By troyski

I'm a freelance UNIX engineer working in the UK. I'm married to Tina and between us we have six children. I'm a bit of an Apple fan boy, and all the Windows machines in the house are a thing of the past now.

This site uses Akismet to reduce spam. Learn how your comment data is processed.