From owner-freebsd-stable@FreeBSD.ORG Sat Feb 26 22:10:14 2011 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1010A10656AB for ; Sat, 26 Feb 2011 22:10:13 +0000 (UTC) (envelope-from stb@lassitu.de) Received: from gilb.zs64.net (gilb.zs64.net [IPv6:2001:470:1f0b:105e::1ea]) by mx1.freebsd.org (Postfix) with ESMTP id 3CF358FC14 for ; Sat, 26 Feb 2011 22:10:08 +0000 (UTC) Received: by gilb.zs64.net (Postfix, from stb@lassitu.de) id 650D5E5C7; Sat, 26 Feb 2011 23:10:07 +0100 (CET) Mime-Version: 1.0 (Apple Message framework v1082) Content-Type: text/plain; charset=us-ascii From: Stefan Bethke In-Reply-To: Date: Sat, 26 Feb 2011 23:10:06 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: References: To: Zhihao Yuan X-Mailer: Apple Mail (2.1082) Cc: FreeBSD-STABLE Mailing List Subject: Re: How to bind a static ether address to bridge? X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 26 Feb 2011 22:10:14 -0000 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 > net.link.bridge.inherit_mac=3D1, 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=3D"ether 02:00:00:00:00:01 addm tap0 addm vlan1" ifconfig_bridge0_alias0=3D"inet 192.168.0.1/24" 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=3D"bridge0 gif0" ipv6_ifconfig_bridge0=3D"fe80::21c:c0ff:fe7d:8c50%bridge0" ipv6_ifconfig_bridge0_alias0=3D"2001:470:1f0b:xxxx::1 prefixlen 64" --=20 Stefan Bethke Fon +49 151 14070811