Subject: Re: changing MAC addresses
To: Perry E. Metzger <perry@piermont.com>
From: Jonathan Stone <jonathan@DSG.Stanford.EDU>
List: tech-net
Date: 11/24/1998 15:50:44
Yes, its mandated by the original blue-book DIX spec. It dates back
to XNS, routing at the Ethernet layer, and the school that says all
hosts should have one network address: if you have multiple MACs you
reprogram them so that they all have the *same* MAC address.
Some protcols (phase IV decnet) still require setting all NICs on a
host to use one MAC address, computed from the layer-3 node address.
(which is why SunOS/Solaris acquired the feature in the first place.)
>In that case, someone should add the capability to our ifconfig. It
>would be of great use.
Yes. I'd guess most of the work is updating the drivers to change the
MAC address? We also need the kernel to send a gratuitous ARP after a
MAC-address change.
SunOS just used SIOSIFADDR with AF_UNSPEC to set and get raw MAC
addresses. However we do it, it'd be nice to be able to retrieve the
in-ROM (or `hardware') address after setting the physical address, in
case you ever want to set it back to the hardware, address. (those
are the DIX names; dunno what 802 uses.) That means another
ether_addr in the struct used for ethernet macs, and another ioctl
type (or overloading the DLI stuff, maybe?).
Itd be nice to collect the arp-state logic in one place in
if_ethersubr, but that may not fit well with having to call chip-level
reset functions, after changing the physical address, but before
sending the new ARP. I think SunOS managed it, though...