From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.proxmox.com (Postfix) with ESMTPS id ECD5BBBA69 for ; Tue, 19 Dec 2023 09:32:24 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id B31A033B6D for ; Tue, 19 Dec 2023 09:32:24 +0100 (CET) Received: from bastionodiso.odiso.net (bastionodiso.odiso.net [185.151.191.93]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by firstgate.proxmox.com (Proxmox) with ESMTPS for ; Tue, 19 Dec 2023 09:32:23 +0100 (CET) Received: from kvmformation3.odiso.net (formationkvm3.odiso.net [10.3.94.12]) by bastionodiso.odiso.net (Postfix) with ESMTP id 17B6C80C1; Tue, 19 Dec 2023 09:32:17 +0100 (CET) Received: by kvmformation3.odiso.net (Postfix, from userid 0) id 0659ADE85E; Tue, 19 Dec 2023 09:32:17 +0100 (CET) From: Alexandre Derumier To: pve-devel@lists.proxmox.com Date: Tue, 19 Dec 2023 09:32:09 +0100 Message-Id: <20231219083216.2551645-1-aderumier@odiso.com> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SPAM-LEVEL: Spam detection results: 0 AWL 0.031 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 HEADER_FROM_DIFFERENT_DOMAINS 0.25 From and EnvelopeFrom 2nd level mail domains are different KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment KAM_LAZY_DOMAIN_SECURITY 1 Sending domain does not have any anti-forgery methods SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_NONE 0.001 SPF: sender does not publish an SPF Record T_SCC_BODY_TEXT_LINE -0.01 - URIBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [vlanplugin.pm, plugin.pm, zones.pm, thekelleys.org.uk, vxlanplugin.pm, evpnplugin.pm, simpleplugin.pm, dnsmasq.pm, dhcp.pm, qinqplugin.pm] Subject: [pve-devel] [PATCH pve-network 0/7] add dhcp support for all zones X-BeenThere: pve-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox VE development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Dec 2023 08:32:25 -0000 This patch serie add dhcp support for all zones types. also: - Exec dnsmasq in a specific vrf if needed (currently only evpn) - Enable-ra only on layer3 subnets TO FIX: - Dnsmasq is currently buggy with ipv6 && vrf (no crash but it's not listening), and need to be patched with: https://thekelleys.org.uk/gitweb/?p=dnsmasq.git;a=commit;h=a889c554a7df71ff93a8299ef96037fbe05f2f55 I have tested it, just applying this patch on current debian source is enough to get is working. - for layer2 network, we can't use a /128 for ipv6 like the /32 of ipv4. ipv6 range is large, so it shouldn't be a problem for user to have a free ip. (I can be the same on all vnets). But that mean we can't reuse the gateway ip (or it'll conflict). We need to be able to define a different ipv6 for dnsmasq server here. (and make it mandatory for ipv6 in this plugins) - gateway should be optionnal (for user have 2 nic, 1 routable + 1 flat, we don't want to send 2 gateway). Use dnsmasq server ip field (like ipv6 layer 2 plugin ?) + empty gateway field don't announce ra for theses subnets (not sure how to handle this in dnsmasq range) Alexandre Derumier (7): dhcp: add vrf support dhcp: enable-ra on layer3 zones only dnsmasq service: run service in vrf zones: evpn: add dhcp support zones: vlan: add dhcp support zones: qinq: add dhcp support zones: vxlan: add dhcp support src/PVE/Network/SDN/Dhcp.pm | 3 +- src/PVE/Network/SDN/Dhcp/Dnsmasq.pm | 7 ++-- src/PVE/Network/SDN/Zones.pm | 10 ++++++ src/PVE/Network/SDN/Zones/EvpnPlugin.pm | 9 +++++ src/PVE/Network/SDN/Zones/Plugin.pm | 7 ++++ src/PVE/Network/SDN/Zones/QinQPlugin.pm | 32 +++++++++++++++++ src/PVE/Network/SDN/Zones/SimplePlugin.pm | 9 +++++ src/PVE/Network/SDN/Zones/VlanPlugin.pm | 33 ++++++++++++++++++ src/PVE/Network/SDN/Zones/VxlanPlugin.pm | 32 +++++++++++++++++ src/services/01-dnsmasq-vrf.conf | 4 +++ src/services/Makefile | 1 + .../zones/qinq/dhcp/expected_sdn_interfaces | 34 +++++++++++++++++++ src/test/zones/qinq/dhcp/interfaces | 5 +++ src/test/zones/qinq/dhcp/sdn_config | 26 ++++++++++++++ .../zones/qinq/nodhcp/expected_sdn_interfaces | 30 ++++++++++++++++ src/test/zones/qinq/nodhcp/interfaces | 5 +++ src/test/zones/qinq/nodhcp/sdn_config | 26 ++++++++++++++ .../zones/vlan/dhcp/expected_sdn_interfaces | 27 +++++++++++++++ src/test/zones/vlan/dhcp/interfaces | 5 +++ src/test/zones/vlan/dhcp/sdn_config | 27 +++++++++++++++ .../zones/vlan/nodhcp/expected_sdn_interfaces | 23 +++++++++++++ src/test/zones/vlan/nodhcp/interfaces | 5 +++ src/test/zones/vlan/nodhcp/sdn_config | 27 +++++++++++++++ .../zones/vxlan/dhcp/expected_sdn_interfaces | 19 +++++++++++ src/test/zones/vxlan/dhcp/interfaces | 7 ++++ src/test/zones/vxlan/dhcp/sdn_config | 25 ++++++++++++++ .../vxlan/nodhcp/expected_sdn_interfaces | 15 ++++++++ src/test/zones/vxlan/nodhcp/interfaces | 7 ++++ src/test/zones/vxlan/nodhcp/sdn_config | 25 ++++++++++++++ 29 files changed, 481 insertions(+), 4 deletions(-) create mode 100644 src/services/01-dnsmasq-vrf.conf create mode 100644 src/test/zones/qinq/dhcp/expected_sdn_interfaces create mode 100644 src/test/zones/qinq/dhcp/interfaces create mode 100644 src/test/zones/qinq/dhcp/sdn_config create mode 100644 src/test/zones/qinq/nodhcp/expected_sdn_interfaces create mode 100644 src/test/zones/qinq/nodhcp/interfaces create mode 100644 src/test/zones/qinq/nodhcp/sdn_config create mode 100644 src/test/zones/vlan/dhcp/expected_sdn_interfaces create mode 100644 src/test/zones/vlan/dhcp/interfaces create mode 100644 src/test/zones/vlan/dhcp/sdn_config create mode 100644 src/test/zones/vlan/nodhcp/expected_sdn_interfaces create mode 100644 src/test/zones/vlan/nodhcp/interfaces create mode 100644 src/test/zones/vlan/nodhcp/sdn_config create mode 100644 src/test/zones/vxlan/dhcp/expected_sdn_interfaces create mode 100644 src/test/zones/vxlan/dhcp/interfaces create mode 100644 src/test/zones/vxlan/dhcp/sdn_config create mode 100644 src/test/zones/vxlan/nodhcp/expected_sdn_interfaces create mode 100644 src/test/zones/vxlan/nodhcp/interfaces create mode 100644 src/test/zones/vxlan/nodhcp/sdn_config -- 2.39.2