GNU bug report logs -
#51440
[PATCH 00/10] Declarative static networking interface
Previous Next
Reported by: Ludovic Courtès <ludo <at> gnu.org>
Date: Wed, 27 Oct 2021 14:00:02 UTC
Severity: normal
Tags: patch
Done: Ludovic Courtès <ludo <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
Hi!
Julien Lepiller <julien <at> lepiller.eu> skribis:
> A few comments on the documentation below.
>
> Le Wed, 27 Oct 2021 16:02:42 +0200,
> Ludovic Courtès <ludo <at> 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’.
This bug report was last modified 3 years and 154 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.