From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.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 4E3wJygpO2ORLgEAbAwnHQ (envelope-from ) for ; Mon, 03 Oct 2022 20:25:44 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id KKwIKCgpO2Oh0wAA9RJhRA (envelope-from ) for ; Mon, 03 Oct 2022 20:25:44 +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 454DC24FA2 for ; Mon, 3 Oct 2022 20:25:44 +0200 (CEST) Received: from localhost ([::1]:47616 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ofQ8C-0001Xy-GB for larch@yhetil.org; Mon, 03 Oct 2022 14:25:32 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:32774) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ofQ6T-0001Uy-PP for guix-devel@gnu.org; Mon, 03 Oct 2022 14:23:45 -0400 Received: from mail.mmer.org ([178.22.65.174]:45718) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ofQ6P-0001nl-Jc for guix-devel@gnu.org; Mon, 03 Oct 2022 14:23:45 -0400 Received: from mail.mmer.org (localhost [127.0.0.1]) by mail.mmer.org (OpenSMTPD) with ESMTP id 44628fef for ; Mon, 3 Oct 2022 18:23:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=mmer.org; h=from:to :subject:date:message-id:mime-version:content-type; s=dkim; bh=B LZ7CWM2rWh341Gn6rdsPnbq2RTP65hqmqdt3KbQ+UQ=; b=LSj6FSO+0+Bl9UoXc WJzNRqYfJ7wlEfVn/hktPiw5KAfH6om5mlSEgjchnwxoD9bDEh2MZoXEmtPlzCr0 y3oIptbNGeiOL9tWTCOT+dzUgrrGBS/Ogmft98aeO2gf7U/g6YxqTt9G8bY9L3Uj s80Osk5+zUR8ruBqqYeddPquXM= Received: from delta.lan (j74210.upc-j.chello.nl [24.132.74.210]) by mail.mmer.org (OpenSMTPD) with ESMTPSA id e836fc4f (TLSv1.3:AEAD-AES256-GCM-SHA384:256:NO) for ; Mon, 3 Oct 2022 18:23:34 +0000 (UTC) From: Alexey Abramov To: guix-devel@gnu.org Subject: Advanced network configuration Date: Mon, 03 Oct 2022 20:23:11 +0200 Message-ID: <875yh0sr5c.fsf@delta.lan> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain 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_FILL_THIS_FORM_SHORT=0.01 autolearn=ham autolearn_force=no X-Spam_action: no action 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=1664821544; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=mPolTRNh9MDGxU29rvZ6oD1RZJAZMpi6D/CNTeywu8Q=; b=KSvtc7uReCAAUJzU4j+BSLFz0B625J5RIH/qqO7gD5xUGpa+GO+1QQJt/QkElUaW5YbUjX Phw5mOt5LpwetEYWWstQi/uRPhrdfFtfJocWua9N73Xuqm/3xWGjHi1oOGpqpAWaMK8+V9 TAYgutJxhQz1klXnbHjYrLaboOsaVQ8aKmD3oFvWgaTWCcz3lNNQlfQqGQTlFx3S0UspaU xMf1/6IHYFiGm2H2ER40m+RiJ37Iltf+u4ceREUwDlVy/is5QgKfj/6ZcPmbCiewZrn2GB cKNtS16h2jv1XtLgWK7Qqz1CfndjtJ3hkprEoGVDk6TcUpyI4RgOcDI7o9R2fg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1664821544; a=rsa-sha256; cv=none; b=DuJioS9dospYbHAqXkVBNcnSB5KqvGHeQv3zAxa5V4g2uxCxvaKPOZPGpdu4EM1xQHB1Q9 /Z4XP1SPG+B38b12AkBhjatM+p5xAALDsXfwLUTM5WSIh0jTT0e/HUrdwgk9/8C4qnOzy/ DqvmRg4kv05YFN+9JA/cLPClo8U5Vd99Zo0CcuEqjY1yvwZqzC1ioqcYub/03P+Bx2mMfw 36352c4y2iSposUVjKRFfS/Ad456TWOMhjqttDEaQ1WZ3MW1mipEW8I68NPiWREKfg+bAP phcX+kUpKUSa02OPuQ8RJJB9YYxv/K3AdfpDjDSwS8EQyDYMFRtUqcHkadr0Pw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=mmer.org header.s=dkim header.b=LSj6FSO+; dmarc=pass (policy=reject) header.from=mmer.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: -3.85 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=mmer.org header.s=dkim header.b=LSj6FSO+; dmarc=pass (policy=reject) header.from=mmer.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: 454DC24FA2 X-Spam-Score: -3.85 X-Migadu-Scanner: scn1.migadu.com X-TUID: sfXUGKJPa2i6 Hi Guix, I have a couple of questions regarding our current network configuration in Guix. With the latest changes to the static configuration, live is indeed, became easier, but I have to say that it is still insufficient to define a complete network configuration. Please check out the following (my) use cases: 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. 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. 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: --8<---------------cut here---------------start------------->8--- network: bonds: bond0: interfaces: - eno0 - eno1 parameters: mode: 802.3ad bond2: interfaces: - enp0 - enp1 parameters: mode: 802.3ad ethernets: eno0: match: macaddress: xx:xx:xx:xx:xx:xx set-name: eno0 eno1: match: macaddress: xx:xx:xx:xx:xx:xx set-name: eno1 eno2: match: macaddress: xx:xx:xx:xx:xx:xx set-name: eno2 eno3: match: macaddress: xx:xx:xx:xx:xx:xx set-name: eno3 enp0: match: macaddress: xx:xx:xx:xx:xx:xx set-name: enp0 enp1: match: macaddress: xx:xx:xx:xx:xx:xx set-name: enp1 renderer: networkd version: 2 vlans: bond1.1055: addresses: - 10.0.0.1/24 routes: - to: XX.XX.XX.XX/21 via: 10.x.x.x gateway4: 10.0.0.1 id: 1055 link: bond1 bond2.2055: addresses: - 10.8.0.1/24 id: 2055 link: bond2 bond2.3055: addresses: - 192.168.0.0/16 id: 3055 link: bond2 --8<---------------cut here---------------end--------------->8--- >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? 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? Footnotes: [1] https://issues.guix.gnu.org/58223 [2] https://netplan.io/reference -- Alexey