OS:RHEL6.4
OpenStack version:Havana
Controller node : 一台KVM
Compute node :一台ESXI
创建flat 网络
参考http://blog.csdn.net/starean/article/details/16801949
比较全的网络配置
1. Edit conf files in Controller node:
/etc/neutron/neutron.conf
[DEFAULT]
core_plugin = neutron.plugins.ml2.plugin.Ml2Plugin
# 如果需要neutron l3 agent work(router/NAT) 此处需要制定L3 plugin
service_plugins = neutron.services.l3_router.l3_router_plugin.L3RouterPlugin
[database]
connection = mysql://neutron:neutron@xianghui-10-9-1-141.sce.cn.ibm.com/ovs_neutron
/etc/neutron/plugins/ml2/ml2_conf.ini
[ml2]
type_drivers = flat
tenant_network_types = flat
mechanism_drivers = openvswitch
[ml2_type_flat]
flat_networks = physnet1
/etc/neutron/plugins/openvswitch/ovs_neutron_plugin.ini
[ovs]
bridge_mappings = physnet1:br-eth0
2. 用openvswitch创建虚拟桥, 并绑定物理网卡(此处选择eth1, eth0作为management 网络)
前期部署的时候最好有两个网卡,如果只有一个网卡,在绑定物理网卡的过程中网络会被断开
ovs-vsctl add-br br-eth0
ovs-vsctl add-port br-eth0 eth1
# 目前无法用service neutron-server restart来load ml2配置,暂时用下面命令替代重启neutron-server
/usr/bin/python /usr/bin/neutron-server --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/plugin.ini --config-file /etc/neutron/plugins/ml2/ml2_conf.ini --log-file /var/log/neutron/server.log &
service neutron-openvswitch-agent restart
service neutron-dhcp-agent restart
[root@xianghui-10-9-1-141 SDK]# ovs-vsctl show
c68671ea-d3d2-4f04-b806-7be10e65936e
Bridge "br-eth0"
Port "phy-br-eth0"
Interface "phy-br-eth0"
Port "eth1"
Interface "eth1"
Port "br-eth0"
Interface "br-eth0"
type: internal
Bridge br-int
Port "tap922fa636-15"
tag: 4095
Interface "tap922fa636-15"
type: internal
Port br-int
Interface br-int
type: internal
Port "tapc6ae5432-66"
tag: 4095
Interface "tapc6ae5432-66"
type: internal
Port "tap909c5f0b-61"
tag