From owner-freebsd-net@FreeBSD.ORG Tue Aug 29 21:56:33 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 ED15E16A4E0; Tue, 29 Aug 2006 21:56:33 +0000 (UTC) (envelope-from stb@lassitu.de) Received: from koef.zs64.net (schlepper.zs64.net [212.12.50.230]) by mx1.FreeBSD.org (Postfix) with ESMTP id 60A8143D46; Tue, 29 Aug 2006 21:56:32 +0000 (GMT) (envelope-from stb@lassitu.de) Received: (from stb@koef.zs64.net) (authenticated) by koef.zs64.net (8.13.8/8.13.8) with ESMTP id k7TLuU5d043981 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=NO); Tue, 29 Aug 2006 23:56:31 +0200 (CEST) (envelope-from stb@lassitu.de) In-Reply-To: <200608281819.k7SIJC51043066@freefall.freebsd.org> References: <200608281819.k7SIJC51043066@freefall.freebsd.org> Mime-Version: 1.0 (Apple Message framework v752.2) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: <0809B75C-B4C4-4D02-A287-70810C4ECA69@lassitu.de> Content-Transfer-Encoding: 7bit From: Stefan Bethke Date: Tue, 29 Aug 2006 23:56:29 +0200 To: Andrew Thompson X-Mailer: Apple Mail (2.752.2) 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: Tue, 29 Aug 2006 21:56:34 -0000 Am 28.08.2006 um 18:19 schrieb Andrew Thompson: > Pass over to freebsd-net for discussion on the best way to handle > this. > > http://www.freebsd.org/cgi/query-pr.cgi?pr=102607 From the PR: > 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. > > Problem with 1. is that address will change if you add or swap NICs > in bridge, but it is still less likely to change than using random > numbers now. 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...") In general, ifconfig should at least warn if you try to assign an invalid MAC address to an interface. It probably wouldn't hurt to add a section about ethernet addresses to the ifconfig man page, explaining valid choices for LAAs. (I'll try to put together something over the weekend.) My 0,02 EUR, Stefan -- Stefan Bethke Fon +49 170 346 0140