免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 895 | 回复: 0
打印 上一主题 下一主题

虚拟机debian网不通 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2008-06-09 01:16 |只看该作者 |倒序浏览
懒得装linux,把别的电脑上的虚拟机做的linux硬盘文件拷到自己电脑上使用,却发现无法联网.
debian:~# 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:16436  Metric:1
          RX packets:66 errors:0 dropped:0 overruns:0 frame:0
          TX packets:66 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:5104 (4.9 KiB)  TX bytes:5104 (4.9 KiB)

没有了eth0接口,查看/etc/network/interfaces
debian:~# vim /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
allow-hotplug eth0
iface eth0 inet static
        address 192.168.0.190
        netmask 255.255.255.0
        network 192.168.0.0
        broadcast 192.168.0.255
        gateway 192.168.0.1
        # dns-* options are implemented by the resolvconf package, if installed
        dns-nameservers 61.128.114.133 61.128.114.166


有eth0的配置,再次ifconfig -a 加-a可以查看所有的接口,不加参数只能查看活动接口。
发现有eth1,eth0没了,这应该是我的虚拟机把网卡认成了eth1,而原来的虚拟机把网卡作为eth0的,导致没有eth1的配置,无法联网,
于是修改/etc/network/interfaces把eth1换成eth1,ifup eth1,
还是不行,/etc/init.d/networking restart也不行,reboot,呵呵好了。
~



本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u2/60565/showart_730434.html
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP