Skip to content

Commit

Permalink
Feat(eos_designs,eos_cli_config_gen): Add support for MLAG port-chann…
Browse files Browse the repository at this point in the history
…els to endpoints with PTP (#3672)
  • Loading branch information
Vibhu-gslab authored Apr 30, 2024
1 parent 4823be9 commit a92b35a
Show file tree
Hide file tree
Showing 20 changed files with 208 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ interface Port-Channel5
switchport mode trunk
mlag 5
ptp enable
ptp mpass
ptp delay-mechanism e2e
ptp sync-message interval 1
ptp role dynamic
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ interface Port-Channel5
switchport mode trunk
mlag 5
ptp enable
ptp mpass
ptp delay-mechanism e2e
ptp sync-message interval 1
ptp role dynamic
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ port_channel_interfaces:
mlag: 5
ptp:
enable: true
mpass: true
delay_mechanism: e2e
sync_message:
interval: 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,21 @@ vrf instance MGMT
!
vrf instance VRF1
!
interface Port-Channel6
description Endpoint-with-mpass
no shutdown
switchport
switchport access vlan 11
mlag 6
ptp enable
ptp mpass
ptp announce interval 0
ptp announce timeout 3
ptp delay-req interval -3
ptp sync-message interval -3
ptp role master
ptp transport ipv4
!
interface Port-Channel9
description MLAG_PEER_ptp-tests-leaf2_Po9
no shutdown
Expand Down Expand Up @@ -146,6 +161,11 @@ interface Ethernet5
ptp role master
spanning-tree portfast
!
interface Ethernet6
description Endpoint-with-mpass_PCI1
no shutdown
channel-group 6 mode active
!
interface Ethernet9
description MLAG_PEER_ptp-tests-leaf2_Ethernet9
no shutdown
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,21 @@ vrf instance MGMT
!
vrf instance VRF1
!
interface Port-Channel6
description Endpoint-with-mpass
no shutdown
switchport
switchport access vlan 11
mlag 6
ptp enable
ptp mpass
ptp announce interval 0
ptp announce timeout 3
ptp delay-req interval -3
ptp sync-message interval -3
ptp role master
ptp transport ipv4
!
interface Port-Channel9
description MLAG_PEER_ptp-tests-leaf1_Po9
no shutdown
Expand Down Expand Up @@ -139,6 +154,11 @@ interface Ethernet5
ptp role master
spanning-tree portfast
!
interface Ethernet6
description Endpoint-with-mpass_PCI2
no shutdown
channel-group 6 mode active
!
interface Ethernet9
description MLAG_PEER_ptp-tests-leaf1_Ethernet9
no shutdown
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,24 @@ port_channel_interfaces:
mode: trunk
vlans: '11'
mlag: 14
- name: Port-Channel6
description: Endpoint-with-mpass
type: switched
shutdown: false
ptp:
announce:
interval: 0
timeout: 3
delay_req: -3
sync_message:
interval: -3
transport: ipv4
enable: true
role: master
mpass: true
mode: access
vlans: '11'
mlag: 6
ethernet_interfaces:
- name: Ethernet9
peer: ptp-tests-leaf2
Expand Down Expand Up @@ -364,6 +382,16 @@ ethernet_interfaces:
transport: ipv4
enable: true
role: master
- name: Ethernet6
peer: Endpoint-with-mpass
peer_interface: PCI1
peer_type: server
description: Endpoint-with-mpass_PCI1
shutdown: false
type: port-channel-member
channel_group:
id: 6
mode: active
- name: Ethernet3
peer: Endpoint-with-specific-PTP-profile
peer_interface: eth3
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,24 @@ port_channel_interfaces:
mode: trunk
vlans: '11'
mlag: 14
- name: Port-Channel6
description: Endpoint-with-mpass
type: switched
shutdown: false
ptp:
announce:
interval: 0
timeout: 3
delay_req: -3
sync_message:
interval: -3
transport: ipv4
enable: true
role: master
mpass: true
mode: access
vlans: '11'
mlag: 6
ethernet_interfaces:
- name: Ethernet9
peer: ptp-tests-leaf1
Expand Down Expand Up @@ -356,6 +374,16 @@ ethernet_interfaces:
transport: ipv4
enable: true
role: master
- name: Ethernet6
peer: Endpoint-with-mpass
peer_interface: PCI2
peer_type: server
description: Endpoint-with-mpass_PCI2
shutdown: false
type: port-channel-member
channel_group:
id: 6
mode: active
mlag_configuration:
domain_id: ptp-test-leaf
local_interface: Vlan4094
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,20 @@ servers:
enabled: true
endpoint_role: follower

- name: Endpoint-with-mpass
adapters:
- endpoint_ports: [ PCI1, PCI2 ]
switch_ports: [ Ethernet6, Ethernet6 ]
switches: [ ptp-tests-leaf1, ptp-tests-leaf2 ]
vlans: 11
mode: access
ptp:
enabled: true
endpoint_role: follower
port_channel:
mode: "active"
ptp_mpass: true

- name: Endpoint-with-specific-PTP-profile
adapters:
- endpoint_ports: [ eth3 ]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;role</samp>](## "port_channel_interfaces.[].ptp.role") | String | | | Valid Values:<br>- <code>master</code><br>- <code>dynamic</code> | |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;vlan</samp>](## "port_channel_interfaces.[].ptp.vlan") | String | | | | VLAN can be 'all' or list of vlans as string. |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;transport</samp>](## "port_channel_interfaces.[].ptp.transport") | String | | | Valid Values:<br>- <code>ipv4</code><br>- <code>ipv6</code><br>- <code>layer2</code> | |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;mpass</samp>](## "port_channel_interfaces.[].ptp.mpass") | Boolean | | | | When MPASS is enabled on an MLAG port-channel, MLAG peers coordinate to function as a single PTP logical device.<br>Arista PTP enabled devices always place PTP messages on the same physical link within the port-channel.<br>Hence, MPASS is needed only on MLAG port-channels connected to non-Arista devices. |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;ip_address</samp>](## "port_channel_interfaces.[].ip_address") | String | | | | IPv4 address/mask. |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;ip_verify_unicast_source_reachable_via</samp>](## "port_channel_interfaces.[].ip_verify_unicast_source_reachable_via") | String | | | Valid Values:<br>- <code>any</code><br>- <code>rx</code> | |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;ip_nat</samp>](## "port_channel_interfaces.[].ip_nat") | Dictionary | | | | |
Expand Down Expand Up @@ -507,6 +508,11 @@
vlan: <str>
transport: <str; "ipv4" | "ipv6" | "layer2">

# When MPASS is enabled on an MLAG port-channel, MLAG peers coordinate to function as a single PTP logical device.
# Arista PTP enabled devices always place PTP messages on the same physical link within the port-channel.
# Hence, MPASS is needed only on MLAG port-channels connected to non-Arista devices.
mpass: <bool>

# IPv4 address/mask.
ip_address: <str>
ip_verify_unicast_source_reachable_via: <str; "any" | "rx">
Expand Down

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

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 @@ -591,6 +591,12 @@ keys:
- ipv4
- ipv6
- layer2
mpass:
type: bool
description: |-
When MPASS is enabled on an MLAG port-channel, MLAG peers coordinate to function as a single PTP logical device.
Arista PTP enabled devices always place PTP messages on the same physical link within the port-channel.
Hence, MPASS is needed only on MLAG port-channels connected to non-Arista devices.
ip_address:
type: str
description: IPv4 address/mask.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -364,6 +364,9 @@ interface {{ port_channel_interface.name }}
{% if port_channel_interface.ptp.enable is arista.avd.defined(true) %}
ptp enable
{% endif %}
{% if port_channel_interface.ptp.mpass is arista.avd.defined(true) %}
ptp mpass
{% endif %}
{% if port_channel_interface.ptp.announce.interval is arista.avd.defined %}
ptp announce interval {{ port_channel_interface.ptp.announce.interval }}
{% endif %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;channel_id</samp>](## "<connected_endpoints_keys.key>.[].adapters.[].port_channel.channel_id") | Integer | | | | Port-Channel ID.<br>If no channel_id is specified, an id is generated from the first switch port in the port channel.<br> |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;description</samp>](## "<connected_endpoints_keys.key>.[].adapters.[].port_channel.description") | String | | | | By default the description is built leveraging `<peer>` name or `adapter.description` when defined.<br>When this key is defined, it will append its content to the physical port description.<br> |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;enabled</samp>](## "<connected_endpoints_keys.key>.[].adapters.[].port_channel.enabled") | Boolean | | `True` | | Port-Channel administrative state.<br>Setting to false will set port to 'shutdown' in intended configuration.<br> |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ptp_mpass</samp>](## "<connected_endpoints_keys.key>.[].adapters.[].port_channel.ptp_mpass") | Boolean | | `False` | | When MPASS is enabled on an MLAG port-channel, MLAG peers coordinate to function as a single PTP logical device.<br>Arista PTP enabled devices always place PTP messages on the same physical link within the port-channel.<br>Hence, MPASS is needed only on MLAG port-channels connected to non-Arista devices. |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;esi</samp>](## "<connected_endpoints_keys.key>.[].adapters.[].port_channel.esi") <span style="color:red">removed</span> | String | | | | Format xxxx:xxxx:xxxx.<span style="color:red">This key was removed. Support was removed in AVD version 4.0.0. Use <samp>short_esi</samp> instead.</span> |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;short_esi</samp>](## "<connected_endpoints_keys.key>.[].adapters.[].port_channel.short_esi") <span style="color:red">deprecated</span> | String | | | | In format xxxx:xxxx:xxxx or "auto".<span style="color:red">This key is deprecated. Support will be removed in AVD version 5.0.0. Use <samp>ethernet_segment.short_esi</samp> instead.</span> |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;lacp_fallback</samp>](## "<connected_endpoints_keys.key>.[].adapters.[].port_channel.lacp_fallback") | Dictionary | | | | LACP fallback configuration. |
Expand Down Expand Up @@ -486,6 +487,11 @@
# Setting to false will set port to 'shutdown' in intended configuration.
enabled: <bool; default=True>

# When MPASS is enabled on an MLAG port-channel, MLAG peers coordinate to function as a single PTP logical device.
# Arista PTP enabled devices always place PTP messages on the same physical link within the port-channel.
# Hence, MPASS is needed only on MLAG port-channels connected to non-Arista devices.
ptp_mpass: <bool; default=False>

# In format xxxx:xxxx:xxxx or "auto".
# This key is deprecated.
# Support will be removed in AVD version 5.0.0.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;channel_id</samp>](## "network_ports.[].port_channel.channel_id") | Integer | | | | Port-Channel ID.<br>If no channel_id is specified, an id is generated from the first switch port in the port channel.<br> |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;description</samp>](## "network_ports.[].port_channel.description") | String | | | | By default the description is built leveraging `<peer>` name or `adapter.description` when defined.<br>When this key is defined, it will append its content to the physical port description.<br> |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;enabled</samp>](## "network_ports.[].port_channel.enabled") | Boolean | | `True` | | Port-Channel administrative state.<br>Setting to false will set port to 'shutdown' in intended configuration.<br> |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ptp_mpass</samp>](## "network_ports.[].port_channel.ptp_mpass") | Boolean | | `False` | | When MPASS is enabled on an MLAG port-channel, MLAG peers coordinate to function as a single PTP logical device.<br>Arista PTP enabled devices always place PTP messages on the same physical link within the port-channel.<br>Hence, MPASS is needed only on MLAG port-channels connected to non-Arista devices. |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;esi</samp>](## "network_ports.[].port_channel.esi") <span style="color:red">removed</span> | String | | | | Format xxxx:xxxx:xxxx.<span style="color:red">This key was removed. Support was removed in AVD version 4.0.0. Use <samp>short_esi</samp> instead.</span> |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;short_esi</samp>](## "network_ports.[].port_channel.short_esi") <span style="color:red">deprecated</span> | String | | | | In format xxxx:xxxx:xxxx or "auto".<span style="color:red">This key is deprecated. Support will be removed in AVD version 5.0.0. Use <samp>ethernet_segment.short_esi</samp> instead.</span> |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;lacp_fallback</samp>](## "network_ports.[].port_channel.lacp_fallback") | Dictionary | | | | LACP fallback configuration. |
Expand Down Expand Up @@ -458,6 +459,11 @@
# Setting to false will set port to 'shutdown' in intended configuration.
enabled: <bool; default=True>

# When MPASS is enabled on an MLAG port-channel, MLAG peers coordinate to function as a single PTP logical device.
# Arista PTP enabled devices always place PTP messages on the same physical link within the port-channel.
# Hence, MPASS is needed only on MLAG port-channels connected to non-Arista devices.
ptp_mpass: <bool; default=False>

# In format xxxx:xxxx:xxxx or "auto".
# This key is deprecated.
# Support will be removed in AVD version 5.0.0.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;channel_id</samp>](## "port_profiles.[].port_channel.channel_id") | Integer | | | | Port-Channel ID.<br>If no channel_id is specified, an id is generated from the first switch port in the port channel.<br> |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;description</samp>](## "port_profiles.[].port_channel.description") | String | | | | By default the description is built leveraging `<peer>` name or `adapter.description` when defined.<br>When this key is defined, it will append its content to the physical port description.<br> |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;enabled</samp>](## "port_profiles.[].port_channel.enabled") | Boolean | | `True` | | Port-Channel administrative state.<br>Setting to false will set port to 'shutdown' in intended configuration.<br> |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ptp_mpass</samp>](## "port_profiles.[].port_channel.ptp_mpass") | Boolean | | `False` | | When MPASS is enabled on an MLAG port-channel, MLAG peers coordinate to function as a single PTP logical device.<br>Arista PTP enabled devices always place PTP messages on the same physical link within the port-channel.<br>Hence, MPASS is needed only on MLAG port-channels connected to non-Arista devices. |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;esi</samp>](## "port_profiles.[].port_channel.esi") <span style="color:red">removed</span> | String | | | | Format xxxx:xxxx:xxxx.<span style="color:red">This key was removed. Support was removed in AVD version 4.0.0. Use <samp>short_esi</samp> instead.</span> |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;short_esi</samp>](## "port_profiles.[].port_channel.short_esi") <span style="color:red">deprecated</span> | String | | | | In format xxxx:xxxx:xxxx or "auto".<span style="color:red">This key is deprecated. Support will be removed in AVD version 5.0.0. Use <samp>ethernet_segment.short_esi</samp> instead.</span> |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;lacp_fallback</samp>](## "port_profiles.[].port_channel.lacp_fallback") | Dictionary | | | | LACP fallback configuration. |
Expand Down Expand Up @@ -444,6 +445,11 @@
# Setting to false will set port to 'shutdown' in intended configuration.
enabled: <bool; default=True>

# When MPASS is enabled on an MLAG port-channel, MLAG peers coordinate to function as a single PTP logical device.
# Arista PTP enabled devices always place PTP messages on the same physical link within the port-channel.
# Hence, MPASS is needed only on MLAG port-channels connected to non-Arista devices.
ptp_mpass: <bool; default=False>

# In format xxxx:xxxx:xxxx or "auto".
# This key is deprecated.
# Support will be removed in AVD version 5.0.0.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,8 @@ def _get_port_channel_interface_cfg(self, adapter: dict, port_channel_interface_

# Set MLAG ID on port-channel if connection is multi-homed and this switch is running MLAG
elif self.shared_utils.mlag and len(set(adapter["switches"])) > 1:
if get(port_channel_interface, "ptp.enable") is True and get(adapter, "port_channel.ptp_mpass") is True:
port_channel_interface["ptp"]["mpass"] = True
port_channel_interface["mlag"] = channel_group_id

# LACP Fallback
Expand Down
Loading

0 comments on commit a92b35a

Please sign in to comment.