vmware ubuntu网络问题no such device

之前装了vmware一直上不了网,一直没弄明白为什么,vm中配置的上网方式是NAT,也就是说跟宿主机一样的对外ip
ifconfig之后只有lo
[code=""]
netease@mysql1:~$ ifconfig
lo Link encap:本地环回
inet 地址:127.0.0.1 掩码:255.0.0.0
inet6 地址: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 跃点数:1
接收数据包:4408 错误:0 丢弃:0 过载:0 帧数:0
发送数据包:4408 错误:0 丢弃:0 过载:0 载波:0
碰撞:0 发送队列长度:0
接收字节:220400 (215.2 KB) 发送字节:220400 (215.2 KB)
[/code]

restart提示eth0不存在
[code]
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.
[/code]

interfaces文件
[code]
# 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
~
~
[/code]

偶然执行了一下ifconfig -a,发现有个eth2...还有物理地址在
于是修改interfaces文件中的eth0为eth2
重启网络,done...
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值