From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id MGocDTFePWOSrAAAbAwnHQ (envelope-from ) for ; Wed, 05 Oct 2022 12:36:33 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id ePMYDTFePWMXcwAAauVa8A (envelope-from ) for ; Wed, 05 Oct 2022 12:36:33 +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 D2A8F28C31 for ; Wed, 5 Oct 2022 12:36:32 +0200 (CEST) Received: from localhost ([::1]:55988 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1og1lP-0006he-TR for larch@yhetil.org; Wed, 05 Oct 2022 06:36:31 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56932) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1og1k4-0006b2-Dh for guix-devel@gnu.org; Wed, 05 Oct 2022 06:35:13 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:53648) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1og1k1-0000Jp-Sk; Wed, 05 Oct 2022 06:35:06 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=OzDaChpMPTDdAtBbWb6ucw98HPY2p6GTOmHQLRS431c=; b=iPRP55K0TWep/Dz1VRJh sbkVfottntEEZT9LSKGQszdz3I9RzlWWqu//VZiFo9gZdeHu5KvfQVL569rUtsHMhm/zAgx2IqQSB c1Fuvk0aZCtutvPyABMRGtWBj0jeqDN54BcSPxTs6IUgyct/bYYoaL/15XRT4GJEnwLZ9sAez5rpx lYnWv1a9KaG44NCwv7JaUiujVhqWDZizFeIz4ja8eXLHtkfc2a8azDEWbLFxNoOKJZHnhY/xC+Vhr Gye9z6NVM6p28aj/MEHKRvI3xsrKq/YxfeByOsG3dM1hJStDZiy/EZwJQdTwobW1Ehm/UGU4j6PMU 0wKae5xdvTIxbA==; Received: from 91-160-117-201.subs.proxad.net ([91.160.117.201]:60065 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1og1jx-0002rF-6L; Wed, 05 Oct 2022 06:35:03 -0400 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Alexey Abramov Cc: guix-devel@gnu.org, Julien Lepiller Subject: Re: Advanced network configuration References: <875yh0sr5c.fsf@delta.lan> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: Quartidi 14 =?utf-8?Q?Vend=C3=A9miaire?= an 231 de la =?utf-8?Q?R=C3=A9volution=2C?= jour du =?utf-8?B?UsOpc8OpZGE=?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Wed, 05 Oct 2022 12:34:58 +0200 In-Reply-To: <875yh0sr5c.fsf@delta.lan> (Alexey Abramov's message of "Mon, 03 Oct 2022 20:23:11 +0200") Message-ID: <87fsg2sgml.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: "Guix-devel" X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1664966193; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=OzDaChpMPTDdAtBbWb6ucw98HPY2p6GTOmHQLRS431c=; b=cA871o7o4nwrsAEbZ5ZNJSYmGegQMhBx7h2zfeb45d3AKQxsrRdE43FNQxsUg4pvqLJ80/ ai+gEwyZ9W+ESQbdTvFEXcXwdY2jF0DtWRVJSuSoxKZOUwNjykgtWkqvJL6shufcyb4zTQ j5a8TIbPQk3+PeVqIi8a3hMg01BWcHUGeczU1SbsSYLCI9xtATtSS9rKr22kBfwqWkGeQ7 1viLX9SdCC6qeaxh2GIlDApT6yxc7EyIpdA6745ijJvY3jrpQ0dz0jJ/+ORRehoRpAPUi4 d0ivRup6k+j9vyBzxqiYHahZ+oSOu2ULZ7szaTsy0pdA0OOghYj4YizyTVUfHA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1664966193; a=rsa-sha256; cv=none; b=ZHfD+vjtZhPngp/JWEYblEK/1XUvn/okJCk3dgQ/sJmIzC5FErmRJNz01T4zhCgAv+EWKj sVJE7nzr934idATF3pBJ1tSH/alnKvqXIPoxDOE0M+IAbU+7APFXL914rCduGhC06Qhdkq 1dC2qH+cR3jgtSAHjIgfqRGe4HjLKtpEHh0ZUHBnJ+N/tt+zPHsfFUsIgBU//bsOQOmy0d f3VBRxhVNHRugrt8IuOga1WhOTnXUJL0Z51I5+iPfnyMQTXoYdyCKETjiFIyCkoNhT4XLj SfdntYBYtSkCoJ2qWCgm7KWnKzUXijZnSGw1yL8dPPuGpenz6TFPi9qsicI5RA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gnu.org header.s=fencepost-gnu-org header.b=iPRP55K0; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -7.86 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gnu.org header.s=fencepost-gnu-org header.b=iPRP55K0; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: D2A8F28C31 X-Spam-Score: -7.86 X-Migadu-Scanner: scn0.migadu.com X-TUID: uAeIi+OK2fDN Hi Alexey, (Cc: Julien, author of Guile-Netlink.) Alexey Abramov skribis: > 1. I have servers with multiple network cards. Let's say, the management > one and production. both network cards have multiple interfaces, which I > need to bond into 803.1ad mode. Management bond has a native vlan where > DHCP should be provided AND another vlan for the management traffic. The > production interface (after bonding) has another set of VLANs for a > different type of traffic as well. Currently, there is no way to define > it without writing a custom service with the iproute2 utility. > > I was hacking on guile-netlink and did some progress with setting > bonds. However current static configuration won't let me build it > anyway. I have to not only 'link-add' and create a bond, but also amend > existing interfaces by 'link-set' them as a slave to my newly created > bond master for example. I=E2=80=99m sure your improvements to Guile-Netlink would be welcome. Regarding =E2=80=98static-networking=E2=80=99 in Guix, the goal was to allo= w it to be as expressive as the underlying netlink interface, but clearly we focused on the most common use cases. If you can think of how you=E2=80=99d like to represent these setups in =E2=80=98static-networking=E2=80=99 (perhaps a =E2=80=98bonds=E2=80=99 fiel= d similar to the netplan YAML snippet you showed?), we (or you :-)) can try and implement it. > 2. Having a router with Guix at home. I have to run multiple services > that provision 'networking' which is not allowed right now. The DHCP > client service is greedy right now and binds to all available > interfaces. I sent a [1] patch to solve this. However, I cannot define > dhcp-client and static configuration at the same time anyway. OK, we could allow users to change the Shepherd service name used by the DHCP client then. > These two examples lead me to the following questions: > > 1) To configure the network, I have been happily using netplan app > (debain/ubuntu world). The specification they use can be found here > [2]. Here is an example: [...] > From the example above, you can see that I rename interfaces (i do know > that udev can do it, but it is easier to do it here). I build bonds and > VLANs with their IPs. I also set routes and default gateway. Would > someone be interested in that? I don't see any problems in implementing > this with guile-netlink. This is basically my proposal on how we can > improve our static network configuration. What do you think? I=E2=80=99m all for it! This should be done in a way that preserves compatibility with the existing record as much as possible. > 2) In Systemd world there is a notion of 'target' which is used for > *grouping* units and *synchronization* points during the start-up. > > At this moment *I* need to have dhcp-client and static > configuration. Seems like grouping is a key here. Were there any > ideas/attempts to make it happen? Or what should I do?=20 I=E2=80=99m not sure. IIUC, a =E2=80=9Cnetworking target=E2=80=9D here cou= ld translate to a Shepherd service that depends on all the relevant DHCP and static networking services. The question the becomes how to express that grouping conveniently. Thanks, Ludo=E2=80=99.