From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:403:4789::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id yOSyDk1qsWQUzAAASxT56A (envelope-from ) for ; Fri, 14 Jul 2023 17:31:25 +0200 Received: from aspmx1.migadu.com ([2001:41d0:403:4789::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id AIK6Dk1qsWQPRgEAauVa8A (envelope-from ) for ; Fri, 14 Jul 2023 17:31:25 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id C5FD749B25 for ; Fri, 14 Jul 2023 17:31:24 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=mmer.org header.s=dkim header.b="9NEP ijc"; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1689348685; a=rsa-sha256; cv=none; b=XKAmgs3OhVIC9YMQJmn3o6zp5JJwGY3ZrrLa55f6cl6euhlvk2M3+Su/CW5tMDkbU3YKDX Yo/lyfG1bSq69JCuKeVzZO/VWH5jfViamYofNf5dpxRfCzR911iSCyXDAp/NYy+O/bj5xs OH3+aWeY/B/yFEe+L7jD+IuM7W5Tqy3m4UqdYY6tMHzhGAhBBW9gx0S28/1qWTNe3qVStS 2r1MrNWd0JfNzhZndl+ZIRisS4RvP2J3qgSmdAtqQk4INxcKR6N1gIlYGPIVbVKMCYSua+ +1ThXQ78tQYjvnZNeDkrbS7iHT60wo6sohRQjPKwBiC4uLtQQPo1o8UGzhZ7Rg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=mmer.org header.s=dkim header.b="9NEP ijc"; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1689348685; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=wKPPlgaqGvOPiKUFJhT0tzSuNM++nGxhMtwkKaUjiRQ=; b=rp+ol/lBkAw+kiH4HMfZyLAlouI2F2O2MtgPJ1F5k6/U+YavGl+gYC2NvdP7aVypUv3Eux /1vJ9kYeneo9obFoyg1kq7NXCMYc2VVPMAxvGaHFkqgNCTg26Wxmdh5WDIYGLA3dMKxeNk VPQVgjytH0bhEsNbaKEWA24FR8rru3I1V4QESBrhaMQA0Xv8g68wbWewpctW6RqQGCCa7k uFQjqDFPXF5Sr8rij7WgWKA4YTB950Q7anGJNc0r+K8kyokxbfhyLRaTeffzcxMbVTvtqS j3Tw4pIVyGbCdc0J8t5wSWOyGfg2DdPAz1+II4GJol5Rf+5I8daNz+RsWIDjWA== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qKKl9-0000HH-9C; Fri, 14 Jul 2023 11:31:07 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qKKl4-0000FJ-L9 for guix-patches@gnu.org; Fri, 14 Jul 2023 11:31:04 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qKKl4-0008H8-Df for guix-patches@gnu.org; Fri, 14 Jul 2023 11:31:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qKKl4-0004pA-8i for guix-patches@gnu.org; Fri, 14 Jul 2023 11:31:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#64616] [PATCH 0/1] services: static-networking: Add support for bonds and vlans Resent-From: Alexey Abramov Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 14 Jul 2023 15:31:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 64616 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 64616@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.168934863618508 (code B ref -1); Fri, 14 Jul 2023 15:31:02 +0000 Received: (at submit) by debbugs.gnu.org; 14 Jul 2023 15:30:36 +0000 Received: from localhost ([127.0.0.1]:43237 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qKKkd-0004oR-PK for submit@debbugs.gnu.org; Fri, 14 Jul 2023 11:30:36 -0400 Received: from lists.gnu.org ([2001:470:142::17]:38484) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qKKkc-0004oG-Oo for submit@debbugs.gnu.org; Fri, 14 Jul 2023 11:30:35 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qKKkW-0000Br-WB for guix-patches@gnu.org; Fri, 14 Jul 2023 11:30:29 -0400 Received: from mail.mmer.org ([178.22.65.174]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qKKkU-0007t8-6R for guix-patches@gnu.org; Fri, 14 Jul 2023 11:30:28 -0400 Received: from mail.mmer.org (localhost [127.0.0.1]) by mail.mmer.org (OpenSMTPD) with ESMTP id 9fd62da2 for ; Fri, 14 Jul 2023 15:30:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=mmer.org; h=from:to :subject:date:message-id:mime-version:content-transfer-encoding; s=dkim; bh=PDASo1cmA3HGGMUt9WTenveurpZ55dlsZfzM/PxzdeM=; b=9NEP ijcHjCsV3CCn/QoFHZcgUg+O8R7z0vp7i9aDKbLllYVxb41xmxNoj9Da6TCUgzF+ /02AXLLf6iTULXkrKoupVT66R9yHO5pTYPYheuxTQiMAlDEeIIoSmMd+A5g15avK B3h9EVE+LqkG8JMrlLmRaT4F3myUr0Fu7G4BbE0= Received: from delta (j74210.upc-j.chello.nl [24.132.74.210]) by mail.mmer.org (OpenSMTPD) with ESMTPSA id 5fbd04b8 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO) for ; Fri, 14 Jul 2023 15:30:18 +0000 (UTC) Date: Fri, 14 Jul 2023 17:29:58 +0200 Message-Id: <20230714152958.22645-1-levenson@mmer.org> X-Mailer: git-send-email 2.39.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=178.22.65.174; envelope-from=levenson@mmer.org; helo=mail.mmer.org X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-to: Alexey Abramov X-ACL-Warn: , Alexey Abramov via Guix-patches From: Alexey Abramov via Guix-patches via Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-Migadu-Queue-Id: C5FD749B25 X-Migadu-Scanner: mx1.migadu.com X-Migadu-Spam-Score: -6.13 X-Spam-Score: -6.13 X-TUID: 8j3yiJt11QNL Hi Guix! After new release of guile-netlink, I made some changes on a guix side to be able to configure bonds and vlans using static-networking declaration. In short, I introduced two more structures for *matching* existing interfaces: and . The reason for that is that struct creates new interfaces in network-set-up/linux. And if we want to construct a bond we need a way to apply settings for existing interfaces. With these changes applied, it is passable to do something like this: (static-networking (links (list (network-link (name "bond0") (type "bond") (arguments '((mode . "802.3ad") (miimon . 100) (lacp-active . "on") (lacp-rate . "fast")))) (network-link-by-macaddress (macaddress "98:11:22:33:44:55") (arguments '((master . "bond0")))) (network-link-by-macaddress (macaddress "98:11:22:33:44:56") (arguments '((master . "bond0")))) (network-link (name "bond0.1055") (type "vlan") (arguments '((id . 1055) (link . "bond0")))))) (addresses (list (network-address (value "192.168.1.4/24") (device "bond0.1055"))))) This example is taken from the test, where I removed interface renaming step. You should also know that network stack in Qemu won't with this configuration. The purpose of the test was to check if the stack has proper settings. If it is not enough, Please let me know. I can try to use openvswitch for that There is one thing that bothers me. Here is a comment I put in the code: It is interesting that "modprobe bonding" creates an interface bond0 straigt away. If we won't have bonding module, and execute `ip link add name bond0 type bond' we will get RTNETLINK answers: File exists This breaks our configuration if we want to use `bond0' name. Create (force modprobe bonding) and delete the interface to free up. As you can see I create an interface bond0 (in case some bonds are in configuration). It is forces netlink to load the bonding module and then delete it to free up the 'name'. Please let me know what you think. Alexey Abramov (1): services: static-networking: Add support for bonding. doc/guix.texi | 61 ++++++++++++++++- gnu/services/base.scm | 109 +++++++++++++++++++++++++++--- gnu/tests/networking.scm | 141 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 299 insertions(+), 12 deletions(-) -- 2.40.1