ubuntu 14.10 上的网络错误

ubuntu 14.10 上的网络错误

我有一台 ubuntu 14.10 服务器,启动时需要很长时间,当它启动时,它没有网络(这导致启动时有很长时间的延迟) dmesg | tail

[  225.013622] init: networking pre-start process (1401) terminated with status 1
[  225.015451] init: networking post-stop process (1405) terminated with status 100
[  228.512454] init: networking pre-start process (1415) terminated with status 1
[  228.514132] init: networking post-stop process (1419) terminated with status 100

谷歌了一下,这个问题似乎与文件 /etc/network/interfaces 有关,以下是该文件的内容:(em1 是唯一以太网接口的名称)

# 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 em1
iface em1 inet DHCP

# This is an autoconfigured IPv6 interface

我必须连接显示器和键盘,然后打字ifconfig em1; dhclient em1才能工作。这很不方便。有什么想法吗?谢谢。

答案1

我认为你应该用“dhcp”替换“DHCP”:

# 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 em1
iface em1 inet dhcp

# This is an autoconfigured IPv6 interface

并重启网络:

sudo /etc/init.d/networking restart

相关内容