[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Advanced network configuration
From: |
Alexey Abramov |
Subject: |
Advanced network configuration |
Date: |
Mon, 03 Oct 2022 20:23:11 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.1 (gnu/linux) |
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
- Advanced network configuration,
Alexey Abramov <=
- Re: Advanced network configuration, Ryan Sundberg, 2022/10/03
- Re: Advanced network configuration, Ludovic Courtès, 2022/10/05
- Re: Advanced network configuration, Alexey Abramov, 2022/10/06
- Re: Advanced network configuration, Ludovic Courtès, 2022/10/10
- Re: Advanced network configuration, Julien Lepiller, 2022/10/10
- Re: Advanced network configuration, Alexey Abramov, 2022/10/11
- Re: Advanced network configuration, Ludovic Courtès, 2022/10/13