Skip to content

Installing the lab

Module
Building Your Networking Lab
Difficulty
Easy
Updated
Tested on
Ubuntu 24.04.5 LTS Docker lab, netlab 1.0, GNU Bash 5.2.21; installation and screenshot on owner's Ubuntu 24.04.4 LTS VM
On this page

A lab you cannot rebuild is a lab you are afraid to break. Install the tool and check its machines against the cast. Then stop and rebuild the network before changing any settings.

Reuse your Ubuntu 24.04 LTS VM from the Linux course. If you do not have one, follow Creating and installing the VM. That lesson links to the Ubuntu download steps. Return here when the Ubuntu desktop works.

Allow about 300 MB of free disk space for packages if none are installed. With every mode turned on, the lab uses about 85 MB of memory. Ubuntu needs memory too.

Before installing, shut Ubuntu down and take a VirtualBox snapshot named before-netlab. A snapshot saves the VM so you can return to it later. Use VirtualBox’s machine menu and Snapshots, then Take. Start Ubuntu again afterward. The Linux lesson Network modes and snapshots explains the recovery steps.

Press Ctrl+Alt+T on the Ubuntu desktop. A terminal is a window where you type commands and read their answers. The prompt ends with $; type after it. Do not copy the prompt itself.

Type one command, press Enter, and wait for the prompt to return before typing the next. Spaces and letter case matter. A command may print an answer or finish without printing anything. A command can fail without printing an answer. Read any error before continuing.

sudo gives a command permission to change system settings. When it asks for a password, enter your Ubuntu account password and press Enter. Nothing appears as you type, including dots. That is expected. For a short time afterward, another command may run without asking again.

Run these commands in the terminal inside Ubuntu, one at a time:

Terminal window
wget https://rootvolt.dev/downloads/netlab-1.1.tar.gz
wget https://rootvolt.dev/downloads/netlab-1.1.tar.gz.sha256
sha256sum -c netlab-1.1.tar.gz.sha256
tar -xzf netlab-1.1.tar.gz
sudo sh netlab-1.1/install.sh

wget downloads a file. The second file holds a checksum: a value that lets you check the downloaded archive for damage. sha256sum -c compares the download with it. Continue only if it reports that the archive passed. If checking fails, stop and download both files again.

tar -xzf unpacks the archive into the named folder. The final command installs the lab tool and programs for reading settings and recording traffic. The VM needs internet access to download them. Wait for the installer to finish; a progress message does not mean it has finished.

During installation, the Wireshark package asks Should non-superusers be able to capture packets? Choose No, because the course uses sudo to capture lab traffic rather than giving ordinary users permission to capture. Use Tab or the arrow keys to select No, then press Enter.

Ubuntu package configuration in GNOME Terminal asks whether non-superusers should be able to capture packets, with Yes and No choices.
The Wireshark package question on the owner’s Ubuntu 24.04.4 LTS course VM; the owner answered No.

This is the end of the owner’s run of the same installer on the Ubuntu 24.04.4 LTS course VM. The … line marks earlier output left out here. The package messages end with a line saying the lab tool is installed:

…
Setting up wireshark-common (4.2.2-1.1build3) ...
Setting up tshark (4.2.2-1.1build3) ...
Processing triggers for shared-mime-info (2.4-4) ...
Processing triggers for hicolor-icon-theme (0.17-2) ...
Processing triggers for libc-bin (2.39-0ubuntu8.9) ...
Processing triggers for ufw (0.36.2-6) ...
Processing triggers for man-db (2.12.0-4build2) ...
Processing triggers for dbus (1.14.10-4ubuntu4.1) ...
netlab is installed. Start the lab with: netlab up

Run the commands in this verified course lab replay. netlab up creates the network. netlab status lists what exists. The tool asks for your password when needed.

Start the lab and check its cast
learner@rootvolt:~$ netlab up[sudo] password for learner: Lab is up: laptop, phone, router, web.
Run `netlab status` to see the machines and their addresses.learner@rootvolt:~$ netlab statusLab is up. Modes on: none. Fault: none.

MACHINE  NETWORK     ADDRESS                      DEFAULT ROUTE  COMPARED WITH THE START
laptop   home        10.77.10.10/24               10.77.10.1     same
phone    home        10.77.10.11/24               10.77.10.1     same
router   home, site  10.77.10.1/24 10.77.20.1/24  -              same
web      site        10.77.20.80/24               10.77.20.1     same

Switch sw-home (home): laptop, phone, router
Switch sw-site (site): router, web
Services: web http 80, web https 443, web http 8080, web ssh 22learner@rootvolt:~$ 

Step-by-step replay of a verified session · Recorded on Ubuntu 24.04.5 LTS, networking lab (netlab 1.0), GNU Bash 5.2.21. Start the lab from the VM, then compare the machine list with the fixed cast.
Steps (9)
  1. Type netlab up
  2. Press Enter
  3. Output: [sudo] password for learner:
  4. Type the password (the terminal shows nothing)
  5. Press Enter
  6. Output: Lab is up: laptop, phone, router, web. Run `netlab status` to see the machines and their addresses.
  7. Type netlab status
  8. Press Enter
  9. Output: Lab is up. Modes on: none. Fault: none. MACHINE NETWORK ADDRESS DEFAULT ROUTE COMPARED WITH THE START laptop home 10.77.10.10/24 10.77.10.1 same phone home 10.77.10.11/24 10.77.10.1 same router home, site 10.77.10.1/24 10.77.20.1/24 - same web site 10.77.20.80/24 10.77.20.1 same Switch sw-home (home): laptop, phone, router Switch sw-site (site): router, web Services: web http 80, web https 443, web http 8080, web ssh 22

Compare each machine with the previous lesson’s table. The word same means its settings match the start. The switch lines show which machines connect. The services line names the programs running on web. You do not need to read the service numbers yet.

At the VM prompt, follow this second replay. netlab down removes the running network. netlab up builds it again. Compare netlab status with the first start.

Stop, start, and check the lab
learner@rootvolt:~$ netlab down[sudo] password for learner: Lab is down.learner@rootvolt:~$ netlab upLab is up: laptop, phone, router, web.
Run `netlab status` to see the machines and their addresses.learner@rootvolt:~$ netlab statusLab is up. Modes on: none. Fault: none.

MACHINE  NETWORK     ADDRESS                      DEFAULT ROUTE  COMPARED WITH THE START
laptop   home        10.77.10.10/24               10.77.10.1     same
phone    home        10.77.10.11/24               10.77.10.1     same
router   home, site  10.77.10.1/24 10.77.20.1/24  -              same
web      site        10.77.20.80/24               10.77.20.1     same

Switch sw-home (home): laptop, phone, router
Switch sw-site (site): router, web
Services: web http 80, web https 443, web http 8080, web ssh 22learner@rootvolt:~$ 

Step-by-step replay of a verified session · Recorded on Ubuntu 24.04.5 LTS, networking lab (netlab 1.0), GNU Bash 5.2.21. Stop the lab, start it again, and confirm the same machines, addresses, and default routes.
Steps (12)
  1. Type netlab down
  2. Press Enter
  3. Output: [sudo] password for learner:
  4. Type the password (the terminal shows nothing)
  5. Press Enter
  6. Output: Lab is down.
  7. Type netlab up
  8. Press Enter
  9. Output: Lab is up: laptop, phone, router, web. Run `netlab status` to see the machines and their addresses.
  10. Type netlab status
  11. Press Enter
  12. Output: Lab is up. Modes on: none. Fault: none. MACHINE NETWORK ADDRESS DEFAULT ROUTE COMPARED WITH THE START laptop home 10.77.10.10/24 10.77.10.1 same phone home 10.77.10.11/24 10.77.10.1 same router home, site 10.77.10.1/24 10.77.20.1/24 - same web site 10.77.20.80/24 10.77.20.1 same Switch sw-home (home): laptop, phone, router Switch sw-site (site): router, web Services: web http 80, web https 443, web http 8080, web ssh 22

The machine names, networks, addresses, and default routes match the first status. Every machine reads same. These settings come from the supplied cast. Ubuntu and the installed tool stay in place, ready for the next start.

“Something looks wrong, so reinstall Ubuntu.” A changed lab setting usually needs netlab reset, which the reset lesson teaches. Reinstalling Ubuntu can also lose other work in the VM. A lab reset changes much less.

Before rebuilding again, predict which status columns could change afterward: machine, network, address, default route, or comparison with the start. Explain whether stopping and starting should keep a setting you changed by hand.

From the VM prompt, stop the lab, start it, and inspect status using the commands in the replay. Check web’s address against the cast table, then compare the other columns with your prediction.

Solution

In the captured rebuild, web again has 10.77.20.80/24. Machine names, networks, addresses, and default routes match the first start; every comparison reads same. A setting changed by hand does not stay after a rebuild. If you started with changed settings, the comparison could go from changed to same. The tool puts the cast’s settings back. Compare both status readings to see what the rebuild kept and what it removed.

  • Install inside Ubuntu after taking a snapshot.
  • Check the archive before running its installer.
  • Compare status with the cast after every rebuild.

Next, Reading a machine’s network settings shows how to read each machine’s settings.