Pcornel
Browse topics
Options
Recent
Favorites
Linux · Technical reference

Netplan

Direct answer

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.

When to use this

Use it to configure networking on Ubuntu servers, or when a netplan change does not apply or breaks connectivity.

First 30 seconds

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.

Operational verification

YAML in /etc/netplan → netplan generate renders backend config → apply → networkd/NetworkManager configures the interface

Evidence · next step

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.

Continue only after interpreting the current observation.
Context & applicabilityCommon mistakes · platform/version boundaries
Platform / version applicability
linux
applies
Structured applicability is explicit Topic metadata; it does not infer compatibility beyond the stored rows.
At a glance

Operational reference

Fast context before you go deeper.

Platformlinux
Scope / prerequisiteUse it to configure networking on Ubuntu servers, or when a netplan change does not apply or breaks connectivity.
What next?3 suggested next steps
Evidence1
On this pageJump to a specific section
Operational workflow

Verification & Troubleshooting

Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.

5 steps Observe → verify → isolate → change minimally → repeat the original test.
ObservedRecord what the original test actually shows

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 apply remotely without netplan try.
Evidence references

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.

observation · 1
Key points

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.

Key checks
  • ip -br addr — interfaces and addresses
  • ip route — routing table and default route
  • ip neigh — ARP/neighbour cache
  • ip route get <dest> — route, interface and source chosen for a destination
  • nmcli 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:, with version: 2 (the only supported value) and an optional renderer (networkd is the default).
  • Device types are listed under ethernets, bonds, bridges, vlans, wifis and tunnels.
  • match selects physical devices by name (globs allowed), MAC address or driver, and all given properties must match.
  • set-name renames the matched device.

Commonly used keys (reference)

KeyNotes
dhcp4 / dhcp6Off by default
addressesCIDR list, such as [10.110.0.64/24, "2001:db8:110::64/64"]
routesEntries with to, via, metric, table; to: default for the default route
gateway4 / gateway6Deprecated; use routes
nameserversaddresses and search
mtuDefault 1500
vlansRequire id (0–4094) and link
bondsinterfaces; parameters.mode defaults to balance-rr
bridgesinterfaces; 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 try applies 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-rr if no mode is given, which most switches don't expect. Always set the mode explicitly.

Documented example, not captured output.

Source basisSource attribution states what this section is based on; it is not independent proof that the current environment matches it.

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 apply success ≠ 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.

Source basisSource attribution states what this section is based on; it is not independent proof that the current environment matches 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
Technical verification history

Verification history & basis

When and against what this Topic was checked. Later text edits do not count as a new check.

2026-09-14 · vendor doclinux current

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%
Technical changelog & impact

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.

Related reference impactReview these references after material technical changes when their shared boundary is affected.
Terminology layer

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.

Aliases that resolve here
netplan linuxubuntu netplannetplan yamlnetplan renderer
Embedded reference data

Quick lookup tables

Netplan operational reference

Topic-specific lookup boundaries, proof limits and next-step Evidence for Netplan.

Lookup boundaryTopic-specific referenceOperational use
Scope / effective stateNetplan 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 verificationPin 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 chainNetplan YAML inputs → merge/validation → renderer selection → generated backend config → backend activation → kernel state → resolver/route path → workloadTrace requested/configured state through effective state to the observed workload result.
Failure boundaryNetplan 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 evidenceCorrelated 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 → workloadUse this observation only for the specific claim it actually supports.
Evidence limitIt 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 checkContinue 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 boundaryNetplan
Topic pathLinux Networking → Netplan
Runtime stateNetplan 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 chainNetplan 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 boundaryNetplan 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 ruleProve which configuration source owns the state, then prove that the running consumer loaded or generated the intended state.
Confirmation

Confirm action

Continue?