Fedora Linux Support Community & Resources Center
  #1  
Old 23rd October 2007, 06:37 PM
philp Offline
Registered User
 
Join Date: Aug 2006
Posts: 21
MAC address directly from network card

Hi
I would very much like to obtain the raw MAC address directly from the network card. I know the MAC address can be changed on Fedora, but I would like to read the MAC address directly from the ethernet card. It obviously does this at boot time, but is it at all possible to read it at run-time. I was trying to use the MAC address as a form of restriction to stop programs from being run on more then the one PC, but then I found out the MAC address can easily be changed and so it could easily be defeated. Is it possible to access the MAC address directly from the ethernet card?

Thanks
Phil
Reply With Quote
  #2  
Old 23rd October 2007, 08:27 PM
stevea Offline
Registered User
 
Join Date: Apr 2006
Location: Ohio, USA
Posts: 8,553
Typically the interface hardware gets the original MAC from a
tiny eeprom, and often the sofware can read (and with difficulty
wrte) the eeprom. It;s also possible to change the MAC from
the driver software like ...
Quote:
ip link set dev eth0 address 42:42:42:42:42:42

The original remains in the eeprom, but at no regular location.
This one has the original MAC at offset 0, but it's chipset
dependent. [00 0d 60 fd 8c 77].

Quote:
[root@nidula ~]# ethtool -e eth0
Offset Values
------ ------
0x0000 00 0d 60 fd 8c 77 00 0b ff ff ff ff ff ff ff ff
0x0010 00 00 00 00 0b 66 49 05 14 10 1e 10 86 80 a5 b1
0x0020 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
0x0030 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
0x0040 cf 00 61 78 0b 14 00 00 c8 04 ff ff ff ff ff ff
0x0050 ff ff ff ff ff ff ff ff ff ff ff ff ff ff 02 06
0x0060 2c 01 00 40 11 12 ff ff ff ff ff ff ff ff ff ff
0x0070 ff ff ff ff ff ff ff ff ff ff ff ff ff ff 05 c0
Reply With Quote
  #3  
Old 24th October 2007, 09:35 AM
philp Offline
Registered User
 
Join Date: Aug 2006
Posts: 21
Thanks for that. It's what I half expected. So I presume that the ethernets device driver reads the MAC address from a device specific location on the card and somehow passes that to the kernel which then stores it away somewhere. There is no means (ioctl or whatever) of interfacing directly to the device driver to read the eeprom (I appreciate that even then it can be defeated by modifying the eeprom, but I'm hoping that would be more difficult then simply using the ip command)?

Thanks for your help
Phil
Reply With Quote
Reply

Tags
address, card, directly, mac, network

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Nautilus can not access samba shares when network card uses static IP address coldspring Servers & Networking 2 25th January 2009 01:33 AM
Unable to rename network card by mac address, longlasting bug cuban_cigar Using Fedora 1 11th October 2008 12:29 AM
network card MAC address philp Servers & Networking 3 26th August 2008 06:20 PM
Network card insists on taking ip address that I didn't give it VinceDee Servers & Networking 1 23rd February 2007 10:04 PM
Comp not taking IP Address directly prashant Servers & Networking 3 11th January 2005 05:28 PM


Current GMT-time: 13:36 (Thursday, 24-04-2014)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat