# Example configuration for L2VNI mechanism driver # This file shows typical configuration for enabling baremetal # connectivity to VXLAN/Geneve overlay networks # # IMPORTANT: This driver requires OVN as the ML2 backend [ml2] # Enable the L2VNI mechanism driver # ORDER IS CRITICAL - baremetal-l2vni must come after ovn and before both # the switch management plugin (genericswitch) and baremetal. mechanism_drivers = ovn,baremetal-l2vni,genericswitch,baremetal # Enable overlay network types type_drivers = flat,vlan,vxlan,geneve # Set the default project network type for new networks. project_network_types = vxlan # Configure VLAN ranges for dynamic segment allocation # Each overlay network with baremetal ports will allocate one VLAN [ml2_type_vlan] network_vlan_ranges = physnet1:100:200,physnet2:300:400 # L2VNI mechanism driver configuration [baremetal_l2vni] # Automatically create OVN localnet ports (default: True) # # When to use True (default): # - Direct VLAN-to-VXLAN fabric attachment scenarios # - Using ML2 for direct attachment to a VLAN-to-VXLAN fabric # - OVN localnet ports enable the overlay<->physical network translation # # When to use False: # - Pure EVPN deployments where Neutron ensures attachment to remote # network infrastructure through tunnels rather than localnet ports # - When localnet ports are managed externally # # If using EVPN with tunnels, you likely want False create_localnet_ports = True # Default physical network for baremetal ports # If set, ports don't need to specify physical_network in binding profile # If not set, each port must specify physical_network in binding profile default_physical_network = physnet1 # The mechanism driver also reads the shared subport anchor network options # from the [l2vni] section (l2vni_subport_anchor_network and related settings), # which it shares with the L2VNI trunk reconciliation agent. These are not # repeated here to avoid divergence between the driver and agent configuration. # The driver and agent must use matching values. See: # - doc/source/configuration/ml2/l2vni-mechanism-driver.rst # - doc/source/admin/l2vni-trunk-reconciliation.rst # OVN configuration # Ensure bridge mappings are configured for your physical networks [ovn] ovn_nb_connection = tcp:127.0.0.1:6641 ovn_sb_connection = tcp:127.0.0.1:6642 # On each OVN chassis/compute node, configure bridge mappings: # ovs-vsctl set Open_vSwitch . \ # external-ids:ovn-bridge-mappings=physnet1:br-provider,physnet2:br-external # Example: Create a VXLAN network and baremetal port # # 1. Create tenant overlay network: # openstack network create \ # overlay-network # # Note: Only VXLAN and Geneve are supported. You must explicitly # specify the network type if your default is set to something else. # # 2. Create subnet: # openstack subnet create \ # --network overlay-network \ # --subnet-range 192.168.100.0/24 \ # overlay-subnet # # IMPORTANT: This example is if you are manually creating # a bare metal port and attaching it. Normal Ironic usage # and flow does not require the creation of a port with a # specific vnic-type nor providing a binding profile. # Ironic takes care of these aspects for a user. # # 3. Create baremetal port: # openstack port create \ # --network overlay-network \ # --vnic-type baremetal \ # --binding-profile physical_network=physnet1 \ # baremetal-port # # OR if default_physical_network is set: # openstack port create \ # --network overlay-network \ # --vnic-type baremetal \ # baremetal-port # # The driver will automatically: # - Allocate a dynamic VLAN segment (e.g., VLAN 150) on physnet1 # - Create an OVN localnet port to bridge VXLAN <-> VLAN 150 # - Bind the port using the VLAN segment # - A ML2 plugin, for example, Genericswitch, will configure any required # VXLAN to VLAN mapping inside of attached physical switches and physical # switch port.