Skip to content

Commit

Permalink
Feat(eos_designs): Add sflow_settings (#3078)
Browse files Browse the repository at this point in the history
Co-authored-by: Jon Still <[email protected]>
  • Loading branch information
ClausHolbechArista and jonxstill authored Mar 25, 2024
1 parent 57b85d5 commit b0ec802
Show file tree
Hide file tree
Showing 32 changed files with 865 additions and 17 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
type: l2leaf
l2leaf:
nodes:
- name: sflow-settings-missing-inband-mgmt-interface
id: 1
mgmt_ip: 192.168.0.2/24

sflow_settings:
destinations:
- destination: 10.10.10.10
vrf: use_inband_mgmt_vrf

servers:
- name: test
adapters:
- switches: [sflow-settings-missing-inband-mgmt-interface]
switch_ports: [Ethernet1]
sflow: true

expected_error_message: >-
Unable to configure sFlow source-interface with 'use_inband_mgmt_vrf' since 'inband_mgmt_interface' is not set.
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
type: l2leaf
l2leaf:
nodes:
- name: sflow-settings-missing-mgmt-ip
id: 1

sflow_settings:
destinations:
- destination: 10.10.10.10
vrf: use_mgmt_interface_vrf

servers:
- name: test
adapters:
- switches: [sflow-settings-missing-mgmt-ip]
switch_ports: [Ethernet1]
sflow: true

expected_error_message: >-
Unable to configure sFlow source-interface with 'use_mgmt_interface_vrf' since 'mgmt_ip' or 'ipv6_mgmt_ip' are not set.
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,8 @@ all:
source-interfaces-tacacs-missing-inband-mgmt-interface:
source-interfaces-tacacs-missing-mgmt-ip:
ul-filter-evpn-default-vrf-services:
sflow-settings-missing-inband-mgmt-interface:
sflow-settings-missing-mgmt-ip:
children:
duplicate-ip-address-router-bgp:
hosts:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,29 @@ service routing protocols model multi-agent
!
hostname sflow-tests-l2-leaf1
!
sflow vrf MGMT destination 10.10.10.12
sflow vrf MGMT source-interface Management1
sflow destination 10.10.10.10
sflow destination 10.10.10.11
sflow source-interface Vlan4092
sflow run
!
no enable password
no aaa root
!
vlan 11
name VLAN11
!
vlan 4092
name INBAND_MGMT
!
vrf instance MGMT
!
interface Port-Channel1
description SFLOW-TESTS-LEAF-MLAG_Po16
no shutdown
switchport
switchport trunk allowed vlan 11
switchport trunk allowed vlan 11,4092
switchport mode trunk
sflow enable
!
Expand All @@ -39,9 +49,16 @@ interface Management1
no shutdown
vrf MGMT
ip address 192.168.0.201/24
!
interface Vlan4092
description Inband Management
no shutdown
mtu 1500
ip address 10.254.254.4/24
no ip routing vrf MGMT
!
ip route vrf MGMT 0.0.0.0/0 192.168.0.1
ip route 0.0.0.0/0 10.254.254.1
!
management api http-commands
protocol https
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,29 @@ service routing protocols model multi-agent
!
hostname sflow-tests-l2-leaf2
!
sflow vrf MGMT destination 10.10.10.12
sflow vrf MGMT source-interface Management1
sflow destination 10.10.10.10
sflow destination 10.10.10.11
sflow source-interface Vlan4092
sflow run
!
no enable password
no aaa root
!
vlan 11
name VLAN11
!
vlan 4092
name INBAND_MGMT
!
vrf instance MGMT
!
interface Port-Channel1
description SFLOW-TESTS-LEAF-MLAG_Po17
no shutdown
switchport
switchport trunk allowed vlan 11
switchport trunk allowed vlan 11,4092
switchport mode trunk
sflow enable
!
Expand All @@ -39,9 +49,16 @@ interface Management1
no shutdown
vrf MGMT
ip address 192.168.0.202/24
!
interface Vlan4092
description Inband Management
no shutdown
mtu 1500
ip address 10.254.254.5/24
no ip routing vrf MGMT
!
ip route vrf MGMT 0.0.0.0/0 192.168.0.1
ip route 0.0.0.0/0 10.254.254.1
!
management api http-commands
protocol https
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,13 @@ service routing protocols model multi-agent
!
hostname sflow-tests-leaf1
!
sflow vrf MGMT destination 10.10.10.10
sflow vrf MGMT destination 10.10.10.11
sflow vrf MGMT source-interface Management1
sflow vrf sflowvrf destination 10.10.10.12 1234
sflow vrf sflowvrf source-interface Loopback321
sflow run
!
spanning-tree mode mstp
spanning-tree mst 0 priority 4096
!
Expand Down Expand Up @@ -90,6 +97,8 @@ interface Vxlan1
vxlan vlan 11 vni 10011
vxlan vrf VRF1 vni 1
!
ip virtual-router mac-address 00:11:22:33:44:55
!
ip routing
no ip routing vrf MGMT
ip routing vrf VRF1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,13 @@ service routing protocols model multi-agent
!
hostname sflow-tests-leaf2
!
sflow vrf MGMT destination 10.10.10.10
sflow vrf MGMT destination 10.10.10.11
sflow vrf MGMT source-interface Management1
sflow vrf sflowvrf destination 10.10.10.12 1234
sflow vrf sflowvrf source-interface Loopback321
sflow run
!
spanning-tree mode mstp
spanning-tree mst 0 priority 4096
!
Expand Down Expand Up @@ -66,6 +73,8 @@ interface Vxlan1
vxlan vlan 11 vni 10011
vxlan vrf VRF1 vni 1
!
ip virtual-router mac-address 00:11:22:33:44:55
!
ip routing
no ip routing vrf MGMT
ip routing vrf VRF1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,13 @@ service routing protocols model multi-agent
!
hostname sflow-tests-leaf3
!
sflow vrf MGMT destination 10.10.10.10
sflow vrf MGMT destination 10.10.10.11
sflow vrf MGMT source-interface Management1
sflow vrf sflowvrf destination 10.10.10.12 1234
sflow vrf sflowvrf source-interface Loopback321
sflow run
!
spanning-tree mode mstp
no spanning-tree vlan-id 4093-4094
spanning-tree mst 0 priority 4096
Expand All @@ -22,6 +29,9 @@ vlan 3000
name MLAG_iBGP_VRF1
trunk group LEAF_PEER_L3
!
vlan 4092
name INBAND_MGMT
!
vlan 4093
name LEAF_PEER_L3
trunk group LEAF_PEER_L3
Expand Down Expand Up @@ -67,7 +77,7 @@ interface Port-Channel16
description SFLOW-TESTS-L2-LEAF1_Po1
no shutdown
switchport
switchport trunk allowed vlan 11
switchport trunk allowed vlan 11,4092
switchport mode trunk
mlag 16
sflow enable
Expand All @@ -76,7 +86,7 @@ interface Port-Channel17
description SFLOW-TESTS-L2-LEAF2_Po1
no shutdown
switchport
switchport trunk allowed vlan 11
switchport trunk allowed vlan 11,4092
switchport mode trunk
mlag 17
sflow enable
Expand Down Expand Up @@ -155,6 +165,14 @@ interface Vlan3000
vrf VRF1
ip address 10.254.1.104/31
!
interface Vlan4092
description Inband Management
no shutdown
mtu 1500
ip address 10.254.254.2/24
ip attached-host route export 19
ip virtual-router address 10.254.254.1
!
interface Vlan4093
description MLAG_PEER_L3_PEERING
no shutdown
Expand All @@ -176,10 +194,15 @@ interface Vxlan1
vxlan vlan 11 vni 10011
vxlan vrf VRF1 vni 1
!
ip virtual-router mac-address 00:11:22:33:44:55
!
ip routing
no ip routing vrf MGMT
ip routing vrf VRF1
!
ip prefix-list PL-L2LEAF-INBAND-MGMT
seq 10 permit 10.254.254.0/24
!
ip prefix-list PL-LOOPBACKS-EVPN-OVERLAY
seq 10 permit 10.254.1.0/27 eq 32
seq 20 permit 10.254.11.0/27 eq 32
Expand All @@ -197,6 +220,9 @@ ip route vrf MGMT 0.0.0.0/0 192.168.0.1
route-map RM-CONN-2-BGP permit 10
match ip address prefix-list PL-LOOPBACKS-EVPN-OVERLAY
!
route-map RM-CONN-2-BGP permit 20
match ip address prefix-list PL-L2LEAF-INBAND-MGMT
!
route-map RM-MLAG-PEER-IN permit 10
description Make routes learned over MLAG Peer-link less preferred on spines to ensure optimal routing
set origin incomplete
Expand Down Expand Up @@ -235,6 +261,7 @@ router bgp 65105
neighbor 10.255.0.1 peer group EVPN-OVERLAY-PEERS
neighbor 10.255.0.1 remote-as 65200
neighbor 10.255.0.1 description sflow-tests-spine1
redistribute attached-host
redistribute connected route-map RM-CONN-2-BGP
!
vlan 11
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,13 @@ service routing protocols model multi-agent
!
hostname sflow-tests-leaf4
!
sflow vrf MGMT destination 10.10.10.10
sflow vrf MGMT destination 10.10.10.11
sflow vrf MGMT source-interface Management1
sflow vrf sflowvrf destination 10.10.10.12 1234
sflow vrf sflowvrf source-interface Loopback321
sflow run
!
spanning-tree mode mstp
no spanning-tree vlan-id 4093-4094
spanning-tree mst 0 priority 4096
Expand All @@ -22,6 +29,9 @@ vlan 3000
name MLAG_iBGP_VRF1
trunk group LEAF_PEER_L3
!
vlan 4092
name INBAND_MGMT
!
vlan 4093
name LEAF_PEER_L3
trunk group LEAF_PEER_L3
Expand Down Expand Up @@ -67,7 +77,7 @@ interface Port-Channel16
description SFLOW-TESTS-L2-LEAF1_Po1
no shutdown
switchport
switchport trunk allowed vlan 11
switchport trunk allowed vlan 11,4092
switchport mode trunk
mlag 16
sflow enable
Expand All @@ -76,7 +86,7 @@ interface Port-Channel17
description SFLOW-TESTS-L2-LEAF2_Po1
no shutdown
switchport
switchport trunk allowed vlan 11
switchport trunk allowed vlan 11,4092
switchport mode trunk
mlag 17
sflow enable
Expand Down Expand Up @@ -155,6 +165,14 @@ interface Vlan3000
vrf VRF1
ip address 10.254.1.105/31
!
interface Vlan4092
description Inband Management
no shutdown
mtu 1500
ip address 10.254.254.3/24
ip attached-host route export 19
ip virtual-router address 10.254.254.1
!
interface Vlan4093
description MLAG_PEER_L3_PEERING
no shutdown
Expand All @@ -176,10 +194,15 @@ interface Vxlan1
vxlan vlan 11 vni 10011
vxlan vrf VRF1 vni 1
!
ip virtual-router mac-address 00:11:22:33:44:55
!
ip routing
no ip routing vrf MGMT
ip routing vrf VRF1
!
ip prefix-list PL-L2LEAF-INBAND-MGMT
seq 10 permit 10.254.254.0/24
!
ip prefix-list PL-LOOPBACKS-EVPN-OVERLAY
seq 10 permit 10.254.1.0/27 eq 32
seq 20 permit 10.254.11.0/27 eq 32
Expand All @@ -197,6 +220,9 @@ ip route vrf MGMT 0.0.0.0/0 192.168.0.1
route-map RM-CONN-2-BGP permit 10
match ip address prefix-list PL-LOOPBACKS-EVPN-OVERLAY
!
route-map RM-CONN-2-BGP permit 20
match ip address prefix-list PL-L2LEAF-INBAND-MGMT
!
route-map RM-MLAG-PEER-IN permit 10
description Make routes learned over MLAG Peer-link less preferred on spines to ensure optimal routing
set origin incomplete
Expand Down Expand Up @@ -235,6 +261,7 @@ router bgp 65105
neighbor 10.255.0.1 peer group EVPN-OVERLAY-PEERS
neighbor 10.255.0.1 remote-as 65200
neighbor 10.255.0.1 description sflow-tests-spine1
redistribute attached-host
redistribute connected route-map RM-CONN-2-BGP
!
vlan 11
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,13 @@ service routing protocols model multi-agent
!
hostname sflow-tests-spine1
!
sflow vrf MGMT destination 10.10.10.10
sflow vrf MGMT destination 10.10.10.11
sflow vrf MGMT source-interface Management1
sflow vrf sflowvrf destination 10.10.10.12 1234
sflow vrf sflowvrf source-interface Loopback321
sflow run
!
spanning-tree mode none
!
no enable password
Expand Down
Loading

0 comments on commit b0ec802

Please sign in to comment.