[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: nslu2: two devices: one by default



On Mon, Nov 02, 2009 at 07:55:47PM +0100, old.codger@mac.com wrote:
> I think I have the same situation.
> I can ssh using 192.168.1.6 for wlan0 interface, and 192.168.1.7 for the 
> eth0 interface.
> So now I have 2 sessions going through the same interface, and if I  
> disconnect that interface both sessions freeze. However, if I issue  
> ifdown ethO the 192.168.1.7 screen freezes but I am left with the wlan0 
> route.

That is pretty much expected yes.  By downing and interface, you remove
the route, so now the route on the other interface can take over.
You however also removed the IP address so you can no longer reach it.
The patch I use on the kernel removes the route but leaves the IP still
reachable.  Deleting the route, rather than shutting down the interface
makes it behave as desired.

When connecting to the two IPs with both links up, all your traffic is
going through one of the two interfaces only.

Linux (and other unices) are NOT routers.  They don't behave as one
would expect a router to behave when a link goes down.  Some of us (who
happen to be working on using linux on router products) are trying to
fix that, but so far the best I have got is the kernel patch I sent.
It works very well too.  Trying to change the behaviour of a 40 year
old OS concept isn't easy. :)

> From the wlan0 session
> Initial route
>
> Destination     Gateway         Genmask         Flags Metric Ref    Use 
> Iface
> localnet        *               255.255.255.0   U     0      0        0 
> eth0
> localnet        *               255.255.255.0   U     0      0        0 
> wlan0
> default         Fasteddy.local  0.0.0.0         UG    0      0        0 
> wlan0
> default         Fasteddy.local  0.0.0.0         UG    0      0        0 
> eth0
>
> ifdown eth0
>
> Destination     Gateway         Genmask         Flags Metric Ref    Use 
> Iface
> localnet        *               255.255.255.0   U     0      0        0 
> wlan0
> default         Fasteddy.local  0.0.0.0         UG    0      0        0 
> wlan0
>
> ifup eth0
>
> Destination     Gateway         Genmask         Flags Metric Ref    Use 
> Iface
> localnet        *               255.255.255.0   U     0      0        0 
> wlan0
> localnet        *               255.255.255.0   U     0      0        0 
> eth0
> default         Fasteddy.local  0.0.0.0         UG    0      0        0 
> eth0
> default         Fasteddy.local  0.0.0.0         UG    0      0        0 
> wlan0
>
> ifdown wlan0; ifup wlan0
>
> Destination     Gateway         Genmask         Flags Metric Ref    Use 
> Iface
> localnet        *               255.255.255.0   U     0      0        0 
> eth0
> localnet        *               255.255.255.0   U     0      0        0 
> wlan0
> default         Fasteddy.local  0.0.0.0         UG    0      0        0 
> wlan0
> default         Fasteddy.local  0.0.0.0         UG    0      0        0 
> eth0

-- 
Len Sorensen


Reply to: