Skip to content

Commit

Permalink
Make EVPN VLAN-Aware Bundle Service configurable (implements #344)
Browse files Browse the repository at this point in the history
  • Loading branch information
ipspace committed Aug 22, 2022
1 parent 8fcebf8 commit e0e5792
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 5 deletions.
3 changes: 3 additions & 0 deletions docs/module/evpn.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ EVPN module supports three design paradigms:
EVPN module supports these default/global/node parameters:

* **evpn.session** (global or node parameter): A list of BGP session types on which the EVPN address family is enabled (default: `ibgp`)
* **evpn.vlan_bundle_service** (global or node parameter): Use VLAN bundle service for VLANs within a VRF (default: `False`)
* **evpn.start_transit_vni** (system default parameter) -- the first symmetric IRB transit VNI

### VLAN-Based Service Parameters
Expand All @@ -69,6 +70,8 @@ EVPN configuration module sets the following default EVI/RD/RT values for [VXLAN

### VLAN-Aware Bundle Service

VLAN-Aware Bundle Service is disabled by default and has to be enabled by setting **evpn.vlan_bundle_service** parameter to _True_. Although that parameter is a global/node parameter, it might not be a good idea to use different settings on different nodes.

VLAN-Aware Bundle Service uses VRF configuration (and thus requires [VRF configuration module](vrf.md)). All VLANs belonging to a single VRF are configured as a VLAN bundle. [RD and RT values assigned by VRF module](vrf.md#rd-and-rt-values) are used to configure the VLAN bundle; you can set **evpn.evi** VRF parameter to set the EVPN Instance identifier.

The default value of VRF EVPN Instance identifier is the VLAN ID of the first VLAN in that VRF.
Expand Down
10 changes: 7 additions & 3 deletions netsim/modules/evpn.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,9 +166,13 @@ def node_post_transform(self, node: Box, topology: Box) -> None:

for vname in vlan_list:
vlan = node.vlans[vname]
if not 'vrf' in vlan: # VLAN-Based Service
#
# VLAN based service is used for VLANs that are not in a VRF or when the EVPN VLAN-Aware Bundle
# Service is disabled (default)
#
if not 'vrf' in vlan or not data.get_from_box(node,'evpn.vlan_bundle_service'):
vlan_based_service(vlan,vname,node,topology)
else: # VLAN-Aware Bundle Service or IRB
vlan_aware_bundle_service(vlan,vname,node,topology) # ... configure VLAN bundle to cope with bridging part of IRB
else:
vlan_aware_bundle_service(vlan,vname,node,topology)

vrf_irb_setup(node,topology)
5 changes: 3 additions & 2 deletions netsim/topology-defaults.yml
Original file line number Diff line number Diff line change
Expand Up @@ -119,9 +119,10 @@ evpn: # Enables the EVPN address family towards BGP peers
transform_after: [ vlan, vxlan, vrf ]
session: [ ibgp ]
start_transit_vni: 200000
vlan_bundle_service: False
attributes:
global: [ use_ibgp, session, start_transit_vni ]
node: [ use_ibgp, session ]
global: [ use_ibgp, session, start_transit_vni, vlan_bundle_service ]
node: [ use_ibgp, session, vlan_bundle_service ]
vlans: [ evpn.evi ]

vrf: # Basic VRF support
Expand Down

0 comments on commit e0e5792

Please sign in to comment.