all lists on lists.proxmox.com
 help / color / mirror / Atom feed
From: Alexandre Derumier <aderumier@odiso.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH pve-network 4/5] zones: evpn: add disable-arp-nd-suppression option
Date: Fri,  5 Nov 2021 09:06:44 +0100	[thread overview]
Message-ID: <20211105080645.3145996-5-aderumier@odiso.com> (raw)
In-Reply-To: <20211105080645.3145996-1-aderumier@odiso.com>

arp-nd-suppression can break ip mobility,
when an ip from a vm is moved to another vm, with different mac.
For example, with a keepalived vip, the garp is filtered.
---
 PVE/Network/SDN/Zones/EvpnPlugin.pm           | 10 ++++-
 .../expected_controller_config                | 31 ++++++++++++++
 .../expected_sdn_interfaces                   | 40 +++++++++++++++++++
 .../disable_arp_nd_suppression/interfaces     |  7 ++++
 .../disable_arp_nd_suppression/sdn_config     | 26 ++++++++++++
 5 files changed, 112 insertions(+), 2 deletions(-)
 create mode 100644 test/zones/evpn/disable_arp_nd_suppression/expected_controller_config
 create mode 100644 test/zones/evpn/disable_arp_nd_suppression/expected_sdn_interfaces
 create mode 100644 test/zones/evpn/disable_arp_nd_suppression/interfaces
 create mode 100644 test/zones/evpn/disable_arp_nd_suppression/sdn_config

diff --git a/PVE/Network/SDN/Zones/EvpnPlugin.pm b/PVE/Network/SDN/Zones/EvpnPlugin.pm
index 648f7c7..50ea619 100644
--- a/PVE/Network/SDN/Zones/EvpnPlugin.pm
+++ b/PVE/Network/SDN/Zones/EvpnPlugin.pm
@@ -44,6 +44,11 @@ sub properties {
 	    type => 'boolean',
 	    description => "Advertise evpn subnets if you have silent hosts",
 	    optional => 1
+	},
+	'disable-arp-nd-suppression' => {
+	    type => 'boolean',
+	    description => "Disable ipv4 arp && ipv6 neighbour discovery suppression",
+	    optional => 1
 	}
     };
 }
@@ -56,6 +61,7 @@ sub options {
 	exitnodes => { optional => 1 },
 	'exitnodes-local-routing' => { optional => 1 },
 	'advertise-subnets' => { optional => 1 },
+	'disable-arp-nd-suppression' => { optional => 1 },
 	mtu => { optional => 1 },
 	mac => { optional => 1 },
 	dns => { optional => 1 },
@@ -99,7 +105,7 @@ sub generate_sdn_config {
     push @iface_config, "vxlan-id $tag";
     push @iface_config, "vxlan-local-tunnelip $ifaceip" if $ifaceip;
     push @iface_config, "bridge-learning off";
-    push @iface_config, "bridge-arp-nd-suppress on";
+    push @iface_config, "bridge-arp-nd-suppress on" if !$plugin_config->{'disable-arp-nd-suppression'};
 
     push @iface_config, "mtu $mtu" if $mtu;
     push(@{$config->{$vxlan_iface}}, @iface_config) if !$config->{$vxlan_iface};
@@ -186,7 +192,7 @@ sub generate_sdn_config {
 	    push @iface_config, "vxlan-id $vrfvxlan";
 	    push @iface_config, "vxlan-local-tunnelip $ifaceip" if $ifaceip;
 	    push @iface_config, "bridge-learning off";
-	    push @iface_config, "bridge-arp-nd-suppress on";
+	    push @iface_config, "bridge-arp-nd-suppress on" if !$plugin_config->{'disable-arp-nd-suppression'};
 	    push @iface_config, "mtu $mtu" if $mtu;
 	    push(@{$config->{$iface_vrf_vxlan}}, @iface_config) if !$config->{$iface_vrf_vxlan};
 
diff --git a/test/zones/evpn/disable_arp_nd_suppression/expected_controller_config b/test/zones/evpn/disable_arp_nd_suppression/expected_controller_config
new file mode 100644
index 0000000..c0ca898
--- /dev/null
+++ b/test/zones/evpn/disable_arp_nd_suppression/expected_controller_config
@@ -0,0 +1,31 @@
+log syslog informational
+ip forwarding
+ipv6 forwarding
+frr defaults datacenter
+service integrated-vtysh-config
+hostname localhost
+!
+!
+vrf vrf_myzone
+ vni 1000
+exit-vrf
+!
+router bgp 65000
+ bgp router-id 192.168.0.1
+ no bgp default ipv4-unicast
+ coalesce-time 1000
+ neighbor VTEP peer-group
+ neighbor VTEP remote-as 65000
+ neighbor VTEP bfd
+ neighbor 192.168.0.2 peer-group VTEP
+ neighbor 192.168.0.3 peer-group VTEP
+ !
+ address-family l2vpn evpn
+  neighbor VTEP activate
+  advertise-all-vni
+ exit-address-family
+!
+router bgp 65000 vrf vrf_myzone
+!
+line vty
+!
\ No newline at end of file
diff --git a/test/zones/evpn/disable_arp_nd_suppression/expected_sdn_interfaces b/test/zones/evpn/disable_arp_nd_suppression/expected_sdn_interfaces
new file mode 100644
index 0000000..bbde906
--- /dev/null
+++ b/test/zones/evpn/disable_arp_nd_suppression/expected_sdn_interfaces
@@ -0,0 +1,40 @@
+#version:1
+
+auto myvnet
+iface myvnet
+	address 10.0.0.1/24
+	hwaddress A2:1D:CB:1A:C0:8B
+	bridge_ports vxlan_myvnet
+	bridge_stp off
+	bridge_fd 0
+	mtu 1450
+	ip-forward on
+	arp-accept on
+	vrf vrf_myzone
+
+auto vrf_myzone
+iface vrf_myzone
+	vrf-table auto
+	post-up ip route add vrf vrf_myzone unreachable default metric 4278198272
+
+auto vrfbr_myzone
+iface vrfbr_myzone
+	bridge-ports vrfvx_myzone
+	bridge_stp off
+	bridge_fd 0
+	mtu 1450
+	vrf vrf_myzone
+
+auto vrfvx_myzone
+iface vrfvx_myzone
+	vxlan-id 1000
+	vxlan-local-tunnelip 192.168.0.1
+	bridge-learning off
+	mtu 1450
+
+auto vxlan_myvnet
+iface vxlan_myvnet
+	vxlan-id 100
+	vxlan-local-tunnelip 192.168.0.1
+	bridge-learning off
+	mtu 1450
diff --git a/test/zones/evpn/disable_arp_nd_suppression/interfaces b/test/zones/evpn/disable_arp_nd_suppression/interfaces
new file mode 100644
index 0000000..66bb826
--- /dev/null
+++ b/test/zones/evpn/disable_arp_nd_suppression/interfaces
@@ -0,0 +1,7 @@
+auto vmbr0
+iface vmbr0 inet static
+	address 192.168.0.1/24
+	gateway 192.168.0.254
+        bridge-ports eth0
+        bridge-stp off
+        bridge-fd 0
diff --git a/test/zones/evpn/disable_arp_nd_suppression/sdn_config b/test/zones/evpn/disable_arp_nd_suppression/sdn_config
new file mode 100644
index 0000000..199596b
--- /dev/null
+++ b/test/zones/evpn/disable_arp_nd_suppression/sdn_config
@@ -0,0 +1,26 @@
+{
+  version => 1,
+  vnets   => {
+               ids => {
+                        myvnet => { tag => "100", type => "vnet", zone => "myzone" },
+                      },
+             },
+
+  zones   => {
+               ids => { myzone => { ipam => "pve", type => "evpn", controller => "evpnctl", 'vrf-vxlan' => 1000, 'mac' => 'A2:1D:CB:1A:C0:8B', 'disable-arp-nd-suppression' => 1 } },
+             },
+  controllers  => {
+               ids => { evpnctl => { type => "evpn", 'peers' => '192.168.0.1,192.168.0.2,192.168.0.3', asn => "65000" } },
+             },
+
+  subnets => {
+              ids => { 'myzone-10.0.0.0-24' => {
+							'type' => 'subnet',
+							'vnet' => 'myvnet',
+							'gateway' => '10.0.0.1',
+						  }
+		     }
+	     }
+}
+
+
-- 
2.30.2




  parent reply	other threads:[~2021-11-05  8:07 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-05  8:06 [pve-devel] [PATCH pve-network 0/5] sdn fixes and improvements Alexandre Derumier
2021-11-05  8:06 ` [pve-devel] [PATCH pve-network 1/5] vnet/subnet : add skipdns option Alexandre Derumier
2021-11-05  8:06 ` [pve-devel] [PATCH pve-network 2/5] get_local_vnets: add permissions on /sdn/vnets/* Alexandre Derumier
2021-11-05  8:06 ` [pve-devel] [PATCH pve-network 3/5] api2: zones: fix update Alexandre Derumier
2021-11-05  8:06 ` Alexandre Derumier [this message]
2021-11-05  8:06 ` [pve-devel] [PATCH pve-network 5/5] vnets: alias: fix regex Alexandre Derumier
2021-11-09 18:01 ` [pve-devel] applied-series: [PATCH pve-network 0/5] sdn fixes and improvements Thomas Lamprecht

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=20211105080645.3145996-5-aderumier@odiso.com \
    --to=aderumier@odiso.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal