Re: [ns] new wireless trace format

2007-02-26 Thread David Bath

Hey there,

Thanks for reply.

This is the same sort of conclusion I came to - but I'm not quite sure
how to check that, and whether it falls into the Click or ns domain...
I've cross-posted to the Click list, so they might have some
suggestions.

I don't understand well enough the tracing architecture - the ClickNode
types can clearly print something, as I can happily get old trace format
output.  Any pointers on what I can check in cmu-trace.cc (or anywhere
else) to verify if there's code to handle newtrace format?

Curiously, I don't seem to be able to get location data in old trace
format, (but works fine if I don't use ClickNodes) so I wonder if
perhaps this is a clue to where the problem is?

Thanks for continuing help.

Dave



-Original Message-
From: ?e Olbert [mailto:[EMAIL PROTECTED] 
Sent: 26 February 2007 08:41
To: David Bath
Subject: Re: [ns] new wireless trace format

Have you checked that there is support form the Click node to print in
the
new format?

And have you checked in cmu-trace.cc if it is able to print other than
the
basic node format?






Re: [ns] new wireless trace format

2007-02-26 Thread David Bath

Thanks once again for the reply. . . 

Had a read through cmu-trace.cc, and I'm not 100% convinced I can tell
where newtrace_ is being set.  

I may be wrong, but the fact that I /am/ getting node tracing for the
lower layers (MAC, AGT etc) when using nsclick (for info: when using
nsclick, the routing part is handed off to click, so I would not expect
to see any RTR or IFQ log entries) indicates that CMUTrace is being
executed.  The only other possibility is that the clicknode has
implemented tracing all on its own, which seems quite unlikely.  

Which component is responsible for setting the newtrace_ variable?  Is
it possible that clicknodes are somehow mangling it?

Cheers,

Dave

-Original Message-
From: ?e Olbert [mailto:[EMAIL PROTECTED] 
Sent: 26 February 2007 09:05
To: David Bath
Subject: RE: [ns] new wireless trace format

Hi!

I have no idea about click as such, just thought this was an interesting
problem.

cmu-trace.cc prints in new-format if the packet type is not tagged:

// use tagged format if appropriate
if (pt_-tagged()) {

code

return;
}
if (newtrace_) {

code

Since you say you set newtrace I guess it means that it never gets to
the
if (newtrace_) statement.

On a side note: There is no mention about click in the traceformats
available here..
http://nsnam.isi.edu/nsnam/index.php/NS-2_Trace_Formats#New_Wireless_Tra
ce_Formats

It looks like you have to implement it yourself =P

Regards

 Hey there,

 Thanks for reply.

 This is the same sort of conclusion I came to - but I'm not quite sure
 how to check that, and whether it falls into the Click or ns domain...
 I've cross-posted to the Click list, so they might have some
 suggestions.

 I don't understand well enough the tracing architecture - the
ClickNode
 types can clearly print something, as I can happily get old trace
format
 output.  Any pointers on what I can check in cmu-trace.cc (or anywhere
 else) to verify if there's code to handle newtrace format?

 Curiously, I don't seem to be able to get location data in old trace
 format, (but works fine if I don't use ClickNodes) so I wonder if
 perhaps this is a clue to where the problem is?

 Thanks for continuing help.

 Dave






Re: [ns] Tracegraph CANNOT BE TRUSTED in all simulation scenarios

2007-02-26 Thread Samer Bali

Hi all,

As I said, it depends on what you want to extract from the trace file. In my 
case, for example, one parameter that I want to calculate is the average 
normalized throughput. I defined it as the ratio between the useful throughput 
or goodput (received data packets without duplication divided by simulation 
time) to the offered data rate (amount of useful data sent without 
retransmission devided by simulation time). To calculate the normalized 
throughput I need to find number of received data packets without duplications 
at AGT level. To do so (assuming that the trace file is output.tr in new 
wireless format):

grep -e r -t  output.tr  temp1.tr
grep -e tcp -Il $rpktsize temp1.tr  temp2.tr
grep -e -Nl AGT  temp2.tr  datarecv.tr
(now datarecv.tr contains all trace lines concerning the received data only on 
AGT level but with duplications. $rpktsize depends on your simulation. 
output.tr, temp1.tr, and temp2.tr can be deleted if you do not need them 
anymore.)
To calculate number of received data without duplications I used matlab making 
use of the source address.source port number (-Is), dest address.dest port 
number (-Id), and packet uniqe id (-Ii). Tracegraph does not deal with -Is and 
-Id, so with Tracegraph one cannot calculate number of received data packets 
without duplications at AGT level (throghput calculated in Tracegraph is not 
the useful throughput, so be careful !!!). ***THIS IS ONLY ONE EXAMPLE. 

All these steps are done automatically by a certain software written in tcl and 
matlab that I did it for my own simulations, I do not extend them to support 
other simulations. 

Anyway, as a final conclusion: with ns-2, one should write his own scripts to 
ensure that he obtains the right results from trace files. I spent 3 months 
trying understanding how Tracegrapgh works, whereas it tooks only 2 weeks to 
write my own script.

Cheers,
Samer
  - Original Message - 
  From: Pragasen Mudali 
  To: Samer Bali 
  Sent: Monday, February 26, 2007 7:42 AM
  Subject: Re: [ns] Tracegraph CANNOT BE TRUSTED in all simulation scenarios


  Hi,

  Thanks for the posting. Do you have any other scripts that you use for 
analysis. If so, can you forward them to me please.


  On 24/02/07, Samer Bali [EMAIL PROTECTED] wrote:

hi all,
I used Tracegraph to analyse trace file of ns-2. I found that it works good
when there is no frequent packet drops and retransmission. In a simulation
where a large packet drops and retransmission exist (for example in my case 
I used the shadowing model in the PHY layer and used a multihop scenario
with up to 4 hops) Tracegraph fails to give a correct analysis results. I
think that Tracegraph CANNOT BE TRUSTED in all simulation scenarios. One 
should check his results using another tool (do some sample checks with awk
or perl or grep command) or do his own analysis code.
Yours,
Samer





  -- 
  Pragasen Mudali 
  Research Student
  Department of Computer Science 
  University of Zululand 


Re: [ns] new wireless trace format

2007-02-26 Thread David Bath

Hi Matthias,

Thanks very much for the reply.

I had a look in ns-lib.tcl, and found that use-newtrace sets the
variable:

Simulator set WirelessNewTrace_ 1  

I've tried setting this manually, but it makes no difference.  

Just to reiterate - either versions works when straight ns is used,
but neither work when a ClickNode is used.

Sorry if I misunderstood...

Best Regards,

Dave

-Original Message-
From: Matthias Kuhnert [mailto:[EMAIL PROTECTED] 
Sent: 26 February 2007 10:07
To: David Bath
Subject: Re: [ns] new wireless trace format

The newtrace variable is set via the tcl interface - grep for the
appropriate command function, if you are interested in the exact
location...
There should be also some default setting within the ns-default.tcl.
But if you are curious on how the system reacts, just set the newtrace
variable to 1 somewhere in the file, or within the ns-default,
recompile, and look what happens

Greets,
 Matthias
  
 Original-Nachricht 
Datum: Mon, 26 Feb 2007 09:19:53 -
Von: David Bath [EMAIL PROTECTED]
An: ns-users@ISI.EDU
CC: 
Betreff: Re: [ns] new wireless trace format

 
 Thanks once again for the reply. . . 
 
 Had a read through cmu-trace.cc, and I'm not 100% convinced I can tell
 where newtrace_ is being set.  
 
 I may be wrong, but the fact that I /am/ getting node tracing for the
 lower layers (MAC, AGT etc) when using nsclick (for info: when using
 nsclick, the routing part is handed off to click, so I would not
expect
 to see any RTR or IFQ log entries) indicates that CMUTrace is being
 executed.  The only other possibility is that the clicknode has
 implemented tracing all on its own, which seems quite unlikely.  
 
 Which component is responsible for setting the newtrace_ variable?  Is
 it possible that clicknodes are somehow mangling it?
 
 Cheers,
 
 Dave
 
 -Original Message-
 From: ?e Olbert [mailto:[EMAIL PROTECTED] 
 Sent: 26 February 2007 09:05
 To: David Bath
 Subject: RE: [ns] new wireless trace format
 
 Hi!
 
 I have no idea about click as such, just thought this was an
interesting
 problem.
 
 cmu-trace.cc prints in new-format if the packet type is not tagged:
 
 // use tagged format if appropriate
 if (pt_-tagged()) {
 
 code
 
 return;
 }
 if (newtrace_) {
 
 code
 
 Since you say you set newtrace I guess it means that it never gets to
 the
 if (newtrace_) statement.
 
 On a side note: There is no mention about click in the traceformats
 available here..

http://nsnam.isi.edu/nsnam/index.php/NS-2_Trace_Formats#New_Wireless_Tra
 ce_Formats
 
 It looks like you have to implement it yourself =P
 
 Regards
 
  Hey there,
 
  Thanks for reply.
 
  This is the same sort of conclusion I came to - but I'm not quite
sure
  how to check that, and whether it falls into the Click or ns
domain...
  I've cross-posted to the Click list, so they might have some
  suggestions.
 
  I don't understand well enough the tracing architecture - the
 ClickNode
  types can clearly print something, as I can happily get old trace
 format
  output.  Any pointers on what I can check in cmu-trace.cc (or
anywhere
  else) to verify if there's code to handle newtrace format?
 
  Curiously, I don't seem to be able to get location data in old trace
  format, (but works fine if I don't use ClickNodes) so I wonder if
  perhaps this is a clue to where the problem is?
 
  Thanks for continuing help.
 
  Dave
 
 
 

-- 
Ist Ihr Browser Vista-kompatibel? Jetzt die neuesten 
Browser-Versionen downloaden: http://www.gmx.net/de/go/browser



Re: [ns] new wireless trace format

2007-02-26 Thread David Bath

Hey there,

Thanks for all the help.  I've put several lines of debug into this
function, and can now confirm it's being called, and that argc does
indeed == 3.  

However, crucially (strcmp(argv[1], newtrace) never evaluates to 0,
and therefore the newtrace_ variable is never set.  

Do you (or anyone else in the list) with better ns knowledge than me
know who calls CMUTrace::command ? Is it likely to be the ClickNode
code?

Thanks again for all the help here,

Best Regards,

Dave

-Original Message-
From: ?e Olbert [mailto:[EMAIL PROTECTED] 
Sent: 26 February 2007 10:05
To: David Bath
Subject: Re: [ns] new wireless trace format

Hi!

its set here in cmu-trace.cc:

CMUTrace::command(int argc, const char*const* argv)
{

if(argc == 3) {
if(strcmp(argv[1], node) == 0) {
node_ = (MobileNode*)
TclObject::lookup(argv[2]);
if(node_ == 0)
return TCL_ERROR;
return TCL_OK;
}
if (strcmp(argv[1], newtrace) == 0) {
newtrace_ = atoi(argv[2]);
return TCL_OK;
}
}
return Trace::command(argc, argv);
}

this is the method to handle tcl commands sent to cmu-trace.cc. in your 
tcl script:
$ns_ use-newtrace

So this means that the ns_ (simulator object) is the one that probably
calls cmu-trace.cc, this call is made from tcl code.

You could add a print statement to cmu-trace.cc when newtrace is set to
see if it it becomes set =)

Then either go after the tcl code or dig deeper in cmu-trace.cc

Good luck!


 Thanks once again for the reply. . .

 Had a read through cmu-trace.cc, and I'm not 100% convinced I can tell
 where newtrace_ is being set.

 I may be wrong, but the fact that I /am/ getting node tracing for the
 lower layers (MAC, AGT etc) when using nsclick (for info: when using
 nsclick, the routing part is handed off to click, so I would not
expect
 to see any RTR or IFQ log entries) indicates that CMUTrace is being
 executed.  The only other possibility is that the clicknode has
 implemented tracing all on its own, which seems quite unlikely.

 Which component is responsible for setting the newtrace_ variable?  Is
 it possible that clicknodes are somehow mangling it?

 Cheers,

 Dave

 -Original Message-
 From: ?e Olbert [mailto:[EMAIL PROTECTED]
 Sent: 26 February 2007 09:05
 To: David Bath
 Subject: RE: [ns] new wireless trace format

 Hi!

 I have no idea about click as such, just thought this was an
interesting
 problem.

 cmu-trace.cc prints in new-format if the packet type is not tagged:

 // use tagged format if appropriate
 if (pt_-tagged()) {

 code

 return;
 }
 if (newtrace_) {

 code

 Since you say you set newtrace I guess it means that it never gets to
 the
 if (newtrace_) statement.

 On a side note: There is no mention about click in the traceformats
 available here..

http://nsnam.isi.edu/nsnam/index.php/NS-2_Trace_Formats#New_Wireless_Tra
 ce_Formats

 It looks like you have to implement it yourself =P

 Regards

 Hey there,

 Thanks for reply.

 This is the same sort of conclusion I came to - but I'm not quite
sure
 how to check that, and whether it falls into the Click or ns
domain...
 I've cross-posted to the Click list, so they might have some
 suggestions.

 I don't understand well enough the tracing architecture - the
 ClickNode
 types can clearly print something, as I can happily get old trace
 format
 output.  Any pointers on what I can check in cmu-trace.cc (or
anywhere
 else) to verify if there's code to handle newtrace format?

 Curiously, I don't seem to be able to get location data in old trace
 format, (but works fine if I don't use ClickNodes) so I wonder if
 perhaps this is a clue to where the problem is?

 Thanks for continuing help.

 Dave










Re: [ns] new wireless trace format

2007-02-26 Thread David Bath

For info: when I run the nsclick scripts, argv[1] is always equal to
namattach or target if this helps.

Cheers,

Dave

-Original Message-
From: ?e Olbert [mailto:[EMAIL PROTECTED] 
Sent: 26 February 2007 10:05
To: David Bath
Subject: Re: [ns] new wireless trace format

Hi!

its set here in cmu-trace.cc:

CMUTrace::command(int argc, const char*const* argv)
{

if(argc == 3) {
if(strcmp(argv[1], node) == 0) {
node_ = (MobileNode*)
TclObject::lookup(argv[2]);
if(node_ == 0)
return TCL_ERROR;
return TCL_OK;
}
if (strcmp(argv[1], newtrace) == 0) {
newtrace_ = atoi(argv[2]);
return TCL_OK;
}
}
return Trace::command(argc, argv);
}

this is the method to handle tcl commands sent to cmu-trace.cc. in your 
tcl script:
$ns_ use-newtrace

So this means that the ns_ (simulator object) is the one that probably
calls cmu-trace.cc, this call is made from tcl code.

You could add a print statement to cmu-trace.cc when newtrace is set to
see if it it becomes set =)

Then either go after the tcl code or dig deeper in cmu-trace.cc

Good luck!


 Thanks once again for the reply. . .

 Had a read through cmu-trace.cc, and I'm not 100% convinced I can tell
 where newtrace_ is being set.

 I may be wrong, but the fact that I /am/ getting node tracing for the
 lower layers (MAC, AGT etc) when using nsclick (for info: when using
 nsclick, the routing part is handed off to click, so I would not
expect
 to see any RTR or IFQ log entries) indicates that CMUTrace is being
 executed.  The only other possibility is that the clicknode has
 implemented tracing all on its own, which seems quite unlikely.

 Which component is responsible for setting the newtrace_ variable?  Is
 it possible that clicknodes are somehow mangling it?

 Cheers,

 Dave

 -Original Message-
 From: ?e Olbert [mailto:[EMAIL PROTECTED]
 Sent: 26 February 2007 09:05
 To: David Bath
 Subject: RE: [ns] new wireless trace format

 Hi!

 I have no idea about click as such, just thought this was an
interesting
 problem.

 cmu-trace.cc prints in new-format if the packet type is not tagged:

 // use tagged format if appropriate
 if (pt_-tagged()) {

 code

 return;
 }
 if (newtrace_) {

 code

 Since you say you set newtrace I guess it means that it never gets to
 the
 if (newtrace_) statement.

 On a side note: There is no mention about click in the traceformats
 available here..

http://nsnam.isi.edu/nsnam/index.php/NS-2_Trace_Formats#New_Wireless_Tra
 ce_Formats

 It looks like you have to implement it yourself =P

 Regards

 Hey there,

 Thanks for reply.

 This is the same sort of conclusion I came to - but I'm not quite
sure
 how to check that, and whether it falls into the Click or ns
domain...
 I've cross-posted to the Click list, so they might have some
 suggestions.

 I don't understand well enough the tracing architecture - the
 ClickNode
 types can clearly print something, as I can happily get old trace
 format
 output.  Any pointers on what I can check in cmu-trace.cc (or
anywhere
 else) to verify if there's code to handle newtrace format?

 Curiously, I don't seem to be able to get location data in old trace
 format, (but works fine if I don't use ClickNodes) so I wonder if
 perhaps this is a clue to where the problem is?

 Thanks for continuing help.

 Dave










Re: [ns] Multi-interface support howto

2007-02-26 Thread Tim Elschner

hi,

i guess there is something wrong on ns-lib.tcl
for some reason chan is set as a usual variable. if you follow the 
modifications of the document correctly, chan is used as an array in 
case of mutliple interfaces.
the problem might hide somewhere in here:

  if {[info exists channelType_]  [info exists channel_]} {
 error Can't specify both channel and channelType, error!
 } elseif {[info exists channelType_]  ![info exists satNodeType_]} {
 # Single channel, single interface
 warn Please use -channel as shown in tcl/ex/wireless-mitf.tcl
 if {![info exists chan]} {
 set chan [new $channelType_]
 }
  } elseif {[info exists channel_]} {
 # Multiple channel, multiple interfaces
 if {[info exists numifs_]} {
 set chan(0) $channel_
 } else {
 set chan $channel_
 }
  }
otherwise chan is set wrong before. in that case i would check 
instproc node-config in ns-lib.tcl

cheers,
tim


Nguyen Lan schrieb:
 Hi,

 bacause of you are success to build ns with multi-interface so I'd 
 like to ask for your help. When I run a test scenario I got that error

 warning: Please use -channel as shown in tcl/ex/wireless-mitf.tcl
 can't set chan(0): variable isn't array
while executing
 set chan($indexch) $ch
(procedure _o3 line 3)
(Simulator add-channel line 3)
invoked from within
 $ns_ add-channel 0 $chan_(0)
(file mulif.tcl line 131)

 Do you have any idea ?

 Cheers,
 Nguyen.

 Tim Elschner wrote:
 hi,

 i'm trying to user mutliple interfaces with the adhoc routing agent 
 noah - which stands for NO AdHoc routing. i use only one mobile 
 node, and some basestations with foreign agents, an home agent and a 
 corresponding node.
 as noah doesn't need a routing table, i use a map for storing the 
 interface. i use the prev_hop field in the common-header to 
 associate the interface.
 in the forwardPacket function - which is for unicast transmissions 
 - i use the information stored in the map to send the packets through 
 the correct interface. this works fine with interface 1, but fails 
 vor interface 0. all packets are dropped. if i just flip the channels 
 between interface 0 and 1, still interface 1 is working and interface 
 0 fails.

 did i miss something?
 hints anyone? :)

 cheers,
 tim


 Ramon Aguero schrieb:
  
 Hello Tim,

 thanks for pinpointing the error! Somehow I made a mistake when 
 copying and pasting the code to the file.

 The correct procedure would be the following one (note that the 
 arptable_ is now within the 'for' cycle). In this sense, I don't 
 think you need to change all arptable_ into arptable. Hope this helps.

 Node/MobileNode instproc reset {} {
 $self instvar arptable_ nifs_ netif_ mac_ ifq_ ll_ imep_
 for {set i 0} {$i  $nifs_} {incr i} {
 $netif_($i) reset
 $mac_($i) reset
 $ll_($i) reset
 $ifq_($i) reset
 if { [info exists opt(imep)]  $opt(imep) == ON } {
 $imep_($i) reset
 }
 if { $arptable_($i) !=  } {
 $arptable_($i) reset
 }
 }
 }

 Cheers,
 Ramón

 PS - I've already modified the document -- with the correct 
 procedure -- in the web page:
 http://personales.unican.es/aguerocr


 At 16:39 18/01/2007, Tim Elschner wrote:

 great job as far as i can see.
 anyway i ran into problems with ns-mobilenode.tcl:
 in Node/MobileNode instproc reset i couldn't find any differences 
 to the original.
 i got an error, that arptable_ is an array. so i changed every 
 arptable_ into arptable. now ns2 complains about the missing 
 variable arptable :(

 any hints out there?

 cheers,
 tim

 Ramon Aguero schrieb:
  
 Dear all,

 We have seen a lot of requests about the possibility to extend the 
 NS-2 framework to support multiple interfaces. Although there is 
 some information available, according to the messages that have 
 been sent to this list, it seems that a more thorough description 
 may be required.

 In this sense, after performing an analysis about existing 
 activities in this topic, we have created a document that tries to 
 summarize which are the required changes to be performed within 
 the different pieces of the simulator (tcl, c++) as well as how 
 routing protocols can be adapted to make use of the new feature. 
 The howto is entitled Adding Multiple Interface Support in NS-2 
 and it has been written by my colleague Jesús Pérez and myself.

 I’ve uploaded the document, which can be retrieved from the 
 following url:
 http://personales.unican.es/aguerocrhttp://personales.unican.es/aguerocr
  


 We will be happy to receive any feedback, comments, so as to 
 improve the howto, since we would like to have it like a living 
 document, adding new features as they are available.

 Best regards,
 Ramón

 
 Ramón Agüero Calvo
 Dept. of Communications Engineering
 Network Planning  Mobile Communications
 Laboratory
 University of Cantabria
 Avda Castros s/n
 39005 - Santander
 SPAIN
 

[ns] Stop and resume NS simulation

2007-02-26 Thread Alban X

Hi
Does anyone know if there is a method in ns to stop the simulation and
resume it later?
thnx



Re: [ns] new wireless trace format

2007-02-26 Thread David Bath

Hey Matthias (et al),

Many thanks for reply, much appreciated.  $ns_ use-newtrace is done very
early in my tcl script, and it seems to work assuming I don't use a
clicknode.

Something is going a little bit wrong with node-config I think...

ns-clicknode.tcl is a subclass of ns-mobilenode.tcl (now, I'm not hugely
familiar with how tcl classes work), but I would think that means the
functions defined in MobileNode are available to click nodes...

However, the Node/MobileNode instproc mobility-trace ... { ... }
function never seems to be called, and that seems to be the place where
all the newtrace action happens... 

Any thoughts on whether I'm reading this right?

Best,

Dave

-Original Message-
From: Matthias Kuhnert [mailto:[EMAIL PROTECTED] 
Sent: 26 February 2007 13:27
To: David Bath
Subject: Re: [ns] new wireless trace format

OK,
 the calling for this function for the common mobile node runs through
the ns-lib.tcl and ns-mobilenode.tcl.
First with the use-newtrace the variable WirelessNewTrace_ is set to 1,
and within the creation of the mobile node the newtrace is set to the
value of the WirelessNewTrace_. One thing that relates to that is, that
before anything of the mobilenode is set or the node is created the call
to $ns_ use-newtrace must be done...
otherwise the default value of 0 is taken...
You should have a look at the tcl part of the creation of the click node
and perhaps compare it to the mobilenode. 


Matthias


 Original-Nachricht 
Datum: Mon, 26 Feb 2007 12:45:50 -
Von: David Bath [EMAIL PROTECTED]
An: ns-users@ISI.EDU
CC: 
Betreff: Re: [ns] new wireless trace format

 
 Hey there,
 
 Thanks for all the help.  I've put several lines of debug into this
 function, and can now confirm it's being called, and that argc does
 indeed == 3.  
 
 However, crucially (strcmp(argv[1], newtrace) never evaluates to 0,
 and therefore the newtrace_ variable is never set.  
 
 Do you (or anyone else in the list) with better ns knowledge than me
 know who calls CMUTrace::command ? Is it likely to be the ClickNode
 code?
 
 Thanks again for all the help here,
 
 Best Regards,
 
 Dave
 
 -Original Message-
 From: ?e Olbert [mailto:[EMAIL PROTECTED] 
 Sent: 26 February 2007 10:05
 To: David Bath
 Subject: Re: [ns] new wireless trace format
 
 Hi!
 
 its set here in cmu-trace.cc:
 
 CMUTrace::command(int argc, const char*const* argv)
 {
 
 if(argc == 3) {
 if(strcmp(argv[1], node) == 0) {
 node_ = (MobileNode*)
 TclObject::lookup(argv[2]);
 if(node_ == 0)
 return TCL_ERROR;
 return TCL_OK;
 }
   if (strcmp(argv[1], newtrace) == 0) {
   newtrace_ = atoi(argv[2]);
   return TCL_OK;
   }
 }
   return Trace::command(argc, argv);
 }
 
 this is the method to handle tcl commands sent to cmu-trace.cc. in
your 
 tcl script:
 $ns_ use-newtrace
 
 So this means that the ns_ (simulator object) is the one that probably
 calls cmu-trace.cc, this call is made from tcl code.
 
 You could add a print statement to cmu-trace.cc when newtrace is set
to
 see if it it becomes set =)
 
 Then either go after the tcl code or dig deeper in cmu-trace.cc
 
 Good luck!
 
 
  Thanks once again for the reply. . .
 
  Had a read through cmu-trace.cc, and I'm not 100% convinced I can
tell
  where newtrace_ is being set.
 
  I may be wrong, but the fact that I /am/ getting node tracing for
the
  lower layers (MAC, AGT etc) when using nsclick (for info: when using
  nsclick, the routing part is handed off to click, so I would not
 expect
  to see any RTR or IFQ log entries) indicates that CMUTrace is being
  executed.  The only other possibility is that the clicknode has
  implemented tracing all on its own, which seems quite unlikely.
 
  Which component is responsible for setting the newtrace_ variable?
Is
  it possible that clicknodes are somehow mangling it?
 
  Cheers,
 
  Dave
 
  -Original Message-
  From: ?e Olbert [mailto:[EMAIL PROTECTED]
  Sent: 26 February 2007 09:05
  To: David Bath
  Subject: RE: [ns] new wireless trace format
 
  Hi!
 
  I have no idea about click as such, just thought this was an
 interesting
  problem.
 
  cmu-trace.cc prints in new-format if the packet type is not tagged:
 
  // use tagged format if appropriate
  if (pt_-tagged()) {
 
  code
 
  return;
  }
  if (newtrace_) {
 
  code
 
  Since you say you set newtrace I guess it means that it never gets
to
  the
  if (newtrace_) statement.
 
  On a side note: There is no mention about click in the traceformats
  available here..
 

http://nsnam.isi.edu/nsnam/index.php/NS-2_Trace_Formats#New_Wireless_Tra
  ce_Formats
 
  It looks like you have to implement it yourself =P
 
  Regards
 
  Hey there,
 
  Thanks for reply.
 
  This is the same sort of conclusion I came to - but I'm not quite
 sure
  

[ns] Help me in creating MPLS network

2007-02-26 Thread jenefa jebarani

Hi, any one kindly please help me in creating MPLS network efficiently 
in Ns2. Please do tell me the commands like,
   
  1. flow aggrregation
  2. LDP setup
  3. LDP release etc 


 
-
Cheap Talk? Check out Yahoo! Messenger's low PC-to-Phone call rates.


Re: [ns] new wireless trace format

2007-02-26 Thread David Bath

Hey Matthias,

Further to previous emails, I've also tried forcing 

Simulator set WirelessNewTrace_ 1 

in ns-default.tcl

It's definitely being set (debug line), but the output log is still in
old format.

So, I suppose the problem must be somewhere in the nsclick stuff? It's
either resetting the flag, or just not honouring it somewhere 

Again, any thoughts would be very much appreciated,

Best Regards,

Dave

-Original Message-
From: Matthias Kuhnert [mailto:[EMAIL PROTECTED] 
Sent: 26 February 2007 13:27
To: David Bath
Subject: Re: [ns] new wireless trace format

OK,
 the calling for this function for the common mobile node runs through
the ns-lib.tcl and ns-mobilenode.tcl.
First with the use-newtrace the variable WirelessNewTrace_ is set to 1,
and within the creation of the mobile node the newtrace is set to the
value of the WirelessNewTrace_. One thing that relates to that is, that
before anything of the mobilenode is set or the node is created the call
to $ns_ use-newtrace must be done...
otherwise the default value of 0 is taken...
You should have a look at the tcl part of the creation of the click node
and perhaps compare it to the mobilenode. 


Matthias


 Original-Nachricht 
Datum: Mon, 26 Feb 2007 12:45:50 -
Von: David Bath [EMAIL PROTECTED]
An: ns-users@ISI.EDU
CC: 
Betreff: Re: [ns] new wireless trace format

 
 Hey there,
 
 Thanks for all the help.  I've put several lines of debug into this
 function, and can now confirm it's being called, and that argc does
 indeed == 3.  
 
 However, crucially (strcmp(argv[1], newtrace) never evaluates to 0,
 and therefore the newtrace_ variable is never set.  
 
 Do you (or anyone else in the list) with better ns knowledge than me
 know who calls CMUTrace::command ? Is it likely to be the ClickNode
 code?
 
 Thanks again for all the help here,
 
 Best Regards,
 
 Dave
 
 -Original Message-
 From: ?e Olbert [mailto:[EMAIL PROTECTED] 
 Sent: 26 February 2007 10:05
 To: David Bath
 Subject: Re: [ns] new wireless trace format
 
 Hi!
 
 its set here in cmu-trace.cc:
 
 CMUTrace::command(int argc, const char*const* argv)
 {
 
 if(argc == 3) {
 if(strcmp(argv[1], node) == 0) {
 node_ = (MobileNode*)
 TclObject::lookup(argv[2]);
 if(node_ == 0)
 return TCL_ERROR;
 return TCL_OK;
 }
   if (strcmp(argv[1], newtrace) == 0) {
   newtrace_ = atoi(argv[2]);
   return TCL_OK;
   }
 }
   return Trace::command(argc, argv);
 }
 
 this is the method to handle tcl commands sent to cmu-trace.cc. in
your 
 tcl script:
 $ns_ use-newtrace
 
 So this means that the ns_ (simulator object) is the one that probably
 calls cmu-trace.cc, this call is made from tcl code.
 
 You could add a print statement to cmu-trace.cc when newtrace is set
to
 see if it it becomes set =)
 
 Then either go after the tcl code or dig deeper in cmu-trace.cc
 
 Good luck!
 
 
  Thanks once again for the reply. . .
 
  Had a read through cmu-trace.cc, and I'm not 100% convinced I can
tell
  where newtrace_ is being set.
 
  I may be wrong, but the fact that I /am/ getting node tracing for
the
  lower layers (MAC, AGT etc) when using nsclick (for info: when using
  nsclick, the routing part is handed off to click, so I would not
 expect
  to see any RTR or IFQ log entries) indicates that CMUTrace is being
  executed.  The only other possibility is that the clicknode has
  implemented tracing all on its own, which seems quite unlikely.
 
  Which component is responsible for setting the newtrace_ variable?
Is
  it possible that clicknodes are somehow mangling it?
 
  Cheers,
 
  Dave
 
  -Original Message-
  From: ?e Olbert [mailto:[EMAIL PROTECTED]
  Sent: 26 February 2007 09:05
  To: David Bath
  Subject: RE: [ns] new wireless trace format
 
  Hi!
 
  I have no idea about click as such, just thought this was an
 interesting
  problem.
 
  cmu-trace.cc prints in new-format if the packet type is not tagged:
 
  // use tagged format if appropriate
  if (pt_-tagged()) {
 
  code
 
  return;
  }
  if (newtrace_) {
 
  code
 
  Since you say you set newtrace I guess it means that it never gets
to
  the
  if (newtrace_) statement.
 
  On a side note: There is no mention about click in the traceformats
  available here..
 

http://nsnam.isi.edu/nsnam/index.php/NS-2_Trace_Formats#New_Wireless_Tra
  ce_Formats
 
  It looks like you have to implement it yourself =P
 
  Regards
 
  Hey there,
 
  Thanks for reply.
 
  This is the same sort of conclusion I came to - but I'm not quite
 sure
  how to check that, and whether it falls into the Click or ns
 domain...
  I've cross-posted to the Click list, so they might have some
  suggestions.
 
  I don't understand well enough the tracing architecture - the
  ClickNode
  types can clearly print something, 

Re: [ns] need help on wireless simulation

2007-02-26 Thread romzyi prasetyo

I want to observe the queue scheduling inside the router node,here is the
complete picture:

FTP0
 |
tcp0
 |
n1
\ sink0
  \  /
n2 - - - - - - - - - - -n3
   / \
 / sink1
 n0
  |
tcp1
  |
ftp1

I want the packets to go through node 2 before they are sent by node 2 to
node 3, that means it will be one-hope away right? I set tcp agent and ftp
application in node 0 and node 1, as well as attached 2 tcpsink to
node 3.Imade node 3 out of the sensing range of the source nodes so
that i can make
sure that the packets from source node did not go directly to node 3.However,
after the simulation, they are not only didnt go directly to node 3 but also
not sent to node 2. Thats why I am wondering what is wrong with my
simulation.Do you know the situation?
Thanks for your help.

On 2/26/07, Matthias Kuhnert [EMAIL PROTECTED] wrote:

 Hi,

 do you have any traffic between source and sink at all?
 If so, then they simply have a direct connection and communicate without
 the other node. So then either put the nodes further away from each other,
 or decrease the rx/tx range...
 If not, you have a completely different problem and perhaps the nodes too
 far apart from each other...


 Greets,
 Matthias

  Original-Nachricht 
 Datum: Mon, 26 Feb 2007 21:51:04 +0800
 Von: romzyi prasetyo [EMAIL PROTECTED]
 An: ns milis ns-users@ISI.EDU
 CC:
 Betreff: [ns] need help on wireless simulation

 
  hi all,
 
  I am new in NS2. Currently I am doing wireless simulation which consists
  of
  4 nodes. 2 as the source nodes, 1 as a router, the other one as a sink
  node.
  I want to simulate such that when the source nodes generate packets, the
  packets will be queued in relay node  before they are sent to the sink
  node.However,the problem is there is no packet received in node 2 .I
  wonder
  what has caused this error.I have made sure that the relay node is
 located
  pretty near to the source nodes, but still no packets received there.
  Below is the code:
  #
 ===
  # PRIORITY-BASED DROPTAIL QUEUE SIMULATION#
  #
 ===
  # Scheme:
  #
 ---
 
  #n1(100,200,0)
  #  \
  #   n2(150,150,0) --- n3(500,150,0)
  #  /
  #n0(100,100,0)
  #
  # ==

  # Define options
  # ==
  set val(chan)   Channel/WirelessChannel;# channel type
  set val(prop)   Propagation/TwoRayGround   ;# radio-propagation
  model
  set val(netif)  Phy/WirelessPhy;# network interface
  type
  set val(mac)Mac/802_11 ;# MAC type
  set val(ifq)Queue/DropTail/PriQueue;# interface queue
 type
  set val(ll) LL ;# link layer type
  set val(ant)Antenna/OmniAntenna;# antenna model
  set val(ifqlen) 10;# max packet in ifq
  set val(nn) 4  ;# number of
  mobilenodes
  set val(rp) DSDV   ;# routing protocol
  set val(drate)2.0e6   ;# default
 datarate
 
  # ==
  # Main Program
  # ==
 
 
  proc getopt {argc argv} {
  global val
  lappend optlist drate
 
  for {set i 0} {$i  $argc} {incr i} {
  set arg [lindex $argv $i]
  if {[string range $arg 0 0] != -} continue
 
  set name [string range $arg 1 end]
  set val($name) [lindex $argv [expr $i+1]]
  }
 
  }
 
  getopt $argc $argv
 
  # Initialize Global Variables
  set ns_[new Simulator]
  set tracefd [open fyp6.tr w]
  #set tracefd0 [open fyp4_0.tr w]
  #set tracefd1 [open fyp4_1.tr w]
  #set cmt [cmu-trace Send RTR $tracefd]
  $ns_ use-newtrace
  $ns_ trace-all $tracefd
 
  # set up topography object
  set topo   [new Topography]
  $topo load_flatgrid 500 500
 
  # Create God
  create-god $val(nn)
 
  set data0 0
  set data1 0
 
  # Parameter values
  $val(mac) set dataRate_ $val(drate)
  #$val(mac) set bandwidth_ 22.0e6
  #$val(netif) set Pt_ 0.28
  $val(netif) set bandwidth_ 2.0e6
 
 
  #  Create the specified number of mobilenodes [$val(nn)] and attach
 them
  #  to the channel
  #  Here 4 nodes are created : node(0),node(1), node(2)  and node(3)
 
  # configure node
  $ns_ node-config -adhocRouting $val(rp) \
  -llType $val(ll) \
  -macType $val(mac) \
  -ifqType $val(ifq) \
  -ifqLen 

[ns] help needed to analyse directed diffusion trace format!!!

2007-02-26 Thread Chitra Magar

Hi all,
I am using directed diffusion for my simulation. Can anyone help me to
analyse directed diffusion trace format? Thanks in advance.

s 1.559003000 _2_ AGT  --- 7 diffusion 0 [0 0 0 0] --- [2:254 2:255 32
0]
s 1.559298000 _2_ MAC  --- 8 diffusion 52 [0  2 800] --- [2:255
-1:255 32 0]
can anyone explain what above trace format means?

Sincerely,
Chitra Magar
Shanghai, China


Re: [ns] new wireless trace format

2007-02-26 Thread David Bath

Perfect.

In CMUTrace::CMUTrace(const char *s, char t) : Trace(t) {

Changed newtrace_ = 0 to newtrace_ = 1
}

And it seems fine - and reporting correct positions in the trace (at
least in my very first quick tests).

Thanks for the help! 

Best Regards,

Dave

-Original Message-
From: Matthias Kuhnert [mailto:[EMAIL PROTECTED] 
Sent: 26 February 2007 17:25
To: David Bath
Subject: Re: [ns] new wireless trace format

If you really want to try the new trace,
forget all the testing and searching in the tcl direction - 
simply comment out the setting of the newtrace within the cmu-trace.cc
and put at the initialisation an 1 instead of the 0!
Or if that is not working - the next step would be forcing it by
replacing every newtrace within the cmu-trace.cc by an 1 :)
But remember, where you put them to undo the changes, if something went
wrong:)
Then recompile and run 


Greets,
 Matthias


 Original-Nachricht 
Datum: Mon, 26 Feb 2007 16:54:54 -
Von: David Bath [EMAIL PROTECTED]
An: ns-users@ISI.EDU
CC: 
Betreff: Re: [ns] new wireless trace format

 
 Hey Matthias,
 
 Further to previous emails, I've also tried forcing 
 
 Simulator set WirelessNewTrace_ 1 
 
 in ns-default.tcl
 
 It's definitely being set (debug line), but the output log is still in
 old format.
 
 So, I suppose the problem must be somewhere in the nsclick stuff? It's
 either resetting the flag, or just not honouring it somewhere 
 
 Again, any thoughts would be very much appreciated,
 
 Best Regards,
 
 Dave
 
 -Original Message-
 From: Matthias Kuhnert [mailto:[EMAIL PROTECTED] 
 Sent: 26 February 2007 13:27
 To: David Bath
 Subject: Re: [ns] new wireless trace format
 
 OK,
  the calling for this function for the common mobile node runs
through
 the ns-lib.tcl and ns-mobilenode.tcl.
 First with the use-newtrace the variable WirelessNewTrace_ is set to
1,
 and within the creation of the mobile node the newtrace is set to the
 value of the WirelessNewTrace_. One thing that relates to that is,
that
 before anything of the mobilenode is set or the node is created the
call
 to $ns_ use-newtrace must be done...
 otherwise the default value of 0 is taken...
 You should have a look at the tcl part of the creation of the click
node
 and perhaps compare it to the mobilenode. 
 
 
 Matthias
 
 
  Original-Nachricht 
 Datum: Mon, 26 Feb 2007 12:45:50 -
 Von: David Bath [EMAIL PROTECTED]
 An: ns-users@ISI.EDU
 CC: 
 Betreff: Re: [ns] new wireless trace format
 
  
  Hey there,
  
  Thanks for all the help.  I've put several lines of debug into this
  function, and can now confirm it's being called, and that argc does
  indeed == 3.  
  
  However, crucially (strcmp(argv[1], newtrace) never evaluates to
0,
  and therefore the newtrace_ variable is never set.  
  
  Do you (or anyone else in the list) with better ns knowledge than me
  know who calls CMUTrace::command ? Is it likely to be the ClickNode
  code?
  
  Thanks again for all the help here,
  
  Best Regards,
  
  Dave
  
  -Original Message-
  From: ?e Olbert [mailto:[EMAIL PROTECTED] 
  Sent: 26 February 2007 10:05
  To: David Bath
  Subject: Re: [ns] new wireless trace format
  
  Hi!
  
  its set here in cmu-trace.cc:
  
  CMUTrace::command(int argc, const char*const* argv)
  {
  
  if(argc == 3) {
  if(strcmp(argv[1], node) == 0) {
  node_ = (MobileNode*)
  TclObject::lookup(argv[2]);
  if(node_ == 0)
  return TCL_ERROR;
  return TCL_OK;
  }
  if (strcmp(argv[1], newtrace) == 0) {
  newtrace_ = atoi(argv[2]);
  return TCL_OK;
  }
  }
  return Trace::command(argc, argv);
  }
  
  this is the method to handle tcl commands sent to cmu-trace.cc. in
 your 
  tcl script:
  $ns_ use-newtrace
  
  So this means that the ns_ (simulator object) is the one that
probably
  calls cmu-trace.cc, this call is made from tcl code.
  
  You could add a print statement to cmu-trace.cc when newtrace is set
 to
  see if it it becomes set =)
  
  Then either go after the tcl code or dig deeper in cmu-trace.cc
  
  Good luck!
  
  
   Thanks once again for the reply. . .
  
   Had a read through cmu-trace.cc, and I'm not 100% convinced I can
 tell
   where newtrace_ is being set.
  
   I may be wrong, but the fact that I /am/ getting node tracing for
 the
   lower layers (MAC, AGT etc) when using nsclick (for info: when
using
   nsclick, the routing part is handed off to click, so I would not
  expect
   to see any RTR or IFQ log entries) indicates that CMUTrace is
being
   executed.  The only other possibility is that the clicknode has
   implemented tracing all on its own, which seems quite unlikely.
  
   Which component is responsible for setting the newtrace_ variable?
 Is
   it possible that clicknodes are 

[ns] print the distination address.

2007-02-26 Thread Albalas F \(AT\)

Hi all.,

 

I am working on MAODV algorithm, during my program tracing I tried to
print out the destination address, the command I did is 

 

Printf ( the destination address is %d   \n@,ih-daddr())

 

The program works fine but the output for this command is always
234881024.

 

I think this is because the type (%d) is not correct.

 

Any help.

 

Please

Thanks

Firas

 

 

 



[ns] obstacle mobility model

2007-02-26 Thread ibrahim koda

Hi ALL
i have simulated (DSR,AODV,DSDV) using Manhattan and  Random Waypoint.I 
want to check the performance of these adhoc   protocols in real environment.i 
looked  for added obstacle mobility model for  more realistic work. 
thanks for any suggestion with regards
ibrahim khider

 
-
Finding fabulous fares is fun.
Let Yahoo! FareChase search your favorite travel sites to find flight and hotel 
bargains.


[ns] obstacle mobility model in urban area

2007-02-26 Thread ibrahim koda

Hi ALL
i have simulated (DSR,AODV,DSDV) using Manhattan and  Random Waypoint.I 
want to check the performance of these adhoc   protocols in real environment.i 
looked  for using  obstacle mobility model for  more realistic work.How i can 
use obstacle mobility model?. 
thanks for any suggestion with regards
ibrahim khider

 
-
Everyone is raving about the all-new Yahoo! Mail beta.


Re: [ns] general question about delay

2007-02-26 Thread ben

Hi,

I dont know about DSR protocol. I think delay can be add to your simulation by 
using this formula. delay = number of bits / link bitrate . For example, if you 
can find out the number of bits that you want to transmit and the link bitrate. 
You can simulate the transmission delay. Then, the delay value can be use to 
schedule the event to send the next packet. 

I might be wrong. Hope others who are knowledgeable can clear this up.

Thank you.

Ben.

- Original Message 
From: Syed Muhammad Ali Hussain [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, February 19, 2007 8:34:15 AM
Subject: RE: [ns] general question about delay


hi,

 i want to add a delay to or something that packet wait some time in a quequ 
before they recive can you help that how i will add delay in DSR or any 
protocol?

Please help me in new in real problem

Regards,

Hussain










From:  ben [EMAIL PROTECTED]
To:  ns-users ns-users@ISI.EDU
Subject:  [ns] general question about delay
Date:  Sat, 20 Jan 2007 03:08:37 + (GMT)

Hi,

I have two CBR traffic generator and receiver in my
simulation. Packets are generated at 32 kbps and on
ideal condition with a droptail queue. The receiver
should receive the packets at 32kbps.

I'm trying out the WRR packet scheduler. The
parameters are buffer size, the link bit rate
(bandwidth), scheduler delay and  a variable that
stores the sequence of which queue to be serve. The
parameters would simulate the queueing and the
transmission delay. In order to get 32kbps at the
receiver, I would adjust these 
parameters. Then, I
would repeat the simulation with different data rates.


Am I doing it right? Any suggestion on literature or
reference that should I refer on this matter.

Thank you very much.

Akashah

Send instant messages to your online friends http://uk.messenger.yahoo.com



Express yourself instantly with MSN Messenger! MSN Messenger Download today 
it's FREE!




Send instant messages to your online friends http://uk.messenger.yahoo.com 


Re: [ns] wimax NIST module print statistics option

2007-02-26 Thread ritesh kalle

Hi
 I am using the NIST libraries for WiMAX from NIST on a Fedora Core 4
 machine.
 Iam successfully able to simulate and obtain results for bandwidth and
 throughput when I awk and grep on them.
 But, I know there is a default print statistics option in the 
 ns-wimax.tclfile.
 Even if I change that print_stats_ option to true and rebuild the ns, also
 include the command
 Mac/802_16 set print_stats_ true in the tcl script  for simulation, Iam
 getting only zeroes printed fpr all the statistics.
 Where am I going wrong. Kindly help!!

 Regards
 Ritesh K
 MTech
 IIIT-B



[ns] Implementing LAN Switch

2007-02-26 Thread Aditya

Hi,


I m working on implementing LAN Switch.

Can anyone tell me if we have to follow any specific design philosophy
while extending NS2?


Do we have to stick to the original implementation or we can make
modifications as required (Classes and objects)???


Thanx

--
Aditya
Dept of Comp Sci  Tech
Goa University.
--