Networking Forums

Networking Forums > Computer Networking > Linux Networking > Linux read (true i.e. burned in) MAC address

Reply
Thread Tools Display Modes

Linux read (true i.e. burned in) MAC address

 
 
jim
Guest
Posts: n/a

 
      03-02-2006, 02:22 PM
Hi,

I am trying to get the burned in MAC address of an NIC in linux, but I
cannot find an appropriate ioctl call. When I do an SIOCGIFHWADDR
ioctl, the result can be the actual MAC of the NIC, or a user supplied
NIC, if a user changed the MAC address (the one seen by ifconfig).

Presumably both a user supplied and the manufacturer supplied addresses
must be accesible from the NIC driver.

How can I get the address burned in the NIC by the manufacturer,
assuming that the MAC addr reported by ifconfig is unreliable i.e. it
has been changed by a user ?

 
Reply With Quote
 
 
 
 
Postmaster
Guest
Posts: n/a

 
      03-02-2006, 03:55 PM

"jim" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) oups.com...
> Hi,
>
> I am trying to get the burned in MAC address of an NIC in linux, but I
> cannot find an appropriate ioctl call. When I do an SIOCGIFHWADDR
> ioctl, the result can be the actual MAC of the NIC, or a user supplied
> NIC, if a user changed the MAC address (the one seen by ifconfig).
>
> Presumably both a user supplied and the manufacturer supplied addresses
> must be accesible from the NIC driver.
>
> How can I get the address burned in the NIC by the manufacturer,
> assuming that the MAC addr reported by ifconfig is unreliable i.e. it
> has been changed by a user ?
>


Jim,

And if you succeed, what do you do with a VPN, or a
virtual machine, that are creating virtual MAC addresses ?

Enjoy
Postmaster


 
Reply With Quote
 
Tauno Voipio
Guest
Posts: n/a

 
      03-02-2006, 08:25 PM
jim wrote:
> Hi,
>
> I am trying to get the burned in MAC address of an NIC in linux, but I
> cannot find an appropriate ioctl call. When I do an SIOCGIFHWADDR
> ioctl, the result can be the actual MAC of the NIC, or a user supplied
> NIC, if a user changed the MAC address (the one seen by ifconfig).
>
> Presumably both a user supplied and the manufacturer supplied addresses
> must be accesible from the NIC driver.
>
> How can I get the address burned in the NIC by the manufacturer,
> assuming that the MAC addr reported by ifconfig is unreliable i.e. it
> has been changed by a user ?



Would you please tell why?

For networking purposes, it should play no role
where the MAC in use comes from.

--

Tauno Voipio
tauno voipio (at) iki fi
 
Reply With Quote
 
David Schwartz
Guest
Posts: n/a

 
      03-04-2006, 03:40 AM

"jim" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) oups.com...

> I am trying to get the burned in MAC address of an NIC in linux, but I
> cannot find an appropriate ioctl call. When I do an SIOCGIFHWADDR
> ioctl, the result can be the actual MAC of the NIC, or a user supplied
> NIC, if a user changed the MAC address (the one seen by ifconfig).
>
> Presumably both a user supplied and the manufacturer supplied addresses
> must be accesible from the NIC driver.
>
> How can I get the address burned in the NIC by the manufacturer,
> assuming that the MAC addr reported by ifconfig is unreliable i.e. it
> has been changed by a user ?


Why do you think you need the burned-in NIC address? Odds are you are
doing something very wrong if you think you need this.

DS


 
Reply With Quote
 
jim
Guest
Posts: n/a

 
      03-09-2006, 10:03 AM

Ο/Η David Schwartz Î*γÏ?αψε:
> "jim" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed) oups.com...
>
> > I am trying to get the burned in MAC address of an NIC in linux, but I
> > cannot find an appropriate ioctl call. When I do an SIOCGIFHWADDR
> > ioctl, the result can be the actual MAC of the NIC, or a user supplied
> > NIC, if a user changed the MAC address (the one seen by ifconfig).
> >
> > Presumably both a user supplied and the manufacturer supplied addresses
> > must be accesible from the NIC driver.
> >
> > How can I get the address burned in the NIC by the manufacturer,
> > assuming that the MAC addr reported by ifconfig is unreliable i.e. it
> > has been changed by a user ?

>
> Why do you think you need the burned-in NIC address? Odds are you are
> doing something very wrong if you think you need this.
>
> DS


Hi, this reply applies to the other messages as well. There seems to be
an issue as to why would I need the actual MAC address, and why I
shouldn't actually need it. I'd like to thank everybody for taking the
time to answer to my question. However should all the above objections
be taken under consideration, how would you go about obtaining this
address ?

 
Reply With Quote
 
Tauno Voipio
Guest
Posts: n/a

 
      03-09-2006, 06:58 PM
jim wrote:
> Ο/Η David Schwartz Î*γÏ?αψε:
>
>>"jim" <(E-Mail Removed)> wrote in message
>>news:(E-Mail Removed) groups.com...
>>
>>
>>>I am trying to get the burned in MAC address of an NIC in linux, but I
>>>cannot find an appropriate ioctl call. When I do an SIOCGIFHWADDR
>>>ioctl, the result can be the actual MAC of the NIC, or a user supplied
>>>NIC, if a user changed the MAC address (the one seen by ifconfig).
>>>
>>>Presumably both a user supplied and the manufacturer supplied addresses
>>>must be accesible from the NIC driver.
>>>
>>>How can I get the address burned in the NIC by the manufacturer,
>>>assuming that the MAC addr reported by ifconfig is unreliable i.e. it
>>>has been changed by a user ?

>>
>> Why do you think you need the burned-in NIC address? Odds are you are
>>doing something very wrong if you think you need this.
>>
>> DS

>
>
> Hi, this reply applies to the other messages as well. There seems to be
> an issue as to why would I need the actual MAC address, and why I
> shouldn't actually need it. I'd like to thank everybody for taking the
> time to answer to my question. However should all the above objections
> be taken under consideration, how would you go about obtaining this
> address ?


The 'why' is a key to the responses. Nobody seems to be
eager to help you before the correct answer.

(There is no simple response to the original question).

--

Tauno Voipio
tauno voipio (at) iki fi

 
Reply With Quote
 
Grant
Guest
Posts: n/a

 
      03-09-2006, 07:21 PM
On Thu, 09 Mar 2006 19:58:34 GMT, Tauno Voipio <(E-Mail Removed)> wrote:

>(There is no simple response to the original question).


Its nonsense anyway, modern NICs have an on-board EEPROM
(eg. 93C46) that may be written by software, the concept
on burned-in MAC goes back to fusible link PROM technology
(couple decades ago).

Any use of MAC for more than its intended purpose is stupid,
as it can be trivially circumvented.

Grant.
--
Cats are smarter than dogs. You can't make eight cats pull
a sled through the snow.
 
Reply With Quote
 
Tauno Voipio
Guest
Posts: n/a

 
      03-09-2006, 08:32 PM
Grant wrote:
> On Thu, 09 Mar 2006 19:58:34 GMT, Tauno Voipio <(E-Mail Removed)> wrote:
>
>
>>(There is no simple response to the original question).

>
>
> Its nonsense anyway, modern NICs have an on-board EEPROM
> (eg. 93C46) that may be written by software, the concept
> on burned-in MAC goes back to fusible link PROM technology
> (couple decades ago).
>
> Any use of MAC for more than its intended purpose is stupid,
> as it can be trivially circumvented.
>
> Grant.


That's right. The reading procedure is different
for different NIC chips (and sometimes also cards).

There's no need to support the misuse of the built-in
MAC address.

--

Tauno Voipio
tauno voipio (at) iki fi
 
Reply With Quote
 
Keith Keller
Guest
Posts: n/a

 
      03-09-2006, 08:57 PM
On 2006-03-09, jim <(E-Mail Removed)> wrote:
>
> ?/? David Schwartz ??????:
>>
>> Why do you think you need the burned-in NIC address? Odds are you are
>> doing something very wrong if you think you need this.

>
> Hi, this reply applies to the other messages as well. There seems to be
> an issue as to why would I need the actual MAC address, and why I
> shouldn't actually need it. I'd like to thank everybody for taking the
> time to answer to my question. However should all the above objections
> be taken under consideration, how would you go about obtaining this
> address ?


Crack open the case and look on the card, or for some newer cards, look
on the box or in the documentation.

How do you plan on taking the above objections into consideration? In
particular, how do you address David's comment that you're likely doing
something wrong to even need the MAC on the hardware?

--keith

--
kkeller-(E-Mail Removed)
(try just my userid to email me)
AOLSFAQ=http://wombat.san-francisco.ca.us/cgi-bin/fom
see X- headers for PGP signature information

 
Reply With Quote
 
noEMA
Guest
Posts: n/a

 
      03-10-2006, 01:52 AM
On Thu, 09 Mar 2006 03:03:41 -0800, jim wrote:

>
>
>> "jim" <(E-Mail Removed)> wrote in message
>> news:(E-Mail Removed) oups.com...
>>
>> > I am trying to get the burned in MAC address of an NIC in linux, but I
>> > cannot find an appropriate ioctl call. When I do an SIOCGIFHWADDR
>> > ioctl, the result can be the actual MAC of the NIC, or a user supplied
>> > NIC, if a user changed the MAC address (the one seen by ifconfig).
>> >
>> > Presumably both a user supplied and the manufacturer supplied
>> > addresses must be accesible from the NIC driver.
>> >
>> > How can I get the address burned in the NIC by the manufacturer,
>> > assuming that the MAC addr reported by ifconfig is unreliable i.e. it
>> > has been changed by a user ?

>>
>> Why do you think you need the burned-in NIC address? Odds are you
>> are
>> doing something very wrong if you think you need this.
>>
>> DS

>
> Hi, this reply applies to the other messages as well. There seems to be an
> issue as to why would I need the actual MAC address, and why I shouldn't
> actually need it. I'd like to thank everybody for taking the time to
> answer to my question. However should all the above objections be taken
> under consideration, how would you go about obtaining this address ?



Hello.

I do debug network from time to time and I can tell you it's invaluable to
be able to get the MAC address of a card. IP address can change in a blink
of an eye. MAC address less so.

Such a thing happened one on my network where careless adding of hosts on
the network actually took all the IP address my DHCP server was giving.

So Always record these !

Furthermore ARP request / reply on a local network enable you to find
newly connected host even if they are assigned a IP address range not
correct on your net.

ARPing also enable you to see if a host is on the net even if it's
configured with a firewall restricting ICPM.

Not the least of technical features of MAC address : These are composed
of two parts : The first part is the Manufacturer's code and the second
part is a sequential lot number. With the maker's code you can tell if
you're looking for a trouble some host like a weird unknown Apple box
on your pristine Dell network. I did found a contractor's doing mapping
of my network with that technique...



Crackers also like to mix these. Very useful for sniffing traffic in
a switched environment. Broadcast the default gateway MAC address on
the network to a different Ethernet card and guess where all packets
are not going to go !

So YES there are VERY valid and sound reasons to be keeping these close...

Now I use on

Windows NT/2K/XP : ipconfig /all

on Linux : /sbin/ifconfig | grep HWaddr | awk '{print $5}'


Well hope it help.

 
Reply With Quote
 
 
 
Reply

Thread Tools
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
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
The world sees my IP address (I read everything) Is there no bettersolution? JoeSchmoe Wireless Internet 28 09-20-2010 08:47 PM
A True Scientific Breakthrough That Makes It Possible To Fulfill Ones True Potential! Jeffrey Bruce Home Networking 0 06-16-2008 09:48 PM
linux c socket read html problem step Linux Networking 2 06-13-2007 11:59 AM
OSX NFS server, Linux client can't read mount jb_is_not@home.yet Linux Networking 0 09-04-2004 12:43 AM
How to read out my modem's MAC address ? Nice4 Wireless Internet 4 10-15-2003 03:23 PM



1 2 3 4 5 6 7 8 9 10 11