
How to run TinkerNet

By Morgan Conbere

TinkerNet is a crazy system that has a goal of offering a system that
will allow students to write network stack code and test it on a
virtual network that will work like a real network.




Step 0: Install Linux.  TinkerNet only works with Linux.  I recommend
the most recent version of Ubunutu (TinkerNet was developed on Dapper
Drake).




Step 1a: Install uml-utilities.  On debian or Ubunutu, this is the
package uml-utilities.  If your linux distribution does not have
uml-utilities, they can be downloaded from
http://user-mode-linux.sourceforge.net/.




Step 1b: Install wxPython.  On debian or Ubuntu, this is the package
python-wx2.x (where x is currently 6).




Step 2: Root activities.  Some setup needs to be done as root (or with
root permissions).  Don't worry, if done properly this will not open
up any security holes in your system.


$ sudo chown <username>:<usergroup> /dev/net/tun


where <username> is your username, and <usergroup> is your user group.
For me, this is <mconbere> for both, so I would enter:
	$ sudo chown mconbere:mconbere /dev/net/tun
This gives your user permission to use the tun device to create
network tunnels.  We will use this for TinkerNet virtual networking.

Next we need to edit the sudoers file to allow you, the user, to
configure the tunnel interface.  To do this, we merely add the lines:


User_Alias TINKERS = <username>
Cmnd_Alias IFCONFIGTAP = /usr/sbin/ifconfig tap0 192.168.100.254 up, \
                         /usr/sbin/ifconfig tap1 192.168.200.254 up
TINKERS 127.0.0.1=(root) NOPASSWD: IFCONFIGTAP


Using the visudo program.




Step 3: Run they umlconfig.py program:

$ ./umlconfig.py

This will set up the virtual network tunneling devices.  You should
recieve a message:

    Creating devices...




Step 4: Start the tinkernet.py program:

$ ./tinkernet.py

This will start the backend server code for tinkernet.  Now tinkerboot
can connect to tinkernet to actually launch networking code!




Step 5: Start the tinkerboot.py program:

$ ./tinkerboot.py

This will start the frontend client code to control the uml launching
and testing.  Good luck!




Step 6: Working with tinkerboot.py:

Tinkerboot has a nice interface for you to work with.  After you have
compiled your code, go to the <kernel> menu, and select <select and
boot>.  This will allow you to select the proper compiled stack
executable.




Step 7: Cleaning up:

To get rid of the devices created, run:

$ ./umlconfig.py -d