Friday, 9 March 2012

Installing And Configuring DSR protocol on Ubuntu 10.04

NOTE: Before start installing and configuring DSR protocol over Ubuntu 10.04 what i want my reader is to clearly follow my steps as the way Im putting then down.
When i started working on this as usual i was expecting lot of help from the Google but as the way it turns out, there was no help on the Google at all.
Thats why i took the initiative to write this tutorial for the people out there who want to install it and configure DSR.
Now i presume that you must have Ubuntu 10.04 installed (Completely Updated) .
At the time of writing this it was running with kernel module 2.6.32-39,
It wont work on this,
So in order to install it what we need is an older kernel module, what we be needing is kernel module 2.6.32 (plain) nothing else.
This can be very hectic work as in order a kernel module (custom one) lot of people suggest about building it from scratch.
What i found was a shortcut.
Just download the three files from Ubuntu mainline


Keep them in the same order,
Do-not mess up the order,
As you can see they are deb files so just double click on them will start the installation.
Double click on first,let it finish, then on second, and go on till third one,
I Repeat do-not mess up the order, keep it the way i have pasted down the links

Once you finish with that it will ask for a reboot,

Now assume when come back to this page you will be on your own installed kernel that is 2.6.32, if you want to check which kernel version are you on then just do this,

Open terminal and execute #sudo uname -r

It will show you the kernel version you are on.
If you find you are not in the version which you desired, then restart your machine and hold shift till a screen appears which gives you the option of booting into desired kernel version, select 2.6.32 and hit enter.

I assume now you are on the kernel version 2.6.32, now moving on you would need the DSR source tarball.

I have found the tarball which is compatible with our kernel module.
The link is below,


Moving on i assume you have saved the DSR source files (tarball) to the directory home/user/Downloads

Go the directory Downloads and double click on the GNU tarball and extract it in the same folder,

But before proceeding you need to make your IP static,
To do that you need to do work,
Open terminal and start putting down these command,

#sudo su  /* to gain root privileges*/

Note: Now im assuming you have root access 

#cd\  ( to go to root directory )
#cd /etc/network
#gedit interfaces

This should open a file which will be something like this,

auto lo
iface eth0 inet loopback

Do-not touch these lines, rather just below them add these lines,
Note: dont forget to check your interface and your ip before inserting these lines to interfaces file, to do this simple open terminal and run command #ifconfig , this will show your interface and your current IP.

auto eth0
iface eth0 inet static
address 192.168.1.100
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255
gateway 192.168.1.1

Which will end up as the file looking like this,

auto lo
iface eth0 inet loopback
auto eth0 
iface eth0 inet static
address 192.168.1.100
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255
gateway 192.168.1.1

Save the file and close it.

Now go back to the terminal and enter these commands,

#cd\
#cd /etc/init.d
#./networking restart

After this is done now go back to the folder where you extracted the GNU tarball of DSR.
Now im expecting it to be by the name of the folder - trunk.
Now open terminal and start putting these commands,

#sudo su
#cd /Downloads/trunk
#make ignore the warnings and keep moving ahead )
#make install

Now to go the trunk folder which is located inside the Downloads folder & open dsr-uu.sh and you will find a line like this right in the beginning of it,

IFNAME=eth1 

Change it to the interface you are working upon,
I assume eth0 , if not sure then again in terminal do #ifconfig and look for the interface that has the your IP, note the interface and change that in the dsr-uu.sh file,it should look like this,

IFNAME=eth0

Now look down in the file and you will find a place like this,

$IFNAME 92.168.45.$host_nr up

And a little below,

dsr0 192.168.45.$host_nr up

Change the ip address to the one which you have, i changed it to mine like this,

$IFNAME 192.168.1.$host_nr up

And the other line as-well,

dsr0 192.168.1.$host_nr up

Notice the change that i did, you should alter it according to your ip address.
Now close the terminal and open it back again and start putting in the command as below,

#sudo su
#cd /Downloads/trunk
#chmod 755 dsr-uu.sh
#./dsr-uu.sh start eth0

In my case it was eth0 you should put down the interface which you want it to get attached to,the DSR will be running.
To stop it simply do,

#./dsr-uu.sh stop

Thats ends my tutorial of how to configure and install and run the DSR protocol on ubuntu 10.04 LTS. I hope i have explained all the step as in detail and as easy as possible. If you are running through problems comment below and i will try to answer back your queries as early as possible, i hope it helps anybody out there !!!


1 comment:

  1. hello sir
    this link is not available
    please repair it beacause i need it
    thank you
    http://dsruu.svn.sourceforge.net/viewvc/dsruu/trunk/?view=tar

    ReplyDelete