Download and install netsukuku on a ubuntu machine

Install packages for building.

sudo apt-get install build-essential -y &&
sudo apt-get install pkg-config -y &&
sudo apt-get install libglib2.0-dev libpth-dev libgee-0.8-dev -y &&
sudo apt-get install libgcrypt20-dev -y &&
echo ok

Prepare a directory for compilation.

mkdir ~/netsukuku-dev
cd ~/netsukuku-dev
for pkg in tasklet-1.0.tar.gz zcd-1.0.tar.gz netsukuku-rpc-1.0.tar.gz \
       andns-rpc-1.0.tar.gz ntkresolv-1.0.tar.gz netsukuku-1.0.tar.gz
do
 wget http://download.savannah.gnu.org/releases/netsukuku/${pkg}
 tar xf ${pkg}
done

Compile.

cd ~/netsukuku-dev/tasklet-1.0 &&
./configure --enable-logtasklet --prefix=/usr &&
make &&
make check &&
sudo make install


cd ~/netsukuku-dev/zcd-1.0 &&
./configure --enable-logtasklet --prefix=/usr &&
make &&
sudo make install


cd ~/netsukuku-dev/netsukuku-rpc-1.0 &&
./configure --enable-logtasklet --prefix=/usr &&
make &&
sudo make install


cd ~/netsukuku-dev/andns-rpc-1.0 &&
./configure --enable-logtasklet --prefix=/usr &&
make &&
make check &&
sudo make install


cd ~/netsukuku-dev/ntkresolv-1.0 &&
./configure --enable-logtasklet --prefix=/usr --sysconfdir=/etc &&
make &&
make check &&
sudo make install


cd ~/netsukuku-dev/netsukuku-1.0 &&
./configure --enable-logtasklet --prefix=/usr --sysconfdir=/etc &&
make &&
make check &&
sudo make install

Configure machine to resolve names

You can see a sample configuration of the resolver library in /usr/share/doc/ntkresolv/ntkresolv.ini.sample

You have to edit the configuration file in /etc/ntkresolv/ntkresolv.ini

sudo vi /etc/ntkresolv/ntkresolv.ini

Configure like this:

[NTKRESOLV]
ANDNASERVER=127.0.0.1

To instruct your system resolver to use ANDNA edit the configuration file /etc/nsswitch.conf and place "andna [NOTFOUND=return]" before "dns" in the line for the database "hosts".

sudo vi /etc/nsswitch.conf 

There should be a line like this:

hosts:          files andna [NOTFOUND=return] dns

Configure the daemon settings

There are a few settings that are configurable and influence the behaviour of the daemon.

See a sample file in /usr/share/doc/netsukuku/ntkd.ini.sample

The settings are in /etc/netsukuku/ntkd.ini

Change settings only if you do know what you are doing.

sudo vi /etc/netsukuku/ntkd.ini

Start / stop the daemon

Open a terminal.

You have to know which network cards (NIC) you want to handle with netsukuku. For instance you can have one or more ethernet ports in your computer.
You can have a WiFi card. In this case connect to a wireless network before launching the daemon.

Find the name of the NICs with

ip l

Launch the daemon with the NICs you want to use (eth0, eth1, wlan0, ...)

sudo ntkd -i eth0 -i eth1 -i wlan0

The daemon will not exit, so you have to leave the terminal open.

When you want to stop the daemon and exit netsukuku, press CTRL-C and it will remove all the configurations that it had set up.

Test the network

From another terminal check your IP configuration.

ip a
ip r list table ntk

Also verify that you have registered a name.
For example, if your computer has hostname 'mylaptop' then it should have tried to register the name 'mylaptop.ntk'.

ping mylaptop.ntk

Netsukuku_Dev/1_0/ubuntu (last edited 2014-07-29 13:44:28 by lukisi)