problems with bridging

Dan Conti dconti
Tue Mar 18 13:15:16 PST 2003


Hi,

I have a dedicated box that i want to set up as a cheap bridge. I have a
linksys switch/AP, running as a master, that i use for all my PCs. The new
box is a small 486 with a dlink 650, the idea being that the dlink will be
set up in managed mode and bridge the physical interface (natsemi) to that.

I followed various instructions and did this:

brctl addbr br0
brctl addif br0 eth0
brctl addif br0 wlan0
ifconfig eth0 0.0.0.0
ifconfig wlan0 0.0.0.0
ifconfig br0 192.168.1.44 up

Trying to ping 192.168.1.1 (the AP) from the bridge fails at this point.
However, if i do

brctl delif br0 eth0

so that the bridge only has wlan0, i can ping anything on my network.

I've also noticed that if i plug a pc into eth0 i can't seem to ping the AP
while the bridge is active. Yes, the jack is live and autonegotiation works
etc.

questions:
1) is it essential for eth0 to be "live" (i.e. connected to a network) for
the bridge to start properly? it seems to fail either way
2) is it a problem that both eth0 and wlan0 are configured beforehand, then
i deconfigure them (ifconfig <dev> 0.0.0.0 down), then perform the above
steps?
3) is it normal for br0 to adopt the hwaddr of eth0? i've noticed that if
wlan0 is the only dev in the bridge then br0's hwaddr is the same as
wlan0's, but as soon as i add eth0 to the bridge, br0's hwaddr is the same
as eth0's.
4) while both devices are in the bridge, if i ping to any host across the
wireless network and dump arp packets, i see that they all use the mac
address of the wired interface. is this to be expected?

it appears that it is finding other MAC addrs on my network:
$ brctl showmacs br0
port no mac addr                is local?       ageing timer
  1     00:00:24:c0:73:08       yes                0.00
  2     00:05:5d:d9:93:cd       yes                0.00
  2     00:06:25:71:da:01       no                17.42
  2     00:60:08:27:5b:88       no                18.88
  2     00:e0:18:99:6b:72       no                18.88

but somehow they aren't getting added into the arp table:
$ cat /proc/net/arp
IP address       HW type     Flags       HW address            Mask
Device
192.168.1.110    0x1         0x0         00:00:00:00:00:00     *        br0
192.168.1.1      0x1         0x0         00:00:00:00:00:00     *        br0

(192.168.1.110 is 00:60:08:27:5b:88, and 192.168.1.1 is 00:06:25:71:da:01)

Am i missing something obvious here?

here's what my ifconfig looks like:

ifconfig
br0       Link encap:Ethernet  HWaddr 00:00:24:C0:73:08
          inet addr:192.168.1.44  Bcast:192.168.1.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:1247 errors:0 dropped:0 overruns:0 frame:0
          TX packets:654 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:302934 (295.8 KiB)  TX bytes:30948 (30.2 KiB)

eth0      Link encap:Ethernet  HWaddr 00:00:24:C0:73:08
          UP BROADCAST RUNNING PROMISC MULTICAST  MTU:1500  Metric:1
          RX packets:233 errors:0 dropped:0 overruns:0 frame:0
          TX packets:2959 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:100
          RX bytes:30278 (29.5 KiB)  TX bytes:400399 (391.0 KiB)
          Interrupt:11

wlan0     Link encap:Ethernet  HWaddr 00:05:5D:D9:93:CD
          UP BROADCAST RUNNING PROMISC MULTICAST  MTU:1500  Metric:1
          RX packets:3491 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1398 errors:1025 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:100
          RX bytes:661272 (645.7 KiB)  TX bytes:143150 (139.7 KiB)
          Interrupt:10 Base address:0x100

my routing table seems to be fine:
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use
Iface
192.168.1.0     0.0.0.0         255.255.255.0   U     0      0        0 br0
0.0.0.0         192.168.1.1     0.0.0.0         UG    0      0        0 br0

here's the output after i ifconfig br0 up:
br0: port 2(wlan0) entering listening state
br0: port 1(eth0) entering listening state
br0: port 2(wlan0) entering learning state
br0: port 1(eth0) entering learning state
br0: port 2(wlan0) entering forwarding state
br0: topology change detected, propagating
br0: port 1(eth0) entering forwarding state
br0: topology change detected, propagating







More information about the Hostap mailing list