首页 文章

无法连接到网络并在ubuntu 14.04中找到eth0 [关闭]

提问于
浏览
-2

我在我的VmWare虚拟机中运行了一个ubuntu 14.04,我无法从VM连接到Internet . 我无法在桥接或NAT模式下看到ifconfig中的eth0 . 我唯一的设置是网络适配器:检查NAT,连接和连接电源 .

xyz@ubuntu:~$ ifconfig
lo    Link encap:Local Loopback  
      inet addr:127.0.0.1  Mask:255.0.0.0
      inet6 addr: ::1/128 Scope:Host
      UP LOOPBACK RUNNING  MTU:65536  Metric:1
      RX packets:170 errors:0 dropped:0 overruns:0 frame:0
      TX packets:170 errors:0 dropped:0 overruns:0 carrier:0
      collisions:0 txqueuelen:0 
      RX bytes:22628 (22.6 KB)  TX bytes:22628 (22.6 KB)

xyz@ubuntu:~$ ifconfig -a
eth0  Link encap:Ethernet  HWaddr 00:0c:29:f0:87:76  
      BROADCAST MULTICAST  MTU:1500  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:1000 
      RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

lo    Link encap:Local Loopback  
      inet addr:127.0.0.1  Mask:255.0.0.0
      inet6 addr: ::1/128 Scope:Host
      UP LOOPBACK RUNNING  MTU:65536  Metric:1
      RX packets:170 errors:0 dropped:0 overruns:0 frame:0
      TX packets:170 errors:0 dropped:0 overruns:0 carrier:0
      collisions:0 txqueuelen:0 
      RX bytes:22628 (22.6 KB)  TX bytes:22628 (22.6 KB)

1 回答

  • 1

    我在答案中而不是在评论中回答您的问题,以便更容易找到其他人通过Google查找此问题 .

    检查/ etc / network / interfaces文件,确保它包含eth0(或您的网络接口)的以下两行

    auto eth0
    iface eth0 inet dhcp
    

    有关ssh的问题,请检查客户端和服务器(https://stackoverflow.com/a/6377073/2263949)上的所有权限,并检查是否可以对其进行ping操作 . 如果您可以ping通,权限正常但仍无法连接,请检查防火墙设置 .

相关问题