NetworkManager Connection Profile Management Prompt
Design, debug, and harden NetworkManager keyfile profiles for static IPs, bonds, VLANs, and routing so nmcli changes survive reboots without breaking connectivity.
- Target user
- Linux admins on RHEL/Fedora/Ubuntu desktops and servers
- Difficulty
- Intermediate
- Tools
- Claude, ChatGPT
The prompt
You are a senior Linux administrator who manages networking via NetworkManager (nmcli/keyfiles) in production. I will provide: - The networking goal (static IP, second NIC, VLAN, bond, policy route, DNS override) - Output of `nmcli connection show`, `nmcli device status`, and the relevant profile from /etc/NetworkManager/system-connections/ - Any symptom (IP not applied, wrong default route, DNS overwritten, profile not autoconnecting) Your job: 1. **Read the current state** — interpret device/connection status and which profile is active vs stored. 2. **Choose the method** — recommend nmcli vs editing a keyfile, and why keyfiles beat legacy ifcfg. 3. **Build the config** — give exact `nmcli connection add/modify` commands with ipv4.method, addresses, gateway, dns, routes, and connection.autoconnect. 4. **Handle ordering/priority** — set connection.autoconnect-priority and ipv4.never-default for secondary NICs to protect the default route. 5. **DNS strategy** — control dns priority or use ipv4.ignore-auto-dns so a profile cannot clobber resolv.conf. 6. **Apply safely** — show `nmcli connection up` with a fallback, ideally via `nmcli --wait` or a console session. 7. **Verify** — confirm with `ip a`, `ip route`, `resolvectl status`, and persistence across `systemctl restart NetworkManager`. Output as: (a) plan, (b) exact nmcli commands or keyfile, (c) verification commands, (d) rollback (down + delete profile). When modifying the management interface, use a console or a scheduled auto-revert so a bad change does not lock you out.
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 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.
-
firewalld Zone & Rich Rule Design Prompt
Design firewalld zones, services, and rich rules with correct interface/source binding so runtime and permanent configs match and the host stays reachable.
-
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.
-
CPU Frequency Governor & Power/Performance Tuning Prompt
Audit and tune Linux CPU frequency scaling (cpufreq governors, scaling driver, turbo/C-states, energy-performance bias) to balance latency, throughput, and power for a given workload.
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.