Skip to content

To watch a packet cross a router, you need a sending machine, a router, and a receiving machine. You have one computer. You do not need to buy more computers or install an operating system for every device in the story. The course builds the lab machines inside one Ubuntu installation.

By the end, you can find each machine in the drawing. You can also explain why lab messages cannot reach your real network.

A virtual machine, or VM, is a computer made by software that runs an operating system inside your computer. VirtualBox runs the course’s Ubuntu VM. VM, WSL, live media, and bare metal compares this with other ways to run Linux.

Before typing, look at which window you are using. The Ubuntu desktop is inside the VirtualBox window on your real computer. You install the supplied lab tool inside Ubuntu. You do not install it in your real computer’s terminal.

If you completed the Linux course’s setup, reuse that VM. Otherwise, the next lesson points to the same installation steps. You need no other Linux lessons before starting this Networking module.

The tool creates laptop, phone, router, and web inside Ubuntu. Each has its own interfaces, addresses, and routes. A lab machine has its own network settings inside the VM.

They are not separate operating systems. They share the VM’s files, accounts, and installed programs. On the network, they act as separate machines. For example, laptop and web can have different settings.

Keep this in mind when you save notes. The machines share files in your home folder. Entering another lab machine does not give you a separate copy. But changing one machine’s address changes only that machine’s network settings.

The tool builds the same lab network each time. A topology describes which devices are connected and how. Here, a home network reaches a site network through router.

One VM contains the closed lab network Your computer contains an Ubuntu VM. Inside it, laptop and phone join home on the left, router joins home to site in the middle, and web belongs to site on the right. There is no outside connection. Switches are omitted. Your computer Ubuntu VM Lab network (closed) home site laptop phone router web
One VM contains the closed lab network Your computer contains an Ubuntu VM. Inside it, laptop and phone join home, router joins home to site, and web belongs to site. There is no outside connection. Switches are omitted. Your computer Ubuntu VM Lab network (closed) home site laptop phone router web
Simplified model. Your computer contains one Ubuntu VM, which contains the closed lab network: laptop and phone on home, router joining home to site, and web on site.

The outer box is your computer. The next box is Ubuntu. The inner box holds the lab network. The drawing shows which machines connect and where they run. It leaves out the switches and each machine’s interfaces.

Each name stands for a device in the course story. laptop is not your physical laptop, and phone is not your real phone. web supplies the page that the story follows. The tool sets the addresses. Copy them when needed; you do not need to work out what each part means yet. Each name has its role directly below it.

Machine and role Network Address
laptop
Client
home 10.77.10.10/24
phone
Device
home 10.77.10.11/24
router
Router
home and site 10.77.10.1/24 and 10.77.20.1/24
web
Server
site 10.77.20.80/24

The switch sw-home connects the home interfaces. The switch sw-site connects the site interfaces. The router has a connection to each network. These are the same device jobs you already met in Devices, Links, and Connections.

The lab network has no route to the VM’s own network or to the internet. The VM can use its own internet connection to install packages, but a lab machine cannot use that connection. The name home means the practice network inside the lab. It does not mean your real home LAN.

Predict: if the Ubuntu desktop can download a file, does that mean phone can reach an internet website?

Check your answer

No. The VM’s own connection and the lab network are separate. There is no outside route from phone.

A test service could give real devices wrong settings and stop them from connecting. Keep test services inside the closed lab network. Their messages cannot reach your real devices there. Do not connect the lab switches to your real LAN.

“Each lab machine is its own VM.” There is one Ubuntu operating system, with shared files and programs. The machines have separate network settings.

“This network experiment can break my home network.” The supplied lab has no path there. The lab keeps network messages inside it. But the machines still share your VM’s files. Deleting a shared file removes it for all of them.

Explain whether you should still see a file saved on web when you enter phone. Then explain whether changing web’s address should also change phone’s address.

Solution

You still see the file because the machines share the VM’s files. Only web gets the changed address because each machine has its own network settings. Sharing files does not mean sharing addresses.

The tool uses Linux network namespaces to keep each machine’s network settings separate. How namespaces work is an Advanced topic. You can use the tool without setting them up yourself.

  • One Ubuntu VM contains the lab machines.
  • Their network settings are separate; their files and programs are shared.
  • The lab’s home and site networks have no outside connection.

Next, Installing the lab builds the lab network.