Question: I need to read permanent (burned-in) MAC address of network adapter. Since MAC address can be easily spoofed, I need to read the real one which is written on EEPROM. I need to do it using C++ on Linux.

I tried using [ethtool](http://linux.die.net/man/8/ethtool) which is quite good and works fine. However on some systems it does not work as intented.

```
ethtool -P eth0

```

returns this:

```
Permanent address: 00:00:00:00:00:00

```

and

```
ethtool -e eth0

```

returns this:

```
Cannot get EEPROM data: Operation not supported

```

---

Network Adapter has following info:

* driver: ucc\_geth
* version: 1.1
* firmware-version: N/A
* bus-info: QUICC ENGINE

Linux kernel version is: 2.6.32.13

Question is: Can i fix this issue with any update(driver, kernel etc)?

Additionally, I make the same ethtool calls with `ioctl` function in C++. Is there any way to fix this inside the code? Or is there any other way to get the permanent MAC address from EEPROM?

Answer: 
If you haven't find the answer yet, you might want to check this out.

<https://serverfault.com/questions/316976/can-i-get-the-original-mac-address-after-it-has-been-changed>
Take a look at a couple of things.

1. Look at packets on the wire (using a sniffer) emanating from this NIC and see the MAC address being used.
2. Look at the output of "ifconfig -a eth0". If the MAC address is the same as on the wire, then you can get that MAC address using the [mechanism that ifconfig uses](http://sourceforge.net/p/net-tools/code/ci/master/tree/ifconfig.c).