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/网络/接口。这是默认的。