Let’s look at the NetKit network simulator first. NetKit offers some useful prepared labs and provides the NetKit files already installed on a Knoppix LiveDVD. These assets make it easy to try out Netkit.
To take a first look at NetKit, we will load the LiveDVD into a VirtualBox virtual machine running on our computer and follow the steps below to run a simple lab using NetKit.
I think it is simpler to run the network simulation tools in a virtual machine. This makes it easier to use the tool on a computer whose host operating system is not Linux (which is most people), even though it does complicate the setup prices a bit.
Download the VirtualBox version appropriate for your computer’s operating system from the Oracle VM VirtualBox web site: https://www.virtualbox.org. Installing VirtualBox is similar to installing any other type of software.
Download the NetKet disk image
Download the NetKit LiveDVD from the NetKit web site: http://wiki.netkit.org
The LiveDVD ISO file can be downloaded by clicking on the “Official Releases” link and scrolling down until you find the NetKit Live CD/DVD/USB link. The LiveDVD is a 1.1 GB file. In these examples, the filename is Netkit-2.8-K2.8-F5.2.iso.
Create a virtual machine using the NetKit Live DVD ISO image
Now you can install the LiveCD, which will run a version of the Linux operating system with the NetKit scripts already installed.
Run VirtualBox. Click on the “New” icon in the VirtualBox window to start the New Virtual Machine Wizard.
Use all the default settings.
Double-click on the virtual machine in the left side of the window. Follow the prompts. Use all the defaults.
Select the NetKit LiveDVD ISO file from your where you stored it on your computer’s hard drive during the “Select Installation Media” step of the virtual machine creation procedure.
Now a virtual machine running the Knoppix operating system with NetKit already installed is available for your use on your desktop without your having to boot your computer from a DVD. You can still use your computer for other work while using NetKit in the virtual machine.
Now we can run a sample NetKit lab.
In the Knoppix virtual machine, run the IceWeasel browser that comes with the Linux OS and go to the NetKit wiki. Click on the “Official Labs” link and select a lab.
Run the two hosts lab
In this example, we will select the “two hosts” lab. Click on the “Slides” link in the table row and a PDF viewer application will open and show the presentation that describes all the lab procedures.
The lab procedure is very simple but it helps a researcher learn how to use NetKit. It involves starting two UML virtual machines that are networked together and performing the basic configuration required for the two machines to send and receive packets to each other. Then, we test the setup by running pings between each machine and capturing the traffic generated for analysis in the Wireshark application.
Follow the instructions in the slides.
Open the a terminal and start the labs
Enter the following commands into the terminal window:
vstart pc1 --eth0=A
vstart pc2 --eth0=A
You will see two new consoles that are connect to each virtual PC (pc1 and pc2).
We see that we are now running two UML virtual machines inside a host virtual machine (VirtualBox) on a host computer and performance is reasonably good on a dual-core Mac with 4GB of RAM.
Run wireshark by typing
wireshark at the command prompt on the main terminal window.
Find the pcap file from the exercise and load it into wireshark.
Stop the lab by halting the UML virtual machines in NetKit. Two examples:
halt in the pc1 VM console
halt pc2 in the host terminal
The NetKit simulation tool worked well and we learned a few of the commands that NetKit uses to manage the guest operation systems that make up the simulated network. We also practiced some very basic network configuration commands on the two “hosts”, pc1 and pc2, in the simulated network.
However the LiveDVD does not work very well. The web browser and PDF viewer applications crashed frequently. This may be because I tried to run the LiveDVD in a virtual machine. Next time, I will install Linux in the virtual machine Instead of booting from a LiveDVD. I will have to install NetKit but that will also be a useful test of the NetKit system. Ease of installation is important.