我在单个节点上安装了openstack,但对其进行了配置,以便以后可以为各种服务(主要是nova,swift )添加更多节点。为此,我使用两个以太网连接:用于与互联网通信的eth0和用于内部通信的eth1 (自单节点安装以来不再使用)(在this guide之后)。
为了从我的路由器桥接到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/interface:
# 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上。
现在,我可以与本地子网上的计算机通信,但不能通过路由器通信。我假设这是路由器问题,但我不确定。另外,如果是路由器问题,需要调用哪些设置才能使此设置正常工作?
编辑:我找到了一个指南here,上面说通过路由器的问题可能是由路由引起的-这是我的路由表
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发布于 2013-07-09 22:01:06
这个问题确实通过修改路由表得到了解决。问题是我的网关实际上是在192.168.1.1上。我使用ip route del default删除了默认记录,并使用ip route add default 192.168.1.1 dev br-ex为网关添加了默认路由,从而修复了这个问题
https://stackoverflow.com/questions/17546627
复制相似问题