Which then systemd-networkd does complain about a From= in a [Routes] section which isn't supported.
However, I believe you want to use the 'routing-policy' to set the From value for a particular route.
Please confirm if using routing-policy allows you to get the configuration you need. If the configuration can't be achieved with the policy, please include your netplan config as you have it now and an ip route show all to help indicate which route you need to add.
Netplan shouldn't render From= in the [Routes] section for sure.
Hello,
Thank you for reporting this issue and helping make Ubuntu better.
Can you include which Ubuntu release, systemd and netplan package version you were using?
I don't believe there is support in netplan 'routes' for a 'from' field, though I see that it does accept the value
network: policy:
version: 2
renderer: networkd
ethernets:
eth0:
addresses:
- 192.168.3.30/24
dhcp4: no
routes:
- to: 192.168.3.0/24
via: 192.168.3.1
table: 101
from: 10.0.0.1
routing-
- from: 192.168.3.0/24
table: 101
Generates:
root@b1: /run/systemd/ network# cat 10-netplan- eth0.network
[Match]
Name=eth0
[Network] 192.168. 3.30/24
Address=
[Route] 192.168. 3.0/24
Destination=
Gateway=192.168.3.1
From=10.0.0.1
Table=101
[RoutingPolicyRule]
From=192.168.3.0/24
Table=101
Which then systemd-networkd does complain about a From= in a [Routes] section which isn't supported.
However, I believe you want to use the 'routing-policy' to set the From value for a particular route.
Please confirm if using routing-policy allows you to get the configuration you need. If the configuration can't be achieved with the policy, please include your netplan config as you have it now and an ip route show all to help indicate which route you need to add.
Netplan shouldn't render From= in the [Routes] section for sure.