relha 发表于 2016-1-6 08:28:47

vmware ubuntu网络问题no such device

之前装了vmware一直上不了网,一直没弄明白为什么,vm中配置的上网方式是NAT,也就是说跟宿主机一样的对外ip
ifconfig之后只有lo

netease@mysql1:~$ ifconfig
lo      Link encap:本地环回
inet 地址:127.0.0.1掩码:255.0.0.0
inet6 地址: ::1/128 Scope:Host
UP LOOPBACK RUNNINGMTU:16436跃点数:1
接收数据包:4408 错误:0 丢弃:0 过载:0 帧数:0
发送数据包:4408 错误:0 丢弃:0 过载:0 载波:0
碰撞:0 发送队列长度:0
接收字节:220400 (215.2 KB)发送字节:220400 (215.2 KB)


restart提示eth0不存在

netease@mysql1:~$ sudo /etc/init.d/networking restart
* Reconfiguring network interfaces...                                          eth0: ERROR while getting interface flags: No such device
There is already a pid file /var/run/dhclient.eth0.pid with pid 134519072
Internet Systems Consortium DHCP Client V3.0.6
Copyright 2004-2007 Internet Systems Consortium.
All rights reserved.
For info, please visit http://www.isc.org/sw/dhcp/
SIOCSIFADDR: No such device
eth0: ERROR while getting interface flags: No such device
eth0: ERROR while getting interface flags: No such device
Bind socket to interface: No such device
Failed to bring up eth0.


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 dhcp
~                                                                              
~                              


偶然执行了一下ifconfig -a,发现有个eth2...还有物理地址在
于是修改interfaces文件中的eth0为eth2
重启网络,done...
页: [1]
查看完整版本: vmware ubuntu网络问题no such device