{{ result.summaryTitle }}
{{ result.primary }}
{{ result.summaryLine }}
{{ badge.label }}
Netplan configuration inputs
Choose the Netplan backend to emit in the generated YAML.
Examples: ens192, eth0, enp1s0, or id0 with a MAC match.
One static address per line; dual-stack interfaces can include both families.
Leave blank only when this interface should not own a default route.
Resolvers are emitted under nameservers.addresses.
Optional suffix list for nameservers.search.
One route per line using destination,gateway,metric,on-link,table.
Samples stay local and replace the current form.
Use when multiple interfaces or default routes must be ordered.
Optional lowercase colon-separated MAC address.
Optional final interface name after matching.
Common Ethernet is 1500; jumbo frames are often 9000.
bytes
Adds optional: true so boot does not wait for this interface.
Keeps generated static configs explicit. Clear only when another file owns DHCP state.
Default output uses routes with to: default; enable only for older environments that still require gateway keys.
{{ result.yaml }}
Field Value YAML path Operator note Copy
{{ row.field }} {{ row.value }} {{ row.path }} {{ row.note }}
Route Destination Gateway Metric Flags Copy
{{ row.label }} {{ row.to }} {{ row.via }} {{ row.metric }} {{ row.flags }}
Severity Check Detail Recommendation Copy
{{ row.severity }} {{ row.check }} {{ row.detail }} {{ row.recommendation }}

        
Customize
Advanced
:

Introduction:

Netplan configuration describes how an Ubuntu system should bring up its network interfaces. A static Ethernet setup usually needs an interface identifier, one or more CIDR addresses, a default route, DNS resolvers, and the renderer that will hand the final settings to systemd-networkd or NetworkManager.

The risk is practical. A missing prefix can leave the host with no usable subnet, a gateway in the wrong address family can prevent outbound traffic, and a copied route can look correct until two default routes compete with the same priority. Netplan YAML is concise, so the same few lines often carry the full boot-time path for SSH, package updates, monitoring, and name resolution.

Netplan static interface flow from network facts to version 2 YAML, renderer handoff, and validation checks.

Generated Netplan YAML should be treated as a candidate configuration, not as proof that the target host will stay reachable. The target Netplan version, renderer support, existing files under /etc/netplan/, cloud image defaults, and the real network segment still decide whether the file can be applied safely.

The safest habit is to prepare the static interface definition, review the generated paths and warnings, then test with netplan try or netplan generate on the host or a staging clone before using netplan apply on a remote server.

Technical Details:

A Netplan file uses a network: mapping with version: 2. Ethernet settings sit under ethernets, where the map key either names the Linux interface directly or acts as an internal device ID paired with a match rule. Static addressing is written as CIDR values, because the prefix length tells Linux which destinations are on the directly connected subnet.

Default routing has two common forms. Current Netplan examples favor route entries such as to: default and via: 10.10.10.1, while older Ubuntu environments may still require gateway4 or gateway6. DNS settings live under nameservers, with resolver addresses and optional search suffixes kept separate.

Rule Core:

Netplan YAML generation rules for the Netplan Config Generator
Configuration part Generated YAML path Rule to verify
Renderer network.renderer Output can emit networkd, emit NetworkManager, or omit the renderer when another Netplan file owns the choice.
Interface ID network.ethernets.<id> A direct interface name is used as the key. With a MAC match, the key can be an opaque ID and set-name can assign the final name.
Static address CIDR addresses, plus optional dhcp4 and dhcp6 Each IPv4 or IPv6 address must include a prefix. Static address families can emit explicit DHCP false flags.
Default gateway routes[].to: default or gateway4/gateway6 Default output uses modern route entries. The legacy switch emits gateway keys for older targets.
DNS servers and search domains nameservers.addresses and nameservers.search Resolvers must be literal IPv4 or IPv6 addresses. Search suffixes are checked as domain labels, not URLs.
Static routes routes Rows use destination, gateway, optional metric, optional on-link flag, and optional table. Destination and gateway families must match.

Route priority is determined by destination, address family, metric, and routing table. A duplicate default route with the same family, metric, and table is not always invalid, but it can make failover or multi-homed hosts behave differently from the intended design. The review warns about this specific collision so it can be corrected before the YAML reaches a server.

Validation Boundaries:

Validation boundaries for generated Netplan YAML
Check Blocking condition Warning condition
Interface name Blank value or characters outside letters, numbers, dot, dash, underscore, and colon. Name longer than the usual Linux interface limit when no MAC match is supplied.
Static address CIDR Missing prefix, invalid IP literal, IPv4 prefix outside 0 to 32, or IPv6 prefix outside 0 to 128. No separate warning; malformed address values are treated as errors.
Default gateway Invalid IP literal or more than one gateway in the same address family. Gateway family without a matching static address, no gateway at all, or IPv4 gateway outside the entered IPv4 subnet.
Static route row Missing destination, missing gateway, invalid route destination, invalid gateway, family mismatch, or invalid metric. Unrecognized on-link flag, route table value with unsafe characters, or duplicate default route priority.
Advanced fields Unsupported renderer, invalid lowercase MAC notation, invalid set-name characters, default metric outside 0 to 4294967295, or MTU outside 576 to 9216 bytes. set-name without match.macaddress, NetworkManager selected for a server-style host, or legacy gateway output enabled.

The YAML, Interface Audit, Route Ledger, Validation Review, and JSON view are generated from the same parsed network data. If the review shows an error, the YAML is still visible for diagnosis, but it should not be copied into /etc/netplan/ until the named issue is corrected.

Everyday Use & Decision Guide:

Start with networkd for a typical Ubuntu Server interface unless the host is managed by desktop NetworkManager profiles or another Netplan file already declares the renderer. Fill in the real interface name, one static address in CIDR form, one default gateway for the same IP family, and the DNS servers the host should use after boot.

Use the samples as quick resets, not as deployment templates. Static sample returns to a single-stack IPv4 server shape, while Dual-stack sample shows IPv4 and IPv6 addresses, two default gateways, a MAC match, a final interface name, and a custom MTU.

  • Use Match MAC address before Set interface name when the kernel interface name can change across boots or VM hardware order changes.
  • Leave Default gateway blank only for isolated, routed, or policy-routed interfaces that should not own a default route.
  • Add Static routes as CSV rows only when the host needs more than the default path, and keep the route destination and gateway in the same address family.
  • Set Default route metric when multiple route candidates need a clear priority. Distinct metrics make the Route Ledger easier to defend.
  • Turn on Use legacy gateway4/gateway6 keys only for an older target that rejects routes with to: default.

The common wrong assumption is that clean YAML means safe connectivity. A generated file can still use the wrong NIC, inherit a conflicting renderer from another file, or define a gateway that is unreachable on the real subnet. Read Validation Review first, then compare Interface Audit and Route Ledger against the change ticket or IP address plan.

When the summary shows Netplan YAML ready, the next useful check is not more formatting. Run netplan try on the target host or a staging clone so a bad route or renderer choice can be rolled back before it locks out remote access.

Step-by-Step Guide:

Build the interface definition from the values that must survive reboot, then use the review tabs to catch route and addressing mistakes.

  1. Choose Renderer. The summary badge should show networkd, NetworkManager, or renderer omitted.
  2. Enter Interface name. If Validation Review reports an unsafe or blank name, use a kernel name such as ens192 or add Match MAC address with a simple Netplan ID.
  3. Add one value per line in Static address CIDR. IPv4 values need prefixes such as /24; IPv6 values need prefixes such as /64.
  4. Enter one Default gateway per address family. A duplicate IPv4 or IPv6 gateway in this field appears as an error.
  5. Add DNS servers and optional Search domains. Resolver entries must be IP addresses, while search suffixes should be plain domain names.
  6. Add optional Static routes as destination,gateway,metric,on-link,table. If a route warning appears, check the fourth and fifth CSV values before trusting the route row.
  7. Open Advanced for Default route metric, Match MAC address, Set interface name, MTU, optional boot behavior, DHCP false flags, or legacy gateway output.
  8. Read Validation Review. Clear every Error, then decide whether each Warning is intentional for the target host.
  9. Use Interface Audit and Route Ledger to confirm YAML paths, then copy the Netplan YAML only after the review matches the planned network change.

Interpreting Results:

Netplan YAML ready means no blocking validation errors were found in the entered values. It does not prove that the host's Netplan version, renderer backend, file permissions, or existing configuration set will accept the result unchanged.

How to interpret Netplan Config Generator output cues
Output cue Meaning Useful follow-up
fix required At least one validation error exists. Open Validation Review and correct the named field before using the YAML.
validated No error or warning rows are active. Still test with netplan try, because runtime renderer behavior is outside the form's checks.
1 warning or more The YAML can still be generated, but a route, gateway, renderer, DNS, name, or legacy choice needs review. Treat the warning as a change note. Fix it unless it reflects an intentional target-host design.
ipv4 + ipv6 Valid static addresses from both families are present. Confirm both default gateways and static routes use the same family as their destinations.
Route Ledger Shows emitted route destination, gateway, metric, source, family, on-link flag, and table. Use it to spot duplicate default-route priority before applying a multi-route config.

The JSON view is useful for records and automation notes, but Netplan consumes the YAML. If the JSON, ledger, or audit table makes the plan look wrong, change the form inputs instead of editing only the copied YAML text.

Worked Examples:

Single-stack server interface

A server on 10.44.20.0/24 can use Interface name ens192, Static address CIDR 10.44.20.10/24, gateway 10.44.20.1, two DNS servers, and route metric 100. The summary reads Netplan YAML ready, the primary value reads ens192 static, and Route Ledger shows one default route plus the entered static routes.

Dual-stack interface with a MAC match

Dual-stack sample uses interface ID id0, addresses 10.44.20.10/24 and 2001:db8:44:20::10/64, matching gateways, match.macaddress 00:11:22:33:44:55, set-name ens192, and MTU 1500. The badges include ipv4 + ipv6, and the YAML includes both dhcp4: false and dhcp6: false.

Gateway outside the entered subnet

If Static address CIDR is 10.44.50.21/24 and Default gateway is 10.44.60.1, Validation Review adds a Gateway reachability warning. That warning can be acceptable for special routing, but on a normal VM network it usually means the gateway or prefix is wrong.

Broken route CSV row

A route row such as 10.55.0.0/16,2001:db8::1,abc,maybe,bad table! produces several review entries: the destination is IPv4 while the gateway is IPv6, abc is not a valid metric, maybe is not a recognized on-link flag, and the table value may not be accepted. Fix the family match and CSV fields before using the generated route.

FAQ:

Should I use networkd or NetworkManager?

Use networkd for a typical Ubuntu Server static Ethernet config. Choose NetworkManager only when the target image is managed that way, or omit the renderer when another Netplan file already sets the renderer.

Why does every static address need a slash prefix?

The generator validates addresses as CIDR values. 10.44.20.10/24 is accepted, while 10.44.20.10 creates an Address CIDR error because the subnet prefix is missing.

Can I enter more than one default gateway?

Use one IPv4 gateway and one IPv6 gateway in the Default gateway field. Multiple gateways in the same family create a duplicate error; additional weighted defaults belong in Static routes with distinct metrics or tables.

When should legacy gateway keys be enabled?

Enable Use legacy gateway4/gateway6 keys only for an older Ubuntu or Netplan target that rejects default routes written as routes with to: default. In that mode, route metrics for default gateways are not emitted.

Why did set-name trigger a warning?

set-name is safest when paired with a unique match.macaddress. If a final interface name is entered without a MAC match, Validation Review warns that the rename may not target one predictable device.

Do entered network values get sent away for generation?

The YAML, audit rows, route ledger, validation rows, and JSON payload are generated in the browser from the current form state. There is no separate server-side generation endpoint for the network values entered here.

Glossary:

Netplan
Ubuntu's YAML-based network configuration system that hands settings to a renderer.
Renderer
The backend that applies the network definition, commonly systemd-networkd or NetworkManager.
CIDR
Address notation that combines an IP address and prefix length, such as 10.44.20.10/24.
Default route
The route used when no more specific destination route matches outbound traffic.
Metric
A route priority value used to order otherwise similar route choices.
on-link
A route flag that treats the gateway as directly reachable through the interface.
Route table
A separate Linux routing table used when policy routing or multi-path designs need isolation.

References: