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 @@ -30,13 +30,15 @@ interface Port-Channel21
switchport
switchport trunk allowed vlan 101
switchport mode trunk
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 individual
!
interface Port-Channel23
description INBAND-MGMT-IP_Po1
Expand All @@ -48,11 +50,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 @@ -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,14 @@ port_channel_interfaces:
shutdown: false
mode: trunk
vlans: '101'
lacp_fallback_mode: individual
- name: Port-Channel22
description: INBAND-MGMT-SUBNET-VRF_Po1
type: switched
shutdown: false
mode: trunk
vlans: '102'
lacp_fallback_mode: individual
- name: Port-Channel23
description: INBAND-MGMT-IP_Po1
type: switched
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ l3leaf:
only_vlans_in_use: true
nodes:
- name: inband-mgmt-parent
inband_ztp_parent: true
id: 1
- name: inband-mgmt-parent-vrf
inband_mgmt_vrf: INBANDMGMT
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,3 +116,7 @@ def inband_mgmt_interface(self: SharedUtils) -> str | None:
return f"Vlan{self.inband_mgmt_vlan}"

return None

@cached_property
def inband_ztp_parent(self: SharedUtils) -> bool:
return default(get(self.switch_data_combined, "inband_ztp_parent"), False)

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,8 @@ def ethernet_interfaces(self) -> list | None:
},
}
)
if self.shared_utils.inband_ztp_parent and get(link, "child_mgmt_vlan"):
ethernet_interface.update({"mode": "access", "vlans": link["child_mgmt_vlan"]})
else:
vlans = get(link, "vlans", default=[])
ethernet_interface.update(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,10 @@ def port_channel_interfaces(self) -> list | None:

port_channel_interface["ptp"] = ptp_config

# Inband ZTP Port-Channel LACP Fallback
if self.shared_utils.inband_ztp_parent and get(link, "child_mgmt_vlan"):
port_channel_interface["lacp_fallback_mode"] = "individual"

# Structured Config
port_channel_interface["struct_cfg"] = link.get("structured_config")

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ def _underlay_links(self) -> list:
"ipv6_enable": get(uplink, "ipv6_enable"),
"sflow": {"enable": self.shared_utils.fabric_sflow_downlinks},
"structured_config": get(uplink, "structured_config"),
"child_mgmt_vlan": get(peer_facts, "inband_mgmt_vlan"),
carlbuchmann marked this conversation as resolved.
Show resolved Hide resolved
}
if (subinterfaces := get(uplink, "subinterfaces")) is not None:
link["subinterfaces"] = [
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -878,6 +878,14 @@ $defs:
This setting is only applied on the devices where it is set, it does not automatically affect any parent/child devices configuration, so it must be set on each applicable node/node-group/node-type as needed.
type: int
default: 1500
inband_ztp_parent:
carlbuchmann marked this conversation as resolved.
Show resolved Hide resolved
documentation_options:
table: node-type-inband-management-configuration
description: |-
Enable to allow downstream devices to ZTP inband
This setting also requires that the inband_mgmt_vlan is set for the downstream device.
type: bool
default: false
inband_management_subnet:
documentation_options:
table: node-type-inband-management-configuration
Expand Down
Loading