3

我正在单个节点上设置 openstack 安装,但对其进行配置,以便以后可以为各种服务(主要是 nova,swift)添加更多节点。为此,我使用 2 个以太网连接: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/network/interfaces:

# 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
4

1 回答 1

2

通过更改路由表确实解决了这个问题。问题是我的网关实际上是打开的192.168.1.1。我通过删除默认记录来解决问题ip route del default,并为我的网关添加默认路由ip route add default 192.168.1.1 dev br-ex

于 2013-07-09T14:01:05.777 回答