linux - openstack Quantum VM 能够 ping 通 br-ex,但无法 ping 通外部网络

标签 linux openstack bridge

我有一个与网络相关的非常奇怪的问题,我在具有多个接口(interface)的 VirtualBox 上安装了 RDO Grizzly OpenStack。

虚拟框:

eth0 - management (Host-only - 172.16.100.1/24)
eth1 - Outside connectivity floating IP (Host-only - 192.168.200.1/24)

在操作系统中,我配置了以下 IP 地址:

eth0 - 172.16.100.3/24
eth1 - NO IP  (bridge configuration br-ex) 

br-ex - 192.168.200.10/24

虚拟机配置:

eth0 - 10.0.0.1

问题:

从虚拟机内部,我可以 ping 192.168.200.10,但不能 ping 192.168.200.1(我在 Host-only VirtualBox 接口(interface)中配置)。

如果我在 br-ex 上运行 tcpdump,我只会收到 ARP 请求:

[root@openstack ~]# tcpdump -i br-ex -n
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on br-ex, link-type EN10MB (Ethernet), capture size 65535 bytes
09:57:38.409836 ARP, Request who-has 192.168.200.1 tell 192.168.200.3, length 28
09:57:39.409347 ARP, Request who-has 192.168.200.1 tell 192.168.200.3, length 28
09:57:40.409269 ARP, Request who-has 192.168.200.1 tell 192.168.200.3, length 28
09:57:42.301261 ARP, Request who-has 192.168.200.1 tell 192.168.200.3, length 28

但是从 novacompute 节点我可以使用 float IP 来 SSH 虚拟机。

[root@openstack ~]# ovs-vsctl show
87c47768-6915-4a22-89ce-07ae6a69198c
    Bridge br-int
        Port "tap22f39fba-90"
            tag: 1
            Interface "tap22f39fba-90"
        Port br-int
            Interface br-int
                type: internal
        Port "qvo04567a2c-21"
            tag: 1
            Interface "qvo04567a2c-21"
        Port "tapf883d479-d3"
            tag: 1
            Interface "tapf883d479-d3"
    Bridge br-ex
        Port "tapefe0165b-fd"
            Interface "tapefe0165b-fd"
        Port br-ex
            Interface br-ex
                type: internal
        Port "eth1"
            Interface "eth1"
    ovs_version: "1.11.0"

ip link命令输出:

[root@openstack ~]# ip link
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
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
    link/ether 08:00:27:76:b9:0e brd ff:ff:ff:ff:ff:ff
3: eth1: <BROADCAST,MULTICAST,PROMISC,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
    link/ether 08:00:27:3e:9f:a5 brd ff:ff:ff:ff:ff:ff
4: eth2: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN qlen 1000
    link/ether 08:00:27:41:a1:b9 brd ff:ff:ff:ff:ff:ff
5: ovs-system: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN
    link/ether 56:3e:40:7c:48:01 brd ff:ff:ff:ff:ff:ff
6: br-ex: <BROADCAST,PROMISC,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN
    link/ether 08:00:27:3e:9f:a5 brd ff:ff:ff:ff:ff:ff
7: br-int: <BROADCAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN
    link/ether 7a:0f:17:14:72:44 brd ff:ff:ff:ff:ff:ff
11: tapf883d479-d3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
    link/ether a6:1e:ad:c4:e4:1a brd ff:ff:ff:ff:ff:ff
12: qbr04567a2c-21: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN
    link/ether 3e:a1:d0:98:7c:f8 brd ff:ff:ff:ff:ff:ff
13: qvo04567a2c-21: <BROADCAST,MULTICAST,PROMISC,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
    link/ether 26:8f:28:d2:ca:cd brd ff:ff:ff:ff:ff:ff
14: qvb04567a2c-21: <BROADCAST,MULTICAST,PROMISC,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
    link/ether 3e:a1:d0:98:7c:f8 brd ff:ff:ff:ff:ff:ff
16: tapefe0165b-fd: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
    link/ether f2:fa:3e:b9:e6:62 brd ff:ff:ff:ff:ff:ff
19: tap22f39fba-90: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
    link/ether 4e:27:93:05:5a:bb brd ff:ff:ff:ff:ff:ff
20: tap04567a2c-21: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UNKNOWN qlen 500
    link/ether fe:16:3e:e8:6a:4e brd ff:ff:ff:ff:ff:ff

ip route命令输出:

[root@openstack ~]# ip route
192.168.200.0/24 dev br-ex  scope link
192.168.200.0/24 dev eth1  scope link
169.254.0.0/16 dev eth0  scope link  metric 1002
169.254.0.0/16 dev eth1  scope link  metric 1003
172.16.0.0/16 dev eth0  proto kernel  scope link  src 172.16.100.3
default via 172.16.100.1 dev eth0

最佳答案

已连接,但问题已解决!

使用以下选项配置 eth1:

DEVICE=eth1
ONBOOT=yes
HWADDR=08:00:27:3E:9F:A5
TYPE=OVSPort
DEVICETYPE=ov
OVS_BRIDGE=br-ex
NM_CONTROLLED=no
IPV6INIT=no

重新启动此框

重启后

br-ex 上手动设置 IP

ip addr add 192.168.200.10/24 dev br-ex

关于linux - openstack Quantum VM 能够 ping 通 br-ex,但无法 ping 通外部网络,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19817506/

相关文章:

c - fork 后选择阅读

azure - 适用于任何基于 IaaS 的云的与云无关的工具

networking - docker:如何轻松获得 veth 桥接接口(interface)对?

python - libvirt-python CentOS 的构建轮失败

openstack - openstack重启后如何恢复实例

java - 在使用装饰器模式和桥接模式之间的两难境地

linux - 在 Linux 网桥上过滤掉 VLAN 标记的数据包

linux - 在 AwesomeWM 的 Chrome 窗口之间移动撕下标签

linux - 如何使用 Gnuplot 通过命令行保存图形?

python - 使用 python 在 linux 中更改背光亮度