[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#51440] [PATCH 00/10] Declarative static networking interface
From: |
Ludovic Courtès |
Subject: |
[bug#51440] [PATCH 00/10] Declarative static networking interface |
Date: |
Fri, 29 Oct 2021 23:43:02 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) |
Hi!
Julien Lepiller <julien@lepiller.eu> skribis:
> A few comments on the documentation below.
>
> Le Wed, 27 Oct 2021 16:02:42 +0200,
> Ludovic Courtès <ludo@gnu.org> a écrit :
>
>> @lisp
>> -(static-networking-service "eno1" "192.168.1.82"
>> - #:gateway "192.168.1.2"
>> - #:name-servers '("192.168.1.2"))
>> +;; Network configuration for one NIC, IPv4 + IPv6.
>> +(static-networking
>> + (addresses (list (network-address
>> + (device "eno1")
>> + (value "10.0.2.15/24"))
>> + (network-address
>> + (device "eno1")
>> + (value "2001:123:4567:101::1"))))
>> + (routes (list (network-route
>> + (destination "default")
>> + (gateway "10.0.2.2"))
>> + (network-route
>> + (destination "default")
>> + (gateway "2020:321:4567:42::1"))))
>> + (name-servers '("10.0.2.3")))
>> @end lisp
>
> I don't know if you tested that, but I think this is not routable
> because the IPv6 network doesn't have a netmask, so I think it defaults
> to a /128 (one IP in the network), so the router is not on the local
> network. Many ISPs provide a /64 (when the provide IPv6), so maybe use
> that as the netmask?
No I didn’t test it, so yes: let’s add /64 above.
>> +ip address add 10.0.2.15/24 dev eno1
>> +ip address add 2001:123:4567:101::1 dev eno1
>> +ip route add default via inet 10.0.2.2
>> +ip route add default via inet6 2020:321:4567:42::1
>> +@end example
>
> And so, change it here too.
Yes.
>> +Run @command{man 8 ip} for more info. Venerable GNU/Linux users will
>> +certainly know how to do it with @command{ifconfig} and
>> @command{route}, +but we'll spare you that.
>> +
>> +The available fields of this data type are as follows:
>> +
>> +@table @asis
>> +@item @code{addresses}
>> +@itemx @code{links} (default: @code{'()})
>> +@itemx @code{links} (default: @code{'()})
>
> One of them should be routes, right?
Oops, yes.
>> +@item @code{provision} (default: @code{#f})
>> +If true, this should be a list of symbols for the Shepherd service
>> +corresponding to this network configuration. When @code{#f},
>> +@code{'(networking)} or @code{'(loopback)} is used.
>
> Under which conditions is it 'loopback instead of 'networking?
Hmm that part is wrong: #f is equivalent to (networking) in practice.
I’ll fix that.
> The rest of the manual changes look good :)
You mentioned on IRC veth pairs as an example use of links. Could you
formalize it for inclusion as an example?
Thanks for the careful review!
Ludo’.
- [bug#51440] [PATCH 00/10] Declarative static networking interface, Ludovic Courtès, 2021/10/27
- [bug#51440] [PATCH 03/10] doc: Add new "Networking Setup" node for the main setup options., Ludovic Courtès, 2021/10/27
- [bug#51440] [PATCH 08/10] services: Define '%qemu-static-networking'., Ludovic Courtès, 2021/10/27
- [bug#51440] [PATCH 09/10] services: Define '%loopback-static-networking'., Ludovic Courtès, 2021/10/27
- [bug#51440] [PATCH 02/10] tests: openvswitch: Check whether ovs0 is up., Ludovic Courtès, 2021/10/27
- [bug#51440] [PATCH 05/10] services: static-networking: Use Guile-Netlink on GNU/Linux., Ludovic Courtès, 2021/10/27
- [bug#51440] [PATCH 10/10] tests: Replace uses of deprecated 'static-networking-service'., Ludovic Courtès, 2021/10/27
[bug#51440] [PATCH 00/10] Declarative static networking interface, Julien Lepiller, 2021/10/27