unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
* Setting up multiple NICs
@ 2023-11-23  9:11 Lars Rustand
  2023-11-24  3:08 ` Oleg Pykhalov
  2023-11-29 17:33 ` Felix Lechner via
  0 siblings, 2 replies; 12+ messages in thread
From: Lars Rustand @ 2023-11-23  9:11 UTC (permalink / raw)
  To: help-guix

[-- Attachment #1: Type: text/plain, Size: 948 bytes --]

Hello!

I'm trying to set up Guix on my "router", but I'm not able to get my networking
setup to work. What I need is one upstream NIC, and one downstream NIC which is
split into multiple VLANs.

I've tried to different approaches:

1. Have everything inside of one `static-networking` form.
2. Have one `static-networking` form for each VLAN.

If I specify multiple `static-networking` forms I get the error "guix system:
error: service 'networking' provided more than once".

If I instead put them all in the same `static-networking` form, at least the
system happily reconfigures, but I instead get failures of the networking
service.

I found one example of a more advanced networking config in the devel version of
the manual, but this one does not show multiple VLANs, but it does show multiple
links in the same `static-networking` to build a bond interface.

So, what is the correct way to setup a multi NIC networking with multiple VLANs?

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]

^ permalink raw reply	[flat|nested] 12+ messages in thread
* Re: Setting up multiple NICs
@ 2023-11-29  6:26 Lars Rustand
  2023-11-29  7:39 ` Oleg Pykhalov
  2023-12-07 20:22 ` Lars Rustand
  0 siblings, 2 replies; 12+ messages in thread
From: Lars Rustand @ 2023-11-29  6:26 UTC (permalink / raw)
  To: help-guix

[-- Attachment #1: Type: text/plain, Size: 4058 bytes --]

On 23/11/24 06:08AM, Oleg Pykhalov wrote:
> Hello,
> 
> Could you show the configuration, please?

Sure, this is what I have at the moment:

     (service static-networking-service-type
              (list (static-networking
                     (links
                      (list (network-link
                             (name "dmz")
                             (type 'vlan)
                             (arguments '((id . 3)
                                          (link . "enp4s0f1"))))
                            (network-link
                             (name "home")
                             (type 'vlan)
                             (arguments '((id . 4)
                                          (link . "enp4s0f1"))))
                            (network-link
                             (name "iot")
                             (type 'vlan)
                             (arguments '((id . 5)
                                          (link . "enp4s0f1"))))
                            (network-link
                             (name "server")
                             (type 'vlan)
                             (arguments '((id . 6)
                                          (link . "enp4s0f1"))))
                            (network-link
                             (name "management")
                             (type 'vlan)
                             (arguments '((id . 2)
                                          (link . "enp4s0f1"))))))
                     (addresses
                      (list (network-address
                             (device "enp2s0")
                             (value "192.168.10.2/24"))
                            (network-address
                             (device "dmz@enp4s0f1")
                             (value "10.0.3.1/24"))
                            (network-address
                             (device "home@enp4s0f1")
                             (value "10.0.4.1/24"))
                            (network-address
                             (device "iot@enp4s0f1")
                             (value "10.0.5.1/24"))
                            (network-address
                             (device "server@enp4s0f1")
                             (value "10.0.6.1/24"))
                            (network-address
                             (device "management@enp4s0f1")
                             (value "192.168.0.2/24")))))))


> Also, a list of the networking
> devices with ‘ip -one link’ and ‘ip -one address’ command would be
> helpful for cathing an error.

lars@router ~$ ip -one link
1: lo: <LOOPBACK,MULTICAST,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000\    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: enp2s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP mode DEFAULT group default qlen 1000\    link/ether 00:1d:60:cb:15:5b brd ff:ff:ff:ff:ff:ff
3: enp4s0f0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000\    link/ether 28:80:23:a3:0f:80 brd ff:ff:ff:ff:ff:ff
4: enp4s0f1: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000\    link/ether 28:80:23:a3:0f:81 brd ff:ff:ff:ff:ff:ff
5: enp4s0f2: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000\    link/ether 28:80:23:a3:0f:82 brd ff:ff:ff:ff:ff:ff
6: enp4s0f3: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000\    link/ether 28:80:23:a3:0f:83 brd ff:ff:ff:ff:ff:ff
lars@router ~$ ip -one address
1: lo    inet 127.0.0.1/8 scope global lo\       valid_lft forever preferred_lft forever
1: lo    inet6 ::1/128 scope host \       valid_lft forever preferred_lft forever
2: enp2s0    inet 192.168.10.2/24 scope global enp2s0\       valid_lft forever preferred_lft forever
2: enp2s0    inet6 fe80::21d:60ff:fecb:155b/64 scope link \       valid_lft forever preferred_lft forever


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]

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

end of thread, other threads:[~2023-12-07 20:28 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-11-23  9:11 Setting up multiple NICs Lars Rustand
2023-11-24  3:08 ` Oleg Pykhalov
2023-11-29 17:33 ` Felix Lechner via
  -- strict thread matches above, loose matches on Subject: below --
2023-11-29  6:26 Lars Rustand
2023-11-29  7:39 ` Oleg Pykhalov
2023-11-29  8:38   ` Lars Rustand
2023-12-02 23:34     ` rustand.lars
2023-12-03  2:49       ` Felix Lechner via
2023-12-03  4:43         ` Wojtek Kosior via
2023-12-07  7:50           ` rustand.lars
2023-12-07 16:56             ` Felix Lechner via
2023-12-07 20:22 ` Lars Rustand

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