2

At startup or reboot, network interface works fine. Host is reachable and also can communicate with other devices on the local net or internet.

IP address is configured as static, and dns-nameservers are Google ones.

Here is the '/etc/network/interfaces' file:

# loopback
auto lo
iface lo inet loopback

# eth0
allow-hotplug eth0
auto eth0
iface eth0 inet static

# configuration
address X.X.X.X
netmask 255.255.255.0
network X.X.X.0
broadcast X.X.X.255
gateway X.X.X.1
dns-nameservers 8.8.8.8

The problem comes when ethernet wire is disconnected & re-connected, or when you need to switch off/on the network interface (eth0) for any configuration [ifconfig eth0 down/up].

Just after disconnecting the ethernet wire, if a ping is done, output is:

connect: Network is unreachable

Network interface is lost. With 'ifconfig -a', there is no ip address, nor broadcast, neither network. After sometime, network interface seems to be restored, but it does not work. Ping can not be made, host is unreachable...

Doing a 'service networking restart', nothing works:

Running /etc/init.d/networking restart is deprecated because it may not re-enable interfaces
Reconfiguring network interfaces...RTNETLINK answers: No such process
ifup: interface eth0 already configured
done

It only works after rebooting the device.

  • How can I checked if this issue is due to a persistent rule or not?
  • And the most obviously question, how can I solved it?
  • This is an interesting question, but I have to ask, why would you need to unplug the ethernet cable and replug it? Also, a lead you might want to take is to try and find all of the networking processes and restart them. Maybe something like apache2 is trying to access it, and restarting the networking daemon won't let eth0 reset because it's still binded. – SpecialBomb May 23 '16 at 16:23
  • What is the ethernet device? Crummy NIC may exhibit such problems, and I've also seen Intel NIC that need pcie_aspm=off set at boot to avoid being derpy. (Intel Corporation 82574L in particular) – thrig May 23 '16 at 16:41
  • @SpecialBomb one reason you might be in this situation is a laptop that travels but has a primary wired network. I have a similar case (static ip on eth0) for my home network. I leave it set that way and use wifi when i'm out but plug into my home net for printers, servers, etc. when i'm there. – user1794469 May 23 '16 at 17:29
  • @user1794469 Honestly, I would just buy a raspberry pi and just ssh into it, lol. – SpecialBomb May 23 '16 at 18:42
  • Is NetworkManager running? – garethTheRed May 23 '16 at 20:53
0

Googling your error message, networking restart is deprecated, turns up several interesting links. It looks like you need ifup, and to kill dhclient if it is running.

BTW, your question is phrased as interface crashes. That wording suggests a kernel problem, and may mislead people reading the question.

  • Of course I google it, but I do not find any solution yet. I have verified ethernet interface, it detects whether the wire is plugged or not, also the status (/sys/class/net), but as I said above, after disconnecting the wire, it does not matter if I re-connect again, device can not access to internet or be accessed from outside (even from its own network). – Yolco Jun 1 '16 at 13:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.