User-defined routing tables not created for loopback interface

Bug #1917552 reported by Nicholas Schell
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
netplan.io (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Ubuntu: 20.04.2 LTS
netplan.io: 0.101-0ubuntu3~20.04.2

Attempting to use the following config:

network:
    version: 2
    ethernets:
        loop0:
            match:
                name: lo
            routes:
                - to: 0.0.0.0/0
                  via: 127.0.0.1
                  table: 99
            routing-policy:
                - to: 0.0.0.0/0
                  mark: 7
                  table: 99

Will create the rule, but not table 99.

root@ubuntu-focal:~# ip rule list
0: from all lookup local
0: from all fwmark 0x7 lookup 99
32766: from all lookup main
32767: from all lookup default

root@ubuntu-focal:~# ip route show table 99
--- no output ----

However using the same config on Ubuntu 18.04 is working.
Ubuntu: 18.04.5 LTS
netplan.io: 0.99-0ubuntu3~18.04.4

root@ubuntu-bionic:~# ip route show table 99
default via 127.0.0.1 dev lo proto static

The generated configs in /run/systemd/network/ is the same on both systems.

root@ubuntu-focal:~# cat /run/systemd/network/10-netplan-loop0.network
[Match]
Name=lo

[Network]
LinkLocalAddressing=ipv6

[Route]
Destination=0.0.0.0/0
Gateway=127.0.0.1
Table=99

[RoutingPolicyRule]
To=0.0.0.0/0
Table=99
FirewallMark=7

This seems very similar to this report: https://bugs.launchpad.net/ubuntu/+source/netplan.io/+bug/1830641
Except that my config is working on Ubuntu 18.04, and I'm not dealing with any DHCP related routes since this is the loopback interface. Is there a new configure option or something I'm missing from a change in Ubuntu 20.04? Or some change to networkd possibly?

Revision history for this message
Nicholas Schell (nschell) wrote :

Also tried downgrading to the earliest package available in Ubuntu 20.04 (netplan.io: 0.99-0ubuntu1) with no change.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in netplan.io (Ubuntu):
status: New → Confirmed
Revision history for this message
Stephen Fletcher (mridion) wrote :

Tried applying routing policy example from man file in Ubuntu 20.04 for a physical interface and have the same issue where the "ip route list <#>" shows nothing.

Revision history for this message
Stephen Fletcher (mridion) wrote :

I should note that the man example for "routing-policy" is using "NetworkManager" as the renderer but I am using the Ubuntu Server default "networkd" as the renderer. Not sure if "routing-policy" is simply not supported yet with using networkd as the renderer. Either way I get the same issue as the OP

Revision history for this message
Stephen Fletcher (mridion) wrote :

Doesn't seem to apply to my situation so removing myself from affected list.

Revision history for this message
Nicholas Schell (nschell) wrote :

What would be the most appropriate place to report the problem for networkd?
The launchpad seems completely dead: https://bugs.launchpad.net/ubuntu/+source/networkd-dispatcher

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.