-
-
Notifications
You must be signed in to change notification settings - Fork 82
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
IPv6 default route mising without addrconf in lx zones #1211
Comments
Of note, I stumbled in this mess while trying to re-validate ubuntu in LX now that 22.04 has an image. It's still broken in other 'fun' ways. e.g.
The last known version to work is 16.04
IIRC the warning is because it does some sort of fallback, which we newer ubuntu's do not. |
This warrants the question, is this worth fixing in lx_init if the actual user-space stuff is not going to be happy and have weird unpredictable results depending (on I assume the syscalls it tries). |
If OmniOS doesn't have https://smartos.org/bugview/OS-4683 it is probably also something that should be pulled in. |
We don't, but it's one we definitely should look into. |
FWIW, on SmartOS, we assume that if there's a static IP set, there needs to also be a static gateway defined. |
That would also be acceptable if a 2nd defrouter entry could take an ipv6 one. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Unstale |
For those playing a round at home
You can avoid the ::/0 addresses that confuse things by disabling all dynamic addresses so it just sets the default router, you can then use a static address. Above is a little helper systemd unit that does so, it also mounts all delegated datasets. |
#1210 makes it so multiple IPv4, IPv6 or a mix of them can now be added to an lx zone (yay!)
However in.ndpd does not get started if there is no
addrconf
entry.As bahamat pointed out on IRC, simply starting
in.ndpd
if not the correct solution, well not the whole solution.in.ndpd
does a lot of things, among them:It also does other things, but those are out of scope for this issue.
Sadly, this means we cannot simply start
in.ndpd
if we see an IPv6 address as this will result inin.ndpd
trying to fetch dynamic addresses and the default route. Only the later will work if if noaddrconf
is present for the interface because the vnic protection will not allow in.ndpd to configure the dynamic addresses.This also becomes a mess if multiple nics are involved, as once
in.ndpd
is started it will try to fetch the addresses for all interfaces. e.g. net0 has static ipv4 + static ipv6, net1 has static ipv4 ... will result in dynamic addresses on both net0 and net1 (well it will fail in that example due to the vnic protection).The proper solution is probably also a complex one:
If lx_init sees either a static ipv6 or addrconf entry on any of the configured interfaces for the zone, it needs to generate the ndpd.conf file (not sure where it is even suppose to go in a lx brand zone a quick test did not seem to be in /etc/inet/ndpd.conf where it usually is neither if I prefix that with /native.
The config will probably look something like (config assume net0 and net2 have addrconf address and net1 has a static ipv6)
If in.ndpd is started it with this config it will only try the dynamic addressing on net0 and net2, which should work fine because the vnic protection lists addrconf. It will not try to do so on net1, as we now have ifdefault with off for both.
This would still allow in.ndpd to add the default ipv6 route, on all interfaces include net1.
Some other examples
net0=static ipv4 + static ipv6
net0=dhcp + addrconf, net1=static ipv6
net0=static ipv4, net1=addrconf, net2=static ipv6, net3=saddrconf
A uglier fix would be to just start
in.ndpd
and have it fail to fetch dynamic addresses if the vnic protection does not allow it.After a timeout a
::/0
entry will show up underip a
, at first glance this does not seem to break things, however I would imagine stuff like puppet, salt, ... might not be too happy with this.e.g.
The text was updated successfully, but these errors were encountered: