我不明白为什么我的环回设备没有 IP 地址。
这是 /etc/network/interfaces:
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
auto eth0
iface eth0 inet static
address 10.33.11.204
netmask 255.255.0.0
gateway 10.33.1.1
network 10.33.0.0
broadcast 10.33.255.255
dns-nameservers 10.33.3.21 10.33.3.150
下面是ifconfig -a
:
eth0 Link encap:Ethernet HWaddr 00:50:56:99:57:43
inet addr:10.33.11.204 Bcast:10.33.255.255 Mask:255.255.0.0
inet6 addr: fe80::250:56ff:fe99:5743/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:7294 errors:0 dropped:0 overruns:0 frame:0
TX packets:597 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:585520 (585.5 KB) TX bytes:86074 (86.0 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)
下面是ip addr show
:
1: lo: <LOOPBACK> mtu 65536 qdisc noop state DOWN group default
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
link/ether 00:50:56:99:57:43 brd ff:ff:ff:ff:ff:ff
inet 10.33.11.204/16 brd 10.33.255.255 scope global eth0
valid_lft forever preferred_lft forever
inet6 fe80::250:56ff:fe99:5743/64 scope link
valid_lft forever preferred_lft forever
到底发生了什么事?我有另外两台具有类似网络配置的服务器,并且均将 127.0.0.1 作为环回 IP 地址。