linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* Where to Put Ethernet MAC Addresses?
@ 2003-10-01 19:32 Kent Borg
  2003-10-01 19:44 ` Gary Thomas
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: Kent Borg @ 2003-10-01 19:32 UTC (permalink / raw)
  To: linuxppc-embedded


In boards where there is ethernet but no manufacturered in MAC address
in the ethernet hardware, where does one get it?  Does this become a
userland problem to be handled in init scripts?  It seems that
ethernet initialization could also set the "manufacturer" MAC address,
and it might be stored in flash next to the Linux image, or in some
extra SPD bits, etc.

What are the various right ways to do this?


Thanks,


-kb

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 9+ messages in thread
* RE: Where to Put Ethernet MAC Addresses?
@ 2003-10-01 20:43 Howard, Marc
  2003-10-01 21:12 ` Kent Borg
  0 siblings, 1 reply; 9+ messages in thread
From: Howard, Marc @ 2003-10-01 20:43 UTC (permalink / raw)
  To: 'Dan Malek', Kent Borg; +Cc: linuxppc-embedded


I personally favor the "roll your own MAC address from the serial number"
approach but it does have the drawback that you must have unique serial #'s
on the boards.  If the serial numbers are entered (or not entered) by lazy
humans you could potentially have two devices with the same MAC address on a
network.  I also select as the first 3 bytes of the MAC address the address
assigned to a defunct company and the lower 3 bytes derived from the serial
number.

Another approach is to use a Dallas Semiconductor (now Maxim) 1-wire
interface part.  They all have unique 48 bit addresses lasered in them to
support the 1 wire protocol.  If you use one of their parts as a RTC or
temperature sensor or whatever you can get a unique MAC address for free.
On the other hand that 1 wire protocol is a pain in a running real-time
system if you're driving it from software and a GPIO pin.

Marc W. Howard

-----Original Message-----
From: Dan Malek [mailto:dan@embeddededge.com]
Sent: Wednesday, October 01, 2003 1:27 PM
To: Kent Borg
Cc: linuxppc-embedded@lists.linuxppc.org
Subject: Re: Where to Put Ethernet MAC Addresses?



Kent Borg wrote:

> What are the various right ways to do this?

As Gary mentioned, most are handled in some way by the boot rom.
Many people put them in the boot rom flash (or rom if anyone uses
that anymore), and on PowerPC we use the first level linux bootloader
to recover this information and create some form of data record
that is passed to the kernel driver for further initialization
if necessary.

User 'init' scripts are usually too late, especially if you want
to use tftp in the rom for debug, or dhcp discovery.

There isn't any standard way, sometimes in flash, sometimes in
serial EEPROM along with other data.  Sometimes the mac address
is derived from the serial number.  It all depends upon what you
have available and how you may want to upgrade programmable devices
with new software in the field (you normally don't want to be erasing
mac addresses or serial numbers or such information as part of
programming new boot rom code).


	-- Dan


** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 9+ messages in thread
* RE: Where to Put Ethernet MAC Addresses?
@ 2003-10-02  7:18 ARIBAUD Albert
  0 siblings, 0 replies; 9+ messages in thread
From: ARIBAUD Albert @ 2003-10-02  7:18 UTC (permalink / raw)
  To: linuxppc-embedded


> -----Message d'origine-----
> De : owner-linuxppc-embedded@lists.linuxppc.org
> [mailto:owner-linuxppc-embedded@lists.linuxppc.org]De la part
> de Howard,
> Marc
> Envoyé : mercredi 1 octobre 2003 22:44
> À : 'Dan Malek'; Kent Borg
> Cc : linuxppc-embedded@lists.linuxppc.org
> Objet : RE: Where to Put Ethernet MAC Addresses?
>
>
>
> I personally favor the "roll your own MAC address from the
> serial number" approach but it does have the drawback that
> you must have unique serial #'s on the boards.  If the serial
> numbers are entered (or not entered) by lazy humans you could
> potentially have two devices with the same MAC address on a
> network.  I also select as the first 3 bytes of the MAC
> address the address assigned to a defunct company and the lower
> 3 bytes derived from the serial number.

There is a range of MAC adresses for local use (inside an appliance
or even inside a vehicle would be the case). That's what I use for
in-lab development on custom MPC855T boards.

See for instance <http://www.centsoft.com/mac.htm>.

If you don't mass-produce, using the current time for a seed might
work. :)

HTH
--
Albert.

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 9+ messages in thread
* RE: Where to Put Ethernet MAC Addresses?
@ 2003-10-02 13:36 ARIBAUD Albert
  0 siblings, 0 replies; 9+ messages in thread
From: ARIBAUD Albert @ 2003-10-02 13:36 UTC (permalink / raw)
  To: Linuxppc-Embedded (E-mail)


> > See for instance <http://www.centsoft.com/mac.htm>.

That's what URL-retyping does, I guess. :)

It was <http://www.certsoft.com/mac.htm>.

Sorry, and thanks to Gary and Stephane for pointing this out.

Albert.

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2003-10-03 13:33 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-10-01 19:32 Where to Put Ethernet MAC Addresses? Kent Borg
2003-10-01 19:44 ` Gary Thomas
2003-10-01 19:48 ` Bret Indrelee
2003-10-01 20:27 ` Dan Malek
2003-10-03 13:33 ` Kent Borg
  -- strict thread matches above, loose matches on Subject: below --
2003-10-01 20:43 Howard, Marc
2003-10-01 21:12 ` Kent Borg
2003-10-02  7:18 ARIBAUD Albert
2003-10-02 13:36 ARIBAUD Albert

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).