From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id KKclC3P6eWFngQEAgWs5BA (envelope-from ) for ; Thu, 28 Oct 2021 03:18:43 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id WN/fBnP6eWFNHAAA1q6Kng (envelope-from ) for ; Thu, 28 Oct 2021 01:18:43 +0000 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 ADBD822B8C for ; Thu, 28 Oct 2021 03:18:42 +0200 (CEST) Received: from localhost ([::1]:48604 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mfu41-0001X9-RC for larch@yhetil.org; Wed, 27 Oct 2021 21:18:41 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45838) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mfu3O-0001Vg-UM for guix-patches@gnu.org; Wed, 27 Oct 2021 21:18:04 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:39352) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mfu3O-0006TQ-5r for guix-patches@gnu.org; Wed, 27 Oct 2021 21:18:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mfu3N-0001cm-U2 for guix-patches@gnu.org; Wed, 27 Oct 2021 21:18:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#51440] [PATCH 07/10] services: static-networking: Change interface to mimic netlink. Resent-From: Julien Lepiller Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 28 Oct 2021 01:18:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 51440 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: 51440@debbugs.gnu.org Received: via spool by 51440-submit@debbugs.gnu.org id=B51440.16353838796232 (code B ref 51440); Thu, 28 Oct 2021 01:18:01 +0000 Received: (at 51440) by debbugs.gnu.org; 28 Oct 2021 01:17:59 +0000 Received: from localhost ([127.0.0.1]:50898 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mfu3K-0001cS-PC for submit@debbugs.gnu.org; Wed, 27 Oct 2021 21:17:59 -0400 Received: from lepiller.eu ([89.234.186.109]:36952) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mfu3A-0001c5-M1 for 51440@debbugs.gnu.org; Wed, 27 Oct 2021 21:17:57 -0400 Received: from lepiller.eu (localhost [127.0.0.1]) by lepiller.eu (OpenSMTPD) with ESMTP id 036a5636; Thu, 28 Oct 2021 01:17:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=lepiller.eu; h=date:from :to:cc:subject:message-id:in-reply-to:references:mime-version :content-type:content-transfer-encoding; s=dkim; bh=6IIo2hkiiShW 5REy+uZ7VpeeGlo53wC7jE3xuRmTsm4=; b=YZ2G80jvR6zXJMUu/+ivBe5tf+8S uNUv68kUbQ3jn2gJouS6tUCv7IROliU57QbWyYWwNPmcPhTCF5tnUtYP90rN28qZ SLmqGPsgof5QJZHcpMmv7z7mq6LGaMvelmfBre/Pr3DdjUYNB15vVgG7oN5W6AaX GYSapvntbTPImGcQlTMpa9YvNx4yD3T5ro62oY9SMvOB0d5RFzmnLA7cxk4vSYIh Me+SU3NPLHTSTJRQwavRJpVK9iMV8ZXaa8t8UAOXWzH5WPtNPkLA995E2tzkh9jC GwXHTpnVNzM85Pu5Zb0ic6VnnLOryEdfi19HMWsvjGenFYIIWEF7h0a8gg== Received: by lepiller.eu (OpenSMTPD) with ESMTPSA id fa3db5fe (TLSv1.3:AEAD-AES256-GCM-SHA384:256:NO); Thu, 28 Oct 2021 01:17:43 +0000 (UTC) Date: Thu, 28 Oct 2021 03:17:38 +0200 From: Julien Lepiller Message-ID: <20211028031738.50dc8114@tachikoma.lepiller.eu> In-Reply-To: <20211027140245.18970-7-ludo@gnu.org> References: <20211027140245.18970-1-ludo@gnu.org> <20211027140245.18970-7-ludo@gnu.org> X-Mailer: Claws Mail 3.18.0 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 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: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1635383922; 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:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=FEUkVKhiycJRt2OK06T8FDRr5xllrk1s63YjlnCQdWg=; b=I67DmOq42Hmy/WBisLbN+e3Rb7KtXtP5ZW2Fg6mW949xGXc4P+KUrU1fr1qtcbPZ/kPJFC e6rZQ25y3BXXJ6tj0XlU19YVLIuJskn2SMVLqNfciTr7/EIDnj/aH8lVR5+B9smdBVhNLy 1pbK3thhZUzuIbNm3xse/yxlev3xZeJec9K0ReCbNMRiBkIyftv+gWuaLn+v5BuUygt1ex Ra8t/5nvf2whp9uXeZJULhooNYEt8dJcjzaNiCWFALopM7o56rNE+bWDfcRvIs4vcmr6va f+AEdmdhu6U2d5BsRaNn1XeX7K2+qdxE43VpAMshfUhGIEYjFiofTFIxO/ZJEQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1635383922; a=rsa-sha256; cv=none; b=IAjSo2K3Zjz3lW58cCa1uEpyXrjR2VXjk9p7Yn73U2bJnfREWFszbuCJlXP1bHHd6hNe3u bTlE7SnCUBSw+JKn8XSftYlE0H1g7woZfJtPL3mHPN+PCwtvwiURILW1/TWgVY6QtHheNv saBgEVVSLuZohSrRKgeUzdIGSfTp0FkW01oHzh+KPqYGiWavGY36nkcsmdNuNMqARp5Yib vOxvP8qGzHRjWcSnRq8t7DphPlksiYK8433y2REUCRe2ny0FU/V1whDRJTyMpl0xcIuwbU itPzjVoW+vqHS1w+BmEQvtGK2lX4MTp6tr+Lk8LSr/EfRlzL1AS6YRwitdMcbw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=lepiller.eu header.s=dkim header.b=YZ2G80jv; dmarc=fail reason="SPF not aligned (relaxed)" header.from=lepiller.eu (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Spam-Score: -1.32 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=lepiller.eu header.s=dkim header.b=YZ2G80jv; dmarc=fail reason="SPF not aligned (relaxed)" header.from=lepiller.eu (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Queue-Id: ADBD822B8C X-Spam-Score: -1.32 X-Migadu-Scanner: scn0.migadu.com X-TUID: FkHfha3qMpkM A few comments on the documentation below. Le Wed, 27 Oct 2021 16:02:42 +0200, Ludovic Court=C3=A8s a =C3=A9crit : > @lisp > -(static-networking-service "eno1" "192.168.1.82" > - #:gateway "192.168.1.2" > - #:name-servers '("192.168.1.2")) > +;; Network configuration for one NIC, IPv4 + IPv6. > +(static-networking > + (addresses (list (network-address > + (device "eno1") > + (value "10.0.2.15/24")) > + (network-address > + (device "eno1") > + (value "2001:123:4567:101::1")))) > + (routes (list (network-route > + (destination "default") > + (gateway "10.0.2.2")) > + (network-route > + (destination "default") > + (gateway "2020:321:4567:42::1")))) > + (name-servers '("10.0.2.3"))) > @end lisp I don't know if you tested that, but I think this is not routable because the IPv6 network doesn't have a netmask, so I think it defaults to a /128 (one IP in the network), so the router is not on the local network. Many ISPs provide a /64 (when the provide IPv6), so maybe use that as the netmask? > -@end deffn > + > +If you are familiar with the @command{ip} command of the > +@uref{https://wiki.linuxfoundation.org/networking/iproute2, > +@code{iproute2} package} found on Linux-based systems, the > declaration +above is equivalent to typing: > + > +@example > +ip address add 10.0.2.15/24 dev eno1 > +ip address add 2001:123:4567:101::1 dev eno1 > +ip route add default via inet 10.0.2.2 > +ip route add default via inet6 2020:321:4567:42::1 > +@end example And so, change it here too. > +Run @command{man 8 ip} for more info. Venerable GNU/Linux users will > +certainly know how to do it with @command{ifconfig} and > @command{route}, +but we'll spare you that. > + > +The available fields of this data type are as follows: > + > +@table @asis > +@item @code{addresses} > +@itemx @code{links} (default: @code{'()}) > +@itemx @code{links} (default: @code{'()}) One of them should be routes, right? > +@item @code{provision} (default: @code{#f}) > +If true, this should be a list of symbols for the Shepherd service > +corresponding to this network configuration. When @code{#f}, > +@code{'(networking)} or @code{'(loopback)} is used. Under which conditions is it 'loopback instead of 'networking? > +@item @code{requirement} (default @code{'()}) > +The list of Shepherd services depended on. > +@end table > +@end deftp The rest of the manual changes look good :)