From mboxrd@z Thu Jan 1 00:00:00 1970 From: Giovanni Biscuolo Subject: Re: how can I add a static IPv4 route? Date: Thu, 13 Feb 2020 09:22:46 +0100 Message-ID: <874kvuc2w9.fsf@roquette.mug.biscuolo.net> References: <87blq3brv5.fsf@roquette.mug.biscuolo.net> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:34499) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j29mF-0005jI-Eg for help-guix@gnu.org; Thu, 13 Feb 2020 03:23:16 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j29mE-0002w6-1w for help-guix@gnu.org; Thu, 13 Feb 2020 03:23:15 -0500 Received: from ns13.heimat.it ([46.4.214.66]:55164) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1j29mB-0002qh-18 for help-guix@gnu.org; Thu, 13 Feb 2020 03:23:13 -0500 In-Reply-To: List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-guix-bounces+gcggh-help-guix=m.gmane-mx.org@gnu.org Sender: "Help-Guix" To: Julien Lepiller , help-guix@gnu.org --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi Julien thanks for your support! Julien Lepiller writes: > Le 12 f=C3=A9vrier 2020 13:08:46 GMT-05:00, Giovanni Biscuolo a =C3=A9crit : >>Hello, >> >>I have a very simple networking configuration: >> >>--8<---------------cut here---------------start------------->8--- >>(service dhcp-client-service-type) >>--8<---------------cut here---------------end--------------->8--- >> >>Please how can I add a static route? (I know there is wip-netlink, but >>AFAIU it's still not in master) [...] > However, if you don't need IPv6, I'd like to encourage you to use the > static-networking-service that's described in the manual: > https://guix.gnu.org/manual/devel/en/html_node/Networking-Services.html#N= etworking-Services Thanks for your suggestion but I don't understand how to use it just to add a static route to the interface set up by dhcp-client-service-type. I'm trying to have something similar to this debian interfaces config: =2D-8<---------------cut here---------------start------------->8--- auto eth0 iface eth0 inet dhcp ### static routing for eth0 ### post-up route add -net 10.0.0.0 netmask 255.0.0.0 gw 10.9.38.65 pre-down route del -net 10.0.0.0 netmask 255.0.0.0 gw 10.9.38.65 =2D-8<---------------cut here---------------end--------------->8--- I'd like to stay whith a dhcp client config, but please provide an example on how to add a static route to a configuration like this: =2D-8<---------------cut here---------------start------------->8--- (static-networking-service "eno1" "192.168.1.82" #:gateway "192.168.1.2" #:name-servers '("192.168.1.2")) =2D-8<---------------cut here---------------end--------------->8--- Thanks! Gio' =2D-=20 Giovanni Biscuolo Xelera IT Infrastructures --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEERcxjuFJYydVfNLI5030Op87MORIFAl5FB1YACgkQ030Op87M ORLAKxAAk+wVX7hgswkCwg/pGP3Bw3OaNugn7ZZGTQKY+4Ajv0uYPf5Y47BZVXwb 8p79NxigGH3K+E/NXh9/tAEfN1a/Y4kgfW5JCOwz+eql58+xSVsRHFo+NrHUM+rn 0NAa5so8GULWBNGNhZh65yndZ7SVKfAloYoWi6WujIixtqq/G18AFbHu4ciBbOWt MPuFixMeEJvJIIL4KuLTm4T87DZzhihAC0gybAjSxSN9VNo6cN2vVCPKOeVAlzb1 cej9UTl1+AB3ZDf5+DjOpZalaI/0OzuUS/ECxhunIIa/dHSbVvng91NAeFeAckrI D7yJXUd7tzzSBtBP20S3UbU9vMnq5HBA0zOmUehmWTsQ+nGTXmOqWAV49fKik77b YwcmTISivVffEOJymZPQHNCajiIuOc93Q3LONbo8Bl0SNwdl6hPpWaFYBhoj/vwo xkfwfaqBBsnIoVYCMBk3DrHhYINXPx8vJc3d6gf/xurxUjjyDpfy9jfrLIxaz1cq 3MxoWvOXFKn7h4WLSnyEUK8DfZon6evGRwcSGZc0Johy93RNFEaFeb9gqKNT5kc3 lHRVbeN5fb2Sh2SQNRSK+w8ZFzV37iYOWoJLGX9s1fZt87QKb38FRKdK4JhfRMqt RvBnPbNmtn1QfJLQX9Md3qf+lReqrDnZb19GHhRS1oACIZQWhrk= =WAFM -----END PGP SIGNATURE----- --=-=-=--