public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Hannes Laimer <h.laimer@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [PATCH pve-network v2 5/7] test: evpn: add integration test for EVPN over BGP fabric
Date: Wed, 15 Apr 2026 13:11:32 +0200	[thread overview]
Message-ID: <20260415111134.124720-6-h.laimer@proxmox.com> (raw)
In-Reply-To: <20260415111134.124720-1-h.laimer@proxmox.com>

Signed-off-by: Hannes Laimer <h.laimer@proxmox.com>
---
 .../bgp_fabric/expected_controller_config     | 65 ++++++++++++++
 .../evpn/bgp_fabric/expected_sdn_interfaces   | 56 ++++++++++++
 src/test/zones/evpn/bgp_fabric/interfaces     |  6 ++
 src/test/zones/evpn/bgp_fabric/sdn_config     | 85 +++++++++++++++++++
 4 files changed, 212 insertions(+)
 create mode 100644 src/test/zones/evpn/bgp_fabric/expected_controller_config
 create mode 100644 src/test/zones/evpn/bgp_fabric/expected_sdn_interfaces
 create mode 100644 src/test/zones/evpn/bgp_fabric/interfaces
 create mode 100644 src/test/zones/evpn/bgp_fabric/sdn_config

diff --git a/src/test/zones/evpn/bgp_fabric/expected_controller_config b/src/test/zones/evpn/bgp_fabric/expected_controller_config
new file mode 100644
index 00000000..440155e7
--- /dev/null
+++ b/src/test/zones/evpn/bgp_fabric/expected_controller_config
@@ -0,0 +1,65 @@
+frr version 10.4.1
+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 10.10.10.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 VTEP update-source dummy_test
+ neighbor 10.10.10.2 peer-group VTEP
+ neighbor 10.10.10.3 peer-group VTEP
+ neighbor test peer-group
+ neighbor test remote-as external
+ neighbor test local-as 65100 no-prepend replace-as
+ neighbor ens18 interface peer-group test
+ neighbor ens19 interface peer-group test
+ !
+ address-family ipv4 unicast
+  network 10.10.10.1/32
+  neighbor test activate
+  neighbor test soft-reconfiguration inbound
+ exit-address-family
+ !
+ 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 10.10.10.1
+ no bgp hard-administrative-reset
+ no bgp graceful-restart notification
+exit
+!
+access-list pve_bgp_test_ips permit 10.10.10.0/24
+!
+route-map MAP_VTEP_IN permit 1
+exit
+!
+route-map MAP_VTEP_OUT permit 1
+exit
+!
+route-map pve_bgp permit 100
+ match ip address pve_bgp_test_ips
+ set src 10.10.10.1
+exit
+!
+ip protocol bgp route-map pve_bgp
+!
+line vty
+!
diff --git a/src/test/zones/evpn/bgp_fabric/expected_sdn_interfaces b/src/test/zones/evpn/bgp_fabric/expected_sdn_interfaces
new file mode 100644
index 00000000..fd1429d8
--- /dev/null
+++ b/src/test/zones/evpn/bgp_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 10.10.10.1
+	bridge-learning off
+	bridge-arp-nd-suppress on
+	mtu 1450
+
+auto vxlan_vnet0
+iface vxlan_vnet0
+	vxlan-id 123456
+	vxlan-local-tunnelip 10.10.10.1
+	bridge-learning off
+	bridge-arp-nd-suppress on
+	mtu 1450
+
+auto dummy_test
+iface dummy_test inet static
+	address 10.10.10.1/32
+	link-type dummy
+	ip-forward 1
+
+auto ens18
+iface ens18 inet manual
+	ip-forward 1
+
+auto ens19
+iface ens19 inet manual
+	ip-forward 1
diff --git a/src/test/zones/evpn/bgp_fabric/interfaces b/src/test/zones/evpn/bgp_fabric/interfaces
new file mode 100644
index 00000000..08874137
--- /dev/null
+++ b/src/test/zones/evpn/bgp_fabric/interfaces
@@ -0,0 +1,6 @@
+auto vmbr0
+iface vmbr0 inet static
+	address 10.10.10.1/32
+    bridge-ports eth0
+    bridge-stp off
+    bridge-fd 0
diff --git a/src/test/zones/evpn/bgp_fabric/sdn_config b/src/test/zones/evpn/bgp_fabric/sdn_config
new file mode 100644
index 00000000..080f1e98
--- /dev/null
+++ b/src/test/zones/evpn/bgp_fabric/sdn_config
@@ -0,0 +1,85 @@
+{
+          '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' => {
+                                                    'fabric' => 'test',
+                                                    'asn' => 65000,
+                                                    'type' => 'evpn'
+                                                  }
+                                      }
+                           },
+           'fabrics' => {
+                 'ids' => {
+                               'test' => {
+                                           'type' => 'bgp_fabric',
+                                           'id' => 'test',
+                                           'bfd' => 0,
+                                           'ip_prefix' => '10.10.10.0/24',
+                                         },
+                               'test_localhost' => {
+                                                   'asn' => 65100,
+                                                   'interfaces' => [
+                                                                    'name=ens18',
+                                                                    'name=ens19'
+                                                                  ],
+                                                   'id' => 'test_localhost',
+                                                   'type' => 'bgp_node',
+                                                   'ip' => '10.10.10.1',
+                                                   'role' => 'internal',
+                                                 },
+                               'test_pathfinder' => {
+                                                      'asn' => 65101,
+                                                      'id' => 'test_pathfinder',
+                                                      'interfaces' => [
+                                                                       'name=ens18',
+                                                                       'name=ens19'
+                                                                     ],
+                                                      'ip' => '10.10.10.2',
+                                                      'type' => 'bgp_node',
+                                                      'role' => 'internal',
+                                                    },
+                               'test_raider' => {
+                                                  'asn' => 65102,
+                                                  'ip' => '10.10.10.3',
+                                                  'type' => 'bgp_node',
+                                                  'interfaces' => [
+                                                                   'name=ens18',
+                                                                   'name=ens19'
+                                                                 ],
+                                                  'id' => 'test_raider',
+                                                  'role' => 'internal',
+                                                }
+                                     }
+              }
+        };
+
-- 
2.47.3





  parent reply	other threads:[~2026-04-15 11:12 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-15 11:11 [PATCH docs/manager/network/proxmox{-ve-rs,-perl-rs} v2 0/7] sdn: add " Hannes Laimer
2026-04-15 11:11 ` [PATCH proxmox-ve-rs v2 1/7] sdn: fabric: add BGP protocol support Hannes Laimer
2026-04-15 11:11 ` [PATCH proxmox-perl-rs v2 2/7] sdn: fabrics: add BGP config generation Hannes Laimer
2026-04-15 11:11 ` [PATCH proxmox-perl-rs v2 3/7] sdn: fabrics: add BGP status endpoints Hannes Laimer
2026-04-15 11:11 ` [PATCH pve-network v2 4/7] sdn: fabrics: register bgp as a fabric protocol type Hannes Laimer
2026-04-15 11:11 ` Hannes Laimer [this message]
2026-04-15 11:11 ` [PATCH pve-manager v2 6/7] ui: sdn: add BGP fabric support Hannes Laimer
2026-04-15 11:11 ` [PATCH pve-docs v2 7/7] sdn: add bgp fabric section Hannes Laimer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260415111134.124720-6-h.laimer@proxmox.com \
    --to=h.laimer@proxmox.com \
    --cc=pve-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal