kern/102607: [if_bridge] don't generate random L2 address

Radim Kolar hsn at
Mon Aug 28 13:50:20 UTC 2006

>Number:         102607
>Category:       kern
>Synopsis:       [if_bridge] don't generate random L2 address
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Mon Aug 28 13:50:19 GMT 2006
>Originator:     Radim Kolar
>Release:        FreeBSD 6.1-STABLE i386
System: FreeBSD sanatana.dharma 6.1-STABLE FreeBSD 6.1-STABLE #3: Fri Aug 25 12:13:08 CEST 2006 root at sanatana.dharma:/usr/obj/usr/src/sys/UP i386
if_bridge interfaces have every boottime different L2 address. This behaviour
is very different from other interfaces like network cards, they have L2
address in EPROMS. Because bridge interface is designed to look and work like
other NIC cards, it should have static L2 address by default to make work of
network admins easier, other BSDs complains about inet address moved and
you can't use static IP in dhcpd.

Because not every number can be used as L2 address for bridge, admin can make
hard-to-find mistake when configuring static address by hand.
        1. change kernel code or  to generate static IP address
	for bridge interface from attached member interfaces.
	2. use startup scripts to generate random number and
	   store it somewhere in /var.
	3. Make system complain/warning if you set bridge0 to broadcast
        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.

More information about the freebsd-bugs mailing list