netplan does not support defining route with scope 'link'

Bug #1747455 reported by Jean-Daniel Dupas on 2018-02-05
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
netplan
Undecided
Unassigned
netplan.io (Ubuntu)
Undecided
Unassigned
Bionic
Undecided
Unassigned

Bug Description

[Impact]
netplan.io users who define custom routes

[Test case]
1) Configure netplan.
2) Add a route:
  [...]
  routes:
    - to: 10.10.10.0/24
      scope: link

3) Validate that the route is correctly added to the routing table (using 'sudo ip route').

[Regression Potential]
Adding a feature to allow setting scope for routes or other route parameters lead to additional complexity in the configuration for the routes. As such the additional setting may confuse systemd-networkd if set incorrectly in attempting to add routes that would be invalid or useless. Any issues with adding routes (as evidenced in logs from systemd-networkd) should be investigated as possible regressions caused by the addition of the 'scope' parameter.

---

I have an hosted server and for some reason, I only have a single global ipv6 with prefix /128.

To be able to reach the world using IPv6, I have to declare a route to the router, and then the default route:

In traditionnal ifupdown, this is done using the following lines:

post-up /sbin/ip -family inet6 route add 2001:41d0:8:8fff:ff:ff:ff:ff dev eth0
post-up /sbin/ip -family inet6 route add default via 2001:41d0:8:8fff:ff:ff:ff:ff

I think that in networkd it should be declare as:

[Route]
Destination=2001:41d0:8:8fff:ff:ff:ff:ff
Scope=link

[Route]
Gateway=192.168.0.1

Actually, I don't find anyway to express such route in netplan. I can easily define the gateway route setting 0.0.0.0 as 'to', but it look like there is currently now way to define the "link" scoped route.

netplan "route" should support a scope attribute that match networkd Scope attribute.

description: updated
description: updated
Changed in netplan:
status: New → Fix Committed
Changed in netplan.io (Ubuntu):
status: New → In Progress
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package netplan.io - 0.40

---------------
netplan.io (0.40) cosmic; urgency=medium

  * New upstream release:
    - networkd: route source is PreferredSource= not From=
    - Improve NetworkManager error reporting on unrenderable routes.
    - Don't render ipv4 dns-search unless we have an ipv4 address.
      (LP: #1786726)
    - Set permissive umask on networkd .network, .link and .netdev files
      (LP: #1736965, LP: #1768560)
    - Fix support for link-scope routes. (LP: #1747455)
    - Update man pages for deletion of replug code.
    - Spell Gratuitous ARP correctly and make it work. (LP: #1756701)
    - Many typo fixes for documentation. (LP: #1783940)
    - Various build system fixes.
    - Fix integration tests:
      - iproute2 output changes for link-scope routes
      - fix stability of networkd igmp-resend test
      - fix manual_addresses test now that networkd lists ~. domain
    - Deduplicate code for parsing interface options
    - Add support for optional-addresses.

 -- Mathieu Trudel-Lapierre <email address hidden> Thu, 13 Sep 2018 17:29:41 -0400

Changed in netplan.io (Ubuntu):
status: In Progress → Fix Released
description: updated
Changed in netplan:
status: Fix Committed → Fix Released

Hello Jean-Daniel, or anyone else affected,

Accepted netplan.io into bionic-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/netplan.io/0.40~18.04.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested and change the tag from verification-needed-bionic to verification-done-bionic. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-bionic. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in netplan.io (Ubuntu Bionic):
status: New → Fix Committed
tags: added: verification-needed verification-needed-bionic
Łukasz Zemczak (sil2100) wrote :

Hello Jean-Daniel, or anyone else affected,

Accepted netplan.io into bionic-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/netplan.io/0.40.1~18.04.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested and change the tag from verification-needed-bionic to verification-done-bionic. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-bionic. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

ubuntu@new-man:~$ dpkg -l netplan.io | grep ii
ii netplan.io 0.40.1~18.04.1 amd64 YAML network configuration abstraction for various backends

Marking verification-done:

I have set a dummy route 9.9.9.0/24, with link scope, in netplan YAML. The route gets correctly installed by systemd-networkd:

ubuntu@new-man:~$ sudo vi /etc/netplan/50-cloud-init.yaml
ubuntu@new-man:~$ ip route
default via 10.3.16.1 dev ens6 proto static
10.3.16.0/20 dev ens6 proto kernel scope link src 10.3.21.28
ubuntu@new-man:~$ sudo netplan apply
ubuntu@new-man:~$ ip route
default via 10.3.16.1 dev ens6 proto static
9.9.9.0/24 dev ens6 proto static scope link
10.3.16.0/20 dev ens6 proto kernel scope link src 10.3.21.28

tags: added: verification-done-bionic
removed: verification-needed verification-needed-bionic
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers