I'm trying to declare a static ipv6 route on the link using netplan (more precisely I'm trying to setup a default gateway whose address is not on my interface subnet)

Basically what I'm trying to do via netplan is:

ip -6 a a fd00::1/64 dev eno4
ip -6 r a fd00:1::2/128 dev eno4

Os: Ubuntu 18.04

Netplan version: 0.36.3

The following solution does not work:

           - fd00::1/64
           -   to: fd00:1::2/128
               via: fd00:1::2
               on-link: true


netplan --debug apply 
journalctl -u systemd-networkd
eno4: Could not set route: No route to host

and the route does not show up when listing them

I also tried replacing the on-link:true by scope:link with no more results (not sure what the difference between both is)

I know this question is almost a dupplicate of this one

How can I add a route that is "on the link", directly connected to the interface even if the IPs are not the same?

However I found that the accepted answer does not work for me even for ipv4, unless I replace the 'scope: link' with 'on-link: true'

So questions:

  • Has anyone managed to make scoped link routes work with netplan + ipv6 ? If so what's wrong in the example above ?

  • Can someone explain what the difference is between scope:link and on-link:true ?

  • Why is a 'via' attribute mandatory for an onlink route ?



It's possible you are being affected by a known bug in the Ubuntu 18.04 version of systemd-networkd, for which a fix is in progress. https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1812760

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.