Netkit Seminar

This sem has been pretty bad for me, compared to the last sem. There are such a lot of subjects, labs and reports to make and write that none of them actually gets done. I now am beginning to see the logic behind thumbi’s plans to go to the Himalayas leaving engg education behind. I guess, I must ask him whether I can accompany him too.

When I was trying to concentrate on not thinking about studies and doing some innocent(read useless) surfing, I came across a nice application called Netkit. Now, as some of us pretend to know, Networking is best learned through experimentation and not by reading Kurose and Ross from the last to the first page?! Netkit contains a virtual machine’s file system, its kernel and a management interface.

As many instances of the virtual machine can be started as we wish to. The virtual machine, runs a modified Debian distro and contains the full suite of applications that one would find on an ordinary computer, excpet the gui. Each virtual machine takes around 15 MB of RAM and runs in the user space. The virtual machines can be configured as routers, switches, servers, clients etc. by running the appropriate software on them. They can be connected to vitual collision domains or even to to your LAN through a network bridge with your systems LAN card. But, that, will require admin privileges, i guess.

Thus, you can make any network configuration you want and try out stuff on it. You can pick up the packets through an application called TCPDUMP and save it to your host computer. You can later analyse them using Wireshark or other such software. The host computers home folder is mounted in the guest file system and this makes saving things to the host computer very simple.

Its also possible to confiugure network labs and start them up at one go.

More info can be found at

After, reading all this stuff I saw the potential for disrupting my studies further, using this and immediately grabbed the oppurtunity. I downloaded the software and let Thumbi figure out how to use it. After that we decided to put our luck to test and decided to give a seminar to our unwilling friends on Netkit and prepared a text file containing all the things that we would try out in the class. I have posted it here. I guess Thumbi has posted the slides on his blog. The text file contains details about the particular setup that we demonstrated. It was reasonably boring.

But, I had a very strange experience while conducting the seminar. Some of the front benchers actually listened and answered some of my questions. Now, the questions werent easy as it required one to think on our lines. But they coolly belted out the answer. It was then that I realized why they always manage 9 point GPA. They are so absorbent.

Anyway, apart from the fact that I was late for our own seminar and that we hadnt announced it earlier because of which a lot of unsuspecting guys found themselves in a class for which there was no attendance, the seminar went pretty smoothly with me making the noise and Thumbi demonstrating the things on my laptop.

I used the rare oppurtunity to throw around some wight with comments like, ” We would have demonstrated DNS cache poisoning too, if we had a little more time”… Thumbi was scared for a sec, but I am a pro in matters like these and the bluff wasnt called.

But, we did demonstrate the setting up of a DHCP server…

This was our seminar’s structure-
1. Starting a virtual machine and configuring its lan interface
vstart, vlist, halt, vhalt commands
explaining collision domains and simple shell commands for accessing home folder etc.
ifconfig, route, tcpdump, ping, traceroute/path,
2. Starting a second virtual machinea and connecting it to the same collision domain.
Configuring ip address. Short talk on ARP. Show them the ARP table
TCPDUMP example
Ping from one pc to the other
ssh in action
dumping the file to host home and viewing with wireshark
Short talk on TCP seq no and ackno

3. Connect a router with two interfaces to the collision domain.
Configuring router’s ip address.
4.Starting one more virtual machine and connecting them to the cd2(eth1 of router 1)
Configuring the ip address of pc3 and eth1@router1’s
Checking Subnet 2
Try pinging subnet 1. Explain why it will not work.
Setting the gateway in subnet 1 and trying to ping from subnet 1 to two. Then configure and test the other way too
Show ARP in action by running tcpdump on one computer in each subnet.
5. Connecting a router to cd 2
configuring its ip address.

but trying to ping from subnet 1 to router2 will fail as gateway of router2/eth0 is not configured. This happens because echo reply cannot make its way back.
therefore we configure gw of router 2 eth0
all interfaces are interlinked now

6. Connecting pc4 to router2 eth1 and configuring the interfaces in subnet 3
explain how configuration is going to be symmetric now
pinging from pc5 to router 1 will not work now. can u guess why? echo reply not able to make its way back from router 1 subnet 3
therefore we add a route in router 1 for reaching computers in subnet 3. Explain how routing algorithms simplify this task in big networks
pinging from pc4 to pc3 will not work because echo reply will be routed through router 1 because we configured only a defalut route for pc3. therefore we have to delete the default route and add two specific routes in pc3.
we use only default routes in all routers. This will create problems in bigger networks. Therefore configure static routes using more specific settings.

7. One more ssh demo

8. Setting this much up was a lot of work. This can autmated using lab.conf, lab.dep, and separate startup scripts for each vm.
Such a lab can be started using the command lstart and stopped using lhalt

10. How to setup up a dhcp server – simple one
vstart pc5 on subnet 1
on pc1:
editing /etc/dhcp3/dhcpd.conf
adding the line subnet {;}
running dhcpd3

on pc5:
running dhclient


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s