Skip to content

03 Host-only network ​

Two VMs that only the Mac can reach: no NAT, so no internet. Good for anything that must stay offline.

What you practice ​

  • Host mode: a switch with nat4: false and nat6: false
  • The Mac is still a member of the switch and gets its first address

Topology ​

NodeImageCPUs / memoryAddressesRole
adebian-131 / 1GiBlan 10.103.0.11Offline VM
bdebian-131 / 1GiBlan 10.103.0.12Offline VM

Before you start ​

bash
vz image pull disk debian-13

Run it ​

bash
cd examples/03-host-only-network
vz validate
vz up
vz node ls
ssh lab@10.103.0.11        # password: lab

Try it ​

bash
ping -c 2 10.103.0.11                          # the Mac reaches the VMs
ssh lab@10.103.0.11 'ping -c 2 10.103.0.12'    # the VMs reach each other
ssh lab@10.103.0.11 'ping -c 2 -W 2 1.1.1.1'   # but not the internet

Clean up ​

bash
vz down
vz destroy --yes   # deletes the overlays and state of this lab