我已经在 Oracle VirtualBox 中安装了 Ubuntu 14.04 服务器,但是每次启动 Ubuntu 服务器时都要花 5.15 分钟。我该如何解决这个问题? 为了简单起见,点击此链接查看图片
输出猫/等/网络/接口
root@ubuntu:~# 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).
source /etc/network/interfaces.d/*
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
auto enp0s3
iface enp0s3 inet dhcp
#Myadded configuretion
auto enp0s8
iface enp0s8 inet dhcp
输出IP 地址
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: enp0s3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
link/ether 08:00:27:19:bc:70 brd ff:ff:ff:ff:ff:ff
inet 192.168.100.5/24 brd 192.168.100.255 scope global enp0s3
valid_lft forever preferred_lft forever
inet6 fe80::a00:27ff:fe19:bc70/64 scope link
valid_lft forever preferred_lft forever
3: enp0s8: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
link/ether 08:00:27:34:05:2b brd ff:ff:ff:ff:ff:ff
inet6 fe80::a00:27ff:fe34:52b/64 scope link
valid_lft forever preferred_lft forever
答案1
上述任一接口enp0s3
或未enp0s8
通过 dhcp 获取地址。 的输出是什么ip addr
?
enp0s8
是罪魁祸首。只需注释掉这些条目就可以了:
#auto enp0s8
#iface enp0s8 inet dhcp