Ubuntu Server 14.04 在 VMWare Workstation 中使用 2 个网络适配器

Ubuntu Server 14.04 在 VMWare Workstation 中使用 2 个网络适配器

我是一名学生,我们正在使用 VMWare Workstation 10 和 Ubuntu 14.04。我们(包括我们的老师)正在尝试找出我们的配置出了什么问题。

在 Vmware 中,目标是在 Bridged 或 NAT 中拥有一个网络适配器(我们已经尝试了这两种方法)以访问学校网络的互联网,并且在主机中拥有第二个网络适配器,并且在 vmeditor 中禁用 dhcp 用于我们的私有网络。

到目前为止,当我们进行原始设置时,我们可以让它工作。然而,经过几次重启后,虽然我们的 ifconfig 结果显示了正确的 ips,但再也无法访问互联网。我们可以通过执行以下操作重新获得互联网访问权限:

sudo ifdown eth0 && sudo ifdown eth1
sudo ifup eth0

此时我们可以访问互联网,但是,当我们尝试恢复 eth1 适配器时,我们收到一条错误消息,指出 eth1 未配置。这本身就很奇怪,因为 eth1 已配置了静态 IP。

配置如下/etc/network/interfaces

- Primary adaptor internet
auto eth0
iface eth0 inet dhcp
- Secondary adaptor private network
auto eth1
iface eth1 inet static
address 192.168.90.254
netmask 255.255.255.0
network 192.168.90.0
broadcast 192.168.90.255
- Here we have tried using the servers static ip as well as having it commented off 
gateway 192.168.90.254
- Have also tried thinking it would link to the net adaptor
gateway 192.168.90.1

有任何想法吗?

答案1

我无法从问题的格式中判断出来......但是 /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 10.110.2.9
    netmask 255.255.0.0
    network 10.110.0.0
    broadcast 10.110.255.255
  <snip>

相关内容