About this list Date view Thread view Subject view Author view Attachment view

From: Sam Vilain (sam_at_vilain.net)
Date: Thu 09 Dec 2004 - 09:05:37 GMT

Matt Nuzum wrote:
> Some NICs (all?) have the ability to set or change the MAC address, or
> at least somehow affect what their mac address appears to be.

That's right, some do. I've tried this on many chipsets and found
support varies even between boards based on the same chipset. But the
general rule is that most cards can do it.

This is how you set it:

   ifconfig eth0 hw ether 12:34:56:78:9a:bc

The interface can't be up at the time, or you'll get SIOCSIFHWADDR:
Device or resource busy. And boy, am I lucky that I've got a serial
console attached to the system whose root shell I just mistook for my
laptop's for testing.

In fact, with Debian you can set this in /etc/network/interfaces; other
distros probably have their little place for it too:

   iface eth0 inet dhcp
      hwaddress ether 12:34:56:78:9a:bc

> Also, there's the concept of network bridging, which I've never used
> in linux but know works in Windows and Open BSD. In Window, the newly
> created "Bridge" gets a mac address and dishes the data to the right
> network card some how.

With bridging, your host becomes a switching hub. It maintains an ARP
table remembering which hardware address can be reached on which

Then, when it sends packets out - it masquerades the hardware address
with the source address of the original packet. All bridging interfaces
run in promiscuous mode, and if packets are seen which are not known to
be on the same side as they originated, they are transmitted across the

There's a little bit more complexity to it than that, for when you've
got lots of switches, spanning protocols etc that I don't know a lot
about myself.

The bible in the area is Andrew S. Tanenbaum's _Computer Networks_, now
in its third edition.

Vserver mailing list

About this list Date view Thread view Subject view Author view Attachment view
[Next/Previous Months] [Main vserver Project Homepage] [Howto Subscribe/Unsubscribe] [Paul Sladen's vserver stuff]
Generated on Thu 09 Dec 2004 - 09:06:25 GMT by hypermail 2.1.3