Re: [ns] Broadcasting a UDP ns2.34 802.11Ext

2012-11-06 Thread bostanip


Hi Paulo,

Sorry to bother you, but I have just seen your question and I have a similar
problem:

I would like a source node (n0) to broadcast CBR packets via UDP to 1 hop
neighbors (n1,n2) in a wireless dhoc network (either CMU 802.11 or 802.11
ext). After if that succeeds, I would like to increase the number of
receivers.

- Did your solution (i.e., by setting dst_addr_ -2 ) finally work for 40
nodes?
- What was your final solution? (if you have a code example)

I would really appreciate if you help me with this,

Thanks in advance,
Best,
Behnaz


Paulo Robson S. F. wrote:
 
 
 Hi,
 
 I want to broadcast a packet using an udp agent. I found some solutions at
 this maillist but
 neither satisfactory.
 
 I just want to send broadcast packet from 1 node to another 2 nodes in his
 range. My idea was
 change the dst ip to -1 and dst port to 0 because i saw somewhere that is
 the way to broadcast.
 
 I'm using the 802.11Ext model of MAC, the new module of the NS 2.34
 
 Well, I made this way:
 
 set udp0 [new Agent/UDP]
 $ns attach-agent $node $udp0
 set cbr2 [new Application/Traffic/CBR]
 
 $cbr2 set packetSize_ 128
 $cbr2 set interval_ 0.015
 $cbr2 set random_ 1
 $cbr2 set maxpkts_ 1000
 
 $cbr2 attach-agent $udp0
 
 #to broadcast i used this:
 $udp0 set dst_addr_ -1
 $udp0 set dst_port_ 0
 
 In the trace file seems to be right, but i dont know if only this change
 of
 address and port of destination
 is indeed a broadcast to all neighbors.
 
 First lines of trace file:
 s 0.5 _2_ AGT  --- 0 cbr 128 [0 0 0 0] --- [2:0 -1:0 32 0] [0]
 0 0
 r  0.5 _2_ RTR  --- 0 cbr 128 [0 0 0 0] --- [2:0 -1:0 32 0]
 [0]
 0 0
 s 0.5 _2_ RTR  --- 0 cbr 148 [0 0 0 0] --- [2:0 -1:0 32 0] [0]
 0 0
 s 0.500025000 _2_ MAC  --- 0 cbr 176 [0  2 0] --- [2:0 -1:0 32
 0] [0] 0 0
 r  0.500546664 _1_ MAC  --- 0 cbr 148 [0  2 0] --- [2:0 -1:0
 32
 0] [0] 1 0
 r  0.500546841 _0_ MAC  --- 0 cbr 148 [0  2 0] --- [2:0 -1:0
 32
 0] [0] 1 0
 r  0.500571664 _1_ RTR  --- 0 cbr 148 [0  2 0] --- [2:0 -1:0
 32
 0] [0] 1 0
 r  0.500571664 _1_ AGT  --- 0 cbr 148 [0  2 0] --- [2:0 -1:0
 31
 0] [0] 1 0
 r  0.500571841 _0_ RTR  --- 0 cbr 148 [0  2 0] --- [2:0 -1:0
 32
 0] [0] 1 0
 r  0.500571841 _0_ AGT  --- 0 cbr 148 [0  2 0] --- [2:0 -1:0
 31
 0] [0] 1 0
 s 0.507505094 _2_ AGT  --- 1 cbr 128 [0 0 0 0] --- [2:0 -1:0 32 0] [1]
 0 0
 r  0.507505094 _2_ RTR  --- 1 cbr 128 [0 0 0 0] --- [2:0 -1:0 32 0]
 [1]
 0 0
 s 0.507505094 _2_ RTR  --- 1 cbr 148 [0 0 0 0] --- [2:0 -1:0 32 0] [1]
 0 0
 s 0.507530094 _2_ MAC  --- 1 cbr 176 [0  2 0] --- [2:0 -1:0 32
 0] [1] 0 0
 r  0.508051758 _1_ MAC  --- 1 cbr 148 [0  2 0] --- [2:0 -1:0
 32
 0] [1] 1 0
 r  0.508051934 _0_ MAC  --- 1 cbr 148 [0  2 0] --- [2:0 -1:0
 32
 0] [1] 1 0
 r  0.508076758 _1_ RTR  --- 1 cbr 148 [0  2 0] --- [2:0 -1:0
 32
 0] [1] 1 0
 r  0.508076758 _1_ AGT  --- 1 cbr 148 [0  2 0] --- [2:0 -1:0
 31
 0] [1] 1 0
 r  0.508076934 _0_ RTR  --- 1 cbr 148 [0  2 0] --- [2:0 -1:0
 32
 0] [1] 1 0
 r  0.508076934 _0_ AGT  --- 1 cbr 148 [0  2 0] --- [2:0 -1:0
 31
 0] [1] 1 0
 
 
 Thanks guys
 
 
 Att,
 
 -- 
 Paulo Robson SF
 Computação UFC
 Semestre VII
 
 
robson.pauloufc@gmail.combehnaz.bostanip...@gmail.com
-- 
View this message in context: 
http://old.nabble.com/Broadcasting-a-UDP-ns2.34-802.11Ext-tp33775543p34646055.html
Sent from the ns-users mailing list archive at Nabble.com.




[ns] How to get results in graph using ns-2.34?

2012-11-06 Thread Muhammad Javed

Hi, 

How can i get graph result from tcl file using ns-2.34?
Can anyone send the statements or method to get graphical results?


 
Best regards,

Muhammad Javed


[ns] Classifier at node in ns2

2012-11-06 Thread Elisabete Reis

Hi all,

 

In Ns2, the nodes unicast have by default an address classifier and a port
classifier. But when we use a ad hoc routing protocol, like AODV and AOMDV,
the nodes use the classifiers of these routing protocols. I´m right?

 

Can you confirm my doubt?

Thanks in advance

 

E. Reis

 



[ns] Getting error when running a tcl script after adding a new routing protocol

2012-11-06 Thread Shalom


Good afternoon Ns-users!

 I am trying to implement ETX (Expected Transmission Count) and IBETX
(Interference Bandwidth adjusted ETX) as routing metric into the AODV
routing protocol and DSDV routing protocol respectively in NS-2.34.  I
created another identical AODV and DSVD  ad hoc routing protocols file and I
made some changes into AODV and DSDV file in order to incorporate ETX  and
IBETX as routing metric respectively. After that i renamed all AODV and DSDV
files (.cc  .h) to AODVETX and DSDVIBETX files (.cc  .h). I have changed 
all the words where the aodv  and dsdv words appear by aodvetx and dsdvibetx
words (c++ Classes, Packets headers, variables, TCL bindings,..). After run
Make clean and Make it compiles fine. But during execution of tcl file
with new protocol code I am getting following errors. I have carefully
implemented code step by step by thoroughly reading ns material on internet
and ebooks. I shall be highly thankful to you




(_o14 cmd line 1)
invoked from within
_o14 cmd addr
invoked from within
catch $self cmd $args ret
invoked from within
if [catch $self cmd $args ret] {
set cls [$self info class]
global errorInfo
set savedInfo $errorInfo
error error when calling class $cls: $args $...
(procedure _o14 line 2)
(SplitObject unknown line 2)
invoked from within
_o14 addr
(eval body line 1)
invoked from within
eval $node addr $args
(default arm line 2)
invoked from within
switch -exact $routingAgent_ {
DSDV {
set ragent [$self create-dsdv-agent $node]
}
DSR {
$self at 0.0 $node start-dsr
}
AODV {
set ragent [$self cre...
(procedure _o3 line 14)
(Simulator create-wireless-node line 14)
invoked from within
_o3 create-wireless-node
(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
(for body line 2)
invoked from within
for {set i 1} {$i = $val(nn) } { incr i } {
set node_($i) [$ns node]
}

-- 
View this message in context: 
http://old.nabble.com/Getting-error-when-running-a-tcl-script-after-adding-a-new-routing-protocol-tp34647085p34647085.html
Sent from the ns-users mailing list archive at Nabble.com.



Re: [ns] Getting error when running a tcl script after adding a new routing protocol

2012-11-06 Thread nicholas mbonimpa

Hullo Shalom,

You've most probably not gone through all the necessary steps of adding a
new protocol.

Most importantly, you need to modify the Makefile.in file in the ns-2.34
(or your version of ns-2) directory and add all the necessary inclusions,
then run make again to create the right executables for your protocol.

I have also attached a pdf (it was sent by someone on this email thread a
while ago) on the steps involved in implementing a new protocol.

I hope that will help.

Kind regards,

Nicholas Mbonimpa


On Tue, Nov 6, 2012 at 4:13 PM, Shalom maximekab...@gmail.com wrote:



 Good afternoon Ns-users!

  I am trying to implement ETX (Expected Transmission Count) and IBETX
 (Interference Bandwidth adjusted ETX) as routing metric into the AODV
 routing protocol and DSDV routing protocol respectively in NS-2.34.  I
 created another identical AODV and DSVD  ad hoc routing protocols file and
 I
 made some changes into AODV and DSDV file in order to incorporate ETX  and
 IBETX as routing metric respectively. After that i renamed all AODV and
 DSDV
 files (.cc  .h) to AODVETX and DSDVIBETX files (.cc  .h). I have changed
 all the words where the aodv  and dsdv words appear by aodvetx and
 dsdvibetx
 words (c++ Classes, Packets headers, variables, TCL bindings,..). After run
 Make clean and Make it compiles fine. But during execution of tcl file
 with new protocol code I am getting following errors. I have carefully
 implemented code step by step by thoroughly reading ns material on internet
 and ebooks. I shall be highly thankful to you




 (_o14 cmd line 1)
 invoked from within
 _o14 cmd addr
 invoked from within
 catch $self cmd $args ret
 invoked from within
 if [catch $self cmd $args ret] {
 set cls [$self info class]
 global errorInfo
 set savedInfo $errorInfo
 error error when calling class $cls: $args $...
 (procedure _o14 line 2)
 (SplitObject unknown line 2)
 invoked from within
 _o14 addr
 (eval body line 1)
 invoked from within
 eval $node addr $args
 (default arm line 2)
 invoked from within
 switch -exact $routingAgent_ {
 DSDV {
 set ragent [$self create-dsdv-agent $node]
 }
 DSR {
 $self at 0.0 $node start-dsr
 }
 AODV {
 set ragent [$self cre...
 (procedure _o3 line 14)
 (Simulator create-wireless-node line 14)
 invoked from within
 _o3 create-wireless-node
 (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
 (for body line 2)
 invoked from within
 for {set i 1} {$i = $val(nn) } { incr i } {
 set node_($i) [$ns node]
 }

 --
 View this message in context:
 http://old.nabble.com/Getting-error-when-running-a-tcl-script-after-adding-a-new-routing-protocol-tp34647085p34647085.html
 Sent from the ns-users mailing list archive at Nabble.com.




[ns] one hop Wireless Broadcast of CBR packets

2012-11-06 Thread Behnaz . Bostanipour

Hello,

I would like a source node (n0) to broadcast CBR packets via
UDP to  1 hop neighbors (n1,n2) in a wireless dhoc network.

I've tried the following solution:

One way, could be to attach the source to each destination
as below:


set udp1 [new Agent/UDP] 
$ns attach-agent $n0 $udp1 

set src1 [new Application/Traffic/CBR] 
$src1 attach-agent $udp1 

set null1 [new Agent/Null] 
ns attach-agent $n1 $null1 
ns attach-agent $n2 $null1 

$ns connect $udp1 $null1 

$ns at 0.1 $src1 start 

$ns at 50 finish 

But in this case the CBR packets are only recieved by node
n2. 

What should I do? Any help would be appreciated..
Thanks,
Behnaz



[ns] i need your help NS-2 users

2012-11-06 Thread zmezm 14

hello everyone , i hope you guys doing great .
ns2 expert am working on handover in mobile wimax , and i have a scenario of 3 
base station and one mobile station . 

now i need to know is it possible to add more then one mobile station to do 
handover in my script 

please let me know 
regards 


Re: [ns] How to get results in graph using ns-2.34?

2012-11-06 Thread Basma Bejaoui

you can use awk files to analyse out.tr and then you can get graphs with
xgraph command.
or LossMonitor : it's more simple and exact than filtering the out.tr,
this is a good exemple how to use LossMonitor
http://140.116.164.80/~smallko/ns2/wireless-udp-1.htm

2012/11/6 Muhammad Javed javed_u...@yahoo.com


 Hi,

 How can i get graph result from tcl file using ns-2.34?
 Can anyone send the statements or method to get graphical results?



 Best regards,

 Muhammad Javed




-- 
*Cordialement*
*Basma Bejaoui*
*Ingénieur Informatique, Génie Télécommunication et Réseaux *
*+216  20 09 52 02 *


[ns] to add/to call conditions' clauses in tcl file

2012-11-06 Thread Basma Bejaoui

Hi all
how to add condition (if XXX == YYY) in tcl file ?
if we cant, how can I define this procedure in .cc file and call it in tcl
file ??
thx in advance
-- 
*Cordialement*
*Basma Bejaoui*
*Ingénieur Informatique, Génie Télécommunication et Réseaux *
*+216  20 09 52 02 *


Re: [ns] to add/to call conditions' clauses in tcl file

2012-11-06 Thread Basma Bejaoui

I found one solution
http://mailman.isi.edu/pipermail/ns-users/2006-February/054169.html

2012/11/6 Basma Bejaoui bejaoui.ba...@gmail.com

 Hi all
 how to add condition (if XXX == YYY) in tcl file ?
 if we cant, how can I define this procedure in .cc file and call it in tcl
 file ??
 thx in advance
 --
 *Cordialement*
 *Basma Bejaoui*
 *Ingénieur Informatique, Génie Télécommunication et Réseaux *
 *+216  20 09 52 02 *




-- 
*Cordialement*
*Basma Bejaoui*
*Ingénieur Informatique, Génie Télécommunication et Réseaux *
*+216  20 09 52 02 *


[ns] bandwidth estimation using rtt

2012-11-06 Thread abinaya rajendhiran

hi can any help me to how to calculate available bandwidth in ns2.34 usiing
RTT and rate of returning acks

-- 
Reagards.,
R.Abinaya,B.Tech,(M.E)