From owner-freebsd-net@FreeBSD.ORG Fri Sep 1 03:35:24 2006 Return-Path: X-Original-To: freebsd-net@freebsd.org Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 33C0C16A4DE for ; Fri, 1 Sep 2006 03:35:24 +0000 (UTC) (envelope-from thompsa@freebsd.org) Received: from grunt7.ihug.co.nz (grunt7.ihug.co.nz [203.109.254.47]) by mx1.FreeBSD.org (Postfix) with ESMTP id C5D1C43D45 for ; Fri, 1 Sep 2006 03:35:23 +0000 (GMT) (envelope-from thompsa@freebsd.org) Received: from 203-109-251-39.static.bliink.ihug.co.nz (heff.fud.org.nz) [203.109.251.39] by grunt7.ihug.co.nz with esmtp (Exim 3.35 #1 (Debian)) id 1GIzoN-0002g8-00; Fri, 01 Sep 2006 15:35:19 +1200 Received: by heff.fud.org.nz (Postfix, from userid 1001) id 025F41CC23; Fri, 1 Sep 2006 15:35:19 +1200 (NZST) Date: Fri, 1 Sep 2006 15:35:18 +1200 From: Andrew Thompson To: Stefan Bethke Message-ID: <20060901033518.GD92893@heff.fud.org.nz> References: <200608281819.k7SIJC51043066@freefall.freebsd.org> <0809B75C-B4C4-4D02-A287-70810C4ECA69@lassitu.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <0809B75C-B4C4-4D02-A287-70810C4ECA69@lassitu.de> User-Agent: Mutt/1.5.11 Cc: freebsd-net@freebsd.org, Radim Kolar Subject: Re: kern/102607: [if_bridge] don't generate random L2 address X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 Sep 2006 03:35:24 -0000 On Tue, Aug 29, 2006 at 11:56:29PM +0200, Stefan Bethke wrote: > Am 28.08.2006 um 18:19 schrieb Andrew Thompson: > > > 1. change kernel code or to generate static IP address > > for bridge interface from attached member interfaces. > > or > > 2. use startup scripts to generate random number and > > store it somewhere in /var. > > or > > 3. Make system complain/warning if you set bridge0 to broadcast > > address. > > or > > 4. Document in if_bridge(4) that L2 address is random and > >document > > correct format of ethernet addresses. > > > > First, the actual behavior and it's implications should be documented > in if_bridge(4), specifically the random assignment of a locally > administered address. (Cf. net/if_bridge.c:bridge_clone_create()) > > If the user wants a different (fixed) address on the bridge, I think > it's acceptable to configure this in rc.conf along with the member > interfaces. (Already implemented: ifconfig_bridge0="create ether > 01:23:45:67:89:ab...") I agree with this. The first option is unfeasable as you cant guarantee that the members will have a L2 address (tap/gif) and it could make a dependency where you cant assign an IP until one or more networks are bridged. As you say the correct way is to use rc.conf to set the MAC and it just needs a bit more documentation. Andrew