how to get mac address of network interface on AIX OS

List all the network adapters present in AIX Operating System


#
# lsdev | grep ent
ent0       Available             Virtual I/O Ethernet Adapter (l-lan)
fcs0       Available C3-T0       Virtual Fibre Channel Client Adapter
fcs1       Available C4-T0       Virtual Fibre Channel Client Adapter
vscsi0     Available             Virtual SCSI Client Adapter

 

There are three main ways to get the MAC address of a network adapter in AIX:

1. netstat -v: This is the most common and recommended way to get the MAC address. It will display the MAC address for all your adapters.

netstat -v
# netstat -v | grep -i "Hardware Address"
Hardware Address: fa:78:e6:a4:69:20
#
#
 

 

2. lscfg -vl entX: This command will display the MAC address, along with other information about the network adapter, such as the device name, driver name, and bus type. Replace "entX" with the actual name of your network adapter.

lscfg -vl ent0
# 
# lscfg -vl ent0
ent0 U9080.HEX.1355C08-V5-C32-T0 Virtual I/O Ethernet Adapter (l-lan)

Network Address.............FA78E6A46920
Displayable Message.........Virtual I/O Ethernet Adapter (l-lan)
Hardware Location Code......U9080.HEX.1355C08-V5-C32-T0

#

 

3. entstat -d entX | grep -i hardware: This command will display the hardware address of the network adapter. Replace "entX" with the actual name of your network adapter.

entstat -d ent0 | grep -i hardware
# 
# entstat -d ent0 | grep -i hardware
Hardware Address: fa:78:e6:a4:69:20
#
#
 

Here are some additional points to keep in mind:

  • You may need to be root to run these commands.
  • The output of these commands will vary depending on the specific version of AIX you are using.
  • If you have multiple network adapters, you will need to run the command for each adapter to get its MAC address.

Post a Comment

0 Comments