From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: <pve-devel-bounces@lists.proxmox.com> Received: from firstgate.proxmox.com (firstgate.proxmox.com [IPv6:2a01:7e0:0:424::9]) by lore.proxmox.com (Postfix) with ESMTPS id 6C9161FF164 for <inbox@lore.proxmox.com>; Fri, 28 Mar 2025 18:18:44 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 06ECE990B; Fri, 28 Mar 2025 18:14:45 +0100 (CET) From: Gabriel Goller <g.goller@proxmox.com> To: pve-devel@lists.proxmox.com Date: Fri, 28 Mar 2025 18:13:30 +0100 Message-Id: <20250328171340.885413-43-g.goller@proxmox.com> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250328171340.885413-1-g.goller@proxmox.com> References: <20250328171340.885413-1-g.goller@proxmox.com> MIME-Version: 1.0 X-SPAM-LEVEL: Spam detection results: 0 AWL -0.025 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Subject: [pve-devel] [PATCH pve-network 15/17] test: fabrics: add test cases for ospf and openfabric + evpn X-BeenThere: pve-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox VE development discussion <pve-devel.lists.proxmox.com> List-Unsubscribe: <https://lists.proxmox.com/cgi-bin/mailman/options/pve-devel>, <mailto:pve-devel-request@lists.proxmox.com?subject=unsubscribe> List-Archive: <http://lists.proxmox.com/pipermail/pve-devel/> List-Post: <mailto:pve-devel@lists.proxmox.com> List-Help: <mailto:pve-devel-request@lists.proxmox.com?subject=help> List-Subscribe: <https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel>, <mailto:pve-devel-request@lists.proxmox.com?subject=subscribe> Reply-To: Proxmox VE development discussion <pve-devel@lists.proxmox.com> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: pve-devel-bounces@lists.proxmox.com Sender: "pve-devel" <pve-devel-bounces@lists.proxmox.com> From: Stefan Hanreich <s.hanreich@proxmox.com> Add two additional test cases for EVPN zones, which use fabrics as the underlay network - one for OSPF, one for OpenFabric. They cover a full-mesh fabric setup as well as a simple point-to-point setup to a route reflector as the underlay fabric. Signed-off-by: Stefan Hanreich <s.hanreich@proxmox.com> Signed-off-by: Gabriel Goller <g.goller@proxmox.com> --- .../expected_controller_config | 72 +++++++++++++++++ .../openfabric_fabric/expected_sdn_interfaces | 56 +++++++++++++ .../zones/evpn/openfabric_fabric/interfaces | 6 ++ .../zones/evpn/openfabric_fabric/sdn_config | 79 +++++++++++++++++++ .../ospf_fabric/expected_controller_config | 66 ++++++++++++++++ .../evpn/ospf_fabric/expected_sdn_interfaces | 53 +++++++++++++ src/test/zones/evpn/ospf_fabric/interfaces | 6 ++ src/test/zones/evpn/ospf_fabric/sdn_config | 75 ++++++++++++++++++ 8 files changed, 413 insertions(+) create mode 100644 src/test/zones/evpn/openfabric_fabric/expected_controller_config create mode 100644 src/test/zones/evpn/openfabric_fabric/expected_sdn_interfaces create mode 100644 src/test/zones/evpn/openfabric_fabric/interfaces create mode 100644 src/test/zones/evpn/openfabric_fabric/sdn_config create mode 100644 src/test/zones/evpn/ospf_fabric/expected_controller_config create mode 100644 src/test/zones/evpn/ospf_fabric/expected_sdn_interfaces create mode 100644 src/test/zones/evpn/ospf_fabric/interfaces create mode 100644 src/test/zones/evpn/ospf_fabric/sdn_config diff --git a/src/test/zones/evpn/openfabric_fabric/expected_controller_config b/src/test/zones/evpn/openfabric_fabric/expected_controller_config new file mode 100644 index 000000000000..264a7c422c11 --- /dev/null +++ b/src/test/zones/evpn/openfabric_fabric/expected_controller_config @@ -0,0 +1,72 @@ +frr version 8.5.2 +frr defaults datacenter +hostname localhost +log syslog informational +service integrated-vtysh-config +! +! +vrf vrf_evpn + vni 100 +exit-vrf +! +router bgp 65000 + bgp router-id 172.20.3.1 + no bgp hard-administrative-reset + no bgp default ipv4-unicast + coalesce-time 1000 + no bgp graceful-restart notification + neighbor VTEP peer-group + neighbor VTEP remote-as 65000 + neighbor VTEP bfd + neighbor 172.20.3.2 peer-group VTEP + neighbor 172.20.3.3 peer-group VTEP + ! + address-family l2vpn evpn + neighbor VTEP activate + neighbor VTEP route-map MAP_VTEP_IN in + neighbor VTEP route-map MAP_VTEP_OUT out + advertise-all-vni + exit-address-family +exit +! +router bgp 65000 vrf vrf_evpn + bgp router-id 172.20.3.1 + no bgp hard-administrative-reset + no bgp graceful-restart notification +exit +! +route-map MAP_VTEP_IN permit 1 +exit +! +route-map MAP_VTEP_OUT permit 1 +exit +router openfabric test + net 49.0001.1720.2000.3001.00 +exit +! +interface dummy_test + ip router openfabric test + openfabric passive +exit +! +interface ens20 + ip router openfabric test + openfabric hello-interval 1 +exit +! +interface ens21 + ip router openfabric test + openfabric hello-interval 1 +exit +! +access-list openfabric_test_ips permit 172.20.3.0/24 +! +route-map openfabric permit 100 + match ip address openfabric_test_ips + set src 172.20.3.1 +exit +! +ip protocol openfabric route-map openfabric +! +line vty +! \ No newline at end of file diff --git a/src/test/zones/evpn/openfabric_fabric/expected_sdn_interfaces b/src/test/zones/evpn/openfabric_fabric/expected_sdn_interfaces new file mode 100644 index 000000000000..e76e0b9e00d5 --- /dev/null +++ b/src/test/zones/evpn/openfabric_fabric/expected_sdn_interfaces @@ -0,0 +1,56 @@ +#version:1 + +auto vnet0 +iface vnet0 + address 10.123.123.1/24 + hwaddress BC:24:11:3B:39:34 + bridge_ports vxlan_vnet0 + bridge_stp off + bridge_fd 0 + mtu 1450 + ip-forward on + arp-accept on + vrf vrf_evpn + +auto vrf_evpn +iface vrf_evpn + vrf-table auto + post-up ip route add vrf vrf_evpn unreachable default metric 4278198272 + +auto vrfbr_evpn +iface vrfbr_evpn + bridge-ports vrfvx_evpn + bridge_stp off + bridge_fd 0 + mtu 1450 + vrf vrf_evpn + +auto vrfvx_evpn +iface vrfvx_evpn + vxlan-id 100 + vxlan-local-tunnelip 172.20.3.1 + bridge-learning off + bridge-arp-nd-suppress on + mtu 1450 + +auto vxlan_vnet0 +iface vxlan_vnet0 + vxlan-id 123456 + vxlan-local-tunnelip 172.20.3.1 + bridge-learning off + bridge-arp-nd-suppress on + mtu 1450 + +auto dummy_test +iface dummy_test inet static + link-type dummy + ip-forward 1 + address 172.20.3.1/32 + +auto ens20 +iface ens20 inet manual + ip-forward 1 + +auto ens21 +iface ens21 inet manual + ip-forward 1 diff --git a/src/test/zones/evpn/openfabric_fabric/interfaces b/src/test/zones/evpn/openfabric_fabric/interfaces new file mode 100644 index 000000000000..1b4384bdd8a3 --- /dev/null +++ b/src/test/zones/evpn/openfabric_fabric/interfaces @@ -0,0 +1,6 @@ +auto vmbr0 +iface vmbr0 inet static + address 172.20.3.1/32 + bridge-ports eth0 + bridge-stp off + bridge-fd 0 diff --git a/src/test/zones/evpn/openfabric_fabric/sdn_config b/src/test/zones/evpn/openfabric_fabric/sdn_config new file mode 100644 index 000000000000..2c32598b6308 --- /dev/null +++ b/src/test/zones/evpn/openfabric_fabric/sdn_config @@ -0,0 +1,79 @@ +{ + 'zones' => { + 'ids' => { + 'evpn' => { + 'type' => 'evpn', + 'ipam' => 'pve', + 'mac' => 'BC:24:11:3B:39:34', + 'controller' => 'ctrl', + 'vrf-vxlan' => 100 + } + } + }, + 'vnets' => { + 'ids' => { + 'vnet0' => { + 'zone' => 'evpn', + 'type' => 'vnet', + 'tag' => 123456 + } + } + }, + 'version' => 1, + 'subnets' => { + 'ids' => { + 'evpn-10.123.123.0-24' => { + 'vnet' => 'vnet0', + 'type' => 'subnet', + 'gateway' => '10.123.123.1' + } + } + }, + 'controllers' => { + 'ids' => { + 'ctrl' => { + 'peers' => '172.20.3.1,172.20.3.2,172.20.3.3', + 'asn' => 65000, + 'type' => 'evpn' + } + } + }, + 'openfabric' => { + 'ids' => { + 'test' => { + 'ty' => 'fabric', + 'fabric_id' => 'test', + 'hello_interval' => 1, + 'loopback_prefix' => '172.20.3.0/24' + }, + 'test_localhost' => { + 'interface' => [ + 'name=ens20', + 'name=ens21' + ], + 'node_id' => 'test_localhost', + 'ty' => 'node', + 'router_id' => '172.20.3.1' + }, + 'test_pathfinder' => { + 'node_id' => 'test_pathfinder', + 'interface' => [ + 'name=ens20', + 'name=ens21' + ], + 'router_id' => '172.20.3.2', + 'ty' => 'node' + }, + 'test_raider' => { + 'router_id' => '172.20.3.3', + 'ty' => 'node', + 'interface' => [ + 'name=ens21', + 'name=ens20' + ], + 'node_id' => 'test_raider' + } + } + } + }; + diff --git a/src/test/zones/evpn/ospf_fabric/expected_controller_config b/src/test/zones/evpn/ospf_fabric/expected_controller_config new file mode 100644 index 000000000000..75fb1ffa1717 --- /dev/null +++ b/src/test/zones/evpn/ospf_fabric/expected_controller_config @@ -0,0 +1,66 @@ +frr version 8.5.2 +frr defaults datacenter +hostname localhost +log syslog informational +service integrated-vtysh-config +! +! +vrf vrf_evpn + vni 100 +exit-vrf +! +router bgp 65000 + bgp router-id 172.20.30.1 + no bgp hard-administrative-reset + no bgp default ipv4-unicast + coalesce-time 1000 + no bgp graceful-restart notification + neighbor VTEP peer-group + neighbor VTEP remote-as 65000 + neighbor VTEP bfd + neighbor 172.20.30.2 peer-group VTEP + neighbor 172.20.30.3 peer-group VTEP + ! + address-family l2vpn evpn + neighbor VTEP activate + neighbor VTEP route-map MAP_VTEP_IN in + neighbor VTEP route-map MAP_VTEP_OUT out + advertise-all-vni + exit-address-family +exit +! +router bgp 65000 vrf vrf_evpn + bgp router-id 172.20.30.1 + no bgp hard-administrative-reset + no bgp graceful-restart notification +exit +! +route-map MAP_VTEP_IN permit 1 +exit +! +route-map MAP_VTEP_OUT permit 1 +exit +router ospf + ospf router-id 172.20.30.1 +exit +! +interface dummy_0 + ip ospf area 0 + ip ospf passive +exit +! +interface ens19 + ip ospf area 0 +exit +! +access-list ospf_0_ips permit 172.20.30.0/24 +! +route-map ospf permit 10 + match ip address ospf_0_ips + set src 172.20.30.1 +exit +! +ip protocol ospf route-map ospf +! +line vty +! \ No newline at end of file diff --git a/src/test/zones/evpn/ospf_fabric/expected_sdn_interfaces b/src/test/zones/evpn/ospf_fabric/expected_sdn_interfaces new file mode 100644 index 000000000000..cadf046bc2bf --- /dev/null +++ b/src/test/zones/evpn/ospf_fabric/expected_sdn_interfaces @@ -0,0 +1,53 @@ +#version:1 + +auto vnet0 +iface vnet0 + address 10.123.123.1/24 + hwaddress BC:24:11:3B:39:34 + bridge_ports vxlan_vnet0 + bridge_stp off + bridge_fd 0 + mtu 1450 + ip-forward on + arp-accept on + vrf vrf_evpn + +auto vrf_evpn +iface vrf_evpn + vrf-table auto + post-up ip route add vrf vrf_evpn unreachable default metric 4278198272 + +auto vrfbr_evpn +iface vrfbr_evpn + bridge-ports vrfvx_evpn + bridge_stp off + bridge_fd 0 + mtu 1450 + vrf vrf_evpn + +auto vrfvx_evpn +iface vrfvx_evpn + vxlan-id 100 + vxlan-local-tunnelip 172.20.30.1 + bridge-learning off + bridge-arp-nd-suppress on + mtu 1450 + +auto vxlan_vnet0 +iface vxlan_vnet0 + vxlan-id 123456 + vxlan-local-tunnelip 172.20.30.1 + bridge-learning off + bridge-arp-nd-suppress on + mtu 1450 + +auto dummy_0 +iface dummy_0 inet static + link-type dummy + ip-forward 1 + address 172.20.30.1/32 + +auto ens19 +iface ens19 inet static + address 172.16.3.10/31 + ip-forward 1 diff --git a/src/test/zones/evpn/ospf_fabric/interfaces b/src/test/zones/evpn/ospf_fabric/interfaces new file mode 100644 index 000000000000..79ba9c11bd0a --- /dev/null +++ b/src/test/zones/evpn/ospf_fabric/interfaces @@ -0,0 +1,6 @@ +auto vmbr0 +iface vmbr0 inet static + address 172.20.30.1/32 + bridge-ports eth0 + bridge-stp off + bridge-fd 0 diff --git a/src/test/zones/evpn/ospf_fabric/sdn_config b/src/test/zones/evpn/ospf_fabric/sdn_config new file mode 100644 index 000000000000..938c088dd43c --- /dev/null +++ b/src/test/zones/evpn/ospf_fabric/sdn_config @@ -0,0 +1,75 @@ +{ + 'zones' => { + 'ids' => { + 'evpn' => { + 'type' => 'evpn', + 'ipam' => 'pve', + 'mac' => 'BC:24:11:3B:39:34', + 'controller' => 'ctrl', + 'vrf-vxlan' => 100 + } + } + }, + 'vnets' => { + 'ids' => { + 'vnet0' => { + 'zone' => 'evpn', + 'type' => 'vnet', + 'tag' => 123456 + } + } + }, + 'version' => 1, + 'subnets' => { + 'ids' => { + 'evpn-10.123.123.0-24' => { + 'vnet' => 'vnet0', + 'type' => 'subnet', + 'gateway' => '10.123.123.1' + } + } + }, + 'controllers' => { + 'ids' => { + 'ctrl' => { + 'peers' => '172.20.30.1,172.20.30.2,172.20.30.3', + 'asn' => 65000, + 'type' => 'evpn' + } + } + }, + 'ospf' => { + 'ids' => { + '0_pathfinder' => { + 'node_id' => '0_pathfinder', + 'interface' => [ + 'name=ens19,ip=172.16.3.20/31' + ], + 'router_id' => '172.20.30.2', + 'ty' => 'node' + }, + '0' => { + 'loopback_prefix' => '172.20.30.0/24', + 'area' => '0', + 'ty' => 'fabric' + }, + '0_localhost' => { + 'node_id' => '0_localhost', + 'interface' => [ + 'name=ens19,passive=false,ip=172.16.3.10/31' + ], + 'router_id' => '172.20.30.1', + 'ty' => 'node' + }, + '0_raider' => { + 'ty' => 'node', + 'router_id' => '172.20.30.3', + 'node_id' => '0_raider', + 'interface' => [ + 'name=ens19,ip=172.16.3.30/31' + ] + } + } + } + }; + -- 2.39.5 _______________________________________________ pve-devel mailing list pve-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel