LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 1606|回复: 7

求教:Vbox桥接为什么host和guest不能同时上网

[复制链接]
发表于 2008-4-29 14:57:30 | 显示全部楼层 |阅读模式
各位网络高手,我想请教一下虚拟机用桥接方式上网的问题。

Host: debian sid  Guest: win xp

我按照下面这个帖子里面的方法设置了在Vbox里用桥接让winxp上网
http://ubuntuforums.org/showthread.php?p=4827168

但是在winxp通过dhcp获得IP地址以后,winxp可以上网了,debian的网就断了。我的ifconfig输出和route的输出和那个帖子里除了IP地址都是一样的。请问各位有没有遇到过和我一样的问题?

另外winxp通过DHCP请求IP地址非常非常慢,经常要试很多次才行。这是DHCP server的问题吗

多谢帮助!
发表于 2008-4-29 16:32:17 | 显示全部楼层
回复 支持 反对

使用道具 举报

 楼主| 发表于 2008-4-30 06:23:48 | 显示全部楼层
Post by flycraft;1843929
有兴趣可以看看这一篇
http://www.linuxsir.cn/bbs/showt ... ighlight=virtualbox


我按这一篇的方法试了还是不行, winxp guest 一得到ip地址(x.x.17.182),debian就上不了网了.


eeliu@debian:~$ sudo ifconfig
br0       Link encap:Ethernet  HWaddr 00:13:20:59:06:9d  
          inet addr:61.187.17.128  Bcast:61.187.17.255  Mask:255.255.255.0
          inet6 addr: fe80::213:20ff:fe59:69d/64 Scopeink
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:27557 errors:0 dropped:0 overruns:0 frame:0
          TX packets:822 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:2489597 (2.3 MiB)  TX bytes:125060 (122.1 KiB)

eth0      Link encap:Ethernet  HWaddr 00:13:20:59:06:9d  
          inet6 addr: fe80::213:20ff:fe59:69d/64 Scopeink
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:28947 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1672 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:3104941 (2.9 MiB)  TX bytes:241214 (235.5 KiB)

lo        Link encapocal 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:101 errors:0 dropped:0 overruns:0 frame:0
          TX packets:101 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:10000 (9.7 KiB)  TX bytes:10000 (9.7 KiB)

tap0      Link encap:Ethernet  HWaddr 00:ff:f1:0e:f2:66  
          inet6 addr: fe80::2ff:f1ff:fe0e:f266/64 Scopeink
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:827 errors:0 dropped:0 overruns:0 frame:0
          TX packets:27371 errors:0 dropped:440 overruns:0 carrier:0
          collisions:0 txqueuelen:500
          RX bytes:113200 (110.5 KiB)  TX bytes:2680934 (2.5 MiB)

eeliu@debian:~$ sudo route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
61.187.17.0    *               255.255.255.0   U     0      0        0 br0
default           61.187.17.1    0.0.0.0         UG    0      0        0 br0
回复 支持 反对

使用道具 举报

发表于 2008-4-30 06:40:21 | 显示全部楼层
没遇到过,我装好VBox上的XP后不用设置就可以上网啊,而且各上各的互不影响。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2008-4-30 08:17:28 | 显示全部楼层
Post by MntHome;1844166
没遇到过,我装好VBox上的XP后不用设置就可以上网啊,而且各上各的互不影响。


你那是nat
回复 支持 反对

使用道具 举报

发表于 2008-4-30 20:58:26 | 显示全部楼层
贴一下 interfaces 的内容
回复 支持 反对

使用道具 举报

 楼主| 发表于 2008-5-1 04:54:18 | 显示全部楼层
Post by flycraft;1844429
贴一下 interfaces 的内容


就是照你的帖子写的。我现在怀疑网管有什么限制

eeliu@debian:~$ cat /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 eth0 tap0 br0

iface lo inet loopback

iface br0 inet dhcp
        bridge_ports eth0 tap0
        bridge_maxwait 0
        bridge_fd 0

iface eth0 inet manual

iface tap0 inet manual
        pre-up tunctl -u eeliu -t tap0
        pre-up ifconfig tap0 up
        post-down tunctl -d tap0
回复 支持 反对

使用道具 举报

发表于 2008-5-1 11:25:23 | 显示全部楼层
不知道了,可能真的是被管了
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表