Re: [ns] INSTALLATION NS2

2006-06-21 Thread Tyler Ross

If you installed the allinone package, then tcl, tk and otcl will be 
installed in the ns home directory.. if not.. then hopefully you know 
where you installed them. :)

export NS_HOME=/directoryofns
export 
PATH=$NS_HOME/tclversion/unix:$NS_HOME/tkversion/unix:$NS_HOME/bin:$PATH
export 
LD_LIBRARY_PATH=$NS_HOME/tclversion/unix:$NS_HOME/tkversion/unix:NS_HOME/otcl-version:$NS_HOME/lib:$LD_LIBARY_PATH
export TCL_LIBRARY=$NS_HOME/tclversion/library

You just need to run those 4 commands when you start up cygwin (replace 
the versions with the actual versions you have installed.  You can put 
them in .bashrc in your home directory.  Or you can put them in a file 
and source it.  Or you can copy and paste them each time.  Up to you.

Muhammad Azam Akram wrote:
 hi
   i am a new ns2 user. i am installing it first time, i installed cygwin and 
 then install ns2-2.29. after installation i need to run ns2 please tell me 
 how to set environment variables and remaining steps to run any sample 
 application.
   please reply soon.

   thank you.
   bye
 
   
 -
 Yahoo! Messenger with Voice. Make PC-to-Phone Calls to the US (and 30+ 
 countries) for 2ยข/min or less.
 



Re: [ns] two equal UDP CBR flows in droptail queue get different bandwidths?

2006-06-08 Thread Tyler Ross

In reality, sure.  What's happening with the simulation though, is that 
the packets are being sent at the same time.  Even though you start the 
flows sending at t=0 and t=10, when they're both sending, they're 
sending at the exact same instant.  Since internally, everything is 
handled in a fixed order and nothing is random unless you explicitly 
make it so, it will always drop the packets from the same source at the 
same time.  Not because it picked the packets from that source to drop, 
but because that's just the order of things.  And once you see how it 
works for one packet being dropped, the same thing will repeat itself 
over and over, since no variables are changing.

I don't know if that makes sense.  Think on the level of one packet 
(from each source).  As you pointed out, the two flows have EXACTLY the 
same characteristics.  So they leave the source at the same time, they 
take the same amount of time to travel down their respective links, and 
they arrive at the relay node at the EXACT same time.  Problem is, only 
one packet can actually ride the next link.  Yes, they will queue up 
until the queue is full.  Then what?  Which one is accepted into queue? 
  Which is dropped?  You know that DropTail has no fairness.  So it's 
NOT going to pick the packet from the flow that was dropped last time. 
It's NOT going to pick one at random.  So how will the simulator decide? 
  If you have an array with all the packets and you loop over them, then 
the first one it comes across gets to join the queue.  So which one gets 
to join the queue is determined by its internal order.  Since nothing in 
the simulation is being changed in your simulation... you can do the 
same thing 1000 times, and the same thing will happen.   So the next 
time a packet comes along, the same packet will be let through.  The 
only way to change this result is to introduce some randomness to the 
sending order or to modify the how packets are queued.

An even better idea is to prevent packets from being lost in the first 
place. :)

Eduardo J. Ortega wrote:
 I understand that Droptail knows nothing about fairness. But, on the average, 
 and given the fact that both flows have exactly the same characteristics, 
 shouldn't they experience the same average behaviour?
 thanks.
 
 
 On Wednesday 07 June 2006 08:35, Tyler Ross wrote:
 This phenomenon is explained in the tutorial in Marc Greis's tutorial on
 the ns-2 website (see
 http://www.isi.edu/nsnam/ns/tutorial/nsscript2.html ).  The queue that
 you're probably using is a DropTail.  The DropTail queue has no concept
 of fairness, so it's going to drop whatever packet happens to be there.

 If you want some kind of fairness, you can do as the tutorial suggests,
 and replace DropTail with SFQ in your simulation.  You will then get a
 fairer split of the bandwidth.  If you monitor the queue and the dropped
 packets, you will indeed see that they are queued and dropped in a much
 more equal way.

 Eduardo J. Ortega wrote:
 Hi there:

 I've set up this experiment. I have two source nodes S1 and S2 directly
 connected to a node R1 and two destination nodes D1 and D2 also directly
 connected to a node R2. Nodes R1 and R2 are connected. All links are 1
 Mb/s Full duplex with DropTail. Now, here's the thing. I set up two
 flows, one going from S1 to D1 and the other one form S2 to D2. Both
 flows are UDP CBR 1 Mb/s. Flow 1 starts at t=0 and finishes at t=20. 
 flow 2 starts at t=10 and stops at t=15. Sim runs from t=0 to t=25.

 I'd expect that at t=10 (when flow 2 starts), both flows would experience
 the same amount of packet losses, so that each one would use about
 0.5Mb/s of the link between R1 and R2. But what really happens is that
 from t=10 to t=15, flow 2 uses all bandwidth while flow 1 loses all
 packets. Since both flows have the same parameters, shouldn't they
 receive the same share of bandwidth during that period? Or am i missing
 something here?

 Thanks in advance.
 



Re: [ns] two equal UDP CBR flows in droptail queue get different bandwidths?

2006-06-07 Thread Tyler Ross

This phenomenon is explained in the tutorial in Marc Greis's tutorial on 
the ns-2 website (see 
http://www.isi.edu/nsnam/ns/tutorial/nsscript2.html ).  The queue that 
you're probably using is a DropTail.  The DropTail queue has no concept 
of fairness, so it's going to drop whatever packet happens to be there.

If you want some kind of fairness, you can do as the tutorial suggests, 
and replace DropTail with SFQ in your simulation.  You will then get a 
fairer split of the bandwidth.  If you monitor the queue and the dropped 
packets, you will indeed see that they are queued and dropped in a much 
more equal way.

Eduardo J. Ortega wrote:
 Hi there:
 
 I've set up this experiment. I have two source nodes S1 and S2 directly 
 connected to a node R1 and two destination nodes D1 and D2 also directly 
 connected to a node R2. Nodes R1 and R2 are connected. All links are 1 Mb/s 
 Full duplex with DropTail. Now, here's the thing. I set up two flows, one 
 going from S1 to D1 and the other one form S2 to D2. Both flows are UDP CBR 1 
 Mb/s. Flow 1 starts at t=0 and finishes at t=20.  flow 2 starts at t=10 and 
 stops at t=15. Sim runs from t=0 to t=25.
 
 I'd expect that at t=10 (when flow 2 starts), both flows would experience the 
 same amount of packet losses, so that each one would use about 0.5Mb/s of the 
 link between R1 and R2. But what really happens is that from t=10 to t=15, 
 flow 2 uses all bandwidth while flow 1 loses all packets. Since both flows 
 have the same parameters, shouldn't they receive the same share of bandwidth 
 during that period? Or am i missing something here?
 
 Thanks in advance.
 



[ns] Error while creating NOAH node

2006-05-24 Thread Tyler Ross

Hello,

I'm trying to use NOAH to set up a multi-hop static route. I believe that I 
have added the necessary files, and made the necessary changes listed on the 
NOAH web site (http://icapeople.epfl.ch/widmer/uwb/ns-2/noah/) in the right 
spots, but I am receiving an error when creating a node. I would appreciate it 
if someone could spot my error. One thing I should mention is that I am using 
ns-2.29 instead of ns-2.26, which the instructions are for (is NOAH compatible 
with 2.29?), and I am using hierarchical addressing.

First thing, here is the error I get when running ns (it occurs in ns-lib.tcl):

can't read node: no such variable
while executing
$node node-addr
(procedure _o3 line 4)
(Simulator create-noah-agent line 4)
invoked from within
$self create-noah-agent $node
(NOAH arm line 2)
invoked from within
switch -exact $routingAgent_ {
DSDV {
set ragent [$self create-dsdv-agent $node]
}
NOAH {
set ragent [$self create-noah-agent $node]
}
DSR {
$self at ...
(procedure _o3 line 11)
(Simulator create-wireless-node line 11)
invoked from within
_o3 create-wireless-node 0.0.0
(eval body line 1)
invoked from within
eval $self create-wireless-node $args
(procedure _o3 line 23)
(Simulator node line 23)
invoked from within
$ns_ node [lindex $addresses 0]
invoked from within
set node_(0) [$ns_ node [lindex $addresses 0]]
(file sansfil3.tcl line 128)

In my call to $ns_ node-config, I have -adhocRouting NOAH. I think that's 
right, although I haven't found any examples for NOAH. Also, I'm not sure if my 
using hierarchical addressing is the problem or not. Though, since I do have 
wired elements in my network, I think I'm required to use hierarchical 
addresses (right?). I have tried setting wiredRouting to OFF just to see if it 
makes a difference, but I received the same error.

If somebody has encountered this problem, or has a guess as to how I might fix 
it, I would appreciate it.

Thank you,
Tyler