From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.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 wG/jLe3aHWQdhgAASxT56A (envelope-from ) for ; Fri, 24 Mar 2023 18:16:29 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id 2Hb8LO3aHWRmBAEAG6o9tA (envelope-from ) for ; Fri, 24 Mar 2023 18:16:29 +0100 Received: from lists.gnu.org (unknown [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 57A08293AB for ; Fri, 24 Mar 2023 18:16:29 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pfl1P-0000hc-UO; Fri, 24 Mar 2023 13:16:11 -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 1pfl1N-0000hC-T0 for help-guix@gnu.org; Fri, 24 Mar 2023 13:16:09 -0400 Received: from lepiller.eu ([89.234.186.109]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pfl1K-0002Hn-9N for help-guix@gnu.org; Fri, 24 Mar 2023 13:16:09 -0400 Received: from lepiller.eu (localhost [127.0.0.1]) by lepiller.eu (OpenSMTPD) with ESMTP id 9bed902c; Fri, 24 Mar 2023 17:14:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=lepiller.eu; h=date:from :to:cc:subject:in-reply-to:references:message-id:mime-version :content-type:content-transfer-encoding; s=dkim; bh=2qGFxb+gsZzl SQruiy4TLinjfBeNn5cLIJ2j5f9B30I=; b=HLDBIvUkKSeNZlxXoPcGYB1/rPUQ XSZ7v5pg2fmBQWxUdjCd3fTuQO064L2wO/0Swh9XFhD9w0FzTv8o53suYvE+nDuF 2C6sG2gKybxlGs6sAR8i/NKkDAAlazFjaMkrTksBBpubKjFH0KyzASOY/RDx2NUw pxq+NxotECeBVDfJ3tzJgeU5BIgHxl+Vs8YjPRBzA8naYET1Pe+3/FrOrH3eQAFo bTN2S4G90JJEX7SdoJloPMvUogY6JEty5KMfRwB3GMYzSeNauLZ4B+q7PYOlG/tD Vyfls7xpwf5g+JPNAldjSXV1Qa6jAjVfSrDlKreDGx8C1iHaDJktIyP98Q== Received: by lepiller.eu (OpenSMTPD) with ESMTPSA id d461ca20 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Fri, 24 Mar 2023 17:14:51 +0000 (UTC) Date: Fri, 24 Mar 2023 18:14:48 +0100 From: Julien Lepiller To: Denis 'GNUtoo' Carikli CC: help-guix@gnu.org Subject: Re: static-networking-service-type: Using a static network bridge User-Agent: K-9 Mail for Android In-Reply-To: <20230324000850.27e89cc1@primary_laptop> References: <20230322013248.7299a393@primary_laptop> <66E59A8E-82D0-4CE0-B37B-EA4C91A5FA2A@lepiller.eu> <20230324000850.27e89cc1@primary_laptop> Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=89.234.186.109; envelope-from=julien@lepiller.eu; helo=lepiller.eu 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_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: 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 ARC-Seal: i=1; s=key1; d=yhetil.org; t=1679678189; a=rsa-sha256; cv=none; b=XGGh2cGomjiibnqjNE+5uuOdSgXNGmO6t1wqFm1Jrs44ZqePR7iJ0scHMrUO95Be2CZFVy Y3ypm1issPzr/EIWgYrMat8x6v3rxDRlbl7DPa+YQbETlmMNekkuOMq/gDzR5JroXi/S4P SlWUs8DJM1Jlw7ZHMl3Ex8+JQEVPO0oayVXu3V1KMuRr7vALBwCdiFeLD32Cj+84SyxDaq WaIUwtAiPixCFM9U9VM6S0k8CZIJrh+MfWl+nhvIEBT9nAy14CBnlWIgSGSEVt/z71nW8j Zh6MT1hGWVqB/B5kjlpKyXPhaAb/b2KtZgMB9H5lRTOXt1i0tc5L2Mn+q1bdNw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=lepiller.eu header.s=dkim header.b=HLDBIvUk; dmarc=pass (policy=none) header.from=lepiller.eu; 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" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1679678189; 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=age2nEGqpbc6y2qbCjuC2DQ30fzuPxwDCq+VwP0OwbQ=; b=oiKIZYHqLyT29Tr2RQfdjWaxPLf9vQ6/hAZhe2N2NwzN1dUhJugCS9mf1eHTHtOYo+E6gb COwxP9mSG/C18qG8HkK4TlJlDjh/C2oVw11zihyY8kvFnFu9Vdyx9oq9rxYkOgUT8VAfbN +bMnD4ixY3QklikUodnyuzRExm3ZW2d1MnL+YKOi3x1+vxIZThHNwVEeMfY+z3zAVMaH6u b3IkZsPCwV4Fvo/WRmyyJpKl2mlGthEMLfrQessZHk1hVVdrr8HQlmL0L25gkN1xfCzPmT 5USJoCXEkNDrpFJymxV0M/w0Y6k4rwNqOSLf74Q0AouB9Ip/gZxhmY5YU0/2Sw== Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=lepiller.eu header.s=dkim header.b=HLDBIvUk; dmarc=pass (policy=none) header.from=lepiller.eu; 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" X-Migadu-Scanner: scn1.migadu.com X-Migadu-Spam-Score: -3.99 X-Spam-Score: -3.99 X-Migadu-Queue-Id: 57A08293AB X-TUID: g8W3q8dxxNlX The type should be a string, so "bridge" would be correct=2E However, it's = not supported by guile-netlink yet, sorry=2E Do you think you could send me= a scenario with iproute2 commands so I ean test an implementation? Le 24 mars 2023 00:08:50 GMT+01:00, Denis 'GNUtoo' Carikli a =C3=A9crit=C2=A0: >On Wed, 22 Mar 2023 07:24:01 +0100 >Julien Lepiller wrote: > >> You specified type twice, with #f the last time=2E Maybe that's tge >> issue? >Sorry my bad: I messed up the indentation, so it makes it look like >type is specified twice=2E > >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")'=2E >> 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=2E > >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=2E The documentation describes arguments as >"List of arguments for this type of link=2E", and it then point to "Link >in Guile-Netlink Manual" which points to >https://git=2Elepiller=2Eeu/guile-netlink/manual/manual=2Ehtml#Link > >But it doesn't tell how the correspondence between arguments and that >manual section is made=2E 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=2E168=2E10=2E7/24") >but I've no idea how to translate that in Guix configuration=2E > >As for making a device join a bridge I'm also unsure how to do that=2E 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=2Erules" >> "SUBSYSTEM=3D=3D\"net\", [some way to indentify the interface], \\ >> ACTION=3D=3D\"add\", \\ >> RUN+=3D\"/run/current-system/[=2E=2E=2E]/ip link set dev $name master >> lan0\"")) >and it works for other things (like changing MAC addresses with >macchanger, etc)=2E > >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=2E > >Denis=2E