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

Support more network interface types in systemd-initrd #251388

Open
2 of 7 tasks
Majiir opened this issue Aug 25, 2023 · 4 comments
Open
2 of 7 tasks

Support more network interface types in systemd-initrd #251388

Majiir opened this issue Aug 25, 2023 · 4 comments

Comments

@Majiir
Copy link
Contributor

Majiir commented Aug 25, 2023

{
  boot.initrd.systemd.enable = true;
  boot.initrd.network.enable = true;
}

With systemd-initrd and initrd networking enabled, we can use networking.interfaces to automatically configure interfaces in stage 1. Some network configuration that we support in a fully booted system is not supported in stage 1, however:

  • networking.bridges (#251290)
  • networking.bonds
  • networking.macvlans
  • networking.fooOverUDP
  • networking.sits
  • networking.greTunnels
  • networking.vlans (#251290)

At least some of these can be supported without much difficulty.

@Majiir
Copy link
Contributor Author

Majiir commented Aug 25, 2023

@ElvishJerricco I think this is your area of expertise. Can you let me know if the approach in #251290 looks good for addressing these? Thanks!

@philiptaron
Copy link
Contributor

philiptaron commented Feb 23, 2024

I can take part of this one on. I've done

  • bc7a939 nixos/networkd: add [IPVLAN] and [IPVTAP] configuration options to systemd.netdev files
  • 7686f24 nixos/networkd: add ipvtap kind to netdev and IPVTAP= to network

and I can do these.

How many of these do we need NixOS tests for, vs. getting them just generated and expressible in the NixOS module?

@Majiir
Copy link
Contributor Author

Majiir commented Feb 23, 2024

NixOS tests would be good to have for these. If someone makes a change to the initrd environment that affects these options (e.g. changing available kernel modules), it's not straightforward to manually test an initrd with bridging, tunneling, etc. There are test examples in #251290 that should help.

@Majiir
Copy link
Contributor Author

Majiir commented Feb 23, 2024

For ipvlan/ipvtap, it looks like there are no corresponding networking.* options. The intent of this issue is to achieve parity between scripted networking and networkd in stage 1 for the networking.* options, so that we can deprecate scripted networking. (See edit.) Since there is no scripted networking support for ipvlan/ipvtap, I think we're good there.

Of course, it would be great to have ipvlan/ipvtap working in initrd with networkd.

[EDIT] Yeesh, here I am misunderstanding my own issue text. The networking.* options aren't fully supported in scripted networking + initrd anyway. So this issue is really about making sure all the networking.* abstractions that work for systemd in stage 2 also work in stage 1. We're still good there for ipvlan/ipvtap, but since there is no networking.* abstraction, it might be a little tricky for a user to configure ipvlan/ipvtap in initrd. If you get it working, can you share an example config?

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

No branches or pull requests

2 participants