Networking 如何使用OpenStack配置vSwitch

Networking 如何使用OpenStack配置vSwitch,networking,configuration,openstack,Networking,Configuration,Openstack,我正在一个节点上安装openstack,但要对其进行配置,以便以后可以为各种服务(主要是nova、swift)添加更多节点。为此,我使用了两个以太网连接:eth0用于与internet通信,而eth1用于内部通信(自单节点安装以来当前未使用)(如下) 为了将我的路由器连接到openstack虚拟网络,我使用openVSwitch,并配置了2个网桥,如下所示 #br-int will be used for VM integration ovs-vsctl add-br br-int #br-e

我正在一个节点上安装openstack,但要对其进行配置,以便以后可以为各种服务(主要是nova、swift)添加更多节点。为此,我使用了两个以太网连接:
eth0
用于与internet通信,而
eth1
用于内部通信(自单节点安装以来当前未使用)(如下)

为了将我的路由器连接到openstack虚拟网络,我使用openVSwitch,并配置了2个网桥,如下所示

#br-int will be used for VM integration
ovs-vsctl add-br br-int

#br-ex is used to make to access the internet
ovs-vsctl add-br br-ex
然后配置我的/etc/网络/接口:

# VM internet Access
auto eth0
iface eth0 inet manual
up ifconfig eth0 0.0.0.0 up
up ip link set eth0 promisc on
down ip link set eth0 promisc off
down ifconfig eth0 down

# add a static ip to the host machine to facilitate interet access
auto br-ex
iface br-ex inet static
address 192.168.100.51
netmask 255.255.255.0
gateway 192.168.100.1
dns-nameservers 8.8.8.8
我重新启动我的机器并运行

ovs-vsctl add-port br-ex eth0
将网桥连接到eth0

现在,我可以与本地子网上的计算机通信,但无法通过路由器通信。我想这是路由器的问题,但我不确定。此外,如果是路由器问题,将调用什么设置来允许此设置工作

编辑: 我找到了一本指南,上面说通过路由器的问题可能是由于路由问题——这是我的路由表

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
default         192.168.1.200   0.0.0.0         UG    0      0        0 br-ex
10.10.100.0     *               255.255.255.0   U     0      0        0 eth1
192.168.1.0     *               255.255.255.0   U     0      0        0 br-ex

通过改变路由表确实解决了这个问题。问题是我的网关实际上处于
192.168.1.1
状态。我通过使用
ip route del default
删除默认记录,并使用
ip route add default 192.168.1.1 dev br ex
为我的网关添加默认路由,修复了该问题