Skip to content

Commit

Permalink
Fix(eos_designs): Detect duplicate VLAN, VRF, VNI within network_serv…
Browse files Browse the repository at this point in the history
…ices (#2411) (#2449)

Co-authored-by: Claus Holbech <[email protected]>
  • Loading branch information
carlbuchmann and ClausHolbechArista authored Jan 20, 2023
1 parent a0a9d4e commit 27d248d
Show file tree
Hide file tree
Showing 27 changed files with 354 additions and 239 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ vlan 350
!
vrf instance MGMT
!
vrf instance Tenant_A_L3_VRF_Zone
!
vrf instance Tenant_A_WAN_Zone
!
vrf instance Tenant_B_OP_Zone
Expand All @@ -63,8 +65,6 @@ vrf instance Tenant_B_WAN_Zone
!
vrf instance Tenant_C_WAN_Zone
!
vrf instance Tenant_L3_VRF_Zone
!
interface Ethernet1
description P2P_LINK_TO_DC1-SPINE1_Ethernet22
no shutdown
Expand Down Expand Up @@ -116,31 +116,31 @@ interface Ethernet8
no shutdown
mtu 9000
no switchport
vrf Tenant_L3_VRF_Zone
vrf Tenant_A_L3_VRF_Zone
ip address 10.10.10.10/24
!
interface Ethernet9
description test
no shutdown
mtu 9000
no switchport
vrf Tenant_L3_VRF_Zone
vrf Tenant_A_L3_VRF_Zone
ip address 10.10.20.20/24
!
interface Ethernet10
description test-DC1-BL1A
no shutdown
mtu 9000
no switchport
vrf Tenant_L3_VRF_Zone
vrf Tenant_A_L3_VRF_Zone
ip address 10.10.30.10/24
!
interface Ethernet11
description DC1-BL1A descriptions preferred over single description
no shutdown
mtu 9000
no switchport
vrf Tenant_L3_VRF_Zone
vrf Tenant_A_L3_VRF_Zone
ip address 10.10.30.10/24
!
interface Ethernet4000
Expand Down Expand Up @@ -195,11 +195,11 @@ interface Vxlan1
vxlan vlan 150 vni 10150
vxlan vlan 250 vni 20250
vxlan vlan 350 vni 30350
vxlan vrf Tenant_A_L3_VRF_Zone vni 15
vxlan vrf Tenant_A_WAN_Zone vni 14
vxlan vrf Tenant_B_OP_Zone vni 20
vxlan vrf Tenant_B_WAN_Zone vni 21
vxlan vrf Tenant_C_WAN_Zone vni 31
vxlan vrf Tenant_L3_VRF_Zone vni 15
!
hardware tcam
system profile vxlan-routing
Expand All @@ -217,11 +217,11 @@ event-handler evpn-blacklist-recovery
!
ip routing
no ip routing vrf MGMT
ip routing vrf Tenant_A_L3_VRF_Zone
ip routing vrf Tenant_A_WAN_Zone
ip routing vrf Tenant_B_OP_Zone
ip routing vrf Tenant_B_WAN_Zone
ip routing vrf Tenant_C_WAN_Zone
ip routing vrf Tenant_L3_VRF_Zone
!
ip prefix-list PL-LOOPBACKS-EVPN-OVERLAY
seq 10 permit 192.168.255.0/24 eq 32
Expand Down Expand Up @@ -335,6 +335,13 @@ router bgp 65104
no neighbor EVPN-OVERLAY-PEERS activate
neighbor UNDERLAY-PEERS activate
!
vrf Tenant_A_L3_VRF_Zone
rd 192.168.254.14:15
route-target import evpn 65104:15
route-target export evpn 65104:15
router-id 192.168.255.14
redistribute connected
!
vrf Tenant_A_WAN_Zone
rd 192.168.254.14:14
route-target import evpn 65104:14
Expand Down Expand Up @@ -403,13 +410,6 @@ router bgp 65104
route-target export evpn 65104:31
router-id 192.168.255.14
redistribute connected
!
vrf Tenant_L3_VRF_Zone
rd 192.168.254.14:15
route-target import evpn 65104:15
route-target export evpn 65104:15
router-id 192.168.255.14
redistribute connected
!
router ospf 14 vrf Tenant_A_WAN_Zone
router-id 192.168.255.14
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ vlan 350
!
vrf instance MGMT
!
vrf instance Tenant_A_L3_VRF_Zone
!
vrf instance Tenant_A_WAN_Zone
!
vrf instance Tenant_B_OP_Zone
Expand All @@ -60,8 +62,6 @@ vrf instance Tenant_B_WAN_Zone
!
vrf instance Tenant_C_WAN_Zone
!
vrf instance Tenant_L3_VRF_Zone
!
interface Ethernet1
description P2P_LINK_TO_DC1-SPINE1_Ethernet23
no shutdown
Expand Down Expand Up @@ -107,31 +107,31 @@ interface Ethernet8
no shutdown
mtu 9000
no switchport
vrf Tenant_L3_VRF_Zone
vrf Tenant_A_L3_VRF_Zone
ip address 10.10.30.10/24
!
interface Ethernet9
description test
no shutdown
mtu 9000
no switchport
vrf Tenant_L3_VRF_Zone
vrf Tenant_A_L3_VRF_Zone
ip address 10.10.40.20/24
!
interface Ethernet10
description test-DC1-BL1B
no shutdown
mtu 9000
no switchport
vrf Tenant_L3_VRF_Zone
vrf Tenant_A_L3_VRF_Zone
ip address 10.10.40.20/24
!
interface Ethernet11
description DC1-BL1B descriptions preferred over single description
no shutdown
mtu 9000
no switchport
vrf Tenant_L3_VRF_Zone
vrf Tenant_A_L3_VRF_Zone
ip address 10.10.40.20/24
!
interface Ethernet4000
Expand Down Expand Up @@ -186,11 +186,11 @@ interface Vxlan1
vxlan vlan 150 vni 10150
vxlan vlan 250 vni 20250
vxlan vlan 350 vni 30350
vxlan vrf Tenant_A_L3_VRF_Zone vni 15
vxlan vrf Tenant_A_WAN_Zone vni 14
vxlan vrf Tenant_B_OP_Zone vni 20
vxlan vrf Tenant_B_WAN_Zone vni 21
vxlan vrf Tenant_C_WAN_Zone vni 31
vxlan vrf Tenant_L3_VRF_Zone vni 15
!
hardware tcam
system profile vxlan-routing
Expand All @@ -199,11 +199,11 @@ ip virtual-router mac-address 00:dc:00:00:00:0a
!
ip routing
no ip routing vrf MGMT
ip routing vrf Tenant_A_L3_VRF_Zone
ip routing vrf Tenant_A_WAN_Zone
ip routing vrf Tenant_B_OP_Zone
ip routing vrf Tenant_B_WAN_Zone
ip routing vrf Tenant_C_WAN_Zone
ip routing vrf Tenant_L3_VRF_Zone
!
ip prefix-list PL-LOOPBACKS-EVPN-OVERLAY
seq 10 permit 192.168.255.0/24 eq 32
Expand Down Expand Up @@ -318,6 +318,13 @@ router bgp 65105
no neighbor EVPN-OVERLAY-PEERS activate
neighbor UNDERLAY-PEERS activate
!
vrf Tenant_A_L3_VRF_Zone
rd 192.168.254.15:15
route-target import evpn 65105:15
route-target export evpn 65105:15
router-id 192.168.255.15
redistribute connected
!
vrf Tenant_A_WAN_Zone
rd 192.168.254.15:14
route-target import evpn 65105:14
Expand Down Expand Up @@ -386,13 +393,6 @@ router bgp 65105
route-target export evpn 65105:31
router-id 192.168.255.15
redistribute connected
!
vrf Tenant_L3_VRF_Zone
rd 192.168.254.15:15
route-target import evpn 65105:15
route-target export evpn 65105:15
router-id 192.168.255.15
redistribute connected
!
router ospf 14 vrf Tenant_A_WAN_Zone
router-id 192.168.255.15
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,8 @@ vrf instance Tenant_A_DB_Zone
vrf instance Tenant_A_OP_Zone
description Tenant_A_OP_Zone
!
vrf instance Tenant_A_OSPF
!
vrf instance Tenant_A_WEB_Zone
!
vrf instance Tenant_B_OP_Zone
Expand All @@ -127,8 +129,6 @@ vrf instance Tenant_D_OP_Zone
!
vrf instance Tenant_D_WAN_Zone
!
vrf instance Tenant_OSPF
!
interface Port-Channel7
description DC1_L2LEAF1_Po1
no shutdown
Expand Down Expand Up @@ -266,15 +266,15 @@ interface Ethernet21
interface Ethernet22
no shutdown
no switchport
vrf Tenant_OSPF
vrf Tenant_A_OSPF
ip address 10.0.0.1/30
ip ospf network point-to-point
ip ospf area 0
!
interface Ethernet23
no shutdown
no switchport
vrf Tenant_OSPF
vrf Tenant_A_OSPF
ip address 10.0.0.13/30
ip ospf network point-to-point
ip ospf area 0
Expand Down Expand Up @@ -564,12 +564,12 @@ interface Vxlan1
vxlan vrf Tenant_A_APP_Zone vni 12
vxlan vrf Tenant_A_DB_Zone vni 13
vxlan vrf Tenant_A_OP_Zone vni 10
vxlan vrf Tenant_A_OSPF vni 16
vxlan vrf Tenant_A_WEB_Zone vni 11
vxlan vrf Tenant_B_OP_Zone vni 20
vxlan vrf Tenant_C_OP_Zone vni 30
vxlan vrf Tenant_D_OP_Zone vni 40
vxlan vrf Tenant_D_WAN_Zone vni 41
vxlan vrf Tenant_OSPF vni 30
!
hardware tcam
system profile vxlan-routing
Expand All @@ -583,12 +583,12 @@ no ip routing vrf MGMT
ip routing vrf Tenant_A_APP_Zone
ip routing vrf Tenant_A_DB_Zone
ip routing vrf Tenant_A_OP_Zone
ip routing vrf Tenant_A_OSPF
ip routing vrf Tenant_A_WEB_Zone
ip routing vrf Tenant_B_OP_Zone
ip routing vrf Tenant_C_OP_Zone
ip routing vrf Tenant_D_OP_Zone
ip routing vrf Tenant_D_WAN_Zone
ip routing vrf Tenant_OSPF
ipv6 unicast-routing vrf Tenant_D_OP_Zone
ipv6 unicast-routing vrf Tenant_D_WAN_Zone
!
Expand Down Expand Up @@ -753,6 +753,14 @@ router bgp 65102
router-id 192.168.255.10
redistribute connected
!
vrf Tenant_A_OSPF
rd 65001:16
route-target import evpn 100000:16
route-target export evpn 100000:16
router-id 192.168.255.10
redistribute connected
redistribute ospf
!
vrf Tenant_A_WEB_Zone
rd 65001:11
route-target import evpn 100000:11
Expand Down Expand Up @@ -788,16 +796,8 @@ router bgp 65102
route-target export evpn 100000:41
router-id 192.168.255.10
redistribute connected
!
vrf Tenant_OSPF
rd 65001:30
route-target import evpn 100000:30
route-target export evpn 100000:30
router-id 192.168.255.10
redistribute connected
redistribute ospf
!
router ospf 30 vrf Tenant_OSPF
router ospf 16 vrf Tenant_A_OSPF
router-id 192.168.255.10
passive-interface default
no passive-interface Ethernet22
Expand Down
Loading

0 comments on commit 27d248d

Please sign in to comment.