diff --git a/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/intended/configs/cv-pathfinder-pathfinder.cfg b/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/intended/configs/cv-pathfinder-pathfinder.cfg index 7b7f9d6354f..d46be584a46 100644 --- a/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/intended/configs/cv-pathfinder-pathfinder.cfg +++ b/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/intended/configs/cv-pathfinder-pathfinder.cfg @@ -25,8 +25,13 @@ router path-selection ! local interface Ethernet1 ! + path-group MPLS id 500 + ! + local interface Ethernet2 + ! load-balance policy LBPOLICY path-group INET + path-group MPLS ! router adaptive-virtual-topology topology role pathfinder @@ -80,6 +85,11 @@ interface Ethernet1 no switchport ip address 10.7.7.7/31 ! +interface Ethernet2 + no shutdown + no switchport + ip address 172.16.0.1/31 +! interface Loopback0 description Router_ID no shutdown @@ -144,5 +154,6 @@ management api http-commands stun server local-interface Ethernet1 + local-interface Ethernet2 ! end diff --git a/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/intended/configs/cv-pathfinder-transit.cfg b/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/intended/configs/cv-pathfinder-transit.cfg index 681382b5873..a81f193ab1d 100644 --- a/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/intended/configs/cv-pathfinder-transit.cfg +++ b/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/intended/configs/cv-pathfinder-transit.cfg @@ -31,8 +31,20 @@ router path-selection name cv-pathfinder-pathfinder ipv4 address 10.7.7.7 ! + path-group MPLS id 500 + ! + local interface Ethernet2 + stun server-profile cv-pathfinder-pathfinder-MPLS-1 + ! + peer dynamic + ! + peer static router-ip 192.168.44.1 + name cv-pathfinder-pathfinder + ipv4 address 172.16.0.1 + ! load-balance policy LBPOLICY path-group INET + path-group MPLS ! router adaptive-virtual-topology topology role transit region @@ -92,6 +104,11 @@ interface Ethernet1 no switchport ip address dhcp ! +interface Ethernet2 + no shutdown + no switchport + ip address 172.16.6.6/31 +! interface Loopback0 description Router_ID no shutdown @@ -153,5 +170,7 @@ stun client server-profile cv-pathfinder-pathfinder-INET-0 ip address 10.7.7.7/31 + server-profile cv-pathfinder-pathfinder-MPLS-0 + ip address 172.16.0.1/31 ! end diff --git a/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/intended/structured_configs/cv-pathfinder-pathfinder.yml b/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/intended/structured_configs/cv-pathfinder-pathfinder.yml index db4df06f371..0c3e684e56e 100644 --- a/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/intended/structured_configs/cv-pathfinder-pathfinder.yml +++ b/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/intended/structured_configs/cv-pathfinder-pathfinder.yml @@ -146,21 +146,32 @@ router_path_selection: local_interfaces: - name: Ethernet1 ipsec_profile: CP-PROFILE + - name: MPLS + id: 500 + local_interfaces: + - name: Ethernet2 load_balance_policies: - name: LBPOLICY path_groups: - name: INET + - name: MPLS peer_dynamic_source: stun stun: server: local_interfaces: - Ethernet1 + - Ethernet2 ethernet_interfaces: - name: Ethernet1 peer_type: l3_interface ip_address: 10.7.7.7/31 shutdown: false type: routed +- name: Ethernet2 + peer_type: l3_interface + ip_address: 172.16.0.1/31 + shutdown: false + type: routed dps_interfaces: - name: Dps1 description: DPS Interface diff --git a/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/intended/structured_configs/cv-pathfinder-transit.yml b/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/intended/structured_configs/cv-pathfinder-transit.yml index 819cab5619d..8c0ed174b0e 100644 --- a/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/intended/structured_configs/cv-pathfinder-transit.yml +++ b/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/intended/structured_configs/cv-pathfinder-transit.yml @@ -158,21 +158,43 @@ router_path_selection: ipv4_addresses: - 10.7.7.7 ipsec_profile: CP-PROFILE + - name: MPLS + id: 500 + local_interfaces: + - name: Ethernet2 + stun: + server_profiles: + - cv-pathfinder-pathfinder-MPLS-1 + dynamic_peers: + enabled: true + static_peers: + - router_ip: 192.168.44.1 + name: cv-pathfinder-pathfinder + ipv4_addresses: + - 172.16.0.1 load_balance_policies: - name: LBPOLICY path_groups: - name: INET + - name: MPLS stun: client: server_profiles: - name: cv-pathfinder-pathfinder-INET-0 ip_address: 10.7.7.7/31 + - name: cv-pathfinder-pathfinder-MPLS-0 + ip_address: 172.16.0.1/31 ethernet_interfaces: - name: Ethernet1 peer_type: l3_interface ip_address: dhcp shutdown: false type: routed +- name: Ethernet2 + peer_type: l3_interface + ip_address: 172.16.6.6/31 + shutdown: false + type: routed dps_interfaces: - name: Dps1 description: DPS Interface diff --git a/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/inventory/group_vars/CV_PATHFINDER_TESTS.yml b/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/inventory/group_vars/CV_PATHFINDER_TESTS.yml index 8daca888f1a..abdda27dcf8 100644 --- a/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/inventory/group_vars/CV_PATHFINDER_TESTS.yml +++ b/ansible_collections/arista/avd/molecule/eos_designs_unit_tests/inventory/group_vars/CV_PATHFINDER_TESTS.yml @@ -95,12 +95,24 @@ l3_edge: wan_carrier: Comcast wan_circuit_id: 667 ip: dhcp + - node: cv-pathfinder-transit + interface: Ethernet2 + wan_path_group: MPLS + wan_carrier: Colt + wan_circuit_id: 10666 + ip: 172.16.6.6/31 - node: cv-pathfinder-pathfinder interface: Ethernet1 wan_path_group: INET wan_carrier: Bouygues Telecom wan_circuit_id: 777 ip: 10.7.7.7/31 + - node: cv-pathfinder-pathfinder + interface: Ethernet2 + wan_path_group: MPLS + wan_carrier: Colt + wan_circuit_id: 10000 + ip: 172.16.0.1/31 - node: cv-pathfinder-pathfinder1 interface: Ethernet1 wan_path_group: INET diff --git a/ansible_collections/arista/avd/roles/eos_designs/python_modules/overlay/router_path_selection.py b/ansible_collections/arista/avd/roles/eos_designs/python_modules/overlay/router_path_selection.py index 3c21532c01d..83bf133d64b 100644 --- a/ansible_collections/arista/avd/roles/eos_designs/python_modules/overlay/router_path_selection.py +++ b/ansible_collections/arista/avd/roles/eos_designs/python_modules/overlay/router_path_selection.py @@ -130,6 +130,7 @@ def _get_local_interfaces(self, path_group_name: str) -> list | None: self._stun_server_profile_name(wrr, path_group_name, index) for wrr, data in self._wan_route_servers.items() for index, path_group in enumerate(get(data, "wan_path_groups", required=True)) + if path_group.get("name") == path_group_name ] if stun_server_profiles: local_interface["stun"] = {"server_profiles": stun_server_profiles}