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 19:32 Where to Put Ethernet MAC Addresses? Kent Borg
@ 2003-10-01 19:44 ` Gary Thomas
  2003-10-01 19:48 ` Bret Indrelee
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 9+ messages in thread
From: Gary Thomas @ 2003-10-01 19:44 UTC (permalink / raw)
  To: Kent Borg; +Cc: linuxppc embedded


On Wed, 2003-10-01 at 13:32, Kent Borg wrote:
> 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?

Most embedded devices will handle this in the boot ROM.  When Linux
is booted, the hardware address can be passed in along with other
platform information like amount of memory installed, etc.

--
Gary Thomas <gary@mlbassoc.com>
MLB Associates


** 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 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
  3 siblings, 0 replies; 9+ messages in thread
From: Bret Indrelee @ 2003-10-01 19:48 UTC (permalink / raw)
  To: Kent Borg; +Cc: linuxppc-embedded


On Wed, 1 Oct 2003, Kent Borg wrote:
> 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?

Serial PROM.

Check if the ethernet part allows reading the MAC directly from
a small serial PROM. Many board manufacturers have processes for
programming serial proms for this type of thing.

Otherwise, just have the processor read the serial PROM and program
it into the ethernet MAC.

-Bret

--
Bret Indrelee                 QLogic Corporation
Bret.Indrelee@qlogic.com      6321 Bury Drive, St 13, Eden Prairie, MN 55346


** 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 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
  3 siblings, 0 replies; 9+ messages in thread
From: Dan Malek @ 2003-10-01 20:27 UTC (permalink / raw)
  To: Kent Borg; +Cc: linuxppc-embedded


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-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-01 20:43 Howard, Marc
@ 2003-10-01 21:12 ` Kent Borg
  0 siblings, 0 replies; 9+ messages in thread
From: Kent Borg @ 2003-10-01 21:12 UTC (permalink / raw)
  To: Howard, Marc; +Cc: linuxppc-embedded


On Wed, Oct 01, 2003 at 01:43:43PM -0700, Howard, Marc wrote:
> 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.

I kinda like that outlaw approach, it fits in with one of my pet
notions: why must ethernet hardware be issued strictly unique MAC
addresses?  It is important that a given MAC address be unique on a
single network, but once a packet hits a router, it is OK to have a
duplicate on the next network, right?  (OK, maybe the router keeps a
single ARP table for all its directly connected networks and the
collision risk is one ply larger.)  If decent random numbers are
available (as they can be with Linux), why not adopt a random MAC
address?  Notwithstanding the "birthday paradox", 48 bits (or is it
effectively 47?) is still a whopping *big* space.  Given a decently
chosen random MAC address, how big does a network of random MAC
addresses have to be for the chance of a collision to be at all
dangerous?


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-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

* Re: Where to Put Ethernet MAC Addresses?
  2003-10-01 19:32 Where to Put Ethernet MAC Addresses? Kent Borg
                   ` (2 preceding siblings ...)
  2003-10-01 20:27 ` Dan Malek
@ 2003-10-03 13:33 ` Kent Borg
  3 siblings, 0 replies; 9+ messages in thread
From: Kent Borg @ 2003-10-03 13:33 UTC (permalink / raw)
  To: linuxppc-embedded


On Wed, Oct 01, 2003 at 03:32:09PM -0400, Kent Borg wrote:
> What are the various right ways to do this?

Thanks for the various answers.


-kb, the Kent who will be putting MAC adress setting off onto the boot
ROM.

** 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).