Skip to content
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

When NixOS boots, the default gateway route is missing #242

Open
slashfast opened this issue Jun 21, 2024 · 3 comments
Open

When NixOS boots, the default gateway route is missing #242

slashfast opened this issue Jun 21, 2024 · 3 comments

Comments

@slashfast
Copy link

My VPS provider's default gateway is on a different subnet and is resolved locally (onlink). I don't know much about computer networks and spent a day trying to solve the problem and today I tried to add this route:

ip route add default via 10.0.0.1 dev ens3 onlink

After that the VPS was able to accept connections. It seems like your script should save all network settings, but in this case the route is not saved and after kexec the server is no longer available on the Internet.

@slashfast slashfast changed the title When NixOS boots, the default gateway route that is resolved locally (onlink) is missing When NixOS boots, the default gateway route that is resolved locally is missing Jun 21, 2024
@slashfast slashfast changed the title When NixOS boots, the default gateway route that is resolved locally is missing When NixOS boots, the default gateway route is missing Jun 21, 2024
@Mic92
Copy link
Member

Mic92 commented Jul 13, 2024

From your now installed machine can you run the following commands?

ip --json addr > addrs.json
ip -4 --json route > routes-v4.json
ip -6 --json route > routes-v6.json

And share the resulting files?

@slashfast
Copy link
Author

No problem @Mic92

addrs.json
routes-v4.json
routes-v6.json

From your now installed machine can you run the following commands?

ip --json addr > addrs.json
ip -4 --json route > routes-v4.json
ip -6 --json route > routes-v6.json

And share the resulting files?

@Mic92
Copy link
Member

Mic92 commented Sep 3, 2024

There is now a script to list what networkd profiles are generated by our image:

https://github.com/nix-community/nixos-images/blob/main/nix/kexec-installer/local-network-restore-test.sh

It is designed to run locally without using kexec.

This should help to find the correct networkd configuration by tuning the python script.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants