Pcornel
Browse topics
Options
Recent
Favorites
Virtualization · Technical reference

NAT Network

Direct answer

Trace guest addressing and default gateway through the virtual network/bridge to host forwarding and NAT, then through host routing/firewall and the external return path.

When to use this

Use this topic when the symptom or planned change has been narrowed to KVM / QEMU → NAT Network. Establish effective host/runtime state before changing configuration.

First 30 seconds

1. libvirt NAT network (default, virbr0, 192.168.122.0/24) with dnsmasq DHCP/DNS.

2. Outbound via masquerade.

3. Inbound needs port forwarding.

4. Autostart the network.

5. Firewall rules managed by libvirt.

Operational verification

VM → virbr0 → NAT → host uplink

Context & applicabilityCommon mistakes · platform/version boundaries
Common mistakes
Common traps

A defined or active NAT network shows local management state, but it does not show lease delivery, translation, forwarding, DNS or return traffic.

Platform / version applicability
kvm-qemu
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.

Platformkvm-qemu
Scope / prerequisiteUse this topic when the symptom or planned change has been narrowed to KVM / QEMU → NAT Network. Establish effective ho…
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.

1 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 Verification path Verify boundary

Guest stack → vNIC → virtual bridge/network → host forwarding/NAT → host uplink → external network → return translation → guest

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
  • DHCP lease ≠ internet reachability.
  • NAT translation ≠ DNS or application health.
  • Host internet access ≠ guest NAT path healthy.
  • Outbound NAT does not automatically provide inbound reachability.
Key checks
  • virsh net-list --all — networks
  • virsh net-dumpxml default — NAT config
  • virsh net-dhcp-leases default — DHCP leases
ReferenceWhat it is1 section · depth on demand

libvirt default NAT network

The default network uses virbr0 (192.168.122.0/24), dnsmasq for DHCP/DNS and iptables/nftables NAT on the host. Checks:

virsh net-info default
virsh net-dhcp-leases default
sysctl net.ipv4.ip_forward

VMs can reach outside but are not reachable from the LAN without port forwarding; use a bridge for servers.

ReferenceImportant terms & boundaries2 sections · depth on demand

What this shows and what it does not

A defined or active NAT network shows local management state, but it does not show lease delivery, translation, forwarding, DNS or return traffic.

In depth

libvirt's default NAT network (virbr0, 192.168.122.0/24) uses dnsmasq for DHCP/DNS and iptables/nftables masquerading.

virsh net-list --all
virsh net-dumpxml default
virsh net-dhcp-leases default
virsh net-edit default         # change range, add static hosts

Port forwarding into NAT VMs needs host firewall DNAT rules or libvirt hooks. For servers, use bridged networks instead.

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

Authoritative/upstream documentation reviewed for bounded claims in KVM / QEMU → NAT Network. Documentation verification only; this is not observed lab or production Evidence.

Basis: https://www.qemu.org/docs/master/ · confidence 94%
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
libvirt natdefault networkkvm nat networkvirbr0
Embedded reference data

Quick lookup tables

KVM / QEMU → NAT Network reference map

Fast operational boundaries and evidence limits for KVM / QEMU → NAT Network.

BoundaryWhat to verifyEvidence limit
Definition/configExpected KVM / QEMU → NAT Network definition or configuration is presentConfigured state does not prove runtime behavior
RuntimeRelevant KVM/QEMU/libvirt object or process is active without matching errorsRuntime state does not prove dependencies or guest outcome
DependencyHost CPU/memory, storage, network or device backend required by this path is healthyLocal success does not prove the next boundary
AcceptanceOriginal guest/application test succeeds after the change or observationRequired for end-to-end closure
Confirmation

Confirm action

Continue?