Skip to content

Commit

Permalink
Feat(eos_cli_config_gen): Expand CLI to support DualEncap MH EVPN GW …
Browse files Browse the repository at this point in the history
…requirements (#4613)
  • Loading branch information
colinmacgiolla authored Oct 30, 2024
1 parent 709d7b4 commit 251d9da
Show file tree
Hide file tree
Showing 8 changed files with 113 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -146,9 +146,15 @@ ASN Notation: asplain

| Settings | Value |
| -------- | ----- |
| Local Domain | 65101:0 |
| Remote Domain | 65101:1 |
| Remote Domain Peer Groups | EVPN-OVERLAY-PEERS |
| L3 Gateway Configured | True |
| L3 Gateway Inter-domain | True |
| Local Domain: Ethernet-Segment Identifier | 0011:1111:1111:1111:1111 |
| Local Domain: Ethernet-Segment import Route-Target | 11:11:11:11:11:11 |
| Remote Domain: Ethernet-Segment Identifier | 0022:2222:2222:2222:2222 |
| Remote Domain: Ethernet-Segment import Route-Target | 22:22:22:22:22:22 |

#### Router BGP VLAN Aware Bundles

Expand Down Expand Up @@ -325,11 +331,20 @@ router bgp 65101
neighbor 10.100.100.5 activate
neighbor 10.100.100.5 encapsulation mpls
domain identifier 65101:0
domain identifier 65101:1 remote
next-hop resolution disabled
neighbor default next-hop-self received-evpn-routes route-type ip-prefix inter-domain
host-flap detection window 10 threshold 1 expiry timeout 3 seconds
layer-2 fec in-place update
route import overlay-index gateway
!
evpn ethernet-segment domain local
identifier 0011:1111:1111:1111:1111
route-target import 11:11:11:11:11:11
!
evpn ethernet-segment domain remote
identifier 0022:2222:2222:2222:2222
route-target import 22:22:22:22:22:22
!
address-family ipv4
no neighbor EVPN-OVERLAY-PEERS activate
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -148,11 +148,20 @@ router bgp 65101
neighbor 10.100.100.5 activate
neighbor 10.100.100.5 encapsulation mpls
domain identifier 65101:0
domain identifier 65101:1 remote
next-hop resolution disabled
neighbor default next-hop-self received-evpn-routes route-type ip-prefix inter-domain
host-flap detection window 10 threshold 1 expiry timeout 3 seconds
layer-2 fec in-place update
route import overlay-index gateway
!
evpn ethernet-segment domain local
identifier 0011:1111:1111:1111:1111
route-target import 11:11:11:11:11:11
!
evpn ethernet-segment domain remote
identifier 0022:2222:2222:2222:2222
route-target import 22:22:22:22:22:22
!
address-family ipv4
no neighbor EVPN-OVERLAY-PEERS activate
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ router_bgp:
inter_domain: true
encapsulation: path-selection
domain_identifier: "65101:0"
domain_identifier_remote: "65101:1"
neighbors:
- ip_address: 10.100.100.1
activate: true
Expand Down Expand Up @@ -191,6 +192,13 @@ router_bgp:
- name: TEST-ENCAPSULATION-2
activate: true
encapsulation: path-selection
evpn_ethernet_segment:
- domain: remote
identifier: "0022:2222:2222:2222:2222"
route_target_import: "22:22:22:22:22:22"
- domain: local
identifier: "0011:1111:1111:1111:1111"
route_target_import: "11:11:11:11:11:11"
evpn_hostflap_detection:
enabled: true
window: 10
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -645,6 +645,12 @@ ASN Notation: {{ router_bgp.as_notation | arista.avd.default('asplain') }}

| Settings | Value |
| -------- | ----- |
{% if router_bgp.address_family_evpn.domain_identifier is arista.avd.defined %}
| Local Domain | {{ router_bgp.address_family_evpn.domain_identifier }} |
{% endif %}
{% if router_bgp.address_family_evpn.domain_identifier_remote is arista.avd.defined %}
| Remote Domain | {{ router_bgp.address_family_evpn.domain_identifier_remote }} |
{% endif %}
{% if evpn_gw_config.peer_groups | length > 0 %}
| Remote Domain Peer Groups | {{ evpn_gw_config.peer_groups | join(", ") }} |
{% endif %}
Expand All @@ -654,6 +660,14 @@ ASN Notation: {{ router_bgp.as_notation | arista.avd.default('asplain') }}
{% if router_bgp.address_family_evpn.neighbor_default.next_hop_self_received_evpn_routes.inter_domain is arista.avd.defined(true) %}
| L3 Gateway Inter-domain | True |
{% endif %}
{% for segment in router_bgp.address_family_evpn.evpn_ethernet_segment | arista.avd.natural_sort('domain') %}
{% if segment.identifier is arista.avd.defined %}
| {{ segment.domain | title }} Domain: Ethernet-Segment Identifier | {{ segment.identifier }} |
{% endif %}
{% if segment.route_target_import is arista.avd.defined %}
| {{ segment.domain | title }} Domain: Ethernet-Segment import Route-Target | {{ segment.route_target_import }} |
{% endif %}
{% endfor %}
{% endif %}
{% if router_bgp.address_family_ipv4_labeled_unicast is arista.avd.defined %}

Expand Down
13 changes: 13 additions & 0 deletions python-avd/pyavd/_eos_cli_config_gen/j2templates/eos/router-bgp.j2
Original file line number Diff line number Diff line change
Expand Up @@ -941,6 +941,9 @@ router bgp {{ router_bgp.as }}
{% if router_bgp.address_family_evpn.domain_identifier is arista.avd.defined %}
domain identifier {{ router_bgp.address_family_evpn.domain_identifier }}
{% endif %}
{% if router_bgp.address_family_evpn.domain_identifier_remote is arista.avd.defined %}
domain identifier {{ router_bgp.address_family_evpn.domain_identifier_remote }} remote
{% endif %}
{% if router_bgp.address_family_evpn.next_hop.resolution_disabled is arista.avd.defined(true) %}
next-hop resolution disabled
{% endif %}
Expand Down Expand Up @@ -981,6 +984,16 @@ router bgp {{ router_bgp.as }}
{% if router_bgp.address_family_evpn.route.import_overlay_index_gateway is arista.avd.defined(true) %}
route import overlay-index gateway
{% endif %}
{% for segment in router_bgp.address_family_evpn.evpn_ethernet_segment | arista.avd.natural_sort('domain') %}
!
evpn ethernet-segment domain {{ segment.domain }}
{% if segment.identifier is arista.avd.defined %}
identifier {{ segment.identifier }}
{% endif %}
{% if segment.route_target_import is arista.avd.defined %}
route-target import {{ segment.route_target_import }}
{% endif %}
{% endfor %}
{% endif %}
{# address family flow-spec ipv4 activation #}
{% if router_bgp.address_family_flow_spec_ipv4 is arista.avd.defined %}
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -1248,6 +1248,8 @@ keys:
keys:
domain_identifier:
type: str
domain_identifier_remote:
type: str
neighbor_default:
type: dict
keys:
Expand Down Expand Up @@ -1455,6 +1457,24 @@ keys:
- str
min: 0
max: 300
evpn_ethernet_segment:
type: list
primary_key: domain
items:
type: dict
keys:
domain:
type: str
valid_values:
- all
- local
- remote
identifier:
type: str
description: EVPN Ethernet Segment Identifier (Type 1 format).
route_target_import:
type: str
description: Low-order 6 bytes of ES-Import Route Target.
bgp_additional_paths:
type: dict
deprecation:
Expand Down

0 comments on commit 251d9da

Please sign in to comment.