Bug 88863

Summary: systemd-networkd: Route configuration: defining source-ip doesn't work
Product: systemd Reporter: bugs.freedesktop.org
Component: generalAssignee: Tom Gundersen <teg>
Status: RESOLVED FIXED QA Contact: systemd-bugs
Severity: normal    
Priority: medium CC: timo
Version: unspecified   
Hardware: All   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:

Description bugs.freedesktop.org 2015-01-29 09:11:04 UTC
I have a machine that has multiple outgoing IP -addresses (one of which is a Keepalived VIP) and I want to force outgoing traffic to use a certain IP. This is what I thought would be the best solution:

[Match]
Name=eth0

[Network]
DNS=xxx
DNS=xxx
Address=a.b.c.d/24
Address=a:b:c/64
Gateway=a:b

[Route]
Destination=0.0.0.0/0
Gateway=a.b.c.d
Source=a.b.c.d/32

However; it doesn't work. `ip route` still shows "default via a.b.c.d dev eth0" without a source IP. If I manually execute `ip route add default via a.b.c.d dev eth0 proto static ` it works fine

How can I modify the default route in a .network file?
Comment 1 bugs.freedesktop.org 2015-02-19 08:21:53 UTC
Is there anything you need from me to help? Is there a workaround I should be using, or is this simply not supported?
Comment 2 Timo R. 2015-05-29 19:35:21 UTC
I'm also affected by this, has this ever been fixed in some systemd version?
Comment 3 Lennart Poettering 2019-03-19 12:26:58 UTC
I am pretty sure this has been fixed in current systemd versions. If this is reproducible on the two most current systemd versions (240 or 241) please file a new issue on systemd github. Thank you.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.