[Bridge] bridge interface mac address

Stephen Hemminger shemminger at linux-foundation.org
Wed Sep 8 09:23:22 PDT 2010


On Wed, 08 Sep 2010 12:28:00 +0200
x at muc.ccc.de wrote:

> hi!
> 
> i'm using dynamips (router/switch emulator) and would like to have an interface on the host as a link to the 'emulated lab'. with dynamips, one of the host's interfaces can be used to connect to a port of the 'emulated lab'. dynamips obviously injects its packets into this interface, and sniffs for packets directed towards the 'emulated lab'.
> 
> now i just have a single physical interface on the host. and i don't want the lab-traffic to pass thru the physical interface (and productive segment connected to it).
> so i thought hey, let's be clever, just create a bridge. we don't need any bridge-members (yet), we just want to use it for the dynamips link for now.
> 
> after a brctl addbr, i get a bridge-interface - with a mac of 00:00:00:00:00:00.
> tried it anyway: it doesn't work (i see arp-requests from the host, i see arp-replies to the host - which the host obviously simply ignores, most probably because of the all-zero-mac).
> turns out it's also not possible to change the mac - not even to a locally administered mac.

A bridge with no attached ports is not really a bridge, just a ghost.

> is there a special way to set the bridge's mac? actually i find it quite irritating that it's not simply possible to change it just like with any other interface!?

The bridge inherits the mac of the first attached interface.
On recent kernels, it can also be set with the usual network tools (ip link, ifconfig, ...). If you are running some kernel older than 2.6.27 please
use something more recent.


> also i think it might not be wise to treat 00:00:00:00:00:00 special, filter it, or similar (after all it's a valid global unicast mac - assigned to xerox...).

All zero's is not a legal address in current 802. standards. It shows up
when devices are broken. It is supposed to be dropped.


More information about the Bridge mailing list