Douglas Chen
2007-Apr-18 12:36 UTC
[Bridge] problem with bridge on soho router, when lan interface down, all go down
>> I was wondering if anyone has experienced this before and appreciate for any solutions!! >> Can bridge recognize these ports separately so it doesn't take down everything as a whole? >> > >Only if they are separate interfaces.Can the bridge avoid entering the disabled state then? At least, I want the interface to respond when there's any traffic coming in from the WAN port. Thanks!
Douglas Chen
2007-Apr-18 12:36 UTC
[Bridge] problem with bridge on soho router, when lan interface down, all go down
Hi, I am using Linux 2.6.9 kernel on my soho router right now hoping to link the WAN and the LAN (4-port switch) ports together as the same network. I am actually using two routers , connecting the wan port to each other, but this problem should apply to just one. Ok, here's the problem. The WAN port is eth0 and the LAN ports is eth1. Assuming I have all 4 LAN ports connected to PCs. When I remove any one of the connections, the bridge (or precisely eth1) enters the disabled state as normal. However, since all 4 ports share the same eth1 interface, this also takes down the whole thing down and hence disables all other active connections. I have to re-plug the cable back into the port to initiate a learning state -> forward state to bring the connections back or keep at least one connection constantly transmitting packets. However, there is still like 20-30 seconds of disruption before recovery. I was wondering if anyone has experienced this before and appreciate for any solutions!! Can bridge recognize these ports separately so it doesn't take down everything as a whole? Thanks, Douglas
Stephen Hemminger
2007-Apr-18 12:36 UTC
[Bridge] problem with bridge on soho router, when lan interface down, all go down
On Mon, 30 Oct 2006 03:38:26 -0800 (PST) Douglas Chen <g5ranger@yahoo.com> wrote:> Hi, > > I am using Linux 2.6.9 kernel on my soho router right now hoping to link the WAN and the LAN (4-port switch) ports together as the same network. I am actually using two routers , connecting the wan port to each other, but this problem should apply to just one. > > Ok, here's the problem. The WAN port is eth0 and the LAN ports is eth1. Assuming I have all 4 LAN ports connected to PCs. When I remove any one of the connections, the bridge (or precisely eth1) enters the disabled state as normal. However, since all 4 ports share the same eth1 interface, this also takes down the whole thing down and hence disables all other active connections. I have to re-plug the cable back into the port to initiate a learning state -> forward state to bring the connections back or keep at least one connection constantly transmitting packets. However, there is still like 20-30 seconds of disruption before recovery. >If you aren't using STP, just set forwarding delay to zero brctl setfd br0 0> I was wondering if anyone has experienced this before and appreciate for any solutions!! > Can bridge recognize these ports separately so it doesn't take down everything as a whole? >Only if they are separate interfaces.
Douglas Chen
2007-Apr-18 12:36 UTC
[Bridge] problem with bridge on soho router, when lan interface down, all go down
>The bridge disables by port, each port is a network device. If the network devices >correctly implement carrier, then it can work with some down and some up. >It sounds like either they are all coming on one device, or the device driver is >buggy.Thanks for your speedy reply!! Much appreciated .. Before I dive in and start digging the source code, I want to confirm something. I am not too well versed on STP and bridge yet. Pardon me if this sounds weird or funny. 1. If STP is disabled, do these blocking/learning/forwarding... states still matter? I guess I need to keep the bridge constantly in the forwarding states. Any suggestions? 2. I also went back and read the spec one more time. It seems that the switch (LAN) interface uses a special tagging mode similar to 802.1Q to identify the port numbers. It is used for IGMP snooping and can be used by other applications as well. But I guess, the current bridge code doesn't support this? Or does it at least support the normal tagging mode? Sorry if this doesn't make any sense. Thanks!
Douglas Chen
2007-Apr-18 12:36 UTC
[Bridge] problem with bridge on soho router, when lan interface down, all go down
Hi again Stephen,>The bridge disables by port, each port is a network device. If the network devices >correctly implement carrier, then it can work with some down and some up. >It sounds like either they are all coming on one device, or the device driver is >buggy.I think you hit the jackpot! I looked into the driver code and the carrier is not implemented as it is supposed to. Whenever there is a LAN port status change, the change is used to set the carrier. This is the reason why when one port is disconnected, it brings down the whole interface. I've changed that to check the status of other ports before setting the carrier flag. Thank you very much!! You are a big help! Douglas