8000 Make the guest uplink's subnet configurable: IPv4, IPv6 and dual-stack · Issue #379 · nixidae/nixidae · GitHub
[go: up one dir, main page]

Skip to content

Make the guest uplink's subnet configurable: IPv4, IPv6 and dual-stack #379

Description

@Lillecarl

The uplink is now fixed at 10.0.2.15/24, router 10.0.2.2, DNS 10.0.2.3 -- constants in uplink_args in pkgs/uml-runner/uml_runner/forward.py, passed to passt by both backends. That replaced passt's default of handing the guest the host's own public address (#5), and the fixed range is right for almost every test. It should not be the only option.

What should be configurable

  • The IPv4 subnet. 10.0.2.0/24 is QEMU's convention and a reader knows it, but it is also a range a host may already be using -- a VPN, a container bridge, another hypervisor. A guest that routes for real then has two meanings for the same address. This already bit the segment side once: tests/k8s.py uses 10.100.0.x and this host has WireGuard on 10.100.0.1/24, which is why k8s-pull was given 10.104.
  • IPv6. passt currently assigns the guest an address out of the host's prefix, which is left alone because it is the normal way to do IPv6 -- but it has the same "depends on where the host is" property as the old IPv4 behaviour. A test that wants a stable ULA should be able to say so.
  • Dual-stack, v4-only and v6-only. passt takes -4/-6 to restrict itself. A test of something that has to work without IPv4, or without IPv6, cannot ask for that today. This is the one with real test value: a single-stack cluster is a different cluster.

Two ways in, and they should agree

  • Nix, as options on the guest, so a test declares it the way it declares everything else -- probably boot.uml.uplink.{address,prefixLength,gateway,dns,stack} alongside boot.uml.lan. This is the one that belongs in a committed test.
  • An environment variable, for changing it without editing Nix, the way NIXKUBE_UML_SCENARIOS works. The case is a host whose network collides with the default: somebody should be able to run the existing suite with a different range and no patch. Something like UML_UPLINK_SUBNET=172.31.0.0/24.

The env var wins over the Nix value when both are set, and the runner should say on the console when it is overriding, the same way it already announces a remapped privileged port.

What to check while doing it

  • --map-host-loopback follows the gateway today (passt reports NAT to host 127.0.0.1: 10.0.2.2). A configurable gateway has to keep that working, or a guest loses its route back to host services.
  • forward.py's inbound rules are on the host's 127.0.0.x and should be unaffected, but a v6-only guest has no IPv4 for passt to forward to -- so the forwarding path needs a look before claiming v6-only works.
  • modules/k8s.nix reads boot.uml.lan.address for --node-ip and says in a comment that the uplink is 10.0.2.x. If the uplink becomes configurable that comment becomes a lie again unless it names the option.
  • Whether two guests may keep sharing one uplink address. They can today because each has its own passt and no shared link; nothing here should change that by accident.

Activity

  1. transferred this issue fromnixidae/vivariumon Oct 19, 2026
  2. added
    source: vivarium
    on Oct 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    source: vivarium

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      0