guix-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug#51440] [PATCH 07/10] services: static-networking: Change interface


From: Julien Lepiller
Subject: [bug#51440] [PATCH 07/10] services: static-networking: Change interface to mimic netlink.
Date: Thu, 28 Oct 2021 03:17:38 +0200

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?

> -@end deffn
> +
> +If you are familiar with the @command{ip} command of the
> +@uref{https://wiki.linuxfoundation.org/networking/iproute2,
> +@code{iproute2} package} found on Linux-based systems, the
> declaration +above is equivalent to typing:
> +
> +@example
> +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.

> +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?

> +@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?

> +@item @code{requirement} (default @code{'()})
> +The list of Shepherd services depended on.
> +@end table
> +@end deftp

The rest of the manual changes look good :)





reply via email to

[Prev in Thread] Current Thread [Next in Thread]