Monday, 20 May 2013

Detecting Physical Network Addresses Reliably

Detecting Physical Network Addresses Reliably

I'm trying to find a way to list physical (aka MAC) addresses for all network cards/interfaces attached to a certain host. The problem is, I want this functionality on my Debian live (squeeze) USB image which is plugged into many different boxes with widely diverse hardware. So the wireless driver (for example) isn't always available on my USB stick, and thus I can't obtain the physical address from ifconfig.
I was under the impression that I could achieve this by querying /sys/class/net/*/address where * is the interface name in question. But this is not the case. I think there should be a way of querying the hardware for the physical address even if the device driver is not installed.
So my questions are:
Is it actually possible to query the physical address of a network device even if its device driver isn't installed?
If it's possible, how?

No comments:

Post a Comment