配置完openstack后,发现云主机不能上网,云主机之间的固定ip和浮动ip是可以ping通的。
发现是网络设置有问题:
Host的固定ip没有设置网关导致的!
auto vlan82
iface vlan82 inet static
vlan_raw_device bond0
address 10.10.82.230
netmask 255.255.255.0
gateway 10.10.82.254
#floating
auto vlan201
iface vlan201 inet static
vlan_raw_device bond0
address 192.168.139.230
netmask 255.255.255.0
auto vlan202
iface vlan202 inet manual
vlan_raw_device bond0
auto br100
iface br100 inet static
bridge_ports vlan202
address 192.168.138.230
netmask 255.255.255.0
gatway 192.168.138.254
宿主机默认的网络路由如下:
default via 10.10.82.254 dev vlan82
10.10.82.0/24 dev vlan82 proto kernel scope link src 10.10.82.230
192.168.138.0/24 dev br100 proto kernel scope link src 192.168.138.230
192.168.139.0/24 dev vlan201 proto kernel scope link src 192.168.139.230