Subject: Re: IP on bridge interface?
To: NetBSD netbsd-users mailing list <netbsd-users@netbsd.org>
From: Julian Coleman <jdc@coris.org.uk>
List: netbsd-users
Date: 04/17/2003 12:29:02
> Problem is, the route looks like this:
> 
> lan               link#1             U
> 
> Where lan is 192.168.0.0/24, and link#1 is rtk0
> 
> So every packet goes through rtk0, while instead they should go through the bridge interface, which would select the  
> correct NIC.

Same here.  The bridging code selects the correct interface.  I have:

  `cat /etc/ifconfig.le0`
    media 10base5
    inet 81.2.110.41 netmask 0xffffffe0
    inet 192.168.13.8 netmask 0xffffff00 alias

  `cat /etc/ifconfig.le1`
    up

  `cat /etc/ifconfig.bridge0`
    create
    !brconfig $int add le1 add le0 ipf up

  `netstat -f inet -nr`
    Destination        Gateway            Flags     Refs     Use    Mtu  Interface
    default            81.2.110.33        UGS         7   143858      -  le0
    81.2.110.32/27     link#1             UC          6        0      -  le0
    81.2.110.33        00:30:eb:c6:6e:51  UHLc        2   133362      -  le0
    81.2.110.35        00:40:05:a5:f5:ca  UHLc        2      287      -  le0
    81.2.110.36        08:00:20:10:f6:f0  UHLc        2    23970      -  le0
    81.2.110.38        08:00:20:74:ea:58  UHLc        2   186131      -  le0
    81.2.110.40        link#1             UHLc        1      187      -  le0
    81.2.110.41        00:80:f1:00:53:fc  UHLc        0       15      -  lo0

  `brconfig bridge0`
    bridge0: flags=41<UP,RUNNING>
            Configuration:
                    priority 32768 hellotime 2 fwddelay 15 maxage 20
                    ipfilter enabled flags 0x1
            Interfaces:
                    le0 flags=3<LEARNING,DISCOVER>
                            port 1 priority 128
                    le1 flags=3<LEARNING,DISCOVER>
                            port 2 priority 128
            Address cache (max cache: 100, timeout: 1200):
                    00:40:96:48:69:59 le0 1161 flags=0<>
                    00:30:eb:c6:6e:51 le1 1054 flags=0<>
                    08:00:20:10:f6:f0 le0 762 flags=0<>
                    08:00:20:74:ea:58 le0 756 flags=0<>
                    00:40:05:a5:f5:ca le0 290 flags=0<>
                    00:40:96:48:ee:0e le0 4294967151 flags=0<>

J

-- 
                    My other computer also runs NetBSD
                          http://www.netbsd.org/