Use it to configure networking on Ubuntu servers, or when a netplan change does not apply or breaks connectivity.
Netplan
Netplan (Ubuntu) describes network configuration in YAML files in /etc/netplan/ and renders it for a backend: systemd-networkd on servers or NetworkManager on desktops.
1. sudo netplan get — merged configuration.
2. Validate: sudo netplan generate (errors?).
3. Apply safely: sudo netplan try and confirm.
4. networkctl status <if> — applied?
5. Logs: journalctl -u systemd-networkd -e.
YAML in /etc/netplan → netplan generate renders backend config → apply → networkd/NetworkManager configures the interface
For Linux Networking → Netplan, continue with the first unproven Topic check: Identify all /etc/netplan/*.yaml inputs, precedence and renderer for the affected interface. If that boundary is healthy, advance to the adjacent check: Validate merged/generated configuration before applying, especially over remote access. Preserve the same host/time/identity scope and rerun the original workload before accepting recovery.
Context & applicabilityCommon mistakes · platform/version boundaries
Operational reference
Fast context before you go deeper.
Verification & Troubleshooting
Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.
Use the operational verification above to establish the expected state.
Capture the concrete output, symptom, packet, log or counter before changing anything.
Step 1 Operational evidence path Verify boundary
Netplan YAML inputs → merge/validation → renderer selection → generated backend config → backend activation → kernel state → resolver/route path → workload
Healthy evidence: the expected YAML sources merge cleanly, generate the intended renderer configuration, backend state matches kernel read-back and the original workload remains reachable.
Step 2 Verification and output interpretation Verify boundary
Existing fast checks for this Topic. - Identify all /etc/netplan/*.yaml inputs, precedence and renderer for the affected interface.
- Validate merged/generated configuration before applying, especially over remote access.
- Inspect backend logs/state plus kernel interfaces, addresses and routes after apply.
- Repeat the original network/service test and confirm persistence across the intended lifecycle.
Verification chain. Netplan YAML inputs → merge/validation → renderer selection → generated backend config → backend activation → kernel state → resolver/route path → workload
Step 3 Commands Verify boundary
cat /etc/netplan/*.yaml
netplan try
netplan apply
Step 4 Failure modes and next checks Narrow the fault
Suspicious evidence: a higher-precedence file or cloud-init source overrides intent, the wrong renderer is selected, apply leaves remote access degraded, or generated config differs from active backend/kernel state.
Step 5 Common mistakes Narrow the fault
netplan applyremotely withoutnetplan try.
Evidence · 1 on this Topic
Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.
Indentation matters in YAML. Use netplan try over SSH — it reverts automatically if you do not confirm. File permissions must be 600. Check the rendered result with networkctl status.
ip -br addr— interfaces and addressesip route— routing table and default routeip neigh— ARP/neighbour cacheip route get <dest>— route, interface and source chosen for a destinationnmcli device status / networkctl— which tool manages each interface
ReferenceWhat it is1 section · depth on demand
Core model
First identify Netplan file precedence and selected renderer. Validate merged YAML and generated output, then determine whether apply/reconfigure reached the backend and kernel. Be alert to cloud-init or installer-generated files and to netplan try rollback behavior when testing remote changes.
ReferenceImportant terms & boundaries5 sections · depth on demand
What this shows and what it does not
Netplan validation/generation shows configuration translation only; backend activation, kernel-effective state and service connectivity require separate verification.
In depth
Netplan YAML: one description, two renderers
Netplan describes network configuration in YAML and generates configuration for a back-end renderer: systemd-networkd or NetworkManager. The Netplan YAML reference defines the structure:
- Everything sits under
network:, withversion: 2(the only supported value) and an optionalrenderer(networkd is the default). - Device types are listed under
ethernets,bonds,bridges,vlans,wifisandtunnels. matchselects physical devices by name (globs allowed), MAC address or driver, and all given properties must match.set-namerenames the matched device.
Commonly used keys (reference)
| Key | Notes |
|---|---|
dhcp4 / dhcp6 | Off by default |
addresses | CIDR list, such as [10.110.0.64/24, "2001:db8:110::64/64"] |
routes | Entries with to, via, metric, table; to: default for the default route |
gateway4 / gateway6 | Deprecated; use routes |
nameservers | addresses and search |
mtu | Default 1500 |
vlans | Require id (0–4094) and link |
bonds | interfaces; parameters.mode defaults to balance-rr |
bridges | interfaces; parameters.stp defaults to true |
Only one default route is allowed per IP family and routing table.
A server example with a bond and a VLAN
network:
version: 2
renderer: networkd
ethernets:
nic0: {match: {macaddress: "a4:bb:6d:10:00:01"}, set-name: nic0}
nic1: {match: {macaddress: "a4:bb:6d:10:00:02"}, set-name: nic1}
bonds:
bond0:
interfaces: [nic0, nic1]
parameters: {mode: 802.3ad, lacp-rate: fast, transmit-hash-policy: layer3+4}
vlans:
bond0.110:
id: 110
link: bond0
addresses: [10.110.0.64/24]
routes: [{to: default, via: 10.110.0.1}]
nameservers: {addresses: [10.20.0.53, 10.20.0.54], search: [example.net]}
host$ sudo netplan generate
host$ sudo netplan try
host$ sudo netplan apply
host$ networkctl status bond0.110
Notes
netplan tryapplies the change and rolls it back automatically unless you confirm it. Use it whenever you work on a remote server over the network you're changing.- The bond defaults to
balance-rrif no mode is given, which most switches don't expect. Always set the mode explicitly.
Documented example, not captured output.
How it works at runtime
Netplan is part of Linux Networking → Netplan. Netplan is a declarative YAML configuration layer used primarily on Ubuntu that renders network intent to a backend such as systemd-networkd or NetworkManager; YAML validity, generated backend configuration, applied runtime state and workload result are separate things to check.
Topic-specific state model. Netplan is a declarative YAML configuration layer used primarily on Ubuntu that renders network intent to a backend such as systemd-networkd or NetworkManager; YAML validity, generated backend configuration, applied runtime state and workload result are separate things to check.
Interpretation rule. - Valid Netplan YAML ≠ intended merged configuration after file precedence.
- Generated backend files ≠ backend successfully activated them.
netplan applysuccess ≠ route/DNS/application path is correct.- Netplan intent ≠ NetworkManager/systemd-networkd runtime state when another source modifies it.
Quick reference
Netplan (Ubuntu) renders YAML into systemd-networkd or NetworkManager configuration.
# /etc/netplan/01-static.yaml
network:
version: 2
renderer: networkd
ethernets:
eno1:
addresses: [10.0.10.21/24]
routes: [{to: default, via: 10.0.10.1}]
nameservers: {addresses: [10.0.0.53, 10.0.0.54], search: [corp.example.com]}
netplan generate
netplan try # auto-rollback after 120 s unless confirmed
netplan apply
netplan get
Files need mode 600 (warnings otherwise). Cloud images often have 50-cloud-init.yaml — disable cloud-init networking (network: {config: disabled}) before replacing it.
Limits and how it fails
Primary failure point. Netplan validation/generation shows configuration translation only; backend activation, kernel-effective state and service connectivity require separate verification.
ReferenceConfiguration & state1 section · depth on demand
Configuration, persistence and lifecycle
Distribution/platform context. Netplan owns Ubuntu declarative network intent and rendering. NetworkManager/systemd-networkd own backend behavior; interface/routing Topics own kernel semantics.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Verification history & basis
When and against what this Topic was checked. Later text edits do not count as a new check.
Authoritative/upstream documentation reviewed for bounded claims in Linux Networking → Netplan. Documentation verification only; this is not observed lab or production Evidence.
Basis: https://docs.kernel.org/networking/index.html · confidence 94%What changed and what may be affected
Recent technical edits are separated from ordinary page timestamps. Relationship impact is advisory: it identifies nearby canonical references to review, not automatic breakage.
Terms & aliases
Hover a linked term for a quick definition; click it to open its glossary entry. Aliases are other names that find this Topic in search.
Quick lookup tables
Netplan operational reference
Topic-specific lookup boundaries, proof limits and next-step Evidence for Netplan.
| Lookup boundary | Topic-specific reference | Operational use |
|---|---|---|
| Scope / effective state | Netplan is a declarative YAML configuration layer used primarily on Ubuntu that renders network intent to a backend such as systemd-networkd or NetworkManager; YAML validity, generated backend configuration, applied runtime state and workload result are separate boundaries. | Establish exactly what this Topic owns before crossing into another subsystem. |
| Fast verification | Pin host + namespace + exact flow → identify configuration owner/renderer → identify ifindex/interface + topology → inspect link/carrier → inspect addresses → inspect neighbor resolution → reproduce route/rule lookup → verify VLAN/bond/bridge/MTU as relevant → inspect packets/socket → verify return path → repeat original workload. | Use the shortest evidence path first; a fast check is a boundary test, not blanket proof. |
| Verification chain | Netplan YAML inputs → merge/validation → renderer selection → generated backend config → backend activation → kernel state → resolver/route path → workload | Trace requested/configured state through effective state to the observed workload result. |
| Failure boundary | Netplan validation/generation proves configuration translation only; backend activation, kernel-effective state and service connectivity require separate verification. | Stop broad troubleshooting at the first boundary that is not supported by evidence. |
| Positive evidence | Correlated Linux networking evidence can establish this proof path: Netplan YAML inputs → merge/validation → renderer selection → generated backend config → backend activation → kernel state → resolver/route path → workload | Use this observation only for the specific claim it actually supports. |
| Evidence limit | It does not independently prove behavior outside the captured namespace, interface, local kernel, L2/path or workload scope. Netplan validation/generation proves configuration translation only; backend activation, kernel-effective state and service connectivity require separate verification. | Do not promote a local success signal into end-to-end or adjacent-dependency proof. |
| Next troubleshooting check | Continue from the first unproven boundary: confirm namespace and configuration owner, inspect ifindex/link/address/neighbor/route state for the exact flow, verify L2/MTU construction and packet movement, then test the listening service and return path before making additional changes. | Continue to the next unresolved boundary while preserving the original test condition. |
Netplan · operational reference
Compact Linux state, persistence, verification and boundary reference for fast lookup.
| Reference boundary | Netplan |
|---|---|
| Topic path | Linux Networking → Netplan |
| Runtime state | Netplan is a declarative YAML configuration layer used primarily on Ubuntu that renders network intent to a backend such as systemd-networkd or NetworkManager; YAML validity, generated backend configuration, applied runtime state and workload result are separate boundaries. |
| Fast checks | - Identify all /etc/netplan/*.yaml inputs, precedence and renderer for the affected interface. - Validate merged/generated configuration before applying, especially over remote access. - Inspect backend logs/state plus kernel interfaces, addresses and routes after apply. - Repeat the original network/service test and confirm persistence across the intended lifecycle. |
| Verification chain | Netplan YAML inputs → merge/validation → renderer selection → generated backend config → backend activation → kernel state → resolver/route path → workload Boundary chain: local authoritative state → adjacent dependency → effective/programmed state → original workload/request → return/regression → explicit Evidence boundary. Boundary chain: local authoritative state → adjacent dependency → effective/programmed state → original workload/request → return path or regression → explicit Evidence boundary. |
| Failure boundary | Netplan validation/generation proves configuration translation only; backend activation, kernel-effective state and service connectivity require separate verification. Boundary chain: process/socket namespace → source/rule/FIB → neighbor → netfilter/eBPF/qdisc → virtual/physical device → peer → return → application. |
| Persistence rule | Prove which configuration source owns the state, then prove that the running consumer loaded or generated the intended state. |