跳到主要内容

Resource ownership and the apply model

routerd associates host-side artefacts with the resource that produced them. Recording who owns what makes diffs, deletions, and incident debugging tractable.

Ownership categories

CategoryMeaning
Createdrouterd produced the artefact itself.
Adoptedrouterd took over an existing artefact and now manages it.
Observedrouterd only reads the state; it does not change it.

Resource → host artefact map

ResourceHost artefact
InterfaceOS interface name and admin state
DHCPv6PrefixDelegationrouterd-dhcpv6-client socket, lease, events
DHCPv4Leaserouterd-dhcpv4-client socket, lease, events
PPPoESessionrouterd-pppoe-client socket, state, pppd/ppp config
HealthCheckrouterd-healthcheck socket, state, events
DHCPv4Server / DHCPv6Server / IPv6RouterAdvertisementManaged dnsmasq configuration
DNSZonerouterd-dns-resolver local authoritative zone
DNSResolverrouterd-dns-resolver socket, state, events, listener configuration
DSLiteTunnelLinux ip6tnl interface
IPv4RouteKernel route
NAT44Rulenftables routerd_nat table
WireGuardInterface / WireGuardPeerWireGuard configuration
TailscaleNoderouterd-tailscale-<name>.service systemd unit and tailscale up arguments
VRFLinux VRF device and routing table
VXLANTunnelVXLAN device
Packageapt / dnf / pkg / Nix install state
SysctlOne sysctl value
SysctlProfileA set of sysctl values
NetworkAdoptionsystemd-networkd / systemd-resolved drop-ins
SystemdUnitsystemd unit file and enabled state
NTPClientNTP client configuration

How removal works

routerd does not silently delete artefacts it does not own. When a resource is removed from the YAML, only artefacts that routerd previously created (or explicitly adopted) are eligible for deletion.

Full configuration rollback is not a current goal. For changes that affect production traffic, follow this order:

  1. Validate.
  2. Inspect the plan.
  3. Run a dry-run apply.
  4. Confirm the management connection survives the change.
  5. Apply.
  6. Verify state and connectivity.

Legacy configurations

Older experimental DHCPv6 packages and renderers have been removed. The current DHCPv6-PD path is routerd-dhcpv6-client. Examples that referenced dhcpcd or dhcp6c directly are no longer part of the supported configuration set; the legacy resources have been retired without aliases.