[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: static-networking-service
From: |
Julien Lepiller |
Subject: |
Re: static-networking-service |
Date: |
Sun, 16 Dec 2018 20:01:58 +0100 |
User-agent: |
K-9 Mail for Android |
I use it like that: (service iproute2-service-type #t)
You can see my complete configuration on
https://lepiller.eu/ma-configuration.html
Le 16 décembre 2018 19:07:15 GMT+01:00, George Clemmer <address@hidden> a écrit
:
>Julien Lepiller <address@hidden> writes:
>
>> static-networking-service is also limited to IPv4. I wanted to
>> configure an
>> IPv6 address, so I quickly wrote a service for this:
>
>> (define (iproute2-shepherd-service config)
>> (list (shepherd-service
>> (documentation "Run the iproute2 network service")
>> (provision '(networking))
>> (requirement '())
>> (start #~(lambda _
>> (let ((ip (string-append #$iproute "/sbin/ip")))
>> (system* ip "a" "add" "89.234.186.109/32"
>"dev"
>> "ens18")
>> (system* ip "l" "set" "ens18" "up")
>> (system* ip "-6" "a" "add"
>> "2a00:5884:8208::1/48" "dev" "ens18")
>> (system* ip "r" "add" "89.234.186.1" "dev"
>> "ens18")
>> (system* ip "r" "add" "default" "via"
>> "89.234.186.1" "dev" "ens18")
>> (system* ip "-6" "r" "add" "default" "via"
>> "fe80::204:92:100:1" "dev" "ens18"))))
>> (stop #~(lambda _
>> (display "Cannot stop iproute2 service.\n"))))))
>
>Hi Julien,
>
>Are you actually using this? Does it simply
>(static-networking-service)?
>
>TIA - George