unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Advanced network configuration
@ 2022-10-03 18:23 Alexey Abramov
  2022-10-03 19:28 ` Ryan Sundberg
  2022-10-05 10:34 ` Ludovic Courtès
  0 siblings, 2 replies; 11+ messages in thread
From: Alexey Abramov @ 2022-10-03 18:23 UTC (permalink / raw)
  To: guix-devel

Hi Guix,

I have a couple of questions regarding our current network configuration
in Guix. With the latest changes to the static configuration, live is
indeed, became easier, but I have to say that it is still insufficient
to define a complete network configuration.

Please check out the following (my) use cases:

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.

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.

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:

--8<---------------cut here---------------start------------->8---
network:
  bonds:
    bond0:
      interfaces:
        - eno0
        - eno1
      parameters:
        mode: 802.3ad
    bond2:
      interfaces:
        - enp0
        - enp1
      parameters:
        mode: 802.3ad
  ethernets:
    eno0:
      match:
        macaddress: xx:xx:xx:xx:xx:xx
      set-name: eno0
    eno1:
      match:
        macaddress: xx:xx:xx:xx:xx:xx
      set-name: eno1
    eno2:
      match:
        macaddress: xx:xx:xx:xx:xx:xx
      set-name: eno2
    eno3:
      match:
        macaddress: xx:xx:xx:xx:xx:xx
      set-name: eno3
    enp0:
      match:
        macaddress: xx:xx:xx:xx:xx:xx
      set-name: enp0
    enp1:
      match:
        macaddress: xx:xx:xx:xx:xx:xx
      set-name: enp1
  renderer: networkd
  version: 2
  vlans:
    bond1.1055:
      addresses:
        - 10.0.0.1/24
      routes:
        - to: XX.XX.XX.XX/21
          via: 10.x.x.x
      gateway4: 10.0.0.1
      id: 1055
      link: bond1
    bond2.2055:
      addresses:
        - 10.8.0.1/24
      id: 2055
      link: bond2
    bond2.3055:
      addresses:
        - 192.168.0.0/16
      id: 3055
      link: bond2
--8<---------------cut here---------------end--------------->8---

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?

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? 

Footnotes:
[1]  https://issues.guix.gnu.org/58223

[2]  https://netplan.io/reference

-- 
Alexey


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2022-10-13 14:51 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-03 18:23 Advanced network configuration Alexey Abramov
2022-10-03 19:28 ` Ryan Sundberg
2022-10-04  8:21   ` Alexey Abramov
2022-10-05 10:34 ` Ludovic Courtès
2022-10-06 13:11   ` Alexey Abramov
2022-10-06 14:07     ` Julien Lepiller
2022-10-08 17:01       ` Alexey Abramov
2022-10-10 15:17     ` Ludovic Courtès
2022-10-10 16:03       ` Julien Lepiller
2022-10-11  7:57       ` Alexey Abramov
2022-10-13 14:49         ` Ludovic Courtès

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

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