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): L2 inband ztp functionality #3660

Merged
merged 10 commits into from
Mar 21, 2024
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ interface Port-Channel24
switchport
switchport trunk allowed vlan 104
switchport mode trunk
port-channel lacp fallback timeout 30
port-channel lacp fallback individual
mlag 24
!
interface Port-Channel25
Expand Down Expand Up @@ -112,6 +114,8 @@ interface Ethernet20
interface Ethernet24
description INBAND-MGMT-DUALSTACK-SUBNETS_Ethernet1
no shutdown
switchport access vlan 104
switchport mode access
channel-group 24 mode active
!
interface Ethernet25
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ interface Port-Channel24
switchport
switchport trunk allowed vlan 104
switchport mode trunk
port-channel lacp fallback timeout 30
port-channel lacp fallback individual
mlag 24
!
interface Port-Channel25
Expand Down Expand Up @@ -112,6 +114,8 @@ interface Ethernet20
interface Ethernet24
description INBAND-MGMT-DUALSTACK-SUBNETS_Ethernet2
no shutdown
switchport access vlan 104
switchport mode access
channel-group 24 mode active
!
interface Ethernet25
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ interface Port-Channel26
switchport
switchport trunk allowed vlan 106
switchport mode trunk
port-channel lacp fallback timeout 30
port-channel lacp fallback individual
mlag 26
!
interface Port-Channel27
Expand All @@ -51,6 +53,8 @@ interface Port-Channel27
switchport
switchport trunk allowed vlan 107
switchport mode trunk
port-channel lacp fallback timeout 30
port-channel lacp fallback individual
mlag 27
!
interface Ethernet11
Expand Down Expand Up @@ -106,11 +110,15 @@ interface Ethernet20
interface Ethernet26
description INBAND-MGMT-IPV6-ONLY_Ethernet1
no shutdown
switchport access vlan 106
switchport mode access
channel-group 26 mode active
!
interface Ethernet27
description INBAND-MGMT-IPV6-ONLY-VRF_Ethernet1
no shutdown
switchport access vlan 107
switchport mode access
channel-group 27 mode active
!
interface Loopback0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ interface Port-Channel26
switchport
switchport trunk allowed vlan 106
switchport mode trunk
port-channel lacp fallback timeout 30
port-channel lacp fallback individual
mlag 26
!
interface Port-Channel27
Expand All @@ -53,6 +55,8 @@ interface Port-Channel27
switchport
switchport trunk allowed vlan 107
switchport mode trunk
port-channel lacp fallback timeout 30
port-channel lacp fallback individual
mlag 27
!
interface Ethernet11
Expand Down Expand Up @@ -108,11 +112,15 @@ interface Ethernet20
interface Ethernet26
description INBAND-MGMT-IPV6-ONLY_Ethernet2
no shutdown
switchport access vlan 106
switchport mode access
channel-group 26 mode active
!
interface Ethernet27
description INBAND-MGMT-IPV6-ONLY-VRF_Ethernet2
no shutdown
switchport access vlan 107
switchport mode access
channel-group 27 mode active
!
interface Loopback0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,17 @@ interface Port-Channel21
switchport
switchport trunk allowed vlan 101
switchport mode trunk
port-channel lacp fallback timeout 30
port-channel lacp fallback individual
!
interface Port-Channel22
description INBAND-MGMT-SUBNET-VRF_Po1
no shutdown
switchport
switchport trunk allowed vlan 102
switchport mode trunk
port-channel lacp fallback timeout 90
port-channel lacp fallback individual
!
interface Port-Channel23
description INBAND-MGMT-IP_Po1
Expand All @@ -48,11 +52,15 @@ interface Port-Channel23
interface Ethernet21
description INBAND-MGMT-SUBNET_Ethernet2
no shutdown
switchport access vlan 101
switchport mode access
channel-group 21 mode active
!
interface Ethernet22
description INBAND-MGMT-SUBNET-VRF_Ethernet2
no shutdown
switchport access vlan 102
switchport mode access
channel-group 22 mode active
!
interface Ethernet23
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,17 @@ interface Port-Channel21
switchport
switchport trunk allowed vlan 101
switchport mode trunk
port-channel lacp fallback timeout 30
port-channel lacp fallback individual
!
interface Port-Channel22
description INBAND-MGMT-SUBNET-VRF_Po1
no shutdown
switchport
switchport trunk allowed vlan 102
switchport mode trunk
port-channel lacp fallback timeout 90
port-channel lacp fallback individual
!
interface Port-Channel23
description INBAND-MGMT-IP_Po1
Expand All @@ -48,11 +52,15 @@ interface Port-Channel23
interface Ethernet21
description INBAND-MGMT-SUBNET_Ethernet1
no shutdown
switchport access vlan 101
switchport mode access
channel-group 21 mode active
!
interface Ethernet22
description INBAND-MGMT-SUBNET-VRF_Ethernet1
no shutdown
switchport access vlan 102
switchport mode access
channel-group 22 mode active
!
interface Ethernet23
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,8 @@ port_channel_interfaces:
mode: trunk
vlans: '104'
mlag: 24
lacp_fallback_mode: individual
lacp_fallback_timeout: 30
- name: Port-Channel25
description: INBAND-MGMT-DUALSTACK-IPS_Po1
type: switched
Expand Down Expand Up @@ -297,6 +299,8 @@ ethernet_interfaces:
channel_group:
id: 24
mode: active
mode: access
vlans: 104
- name: Ethernet25
peer: inband-mgmt-dualstack-ips
peer_interface: Ethernet1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,8 @@ port_channel_interfaces:
mode: trunk
vlans: '104'
mlag: 24
lacp_fallback_mode: individual
lacp_fallback_timeout: 30
- name: Port-Channel25
description: INBAND-MGMT-DUALSTACK-IPS_Po1
type: switched
Expand Down Expand Up @@ -297,6 +299,8 @@ ethernet_interfaces:
channel_group:
id: 24
mode: active
mode: access
vlans: 104
- name: Ethernet25
peer: inband-mgmt-dualstack-ips
peer_interface: Ethernet2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,13 +135,17 @@ port_channel_interfaces:
mode: trunk
vlans: '106'
mlag: 26
lacp_fallback_mode: individual
lacp_fallback_timeout: 30
- name: Port-Channel27
description: INBAND-MGMT-IPV6-ONLY-VRF_Po1
type: switched
shutdown: false
mode: trunk
vlans: '107'
mlag: 27
lacp_fallback_mode: individual
lacp_fallback_timeout: 30
ethernet_interfaces:
- name: Ethernet11
peer: inband-mgmt-parent-ipv6-2
Expand Down Expand Up @@ -253,6 +257,8 @@ ethernet_interfaces:
channel_group:
id: 26
mode: active
mode: access
vlans: 106
- name: Ethernet27
peer: inband-mgmt-ipv6-only-vrf
peer_interface: Ethernet1
Expand All @@ -263,6 +269,8 @@ ethernet_interfaces:
channel_group:
id: 27
mode: active
mode: access
vlans: 107
mlag_configuration:
domain_id: inband-mgmt-parents-ipv6
local_interface: Vlan4094
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,13 +137,17 @@ port_channel_interfaces:
mode: trunk
vlans: '106'
mlag: 26
lacp_fallback_mode: individual
lacp_fallback_timeout: 30
- name: Port-Channel27
description: INBAND-MGMT-IPV6-ONLY-VRF_Po1
type: switched
shutdown: false
mode: trunk
vlans: '107'
mlag: 27
lacp_fallback_mode: individual
lacp_fallback_timeout: 30
ethernet_interfaces:
- name: Ethernet11
peer: inband-mgmt-parent-ipv6-1
Expand Down Expand Up @@ -255,6 +259,8 @@ ethernet_interfaces:
channel_group:
id: 26
mode: active
mode: access
vlans: 106
- name: Ethernet27
peer: inband-mgmt-ipv6-only-vrf
peer_interface: Ethernet2
Expand All @@ -265,6 +271,8 @@ ethernet_interfaces:
channel_group:
id: 27
mode: active
mode: access
vlans: 107
mlag_configuration:
domain_id: inband-mgmt-parents-ipv6
local_interface: Vlan4094
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,8 @@ ethernet_interfaces:
channel_group:
id: 21
mode: active
mode: access
vlans: 101
- name: Ethernet22
peer: inband-mgmt-subnet-vrf
peer_interface: Ethernet2
Expand All @@ -89,6 +91,8 @@ ethernet_interfaces:
channel_group:
id: 22
mode: active
mode: access
vlans: 102
- name: Ethernet23
peer: inband-mgmt-ip
peer_interface: Ethernet2
Expand All @@ -106,12 +110,16 @@ port_channel_interfaces:
shutdown: false
mode: trunk
vlans: '101'
lacp_fallback_mode: individual
lacp_fallback_timeout: 30
- name: Port-Channel22
description: INBAND-MGMT-SUBNET-VRF_Po1
type: switched
shutdown: false
mode: trunk
vlans: '102'
lacp_fallback_mode: individual
lacp_fallback_timeout: 90
- name: Port-Channel23
description: INBAND-MGMT-IP_Po1
type: switched
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,8 @@ ethernet_interfaces:
channel_group:
id: 21
mode: active
mode: access
vlans: 101
- name: Ethernet22
peer: inband-mgmt-subnet-vrf
peer_interface: Ethernet1
Expand All @@ -90,6 +92,8 @@ ethernet_interfaces:
channel_group:
id: 22
mode: active
mode: access
carlbuchmann marked this conversation as resolved.
Show resolved Hide resolved
vlans: 102
- name: Ethernet23
peer: inband-mgmt-ip
peer_interface: Ethernet1
Expand All @@ -107,12 +111,16 @@ port_channel_interfaces:
shutdown: false
mode: trunk
vlans: '101'
lacp_fallback_mode: individual
lacp_fallback_timeout: 30
- name: Port-Channel22
description: INBAND-MGMT-SUBNET-VRF_Po1
type: switched
shutdown: false
mode: trunk
vlans: '102'
lacp_fallback_mode: individual
lacp_fallback_timeout: 90
- name: Port-Channel23
description: INBAND-MGMT-IP_Po1
type: switched
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ l3leaf:

l2leaf:
defaults:
inband_ztp: true
uplink_switches: [inband-mgmt-parent, inband-mgmt-parent-vrf]
filter:
# Ensuring that the inband management vlan is correctly configured even when only_vlans_in_use is set
Expand All @@ -64,6 +65,7 @@ l2leaf:
inband_mgmt_vlan: 102
inband_mgmt_vrf: INBANDMGMT
inband_mgmt_subnet: 192.168.102.0/24
inband_ztp_lacp_fallback_delay: 90
id: 2
- name: inband-mgmt-ip
inband_mgmt_vlan: 103
Expand All @@ -72,6 +74,7 @@ l2leaf:
inband_mgmt_description: My description
# This vlan name overrides the vlan name from tenants.
inband_mgmt_vlan_name: MYVLANNAME
inband_ztp: false
id: 3
- name: inband-mgmt-dualstack-subnets
inband_mgmt_vlan: 104
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,20 @@ def inband_mgmt_vlan(self) -> int | None:
if self.shared_utils.configure_parent_for_inband_mgmt or self.shared_utils.configure_parent_for_inband_mgmt_ipv6:
return self.shared_utils.inband_mgmt_vlan

@cached_property
def inband_ztp(self) -> bool | None:
"""
Exposed in avd_switch_facts
"""
return self.shared_utils.inband_ztp

@cached_property
def inband_ztp_lacp_fallback_delay(self) -> int | None:
"""
Exposed in avd_switch_facts
"""
return self.shared_utils.inband_ztp_lacp_fallback_delay

@cached_property
def dc_name(self) -> str | None:
"""
Expand Down
Loading
Loading