LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 02-26-2009, 11:05 AM   #1
li-nux-user
LQ Newbie
 
Registered: Jan 2009
Posts: 5

Rep: Reputation: 0
How to detect the TRUE MAC address ?


How can I detect the hardware MAC address of my NIC ?

I know, I can see it using "ifconfig", however how can I make sure the program shows me the true hardware MAC address assigned to the NIC by its manufacturer ?

In other words: Does "ifconfig" REALLY always refer to the hardware ?

Where can I find a confirmation of this ?

I am asking, because MAC address can also be stored somewhere in the system, ex. in ifcfg-eth0 file, and "ifconfig" may return any address, and not the value from NIC.
 
Old 02-26-2009, 11:20 AM   #2
osdeals
Member
 
Registered: Jul 2006
Distribution: RHEL, CentOS, PuppyLinux, SuSe, Ubuntu, Debian
Posts: 59

Rep: Reputation: 15
Not a completely foolproof solution, but if you know the manufacturer of the network card, take a look at the mac, and check it at http://www.coffer.com/mac_find/ , or at http://standards.ieee.org/regauth/oui/index.shtml . If the manufacturer matches, the probability that you're seeing the right mac is a lot higher.
 
Old 03-01-2009, 02:48 AM   #3
Valery Reznic
ELF Statifier author
 
Registered: Oct 2007
Posts: 676

Rep: Reputation: 137Reputation: 137
Quote:
Originally Posted by li-nux-user View Post
How can I detect the hardware MAC address of my NIC ?

I know, I can see it using "ifconfig", however how can I make sure the program shows me the true hardware MAC address assigned to the NIC by its manufacturer ?

In other words: Does "ifconfig" REALLY always refer to the hardware ?

Where can I find a confirmation of this ?

I am asking, because MAC address can also be stored somewhere in the system, ex. in ifcfg-eth0 file, and "ifconfig" may return any address, and not the value from NIC.
ifconfig not used ifcfg-eth0 to get info.

You can run ifconfig under strace
Code:
strace -e open /sbin/ifconfig eth0
to see by yourself what files are accessed
 
Old 03-01-2009, 03:57 AM   #4
JulianTosh
Member
 
Registered: Sep 2007
Location: Las Vegas, NV
Distribution: Fedora / CentOS
Posts: 674
Blog Entries: 3

Rep: Reputation: 90
thanks for that nifty tool!
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Single DHCP server ,to provide the ip address to a MAC address in two different subne alix123 Linux - Software 5 05-08-2007 11:16 PM
detect mac address spoofing bensky Linux - Security 1 03-13-2005 12:23 AM
how to get ip address, broadcast address, mac address of a machine sumeshstar Programming 2 03-12-2005 04:33 AM
changed mac address, now FC3 can't detect it lumba1 Linux - General 2 03-05-2005 05:14 AM
Detect my true CPU rating (NOT the current speed) qwijibow Linux - Hardware 5 11-16-2004 08:53 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 04:16 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration