[ns] About tcl example

Yong, Chee Yeew Chee-Yeew.Yong@thalesgroup.com
Tue Jan 13 02:20:04 PST 2004


Hi Jack,

cbr-50-10-4-512 sets up the traffic for the simulation and it only uses
CBR/UDP traffic. 

Therefore, any TCP values that is set in wireless.tcl is redundant. I
suspect that whoever wrote wireless.tcl used TCP traffic in their simulation
some time ago and did not erase them for the ns build release. I repeat, as
long as you are not using TCP, you can set any values you want to those TCP
agents, and it would NOT matter.

Regards,
Chee

-----Original Message-----
From: Jack Wang [mailto:junw24@hotmail.com]
Sent: 12 January 2004 18:04
To: Chee-Yeew.Yong@thalesgroup.com
Cc: ns-users@ISI.EDU
Subject: RE: [ns] About tcl example


Hi Chee Yeew :

Thanks a lot.

How about packet size? Wireless.tcl uses cbr-50-10-4-512.  cbr-50-10-4-512 
sets the packet size.
Why needs "Agent/TCP set packetSize_       1460" ?
Furthermore cbr-50-10-4-512 sets UDP agent. Why Agent/TCP and Agent/TCPSink 
are needed?

Thanks again.

JAck


>From: "Yong, Chee Yeew " <Chee-Yeew.Yong@thalesgroup.com>
>To: 'Jack Wang' <junw24@hotmail.com>
>CC: ns-users@ISI.EDU
>Subject: RE: [ns] About tcl example
>Date: Mon, 12 Jan 2004 10:00:59 -0000
>
>Jack,
>
>1) Commenting out the Agent's values in your script makes no difference
>because they are already defaulted to zero (ns-default.tcl).
>
>2) I am not sure about the significance of the Tcl files that you did not
>'source', though.
>
>3) Trace files, as far as I know, is written by cmu-trace.cc and
>cmu-trace.h, if you are using CMU wireless extensions.
>
>Regards,
>Chee
>
>
> >I am not sure about your 1st question.
> >but i know that the trace file is written from the .cc code in ns2.
> >for eg, if u are using DSR for then the code to write trace file can be
> >found
> >in
> >~ns/dsr/dsragent.cc
>
>So the trace file is not written by wireless.tcl, right?
>How about AODV?
>
>As to my first question, here I clarify it.
>First I run wireless.tcl and get the result in out.tr. Then I comment out
>the following code and get another out.tr. I compare the new out.tr with 
>the
>
>old out.tr and find that they are identical. It seems that the code that I
>comment out has no influence to the result. What is the following code in
>wireless.tcl for?
>
>Agent/Null set sport_           0
>Agent/Null set dport_           0
>
>Agent/CBR set sport_            0
>Agent/CBR set dport_            0
>
>Agent/TCPSink set sport_        0
>Agent/TCPSink set dport_        0
>
>Agent/TCP set sport_            0
>Agent/TCP set dport_            0
>Agent/TCP set packetSize_       1460
>
>and
>
>source /usr/local/ns-allinone-2.26/ns-2.26/tcl/lib/ns-bsnode.tcl
>source /usr/local/ns-allinone-2.26/ns-2.26/tcl/mobility/com.tcl
>
>Thanks a lot
>
>Jack
>
>
>
> >hope this helps,
> >jeevan
> >Quoting Jack Wang <junw24@hotmail.com>:
> >
> > >
> > > Hi all:
> > >
> > > (I post it before, but got no reponse. So I post again. Please give me
> >some
> > > help. Thanks.)
> > >
> > > I am studying the example wireless.tcl in the directory
> >../ns-2.26/tcl/ex. I
> > > found that if I comment out the following codes, the result (out.tr)
> >does
> > > not change:
> > >
> > > Agent/Null set sport_           0
> > > Agent/Null set dport_           0
> > >
> > > Agent/CBR set sport_            0
> > > Agent/CBR set dport_            0
> > >
> > > Agent/TCPSink set sport_        0
> > > Agent/TCPSink set dport_        0
> > >
> > > Agent/TCP set sport_            0
> > > Agent/TCP set dport_            0
> > > Agent/TCP set packetSize_       1460
> > >
> > > and
> > >
> > > source /usr/local/ns-allinone-2.26/ns-2.26/tcl/lib/ns-bsnode.tcl
> > > source /usr/local/ns-allinone-2.26/ns-2.26/tcl/mobility/com.tcl
> > >
> > > What are the above code for?
> > >
> > > My another question is:
> > > The trace file (out.tr) is opened by: set tracefd     [open $opt(tr) 
>w].
> > > how is the result written to the trace file--- out.tr? There is no 
>code
> >to
> > > output the result to the trace file.
> > >
> > > Thanks a lot.
> > >
> > > Jack
> > >
> > > _________________________________________________________________
> > > MSN 8 with e-mail virus protection service: 2 months FREE*
> > > http://join.msn.com/?page=features/virus
> > >
> > >
> >
> >
> >
>
>_________________________________________________________________
>Add photos to your messages with MSN 8. Get 2 months FREE*.
>http://join.msn.com/?page=features/featuredemail

_________________________________________________________________
The new MSN 8: smart spam protection and 2 months FREE*  
http://join.msn.com/?page=features/junkmail




More information about the Ns-users mailing list