Generate configuration for EVPN/VXLAN for MX in L3 mode (w/ IRB)
- Overlay iBGP configuration
- L2 and L3 VRF per tenant
- VNI/VLAN creation with associated policy options
- IRB per VLAN/VNI (Optional)
- Route reflector (Optional)
Template can be found in overlay-evpn-mx-l3/templates/main.conf.j2
# Global parameters
build_dir: # Repository used save config generated by this role
# Per device parameters
loopback_ip: # Loopback ip in the defaul VRF, used as VTEP address
overlay:
local:
asn: # Local AS to build control plane of EVPN
neighbors: # List of IP address to configure BGP sessions. Must be RR if you are on leaves and must be leaves if you are on MXs. In any case, it must be loopback of devices
rr_bgp: # List of all route reflector -- ONLY for MXs / not supported for leaves
tenants:
<tenant_A_name>:
lo0_ip: # Loopback IP per tenant's VRF
id: # ID of the tenant
bridge_domains: # List all Bridge domains / vlan / vni
- vlan_id: # Vlan ID of the first bridge domain
vni_id: # VNI associated to this vlan
mask: # Netmask of the IRB -- ONLY for L3 devices
vip_ip: # IP address used to generate Virtual IP in each VNI -- ONLY for L3 devices
local_ip: # IP address used to generate local IP in each VNI -- ONLY for L3 devices
# Default parameters
bfd:
min_interval:
multiplier:
mode:It's recommended to use the role 'generate-tenant-vni' to generate most variables automatically
This template have been designed to used a variable structure mainly composed of hash/dict.
Leveraging Ansible option to merge hash, it become possible to have all required information coming from different variable files, in order to reduce data duplication.
- group_vars/group_name/overlay.yaml > Information shared across devices
- host_vars/device_name/overlay.yaml > information specific to single device
For Device 'mx480-01'
# host_vars/mx480-01/overlay.yaml
overlay:
local:
cluster: 2.2.2.2
local_ip: 212
rr_bgp: [ 100.0.0.11, 100.0.0.13, 100.0.0.14 ]
neighbors: [ 100.0.0.21, 100.0.0.22 ]# host_vars/mx480-01/generated_tenant_vni.yaml
overlay:
tenants:
tenant10:
lo0_ip: 200.0.10.4
id: 10
bridge_domains:
- vlan_id: 100
vni_id: 9100
network: 100.0.1.0
vip: 100.0.1.1
local_ip: 100.0.1.4
mask: 24
- vlan_id: 101
vni_id: 9101
network: 100.0.2.0
vip: 100.0.2.1
local_ip: 100.0.2.4
mask: 24
tenant11:
lo0_ip: 200.0.11.4
id: 11
bridge_domains:
- vlan_id: 120
vni_id: 9120
network: 100.0.21.0
vip: 100.0.21.1
local_ip: 100.0.21.4
mask: 24
- vlan_id: 121
vni_id: 9121
network: 100.0.22.0
vip: 100.0.22.1
local_ip: 100.0.22.4
mask: 24In the root directory of your project, create a file name ansible.cfg and add :
[defaults]
hash_behaviour=merge