Ce mode de connexion au réseau fournit un réseau à plat et connecté au réseau de l’hyperviseur. Ce type de réseau est en général utilisé pour les floating ips mais il peut être utilisé directement par les instances en utilisant les commandes suivantes :
openstack network create --share --provider-physical-network provider --provider-network-type flat provider
openstack subnet create --network provider --allocation-pool start=10.42.0.128,end=10.42.0.191 \
--dns-nameserver 10.42.0.1 --gateway 10.42.0.1 --subnet-range 10.42.0.0/24 provider
Documentation :
/etc/neutron/neutron.conf :
[DEFAULT]
l3_ha = True
l3_ha_net_cidr = 169.254.192.0/18
/etc/neutron/l3_agent.ini :
[DEFAULT]
ha_vrrp_auth_password = password
Activer la HA sur le routeur :
neutron router-create router1 --ha=True
Enlever/Remettre un routeur sur un network node :
neutron l3-agent-list-hosting-router {router-id}
neutron l3-agent-router-remove {l3-agent-id} {router-id}
neutron l3-agent-router-add {l3-agent-id} {router-id}
/etc/neutron/neutron.conf :
[DEFAULT]
router_distributed = True
/etc/neutron/l3_agent.ini :
[DEFAULT]
agent_mode = dvr_snat
/etc/neutron/plugins/ml2/ml2_conf.ini :
[ml2]
type_drivers = flat,vxlan
tenant_network_types = vxlan
mechanism_drivers = linuxbridge,l2population
[ml2_type_flat]
flat_networks = physnet1
[ml2_type_vxlan]
vni_ranges = 1:1000
[securitygroup]
firewall_driver = iptables
enable_security_group = True
enable_ipset = True
[linux_bridge]
bridge_mappings = physnet1:virbr2
[vxlan]
enable_vxlan = True
local_ip = 192.168.123.1
l2_population = True
[agent]
tunnel_types = vxlan
/etc/neutron/l3_agent.ini :
[DEFAULT]
agent_mode = dvr