[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Adding a network interface
From: |
Ricardo Wurmus |
Subject: |
Re: Adding a network interface |
Date: |
Mon, 25 Sep 2017 16:39:31 +0200 |
User-agent: |
mu4e 0.9.18; emacs 25.3.1 |
Hi Konrad,
> My virtual machine has two network interfaces, one for connections to
> the outside world and one for connections to/from the host (that's how
> VirtualBox works). The first one gets configured automatically via DHCP,
> presumably via (dhcp-client-service). The second one must be configured
> statically. After some exploration, I added
>
> (static-networking-service "enp0s8" ...)
>
> to the list of services. No chance:
>
> service "networking" provided more than once
>
> That must be because "lo" is already configured in %base-services. But
> the documentation explicitly says that I can call
> static-networking-service multiple times for multiple interfaces!
This works for me. I have configured berlin.guixsd.org with two network
interfaces by simply providing static-networking-service twice. I’m not
removing any services from %base-services:
(services (cons* …
(static-networking-service "enp6s4f0"
"141.80.181.40"
#:netmask "255.255.255.0"
#:gateway "141.80.181.1")
(static-networking-service "enp0s8"
"192.168.0.1"
#:netmask "255.255.255.0")
…
%base-services))
--
Ricardo
GPG: BCA6 89B6 3655 3801 C3C6 2150 197A 5888 235F ACAC
https://elephly.net