|
| 1 | +(plugin-evpn-multihoming)= |
| 2 | +# EVPN Multihoming (EVPN Ethernet Segment) |
| 3 | + |
| 4 | +This plugin allows for simple EVPN Ethernet Segment configuration, also know as EVPN Multihoming. |
| 5 | + |
| 6 | +For now, the plugin supports: |
| 7 | +* ES definition on LAG or "physical" interfaces (depending on platform support) |
| 8 | +* Only `all-active` multihoming |
| 9 | +* Manual or Auto-Generated (based on LACP) Ethernet Segment Identifier |
| 10 | + |
| 11 | +## Supported Platforms |
| 12 | + |
| 13 | +The plugin includes Jinja2 templates for the following platforms: |
| 14 | + |
| 15 | +| Operating system | ES on LAG (ESI-LAG) | ES on other interfaces | Auto ESI | |
| 16 | +| ------------------- | :--: | :--: | :--: | |
| 17 | +| Arista EOS | ✅ | ✅ | ✅ | |
| 18 | +| Cumulus NVUE | ✅ | ❌ | ❌ | |
| 19 | +| vJunos Switch | ✅ | ✅ | ✅ | |
| 20 | + |
| 21 | + |
| 22 | +## Using the Plugin (auto mode) |
| 23 | + |
| 24 | +* Add `plugin: [ evpn.multihoming ]` to the lab topology. |
| 25 | +* Include the **evpn.es** attribute in the device interface |
| 26 | + |
| 27 | +netlab will generate, for each *Ethernet Segment*, ESI value (*Ethernet Segment ID*) and LACP System ID (for *ESI-LAG*). |
| 28 | + |
| 29 | +**NOTE**: Ethernet Segments ID will be generated starting from an integer value, which will be used as the first 5 most significant bytes (excluding the initial `0x00`). This is to: |
| 30 | + |
| 31 | +* be able to generate a 6-bytes LACP System ID starting with `0x02`. |
| 32 | +* be able to generate unique *ES-Import* target for each auto generated ESI value. |
| 33 | + |
| 34 | +## Using the Plugin (manual mode) |
| 35 | + |
| 36 | +It is also possible to manually define ESI values for your *Ethernet Segments*. In that case: |
| 37 | + |
| 38 | +* Add `plugin: [ evpn.multihoming ]` to the lab topology. |
| 39 | +* Define a set of *ethernet segments* on the topology top-level |
| 40 | +* Include the **evpn.es** attribute in the device interface |
| 41 | + |
| 42 | +**NOTE**: EVPN Multihoming, for ESI-LAG, requires that all LAG interfaces belonging to the same *ethernet segment* share the same (unique) LACP System ID. This can be achieved using the `lag.lacp_system_id` attribute - which can accept a "real" mac address value or an integer (*1-65535*) value: in that case it will generate a mac value in the format `02:xx:yy:xx:yy:00` (i.e., `1` will become `02:00:01:00:01:00`). |
| 43 | + |
| 44 | +### Supported attributes |
| 45 | + |
| 46 | +The plugin adds the following attributes defined at topology level: |
| 47 | +* **evpn.ethernet_segments** (dict) -- Key is the **ethernet segment** name. Each item is a *dict* with the following attributes: |
| 48 | + * **id** (esi_id, mandatory) -- ESI in format `00:XX:XX:XX:XX:XX:XX:XX:XX:XX` (only Type-0 ESI is supported for now) |
| 49 | + * **auto** (bool) -- Use ESI auto generation based on LACP System ID. If both `id` and `auto` are specified, explicit `id` takes over. |
| 50 | + |
| 51 | +Interface level attributes: |
| 52 | +* **evpn.es** (str) -- ethernet segment name (can be defined on `evpn.ethernet_segments`). |
| 53 | + |
| 54 | +## Example (auto mode) |
| 55 | + |
| 56 | +``` |
| 57 | +plugin: [ 'evpn.multihoming' ] |
| 58 | + |
| 59 | +bgp.as: 65000 |
| 60 | + |
| 61 | +groups: |
| 62 | + _auto_create: true |
| 63 | + switches: |
| 64 | + members: [ s1, s2 ] |
| 65 | + module: [ vlan, vxlan, ospf, bgp, evpn, lag ] |
| 66 | + probes: |
| 67 | + members: [ x1 ] |
| 68 | + module: [ lag, vlan ] |
| 69 | + device: eos |
| 70 | + hosts: |
| 71 | + members: [ h1, h2, h3 ] |
| 72 | + device: linux |
| 73 | + provider: clab |
| 74 | + |
| 75 | +vlans: |
| 76 | + red: |
| 77 | + mode: bridge |
| 78 | + links: [ h1-x1, h2-s1, h3-s2 ] |
| 79 | + |
| 80 | +links: |
| 81 | +# EVPN/VXLAN Switch to Switch Link |
| 82 | +- s1: |
| 83 | + s2: |
| 84 | + mtu: 1600 |
| 85 | +# ESI-LAG |
| 86 | +- lag: |
| 87 | + members: |
| 88 | + - s1: |
| 89 | + evpn.es: seg_1 |
| 90 | + x1: |
| 91 | + - s2: |
| 92 | + evpn.es: seg_1 |
| 93 | + x1: |
| 94 | + vlan.access: red |
| 95 | +``` |
| 96 | + |
| 97 | +## Example (manual mode) |
| 98 | + |
| 99 | +``` |
| 100 | +plugin: [ 'evpn.multihoming' ] |
| 101 | + |
| 102 | +bgp.as: 65000 |
| 103 | + |
| 104 | +evpn.ethernet_segments: |
| 105 | + seg_1.id: 00:11:22:33:44:55:66:77:88:99 |
| 106 | + |
| 107 | +groups: |
| 108 | + _auto_create: true |
| 109 | + switches: |
| 110 | + members: [ s1, s2 ] |
| 111 | + module: [ vlan, vxlan, ospf, bgp, evpn, lag ] |
| 112 | + probes: |
| 113 | + members: [ x1 ] |
| 114 | + module: [ lag, vlan ] |
| 115 | + device: eos |
| 116 | + hosts: |
| 117 | + members: [ h1, h2, h3 ] |
| 118 | + device: linux |
| 119 | + provider: clab |
| 120 | + |
| 121 | +vlans: |
| 122 | + red: |
| 123 | + mode: bridge |
| 124 | + links: [ h1-x1, h2-s1, h3-s2 ] |
| 125 | + |
| 126 | +links: |
| 127 | +# EVPN/VXLAN Switch to Switch Link |
| 128 | +- s1: |
| 129 | + s2: |
| 130 | + mtu: 1600 |
| 131 | +# ESI-LAG |
| 132 | +- lag: |
| 133 | + members: |
| 134 | + - s1: |
| 135 | + lag.lacp_system_id: 1 |
| 136 | + evpn.es: seg_1 |
| 137 | + x1: |
| 138 | + - s2: |
| 139 | + lag.lacp_system_id: 1 |
| 140 | + evpn.es: seg_1 |
| 141 | + x1: |
| 142 | + vlan.access: red |
| 143 | +``` |
0 commit comments