Skip to content
All field notes
VirtualizationMay 20241 min read

Networking inside a virtual lab

Bridges, NAT and host-only networks — learning infrastructure by drawing the diagram first.

Why virtual networks

Virtualisation lets you build a network, break it, and rebuild it in an afternoon. It is the closest thing to a flight simulator for infrastructure.

The lab

I set up a few Oracle Linux guests under KVM and experimented with three network shapes:

  1. NAT — guests reach the internet, but the host is the only one who can reach them
  2. Bridged — guests sit beside the host on the physical network, with all the visibility that implies
  3. Host-only — a private world for experiments that should not leak

I also shared storage over NFS between guests to understand how much of "infrastructure" is really about state living somewhere else.

What clicked

Most of the confusion was not about Linux or virtualisation. It was about where a packet is allowed to go and which machine owns which address. Drawing the topology before typing any command saved me more time than any tutorial.

Next

I want to rebuild the same lab with infrastructure-as-code, so the network is described in a file instead of in my memory.

Filed withKVMOracle LinuxoVirtNFS