How To Install ns3 on linux ?

Happy New Year to all the readers. Its long, I have not posted any thing on this blog except comments🙂 . So, here, today we will see how to install ns3 on linux box. The home page of ns3 is NS3 Home

the current release is ns3.10 (January 5, 2011) and can be downloaded from DOWNLOAD NS3.10

Step 1: Download ns3.10 and save it some where , but on the same machine where you want to install (Just Kidding :))

Step 2: open the terminal and go to the folder where ns3.10 tar file is.

Step 3: from the terminal run :

$tar -xvf ns-allinone-3.10.tar.bz2

$cd ns-allinone-3.10


you can provide some options to but as a newbie use the default one🙂

When the build process get over (it will take some time), type

$cd ns-3.10

and now we will validate our installation


the out put of this will be some thing like this:

Waf: Entering directory `/media/Installations/ns-allinone-3.10/ns-3.10/build’

Waf: Leaving directory `/media/Installations/ns-allinone-3.10/ns-3.10/build’

‘build’ finished successfully (2.010s)

PASS: TestSuite lte-bearer

PASS: TestSuite lte-propagation-loss-model

PASS: TestSuite wimax-fragmentation

PASS: TestSuite lte-phy

PASS: Example examples/tcp/tcp-nsc-lfn
PASS: Example examples/wireless/
PASS: Example src/contrib/flow-monitor/examples/
168 of 168 tests passed (168 passed, 0 skipped, 0 failed, 0 crashed, 0 valgrind errors)

Step 4:  Now our ns3 is installed and ready to run sample programs.

right now we are in directory “ns-3.10”
from terminal :


$ cp examples/tutorial/ scratch/

this time waf will give some thing like this:
Waf: Entering directory `/media/Installations/ns-allinone-3.10/ns-3.10/build’
Waf: Leaving directory `/media/Installations/ns-allinone-3.10/ns-3.10/build’
‘build’ finished successfully (15.900s)

Step 5: now it is the time to run the simulation

$ ./waf –run myfirst
Waf: Entering directory `/media/Installations/ns-allinone-3.10/ns-3.10/build’
Waf: Leaving directory `/media/Installations/ns-allinone-3.10/ns-3.10/build’
‘build’ finished successfully (1.353s)
Sent 1024 bytes to
Received 1024 bytes from
Received 1024 bytes from
Congratulations !! NS3 is installed and running successfully.
Lets try some other example.
Again go to the terminal and type
$cp examples/wireless/ scratch/
out put will be:
Waf: Entering directory `/media/Installations/ns-allinone-3.10/ns-3.10/build’
[1330/1502] cxx: scratch/ -> build/debug/scratch/myofdm_2.o
[1500/1502] cxx_link: build/debug/scratch/myofdm_2.o -> build/debug/scratch/myofdm
Waf: Leaving directory `/media/Installations/ns-allinone-3.10/ns-3.10/build’
‘build’ finished successfully (5.842s)
now run the simulation:
$ ./waf –run myofdm
this time output will be:
Waf: Entering directory `/media/Installations/ns-allinone-3.10/ns-3.10/build’
Waf: Leaving directory `/media/Installations/ns-allinone-3.10/ns-3.10/build’
‘build’ finished successfully (1.448s)
So, this way you can try different examples, and get an introduction of ns3.
Note: As I am using Fedora 14 Complete Installation, I have not feel the need to resolve the dependencies, but if you will come across any error then please make me know, so that I will extend the post to cover the dependencies problems, and to other distributions also like ubuntu etc.

Enjoy Ns3 , soon, I will come back with tutorials on ns3 and dependencies resolution for ns3 (only if some will mention the errors ;))

Ashwini Patankar for WirelessCafe !!

2010 in review

The stats helper monkeys at mulled over how this blog did in 2010, and here’s a high level summary of its overall blog health:

Healthy blog!

The Blog-Health-o-Meter™ reads Wow.

Crunchy numbers

Featured image

About 3 million people visit the Taj Mahal every year. This blog was viewed about 39,000 times in 2010. If it were the Taj Mahal, it would take about 5 days for that many people to see it.

In 2010, there were 3 new posts, growing the total archive of this blog to 38 posts. There were 8 pictures uploaded, taking up a total of 39kb.

The busiest day of the year was November 22nd with 199 views. The most popular post that day was How to install Matlab and how to make it work on Linux ?.

Where did they come from?

The top referring sites in 2010 were,,,, and

Some visitors came searching, mostly for digital communication tutorial, install matlab ubuntu, digital communication system, ofdm, and dfts-ofdm.

Attractions in 2010

These are the posts and pages that got the most views in 2010.


How to install Matlab and how to make it work on Linux ? June 2009


Tutorial I : Basic Elements of Digital Communication System July 2009


Error with ns2 Installations – NS2 Revisited ! May 2009


How to install NS2 on Fedora 10 (Cambridge)? December 2008


How to install ns2 on Red Hat Linux January 2009

What you will like to read ? – Poll

Dear Readers,

We are conducting a Poll to know in which direction we should take this blog. It is our request to every one to cast their votes in the poll and make us know about your views, we will appreciate you will comment also.

The link to the poll

Cast the votes and leave the comment.

Thanks and Regards,
WirelessCafe Team !

Tutorial VI: Source Coding Fundamentals I

A very Happy New Year to all the readers. It is really long I guess three months and no post on this blog. We, WirelessCafe Team, seriously apologies for that. Through this post, we are continuing our tutorial series on digital communication. In this post we will discuss some fundamentals of source coding and in later posts we will write codes for some source coding algorithms. We will like to remind our readers that we are right now discussing the basics of simulation and soon we will go for OFDM and more advance topics. So lets hit it!

Mutual Information:

The information content provided by the occurrence of the event Y = yi about the event X = xi is defined as

Mutual Information

Mutual Information

I(xi;yj) is called the mutual information between xi and yj.

Self Information:

when we talk about the information of a single event X= xi we called it self information and is denoted as

Self Information

Self Information

it is a matter of fact, that , a high probability event conveys less information than a low probability event. That is, P(x) = 1 which means I(x) = 0.

Conditional Self Information:

In addition to self information and mutual information, conditional self information as

Conditional Self Information

Conditional Self Information

Average Mutual Information:

the mutual information associated with the pair of the events (xi,yj), which are possible outcomes of the two random variables X and Y, we can obtain the average value of the mutual information by simply weighting I(xi,yj) by the probability of occurrence of the joint event and summing over all possible joint events.


Average Mutual Information

Average Mutual Information

as a matter of fact, I(X;Y) = 0 when X and Y are statistically Independent. Also I(X;Y) ≥ 0.


Entropy or Average self information denoted as H(X) and defined as



Conditional Entropy:

the average conditional self information is called conditional entropy

Conditional Entropy

Conditional Entropy

we also get the relation from the above the equations

Relation Between Information and Entropy

Relation Between Information and Entropy

Here is a plot of binary conditional entropy produced in matlab. In next post we will discuss some left over theorems of source coding like Kraft’s inequality and will start some real coding work !

binary entropy function

binary entropy function