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

Re: network unrachable problem



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.

Bob

Attachment: signature.asc
Description: Digital signature


Reply to: