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

Fix(eos_designs): Duplicate neighbor_interfaces in rfc5549 design when multiple uplinks to the same Spine #3054

Merged
merged 9 commits into from
Jul 24, 2023
Original file line number Diff line number Diff line change
Expand Up @@ -392,6 +392,7 @@ vlan 4094
| Interface | Description | Type | Channel Group | IPv6 Address | VRF | MTU | Shutdown | ND RA Disabled | Managed Config Flag | IPv6 ACL In | IPv6 ACL Out |
| --------- | ----------- | ---- | --------------| ------------ | --- | --- | -------- | -------------- | -------------------| ----------- | ------------ |
| Ethernet1 | P2P_LINK_TO_DC1-SPINE5_Ethernet1 | routed | - | - | default | 1500 | False | - | - | - | - |
| Ethernet2 | P2P_LINK_TO_DC1-SPINE5_Ethernet3 | routed | - | - | default | 1500 | False | - | - | - | - |

#### Ethernet Interfaces Device Configuration

Expand All @@ -404,6 +405,13 @@ interface Ethernet1
no switchport
ipv6 enable
!
interface Ethernet2
description P2P_LINK_TO_DC1-SPINE5_Ethernet3
no shutdown
mtu 1500
no switchport
ipv6 enable
!
interface Ethernet5
description MLAG_PEER_DC1-LEAF3B_Ethernet5
no shutdown
Expand Down Expand Up @@ -892,6 +900,7 @@ ip route vrf MGMT 0.0.0.0/0 192.168.200.5
| Neighbor Interface | VRF | Peer Group | Remote AS | Peer Filter |
| ------------------ | --- | ---------- | --------- | ----------- |
| Ethernet1 | default | UNDERLAY_PEERS | 65001 | - |
| Ethernet2 | default | UNDERLAY_PEERS | 65001 | - |
| Vlan4093 | default | MLAG_PEER | 65106 | - |
| Vlan3011 | Tenant_A_APP_Zone | MLAG_PEER | 65106 | - |
| Vlan3012 | Tenant_A_DB_Zone | MLAG_PEER | 65106 | - |
Expand Down Expand Up @@ -968,6 +977,7 @@ router bgp 65106
neighbor UNDERLAY_PEERS send-community
neighbor UNDERLAY_PEERS maximum-routes 12000
neighbor interface Ethernet1 peer-group UNDERLAY_PEERS remote-as 65001
neighbor interface Ethernet2 peer-group UNDERLAY_PEERS remote-as 65001
neighbor interface Vlan4093 peer-group MLAG_PEER remote-as 65106
neighbor 2001:1::5 peer group EVPN-OVERLAY-PEERS
neighbor 2001:1::5 remote-as 65001
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -392,6 +392,7 @@ vlan 4094
| Interface | Description | Type | Channel Group | IPv6 Address | VRF | MTU | Shutdown | ND RA Disabled | Managed Config Flag | IPv6 ACL In | IPv6 ACL Out |
| --------- | ----------- | ---- | --------------| ------------ | --- | --- | -------- | -------------- | -------------------| ----------- | ------------ |
| Ethernet1 | P2P_LINK_TO_DC1-SPINE5_Ethernet2 | routed | - | - | default | 1500 | False | - | - | - | - |
| Ethernet2 | P2P_LINK_TO_DC1-SPINE5_Ethernet4 | routed | - | - | default | 1500 | False | - | - | - | - |

#### Ethernet Interfaces Device Configuration

Expand All @@ -404,6 +405,13 @@ interface Ethernet1
no switchport
ipv6 enable
!
interface Ethernet2
description P2P_LINK_TO_DC1-SPINE5_Ethernet4
no shutdown
mtu 1500
no switchport
ipv6 enable
!
interface Ethernet5
description MLAG_PEER_DC1-LEAF3A_Ethernet5
no shutdown
Expand Down Expand Up @@ -892,6 +900,7 @@ ip route vrf MGMT 0.0.0.0/0 192.168.200.5
| Neighbor Interface | VRF | Peer Group | Remote AS | Peer Filter |
| ------------------ | --- | ---------- | --------- | ----------- |
| Ethernet1 | default | UNDERLAY_PEERS | 65001 | - |
| Ethernet2 | default | UNDERLAY_PEERS | 65001 | - |
| Vlan4093 | default | MLAG_PEER | 65106 | - |
| Vlan3011 | Tenant_A_APP_Zone | MLAG_PEER | 65106 | - |
| Vlan3012 | Tenant_A_DB_Zone | MLAG_PEER | 65106 | - |
Expand Down Expand Up @@ -968,6 +977,7 @@ router bgp 65106
neighbor UNDERLAY_PEERS send-community
neighbor UNDERLAY_PEERS maximum-routes 12000
neighbor interface Ethernet1 peer-group UNDERLAY_PEERS remote-as 65001
neighbor interface Ethernet2 peer-group UNDERLAY_PEERS remote-as 65001
neighbor interface Vlan4093 peer-group MLAG_PEER remote-as 65106
neighbor 2001:1::5 peer group EVPN-OVERLAY-PEERS
neighbor 2001:1::5 remote-as 65001
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,8 @@ vlan internal order ascending range 1006 1199
| --------- | ----------- | ---- | --------------| ------------ | --- | --- | -------- | -------------- | -------------------| ----------- | ------------ |
| Ethernet1 | P2P_LINK_TO_DC1-LEAF3A_Ethernet1 | routed | - | - | default | 1500 | False | - | - | - | - |
| Ethernet2 | P2P_LINK_TO_DC1-LEAF3B_Ethernet1 | routed | - | - | default | 1500 | False | - | - | - | - |
| Ethernet3 | P2P_LINK_TO_DC1-LEAF3A_Ethernet2 | routed | - | - | default | 1500 | False | - | - | - | - |
| Ethernet4 | P2P_LINK_TO_DC1-LEAF3B_Ethernet2 | routed | - | - | default | 1500 | False | - | - | - | - |

#### Ethernet Interfaces Device Configuration

Expand All @@ -234,6 +236,20 @@ interface Ethernet2
mtu 1500
no switchport
ipv6 enable
!
interface Ethernet3
description P2P_LINK_TO_DC1-LEAF3A_Ethernet2
no shutdown
mtu 1500
no switchport
ipv6 enable
!
interface Ethernet4
description P2P_LINK_TO_DC1-LEAF3B_Ethernet2
no shutdown
mtu 1500
no switchport
ipv6 enable
```

### Loopback Interfaces
Expand Down Expand Up @@ -373,6 +389,8 @@ ip route vrf MGMT 0.0.0.0/0 192.168.200.5
| ------------------ | --- | ---------- | --------- | ----------- |
| Ethernet1 | default | UNDERLAY_PEERS | 65106 | - |
| Ethernet2 | default | UNDERLAY_PEERS | 65106 | - |
| Ethernet3 | default | UNDERLAY_PEERS | 65106 | - |
| Ethernet4 | default | UNDERLAY_PEERS | 65106 | - |

#### Router BGP EVPN Address Family

Expand Down Expand Up @@ -406,6 +424,8 @@ router bgp 65001
neighbor UNDERLAY_PEERS maximum-routes 12000
neighbor interface Ethernet1 peer-group UNDERLAY_PEERS remote-as 65106
neighbor interface Ethernet2 peer-group UNDERLAY_PEERS remote-as 65106
neighbor interface Ethernet3 peer-group UNDERLAY_PEERS remote-as 65106
neighbor interface Ethernet4 peer-group UNDERLAY_PEERS remote-as 65106
neighbor 2001:1::c peer group EVPN-OVERLAY-PEERS
neighbor 2001:1::c remote-as 65106
neighbor 2001:1::c description DC1-LEAF3A
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,11 @@
| l3leaf | DC1-LEAF2B | Ethernet3 | spine | DC1-SPINE3 | Ethernet3 |
| l3leaf | DC1-LEAF2B | Ethernet4 | spine | DC1-SPINE4 | Ethernet3 |
| l3leaf | DC1-LEAF3A | Ethernet1 | spine | DC1-SPINE5 | Ethernet1 |
| l3leaf | DC1-LEAF3A | Ethernet2 | spine | DC1-SPINE5 | Ethernet3 |
| l3leaf | DC1-LEAF3A | Ethernet5 | mlag_peer | DC1-LEAF3B | Ethernet5 |
| l3leaf | DC1-LEAF3A | Ethernet6 | mlag_peer | DC1-LEAF3B | Ethernet6 |
| l3leaf | DC1-LEAF3B | Ethernet1 | spine | DC1-SPINE5 | Ethernet2 |
| l3leaf | DC1-LEAF3B | Ethernet2 | spine | DC1-SPINE5 | Ethernet4 |
| l3leaf | DC1-LEAF4A | Ethernet1 | spine | DC1-SPINE6 | Ethernet1 |
| l3leaf | DC1-LEAF4A | Ethernet5 | mlag_peer | DC1-LEAF4B | Ethernet5 |
| l3leaf | DC1-LEAF4A | Ethernet6 | mlag_peer | DC1-LEAF4B | Ethernet6 |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ l3leaf,DC1-LEAF2B,Ethernet2,,spine,DC1-SPINE2,Ethernet3,
l3leaf,DC1-LEAF2B,Ethernet3,,spine,DC1-SPINE3,Ethernet3,
l3leaf,DC1-LEAF2B,Ethernet4,,spine,DC1-SPINE4,Ethernet3,
l3leaf,DC1-LEAF3A,Ethernet1,,spine,DC1-SPINE5,Ethernet1,
l3leaf,DC1-LEAF3A,Ethernet2,,spine,DC1-SPINE5,Ethernet3,
l3leaf,DC1-LEAF3B,Ethernet1,,spine,DC1-SPINE5,Ethernet2,
l3leaf,DC1-LEAF3B,Ethernet2,,spine,DC1-SPINE5,Ethernet4,
l3leaf,DC1-LEAF4A,Ethernet1,,spine,DC1-SPINE6,Ethernet1,
l3leaf,DC1-LEAF4B,Ethernet1,,spine,DC1-SPINE6,Ethernet2,
spine,DC1-SPINE1,Ethernet4,,l3leaf,DC1-SVC3A,Ethernet1,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,11 @@ l3leaf,DC1-LEAF2B,Ethernet10,server,server01_MLAG,Eth3,True
l3leaf,DC1-LEAF2B,Ethernet11,server,server01_MTU_PROFILE_MLAG,Eth5,True
l3leaf,DC1-LEAF2B,Ethernet12,server,server01_MTU_ADAPTOR_MLAG,Eth7,True
l3leaf,DC1-LEAF3A,Ethernet1,spine,DC1-SPINE5,Ethernet1,True
l3leaf,DC1-LEAF3A,Ethernet2,spine,DC1-SPINE5,Ethernet3,True
l3leaf,DC1-LEAF3A,Ethernet5,mlag_peer,DC1-LEAF3B,Ethernet5,True
l3leaf,DC1-LEAF3A,Ethernet6,mlag_peer,DC1-LEAF3B,Ethernet6,True
l3leaf,DC1-LEAF3B,Ethernet1,spine,DC1-SPINE5,Ethernet2,True
l3leaf,DC1-LEAF3B,Ethernet2,spine,DC1-SPINE5,Ethernet4,True
l3leaf,DC1-LEAF3B,Ethernet5,mlag_peer,DC1-LEAF3A,Ethernet5,True
l3leaf,DC1-LEAF3B,Ethernet6,mlag_peer,DC1-LEAF3A,Ethernet6,True
l3leaf,DC1-LEAF4A,Ethernet1,spine,DC1-SPINE6,Ethernet1,True
Expand Down Expand Up @@ -91,6 +93,8 @@ spine,DC1-SPINE4,Ethernet6,l3leaf,DC1-BL1A,Ethernet4,True
spine,DC1-SPINE4,Ethernet7,l3leaf,DC1-BL1B,Ethernet4,True
spine,DC1-SPINE5,Ethernet1,l3leaf,DC1-LEAF3A,Ethernet1,True
spine,DC1-SPINE5,Ethernet2,l3leaf,DC1-LEAF3B,Ethernet1,True
spine,DC1-SPINE5,Ethernet3,l3leaf,DC1-LEAF3A,Ethernet2,True
spine,DC1-SPINE5,Ethernet4,l3leaf,DC1-LEAF3B,Ethernet2,True
spine,DC1-SPINE6,Ethernet1,l3leaf,DC1-LEAF4A,Ethernet1,True
spine,DC1-SPINE6,Ethernet2,l3leaf,DC1-LEAF4B,Ethernet1,True
l3leaf,DC1-SVC3A,Ethernet1,spine,DC1-SPINE1,Ethernet4,True
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,13 @@ interface Ethernet1
no switchport
ipv6 enable
!
interface Ethernet2
description P2P_LINK_TO_DC1-SPINE5_Ethernet3
no shutdown
mtu 1500
no switchport
ipv6 enable
!
interface Ethernet5
description MLAG_PEER_DC1-LEAF3B_Ethernet5
no shutdown
Expand Down Expand Up @@ -403,6 +410,7 @@ router bgp 65106
neighbor UNDERLAY_PEERS send-community
neighbor UNDERLAY_PEERS maximum-routes 12000
neighbor interface Ethernet1 peer-group UNDERLAY_PEERS remote-as 65001
neighbor interface Ethernet2 peer-group UNDERLAY_PEERS remote-as 65001
neighbor interface Vlan4093 peer-group MLAG_PEER remote-as 65106
neighbor 2001:1::5 peer group EVPN-OVERLAY-PEERS
neighbor 2001:1::5 remote-as 65001
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,13 @@ interface Ethernet1
no switchport
ipv6 enable
!
interface Ethernet2
description P2P_LINK_TO_DC1-SPINE5_Ethernet4
no shutdown
mtu 1500
no switchport
ipv6 enable
!
interface Ethernet5
description MLAG_PEER_DC1-LEAF3A_Ethernet5
no shutdown
Expand Down Expand Up @@ -403,6 +410,7 @@ router bgp 65106
neighbor UNDERLAY_PEERS send-community
neighbor UNDERLAY_PEERS maximum-routes 12000
neighbor interface Ethernet1 peer-group UNDERLAY_PEERS remote-as 65001
neighbor interface Ethernet2 peer-group UNDERLAY_PEERS remote-as 65001
neighbor interface Vlan4093 peer-group MLAG_PEER remote-as 65106
neighbor 2001:1::5 peer group EVPN-OVERLAY-PEERS
neighbor 2001:1::5 remote-as 65001
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,20 @@ interface Ethernet2
no switchport
ipv6 enable
!
interface Ethernet3
description P2P_LINK_TO_DC1-LEAF3A_Ethernet2
no shutdown
mtu 1500
no switchport
ipv6 enable
!
interface Ethernet4
description P2P_LINK_TO_DC1-LEAF3B_Ethernet2
no shutdown
mtu 1500
no switchport
ipv6 enable
!
interface Loopback0
description EVPN_Overlay_Peering
no shutdown
Expand Down Expand Up @@ -95,6 +109,8 @@ router bgp 65001
neighbor UNDERLAY_PEERS maximum-routes 12000
neighbor interface Ethernet1 peer-group UNDERLAY_PEERS remote-as 65106
neighbor interface Ethernet2 peer-group UNDERLAY_PEERS remote-as 65106
neighbor interface Ethernet3 peer-group UNDERLAY_PEERS remote-as 65106
neighbor interface Ethernet4 peer-group UNDERLAY_PEERS remote-as 65106
neighbor 2001:1::c peer group EVPN-OVERLAY-PEERS
neighbor 2001:1::c remote-as 65106
neighbor 2001:1::c description DC1-LEAF3A
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,10 @@ router_bgp:
peer_group: UNDERLAY_PEERS
remote_as: '65001'
description: DC1-SPINE5_Ethernet1
- name: Ethernet2
peer_group: UNDERLAY_PEERS
remote_as: '65001'
description: DC1-SPINE5_Ethernet3
redistribute_routes:
- source_protocol: connected
route_map: RM-CONN-2-BGP
Expand Down Expand Up @@ -641,6 +645,15 @@ ethernet_interfaces:
mtu: 1500
type: routed
ipv6_enable: true
- name: Ethernet2
peer: DC1-SPINE5
peer_interface: Ethernet3
peer_type: spine
description: P2P_LINK_TO_DC1-SPINE5_Ethernet3
shutdown: false
mtu: 1500
type: routed
ipv6_enable: true
mlag_configuration:
domain_id: DC1_LEAF3
local_interface: Vlan4094
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,10 @@ router_bgp:
peer_group: UNDERLAY_PEERS
remote_as: '65001'
description: DC1-SPINE5_Ethernet2
- name: Ethernet2
peer_group: UNDERLAY_PEERS
remote_as: '65001'
description: DC1-SPINE5_Ethernet4
redistribute_routes:
- source_protocol: connected
route_map: RM-CONN-2-BGP
Expand Down Expand Up @@ -641,6 +645,15 @@ ethernet_interfaces:
mtu: 1500
type: routed
ipv6_enable: true
- name: Ethernet2
peer: DC1-SPINE5
peer_interface: Ethernet4
peer_type: spine
description: P2P_LINK_TO_DC1-SPINE5_Ethernet4
shutdown: false
mtu: 1500
type: routed
ipv6_enable: true
mlag_configuration:
domain_id: DC1_LEAF3
local_interface: Vlan4094
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,14 @@ router_bgp:
peer_group: UNDERLAY_PEERS
remote_as: '65106'
description: DC1-LEAF3B_Ethernet1
- name: Ethernet3
peer_group: UNDERLAY_PEERS
remote_as: '65106'
description: DC1-LEAF3A_Ethernet2
- name: Ethernet4
peer_group: UNDERLAY_PEERS
remote_as: '65106'
description: DC1-LEAF3B_Ethernet2
address_family_evpn:
peer_groups:
- name: EVPN-OVERLAY-PEERS
Expand Down Expand Up @@ -138,6 +146,24 @@ ethernet_interfaces:
mtu: 1500
type: routed
ipv6_enable: true
- name: Ethernet3
peer: DC1-LEAF3A
peer_interface: Ethernet2
peer_type: l3leaf
description: P2P_LINK_TO_DC1-LEAF3A_Ethernet2
shutdown: false
mtu: 1500
type: routed
ipv6_enable: true
- name: Ethernet4
peer: DC1-LEAF3B
peer_interface: Ethernet2
peer_type: l3leaf
description: P2P_LINK_TO_DC1-LEAF3B_Ethernet2
shutdown: false
mtu: 1500
type: routed
ipv6_enable: true
loopback_interfaces:
- name: Loopback0
description: EVPN_Overlay_Peering
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -156,20 +156,23 @@ l3leaf:
- group: DC1_LEAF3
# Testing RFC5549 with IPv6 overlay peers only
bgp_as: 65106
uplink_interfaces: ['Ethernet1']
uplink_switches: ['DC1-SPINE5']
uplink_interfaces: ['Ethernet1', 'Ethernet2']
# Twice same uplink switch to repro an issue where
# all the bgp neighbor_interfaces are rendered twice
# because each uplink peer is parsed twice.
uplink_switches: ['DC1-SPINE5', 'DC1-SPINE5']
loopback_ipv6_pool: 2001:1::/64
loopback_ipv6_offset: 4
nodes:
- name: DC1-LEAF3A
id: 8
mgmt_ip: 192.168.200.106/24
mac_address: '0c:1d:c0:1d:62:01'
uplink_switch_interfaces: [ Ethernet1 ]
uplink_switch_interfaces: [ Ethernet1, Ethernet3 ]
- name: DC1-LEAF3B
id: 9
mgmt_ip: 192.168.200.107/24
uplink_switch_interfaces: [ Ethernet2 ]
uplink_switch_interfaces: [ Ethernet2, Ethernet4 ]
- group: DC1_LEAF4
# Testing underlay IPv6 peers
bgp_as: 65107
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -223,12 +223,13 @@ def uplink_peers(self: EosDesignsFacts) -> list:
"""
Exposed in avd_switch_facts

List of all uplink peers
List of all **unique** uplink peers

These are used to generate the "avd_topology_peers" fact covering downlinks for all devices.
"""
uplink_switches = self.shared_utils.uplink_switches
return [uplink_switch for uplink_switch in uplink_switches if uplink_switch in self.shared_utils.all_fabric_devices]
# Making sure each peer is unique
return list({uplink_switch for uplink_switch in uplink_switches if uplink_switch in self.shared_utils.all_fabric_devices})

@cached_property
def _default_downlink_interfaces(self: EosDesignsFacts) -> list:
Expand Down