您正在查看 "Ns2 Related" 分类下的文章 2007-03-29 23:40 Some friends found that it is very hard to implement a routing module (adhoc & wsn) for NS2. Yes, it's so difficult. But We must learn how it works. From my point of view, I think you need to know some interface between routing module and other layers. So, try to learn them from a really simple example (It costs only one day for my collegue in Germany Lab to learn its mechanism, so you can do it too).
1. Read the tutorial: http://masimum.dif.um.es/?Documents
2. A very simple module: NOAH http://icapeople.epfl.ch/widmer/uwb/ns-2/noah/
Any problems, plz contact me:) |
2007-03-27 9:12 This is my original work:) You can also find it on http://140.116.72.80/~smallko/ns2/Debian.doc.
Install Debian Sarge System. Remember not to update it with Etch or sid source. Just use Sarge Source.Otherwise, you may get an error like this (a common error for ns 2.29 or old version because of the gcc and g++ complier version conflict):
http://mailman.isi.edu/pipermail/ns-users/2006-April/054937.html
Use apt command (apt-get install XXX) to install these libraries and utilities:
1. x-window-system-core
2. gnome-core
3. xlibs-dev: Important library!
4. lftp or wget: (for downloading ns2 packages from websites or ftpserver)
5. gcc
6. g++
7. make
Uncompress the ns package: tar zxvf ns-2.xx-allinone.tar.gz
Install ns2 with the shell script “install” in the ns-2.xx-allinone folder:
|
2007-03-23 13:21 http://ctieware.eng.monash.edu.au/twiki/bin/view/Simulation/OMNeTppComparison
| . |
OMNeT++ |
ns-2 |
| Flexibility |
OMNeT++ is a flexible and generic simulation framework. One can simulate anything that can be mapped to active components that communicate by passing messages. For example, it can be used for simulating queueing networks, multiprocessor systems, hardware architectures (routers, optical switches, file servers etc.), or business processes. Several model frameworks available for different problem domains (INET Fw, Mobility Fw, OverSim, NesCT, MACSimulator, etc.) |
ns-2 has been designed as a (TCP/IP) network simulator, and it difficult to impossible to simulate things other than packet-switching networks and protocols with it. It has highly detailed and hardcoded concepts about nodes, agents, protocols, links, packet representation, and network adresses etc, which is good, but makes it very hard if you want to do things a little differently. |
| Programming Model |
Object-oriented, event-driven simulator, written in C++. Topology descriptions are either written as text files (NED language), or can be dynamically created in run-time. There is also a graphical interface (GNED) for creating and editing the topologies, which automatically creates the topology file. |
Mixed-mode: OTcl (Object-Tcl) with underlying C++ classes. OTcl is also used for creating and configuring networks, recording results etc. |
| Model Management |
The OMNeT++ simulation kernel is a class library, i.e., models in OMNeT++ are independent of the simulation kernel. The researcher writes their components (simple modules) against the OMNeT++ simulation kernel API. OMNeT++ sources are never patched by models. Simple modules are then reusable, and can be freely combined like LEGO blocks to create simulations,. |
In ns-2, boundary between simulation core and models is blurred, without a clear API. Install instructions for 3rd party models usually begin like: "download ns2 2.xx.x, unpack it, then apply the following patch..." |
| Support for Hierarchical Models |
Hierarchical module structure in OMNeT++ facilitates dealing with complexity in a methodical manner. Model designer assembles a complex model from self-contained building blocks (i.e. simple modules and compound modules) which are resuable in other simulations as they are. |
In ns-2, models are "flat": creating subnetworks, or implementing a complex protocol as a composition of several independent units (that appear as one unit) are not possible in ns-2. |
| Debugging and Tracing Support |
OMNeT++ can show packet transmissions while a simulation is running. OMNeT++'s Tkenv is an interactive execution environment, which allows one to examine the progress of simulation and change parameters. There is also extensive library support for packet tracing etc. |
? |
| Variety of Models Available |
OMNeT++ has a good variety of models for simulating computer systems, queueing systems etc., but lags behind the ns-2 simulator on availability of communication protocol models. |
ns-2 has a rich set of communication protocol models (since it has been designed as a network protocol simulator, this is not surprising). |
| Documentation |
OMNeT++ has a well written and up-to-date manual (there are also tutorials for quick introduction). OMNeT++'s simulation API is more mature and much more powerful than ns-2's. |
ns-2 documentation is fragmented (there is a good tutorial for quick introduction). There is no clear dividing line between the models and the ns-2 simulation library. |
| Ability to Run Large Networks |
OMNeT++ can simulate very large scale network topologies. The limit is the virtual memory capacity of the computer used. |
ns-2 has scalability problems on simulating large network topologies (more details needed here). |
| Support for Parallel Simulation |
Supports conservative parallel distributed simulation. The Null Message Algorithm (Chandy-Misra-Bryant) and Ideal Simulation Protocol (Bagrodia et al) are supported; others can be plugged in. Lookahead models for NMA can be plugged in. Communication layer is pluggable: currently implemented ones are MPI, named pipe, and file-based (for debugging). Unlike PADS, models do not need to be modified or instrumented for parallel simulation -- it is just a matter of configuration. |
The PADS research group at Georgia Tech. has developed extensions and enhancements to the ns-2 to allow a network simulation to be run in a parallel and distributed fashion on a network of workstations. |
| Experiment Design |
Parameters of a simulation experiments are written in the omnetpp.ini, which enforces the concept of separating model from experiments. |
Models and experiments are usually interwoven in ns-2: topology, parameters, model customizations, result collection etc usually in the same Tcl script, which makes "separation of concerns" difficult. |
| Embeddability |
OMNeT++ simulation kernel can be embedded in other applications (where one can use alternative means of intpu/output, e.g., use databases). The existing user interfaces can be extended via plug-ins, modified or replaced. |
? |
|
2007-03-23 12:04 ns-2.31 Released on Mar 10, 2007
- [tomh]Mon Jan 29 21:00:00 EST 2007:
Several changes to WPAN module, contributed by Iyappan Ramachanran.
- Ability to put a WPAN node to sleep has been added with appropriate actions to decrement energy in sleep state and in transitions. Appropriate code has been added to enable node sleep at any time that the user wishes from the tcl interface.
- The earlier implementation was indefinitely attempting transimission of a packet. This has been fixed; after backing of macMaxCSMABackoffs, a node just reports access failure to the upper layer.
- Owing to the lack of a detailed-enough PHY layer, CCA has to be done at one instant (the end of the 8th symbol, in the earlier implementation) instead of integration over 8 symbols. As this was leading to unrealistic behavior, CCA has been modified to be done at the end of the 4th symbol but reported to MAC at the end of the 8th.
- Code has been added to decrement appropritate energy in the carrier sensing process.
- The WirelessChannel::sendUp() function call by Phy802 15 4::PD DATA indication() causes receive energy to be decremented twice and has been fixed.
- Several other smaller bugs have been fixed.
Files changed:
wireles-phy.cc, wireless-phy.h, ns-lib.tcl, ns-mobilenode.tcl
wpan.Z, p802_15_4const.h, p802_15_4csmaca.cc, p802_15_4csmaca.h,
p802_15_4def.h, p802_15_4mac.cc, p802_15_4mac.h, p802_15_4phy.cc
p802_15_4phy.h, p802_15_4timer.cc, p802_15_4timer.h
- [mweigle]Sun Dec 17 10:07:18 EST 2006:
Several changes to allow ns to compile on Solaris with the Sun C compiler. Fixes contributed by Emil Mikulic from RMIT University. Files change:
Makefile.in, config.h, configure.in, configure,
baytcp/tcp-full-bay.cc,
common/tcpAppInit.cc,
indep-utils/webtrace-conv/wcb/utils.cc,
queue/gk.cc, jobs.h, pi.cc, red.cc, rem.cc, rio.cc, rq.cc,
sctp/sctp.cc, sctp.h, sctp-cmt.cc,
tcp/scoreboard-rq.cc, tfrc-sink.cc,
tools/random.cc,
wpan/p802_15_4mac.cc
- [mweigle]Mon Nov 20 16:12:19 EST 2006:
Significant change to PackMime-HTTP HTTP/1.1 behavior. This change adds more flexibility in setting HTTP/1.1 behavior by separating out random variables that control the number of pages per connection, the number of objects per page, the time between objects, the time between pages, etc. Full details of the additions have been added to the ns Manual chapter on PackMime-HTTP.
Note: Results with HTTP/1.1 will change, but those with HTTP/1.0 will not.
|
2007-03-22 21:05 from: http://wiki.ubuntu.org.tw/index.php/HowtoInstallNS2
超級懶人安裝法
$ vi /etc/apt/sources.list
# 加到最下面
deb http://bode.cs.uni-magdeburg.de/~aherms/debian sid ns2
deb-src http://bode.cs.uni-magdeburg.de/~aherms/debian sid ns2
$ apt-get update
$ apt-get install ns
For more, you can visit the web link above.
|
2007-03-06 8:55 (对不起,总是玩TinyOS我很难毕业~~~)
关于802.15.4在NS2中的实现
1.ns2中的/wpan目录下就有一个实现,但是没有实现GTS机制,目录里面也有相关文档说明。
2.http://www.ee.washington.edu/research/funlab/802_15_4/有对上面一个模型的改进。
3.http://ceng.usc.edu/~anrg/downloads.html 这个实现没有Association等过程,但是有GTS等机制的实现。 |
| | |