From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <s.hanreich@proxmox.com>
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))
 (No client certificate requested)
 by lists.proxmox.com (Postfix) with ESMTPS id 717A4947D5
 for <pve-devel@lists.proxmox.com>; Thu, 22 Feb 2024 11:14:26 +0100 (CET)
Received: from firstgate.proxmox.com (localhost [127.0.0.1])
 by firstgate.proxmox.com (Proxmox) with ESMTP id 4AB5D5FE9
 for <pve-devel@lists.proxmox.com>; Thu, 22 Feb 2024 11:13:56 +0100 (CET)
Received: from proxmox-new.maurer-it.com (proxmox-new.maurer-it.com
 [94.136.29.106])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
 key-exchange X25519 server-signature RSA-PSS (2048 bits))
 (No client certificate requested)
 by firstgate.proxmox.com (Proxmox) with ESMTPS
 for <pve-devel@lists.proxmox.com>; Thu, 22 Feb 2024 11:13:55 +0100 (CET)
Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1])
 by proxmox-new.maurer-it.com (Proxmox) with ESMTP id 71A6D44830;
 Thu, 22 Feb 2024 11:13:55 +0100 (CET)
Message-ID: <ecf0948f-06d2-4299-adb2-019550c2f38b@proxmox.com>
Date: Thu, 22 Feb 2024 11:13:54 +0100
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Content-Language: en-US
To: Proxmox VE development discussion <pve-devel@lists.proxmox.com>,
 "DERUMIER, Alexandre" <alexandre.derumier@groupe-cyllene.com>
References: <20231219083216.2551645-1-aderumier@odiso.com>
 <78a6d299-8b92-4ef1-95b6-c99c6f3f9e90@proxmox.com>
 <248b6df66af9dc843b7998898a43bb9ddb007f58.camel@groupe-cyllene.com>
From: Stefan Hanreich <s.hanreich@proxmox.com>
In-Reply-To: <248b6df66af9dc843b7998898a43bb9ddb007f58.camel@groupe-cyllene.com>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
X-SPAM-LEVEL: Spam detection results:  0
 AWL 0.494 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
 T_SCC_BODY_TEXT_LINE    -0.01 -
Subject: Re: [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 <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>
X-List-Received-Date: Thu, 22 Feb 2024 10:14:26 -0000



On 12/22/23 22:27, DERUMIER, Alexandre wrote:
> Hi,
> I'll be on holiday next week (I'll be back the 2 january).
> 
> 
> I'll look at QinQ when I'll be back.

I've had another look at this patch series and I think I found the
reason for the issue(s) I encountered during my testing.

One issue is related to the new IP forwarding settings. It seems like
they are not applying. I've looked at the ifquery output after creating
a QinQ / VLAN zone with DHCP enabled:

  {
    "name": "qinq5",
    "auto": true,
    "config": {
      "bridge-ports": "z_qinq5.456",
      "bridge-stp": "no",
      "bridge-fd": "0",
      "ip-forward": "on",
      "address": "172.16.5.1/32"
    },
    "config_status": {
      "bridge-ports": "pass",
      "bridge-stp": "pass",
      "bridge-fd": "pass",
      "ip-forward": "fail",
      "address": "pass"
    },
    "status": "fail"
  },
  {
    "name": "vlan4",
    "auto": true,
    "config": {
      "bridge-ports": "ln_vlan4",
      "bridge-stp": "no",
      "bridge-fd": "0",
      "ip-forward": "on",
      "address": "172.16.4.1/32"
    },
    "config_status": {
      "bridge-ports": "pass",
      "bridge-stp": "pass",
      "bridge-fd": "pass",
      "ip-forward": "fail",
      "address": "pass"
    },
    "status": "fail"
  },

It seems like the ip-forward settings do not get applied and therefore
the command 'fails'. The bridges are up and working but IP forwarding is
enabled:

root@hoan-02:~# cat /proc/sys/net/ipv4/conf/vlan4/forwarding
1

root@hoan-02:~# cat /proc/sys/net/ipv4/conf/qinq5/forwarding
1


The other issue was using QinQ zone with a bridge that has no bridge
port configured and is not vlan-aware. In that case status is checking
for the existence of the sv_<id> interface but it doesn't exist since
there isn't a bridge port.
This is also occuring without this patch, so no show stopper here imo.

> It just miss the ip for dhcpserver different than gateway for ipv6
> handling for vlan/qinq/vxlan, but it should be easy to implement.
> 
> Also, for ipv6 in vrf, it need a patch for dnsmasq, so I think this
> will need to proxmox dnsmasq package version.