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 ms9.migadu.com with LMTPS id aOxTJUDcHGR3GgEASxT56A (envelope-from ) for ; Fri, 24 Mar 2023 00:09:52 +0100 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 0IZvJUDcHGS87gAA9RJhRA (envelope-from ) for ; Fri, 24 Mar 2023 00:09:52 +0100 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 4783A2C8E8 for ; Fri, 24 Mar 2023 00:09:52 +0100 (CET) Authentication-Results: aspmx1.migadu.com; dkim=none; spf=pass (aspmx1.migadu.com: domain of "help-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="help-guix-bounces+larch=yhetil.org@gnu.org"; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1679612992; 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:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post; bh=0iahO4Miog7l948gx9eqMRSiLopBdcWR+SSu8gZZsj0=; b=Q8VHIKNMtr2b7NQlQo5pskzhlQpwoReZ8ePqA/Q8uXOIJwhdRv9yfoMz8Zk7rlYFMez37U v7TcnlJwRjdwuJf/ZYXSdkWl23NxW8XUIm4rlMyCxVNHu2XvJusGKmyCQMwG+KbD4cTDL0 z5DomZ7XWmrtBH/NiXZU9mhs8ng+7yhqkX1dmrxDL65wU3hXOisQ3Qf0ISIHy7ArAtV1y1 wOks9yFndeDLSISIyczB81rW9O7RQJPjt5/dH/oSzJj2PIDfBwwwlbQdo8/4F6ruXbB/yp C70QKDl1yqme10nqC1shTS9LCmI31n+AdlwClPzmv87AEndUihUPssnTDcuqTg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1679612992; a=rsa-sha256; cv=none; b=Iu+2wNkBlTyGBsoJnWPVbnvnmmABVEu5HuEUdJgmxD+6PwufywK1j577u7c/kGvBw/oXOp VFGtXKVeObsaWg6o6SjUd6JE2/tiElA9WPucMt1A740k3aAlKUSSN3HteDWXZV9MY8aILI jXYFvW/Cg+YVnIQmd6geiIZ0ueEmQ162A33jJHcX+58zRbp+zS+2FJ9is35VIZ/ftw3Ohl dLRPtf65jJ9+LsCH4+Ud9Hy4CVEqfuHDTwSW5HTpB8AWEGU0NNEuetEx3ExoNIt7cjpMhX y6ciGdlWQLxn6sKZ2hsZOfZliQMFVAg1De2KXJ81YhLq6frAmaeqj8WDNQ99wA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; spf=pass (aspmx1.migadu.com: domain of "help-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="help-guix-bounces+larch=yhetil.org@gnu.org"; dmarc=none Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pfU3j-0007xA-MU; Thu, 23 Mar 2023 19:09:27 -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 1pfU3f-0007tm-4J for help-guix@gnu.org; Thu, 23 Mar 2023 19:09:23 -0400 Received: from cyberdimension.org ([2001:910:1314:ffff::1] helo=gnutoo.cyberdimension.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_CHACHA20_POLY1305:256) (Exim 4.90_1) (envelope-from ) id 1pfU3c-0007qR-0F for help-guix@gnu.org; Thu, 23 Mar 2023 19:09:22 -0400 Received: from gnutoo.cyberdimension.org (localhost [127.0.0.1]) by cyberdimension.org (OpenSMTPD) with ESMTP id 1da7a44c; Thu, 23 Mar 2023 23:09:11 +0000 (UTC) Received: from primary_laptop (localhost [::1]) by gnutoo.cyberdimension.org (OpenSMTPD) with ESMTP id 79486970; Thu, 23 Mar 2023 23:09:10 +0000 (UTC) Date: Fri, 24 Mar 2023 00:08:50 +0100 From: Denis 'GNUtoo' Carikli To: Julien Lepiller Cc: help-guix@gnu.org Subject: Re: static-networking-service-type: Using a static network bridge Message-ID: <20230324000850.27e89cc1@primary_laptop> In-Reply-To: <66E59A8E-82D0-4CE0-B37B-EA4C91A5FA2A@lepiller.eu> References: <20230322013248.7299a393@primary_laptop> <66E59A8E-82D0-4CE0-B37B-EA4C91A5FA2A@lepiller.eu> X-Mailer: Claws Mail 4.1.1 (GTK 3.24.30; i686-pc-linux-gnu) MIME-Version: 1.0 Content-Type: multipart/signed; boundary="Sig_/Eog.v.NJ3JdSoWo/tAvwv5t"; protocol="application/pgp-signature"; micalg=pgp-sha256 Received-SPF: pass client-ip=2001:910:1314:ffff::1; envelope-from=GNUtoo@cyberdimension.org; helo=gnutoo.cyberdimension.org X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-guix@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: X-Migadu-Queue-Id: 4783A2C8E8 X-Spam-Score: -5.75 X-Migadu-Spam-Score: -5.75 X-Migadu-Scanner: scn0.migadu.com List-Help: List-Subscribe: , Errors-To: help-guix-bounces+larch=yhetil.org@gnu.org Sender: help-guix-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-TUID: XK5tgd/lWKiG --Sig_/Eog.v.NJ3JdSoWo/tAvwv5t Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable On Wed, 22 Mar 2023 07:24:01 +0100 Julien Lepiller wrote: > You specified type twice, with #f the last time. Maybe that's tge > issue? Sorry my bad: I messed up the indentation, so it makes it look like type is specified twice. When doing sudo guix system reconfigure I get that: > guix system: warning: exception caught while executing 'start' on > service 'networking': > Throw to key `no-such-device' with args `("lan0")'. > guix system: warning: some services could not be upgraded > hint: To allow changes to all the system services to take effect, you > will need to reboot. So I'll try to rephrase and split the question: Is the following correct to create a bridge: > (network-link (name "lan0") > (type 'bridge) > (arguments '())) Or is that supposed to only work on existing interfaces? Or am I supposed to add something inside arguments to create the bridge? The issue is that I only managed to understand what to put in name and type with the Guix manual. The documentation describes arguments as "List of arguments for this type of link.", and it then point to "Link in Guile-Netlink Manual" which points to https://git.lepiller.eu/guile-netlink/manual/manual.html#Link But it doesn't tell how the correspondence between arguments and that manual section is made. Do arguments expect some string? some state (like IF_OPER_UP?), the same arguments than type-args?, a link datatype? Though the guile-netlink documentation is very easy to use to create a bridge and give it an address: > (link-add "lan0" "bridge") > (addr-add "lan0" "192.168.10.7/24") but I've no idea how to translate that in Guix configuration. As for making a device join a bridge I'm also unsure how to do that. I didn't find any infos for that in the Guix manual or the guile-netlink documentation, so maybe that's not supported? If that's not supported, udev can still be used to run commands with things like that: > (udev-rule "bridge.rules" > "SUBSYSTEM=3D=3D\"net\", [some way to indentify the interface], \\ > ACTION=3D=3D\"add\", \\ > RUN+=3D\"/run/current-system/[...]/ip link set dev $name master > lan0\"")) and it works for other things (like changing MAC addresses with macchanger, etc). So does udev run late enough to already have the bridge interface created when something like that would run? Or is there something that could work with Guix static-networking-service-type somehow? Thanks a lot in advance for the help. Denis. --Sig_/Eog.v.NJ3JdSoWo/tAvwv5t Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEeC+d2+Nrp/PU3kkGX138wUF34mMFAmQc3AIACgkQX138wUF3 4mNYgw/+KsMpKYI6l1VRItEAQ/aPHUeHDI0spchXl9TDVbilGNeHBtSVArNvLxoY U3jcEb269zRoR482VbLpGnszObzQKJrWhCCNq2/3ZPBUSPhZKcbNkS4852cvhu71 QHxcPro1sd0TB0q7W+2RTyWeCt/2YxYuzh4okgcA4CBdCGxKHtdgONsEbCU6fbv4 ZkRpA5oRt5P4YthoYu/y0HWc3kmmS6ICLMIHAMJHBkSWDIw8vTRP8iZm6hO0saWZ x6Ov1UdOMc9cAiagSQsfRY7cDLFQwRpkzVLOju+iF0uBJXxWKKC9TpQS15CvkQ4R Ltn1aAwS2cJDwlXdBzwUBsW84s10m1A8aUtJinNjs7qSJzcDedbEyN5FHwXrDzTm gsKE+Qj7fyuEESrjPnc1VIcWVwQU2Vb3dquD3tlFTXCiMnnEZBAJReIi+Q7yLiZO OHJ2BKFY8Y7uO98V3Pdu+1ucIUbduttHKsNFmvXifESKurUPUoUWEya6r6bdK3zh Np20SIRB7cx6xKpzvQ+RJXVdL5/ZdpPkLqlgV/O/9omq4WRY3Aa8ddIlan4ixRIW mRkyAYlj086NDkb6wZ8HBikCDYAOybmTKwYAadfyz7YmgY3qZMnSpH2pcUe5qUxV XK64M6sLbDrdi+EKYmx7/P6glVrrbxmqPzj20YI82WArg2Xsxmk= =T/OP -----END PGP SIGNATURE----- --Sig_/Eog.v.NJ3JdSoWo/tAvwv5t--