HowTo test netsukuku daemon on real hardware

On Linux

The following commands have been tested in a Ubuntu environment.
The procedure should work in any linux distro when you have installed the appropriate packages.

Dependencies

Open a terminal and give these commands:

luca@luca-laptop:~$ sudo apt-get update
luca@luca-laptop:~$ sudo apt-get install build-essential
luca@luca-laptop:~$ sudo apt-get install swig
luca@luca-laptop:~$ sudo apt-get install openssl libssl-dev
luca@luca-laptop:~$ sudo apt-get install xsltproc tinc

Now, we install Stackless Python.

luca@luca-laptop:~$ wget http://www.stackless.com/binaries/stackless-262-export.tar.bz2
luca@luca-laptop:~$ tar xf stackless-262-export.tar.bz2
luca@luca-laptop:~$ cd stackless-2.6.2
luca@luca-laptop:~/stackless-2.6.2$ mkdir -p /opt/stackless
luca@luca-laptop:~/stackless-2.6.2$ ./configure --prefix=/opt/stackless
luca@luca-laptop:~/stackless-2.6.2$ make
luca@luca-laptop:~/stackless-2.6.2$ sudo make altinstall
luca@luca-laptop:~/stackless-2.6.2$ cd

Now, we install M2Crypto

luca@luca-laptop:~$ wget http://pypi.python.org/packages/source/M/M2Crypto/M2Crypto-0.20.1.tar.gz
luca@luca-laptop:~$ tar xf M2Crypto-0.20.1.tar.gz 
luca@luca-laptop:~$ cd M2Crypto-0.20.1/
luca@luca-laptop:~/M2Crypto-0.20.1$ /opt/stackless/bin/python2.6 setup.py build
luca@luca-laptop:~/M2Crypto-0.20.1$ sudo /opt/stackless/bin/python2.6 setup.py install
luca@luca-laptop:~/M2Crypto-0.20.1$ cd

Now, we install dnspython.

luca@luca-laptop:~$ wget http://www.dnspython.org/kits/1.7.1/dnspython-1.7.1.tar.gz
luca@luca-laptop:~$ tar xf dnspython-1.7.1.tar.gz
luca@luca-laptop:~$ cd dnspython-1.7.1
luca@luca-laptop:~/dnspython-1.7.1$ /opt/stackless/bin/python2.6 setup.py build
luca@luca-laptop:~/dnspython-1.7.1$ sudo /opt/stackless/bin/python2.6 setup.py install
luca@luca-laptop:~/dnspython-1.7.1$ cd

Get netsukuku

Get from the svn repository the current code of Netsukuku.

luca@luca-laptop:~$ svn co http://dev.hinezumi.org/svnroot/netsukuku/sandbox/lukisi/branches/multipleip netsukuku

So that ~/netsukuku/pyntk contains the current python version of netsukuku.

Now, we install andns.

luca@luca-laptop:~$ cd ~/netsukuku/ANDNS/andns
luca@luca-laptop:~/netsukuku/ANDNS/andns$ make
luca@luca-laptop:~/netsukuku/ANDNS/andns$ sudo make install
luca@luca-laptop:~/netsukuku/ANDNS/andns$ cd ~/netsukuku/ANDNS/pyandns
luca@luca-laptop:~/netsukuku/ANDNS/pyandns$ /opt/stackless/bin/python2.6 setup.py build
luca@luca-laptop:~/netsukuku/ANDNS/pyandns$ sudo /opt/stackless/bin/python2.6 setup.py install
luca@luca-laptop:~/netsukuku/ANDNS/pyandns$ cd

Now, we install ntkresolv.

luca@luca-laptop:~$ cd ~/netsukuku/ntkresolv
luca@luca-laptop:~/netsukuku/ntkresolv$ make
luca@luca-laptop:~/netsukuku/ntkresolv$ sudo make install
luca@luca-laptop:~/netsukuku/ntkresolv$ cd

We do not install netsukuku; we'll launch the daemon from its directory.
But we have to prepare its configuration directory.

luca@luca-laptop:~$ sudo mkdir -p /etc/netsukuku
luca@luca-laptop:~$ sudo ln -s $HOME/netsukuku/pyntk/setup/etc/netsukuku/tinc /etc/netsukuku

Start pyntk

Open a terminal. Go to the "pyntk" directory, where you find the file "ntkd". Launch the daemon with the Stackless interpreter and specify the NICs you want to manage. Remember to disable any other manager that might interfere with the parameters of those NICs, such as NetworkManager.

luca@luca-laptop:~$ cd netsukuku/pyntk
luca@luca-laptop:~/netsukuku/pyntk$ sudo /opt/stackless/bin/python2.6 ntkd -i eth0 eth1 -vvvv

The flag -vvvv make it to produce a very verbose output. You can redirect it to some file for later examination.