How to bind a static ether address to bridge?

Stefan Bethke stb at
Sat Feb 26 22:10:14 UTC 2011

Am 25.02.2011 um 07:56 schrieb Zhihao Yuan:

> My server is behind a DHCP-enabled router, and it has two network
> interfaces, wlan0 and bge0. I want to use them together, so I bind
> them, plus tap0 to bridge0. But bridge has a random MAC address for
> each time it was created, which makes me hard to reserve an IP for it
> (since I need to forward some ports to this server). So I set
>, which makes bridge0 to use bge0's MAC
> address, always. But this causes another problem: the packets sent to
> bridge0 is also sent to bge0, -- the packets are duplicated! The
> kernel have to drop half of them. So how can I bind a distinct MAC
> address to a bridge?

This is in my router's rc.conf:
ifconfig_bridge0="ether 02:00:00:00:00:01 addm tap0 addm vlan1"

vlan1 is on em0; neither as an address assigned.

And if you want to put IPv6 on there, you also have to add a link-local address to make rtadvd happy, something like:
ipv6_network_interfaces="bridge0 gif0"
ipv6_ifconfig_bridge0_alias0="2001:470:1f0b:xxxx::1 prefixlen 64"

Stefan Bethke <stb at>   Fon +49 151 14070811

More information about the freebsd-stable mailing list