Bug 86947 - systemd-networkd: support adding routes without additional addresses & support link-local addresses
Summary: systemd-networkd: support adding routes without additional addresses & suppor...
Alias: None
Product: systemd
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
Hardware: All Linux (All)
: medium normal
Assignee: Tom Gundersen
QA Contact: systemd-bugs
Depends on:
Reported: 2014-12-03 01:04 UTC by Shaun Keenan
Modified: 2019-08-19 13:59 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Note You need to log in before you can comment on or make changes to this bug.
Description Shaun Keenan 2014-12-03 01:04:49 UTC
1) why can't we add new routes without having to add a new address to the interface?:

2) ability to specify link-local addresses would be very useful.

Use case: if/when link-local addresses aren't correctly being detected with DHCP turned on, I need to be able to either add a static route to on a given interface, or add a link-local address to the interface manually.
Comment 1 Tom Gundersen 2014-12-09 08:35:50 UTC
1) I'm not following. Could you paste the .network file (or equivalent ip(8) script) you would like to use, but which does not work? The code you link to is only about the auto-discovered link-local addresses, where you always will have both a route and an address...

2) Hm, not quite following this either. How do you want to specify link-local addresses? There is no restriction stopping you from using Address=169.254.<...>, but I guess this is not what you want. What do you mean by 'link-local addresses aren't correctly detected'? There is no way IPv4LL assignment can fail (unless there is a bug), but, again, I suppose you have something else in mind? Is the IPv4LLRoute= option related to this?
Comment 2 Shaun Keenan 2014-12-09 19:12:10 UTC
1) here's the end goal I'm trying to get:
core@coreos ~ $ netstat -rn
Kernel IP routing table
Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface         UG        0 0          0 eth0   U         0 0          0 eth0 UH        0 0          0 eth0 UH        0 0          0 eth0     U         0 0          0 flannel0   U         0 0          0 docker0

core@coreos ~ $ ip addr show dev eth0
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
    link/ether fa:16:3e:9a:a6:10 brd ff:ff:ff:ff:ff:ff
    inet brd scope global dynamic eth0
       valid_lft 1405sec preferred_lft 1405sec
    inet6 fe80::f816:3eff:fe9a:a610/64 scope link 
       valid_lft forever preferred_lft forever

note that there's no ip on the interface.  On a side note, I don't care all that much about whether or not there's an IP on the int...  but the issue is that systemd doesn't automatically discover link-local addresses, and adding IPv4LL=true doesn't change the fact that I don't get a link-local addy on the interface.

Here's how I was trying to add it:
  - path: /etc/systemd/network/00-eth0.network
    owner: root:root
    permissions: 0644
    content: |

I tried a few different versions of this.  no matter what I do, link-local addresses never show up unless I statically configure the IP.

2) see #1 - IPv4LL assignment is failing both with and without the IPv4LLRoute=true attribute turned on.
Note that this is with the latest coreos alpha, which is on 216 I believe.
Comment 3 Shaun Keenan 2014-12-09 19:55:38 UTC
another little note on this from my conversation with the coreos devs - see this gist and the comment below it:
Comment 4 Shaun Keenan 2014-12-09 19:56:59 UTC
and, more debugging that I did, including log files and systemd configs that I tried:
Comment 5 Yu Watanabe 2019-08-19 13:59:31 UTC
Please use GatewayOnLink=yes.

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.