Subject: Re: 1.0 ethernet weirdness
To: None <mouse@Collatz.McRCIM.McGill.EDU>
From: Drew Dean <ddean@CS.Princeton.EDU>
List: port-sparc
Date: 04/20/1995 12:29:29
From: der Mouse <mouse@Collatz.McRCIM.McGill.EDU>
Subject: 1.0 ethernet weirdness
Date: Thu, 20 Apr 1995 10:21:30 -0400

> I recently installed a second ethernet on the sbus of the SPARC I've
> been playing with NetBSD on.  At boot time the kernel reports, in part,
> 
> le0 at sbus0 slot 0 offset 0xc00000 pri 5: hardware address 08:00:20:10:44:eb
> le1 at sbus0 slot 1 offset 0xc00000 pri 5: hardware address 08:00:20:10:44:eb
> 
> This looks fishy to me.  I thought that every ethernet interface by
> definition had its own distinctive hardware address, different from
> that of any other ethernet interface in existence.
> 
> 3) The card allows software to set its "hardware" address.  There are
>     two subcases:

Case (3) is certainly the right one, although I'm not exactly sure
which subcase is used.  If you read the Ethernet spec really carefully
(this is a very-little known feature), you'll find that Ethernet
addresses only have to be _host_ unique, thus explicitly allowing a
multi-homed host to give all its interfaces the same MAC address.  On
PCs, since Ethernet interfaces (until very recently) are options, it's
easiest to put the (default) MAC address in a ROM on the board, and so
each board has a unique address (I probably shouldn't pick on PCs;
back in the old days when Ethernet boards cost thousands of dollars
apiece for any machine, they were optional, and so this made sense.
Of course, Ethernet hasn't been an option on a Sun for a long time [if
ever; I don't know if Sun-1s had Ethernet standard or not]).  It also
turns out that DECnet changes the Ethernet address as some function of
the node address (again, I don't know the details).  So supporting
DECnet requires that your Ethernet interface allow its address to be
software configurable.  This ends up meaning that most Ethernet
interfaces support software settable addresses, although most users
just (implicitly) pull the default address out of some piece of
non-volatile memory (ROM, EPROM, EEPROM, NVRAM, whatever), set the
interface to that, and never change it.

Note that giving multiple interfaces on the same wire the same address
probably won't work too well. :-)  I'm not sure that this case was
ever considered, because (in a way) it really doesn't make that much
sense, unless you're trying to run multiple protocol stacks that
can't share an interface, which is arguably a software problem.

Anyways, NetBSD is doing what it's supposed to be doing; this is the
way Suns work under SunOS, too.  (I haven't checked Solaris 2.x, but I
didn't see anything that looked like an address ROM on the last SBus
Ethernet card I saw.)

Drew Dean
<ddean@cs.princeton.edu>