The per-VM inner-world networking contract. Every VM's netns is identical —
tap0 at 172.30.0.1/30, guest at 172.30.0.2/30 — so a snapshot clone restores
a correct network with zero renumbering; host-side uniqueness is the helper's
job (see Hyper.SuidHelper.Network). This module owns the three values that
must agree between the guest kernel cmdline, the Firecracker NIC config, and
the helper: the guest MAC, the ip= autoconfig string, and the NIC spec.
Summary
Functions
Stable locally-administered unicast MAC for vm_id. Derived from a SHA-256 of
the id so it is deterministic on any node (aids debugging); duplicate MACs are
harmless since no two guests ever share an L2 segment (each is alone in its netns).
The Firecracker NIC spec for vm_id (guest eth0 bound to in-netns tap0).
Kernel ip= autoconfig fragment appended to every networked VM's cmdline.
Kernel hyper.resolver= cmdline fragment carrying the DNS resolver IP the
PID-1 guest agent writes to /etc/resolv.conf — kernel ip= autoconfig sets
the guest's address/route but never DNS, so this closes that gap. Pure:
callers (BootSpec.resolve/2) read the configured resolver themselves.
Functions
@spec guest_mac(Hyper.Vm.Id.t()) :: String.t()
Stable locally-administered unicast MAC for vm_id. Derived from a SHA-256 of
the id so it is deterministic on any node (aids debugging); duplicate MACs are
harmless since no two guests ever share an L2 segment (each is alone in its netns).
@spec interface(Hyper.Vm.Id.t()) :: Hyper.Firecracker.Api.NetworkInterface.t()
The Firecracker NIC spec for vm_id (guest eth0 bound to in-netns tap0).
@spec ip_cmdline() :: String.t()
Kernel ip= autoconfig fragment appended to every networked VM's cmdline.
Kernel hyper.resolver= cmdline fragment carrying the DNS resolver IP the
PID-1 guest agent writes to /etc/resolv.conf — kernel ip= autoconfig sets
the guest's address/route but never DNS, so this closes that gap. Pure:
callers (BootSpec.resolve/2) read the configured resolver themselves.