guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Advanced network configuration


From: Ludovic Courtès
Subject: Re: Advanced network configuration
Date: Wed, 05 Oct 2022 12:34:58 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.1 (gnu/linux)

Hi Alexey,

(Cc: Julien, author of Guile-Netlink.)

Alexey Abramov <levenson@mmer.org> skribis:

> 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.

I’m sure your improvements to Guile-Netlink would be welcome.

Regarding ‘static-networking’ in Guix, the goal was to allow it to be as
expressive as the underlying netlink interface, but clearly we focused
on the most common use cases.

If you can think of how you’d like to represent these setups in
‘static-networking’ (perhaps a ‘bonds’ field similar to the netplan YAML
snippet you showed?), we (or you :-)) can try and implement it.

> 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.

OK, we could allow users to change the Shepherd service name used by the
DHCP client then.

> 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:

[...]

> 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?

I’m all for it!  This should be done in a way that preserves
compatibility with the existing <static-networking> record as much as
possible.

> 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? 

I’m not sure.  IIUC, a “networking target” here could translate to a
Shepherd service that depends on all the relevant DHCP and static
networking services.  The question the becomes how to express that
grouping conveniently.

Thanks,
Ludo’.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]