From: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
To: Julien Lepiller <julien@lepiller.eu>
Cc: help-guix@gnu.org
Subject: Re: static-networking-service-type: Using a static network bridge
Date: Fri, 24 Mar 2023 00:08:50 +0100 [thread overview]
Message-ID: <20230324000850.27e89cc1@primary_laptop> (raw)
In-Reply-To: <66E59A8E-82D0-4CE0-B37B-EA4C91A5FA2A@lepiller.eu>
[-- Attachment #1: Type: text/plain, Size: 2537 bytes --]
On Wed, 22 Mar 2023 07:24:01 +0100
Julien Lepiller <julien@lepiller.eu> 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==\"net\", [some way to indentify the interface], \\
> ACTION==\"add\", \\
> RUN+=\"/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.
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2023-03-23 23:09 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-22 0:32 static-networking-service-type: Using a static network bridge Denis 'GNUtoo' Carikli
2023-03-22 6:24 ` Julien Lepiller
2023-03-23 23:08 ` Denis 'GNUtoo' Carikli [this message]
2023-03-24 17:14 ` Julien Lepiller
2023-03-27 17:37 ` Denis 'GNUtoo' Carikli
2023-03-29 18:27 ` Julien Lepiller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230324000850.27e89cc1@primary_laptop \
--to=gnutoo@cyberdimension.org \
--cc=help-guix@gnu.org \
--cc=julien@lepiller.eu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).