1

Working with Debian 7.10, and wicd network manager, when ethernet cable is disconnected and reconnected again, network no longer works until device is rebooted (ethernet interface [eth0] is not able to be switched up). Same happens if a 'networking restart' is done (eth0 dissapears).

Network is configured for accepting static IPs, so the /etc/network/interfaces file is configured as such way:

# Loopback
auto lo
iface lo inet loopback

# Primary network interface
auto eth0
iface eth0 inet static
    address 10.1.1.100
    netmask 255.255.255.0
    network 10.1.1.0
    broadcast 10.1.1.255
    gateway 10.1.1.1
    dns-nameserver 8.8.8.8

Trying to solve the issue, wicd network manager was removed and changed for connman. Once connman is installed, service name must be checked and network configured:

$ connmanctl services
*AR Wired    ethernet_544a16cac68f_cable
$ connmanctl config ethernet_544a16cac68f_cable --ipv4 manual 10.1.1.100 255.255.255.0 10.1.1.1 --nameservers 8.8.8.8

At this point, with ifconfig -a network configuration is checked, and it is fine. Now, if ethernet cable is disconnected & reconnected or networking service is restarted, ethernet interface (eth0) is always recovered.

But, the problem is there is no internet connection, network can not reach the gateway. Nor ping to host, neither since host can be done, except to localhost or its own ip, 10.1.1.100.

# From host to gateway
$ ping 10.1.1.1
From 10.1.1.100 icmp_seq=1 Destination Host Unreachable

Then, I have checked /etc/hosts file:

127.0.0.1 localhost
127.0.1.1 device

And, /etc/resolv.conf file:

nameserver 127.0.0.1
nameserver ::1

Manually, I have added the Google DNS server, 8.8.8.8, and restarted network service, but behaviour is the same. It can not reach the gateway nor the internet (this file is not modified permanently, after reboot it has original values).

Following with the issue, routing table is

$ route
Destination Gateway   Genmask          Flags Metric Ref Use Iface
default     10.1.1.1  0.0.0.0          UG    0      0   0   eth0
8.8.8.8     10.1.1.1  255.255.255.255  UGH   0      0   0   eth0
10.1.1.0    *         255.255.255.0    U     0      0   0   eth0
10.1.1.1    *         255.255.255.255  UH    0      0   0   eth0

$ arp -n
Address    HWtype    HWaddress    Flags    Mask    Iface
10.1.1.1             (incomplete)                  eth0

Gateway's MAC can not be read.

Moreover, it has been disabled the IPv6, /etc/sysctl.conf:

net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
net.ipv6.conf.lo.disable_ipv6 = 1

And,

$ sysctl -p
$ cat /proc/sys/net/ipv6/conf/all/disable_ipv6
1

Nothing more works yet than ping to own IP.

  • Would be another way to find out what is happening with network interface?

EDIT1: Making some tests, it seems as IPv4 configuration is lost when wire is disconnected, and it can not be restored at wire's reconnection time.

Ethernet interface after booting device:

$ ifconfig eth0 
eth0        Link encap:Ethernet   HWaddr  54:4A:16:CA:CB:FF
            inet addr:10.1.1.100 Bcast:10.1.1.255 Mask 255.255.255.0
            inet6 addr:  FE80::564A:16FF:FECA:CBFF/64 Scope:Link
            UP BROADCAST RUNNING MULTICAST   MTU:1500   Metric:1
            Rx packets:4524 errors:0 dropped:303 overruns:0 frame:0
            Tx packets:161 errors:0 dropped:0 overruns:0 carrier:0
            collisions:0 txqueuelen: 1000
            Rx bytes:808019 (789.0 kiB) Tx bytes:18200 ( KiB)
            Interrupts:56

Ethernet interface after disconnecting the wire:

$ ifconfig eth0 
eth0        Link encap:Ethernet   HWaddr  54:4A:16:CA:CB:FF
            UP BROADCAST RUNNING MULTICAST   MTU:1500   Metric:1
            Rx packets:6332 errors:0 dropped:417 overruns:0 frame:0
            Tx packets:167 errors:0 dropped:0 overruns:0 carrier:0
            collisions:0 txqueuelen: 1000
            Rx bytes:1154018 (1.1 MiB) Tx bytes:18680 (18.2 KiB)
            Interrupts:56

Ethernet interface after reconnecting the wire:

$ ifconfig eth0 
eth0        Link encap:Ethernet   HWaddr  54:4A:16:CA:CB:FF
            inet6 addr:  FE80::564A:16FF:FECA:CBFF/64 Scope:Link
            UP BROADCAST RUNNING MULTICAST   MTU:1500   Metric:1
            Rx packets:6332 errors:0 dropped:417 overruns:0 frame:0
            Tx packets:167 errors:0 dropped:0 overruns:0 carrier:0
            collisions:0 txqueuelen: 1000
            Rx bytes:1154018 (1.1 MiB) Tx bytes:18680 (18.2 KiB)
            Interrupts:56

IPv4 is missing.

  • Which could be the root cause? How can it be solved (configuration, driver...)?
  • Here is a possible workaround: rocketboards.org/foswiki/view/Documentation/… – Jenny T-Type May 30 '16 at 17:11
  • Thanks! I can find what is happening, device is detecting whether the wire is plugged or not, and the status of the network, but after disconnecting & re-connecting the wire, ethernet interfaces can not access to internet nor from internet (or even its own network). It is needed to make a 'networking restart' for enabling the interface again, but even so, it does not communicate. – Yolco Jun 1 '16 at 14:05

Your Answer

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

Browse other questions tagged or ask your own question.