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

Re: network unrachable problem



On 06/04/13 01:30, Bob Proulx wrote:
> Tony van der Hoff wrote:
>> I have a (headless) SBC (actually a raspberry pi, but I think that's
>> unimportant) running wheezy, with both wireless and wired networking
>> interfaces, each with ipv4 and ipv6 addresses.
> 
> Me too.  Well... Only IPv4.  I haven't set up IPv6.  I am using
> wpa_supplicant directly for handling the wifi connection.
> 
>> When both are configured, all is well, and I can ping anywhere with both
>> address families.
> 
> Me too.
> 
>> If I now unplug the eth0 cable, one of the address families dies on
>> the wireless side, but only beyond the router; i.e. I can ping and
>> ping6 to the router, but can only ether ping or ping6 to
>> google.com. The failing family responds with "network unreachable".
> 
> What is your default route?  What is the output of:
> 
>   $ ip route show
> 
> If the default route is out through the unplugged eth0 then that would
> do it.
> 
>> If I now do "ifconfig eth0 down" my wan once again works correctly. I
>> guess udev should be bringing down the eth0 automatically, but is not
>> doing so.
>>
>> Any suggestions on how to fix this, please?
> 
> Is ifplugd running?  I think the default distributed image has ifplugd
> installed and configured.  In which case see /etc/default/ifplugd for
> the configuration.  If you don't have ifplugd installed then I would
> investigate using it.
> 
> My file /etc/default/ifplugd contains:
>   INTERFACES="auto"
>   HOTPLUG_INTERFACES="all"
>   ARGS="-q -f -u0 -d10 -w -I"
>   SUSPEND_ACTION="stop"
> 
> I will guess that when you unplug eth0 that ifplugd is not running and
> doesn't automatically down the interface.  Which means your route is
> still configured to eth0 and causes everything to fail.  When you
> manually down the interface that removes that default route and the
> other default route through the wifi then comes into play.
> 
Thanks for that, Bob; it seems like a pretty accurate analysis of the
situation.

Certainly, with eth0 unplugged, ifconfig shows it to be still up, and ip
route show shows both interfaces, so that's very likely the cause.

However, ifplugd is running, as shown by ps; an instance for each
interface. My /etc/default/ifplugd is identical to yours.

If I manually pull down eth0, and then restore the cable, then it comes
up automatically.

Digging around in /etc/udev, I find it is practically empty; is udev
still the way devices are detected?

I found some references to /lib/udev/write_net_rules, but running this
fails with  missing $INTERFACE.

Cheers, Tony

-- 
Tony van der Hoff        | mailto:tony@vanderhoff.org
Buckinghamshire, England |


Reply to: