New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
(Possibly undocumented?) systemd-networkd reverse route ordering #5430
Comments
No I can't reproduce this issue . Is there more information you can provide ? cat 20-en1.network
|
I have the very same problem here.
The scope route is properly created but the gateway route fails. If I tri to add it afterward using the ip command, it works fine. |
Your test case is not valid. The gateway MUST NOT be on a network directly reachable. That's why a scope route must be created before adding the gateway route. Try to 192.168.101.1 for your gateway address, and it should fail. |
You missed 'GatewayOnlink' which is specific usecase for this
cat eth0.network
|
Then, maybe this is an IPv6 only issue, because I'm doing this on an IPv6 link and adding GatewayOnLink does not solve the issue:
If I change the route declaration order, and remove the GatewayOnLink, it works. |
I last looked into this a couple of years ago, so I don't know if it's still the case that routes are created in reverse order. If so, it should probably be documented somewhere! |
Fix is waiting in #10930. |
I noticed that the issue cannot reproducible, that is, the tests added in #10930 can pass without yuwata@0862cc6. Let's close this. |
Does it works with IPv6 too ? I still don't managed to get it working, even with GatewayOnLink |
Uh, I am not sure. I will test that. Thank you for reminding me that. |
@Jean-Daniel could you paste the similar conf that can be reproducible. |
My config looks like this:
Note that if I declare the Gateway route (without GatewayOnlink) before declaring the network route, it works. |
could you try with #10938 |
we missing a default route. Add gateway first. This fixes systemd#5430
we missing a default route. Add gateway first. This fixes systemd#5430
We missing a default route. Add gateway first. This fixes systemd#5430
We missing a default route. Add gateway first. This fixes #5430
We missing a default route. Add gateway first. This fixes systemd/systemd#5430 (cherry picked from commit 0d34228)
TL;DR - Routes defined in a networkd .network file seems to be applied in reverse-order, leading to errors relating to dependent routes.
Submission type
systemd version the issue has been seen with
231 (also 219, so not a regression)
Used distribution
Fedora Server 25 (w/ systemd-231-10.fc25)
In case of bug report: Expected behaviour you didn't see
Gateway configured in a .network file should appear in the routing table.
In case of bug report: Unexpected behaviour you saw
The journal shows the errors similar to
In case of bug report: Steps to reproduce the problem
Optional - Flush the routing table for a clean slate
Create a network configuration file with static routes that have dependencies between them - in my case this is the bare minimum configuration that errors (IPs partially redacted);
Restart systemd-networkd
See that the routing table contains only the route defined by the
Address
and the first static route.The journal will show the error -
ens192: Could not set route: Network is unreachable
.Executed sequentially, the routes are valid. I can't find anything in the networkd docs to suggest any kind of ordering for route configuration.
The error does not seem to occur when the order of the two
[Route]
sections are swapped, which seems counterintuitive.Is this intended functionality, but undocumented?
The text was updated successfully, but these errors were encountered: