Saturday, January 31, 2009

Correction for NS2 Book: ARQ Codes

This is the correction for the following book:

T. Issaraiyakul and E. Hossain, "Introduction to Network Simulator
NS2", Springer 2008.
http://www.springer.com/engineering/signals/book/978-0-387-71759-3


If you are trying to run the ARQ codes in chapter 14, it will not work. You need to add the following code into your arq.cc file:

static class ARQTxClass: public TclClass {
public:
ARQTxClass() : TclClass("ARQTx") {}
TclObject* create(int, const char*const*) {
return (new ARQTx);
}
} class_arq_tx;


You might also find the following slide useful:
http://www.ece.ubc.ca/~teerawat/NS2.htm

Best,
Teerawat

Wednesday, January 21, 2009

"Can I use NS2" v.s. "Do I need NS2"

Yes, NS2 is a very powerful network simulation tools. A lot of people wants to use it (some without knowing whether they really need NS2). A common question is that "Can I use NS2 for my work?" Unfortunately, no one knows the answer more than yourself. In fact, it is more appropriate to rephrase the question as "Do you really need NS2?" A tough one, eh?

So, here are some question which can help you determine whether you need NS2.

- You don't want to use NS2 if your work is self-contained. If your work does not need any interaction with many other component (e.g., determine bit error rate for a particular modulation), it would be easier to write codes in a basic programming language (e.g., C++).
- You want to use NS2 if you work is so connected to other components and you don't want to re-create those component. NS2 has a whole lot of modules that you can re-use. Those modules are written and proved by others. They are quite robust and ready to use. If for example you want to study TCP performance for your new modulation scheme, you might consider writing your own modulation module and use TCP module available in NS2.

Come back to our original question: "Can I use NS2 for my work?" Well, the answer is always YES! NS2 is just a combination of C++ and Tcl. If your work can be programmed by using C++, Tcl, or both. You can use and integrate your work into NS2. But, again, if you don't need to, don't bother using NS2. After all, use NS2 to make your life easier. Do not enslave yourself by using NS2 :)

For more information about language structure (C++-Tcl) in NS2, please look at chapter 3 in the following book:

T. Issaraiyakul and E. Hossain, "Introduction to Network Simulator
NS2", Springer 2008.

Here is the link:
http://www.springer.com/engineering/signals/book/978-0-387-71759-3

You might also find the following slide useful:
http://www.ece.ubc.ca/~teerawat/NS2.htm

Best,
Teerawat