systemd-networkd Configuration Review Prompt
Review and debug systemd-networkd .network/.netdev/.link files for static IPs, bridges, VLANs, bonds, routing policy, and DHCP — replacing legacy ifupdown/NetworkManager on servers.
- Target user
- Linux admins migrating servers to systemd-networkd or debugging networkd link state
- Difficulty
- Intermediate
- Tools
- Claude, ChatGPT
The prompt
You are a Linux networking engineer who runs fleets on systemd-networkd and treats declarative .network files as version-controlled infrastructure. I will provide: - The contents of `/etc/systemd/network/*.network`, `*.netdev`, and `*.link` files - Output of `networkctl status`, `networkctl list`, and `ip -d link show` - The intended topology (static IP, bridge for VMs, tagged VLAN, bonded uplink, policy routing for a second NIC) - Distro/version (some directives changed across systemd releases) Your job: 1. **Match-section audit** — verify each file's `[Match]` selects the intended interface and ONLY that interface. Flag overly broad matches (`Name=en*`) that could silently capture the wrong NIC and explain ordering by filename prefix. 2. **Link assignment** — confirm `networkctl` shows each link as `configured` (not `unmanaged`/`failed`). For any `unmanaged` link, identify why networkd ignored it (NetworkManager owns it, no matching .network, or `Unmanaged=yes`). 3. **Topology validation** — for bridges/bonds/VLANs, verify the `.netdev` (Kind, options) plus the member `.network` files that bind NICs into the virtual device. Catch the classic mistake of giving the member NIC an IP instead of the bridge. 4. **Addressing & routes** — review `[Network]` Address/Gateway/DNS and any `[Route]`/`[RoutingPolicyRule]` for the right metric, table, and source-based routing. Flag missing `Gateway=` causing no default route, or duplicate defaults. 5. **DHCP & RA** — check `DHCP=`, `IPv6AcceptRA=`, and whether `UseDNS`/`UseRoutes` clobber static settings unexpectedly. 6. **Apply safely** — give the command sequence to test (`networkctl reload`, then `networkctl reconfigure <iface>`) WITHOUT dropping your SSH session, plus a rollback if the link goes down. Output as: (a) per-file findings table (file, issue, severity), (b) corrected file contents, (c) safe apply + rollback runbook, (d) post-change verification commands (`networkctl status`, `ip route get <target>`). Anti-patterns to avoid: editing files then `systemctl restart systemd-networkd` over SSH on the only NIC, mixing NetworkManager and networkd on the same link, putting the IP on a bond member, assuming filename order doesn't matter.
Run this prompt with AI
Test it, get an AI-improved version, or compare models — live in the Prompt Workspace. No copy-paste.
Related prompts
-
Linux WireGuard VPN Setup & Debug Prompt
Stand up and troubleshoot WireGuard tunnels on Linux — key management, AllowedIPs routing, NAT/MTU pitfalls, persistent keepalive, and the silent-handshake-failure debugging loop.
-
Linux VLAN & Bridge Troubleshooting Prompt
Diagnose Linux bridge and VLAN issues — tagged/untagged traffic confusion, bridge fdb mysteries, vlan_filtering, VXLAN overlay debugging.
-
keepalived VRRP Virtual IP Failover Design Prompt
Design and review a keepalived VRRP configuration for floating virtual IPs, catching split-brain, preemption, and health-check pitfalls before they cause a dual-master or a failed failover in production.
-
Linux Policy Routing & Source-Based Routing Design Prompt
Design and validate Linux policy-based routing (multiple routing tables, ip rule, source routing) for multi-homed or multi-gateway hosts, with a dry-run-first plan that avoids cutting your own SSH session.
More Linux Admins prompts & error guides
Browse every Linux Admins prompt and troubleshooting guide in one place.
Reading prompts? Get all 500 in one free PDF
500 battle-tested, copy-paste AI prompts engineered by a senior systems engineer — every one with fill-in placeholders and safety/back-out notes. Drop your email and it's yours.
- 500 prompts: Linux · Kubernetes · Terraform · OpenStack · GitLab · Docker · Monitoring · Incident Response
- Instant PDF download — yours free, forever
- Plus one practical AI-workflow email a week (no spam)
Single opt-in · unsubscribe anytime · no spam.