LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 01-27-2009, 10:47 AM   #1
pgb205
Member
 
Registered: Nov 2007
Posts: 129

Rep: Reputation: 15
ifconfig and dmesg| grep eth report different mac


like the headline states I have several different nics on the system and would like to figure out the mac address for each so:
ifconfig eth0 gives me the mac for interface 0.
But when i do dmesg| grep -i eth0 I get a different mac address reported for the interface. So basically I'm getting inconsistent information.
Which output should I trust or do I need to take extra steps to make sure.

thanks
 
Old 01-27-2009, 04:52 PM   #2
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-14.2.1.2 on Lenovo Thinkpad W520
Posts: 9,173

Rep: Reputation: Disabled
The mac address identify a physical device, not an interface. Interface names can change: though they be usually allocated by the kernel at start up in the order it discovers the devices, you can change it through udev rules, for exemple to make sure you keep the same interface name for the same device.

Here is an example:
Code:
bash-3.1# dmesg|grep eth0
eth0: RealTek RTL8139 at 0xa000, 00:02:3f:07:a4:a5, IRQ 11
eth0:  Identified 8139 chip type 'RTL-8101'
bash-3.1#
I now that my ethernet card has the mac address 00:02:3f:07:a4:a5. It could be associated later to another interface name that eth0, this doesn't matter.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Top and Dmesg don't report the correct amount of RAM BigEdgar Linux - Hardware 4 11-24-2008 01:31 PM
ifconfig donot report the promiscous mode when ethereal is running nkd Linux - Security 3 07-29-2008 04:29 PM
redhat 4.0, ifconfig eth? down not working randyding Linux - Hardware 1 05-29-2006 02:50 AM
ifcfg-eth-id MAC address cloning RDR SUSE / openSUSE 2 03-07-2006 10:30 AM
ifconfig doesn't show any eth devices rech Slackware 6 10-18-2003 08:04 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 02:20 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration