Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Connectivity lost after ethernet link has gone down/up #465

Open
pe1chl opened this issue Aug 2, 2015 · 6 comments
Open

Connectivity lost after ethernet link has gone down/up #465

pe1chl opened this issue Aug 2, 2015 · 6 comments

Comments

@pe1chl
Copy link

pe1chl commented Aug 2, 2015

On a Cubieboard2 we observe the issue that connectivity on ethernet does not come back when
the ethernetlink is disconnected and again re-connected. When the interface is set up with DHCP
the system becomes completely unreachable, when it is set up with a static address the address
and local subnet remains but the default route is deleted so connectivity to/from internet is lost.

It is unclear to me what really happens, other Debian derived distributions including Raspberry Pi
handle this without problem. The link down/up event is logged in /var/log/messages like this:

Jul 31 00:24:35 boom kernel: [42509.319623] sunxi_emac sunxi_emac.0: eth0: link down
Jul 31 00:24:35 boom kernel: [42509.324776] ADDRCONF(NETDEV_UP): eth0: link is not ready
Jul 31 00:25:17 boom kernel: [42551.322212] sunxi_emac sunxi_emac.0: eth0: link up, 100Mbps, full-duplex, lpa 0x45E1
Jul 31 00:25:17 boom kernel: [42551.327629] ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready

When looking in a shell, the normal line in "ip route list" of

default via 192.168.1.1 dev eth0

disappears.
Is there something triggered because of the "link down" that does not recover after "link up"?
(the removing and adding of the routes, I mean)

@estevesd
Copy link

estevesd commented Aug 2, 2015

I managed to solve this issue by putting
auto eth0
iface eth0 inet dhcp
in /etc/network/interfaces
and by using ifplugd with settings forcing it to use eth0 in /etc/default/ifplugd

@pe1chl
Copy link
Author

pe1chl commented Aug 2, 2015

Ok I already had that in /etc/network/interfaces (and alternately tried "iface eth0 inet static"), and
in /etc/default/ifplugd there is the (supposedly default):

INTERFACES="all"
HOTPLUG_INTERFACES="all"
ARGS="-q -f -u0 -d10 -w -I"
SUSPEND_ACTION="stop"

Did you change anything there?

@estevesd
Copy link

estevesd commented Aug 2, 2015

yes i changed since there's no other interfaces
INTERFACES="eth0"
HOTPLUG_INTERFACES="eth0"
ARGS="-q -f -u0 -d0 -w -I"
SUSPEND_ACTION="stop"

also consider the -u and -d options, they specify a delay in seconds to reconfigure the interface on up and down
http://linux.die.net/man/8/ifplugd for other options. for example -q -f and -I are normally off by default
however it works for me with the above settings

@pe1chl
Copy link
Author

pe1chl commented Aug 2, 2015

Ok I will test... will take some time, need to be near the board.

@pe1chl
Copy link
Author

pe1chl commented Aug 3, 2015

It looks like it does not fix the issue for me. I also tried some delay after "up" using -u2 and then
the interface fails to get an address even after reboot.
It looks there is some race condition that may be fixed for some people by tweaking that file
but it is not a reliable solution.

@pe1chl
Copy link
Author

pe1chl commented Aug 4, 2015

It looks like a better option is to just remove the entire ifplugd package. It appears to serve no
useful purpose, it was written by a wellknown daemon artist who keeps adding functionality to
the system that I do not like...
To be tested soon!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants