Wednesday, February 9, 2011

Installing NS2 in UBUNTU

I am using Ubuntu 9.04 and the steps to install  ns-allinone-2.34 on it are as follows:

(1) Download ns-allinone-2.34 and Install

$ wget http://www.isi.edu/nsnam/ns/ns-build.html#allinone

$ tar -xzvf ns-allinone-2.34.tar.gz
$ cd ns-allinone-2.34
$ sudo apt-get install build-essential autoconf automake libxmu-dev

$ ./install
$ sudo apt-get install -f build-essential libxt-dev libxt6 libsm-dev
libsm6 libice-dev libice6 libxmu-dev

(2) Change your environment variance

$ gedit ~/.bashrc

Add the following lines to the end ofthe file bashrc

# LD_LIBRARY_PATH

OTCL_LIB=/your path/ns-allinone-2.34/otcl-1.13

NS2_LIB=/your path/ns-allinone-2.34/lib

X11_LIB=/usr/X11R6/lib

USR_LOCAL_LIB=/usr/local/lib

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$OTCL_LIB:$NS2_LIB:$X11_LIB:
$USR_LOCAL_LIB

# TCL_LIBRARY

TCL_LIB=/your path/ns-allinone-2.34/tcl8.4.18/library

USR_LIB=/usr/lib

export TCL_LIBRARY=$TCL_LIB:$USR_LIB

# PATH

XGRAPH=/your path/ns-allinone-2.34/bin:/your path/ns-allinone-2.34/tcl8.4.18/unix:/your path/ns-allinone-2.34/tk8.4.18/unix

NS=/your path/ns-allinone-2.34/ns-2.34/

NAM=/your path/ns-allinone-2.34/nam-1.14/

PATH=$PATH:$XGRAPH:$NS:$NAM

(PS:  your path should be replaced by the path to " ns-allinone-2.34" folder in the system,  
 2.34 should be replaced by the latest version or update of the NS2 software being installed,
tcl8.4.18 or tk8.4.18 or nam-1.14 should be replaced by the exact folder name in the ns-allinone-2.34 directory)

$ source ~/.bashrc
If installation is complete the above command won't show any bash errors.

$ ns
then a "%" will appear on the screen.type "exit" to quit the mode and
back to "$"

(3) Validation
After these steps, you can now run the ns validation suite with


$ cd ns-2.34
$ ./validate

Monday, January 25, 2010

Mukti..........where freedom speaks!!!!

  India has sought its freedom after immense adversity and today it is celebrating its Republic Day for the 60th time. Who likes to be monitored by other authorities?? Even a kid of five years loves freedom, embraces "mukti". Mukti has lot more implications in different dimensions. It should be adopted in every sphere of life. It should be nurtured in every living being, as gone are days of fawning and servility. So we must inculcate the attitude of not submitting to any power, unless we introspect it and our mind signals in green.
  "Mukti", is an  annual technical festival embarking Free and Open Source Softwares (FOSS). It is organised by GNU/Linux Users Group of NIT Durgapur and boasts of participation from across the globe. The events are designed to test your technical acumen on an open source platform. Besides there are workshops and tech-talks to be delivered by  distinguished personalities which will certainly take your cognizance and technical insights to the next level.
  If you are a FOSS enthusiast then Mukti will be your place to be between 5th and 7th of February' 2010. If you are not a FOSS supporter  or a Linux user yet , then try your  hands on , explore it with your strong inquisition as it gives you the wings of freedom. So,this "Mukti" will be the place to start your journey and GNU/Linux User Group will always be there to extend helping hands to you .
To know more about "Mukti", check out  http://mkti.in.

Tuesday, September 15, 2009

Bsnl Broadband Connection setup in Ubuntu

We need to create a point to point protocol connection to make the modem interface active.
**Method I:
Connecting broadband through command-line-Bridge Mode
/* all ubuntu versions*/
Note: your modem must be set in bridge mode
Steps:
1. Open a terminal
2. Type sudo pppoeconf
3. Enter sudo password if prompted
4. A window with blue screen pops up notifying the devices that are found
5. Follow the on screen instructions and press yes till you reach the screen which asks you to enter username
6. Backspace to delete the text username and then enter the username your ISP has provided you with
7. Press yes again and then enter the password
8. Follow the instructions till it asks you "Do you want to start the connection at start up."
Give yes if you want.
9. After setup is complete you will be prompted with a message in the terminal
10. To start the connection type pon dsl-provider in the terminal
Now, your internet connection gets activated.

11. To terminate this connection type poff in terminal


**Method II:
Ubuntu 8.10(hardy) and 9.04(jaunty) users often face a problem
Problem:The network menu does not appear in System>Administration
The solutions are:
*Method I:
1. Goto Applications>Add/Remove
2. In Show, from the drop-down menu select All available applications
3. In Search tab: type network
4. In Application: check the box next to Network(configure network devices and connections)
5. Apply changes
/*To download this file you need active internet connection*/

*Method II:
1. Open a terminal
2. Type network-admin
3. If your Network Settings is not installed then it will ask you to type
sudo apt-get install network-admin
4. If there is an active internet connection the Network Settings will be installed and it can be located under System>Administration>Network


Now,coming to configuration of Bsnl broadband connection through Network Settings
Steps:
1. Switch off your modem
2. Open Network Settings dialog box form System>Administration>Network
3. Select Wired Connection and click on Properties
4. In the Connection Settings Menu select Static IP and type in the following values and save:

IP Address : 192.168.1.2
/*Assigning the Ethernet Card an IP different from that of the modem*/

Subnet Mask: 255.255.255.0
Gateway address: 192.168.1.1

/* The Modem is being made the default gateway*/

5. Switch on the Modem .
6. Open the Terminal and type sudo pppoeconf
7 .A window with blue screen appears notifying the devices found
8. Press yes till the screen appears that asks you to enter username
9. Backspace to delete the text username and then enter the username your ISP has provided you with
10. Press yes again and then enter the password

Now, your internet connection gets activated.

Note: To check the IP configuration open a terminal and type ifconfig ppp0
The IPV4 address, default gateway and subnet mask addresses are shown

HAPPY BROWSING!!!

Saturday, August 15, 2009

aptitude vs apt-get

It has been more than a year that I am using ubuntu(hardy). I wanted to upgrade to jaunty(ubuntu 9.04) when I came across 'aptitude' which has lot of advantages over 'apt' that we commonly use. Being a Debian user, I am well aquainted with Advanced Packaging Tool(apt) but the difference between aptitude and apt was not there in my cognizance.
As we know for a Debian based distro, apt-get is the way to install ,remove update package lists and even upgrade a software.( man apt-get gives the details).
But if you want more ,then there are 15 more tools at hand.
apt-cache,apt-listbugs,apt-listchanges,apt-rdepends,deborphaned,debfoster,dselect,dpkg,apt-cdrom, apt-config, apt-extracttemplates, apt-ftparchive, apt-key, apt-mark and apt-sortpkgs.(google to know more about their usage)
But isn't it too stupefying to memorize the tools??? Well, it is indeed for me so I explored all about aptitude...here is what I learnt.
The advantage of aptitude over apt is that:
'apt-get remove' removes the packages but leaves the orphaned dependencies on the system; so this is a failure. Although to my knowledge ,'apt-get autoremove' is able to handle this problem but aptitude can find us the best solution; 'aptitude' automatically removes the dependencies when a package is removed if no other package is dependent on those dependencies.
Hence, 'aptitude' is the superior tool and the best way to install,remove,upgrade packages for the system. It is one that can help us accomplish a lot with less efforts.
Here is what I found all about 'aptitude':
  • aptitude: Running it with no arguments brings up a beautiful interface to search, navigate, install, update and otherwise administer packages.
  • aptitude install: Installing software for your system, installing needed dependencies as well.
  • aptitude remove: Removing packages as well as orphaned dependencies.
  • aptitude purge: Removing packages and orphaned dependencies as well as any configuration files left behind.
  • aptitude search: Search for packages in the local apt package lists.
  • aptitude update: Update the local packages lists.
  • aptitude upgrade: Upgrade any installed packages that have been updated.
  • aptitude clean: Delete any downloaded files necessary for installing the software on your system.
  • aptitude dist-upgrade: Upgrade packages, even if it means uninstalling certain packages.
  • aptitude show: Show details about a package name.
  • aptitude autoclean: Delete only out-of-date packages, but keep current ones.
  • aptitude hold:Fix a package at it’s current version, and don’t update it
( Type 'man aptitude' in terminal to know more)

More utilities of aptitude that I found are that when searching for a package using aptitude, the results are sorted alphabetically and justified in column width format and also the ones that are already installed in the system are notified unlike when doing with 'apt-cache'.
But here is something very important to note,we cannot install a package with apt-get or Synaptic and then remove dependencies by using aptitude and secondly for aptitude to work properly we must first do an update and then an install a package. With these two points in mind , aptitude works easy and great.
So, I suggest my novice friends who are new to a debian system and complacent with apt-get , to start using aptitude instead of apt-get ...It works better than apt-get in every sense. ( This blog is not meant for the people who are already aware of the utility of 'aptitude' and are experts.)
Suggestions and comments are welcome from the experts on this...