neutron

Created 星期一 14 三月 2016

+l3_ha

方案: http://geek.csdn.net/news/detail/71426

常用命令: ovs-vsctl show

ovs-vsctl list-br 查看br
ovs-vsctl del-br

添加网桥 ovs-vsctl add-br br-ex-2 ovs-vsctl add-port br-ex-2 eth2

subnet-update {subnet-id} --enable_dhcp=false

1, 需要在l3-agent.ini中将gateway_external_network_id与external_network_bridge设置成空 gateway_external_network_id = external_network_bridge = 2, /etc/neutron/plugins/openvswitch/ovs_neutron_plugin.ini bridge_mappings = physnet1:br-eth0,physnet2:br-eth1 3, 创建两个router(l3-agent的_process_routers会周期性处理这两个router关联的网关),各关联一个外部网络

neutron net-create ext_net_1 -- --router:external=True --provider:network_type flat --provider:physical_network physnet1

neutron subnet-create --allocation-pool start=192.168.100.102,end=192.168.100.126 --gateway 192.168.100.1 ext_net_1 192.168.100.100/24 --enable_dhcp=False

neutron router-interface-add $ROUTER_ID_1 $SUBNET_ID_1 neutron router-gateway-set $ROUTER_ID_1 $EXT_NET_ID_1

neutron net-create ext_net_2 -- --router:external=True --provider:network_type flat --provider:physical_network physnet2

neutron subnet-create --allocation-pool start=192.168.101.102,end=192.168.101.126 --gateway 192.168.101.1 ext_net_2 192.168.100.101/24 --enable_dhcp=False

neutron router-interface-add $ROUTER_ID_2 $SUBNET_ID_2 neutron router-gateway-set $ROUTER_ID_2 $EXT_NET_ID_2