#openstack pike 使用 linuxbridge + vlan
openstack pike 集群高可用 安装部署 汇总 http://www.cnblogs.com/elvi/p/7613861.html
#使用linuxbridge配置vlan网络示例
#vlan-linuxbridge.txt.sh #实际使用,还是vlan网络实用
#对应物理网卡连接交换机trunk,在交换机创建vlan,即可在openstack创建vlan网络 ##################
#开启vlan #控制节点
#配置type_drivers、ml2_type_vlan
openstack-config --set /etc/neutron/plugins/ml2/ml2_conf.ini ml2 tenant_network_types vlan
openstack-config --set /etc/neutron/plugins/ml2/ml2_conf.ini ml2 type_drivers flat,vlan
openstack-config --set /etc/neutron/plugins/ml2/ml2_conf.ini ml2_type_vlan network_vlan_ranges provider:1001:2000
#provider对应网卡lable,在linuxbridge_agent.ini配置对应物理网卡 systemctl restart neutron-server
netstat -antp|grep 9696 #计算节点
systemctl restart neutron-linuxbridge-agent ##################
#创建vlan网络 #vlan8
openstack network create --share --provider-segment=8 \
--provider-network-type=vlan --provider-physical-network provider \
vlan_192.168.4
#子网
openstack subnet create --network vlan_192.168.4 \
--allocation-pool start=192.168.4.100,end=192.168.4.200 \
--dns-nameserver 119.29.29.29 --dns-nameserver 114.114.114.114 \
--gateway 192.168.4.1 --subnet-range 192.168.4.0/24 \
net_192.168.4 ##################
#创建VM示例 #vm01
nova boot --flavor test --image cirros \
--nic net-name=vlan_192.168.4 --security-group default --key-name mykey \
vm01 ##################