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:
eno4:
addresses:
- fd00::1/64
routes:
- to: fd00:1::2/128
via: fd00:1::2
on-link: true
then
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
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 ?
Regards