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
add simple static route support #496
Comments
Yes, it would be great if the value of this AVP could just be passed to the "ip route" command. For IPv6 too :-) Thanks very much. |
+1 |
you do realize that most Linux distributions will flush any route that's present at container boot time right? |
Shouldn't it then flush 'away' the default gw as well - set via 'lxc.network.ipv4.gateway'? |
Yeah, it would. If your distro doesn't flush a pre-configured IP or default gateway, then this feature would work. |
Which distros do flush away |
ifupdown on Debian/Ubuntu used to either flush the routing table at boot or just completely fail when then attempting to add routing entries which are already present (causing boot to hang). |
I wonder. I am using that with debian jessie host and jessie containers and it works for me well. Is there any specific setup that is causing it? |
Could be that ifupdown isn't flushing routes anymore (pretty sure NetworkManager still does), so the only problem you'd run into is if you had a conflicting route being applied with ifupdown. |
That's not a feature we're likely to introduce for the aforementioned reasons by @stgraber. |
I'm quite sure that the at least in case of debian, ubuntu, fedora and archlinux (installed with the A setting like Also @stgraber I thought that the entire point of Sorry for commenting on such an old thread, but I was just going to ask you whether it would be possible to implement this when I found this issue, so I decided to comment here instead of opening a new one. |
Assuming this will not get implemented: what's the recommended way to add static routes to interfaces that are otherwise completely declared in the container's config? |
@fyl2xp1 currently I'm doing it like this:
where
It's a bit hacky, but it works. |
Thanks, I added to my
This seems to work reliably but still feels odd because all other adapters as missing from that list and the rest of the interface's configuration resides in an external configuration. |
Anything new on this? |
In addition to existing lxc.network.ipv4 and lxc.network.ipv4.gateway would be great to be able to specify static routes inside the container config:
lxc.network.ipv4.route = 192.168.1.4/10.2.3.9
which would add inside the container:
ip route add 192.168.1.4 via 10.2.3.9
Instead of / we could use word via or whatever syntax is more convenient to parse.
The text was updated successfully, but these errors were encountered: