[nSLUG] Re: MAC-address/router question

Dop Ganger nslug at fop.ns.ca
Fri Dec 9 06:41:49 AST 2005

On Fri, 9 Dec 2005, Mike Spencer wrote:

>> SunOS/Solaris and Linux can assign any MAC to any network device.
> What would I read to learn about this?  About how this is done?

man ifconfig

ifconfig eth? hw ether new:mac:address

It's particularly handy for situations like when you're using a provider 
that keys off your MAC address for DHCP, and you switch hardware platform 
to one that doesn't support the NIC you were using.

Note that not all NICs support changing the MAC address.

> Either I'm only partially getting this or I know something that ain't
> so.  If a device comes out of the box with a MAC address printed on
> it, I infer that it's coded in the hardware. As well, I infer from
> /etc/rc.d/rc.wireless.conf that some bits of the MAC address identify
> the mfgr/vendor which in turn implies a hard-coded value.  Do you mean
> by "assign any MAC", creating a virtual or spoofed MAC address known
> to the OS and mapped by the OS onto the "real", hard-coded MAC?  I
> don't quite see how that would work.

Every manufacturer is given a block of address space to allocate MAC 
addresses out of by the IEEE (see 
http://standards.ieee.org/regauth/oui/index.shtml). Each NIC is then 
supposed to have a unique MAC address in order to avoid collisions 
(although I occasionally hear of batches of cards that escape with the 
same MAC address). Once the consumer has the device, however, there is no 
reason they can't be allowed to set their own MAC if they have their own 
reasons (eg, replacing a NIC in a device that has something hard coded on 
their network for that MAC address). As I noted, not all cards support 
this, though cards that don't are pretty few and far between these days.

> Well, I think my question is answered, regardless of the matter of
> changing a MAC. Separate functions/modalities of the router have
> separate hardware devices and thus separate MAC addresses.

Yes; there's (at least) two NICs; one for the external interface, and one 
for the internal interface. I would imagine there may be a third, if 
there's a dedicated NIC for the internal wired interface and another one 
for the internal wireless interface, but it depends on the internal switch 
and/or bridge architecture on the device.

Cheers... Dop.


More information about the nSLUG mailing list