我有一个KVM主机(在192.168.0.10),当前有一个工作KVM来宾(192.168.0.12).在今天尝试安装新的KVM客户端时,我遇到了一个问题,即新客户端上的网络只能部分工作.
我可以从新访客访问的唯一内容是网络内的资源.尝试访问任何其他网络资源(包括通过网关的资源)会导致100%的数据包丢失到目标.
来宾通过桥接器连接,使用eth2访问网络.
主机网络按预期工作,另一个(当前只有一个)guest虚拟机的网络也可以通过同一个网桥连接.关闭工作客户并不能解决问题.
两位客人都通过DHCP获取网络详细信息.
在guest虚拟机的虚拟接口上从主机运行tcpdump会显示guest虚拟机尝试与外部通信,并且仅从主机和网关获取响应.
主办
有问题的访客目前通过vnet0连接.
# ip a 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 inet 127.0.0.1/8 scope host lo inet6 ::1/128 scope host valid_lft forever preferred_lft forever 2: eth0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN qlen 1000 link/ether 00:1e:4f:34:dc:79 brd ff:ff:ff:ff:ff:ff 3: eth1: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN qlen 1000 link/ether 00:1e:4f:34:dc:7b brd ff:ff:ff:ff:ff:ff 4: eth2: <BROADCAST,MULTICAST,LOWER_UP> mtu 1500 qdisc pfifo_fast master br0 state UP qlen 1000 link/ether 00:15:17:6a:fb:ee brd ff:ff:ff:ff:ff:ff 13: br0: <BROADCAST,LOWER_UP> mtu 1500 qdisc noqueue state UP link/ether 00:15:17:6a:fb:ee brd ff:ff:ff:ff:ff:ff inet 192.168.0.10/24 brd 192.168.0.255 scope global br0 inet6 fe80::215:17ff:fe6a:fbee/64 scope link valid_lft forever preferred_lft forever 24: vnet0: <BROADCAST,LOWER_UP> mtu 1500 qdisc pfifo_fast master br0 state UNKNOWN qlen 500 link/ether fe:54:00:fc:0f:07 brd ff:ff:ff:ff:ff:ff inet6 fe80::fc54:ff:fefc:f07/64 scope link valid_lft forever preferred_lft forever 25: vnet1: <BROADCAST,LOWER_UP> mtu 1500 qdisc pfifo_fast master br0 state UNKNOWN qlen 500 link/ether fe:54:00:89:8e:17 brd ff:ff:ff:ff:ff:ff inet6 fe80::fc54:ff:fe89:8e17/64 scope link valid_lft forever preferred_lft forever # ip route default via 192.168.0.202 dev br0 192.168.0.0/24 dev br0 proto kernel scope link src 192.168.0.10 # cat /etc/network/interfaces auto lo iface lo inet loopback auto br0 iface br0 inet dhcp bridge_ports eth2 bridge_stp off bridge_maxwait 0 bridge_fd 0 # brctl show bridge name bridge id STP enabled interfaces br0 8000.0015176afbee no eth2 vnet0 vnet1
非工作客人
请注意,不工作的guest虚拟机使用busyBox ip.
# ip a 1: lo: <LOOPBACK,LOWER_UP> mtu 16436 qdisc noqueue link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 inet 127.0.0.1/8 scope host lo inet6 ::1/128 scope host valid_lft forever preferred_lft forever 2: eth0: <BROADCAST,LOWER_UP> mtu 1500 qdisk pfifo_fast qlen 1000 link/ether 52:54:00:fc:0f:07 brd ff:ff:ff:ff:ff:ff inet 192.168.0.27/24 scope global eth0 inet6 fe80::5054:ff:fefc:f07/64 scope link valid_lft forever preferred_lft forever # ip route default via 192.168.0.202 dev eth0 192.168.0.0/24 dev eth0 src 192.168.0.27
工作嘉宾
# ip a 1: lo: <LOOPBACK,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000 link/ether 52:54:00:89:8e:17 brd ff:ff:ff:ff:ff:ff inet 192.168.0.12/24 brd 192.168.0.255 scope global eth0 inet6 fe80::5054:ff:fe89:8e17/64 scope link valid_lft forever preferred_lft forever # ip route default via 192.168.0.202 dev eth0 192.168.0.0/24 dev eth0 proto kernel scope link src 192.168.0.12
主持人和客人都经营着Debian Wheezy.
我没有看到发布的详细信息中存在任何错误配置,特别是考虑到最近安装其他KVM来宾的完全相同的设置方法(并且即使现在也继续工作).可能是导致此问题的原因,我该如何解决?
解决方法
用于KVM虚拟机的桥上的
STP should be enabled.
在/ etc / network / interfaces文件中修复此问题:
bridge_stp on
在运行时启用它而不重新启动网络服务:
# brctl stp br0 on