Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 29 Aug 2006 23:56:29 +0200
From:      Stefan Bethke <stb@lassitu.de>
To:        Andrew Thompson <thompsa@freebsd.org>
Cc:        freebsd-net@freebsd.org, Radim Kolar <hsn@netmag.cz>
Subject:   Re: kern/102607: [if_bridge] don't generate random L2 address
Message-ID:  <0809B75C-B4C4-4D02-A287-70810C4ECA69@lassitu.de>
In-Reply-To: <200608281819.k7SIJC51043066@freefall.freebsd.org>
References:  <200608281819.k7SIJC51043066@freefall.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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 <stb@lassitu.de>   Fon +49 170 346 0140





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?0809B75C-B4C4-4D02-A287-70810C4ECA69>