【问题标题】:missing 127.0.0.1 (loopback address)缺少 127.0.0.1(环回地址)
【发布时间】:2015-06-05 20:04:00
【问题描述】:

Ubuntu linux,14.04 (DigitalOcean)

$ ifconfig -a
eth0      Link encap:Ethernet  HWaddr 04:01:1f:4c:XX:XX  
          inet addr:128.199.XXX.XXX  Bcast:128.199.XXX.255  Mask:255.255.192.0
          inet6 addr: fe80::601:1fff:XXXX:XXX/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:1565 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1603 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:228014 (228.0 KB)  TX bytes:260483 (260.4 KB)

lo        Link encap:Local Loopback  
          LOOPBACK  MTU:65536  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

我在环回中找不到 127.0.0.1。

我可以恢复 127.0.0.1 吗?

$ ping 127.0.0.1
PING 127.0.0.1 (127.0.0.1) 56(84) bytes of data.

好久没反应了。

$ cat /etc/network/interfaces
# This file describes the network interfaces available on your
# system and how to activate them. For more information, see
# interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto eth0
iface eth0 inet static
        address 128.199.XXX.XXX
        netmask 255.255.XXX.0
        gateway 128.199.XXX.1
        dns-nameservers 8.8.4.4 8.8.8.8 209.244.0.3

/etc/网络/接口。这是默认设置。

【问题讨论】:

    标签: linux ubuntu loopback-address


    【解决方案1】:

    谢谢,解决了。

    sudo apt-get update
    sudo dpkg --configure -a
    sudo apt-get upgrade
    sudo apt-get dist-upgrade
    sudo reboot now
    
    $ ping 127.0.0.1
    PING 127.0.0.1 (127.0.0.1) 56(84) bytes of data.
    64 bytes from 127.0.0.1: icmp_seq=1 ttl=64 time=0.031 ms
    

    【讨论】:

      猜你喜欢
      • 2015-02-08
      • 1970-01-01
      • 2011-09-10
      • 1970-01-01
      • 2020-06-29
      • 1970-01-01
      • 2013-02-22
      • 1970-01-01
      • 2018-04-20
      相关资源
      最近更新 更多