Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat(eos_designs): Uplink p2p vrfs #3467

Merged
merged 45 commits into from
Jan 26, 2024
Merged
Show file tree
Hide file tree
Changes from 15 commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
80a80f4
Refactor: Move filtered_tenants to shared_utils
gmuloc Dec 18, 2023
df4f7a5
WIP
gmuloc Dec 18, 2023
dd8e10e
CI: 2024
gmuloc Jan 3, 2024
4e761a3
Refactor: Allow bgp_as in shared_utils for p2p-vrfs uplink type
gmuloc Jan 3, 2024
e38e279
Refactor: Adding back some cached property not needed before rebase
gmuloc Jan 3, 2024
0be1703
Feat(eos_designs): Add subinterfaces on each side of the link
gmuloc Jan 4, 2024
9a87449
Refactor: Missed on _filtered_tenants
gmuloc Jan 4, 2024
244bbca
Refactor: Proper type and encap on subif
gmuloc Jan 4, 2024
e1e1620
Refactor: Rename underlay_p2p_vrfs to p2p_vrfs
gmuloc Jan 5, 2024
208fe3f
Feat: Configure subif for VRFS only on both ends of the uplink
gmuloc Jan 5, 2024
6ad97c2
WIP
gmuloc Jan 5, 2024
d576060
WIP
gmuloc Jan 5, 2024
718e6f0
Test: Add test for VRF on L2LEAF attracted to the uplink of L3 leaf
gmuloc Jan 10, 2024
8f77f65
Feat: Prevent different vrf_id on VRF in multiple Tenants
gmuloc Jan 10, 2024
0b426f0
Test: Move impacted negative tests to facts
gmuloc Jan 10, 2024
31399ef
Merge branch 'devel' into uplink-p2p-vrfs
gmuloc Jan 17, 2024
838f823
Test: Refactor molecule as per comment
gmuloc Jan 17, 2024
c0ee132
Refactor: Address ptp, macsec, ... PR comments
gmuloc Jan 17, 2024
afa5093
Fixes, updates, improvements
ClausHolbechArista Jan 18, 2024
b1768c0
Always use main interface for VRF default
ClausHolbechArista Jan 18, 2024
0018e92
Implement BGP logic for p2p-vrfs
ClausHolbechArista Jan 19, 2024
a66af6d
Fix facts logic
ClausHolbechArista Jan 19, 2024
6dcf72e
Merge branch 'devel' into uplink-p2p-vrfs
gmuloc Jan 22, 2024
1cb1b7f
Refactor: Address PR comments - add top level key for BGP VRF config
gmuloc Jan 22, 2024
8caa62d
Refactor: Revert logic change as our bool can be None
gmuloc Jan 23, 2024
7642bec
Doc: Update message for p2p-vrfs
gmuloc Jan 23, 2024
93fb7c3
Merge branch 'devel' into uplink-p2p-vrfs
gmuloc Jan 23, 2024
6d78de0
Merge branch 'devel' into uplink-p2p-vrfs
gmuloc Jan 24, 2024
d575067
Test: Fix molecule error message
gmuloc Jan 24, 2024
9f46e73
Test: Revert negative test changes
gmuloc Jan 24, 2024
1887c80
Refactor: Add subif id to description for p2p-vrfs
gmuloc Jan 24, 2024
2eb27cb
Merge branch 'devel' into uplink-p2p-vrfs
gmuloc Jan 24, 2024
1298a70
Doc: Fix documenation for new key
gmuloc Jan 24, 2024
0e6221c
Refactor: Add vrf in BGP neighbor VRF
gmuloc Jan 24, 2024
f0e60af
Doc: Add caveat for description customization for subinterfaces
gmuloc Jan 24, 2024
26f6250
Doc: Change wording
gmuloc Jan 24, 2024
28b24f3
Doc: Typo
gmuloc Jan 24, 2024
98eb528
Merge branch 'devel' into uplink-p2p-vrfs
gmuloc Jan 25, 2024
3665929
Refactor: Address PR comments
gmuloc Jan 25, 2024
97cb83b
Doc: Update doc
gmuloc Jan 25, 2024
46c96da
Refactor(eos_designs): Address PR comments
gmuloc Jan 26, 2024
ca43e64
Merge branch 'devel' into uplink-p2p-vrfs
gmuloc Jan 26, 2024
1f64d08
Fix: Error when merging
gmuloc Jan 26, 2024
0499c72
Refactor: Make p2p-vrfs uplink device always use new behavior
gmuloc Jan 26, 2024
8371e9e
Doc: Remove preview mode from nerd knobs. Alea Jacta Est
gmuloc Jan 26, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,48 @@
- ansible_failed_result is defined
- ansible_failed_result.msg == expected_error_message

- name: Converge Negative tests for 'eos_designs_facts'
hosts: duplicate_vrfs_vni_conflict
connection: local
tasks:
- name: Run failure scenario Test
block:
- name: Trigger Error
ansible.builtin.import_role:
name: arista.avd.eos_designs
rescue:
- name: Error message
run_once: true
ansible.builtin.debug:
var: ansible_failed_result.msg
- name: Assert eos_designs failed with the expected error message
run_once: true
ansible.builtin.assert:
that:
- ansible_failed_result is defined
- ansible_failed_result.msg == expected_error_message

- name: Converge Negative tests for 'eos_designs_facts'
hosts: failure_missing_evpn_multicast_l3
connection: local
tasks:
- name: Run failure scenario Test
block:
- name: Trigger Error
ansible.builtin.import_role:
name: arista.avd.eos_designs
rescue:
- name: Error message
run_once: true
ansible.builtin.debug:
var: ansible_failed_result.msg
- name: Assert eos_designs failed with the expected error message
run_once: true
ansible.builtin.assert:
that:
- ansible_failed_result is defined
- ansible_failed_result.msg == expected_error_message

- name: Converge Negative tests for 'eos_designs_structured_config'
hosts: EOS_DESIGNS_FAILURES
gather_facts: false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
# It is recommended to only define a VRF in one Tenant. If the same VRF name is used across multiple tenants and those tenants
# are accepted by `filter.tenants` on the node, any object set under the duplicate VRFs must either be unique or be an exact match.

fabric_name: duplicate_vrfs_id_conflict

type: l3leaf
l3leaf:
defaults:
Expand Down Expand Up @@ -44,8 +46,4 @@ tenants:
ip_address_virtual: 10.0.100.1/24

expected_error_message: >-
Found duplicate objects with conflicting data while generating configuration for BGP VRFs defined under network services.
{'name': 'VRF1', 'rd': '192.168.255.101:1', 'route_targets': {'import': [{'address_family': 'evpn', 'route_targets': ['1:1']}],
'export': [{'address_family': 'evpn', 'route_targets': ['1:1']}]}} conflicts with {'name': 'VRF1', 'rd': '192.168.255.101:2',
'route_targets': {'import': [{'address_family': 'evpn', 'route_targets': ['2:2']}], 'export': [{'address_family': 'evpn',
'route_targets': ['2:2']}]}}.
Found duplicate objects with conflicting data while generating configuration for VRFs in multiple tenants. {'name': 'VRF1', 'vrf_id': 1} conflicts with {'name': 'VRF1', 'vrf_id': 2}.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ type: l3leaf
underlay_multicast: true
evpn_multicast: false

fabric_name: failure_missing_evpn_multicast_l3

l3leaf:
defaults:
# LOOPBACK AND VTEP MANAGEMENT
Expand Down Expand Up @@ -40,4 +42,4 @@ tenants:
tags: ['evpn-multicast-l3']

expected_error_message: >-
'evpn_l3_multicast: true' under VRF Tenant_A_OP_Zone_MC or Tenant FABRIC; this requires 'evpn_multicast' to also be set to true.
Unexpected failure during module execution: 'evpn_l3_multicast: true' under VRF Tenant_A_OP_Zone_MC or Tenant FABRIC; this requires 'evpn_multicast' to also be set to true.
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,12 @@ all:
fabric_wan_role_overlay_routing_protocol:
hosts:
invalid-wan-role-overlay-routing-protocol:
duplicate_vrfs_id_conflict:
hosts:
duplicate-vrfs-id-conflict:
failure_missing_evpn_multicast_l3:
hosts:
failure-missing-evpn-multicast-l3:
EOS_DESIGNS_FAILURES: # Add cases that fail during 'eos_designs_structured_config' phase
hosts:
failure-port-channel:
Expand All @@ -57,7 +63,6 @@ all:
duplicate-vlans-l2vlans:
duplicate-vlans-svi-id:
duplicate-vrfs-duplicate-svi-name-conflict:
duplicate-vrfs-id-conflict:
duplicate-vrfs-vni-conflict:
duplicate-vrfs-tenant-igmp-snooping-conflict:
duplicate-interface-l3-edge:
Expand All @@ -76,7 +81,6 @@ all:
duplicate-ip-address-uplink-switch-router-bgp:
failure-missing-evpn-vlan-bundle:
failure-missing-evpn-multicast-l2:
failure-missing-evpn-multicast-l3:
failure-missing-evpn-multicast-l3-with-pim:
failure-missing-evpn-multicast-peg-rps:
failure-duplicate-evpn-vlan-bundle-name:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
!RANCID-CONTENT-TYPE: arista
!
vlan internal order ascending range 1006 1199
!
transceiver qsfp default-mode 4x10G
!
service routing protocols model multi-agent
!
hostname UPLINK_P2P_VRFS_TESTS_L2LEAF1
!
no enable password
no aaa root
!
vlan 66
name TEST-L2VLAN-ATTRACTION
!
vrf instance MGMT
!
interface Port-Channel1
description UPLINK_P2P_VRFS_TESTS_LEAF1_Po51
no shutdown
switchport
switchport trunk allowed vlan 66
switchport mode trunk
!
interface Ethernet1
description UPLINK_P2P_VRFS_TESTS_LEAF1_Ethernet51
no shutdown
channel-group 1 mode active
!
interface Ethernet2
description UPLINK_P2P_VRFS_TESTS_LEAF1_Ethernet52
no shutdown
channel-group 1 mode active
no ip routing vrf MGMT
!
management api http-commands
protocol https
no shutdown
!
vrf MGMT
no shutdown
!
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,138 @@
!RANCID-CONTENT-TYPE: arista
!
vlan internal order ascending range 1006 1199
!
transceiver qsfp default-mode 4x10G
!
service routing protocols model multi-agent
!
hostname UPLINK_P2P_VRFS_TESTS_LEAF1
!
no enable password
no aaa root
!
vlan 66
name TEST-L2VLAN-ATTRACTION
!
vrf instance IT
!
vrf instance MGMT
!
vrf instance ONLY-ON-L2LEAF
!
vrf instance PROD
!
interface Port-Channel51
description UPLINK_P2P_VRFS_TESTS_L2LEAF1_Po1
no shutdown
switchport
switchport trunk allowed vlan 66
switchport mode trunk
!
interface Ethernet1
description P2P_LINK_TO_UPLINK_P2P_VRFS_TESTS_SPINE1_Ethernet1
no shutdown
mtu 9214
no switchport
gmuloc marked this conversation as resolved.
Show resolved Hide resolved
!
interface Ethernet1.42
description P2P_LINK_TO_UPLINK_P2P_VRFS_TESTS_SPINE1_Ethernet1 vrf: PROD
no shutdown
encapsulation dot1q vlan 42
vrf PROD
ip address 10.42.42.9/31
!
interface Ethernet1.66
description P2P_LINK_TO_UPLINK_P2P_VRFS_TESTS_SPINE1_Ethernet1 vrf: ONLY-ON-L2LEAF
no shutdown
encapsulation dot1q vlan 66
vrf ONLY-ON-L2LEAF
ip address 10.42.42.9/31
!
interface Ethernet2
description P2P_LINK_TO_UPLINK_P2P_VRFS_TESTS_SPINE2_Ethernet2
no shutdown
mtu 9214
no switchport
!
interface Ethernet2.1
description P2P_LINK_TO_UPLINK_P2P_VRFS_TESTS_SPINE2_Ethernet2 vrf: default
no shutdown
encapsulation dot1q vlan 1
ip address 10.42.42.11/31
!
interface Ethernet2.42
description P2P_LINK_TO_UPLINK_P2P_VRFS_TESTS_SPINE2_Ethernet2 vrf: PROD
no shutdown
encapsulation dot1q vlan 42
vrf PROD
ip address 10.42.42.11/31
!
interface Ethernet2.100
description P2P_LINK_TO_UPLINK_P2P_VRFS_TESTS_SPINE2_Ethernet2 vrf: IT
no shutdown
encapsulation dot1q vlan 100
vrf IT
ip address 10.42.42.11/31
!
interface Ethernet51
description UPLINK_P2P_VRFS_TESTS_L2LEAF1_Ethernet1
no shutdown
channel-group 51 mode active
!
interface Ethernet52
description UPLINK_P2P_VRFS_TESTS_L2LEAF1_Ethernet2
no shutdown
channel-group 51 mode active
!
interface Loopback0
description EVPN_Overlay_Peering
no shutdown
ip address 192.168.42.3/32
!
interface Vlan66
description TEST-L2VLAN-ATTRACTION
shutdown
vrf ONLY-ON-L2LEAF
!
ip routing
ip routing vrf IT
no ip routing vrf MGMT
ip routing vrf ONLY-ON-L2LEAF
ip routing vrf PROD
!
router bfd
multihop interval 300 min-rx 300 multiplier 3
!
router bgp 65000
router-id 192.168.42.3
maximum-paths 4 ecmp 4
update wait-install
no bgp default ipv4-unicast
neighbor EVPN-OVERLAY-PEERS peer group
neighbor EVPN-OVERLAY-PEERS update-source Loopback0
neighbor EVPN-OVERLAY-PEERS bfd
neighbor EVPN-OVERLAY-PEERS ebgp-multihop 3
neighbor EVPN-OVERLAY-PEERS send-community
neighbor EVPN-OVERLAY-PEERS maximum-routes 0
neighbor 192.168.42.1 peer group EVPN-OVERLAY-PEERS
neighbor 192.168.42.1 remote-as 65000
neighbor 192.168.42.1 description UPLINK_P2P_VRFS_TESTS_SPINE1
neighbor 192.168.42.2 peer group EVPN-OVERLAY-PEERS
neighbor 192.168.42.2 remote-as 65000
neighbor 192.168.42.2 description UPLINK_P2P_VRFS_TESTS_SPINE2
!
address-family evpn
neighbor EVPN-OVERLAY-PEERS activate
!
address-family ipv4
no neighbor EVPN-OVERLAY-PEERS activate
!
management api http-commands
protocol https
no shutdown
!
vrf MGMT
no shutdown
!
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
!RANCID-CONTENT-TYPE: arista
!
vlan internal order ascending range 1006 1199
!
transceiver qsfp default-mode 4x10G
!
service routing protocols model multi-agent
!
hostname UPLINK_P2P_VRFS_TESTS_SPINE1
!
spanning-tree mode none
!
no enable password
no aaa root
!
vrf instance MGMT
gmuloc marked this conversation as resolved.
Show resolved Hide resolved
!
interface Ethernet1
description P2P_LINK_TO_UPLINK_P2P_VRFS_TESTS_LEAF1_Ethernet1
no shutdown
mtu 9214
no switchport
!
interface Ethernet1.42
description P2P_LINK_TO_UPLINK_P2P_VRFS_TESTS_LEAF1_Ethernet1 vrf: PROD
no shutdown
encapsulation dot1q vlan 42
vrf PROD
ip address 10.42.42.8/31
!
interface Ethernet1.66
description P2P_LINK_TO_UPLINK_P2P_VRFS_TESTS_LEAF1_Ethernet1 vrf: ONLY-ON-L2LEAF
no shutdown
encapsulation dot1q vlan 66
vrf ONLY-ON-L2LEAF
ip address 10.42.42.8/31
!
interface Loopback0
description EVPN_Overlay_Peering
no shutdown
ip address 192.168.42.1/32
!
ip routing
no ip routing vrf MGMT
!
ip prefix-list PL-LOOPBACKS-EVPN-OVERLAY
seq 10 permit 192.168.42.0/24 eq 32
!
route-map RM-CONN-2-BGP permit 10
match ip address prefix-list PL-LOOPBACKS-EVPN-OVERLAY
!
router bfd
multihop interval 300 min-rx 300 multiplier 3
!
router bgp 65000
router-id 192.168.42.1
maximum-paths 4 ecmp 4
update wait-install
no bgp default ipv4-unicast
neighbor EVPN-OVERLAY-PEERS peer group
neighbor EVPN-OVERLAY-PEERS next-hop-unchanged
neighbor EVPN-OVERLAY-PEERS update-source Loopback0
neighbor EVPN-OVERLAY-PEERS bfd
neighbor EVPN-OVERLAY-PEERS ebgp-multihop 3
neighbor EVPN-OVERLAY-PEERS send-community
neighbor EVPN-OVERLAY-PEERS maximum-routes 0
neighbor IPv4-UNDERLAY-PEERS peer group
neighbor IPv4-UNDERLAY-PEERS send-community
neighbor IPv4-UNDERLAY-PEERS maximum-routes 12000
neighbor 192.168.42.3 peer group EVPN-OVERLAY-PEERS
neighbor 192.168.42.3 remote-as 65000
neighbor 192.168.42.3 description UPLINK_P2P_VRFS_TESTS_LEAF1
redistribute connected route-map RM-CONN-2-BGP
!
address-family evpn
neighbor EVPN-OVERLAY-PEERS activate
!
address-family ipv4
no neighbor EVPN-OVERLAY-PEERS activate
neighbor IPv4-UNDERLAY-PEERS activate
!
management api http-commands
protocol https
no shutdown
!
vrf MGMT
no shutdown
!
end
Loading
Loading