Subject: kern/18035: bridge does not work with three interfaces
To: None <gnats-bugs@gnats.netbsd.org>
From: Martin Husemann <martin@duskware.de>
List: netbsd-bugs
Date: 08/22/2002 11:53:36
>Number:         18035
>Category:       kern
>Synopsis:       bridge does not work with three interfaces
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Aug 22 02:54:00 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     Martin Husemann
>Release:        NetBSD 1.6F
>Organization:
>Environment:
System: NetBSD night-porter.duskware.de 1.6F NetBSD 1.6F (PORTER) #2: Thu Aug 22 08:03:57 MEST 2002 martin@night-porter.duskware.de:/usr/src/sys/arch/i386/compile/PORTER i386
Architecture: i386
Machine: i386
>Description:

I use a SparcLX with quad fast ethernet card (4 x hme) as router for my
home network. Recently I ran out of switch ports, so I thought I'd make use
of the hme1 - hme3 upto now unused on that machine.

Via a crossover cable I connected one machine each to hme1 and hme2. I 
verified this connection works.

I then tried to bridge hme0, hme1 and hme2 together. When I ran into trouble
(see below) I thought this would be caused by all hmes having the same
ethernet address, so I hacked that - and it turns out it is not related.

So my config now is:

hme0: flags=8b63<UP,BROADCAST,NOTRAILERS,RUNNING,PROMISC,ALLMULTI,SIMPLEX,MULTICAST> mtu 1500
        address: 08:00:20:19:54:5f
        media: Ethernet autoselect (100baseTX full-duplex)
        status: active
        inet 192.168.150.10 netmask 0xffffff00 broadcast 192.168.150.255
hme1: flags=8b63<UP,BROADCAST,NOTRAILERS,RUNNING,PROMISC,ALLMULTI,SIMPLEX,MULTICAST> mtu 1500
        address: 08:00:20:19:54:60
        media: Ethernet autoselect (100baseTX full-duplex)
        status: active
hme2: flags=8b63<UP,BROADCAST,NOTRAILERS,RUNNING,PROMISC,ALLMULTI,SIMPLEX,MULTICAST> mtu 1500
        address: 08:00:20:19:54:61
        media: Ethernet autoselect (10baseT)
        status: active
bridge0: flags=41<UP,RUNNING> mtu 1500

brconfig -a shows the problem:
bridge0: flags=41<UP,RUNNING>
        Configuration:
                priority 32768 hellotime 2 fwddelay 15 maxage 20
        Interfaces:
                hme2 flags=3<LEARNING,DISCOVER>
                        port 5 priority 128
                hme1 flags=3<LEARNING,DISCOVER>
                        port 4 priority 128
                hme0 flags=3<LEARNING,DISCOVER>
                        port 3 priority 128
        Address cache (max cache: 100, timeout: 1200):
                08:00:2b:81:62:5e hme2 776 flags=0<>
                08:00:20:99:fc:91 hme2 623 flags=0<>
                00:00:c0:87:5f:f2 hme0 599 flags=0<>
                00:c0:ee:51:6c:4d hme2 590 flags=0<>
                00:e0:29:09:b0:e7 hme2 590 flags=0<>

Note there is only a single peer connected to hme2 - the cache entries are
bogus. And the bridge does not work at all (i.e. I can't ping accross the
bridge, sometimes pings from the bridge to one side work, but not always -
this may be related to arp timeouts)

Using only hme0 and hme1 works (this is after "brconfig bridge0 delete hme2 flush"
and some network activity):

bridge0: flags=41<UP,RUNNING>
        Configuration:
                priority 32768 hellotime 2 fwddelay 15 maxage 20
        Interfaces:
                hme1 flags=3<LEARNING,DISCOVER>
                        port 4 priority 128
                hme0 flags=3<LEARNING,DISCOVER>
                        port 3 priority 128
        Address cache (max cache: 100, timeout: 1200):
                00:c0:ee:51:6c:4d hme1 1179 flags=0<>
                00:e0:29:09:b0:e7 hme0 1176 flags=0<>
                00:00:c0:87:5f:f2 hme0 1170 flags=0<>
                08:00:20:99:fc:91 hme0 1169 flags=0<>

And now the bridge works just fine, i.e. the peer behind hme1 is reachable 
from all hosts behind hme0.

>How-To-Repeat:

s/a

>Fix:
n/a
>Release-Note:
>Audit-Trail:
>Unformatted: