Introduction Lab
Introduction to Netkit - ABR Lab#
For this lab we are going to create three machines a, b, and r, launch them using lstart, and finally analyse the contents of their .startup files. The resulting folder structure should look roughly as follows:
The final network mapping is illustrated below.

note
Please ensure Netkit is installed correctly prior to following these steps. This lab will not work without Netkit running on your machine.
Creating a, b, and r#
Start by creating a folder for our lab, which we will name abr. You may want to do this within an nklabs directory, which can then be used for future labs. Change directory (cd) to this new abr folder.
Create .startup files for each machine, a lab.conf file, and a lab.dep file. The braces {...} are used here to allow you to create multiple files at once (brace expansion). In other words, {a, b}.txt would result in a.txt and b.txt.
Next, edit the contents of each file using your favourite text editor (e.g. gedit, vim, nano, etc.)
We are going to put in the parameters from the network diagram into the various files. Understanding the contents of the files is left as an exercise for the reader. It is worth noting that you don't have to set a MAC address - Netkit will do this for you, however you can override this as shown below.
note
It is advisable to type out the contents of the files below manually rather than copy-pasting them.
a.startup#
b.startup#
r.startup#
lab.conf#
Before launching Netkit we need to create a folder for each machine.
Finally, we are ready to launch the machines. Run lstart and you should see terminal windows pop up for machines a, b, and r.

To kill the machines, just run lcrash in your original terminal window.
Voilà! You have successfully created your first Netkit lab.
🐸