[ns] Dear all

2009-09-27 Thread Sula K

Dear all

I have one stupid question can some one tell me how can save file in terminal 
for example I have written the following tcl file I want to save it as tcl file 
:


 

% set ns [new Simulator]
_o4
% set nf [open out.nam w]
file3
% $ns namtrace-all $nf
file3
% proc finish {} {
global ns nf
$ns flush -trace
close $nf
exec nam -a out.nam 
exit 0
set n0 [$ns node]
set n1 [$ns node]
$ns duplex -lnk $n0 $ n1 1mb 10ms DropTail
$ns at 5.0 finish
$ns run

how can I save this file as tcl file in the home directory. Iam new in NS2




  


Re: [ns] randomizing runs

2009-09-27 Thread Teerawat Issariyakul


Hi Abu,

By default, NS2 is deterministic. If you would like to run NS2 in
randomized scenarios, you need to execute

$defaultRNG seed n

prior to $ns run, where n is an integer. If n is zero, NS2 will
use the current time and counter as a seed for random number generator.
By default, n is set to 1, meaning every run would generate the
same result. You may manually change the seed (e.g., 2, 3, 4, and so
on), or set it to zero.

I also posted the details on my blog at

http://t-issariyakul.blogspot.com/2009/09/ns2-deterministic-vs-random.html


For more information about Random Number Generators, see Chapter 12 in
the following book from Springer:

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

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


Best Wishes,
Teerawat

On 9/18/2009, abu shahriar azmshahr...@gmail.com wrote:


Hi all,

I am in trouble with randomizing ns run by seeding defaultRNG or ns-random.
Can anyone help me about how to randomize runs? I am using a wired network
topology.

Thanks.

--Shahriar




[ns] multi-phases MAC protocol simulation

2009-09-27 Thread chaoui karima



















Hello!



I have to simulate a two
phases  MAC protocol in which nodes apply in every phase a different
algorithm and exchange different packets , I have to execute an
algorithm in background and exchange it's result in the first phase
than use those results to elect the node that have the right to
transmit it's data packet in the second phase .
I will appreciate any help
or idea for how to simulate that, have I to use OTCL threads or can I
do it in only one MAC C++ file ? I have no idea about how to start !!



Thank you very much in
advance.   

  
  
_
Windows Live™: Keep your life in sync. Check it out!
http://windowslive.com/explore?ocid=TXT_TAGLM_WL_t1_allup_explore_012009


Re: [ns] [Ns-developers] Added Grid for nam-1.14

2009-09-27 Thread Tom Henderson

ori and mish bgu wrote:
 Hi Everybody
 
 I was working on wireless simulation for some time now and found that draw
 lines of grid (on the topography) with distances in the nam visualizer was
 very useful for me to know exactly where nodes are placed in the network,
 especially when simulating dynamic networks and testing dynamic networks
 behavior.
 
 I thought it could be nice to share this modified nam version with you guys,
 maybe someone could find it useful.
 
 How to install it:
 Copy and replace the files view.h and view.cc with the ones that are in the
 /nam-1.14 folder.
 Copy and replace the file build-ui.tcl with the one that in the
 /nam-1.14/tcl folder.
 
 In the terminal window (under the /nam-1.14 folder) type:
 ./configure
 sudo make
 sudo make install
 
 How to use it:
 To add the grid in the nam window, click Views - Show grid.
 To increase or decrease the grid click on keyboard + or - buttons
 respectively.
 
 Note that I don't have any previous experience of nam programming and I
 have'nt found any documentation.
 There may be some more elegant ways to program it, but it works for me.
 
 Michael
 

Hi Michael,
Thanks for posting this-- I created a tracker issue for this and will 
review it sometime soon.

- Tom

http://sourceforge.net/tracker/?func=detailaid=2868455group_id=149743atid=775394



Re: [ns] Traffic Generator using TCP-Linux

2009-09-27 Thread Ygor Amaral

Hi,

Someone has a traffic generator that works properly with the TCP-Linux?

Grateful

Ygor Amaral