This just started like 4 or 5 days ago. I'm running Ubuntu 12.04 desktop, and after about 12 hours of uptime it seems the loopback device just stops working. If I do an ifconfig, it looks like it's still there, but if I ping localhost or, both fail. Also, pinging known DNS addresses (www.google.com) fail. But pinging by IP works fine.

The rest of the networking features seem unphased. I can still reach the Samba share from my Windows machine. Also, I run an Apache server that is still reachable from the outside world. Looking at the resources monitor, the CPU and memory usage appear normal when this happens.

If I restart the machine, everything is fine again. For about 12 hours, until it happens again. Any ideas on what could be causing this or how to diagnose it? Thanks.

Edit: I ran the recommended diagnostics commands. Below is the output. I can't really make heads or tails of it though. Does anything look out of the ordinary?

~$ ip addr
1: lo:  mtu 16436 qdisc noqueue state UNKNOWN 
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet scope host lo
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: eth0:  mtu 1500 qdisc pfifo_fast state UP qlen 1000
    link/ether 00:1b:fc:64:dc:82 brd ff:ff:ff:ff:ff:ff
    inet brd scope global eth0
    inet6 fe80::21b:fcff:fe64:dc82/64 scope link 
       valid_lft forever preferred_lft forever

~$ netstat -rn
Kernel IP routing table
Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface         UG        0 0          0 eth0     U         0 0          0 eth0   U         0 0          0 eth0

~$ getent hosts localhost       localhost

~$ ping
PING ( 56(84) bytes of data.
--- ping statistics ---
572 packets transmitted, 0 received, 100% packet loss, time 575551ms

~$ ping6 ::1
PING ::1(::1) 56 data bytes
64 bytes from ::1: icmp_seq=1 ttl=64 time=0.020 ms
64 bytes from ::1: icmp_seq=2 ttl=64 time=0.023 ms
64 bytes from ::1: icmp_seq=3 ttl=64 time=0.025 ms
64 bytes from ::1: icmp_seq=4 ttl=64 time=0.021 ms
64 bytes from ::1: icmp_seq=5 ttl=64 time=0.028 ms
64 bytes from ::1: icmp_seq=6 ttl=64 time=0.025 ms
64 bytes from ::1: icmp_seq=7 ttl=64 time=0.023 ms
64 bytes from ::1: icmp_seq=8 ttl=64 time=0.026 ms
64 bytes from ::1: icmp_seq=9 ttl=64 time=0.021 ms
64 bytes from ::1: icmp_seq=10 ttl=64 time=0.028 ms
--- ::1 ping statistics ---
10 packets transmitted, 10 received, 0% packet loss, time 8998ms
rtt min/avg/max/mdev = 0.020/0.024/0.028/0.002 ms

~$ ifconfig
eth0      Link encap:Ethernet  HWaddr 00:1b:fc:64:dc:82  
          inet addr:  Bcast:  Mask:
          inet6 addr: fe80::21b:fcff:fe64:dc82/64 Scope:Link
          RX packets:5537467 errors:0 dropped:0 overruns:0 frame:0
          TX packets:7700200 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:2390500721 (2.3 GB)  TX bytes:8274946292 (8.2 GB)
          Interrupt:23 Base address:0x4000 

lo        Link encap:Local Loopback  
          inet addr:  Mask:
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:1441430 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1441430 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:2084259522 (2.0 GB)  TX bytes:2084259522 (2.0 GB)

  • To diagnose: try including the output from ip addr, netstat -rn, getent hosts localhost, ping, and ping6 ::1.
    – Celada
    Aug 7, 2012 at 0:31

1 Answer 1


I was able to fix this issue on my Debian machines by upgrading to the 3.2.0-4 kernel currently in Wheezy from the 2.6.32-5 currently in Squeeze.

If you're unable to update your kernel, I've been able to work around this issue on two of my servers by telling them to access the local DNS resolver over IPv6 instead of IPv4. Here's my resolv.conf:

search example.com
nameserver ::1

It hasn't been a perfect work around, but it was sufficient for a while.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .