Comment 4 for bug 1767849

Revision history for this message
Jari Salo (jari-salo) wrote :

This is still valid if you want to specify the source address for the outgoing traffic. A valid example is to use additional loopback address as the source address for all the outgoing traffic.

man netplan dictates the following:

Routing
       Complex routing is possible with netplan. Standard static routes as well as policy routing using routing tables are supported
       via the networkd backend.

       These options are available for all types of interfaces.

       routes (mapping)
              The routes block defines standard static routes for an interface. At least to and via must be specified.

              For from, to, and via, both IPv4 and IPv6 addresses are recognized, and must be in the form addr/prefixlen or addr.

              from (scalar)
                     Set a source IP address for traffic going through the route.

man systemd.network also has reference to Source= under [ROUTE] section:
Source=
           The source prefix of the route. Possibly followed by a slash and the prefix length. If omitted, a full-length host route
           is assumed.

As the original bug report says netplan is rendering the configuration incorrectly for systemd-networkd backend and should be fixed.