diff --git a/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/intended/configs/ptp-tests-l2leaf1-ptp-disabled.cfg b/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/intended/configs/ptp-tests-l2leaf1-ptp-disabled.cfg index f24f32bf15b..1b48c3c98ef 100644 --- a/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/intended/configs/ptp-tests-l2leaf1-ptp-disabled.cfg +++ b/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/intended/configs/ptp-tests-l2leaf1-ptp-disabled.cfg @@ -26,7 +26,7 @@ management api http-commands no shutdown ! interface Port-Channel1 - description L2_ptp-test-leaf_Port-Channel11 + description L2_ptp-tests-leaf1_Port-Channel11 no shutdown switchport trunk allowed vlan 11 switchport mode trunk diff --git a/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/intended/configs/ptp-tests-l2leaf2-ptp-enabled-uplink-disabled.cfg b/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/intended/configs/ptp-tests-l2leaf2-ptp-enabled-uplink-disabled.cfg index 524679c994d..8678539bae8 100644 --- a/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/intended/configs/ptp-tests-l2leaf2-ptp-enabled-uplink-disabled.cfg +++ b/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/intended/configs/ptp-tests-l2leaf2-ptp-enabled-uplink-disabled.cfg @@ -39,7 +39,7 @@ management api http-commands no shutdown ! interface Port-Channel1 - description L2_ptp-test-leaf_Port-Channel14 + description L2_ptp-tests-leaf1_Port-Channel14 no shutdown switchport trunk allowed vlan 11 switchport mode trunk diff --git a/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/intended/configs/ptp-tests-l2leaf2-ptp-enabled.cfg b/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/intended/configs/ptp-tests-l2leaf2-ptp-enabled.cfg index ae878e1eb39..17f337332c9 100644 --- a/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/intended/configs/ptp-tests-l2leaf2-ptp-enabled.cfg +++ b/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/intended/configs/ptp-tests-l2leaf2-ptp-enabled.cfg @@ -39,7 +39,7 @@ management api http-commands no shutdown ! interface Port-Channel1 - description L2_ptp-test-leaf_Port-Channel12 + description L2_ptp-tests-leaf1_Port-Channel12 no shutdown switchport trunk allowed vlan 11 switchport mode trunk diff --git a/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/intended/configs/ptp-tests-leaf1.cfg b/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/intended/configs/ptp-tests-leaf1.cfg index 4d30b44ee00..0bd983549e4 100644 --- a/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/intended/configs/ptp-tests-leaf1.cfg +++ b/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/intended/configs/ptp-tests-leaf1.cfg @@ -24,24 +24,11 @@ ptp monitor threshold missing-message delay-resp 3 sequence-ids ptp monitor threshold missing-message announce 3 sequence-ids ! spanning-tree mode mstp -no spanning-tree vlan-id 4093-4094 spanning-tree mst 0 priority 4096 ! vlan 11 name VLAN11 ! -vlan 3000 - name MLAG_L3_VRF_VRF1 - trunk group MLAG -! -vlan 4093 - name MLAG_L3 - trunk group MLAG -! -vlan 4094 - name MLAG - trunk group MLAG -! vrf instance MGMT ! vrf instance VRF1 @@ -59,9 +46,7 @@ interface Port-Channel6 switchport access vlan 11 switchport mode access switchport - mlag 6 ptp enable - ptp mpass ptp announce interval 0 ptp announce timeout 3 ptp delay-req interval -3 @@ -69,26 +54,12 @@ interface Port-Channel6 ptp sync-message interval -3 ptp transport ipv4 ! -interface Port-Channel9 - description MLAG_ptp-tests-leaf2_Port-Channel9 - no shutdown - switchport mode trunk - switchport trunk group MLAG - switchport - ptp enable - ptp announce interval 0 - ptp announce timeout 3 - ptp delay-req interval -3 - ptp sync-message interval -3 - ptp transport ipv4 -! interface Port-Channel11 description L2_ptp-tests-l2leaf1-ptp-disabled_Port-Channel1 no shutdown switchport trunk allowed vlan 11 switchport mode trunk switchport - mlag 11 ! interface Port-Channel12 description L2_ptp-tests-l2leaf2-ptp-enabled_Port-Channel1 @@ -96,7 +67,6 @@ interface Port-Channel12 switchport trunk allowed vlan 11 switchport mode trunk switchport - mlag 12 ptp enable ptp announce interval 0 ptp announce timeout 3 @@ -110,7 +80,6 @@ interface Port-Channel14 switchport trunk allowed vlan 11 switchport mode trunk switchport - mlag 14 ! interface Ethernet1 description P2P_ptp-tests-spine1_Ethernet1 @@ -172,16 +141,6 @@ interface Ethernet6 no shutdown channel-group 6 mode active ! -interface Ethernet9 - description MLAG_ptp-tests-leaf2_Ethernet9 - no shutdown - channel-group 9 mode active -! -interface Ethernet10 - description MLAG_ptp-tests-leaf2_Ethernet10 - no shutdown - channel-group 9 mode active -! interface Ethernet11 description L2_ptp-tests-l2leaf1-ptp-disabled_Ethernet1 no shutdown @@ -232,30 +191,9 @@ interface Vlan11 vrf VRF1 ip address 172.16.11.1/24 ! -interface Vlan3000 - description MLAG_L3_VRF_VRF1 - no shutdown - mtu 9214 - vrf VRF1 - ip address 10.254.1.96/31 -! -interface Vlan4093 - description MLAG_L3 - no shutdown - mtu 9214 - ip address 10.254.1.96/31 -! -interface Vlan4094 - description MLAG - no shutdown - mtu 9214 - no autostate - ip address 10.254.1.64/31 -! interface Vxlan1 description ptp-tests-leaf1_VTEP vxlan source-interface Loopback1 - vxlan virtual-router encapsulation mac-address mlag-system-id vxlan udp-port 4789 vxlan vlan 11 vni 10011 vxlan vrf VRF1 vni 1 @@ -268,31 +206,11 @@ 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 ! -ip prefix-list PL-MLAG-PEER-VRFS - seq 10 permit 10.254.1.96/31 -! -mlag configuration - domain-id ptp-test-leaf - local-interface Vlan4094 - peer-address 10.254.1.65 - peer-link Port-Channel9 - reload-delay mlag 300 - reload-delay non-mlag 330 -! 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-VRFS deny 10 - match ip address prefix-list PL-MLAG-PEER-VRFS -! -route-map RM-CONN-2-BGP-VRFS permit 20 -! -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 -! router bfd multihop interval 300 min-rx 300 multiplier 3 ! @@ -309,15 +227,6 @@ router bgp 65101 neighbor IPv4-UNDERLAY-PEERS peer group neighbor IPv4-UNDERLAY-PEERS send-community neighbor IPv4-UNDERLAY-PEERS maximum-routes 12000 - neighbor MLAG-IPv4-UNDERLAY-PEER peer group - neighbor MLAG-IPv4-UNDERLAY-PEER remote-as 65101 - neighbor MLAG-IPv4-UNDERLAY-PEER next-hop-self - neighbor MLAG-IPv4-UNDERLAY-PEER description ptp-tests-leaf2 - neighbor MLAG-IPv4-UNDERLAY-PEER route-map RM-MLAG-PEER-IN in - neighbor MLAG-IPv4-UNDERLAY-PEER send-community - neighbor MLAG-IPv4-UNDERLAY-PEER maximum-routes 12000 - neighbor 10.254.1.97 peer group MLAG-IPv4-UNDERLAY-PEER - neighbor 10.254.1.97 description ptp-tests-leaf2_Vlan4093 neighbor 10.254.2.0 peer group IPv4-UNDERLAY-PEERS neighbor 10.254.2.0 remote-as 65200 neighbor 10.254.2.0 description ptp-tests-spine1_Ethernet1 @@ -340,15 +249,12 @@ router bgp 65101 address-family ipv4 no neighbor EVPN-OVERLAY-PEERS activate neighbor IPv4-UNDERLAY-PEERS activate - neighbor MLAG-IPv4-UNDERLAY-PEER activate ! vrf VRF1 rd 10.254.1.1:1 route-target import evpn 1:1 route-target export evpn 1:1 router-id 10.254.1.1 - neighbor 10.254.1.97 peer group MLAG-IPv4-UNDERLAY-PEER - neighbor 10.254.1.97 description ptp-tests-leaf2_Vlan3000 - redistribute connected route-map RM-CONN-2-BGP-VRFS + redistribute connected ! end diff --git a/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/intended/configs/ptp-tests-leaf2.cfg b/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/intended/configs/ptp-tests-leaf2.cfg index 8253fe669b0..8bb47e0b6a1 100644 --- a/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/intended/configs/ptp-tests-leaf2.cfg +++ b/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/intended/configs/ptp-tests-leaf2.cfg @@ -31,24 +31,11 @@ ptp monitor threshold missing-message delay-resp 12 sequence-ids ptp monitor threshold missing-message announce 11 sequence-ids ! spanning-tree mode mstp -no spanning-tree vlan-id 4093-4094 spanning-tree mst 0 priority 4096 ! vlan 11 name VLAN11 ! -vlan 3000 - name MLAG_L3_VRF_VRF1 - trunk group MLAG -! -vlan 4093 - name MLAG_L3 - trunk group MLAG -! -vlan 4094 - name MLAG - trunk group MLAG -! vrf instance MGMT ! vrf instance VRF1 @@ -66,9 +53,7 @@ interface Port-Channel6 switchport access vlan 11 switchport mode access switchport - mlag 6 ptp enable - ptp mpass ptp announce interval 0 ptp announce timeout 3 ptp delay-req interval -3 @@ -76,26 +61,12 @@ interface Port-Channel6 ptp sync-message interval -3 ptp transport ipv4 ! -interface Port-Channel9 - description MLAG_ptp-tests-leaf1_Port-Channel9 - no shutdown - switchport mode trunk - switchport trunk group MLAG - switchport - ptp enable - ptp announce interval 0 - ptp announce timeout 3 - ptp delay-req interval -3 - ptp sync-message interval -3 - ptp transport ipv4 -! interface Port-Channel11 description L2_ptp-tests-l2leaf1-ptp-disabled_Port-Channel1 no shutdown switchport trunk allowed vlan 11 switchport mode trunk switchport - mlag 11 ! interface Port-Channel12 description L2_ptp-tests-l2leaf2-ptp-enabled_Port-Channel1 @@ -103,7 +74,6 @@ interface Port-Channel12 switchport trunk allowed vlan 11 switchport mode trunk switchport - mlag 12 ptp enable ptp announce interval 0 ptp announce timeout 3 @@ -117,7 +87,6 @@ interface Port-Channel14 switchport trunk allowed vlan 11 switchport mode trunk switchport - mlag 14 ! interface Ethernet1 description P2P_ptp-tests-spine1_Ethernet3 @@ -165,16 +134,6 @@ interface Ethernet6 no shutdown channel-group 6 mode active ! -interface Ethernet9 - description MLAG_ptp-tests-leaf1_Ethernet9 - no shutdown - channel-group 9 mode active -! -interface Ethernet10 - description MLAG_ptp-tests-leaf1_Ethernet10 - no shutdown - channel-group 9 mode active -! interface Ethernet11 description L2_ptp-tests-l2leaf1-ptp-disabled_Ethernet2 no shutdown @@ -198,7 +157,7 @@ interface Loopback0 interface Loopback1 description VXLAN_TUNNEL_SOURCE no shutdown - ip address 10.254.11.1/32 + ip address 10.254.11.2/32 ! interface Management1 description OOB_MANAGEMENT @@ -212,30 +171,9 @@ interface Vlan11 vrf VRF1 ip address 172.17.11.1/24 ! -interface Vlan3000 - description MLAG_L3_VRF_VRF1 - no shutdown - mtu 9214 - vrf VRF1 - ip address 10.254.1.97/31 -! -interface Vlan4093 - description MLAG_L3 - no shutdown - mtu 9214 - ip address 10.254.1.97/31 -! -interface Vlan4094 - description MLAG - no shutdown - mtu 9214 - no autostate - ip address 10.254.1.65/31 -! interface Vxlan1 description ptp-tests-leaf2_VTEP vxlan source-interface Loopback1 - vxlan virtual-router encapsulation mac-address mlag-system-id vxlan udp-port 4789 vxlan vlan 11 vni 10011 vxlan vrf VRF1 vni 1 @@ -248,31 +186,11 @@ 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 ! -ip prefix-list PL-MLAG-PEER-VRFS - seq 10 permit 10.254.1.96/31 -! -mlag configuration - domain-id ptp-test-leaf - local-interface Vlan4094 - peer-address 10.254.1.64 - peer-link Port-Channel9 - reload-delay mlag 300 - reload-delay non-mlag 330 -! 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-VRFS deny 10 - match ip address prefix-list PL-MLAG-PEER-VRFS -! -route-map RM-CONN-2-BGP-VRFS permit 20 -! -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 -! router bfd multihop interval 300 min-rx 300 multiplier 3 ! @@ -289,15 +207,6 @@ router bgp 65102 neighbor IPv4-UNDERLAY-PEERS peer group neighbor IPv4-UNDERLAY-PEERS send-community neighbor IPv4-UNDERLAY-PEERS maximum-routes 12000 - neighbor MLAG-IPv4-UNDERLAY-PEER peer group - neighbor MLAG-IPv4-UNDERLAY-PEER remote-as 65102 - neighbor MLAG-IPv4-UNDERLAY-PEER next-hop-self - neighbor MLAG-IPv4-UNDERLAY-PEER description ptp-tests-leaf1 - neighbor MLAG-IPv4-UNDERLAY-PEER route-map RM-MLAG-PEER-IN in - neighbor MLAG-IPv4-UNDERLAY-PEER send-community - neighbor MLAG-IPv4-UNDERLAY-PEER maximum-routes 12000 - neighbor 10.254.1.96 peer group MLAG-IPv4-UNDERLAY-PEER - neighbor 10.254.1.96 description ptp-tests-leaf1_Vlan4093 neighbor 10.254.2.4 peer group IPv4-UNDERLAY-PEERS neighbor 10.254.2.4 remote-as 65200 neighbor 10.254.2.4 description ptp-tests-spine1_Ethernet3 @@ -320,15 +229,12 @@ router bgp 65102 address-family ipv4 no neighbor EVPN-OVERLAY-PEERS activate neighbor IPv4-UNDERLAY-PEERS activate - neighbor MLAG-IPv4-UNDERLAY-PEER activate ! vrf VRF1 rd 10.254.1.2:1 route-target import evpn 1:1 route-target export evpn 1:1 router-id 10.254.1.2 - neighbor 10.254.1.96 peer group MLAG-IPv4-UNDERLAY-PEER - neighbor 10.254.1.96 description ptp-tests-leaf1_Vlan3000 - redistribute connected route-map RM-CONN-2-BGP-VRFS + redistribute connected ! end diff --git a/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/intended/configs/ptp-tests-restrict-uplinks-leaf1.cfg b/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/intended/configs/ptp-tests-restrict-uplinks-leaf1.cfg new file mode 100644 index 00000000000..420e9db94ef --- /dev/null +++ b/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/intended/configs/ptp-tests-restrict-uplinks-leaf1.cfg @@ -0,0 +1,172 @@ +! +no enable password +no aaa root +! +vlan internal order ascending range 1006 1199 +! +transceiver qsfp default-mode 4x10G +! +service routing protocols model multi-agent +! +hostname ptp-tests-restrict-uplinks-leaf1 +! +ptp clock-identity 11:11:11:11:11:11 +ptp domain 127 +ptp mode boundary one-step +ptp priority1 30 +ptp priority2 3 +ptp monitor threshold offset-from-master 250 +ptp monitor threshold mean-path-delay 1500 +ptp monitor sequence-id +ptp monitor threshold missing-message sync 3 sequence-ids +ptp monitor threshold missing-message follow-up 3 sequence-ids +ptp monitor threshold missing-message delay-resp 3 sequence-ids +ptp monitor threshold missing-message announce 3 sequence-ids +! +spanning-tree mode mstp +spanning-tree mst 0 priority 4096 +! +vlan 11 + name VLAN11 +! +vrf instance MGMT +! +vrf instance VRF1 +! +management api http-commands + protocol https + no shutdown + ! + vrf MGMT + no shutdown +! +interface Ethernet1 + description P2P_ptp-tests-spine1_Ethernet10 + no shutdown + mtu 9214 + no switchport + ip address 10.254.2.13/31 + ptp enable + ptp announce interval 0 + ptp announce timeout 3 + ptp delay-req interval -3 + ptp sync-message interval -3 + ptp transport ipv4 +! +interface Ethernet2 + description P2P_ptp-tests-spine2_Ethernet10 + no shutdown + mtu 9214 + no switchport + ip address 10.254.2.15/31 + ptp enable + ptp announce interval 0 + ptp announce timeout 3 + ptp delay-req interval -3 + ptp sync-message interval -3 + ptp transport ipv4 +! +interface Ethernet3 + description P2P_ptp-tests-spine3_Ethernet10 + no shutdown + mtu 9214 + no switchport + ip address 10.254.2.17/31 +! +interface Loopback0 + description ROUTER_ID + no shutdown + ip address 10.254.1.3/32 +! +interface Loopback1 + description VXLAN_TUNNEL_SOURCE + no shutdown + ip address 10.254.11.3/32 +! +interface Management1 + description OOB_MANAGEMENT + no shutdown + vrf MGMT + ip address 192.168.0.103/24 +! +interface Vlan11 + description VLAN11 + no shutdown + vrf VRF1 +! +interface Vxlan1 + description ptp-tests-restrict-uplinks-leaf1_VTEP + vxlan source-interface Loopback1 + vxlan udp-port 4789 + vxlan vlan 11 vni 10011 + vxlan vrf VRF1 vni 1 +! +ip routing +no ip routing vrf MGMT +ip routing vrf VRF1 +! +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 +! +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 +! +router bfd + multihop interval 300 min-rx 300 multiplier 3 +! +router bgp 65103 + router-id 10.254.1.3 + no bgp default ipv4-unicast + maximum-paths 4 ecmp 4 + neighbor EVPN-OVERLAY-PEERS peer group + neighbor EVPN-OVERLAY-PEERS update-source Loopback0 + neighbor EVPN-OVERLAY-PEERS bfd + neighbor EVPN-OVERLAY-PEERS ebgp-multihop 3 + neighbor EVPN-OVERLAY-PEERS send-community + neighbor EVPN-OVERLAY-PEERS maximum-routes 0 + neighbor IPv4-UNDERLAY-PEERS peer group + neighbor IPv4-UNDERLAY-PEERS send-community + neighbor IPv4-UNDERLAY-PEERS maximum-routes 12000 + neighbor 10.254.2.12 peer group IPv4-UNDERLAY-PEERS + neighbor 10.254.2.12 remote-as 65200 + neighbor 10.254.2.12 description ptp-tests-spine1_Ethernet10 + neighbor 10.254.2.14 peer group IPv4-UNDERLAY-PEERS + neighbor 10.254.2.14 remote-as 65200 + neighbor 10.254.2.14 description ptp-tests-spine2_Ethernet10 + neighbor 10.254.2.16 peer group IPv4-UNDERLAY-PEERS + neighbor 10.254.2.16 remote-as 65200 + neighbor 10.254.2.16 description ptp-tests-spine3_Ethernet10 + neighbor 10.255.0.1 peer group EVPN-OVERLAY-PEERS + neighbor 10.255.0.1 remote-as 65200 + neighbor 10.255.0.1 description ptp-tests-spine1_Loopback0 + neighbor 10.255.0.2 peer group EVPN-OVERLAY-PEERS + neighbor 10.255.0.2 remote-as 65200 + neighbor 10.255.0.2 description ptp-tests-spine2_Loopback0 + neighbor 10.255.0.3 peer group EVPN-OVERLAY-PEERS + neighbor 10.255.0.3 remote-as 65200 + neighbor 10.255.0.3 description ptp-tests-spine3_Loopback0 + redistribute connected route-map RM-CONN-2-BGP + ! + vlan 11 + rd 10.254.1.3:10011 + route-target both 10011:10011 + redistribute learned + ! + address-family evpn + neighbor EVPN-OVERLAY-PEERS activate + ! + address-family ipv4 + no neighbor EVPN-OVERLAY-PEERS activate + neighbor IPv4-UNDERLAY-PEERS activate + ! + vrf VRF1 + rd 10.254.1.3:1 + route-target import evpn 1:1 + route-target export evpn 1:1 + router-id 10.254.1.3 + redistribute connected +! +end diff --git a/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/intended/configs/ptp-tests-spine1.cfg b/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/intended/configs/ptp-tests-spine1.cfg index 1145a809124..5366d90dfc2 100644 --- a/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/intended/configs/ptp-tests-spine1.cfg +++ b/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/intended/configs/ptp-tests-spine1.cfg @@ -134,6 +134,19 @@ interface Ethernet9 ptp sync-message interval -3 ptp transport ipv4 ! +interface Ethernet10 + description P2P_ptp-tests-restrict-uplinks-leaf1_Ethernet1 + no shutdown + mtu 9214 + no switchport + ip address 10.254.2.12/31 + ptp enable + ptp announce interval 0 + ptp announce timeout 3 + ptp delay-req interval -3 + ptp sync-message interval -3 + ptp transport ipv4 +! interface Loopback0 description ROUTER_ID no shutdown @@ -180,6 +193,9 @@ router bgp 65200 neighbor 10.254.1.2 peer group EVPN-OVERLAY-PEERS neighbor 10.254.1.2 remote-as 65102 neighbor 10.254.1.2 description ptp-tests-leaf2_Loopback0 + neighbor 10.254.1.3 peer group EVPN-OVERLAY-PEERS + neighbor 10.254.1.3 remote-as 65103 + neighbor 10.254.1.3 description ptp-tests-restrict-uplinks-leaf1_Loopback0 neighbor 10.254.2.1 peer group IPv4-UNDERLAY-PEERS neighbor 10.254.2.1 remote-as 65101 neighbor 10.254.2.1 description ptp-tests-leaf1_Ethernet1 @@ -192,6 +208,9 @@ router bgp 65200 neighbor 10.254.2.7 peer group IPv4-UNDERLAY-PEERS neighbor 10.254.2.7 remote-as 65102 neighbor 10.254.2.7 description ptp-tests-leaf2_Ethernet2 + neighbor 10.254.2.13 peer group IPv4-UNDERLAY-PEERS + neighbor 10.254.2.13 remote-as 65103 + neighbor 10.254.2.13 description ptp-tests-restrict-uplinks-leaf1_Ethernet1 redistribute connected route-map RM-CONN-2-BGP ! address-family evpn diff --git a/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/intended/configs/ptp-tests-spine2.cfg b/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/intended/configs/ptp-tests-spine2.cfg index 3f1d97728f7..cb813b34656 100644 --- a/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/intended/configs/ptp-tests-spine2.cfg +++ b/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/intended/configs/ptp-tests-spine2.cfg @@ -90,6 +90,19 @@ interface Ethernet9 ptp sync-message interval -3 ptp transport ipv4 ! +interface Ethernet10 + description P2P_ptp-tests-restrict-uplinks-leaf1_Ethernet2 + no shutdown + mtu 9214 + no switchport + ip address 10.254.2.14/31 + ptp enable + ptp announce interval 0 + ptp announce timeout 3 + ptp delay-req interval -3 + ptp sync-message interval -3 + ptp transport ipv4 +! interface Loopback0 description ROUTER_ID no shutdown @@ -130,6 +143,12 @@ router bgp 65200 neighbor IPv4-UNDERLAY-PEERS peer group neighbor IPv4-UNDERLAY-PEERS send-community neighbor IPv4-UNDERLAY-PEERS maximum-routes 12000 + neighbor 10.254.1.3 peer group EVPN-OVERLAY-PEERS + neighbor 10.254.1.3 remote-as 65103 + neighbor 10.254.1.3 description ptp-tests-restrict-uplinks-leaf1_Loopback0 + neighbor 10.254.2.15 peer group IPv4-UNDERLAY-PEERS + neighbor 10.254.2.15 remote-as 65103 + neighbor 10.254.2.15 description ptp-tests-restrict-uplinks-leaf1_Ethernet2 redistribute connected route-map RM-CONN-2-BGP ! address-family evpn diff --git a/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/intended/configs/ptp-tests-spine3.cfg b/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/intended/configs/ptp-tests-spine3.cfg index 8431f91e06e..ddc25a23449 100644 --- a/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/intended/configs/ptp-tests-spine3.cfg +++ b/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/intended/configs/ptp-tests-spine3.cfg @@ -33,6 +33,13 @@ management api http-commands vrf MGMT no shutdown ! +interface Ethernet10 + description P2P_ptp-tests-restrict-uplinks-leaf1_Ethernet3 + no shutdown + mtu 9214 + no switchport + ip address 10.254.2.16/31 +! interface Loopback0 description ROUTER_ID no shutdown @@ -73,6 +80,12 @@ router bgp 65200 neighbor IPv4-UNDERLAY-PEERS peer group neighbor IPv4-UNDERLAY-PEERS send-community neighbor IPv4-UNDERLAY-PEERS maximum-routes 12000 + neighbor 10.254.1.3 peer group EVPN-OVERLAY-PEERS + neighbor 10.254.1.3 remote-as 65103 + neighbor 10.254.1.3 description ptp-tests-restrict-uplinks-leaf1_Loopback0 + neighbor 10.254.2.17 peer group IPv4-UNDERLAY-PEERS + neighbor 10.254.2.17 remote-as 65103 + neighbor 10.254.2.17 description ptp-tests-restrict-uplinks-leaf1_Ethernet3 redistribute connected route-map RM-CONN-2-BGP ! address-family evpn diff --git a/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/intended/structured_configs/ptp-tests-l2leaf1-ptp-disabled.yml b/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/intended/structured_configs/ptp-tests-l2leaf1-ptp-disabled.yml index 967a772f46f..0fc2c74e2a6 100644 --- a/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/intended/structured_configs/ptp-tests-l2leaf1-ptp-disabled.yml +++ b/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/intended/structured_configs/ptp-tests-l2leaf1-ptp-disabled.yml @@ -49,7 +49,7 @@ ethernet_interfaces: mode: active port_channel_interfaces: - name: Port-Channel1 - description: L2_ptp-test-leaf_Port-Channel11 + description: L2_ptp-tests-leaf1_Port-Channel11 switchport: enabled: true mode: trunk diff --git a/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/intended/structured_configs/ptp-tests-l2leaf2-ptp-enabled-uplink-disabled.yml b/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/intended/structured_configs/ptp-tests-l2leaf2-ptp-enabled-uplink-disabled.yml index 4e638f5bf31..460f08c7e30 100644 --- a/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/intended/structured_configs/ptp-tests-l2leaf2-ptp-enabled-uplink-disabled.yml +++ b/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/intended/structured_configs/ptp-tests-l2leaf2-ptp-enabled-uplink-disabled.yml @@ -67,7 +67,7 @@ ethernet_interfaces: mode: active port_channel_interfaces: - name: Port-Channel1 - description: L2_ptp-test-leaf_Port-Channel14 + description: L2_ptp-tests-leaf1_Port-Channel14 switchport: enabled: true mode: trunk diff --git a/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/intended/structured_configs/ptp-tests-l2leaf2-ptp-enabled.yml b/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/intended/structured_configs/ptp-tests-l2leaf2-ptp-enabled.yml index 048aefa067c..4026701c56b 100644 --- a/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/intended/structured_configs/ptp-tests-l2leaf2-ptp-enabled.yml +++ b/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/intended/structured_configs/ptp-tests-l2leaf2-ptp-enabled.yml @@ -67,7 +67,7 @@ ethernet_interfaces: mode: active port_channel_interfaces: - name: Port-Channel1 - description: L2_ptp-test-leaf_Port-Channel12 + description: L2_ptp-tests-leaf1_Port-Channel12 switchport: enabled: true mode: trunk diff --git a/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/intended/structured_configs/ptp-tests-leaf1.yml b/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/intended/structured_configs/ptp-tests-leaf1.yml index ae9869f3e95..9add5c942b6 100644 --- a/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/intended/structured_configs/ptp-tests-leaf1.yml +++ b/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/intended/structured_configs/ptp-tests-leaf1.yml @@ -14,14 +14,6 @@ router_bgp: enabled: true route_map: RM-CONN-2-BGP peer_groups: - - name: MLAG-IPv4-UNDERLAY-PEER - type: ipv4 - remote_as: '65101' - next_hop_self: true - description: ptp-tests-leaf2 - maximum_routes: 12000 - send_community: all - route_map_in: RM-MLAG-PEER-IN - name: IPv4-UNDERLAY-PEERS type: ipv4 maximum_routes: 12000 @@ -35,17 +27,11 @@ router_bgp: ebgp_multihop: 3 address_family_ipv4: peer_groups: - - name: MLAG-IPv4-UNDERLAY-PEER - activate: true - name: IPv4-UNDERLAY-PEERS activate: true - name: EVPN-OVERLAY-PEERS activate: false neighbors: - - ip_address: 10.254.1.97 - peer_group: MLAG-IPv4-UNDERLAY-PEER - peer: ptp-tests-leaf2 - description: ptp-tests-leaf2_Vlan4093 - ip_address: 10.254.2.0 peer_group: IPv4-UNDERLAY-PEERS remote_as: '65200' @@ -81,11 +67,6 @@ router_bgp: redistribute: connected: enabled: true - route_map: RM-CONN-2-BGP-VRFS - neighbors: - - ip_address: 10.254.1.97 - peer_group: MLAG-IPv4-UNDERLAY-PEER - description: ptp-tests-leaf2_Vlan3000 vlans: - id: 11 tenant: PTP @@ -117,7 +98,6 @@ spanning_tree: mst_instances: - id: '0' priority: 4096 - no_spanning_tree_vlan: 4093-4094 vrfs: - name: MGMT ip_routing: false @@ -155,144 +135,7 @@ ptp: delay_resp: 3 follow_up: 3 sync: 3 -vlans: -- id: 4093 - tenant: system - name: MLAG_L3 - trunk_groups: - - MLAG -- id: 4094 - tenant: system - name: MLAG - trunk_groups: - - MLAG -- id: 11 - name: VLAN11 - tenant: PTP -- id: 3000 - name: MLAG_L3_VRF_VRF1 - trunk_groups: - - MLAG - tenant: PTP -vlan_interfaces: -- name: Vlan4093 - description: MLAG_L3 - shutdown: false - mtu: 9214 - ip_address: 10.254.1.96/31 -- name: Vlan4094 - description: MLAG - shutdown: false - no_autostate: true - mtu: 9214 - ip_address: 10.254.1.64/31 -- name: Vlan11 - tenant: PTP - description: VLAN11 - shutdown: false - ip_address: 172.16.11.1/24 - vrf: VRF1 -- name: Vlan3000 - tenant: PTP - type: underlay_peering - shutdown: false - description: MLAG_L3_VRF_VRF1 - vrf: VRF1 - mtu: 9214 - ip_address: 10.254.1.96/31 -port_channel_interfaces: -- name: Port-Channel9 - description: MLAG_ptp-tests-leaf2_Port-Channel9 - switchport: - enabled: true - mode: trunk - trunk: - groups: - - MLAG - shutdown: false - ptp: - announce: - interval: 0 - timeout: 3 - delay_req: -3 - sync_message: - interval: -3 - transport: ipv4 - enable: true -- name: Port-Channel11 - description: L2_ptp-tests-l2leaf1-ptp-disabled_Port-Channel1 - switchport: - enabled: true - mode: trunk - trunk: - allowed_vlan: '11' - shutdown: false - mlag: 11 -- name: Port-Channel12 - description: L2_ptp-tests-l2leaf2-ptp-enabled_Port-Channel1 - switchport: - enabled: true - mode: trunk - trunk: - allowed_vlan: '11' - shutdown: false - mlag: 12 - ptp: - announce: - interval: 0 - timeout: 3 - delay_req: -3 - sync_message: - interval: -3 - transport: ipv4 - enable: true -- name: Port-Channel14 - description: L2_ptp-tests-l2leaf2-ptp-enabled-uplink-disabled_Port-Channel1 - switchport: - enabled: true - mode: trunk - trunk: - allowed_vlan: '11' - shutdown: false - mlag: 14 -- name: Port-Channel6 - description: SERVER_Endpoint-with-mpass - shutdown: false - ptp: - announce: - interval: 0 - timeout: 3 - delay_req: -3 - sync_message: - interval: -3 - transport: ipv4 - enable: true - role: master - mpass: true - switchport: - enabled: true - mode: access - access_vlan: '11' - mlag: 6 ethernet_interfaces: -- name: Ethernet9 - peer: ptp-tests-leaf2 - peer_interface: Ethernet9 - peer_type: mlag_peer - description: MLAG_ptp-tests-leaf2_Ethernet9 - shutdown: false - channel_group: - id: 9 - mode: active -- name: Ethernet10 - peer: ptp-tests-leaf2 - peer_interface: Ethernet10 - peer_type: mlag_peer - description: MLAG_ptp-tests-leaf2_Ethernet10 - shutdown: false - channel_group: - id: 9 - mode: active - name: Ethernet1 peer: ptp-tests-spine1 peer_interface: Ethernet1 @@ -428,35 +271,57 @@ ethernet_interfaces: transport: ipv4 enable: true role: master -mlag_configuration: - domain_id: ptp-test-leaf - local_interface: Vlan4094 - peer_address: 10.254.1.65 - peer_link: Port-Channel9 - reload_delay_mlag: '300' - reload_delay_non_mlag: '330' -route_maps: -- name: RM-MLAG-PEER-IN - sequence_numbers: - - sequence: 10 - type: permit - set: - - origin incomplete - description: Make routes learned over MLAG Peer-link less preferred on spines to ensure optimal routing -- name: RM-CONN-2-BGP - sequence_numbers: - - sequence: 10 - type: permit - match: - - ip address prefix-list PL-LOOPBACKS-EVPN-OVERLAY -- name: RM-CONN-2-BGP-VRFS - sequence_numbers: - - sequence: 10 - type: deny - match: - - ip address prefix-list PL-MLAG-PEER-VRFS - - sequence: 20 - type: permit +port_channel_interfaces: +- name: Port-Channel11 + description: L2_ptp-tests-l2leaf1-ptp-disabled_Port-Channel1 + switchport: + enabled: true + mode: trunk + trunk: + allowed_vlan: '11' + shutdown: false +- name: Port-Channel12 + description: L2_ptp-tests-l2leaf2-ptp-enabled_Port-Channel1 + switchport: + enabled: true + mode: trunk + trunk: + allowed_vlan: '11' + shutdown: false + ptp: + announce: + interval: 0 + timeout: 3 + delay_req: -3 + sync_message: + interval: -3 + transport: ipv4 + enable: true +- name: Port-Channel14 + description: L2_ptp-tests-l2leaf2-ptp-enabled-uplink-disabled_Port-Channel1 + switchport: + enabled: true + mode: trunk + trunk: + allowed_vlan: '11' + shutdown: false +- name: Port-Channel6 + description: SERVER_Endpoint-with-mpass + shutdown: false + ptp: + announce: + interval: 0 + timeout: 3 + delay_req: -3 + sync_message: + interval: -3 + transport: ipv4 + enable: true + role: master + switchport: + enabled: true + mode: access + access_vlan: '11' loopback_interfaces: - name: Loopback0 description: ROUTER_ID @@ -473,24 +338,37 @@ prefix_lists: action: permit 10.254.1.0/27 eq 32 - sequence: 20 action: permit 10.254.11.0/27 eq 32 -- name: PL-MLAG-PEER-VRFS +route_maps: +- name: RM-CONN-2-BGP sequence_numbers: - sequence: 10 - action: permit 10.254.1.96/31 + type: permit + match: + - ip address prefix-list PL-LOOPBACKS-EVPN-OVERLAY router_bfd: multihop: interval: 300 min_rx: 300 multiplier: 3 +vlans: +- id: 11 + name: VLAN11 + tenant: PTP ip_igmp_snooping: globally_enabled: true +vlan_interfaces: +- name: Vlan11 + tenant: PTP + description: VLAN11 + shutdown: false + ip_address: 172.16.11.1/24 + vrf: VRF1 vxlan_interface: vxlan1: description: ptp-tests-leaf1_VTEP vxlan: udp_port: 4789 source_interface: Loopback1 - virtual_router_encapsulation_mac_address: mlag-system-id vlans: - id: 11 vni: 10011 diff --git a/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/intended/structured_configs/ptp-tests-leaf2.yml b/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/intended/structured_configs/ptp-tests-leaf2.yml index 15008e45596..55c2796be77 100644 --- a/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/intended/structured_configs/ptp-tests-leaf2.yml +++ b/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/intended/structured_configs/ptp-tests-leaf2.yml @@ -14,14 +14,6 @@ router_bgp: enabled: true route_map: RM-CONN-2-BGP peer_groups: - - name: MLAG-IPv4-UNDERLAY-PEER - type: ipv4 - remote_as: '65102' - next_hop_self: true - description: ptp-tests-leaf1 - maximum_routes: 12000 - send_community: all - route_map_in: RM-MLAG-PEER-IN - name: IPv4-UNDERLAY-PEERS type: ipv4 maximum_routes: 12000 @@ -35,17 +27,11 @@ router_bgp: ebgp_multihop: 3 address_family_ipv4: peer_groups: - - name: MLAG-IPv4-UNDERLAY-PEER - activate: true - name: IPv4-UNDERLAY-PEERS activate: true - name: EVPN-OVERLAY-PEERS activate: false neighbors: - - ip_address: 10.254.1.96 - peer_group: MLAG-IPv4-UNDERLAY-PEER - peer: ptp-tests-leaf1 - description: ptp-tests-leaf1_Vlan4093 - ip_address: 10.254.2.4 peer_group: IPv4-UNDERLAY-PEERS remote_as: '65200' @@ -81,11 +67,6 @@ router_bgp: redistribute: connected: enabled: true - route_map: RM-CONN-2-BGP-VRFS - neighbors: - - ip_address: 10.254.1.96 - peer_group: MLAG-IPv4-UNDERLAY-PEER - description: ptp-tests-leaf1_Vlan3000 vlans: - id: 11 tenant: PTP @@ -117,7 +98,6 @@ spanning_tree: mst_instances: - id: '0' priority: 4096 - no_spanning_tree_vlan: 4093-4094 vrfs: - name: MGMT ip_routing: false @@ -166,144 +146,7 @@ ptp: delay_resp: 12 follow_up: 13 sync: 14 -vlans: -- id: 4093 - tenant: system - name: MLAG_L3 - trunk_groups: - - MLAG -- id: 4094 - tenant: system - name: MLAG - trunk_groups: - - MLAG -- id: 11 - name: VLAN11 - tenant: PTP -- id: 3000 - name: MLAG_L3_VRF_VRF1 - trunk_groups: - - MLAG - tenant: PTP -vlan_interfaces: -- name: Vlan4093 - description: MLAG_L3 - shutdown: false - mtu: 9214 - ip_address: 10.254.1.97/31 -- name: Vlan4094 - description: MLAG - shutdown: false - no_autostate: true - mtu: 9214 - ip_address: 10.254.1.65/31 -- name: Vlan11 - tenant: PTP - description: VLAN11 - shutdown: false - ip_address: 172.17.11.1/24 - vrf: VRF1 -- name: Vlan3000 - tenant: PTP - type: underlay_peering - shutdown: false - description: MLAG_L3_VRF_VRF1 - vrf: VRF1 - mtu: 9214 - ip_address: 10.254.1.97/31 -port_channel_interfaces: -- name: Port-Channel9 - description: MLAG_ptp-tests-leaf1_Port-Channel9 - switchport: - enabled: true - mode: trunk - trunk: - groups: - - MLAG - shutdown: false - ptp: - announce: - interval: 0 - timeout: 3 - delay_req: -3 - sync_message: - interval: -3 - transport: ipv4 - enable: true -- name: Port-Channel11 - description: L2_ptp-tests-l2leaf1-ptp-disabled_Port-Channel1 - switchport: - enabled: true - mode: trunk - trunk: - allowed_vlan: '11' - shutdown: false - mlag: 11 -- name: Port-Channel12 - description: L2_ptp-tests-l2leaf2-ptp-enabled_Port-Channel1 - switchport: - enabled: true - mode: trunk - trunk: - allowed_vlan: '11' - shutdown: false - mlag: 12 - ptp: - announce: - interval: 0 - timeout: 3 - delay_req: -3 - sync_message: - interval: -3 - transport: ipv4 - enable: true -- name: Port-Channel14 - description: L2_ptp-tests-l2leaf2-ptp-enabled-uplink-disabled_Port-Channel1 - switchport: - enabled: true - mode: trunk - trunk: - allowed_vlan: '11' - shutdown: false - mlag: 14 -- name: Port-Channel6 - description: SERVER_Endpoint-with-mpass - shutdown: false - ptp: - announce: - interval: 0 - timeout: 3 - delay_req: -3 - sync_message: - interval: -3 - transport: ipv4 - enable: true - role: master - mpass: true - switchport: - enabled: true - mode: access - access_vlan: '11' - mlag: 6 ethernet_interfaces: -- name: Ethernet9 - peer: ptp-tests-leaf1 - peer_interface: Ethernet9 - peer_type: mlag_peer - description: MLAG_ptp-tests-leaf1_Ethernet9 - shutdown: false - channel_group: - id: 9 - mode: active -- name: Ethernet10 - peer: ptp-tests-leaf1 - peer_interface: Ethernet10 - peer_type: mlag_peer - description: MLAG_ptp-tests-leaf1_Ethernet10 - shutdown: false - channel_group: - id: 9 - mode: active - name: Ethernet1 peer: ptp-tests-spine1 peer_interface: Ethernet3 @@ -399,35 +242,57 @@ ethernet_interfaces: channel_group: id: 6 mode: active -mlag_configuration: - domain_id: ptp-test-leaf - local_interface: Vlan4094 - peer_address: 10.254.1.64 - peer_link: Port-Channel9 - reload_delay_mlag: '300' - reload_delay_non_mlag: '330' -route_maps: -- name: RM-MLAG-PEER-IN - sequence_numbers: - - sequence: 10 - type: permit - set: - - origin incomplete - description: Make routes learned over MLAG Peer-link less preferred on spines to ensure optimal routing -- name: RM-CONN-2-BGP - sequence_numbers: - - sequence: 10 - type: permit - match: - - ip address prefix-list PL-LOOPBACKS-EVPN-OVERLAY -- name: RM-CONN-2-BGP-VRFS - sequence_numbers: - - sequence: 10 - type: deny - match: - - ip address prefix-list PL-MLAG-PEER-VRFS - - sequence: 20 - type: permit +port_channel_interfaces: +- name: Port-Channel11 + description: L2_ptp-tests-l2leaf1-ptp-disabled_Port-Channel1 + switchport: + enabled: true + mode: trunk + trunk: + allowed_vlan: '11' + shutdown: false +- name: Port-Channel12 + description: L2_ptp-tests-l2leaf2-ptp-enabled_Port-Channel1 + switchport: + enabled: true + mode: trunk + trunk: + allowed_vlan: '11' + shutdown: false + ptp: + announce: + interval: 0 + timeout: 3 + delay_req: -3 + sync_message: + interval: -3 + transport: ipv4 + enable: true +- name: Port-Channel14 + description: L2_ptp-tests-l2leaf2-ptp-enabled-uplink-disabled_Port-Channel1 + switchport: + enabled: true + mode: trunk + trunk: + allowed_vlan: '11' + shutdown: false +- name: Port-Channel6 + description: SERVER_Endpoint-with-mpass + shutdown: false + ptp: + announce: + interval: 0 + timeout: 3 + delay_req: -3 + sync_message: + interval: -3 + transport: ipv4 + enable: true + role: master + switchport: + enabled: true + mode: access + access_vlan: '11' loopback_interfaces: - name: Loopback0 description: ROUTER_ID @@ -436,7 +301,7 @@ loopback_interfaces: - name: Loopback1 description: VXLAN_TUNNEL_SOURCE shutdown: false - ip_address: 10.254.11.1/32 + ip_address: 10.254.11.2/32 prefix_lists: - name: PL-LOOPBACKS-EVPN-OVERLAY sequence_numbers: @@ -444,24 +309,37 @@ prefix_lists: action: permit 10.254.1.0/27 eq 32 - sequence: 20 action: permit 10.254.11.0/27 eq 32 -- name: PL-MLAG-PEER-VRFS +route_maps: +- name: RM-CONN-2-BGP sequence_numbers: - sequence: 10 - action: permit 10.254.1.96/31 + type: permit + match: + - ip address prefix-list PL-LOOPBACKS-EVPN-OVERLAY router_bfd: multihop: interval: 300 min_rx: 300 multiplier: 3 +vlans: +- id: 11 + name: VLAN11 + tenant: PTP ip_igmp_snooping: globally_enabled: true +vlan_interfaces: +- name: Vlan11 + tenant: PTP + description: VLAN11 + shutdown: false + ip_address: 172.17.11.1/24 + vrf: VRF1 vxlan_interface: vxlan1: description: ptp-tests-leaf2_VTEP vxlan: udp_port: 4789 source_interface: Loopback1 - virtual_router_encapsulation_mac_address: mlag-system-id vlans: - id: 11 vni: 10011 diff --git a/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/intended/structured_configs/ptp-tests-restrict-uplinks-leaf1.yml b/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/intended/structured_configs/ptp-tests-restrict-uplinks-leaf1.yml new file mode 100644 index 00000000000..493fba333d0 --- /dev/null +++ b/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/intended/structured_configs/ptp-tests-restrict-uplinks-leaf1.yml @@ -0,0 +1,255 @@ +hostname: ptp-tests-restrict-uplinks-leaf1 +is_deployed: true +router_bgp: + as: '65103' + router_id: 10.254.1.3 + bgp: + default: + ipv4_unicast: false + maximum_paths: + paths: 4 + ecmp: 4 + redistribute: + connected: + enabled: true + route_map: RM-CONN-2-BGP + peer_groups: + - name: IPv4-UNDERLAY-PEERS + type: ipv4 + maximum_routes: 12000 + send_community: all + - name: EVPN-OVERLAY-PEERS + type: evpn + update_source: Loopback0 + bfd: true + send_community: all + maximum_routes: 0 + ebgp_multihop: 3 + address_family_ipv4: + peer_groups: + - name: IPv4-UNDERLAY-PEERS + activate: true + - name: EVPN-OVERLAY-PEERS + activate: false + neighbors: + - ip_address: 10.254.2.12 + peer_group: IPv4-UNDERLAY-PEERS + remote_as: '65200' + peer: ptp-tests-spine1 + description: ptp-tests-spine1_Ethernet10 + - ip_address: 10.254.2.14 + peer_group: IPv4-UNDERLAY-PEERS + remote_as: '65200' + peer: ptp-tests-spine2 + description: ptp-tests-spine2_Ethernet10 + - ip_address: 10.254.2.16 + peer_group: IPv4-UNDERLAY-PEERS + remote_as: '65200' + peer: ptp-tests-spine3 + description: ptp-tests-spine3_Ethernet10 + - ip_address: 10.255.0.1 + peer_group: EVPN-OVERLAY-PEERS + peer: ptp-tests-spine1 + description: ptp-tests-spine1_Loopback0 + remote_as: '65200' + - ip_address: 10.255.0.2 + peer_group: EVPN-OVERLAY-PEERS + peer: ptp-tests-spine2 + description: ptp-tests-spine2_Loopback0 + remote_as: '65200' + - ip_address: 10.255.0.3 + peer_group: EVPN-OVERLAY-PEERS + peer: ptp-tests-spine3 + description: ptp-tests-spine3_Loopback0 + remote_as: '65200' + address_family_evpn: + peer_groups: + - name: EVPN-OVERLAY-PEERS + activate: true + vrfs: + - name: VRF1 + rd: 10.254.1.3:1 + route_targets: + import: + - address_family: evpn + route_targets: + - '1:1' + export: + - address_family: evpn + route_targets: + - '1:1' + router_id: 10.254.1.3 + redistribute: + connected: + enabled: true + vlans: + - id: 11 + tenant: PTP + rd: 10.254.1.3:10011 + route_targets: + both: + - 10011:10011 + redistribute_routes: + - learned +static_routes: +- vrf: MGMT + destination_address_prefix: 0.0.0.0/0 + gateway: 192.168.0.1 +service_routing_protocols_model: multi-agent +ip_routing: true +vlan_internal_order: + allocation: ascending + range: + beginning: 1006 + ending: 1199 +aaa_root: + disabled: true +config_end: true +enable_password: + disabled: true +transceiver_qsfp_default_mode_4x10: true +spanning_tree: + mode: mstp + mst_instances: + - id: '0' + priority: 4096 +vrfs: +- name: MGMT + ip_routing: false +- name: VRF1 + tenant: PTP + ip_routing: true +management_interfaces: +- name: Management1 + description: OOB_MANAGEMENT + shutdown: false + vrf: MGMT + ip_address: 192.168.0.103/24 + gateway: 192.168.0.1 + type: oob +management_api_http: + enable_vrfs: + - name: MGMT + enable_https: true +ptp: + mode: boundary + mode_one_step: true + clock_identity: '11:11:11:11:11:11' + priority1: 30 + priority2: 3 + domain: 127 + monitor: + enabled: true + threshold: + offset_from_master: 250 + mean_path_delay: 1500 + missing_message: + sequence_ids: + enabled: true + announce: 3 + delay_resp: 3 + follow_up: 3 + sync: 3 +ethernet_interfaces: +- name: Ethernet1 + peer: ptp-tests-spine1 + peer_interface: Ethernet10 + peer_type: spine + description: P2P_ptp-tests-spine1_Ethernet10 + shutdown: false + mtu: 9214 + switchport: + enabled: false + ptp: + announce: + interval: 0 + timeout: 3 + delay_req: -3 + sync_message: + interval: -3 + transport: ipv4 + enable: true + ip_address: 10.254.2.13/31 +- name: Ethernet2 + peer: ptp-tests-spine2 + peer_interface: Ethernet10 + peer_type: spine + description: P2P_ptp-tests-spine2_Ethernet10 + shutdown: false + mtu: 9214 + switchport: + enabled: false + ptp: + announce: + interval: 0 + timeout: 3 + delay_req: -3 + sync_message: + interval: -3 + transport: ipv4 + enable: true + ip_address: 10.254.2.15/31 +- name: Ethernet3 + peer: ptp-tests-spine3 + peer_interface: Ethernet10 + peer_type: spine + description: P2P_ptp-tests-spine3_Ethernet10 + shutdown: false + mtu: 9214 + switchport: + enabled: false + ip_address: 10.254.2.17/31 +loopback_interfaces: +- name: Loopback0 + description: ROUTER_ID + shutdown: false + ip_address: 10.254.1.3/32 +- name: Loopback1 + description: VXLAN_TUNNEL_SOURCE + shutdown: false + ip_address: 10.254.11.3/32 +prefix_lists: +- name: PL-LOOPBACKS-EVPN-OVERLAY + sequence_numbers: + - sequence: 10 + action: permit 10.254.1.0/27 eq 32 + - sequence: 20 + action: permit 10.254.11.0/27 eq 32 +route_maps: +- name: RM-CONN-2-BGP + sequence_numbers: + - sequence: 10 + type: permit + match: + - ip address prefix-list PL-LOOPBACKS-EVPN-OVERLAY +router_bfd: + multihop: + interval: 300 + min_rx: 300 + multiplier: 3 +vlans: +- id: 11 + name: VLAN11 + tenant: PTP +ip_igmp_snooping: + globally_enabled: true +vlan_interfaces: +- name: Vlan11 + tenant: PTP + description: VLAN11 + shutdown: false + vrf: VRF1 +vxlan_interface: + vxlan1: + description: ptp-tests-restrict-uplinks-leaf1_VTEP + vxlan: + udp_port: 4789 + source_interface: Loopback1 + vlans: + - id: 11 + vni: 10011 + vrfs: + - name: VRF1 + vni: 1 +metadata: + platform: vEOS-lab diff --git a/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/intended/structured_configs/ptp-tests-spine1.yml b/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/intended/structured_configs/ptp-tests-spine1.yml index 3b32eeca7db..4be49c37a31 100644 --- a/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/intended/structured_configs/ptp-tests-spine1.yml +++ b/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/intended/structured_configs/ptp-tests-spine1.yml @@ -55,6 +55,11 @@ router_bgp: remote_as: '65102' peer: ptp-tests-leaf2 description: ptp-tests-leaf2_Ethernet2 + - ip_address: 10.254.2.13 + peer_group: IPv4-UNDERLAY-PEERS + remote_as: '65103' + peer: ptp-tests-restrict-uplinks-leaf1 + description: ptp-tests-restrict-uplinks-leaf1_Ethernet1 - ip_address: 10.254.1.1 peer_group: EVPN-OVERLAY-PEERS peer: ptp-tests-leaf1 @@ -65,6 +70,11 @@ router_bgp: peer: ptp-tests-leaf2 description: ptp-tests-leaf2_Loopback0 remote_as: '65102' + - ip_address: 10.254.1.3 + peer_group: EVPN-OVERLAY-PEERS + peer: ptp-tests-restrict-uplinks-leaf1 + description: ptp-tests-restrict-uplinks-leaf1_Loopback0 + remote_as: '65103' address_family_evpn: peer_groups: - name: EVPN-OVERLAY-PEERS @@ -199,6 +209,25 @@ ethernet_interfaces: transport: ipv4 enable: true ip_address: 10.254.2.6/31 +- name: Ethernet10 + peer: ptp-tests-restrict-uplinks-leaf1 + peer_interface: Ethernet1 + peer_type: l3leaf + description: P2P_ptp-tests-restrict-uplinks-leaf1_Ethernet1 + shutdown: false + mtu: 9214 + switchport: + enabled: false + ptp: + announce: + interval: 0 + timeout: 3 + delay_req: -3 + sync_message: + interval: -3 + transport: ipv4 + enable: true + ip_address: 10.254.2.12/31 - name: Ethernet6 peer: ptp-tests-spine2 peer_interface: Ethernet6 diff --git a/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/intended/structured_configs/ptp-tests-spine2.yml b/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/intended/structured_configs/ptp-tests-spine2.yml index 95361e29f9e..d6793545dfb 100644 --- a/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/intended/structured_configs/ptp-tests-spine2.yml +++ b/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/intended/structured_configs/ptp-tests-spine2.yml @@ -34,6 +34,17 @@ router_bgp: activate: true - name: EVPN-OVERLAY-PEERS activate: false + neighbors: + - ip_address: 10.254.2.15 + peer_group: IPv4-UNDERLAY-PEERS + remote_as: '65103' + peer: ptp-tests-restrict-uplinks-leaf1 + description: ptp-tests-restrict-uplinks-leaf1_Ethernet2 + - ip_address: 10.254.1.3 + peer_group: EVPN-OVERLAY-PEERS + peer: ptp-tests-restrict-uplinks-leaf1 + description: ptp-tests-restrict-uplinks-leaf1_Loopback0 + remote_as: '65103' address_family_evpn: peer_groups: - name: EVPN-OVERLAY-PEERS @@ -104,29 +115,26 @@ ptp: delay_resp: 12 follow_up: 13 sync: 14 -loopback_interfaces: -- name: Loopback0 - description: ROUTER_ID - shutdown: false - ip_address: 10.255.0.2/32 -prefix_lists: -- name: PL-LOOPBACKS-EVPN-OVERLAY - sequence_numbers: - - sequence: 10 - action: permit 10.255.0.0/27 eq 32 -route_maps: -- name: RM-CONN-2-BGP - sequence_numbers: - - sequence: 10 - type: permit - match: - - ip address prefix-list PL-LOOPBACKS-EVPN-OVERLAY -router_bfd: - multihop: - interval: 300 - min_rx: 300 - multiplier: 3 ethernet_interfaces: +- name: Ethernet10 + peer: ptp-tests-restrict-uplinks-leaf1 + peer_interface: Ethernet2 + peer_type: l3leaf + description: P2P_ptp-tests-restrict-uplinks-leaf1_Ethernet2 + shutdown: false + mtu: 9214 + switchport: + enabled: false + ptp: + announce: + interval: 0 + timeout: 3 + delay_req: -3 + sync_message: + interval: -3 + transport: ipv4 + enable: true + ip_address: 10.254.2.14/31 - name: Ethernet6 peer: ptp-tests-spine1 peer_interface: Ethernet6 @@ -199,5 +207,27 @@ ethernet_interfaces: interval: -3 transport: ipv4 enable: true +loopback_interfaces: +- name: Loopback0 + description: ROUTER_ID + shutdown: false + ip_address: 10.255.0.2/32 +prefix_lists: +- name: PL-LOOPBACKS-EVPN-OVERLAY + sequence_numbers: + - sequence: 10 + action: permit 10.255.0.0/27 eq 32 +route_maps: +- name: RM-CONN-2-BGP + sequence_numbers: + - sequence: 10 + type: permit + match: + - ip address prefix-list PL-LOOPBACKS-EVPN-OVERLAY +router_bfd: + multihop: + interval: 300 + min_rx: 300 + multiplier: 3 metadata: platform: vEOS-LAB diff --git a/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/intended/structured_configs/ptp-tests-spine3.yml b/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/intended/structured_configs/ptp-tests-spine3.yml index 170f9358155..8b4075ab28f 100644 --- a/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/intended/structured_configs/ptp-tests-spine3.yml +++ b/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/intended/structured_configs/ptp-tests-spine3.yml @@ -34,6 +34,17 @@ router_bgp: activate: true - name: EVPN-OVERLAY-PEERS activate: false + neighbors: + - ip_address: 10.254.2.17 + peer_group: IPv4-UNDERLAY-PEERS + remote_as: '65103' + peer: ptp-tests-restrict-uplinks-leaf1 + description: ptp-tests-restrict-uplinks-leaf1_Ethernet3 + - ip_address: 10.254.1.3 + peer_group: EVPN-OVERLAY-PEERS + peer: ptp-tests-restrict-uplinks-leaf1 + description: ptp-tests-restrict-uplinks-leaf1_Loopback0 + remote_as: '65103' address_family_evpn: peer_groups: - name: EVPN-OVERLAY-PEERS @@ -90,6 +101,17 @@ ptp: delay_resp: 3 follow_up: 3 sync: 3 +ethernet_interfaces: +- name: Ethernet10 + peer: ptp-tests-restrict-uplinks-leaf1 + peer_interface: Ethernet3 + peer_type: l3leaf + description: P2P_ptp-tests-restrict-uplinks-leaf1_Ethernet3 + shutdown: false + mtu: 9214 + switchport: + enabled: false + ip_address: 10.254.2.16/31 loopback_interfaces: - name: Loopback0 description: ROUTER_ID diff --git a/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/inventory/group_vars/PTP_TESTS_LEAFS.yml b/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/inventory/group_vars/PTP_TESTS_LEAFS.yml index 641431d7c66..bdff4b6f387 100644 --- a/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/inventory/group_vars/PTP_TESTS_LEAFS.yml +++ b/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/inventory/group_vars/PTP_TESTS_LEAFS.yml @@ -66,3 +66,21 @@ l3leaf: sync: 14 priority1: 40 priority2: 1 + + - name: ptp-tests-restrict-uplinks-leaf1 + id: 3 + bgp_as: 65103 + mgmt_ip: 192.168.0.103/24 + uplink_interfaces: ['Ethernet1', 'Ethernet2', 'Ethernet3'] + uplink_switches: ['ptp-tests-spine1', 'ptp-tests-spine2', 'ptp-tests-spine3'] + uplink_switch_interfaces: + - Ethernet10 + - Ethernet10 + - Ethernet10 + ptp: + mode: boundary + mode_one_step: true + clock_identity: "11:11:11:11:11:11" + uplinks: + - Ethernet1 + - Ethernet2 diff --git a/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/inventory/hosts.yml b/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/inventory/hosts.yml index ff75d0ed0f6..9709a98245d 100644 --- a/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/inventory/hosts.yml +++ b/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/inventory/hosts.yml @@ -257,6 +257,7 @@ all: hosts: ptp-tests-leaf1: ptp-tests-leaf2: + ptp-tests-restrict-uplinks-leaf1: PTP_TESTS_L2LEAFS: hosts: ptp-tests-l2leaf1-ptp-disabled: diff --git a/ansible_collections/arista/avd/roles/eos_designs/docs/tables/node-type-ptp-configuration.md b/ansible_collections/arista/avd/roles/eos_designs/docs/tables/node-type-ptp-configuration.md index a49156bf73b..8f301033a44 100644 --- a/ansible_collections/arista/avd/roles/eos_designs/docs/tables/node-type-ptp-configuration.md +++ b/ansible_collections/arista/avd/roles/eos_designs/docs/tables/node-type-ptp-configuration.md @@ -12,6 +12,8 @@ | [    ptp](## ".defaults.ptp") | Dictionary | | | | | | [      enabled](## ".defaults.ptp.enabled") | Boolean | | `False` | | | | [      profile](## ".defaults.ptp.profile") | String | | `aes67-r16-2016` | | Default available profiles are:
- "aes67"
- "aes67-r16-2016"
- "smpte2059-2" | + | [      uplinks](## ".defaults.ptp.uplinks") | List, items: String | | | | | + | [        - <str>](## ".defaults.ptp.uplinks.[]") | String | | | | Limit PTP to the specified uplink interfaces. | | [      mlag](## ".defaults.ptp.mlag") | Boolean | | `False` | | Configure PTP on the MLAG peer-link port-channel when PTP is enabled. By default PTP will not be configured on the MLAG peer-link port-channel. | | [      domain](## ".defaults.ptp.domain") | Integer | | `127` | Min: 0
Max: 255 | | | [      priority1](## ".defaults.ptp.priority1") | Integer | | | Min: 0
Max: 255 | default -> automatically set based on node_type.
| @@ -53,6 +55,8 @@ | [          ptp](## ".node_groups.[].nodes.[].ptp") | Dictionary | | | | | | [            enabled](## ".node_groups.[].nodes.[].ptp.enabled") | Boolean | | `False` | | | | [            profile](## ".node_groups.[].nodes.[].ptp.profile") | String | | `aes67-r16-2016` | | Default available profiles are:
- "aes67"
- "aes67-r16-2016"
- "smpte2059-2" | + | [            uplinks](## ".node_groups.[].nodes.[].ptp.uplinks") | List, items: String | | | | | + | [              - <str>](## ".node_groups.[].nodes.[].ptp.uplinks.[]") | String | | | | Limit PTP to the specified uplink interfaces. | | [            mlag](## ".node_groups.[].nodes.[].ptp.mlag") | Boolean | | `False` | | Configure PTP on the MLAG peer-link port-channel when PTP is enabled. By default PTP will not be configured on the MLAG peer-link port-channel. | | [            domain](## ".node_groups.[].nodes.[].ptp.domain") | Integer | | `127` | Min: 0
Max: 255 | | | [            priority1](## ".node_groups.[].nodes.[].ptp.priority1") | Integer | | | Min: 0
Max: 255 | default -> automatically set based on node_type.
| @@ -90,6 +94,8 @@ | [      ptp](## ".node_groups.[].ptp") | Dictionary | | | | | | [        enabled](## ".node_groups.[].ptp.enabled") | Boolean | | `False` | | | | [        profile](## ".node_groups.[].ptp.profile") | String | | `aes67-r16-2016` | | Default available profiles are:
- "aes67"
- "aes67-r16-2016"
- "smpte2059-2" | + | [        uplinks](## ".node_groups.[].ptp.uplinks") | List, items: String | | | | | + | [          - <str>](## ".node_groups.[].ptp.uplinks.[]") | String | | | | Limit PTP to the specified uplink interfaces. | | [        mlag](## ".node_groups.[].ptp.mlag") | Boolean | | `False` | | Configure PTP on the MLAG peer-link port-channel when PTP is enabled. By default PTP will not be configured on the MLAG peer-link port-channel. | | [        domain](## ".node_groups.[].ptp.domain") | Integer | | `127` | Min: 0
Max: 255 | | | [        priority1](## ".node_groups.[].ptp.priority1") | Integer | | | Min: 0
Max: 255 | default -> automatically set based on node_type.
| @@ -129,6 +135,8 @@ | [      ptp](## ".nodes.[].ptp") | Dictionary | | | | | | [        enabled](## ".nodes.[].ptp.enabled") | Boolean | | `False` | | | | [        profile](## ".nodes.[].ptp.profile") | String | | `aes67-r16-2016` | | Default available profiles are:
- "aes67"
- "aes67-r16-2016"
- "smpte2059-2" | + | [        uplinks](## ".nodes.[].ptp.uplinks") | List, items: String | | | | | + | [          - <str>](## ".nodes.[].ptp.uplinks.[]") | String | | | | Limit PTP to the specified uplink interfaces. | | [        mlag](## ".nodes.[].ptp.mlag") | Boolean | | `False` | | Configure PTP on the MLAG peer-link port-channel when PTP is enabled. By default PTP will not be configured on the MLAG peer-link port-channel. | | [        domain](## ".nodes.[].ptp.domain") | Integer | | `127` | Min: 0
Max: 255 | | | [        priority1](## ".nodes.[].ptp.priority1") | Integer | | | Min: 0
Max: 255 | default -> automatically set based on node_type.
| @@ -179,6 +187,10 @@ # - "aes67-r16-2016" # - "smpte2059-2" profile: + uplinks: + + # Limit PTP to the specified uplink interfaces. + - # Configure PTP on the MLAG peer-link port-channel when PTP is enabled. By default PTP will not be configured on the MLAG peer-link port-channel. mlag: @@ -254,6 +266,10 @@ # - "aes67-r16-2016" # - "smpte2059-2" profile: + uplinks: + + # Limit PTP to the specified uplink interfaces. + - # Configure PTP on the MLAG peer-link port-channel when PTP is enabled. By default PTP will not be configured on the MLAG peer-link port-channel. mlag: @@ -316,6 +332,10 @@ # - "aes67-r16-2016" # - "smpte2059-2" profile: + uplinks: + + # Limit PTP to the specified uplink interfaces. + - # Configure PTP on the MLAG peer-link port-channel when PTP is enabled. By default PTP will not be configured on the MLAG peer-link port-channel. mlag: @@ -384,6 +404,10 @@ # - "aes67-r16-2016" # - "smpte2059-2" profile: + uplinks: + + # Limit PTP to the specified uplink interfaces. + - # Configure PTP on the MLAG peer-link port-channel when PTP is enabled. By default PTP will not be configured on the MLAG peer-link port-channel. mlag: diff --git a/python-avd/pyavd/_eos_designs/eos_designs_facts/uplinks.py b/python-avd/pyavd/_eos_designs/eos_designs_facts/uplinks.py index 410f0f5fe63..c45241d9c13 100644 --- a/python-avd/pyavd/_eos_designs/eos_designs_facts/uplinks.py +++ b/python-avd/pyavd/_eos_designs/eos_designs_facts/uplinks.py @@ -188,7 +188,9 @@ def _get_p2p_uplink(self: EosDesignsFacts, uplink_index: int, uplink_interface: if self.shared_utils.uplink_ptp is not None: uplink["ptp"] = self.shared_utils.uplink_ptp - elif self.shared_utils.ptp_enabled: + elif self.shared_utils.ptp_enabled and ( + (self.shared_utils.ptp_uplinks and uplink["interface"] in self.shared_utils.ptp_uplinks) or (self.shared_utils.ptp_uplinks == []) + ): uplink["ptp"] = {"enable": True} if self.shared_utils.uplink_macsec is not None: @@ -264,7 +266,10 @@ def _get_l2_uplink( if self.shared_utils.uplink_ptp is not None: uplink["ptp"] = self.shared_utils.uplink_ptp - elif self.shared_utils.ptp_enabled: + + elif self.shared_utils.ptp_enabled and ( + (self.shared_utils.ptp_uplinks and uplink["interface"] in self.shared_utils.ptp_uplinks) or (self.shared_utils.ptp_uplinks == []) + ): uplink["ptp"] = {"enable": True} # Remove vlans if upstream switch does not have them #} diff --git a/python-avd/pyavd/_eos_designs/schema/eos_designs.schema.yml b/python-avd/pyavd/_eos_designs/schema/eos_designs.schema.yml index 289f3d0c1f3..e4d390b8c98 100644 --- a/python-avd/pyavd/_eos_designs/schema/eos_designs.schema.yml +++ b/python-avd/pyavd/_eos_designs/schema/eos_designs.schema.yml @@ -8793,6 +8793,11 @@ $defs: description: "Default available profiles are:\n - \"aes67\"\n - \"aes67-r16-2016\"\n - \"smpte2059-2\"" default: aes67-r16-2016 + uplinks: + type: list + items: + type: str + description: Limit PTP to the specified uplink interfaces. mlag: description: Configure PTP on the MLAG peer-link port-channel when PTP is enabled. By default PTP will not be configured on the MLAG diff --git a/python-avd/pyavd/_eos_designs/schema/schema_fragments/defs_node_type.schema.yml b/python-avd/pyavd/_eos_designs/schema/schema_fragments/defs_node_type.schema.yml index f4ecb733760..62f9f059371 100644 --- a/python-avd/pyavd/_eos_designs/schema/schema_fragments/defs_node_type.schema.yml +++ b/python-avd/pyavd/_eos_designs/schema/schema_fragments/defs_node_type.schema.yml @@ -1073,6 +1073,11 @@ $defs: - "aes67-r16-2016" - "smpte2059-2" default: "aes67-r16-2016" + uplinks: + type: list + items: + type: str + description: Limit PTP to the specified uplink interfaces. mlag: description: Configure PTP on the MLAG peer-link port-channel when PTP is enabled. By default PTP will not be configured on the MLAG peer-link port-channel. type: bool diff --git a/python-avd/pyavd/_eos_designs/shared_utils/ptp.py b/python-avd/pyavd/_eos_designs/shared_utils/ptp.py index 77fde6da48b..8259df095d1 100644 --- a/python-avd/pyavd/_eos_designs/shared_utils/ptp.py +++ b/python-avd/pyavd/_eos_designs/shared_utils/ptp.py @@ -25,6 +25,10 @@ def ptp_enabled(self: SharedUtils) -> bool: default_ptp_enabled = get(self.hostvars, "ptp_settings.enabled") return get(self.switch_data_combined, "ptp.enabled", default=default_ptp_enabled) is True + @cached_property + def ptp_uplinks(self: SharedUtils) -> list: + return get(self.switch_data_combined, "ptp.uplinks", default=[]) + @cached_property def ptp_mlag(self: SharedUtils) -> bool: return get(self.switch_data_combined, "ptp.mlag") is True