[ns] how to trace average RED queue dynamics per flow

2008-04-21 Thread Soo-Hyun Choi


imagine there are 8 TCP and 8 TFRC sources sharing the same bottleneck  
(RED queue).

i would like to draw the average red queue _per_ flow (not aggregate).

i have used similar to the following tcl script in my simulation  
script, but it only traces the aggregate (8 tcp + 8 tfrc) average red  
queue plot. i tried printing directly from the source (printing  
"new_ave" variable in red.cc), but it did same.


set redq [[$ns link $node_(r1) $node_(r2)] queue]
set tchan_ [open red_q.tr w]
$redq trace curq_;  # you need to change "int" to "TracedInt" in
red.h
$redq trace ave_;   # you need to change "double" to "TracedDouble"
in  
red.h
$redq attach $tchan_


any help would be appreciated.

thanks,
soo-hyun


Re: [ns] Q] how to implement an agent (traffic generator) on top of MAC

2005-12-29 Thread Soo-Hyun Choi

I am not too sure about your implementation, but if I add a comment
about agent things in your question, you may need to modify your dumb
agent's sink (e.g., dumb-sink.cc) as it could respond to other sending
agent's packets. (Assuming that you have your dumb agent for sending
part and receiving part; for example, dumb.cc and dumb-sink.cc.)

For example, when we implement another type of congestion control
module using ns-2, we sometimes may need to modify tcp-sink.cc as the
original TCP agent can understand (and respond) my own agent's packet
transmission.

SH-

On 12/29/05, Myung-Ah Park <[EMAIL PROTECTED]> wrote:
>
> I want to build an agent which is a Poisson traffic generator on top of MAC 
> layer.
> I do not need any routing module since traffic in my simulation is local, 
> meaning that the destination of a packet is one of neighbors of a given node. 
> (random traffic per packet basis)
>
> With my little knowledge, if I use built-in Poisson traffic module, I have to 
> attach traffic sink and source, which I do not want because of traffic type
>
> So, I made an agent like Ping example which directly accessed "LL" target and 
> configured a node with "Dumb-agent" for routing.
> The current situation is that an agent can send packets, but can not receive 
> packets from other agents.
> I think it is because  dumb-agent is not hooked to my agent.
> How can I make a hook between dumb-agent and my agent.
> I am a beginner.  Please help me out.
>
> If you have a better idea of implementing my work,  please post it.
> Thank you.
>
> Myung
>
>
>
>
>
> -
> Yahoo! Shopping
>  Find Great Deals on Holiday Gifts at Yahoo! Shopping
>



Re: [ns] new wiki for nsnam project

2006-01-05 Thread Soo-Hyun Choi

I have long been thought of including ns-2 mailing list search site in
the ns-2 FAQ section. Many subscribers in this list doesn't seem to
know that such site is existing.

- mailing list archive search site (http://www.isi.edu/nsnam/htdig/search.html)

I could have modified the ns-2 Wiki, but it would be better to leave
it so that Tom could insert it in an appropriate section at the Wiki.
You may want to create a bullet saying "How to search ns-2 mailing
list archives?" and include the above link.

Soo-Hyun


On 1/3/06, Tom Henderson <[EMAIL PROTECTED]> wrote:
>
> All,
> We've started a wiki for ns-2 and nam:
> http://nsnam.isi.edu/nsnam/index.php/Main_Page
>
> We intend to migrate the static web content (on installing and using ns
> and nam) to this wiki from http://www.isi.edu/nsnam/ns/ and
> http://www.isi.edu/nsnam/nam/.
>
> We are discussing the licensing of wiki contributions on the
> ns-developers list, but expect the wiki text to be covered by GNU GPL or
> other free documentation license.
>
> One purpose of having a wiki is to let people directly contribute their
> experiences in building, troubleshooting, and extending ns and nam, so
> please create an account and contribute if you have some insight to share.
>
> Tom
>
>



Re: [ns] install failure on debian testing

2006-01-11 Thread Soo-Hyun Choi

I think you don't seem to have Tcl/Tk development packages for Debian.
You could probably do "sudo apt-get install tcl8.3-dev tk8.3-dev", and
then try again ns-2 installation.

-SH


On 1/11/06, Leonardo Maccari
<[EMAIL PROTECTED]> wrote:
>
>
> I'm trying to install ns2 2.29 (tried 2.28 too) on debian testing.  If I
> understood correctly the allinone package should contain all I need, apart
> x library that I have installed separately, but installation script fails
> with this:
>
> 
> * Build tcl8.4.5
> 
> creating cache ./config.cache
> checking whether to use symlinks for manpages... no
> checking compression for manpages... no
> checking for gcc... gcc
> checking whether the C compiler (gcc  ) works... yes
> checking whether the C compiler (gcc  ) is a cross-compiler... no
> checking whether we are using GNU C... yes
> checking whether gcc accepts -g... yes
> checking how to run the C preprocessor... gcc -E
> checking for unistd.h... yes
> checking for limits.h... yes
> checking for building with threads... no (default)
> checking if the compiler understands -pipe... yes
> checking for required early compiler flags...  _LARGEFILE64_SOURCE
> checking for 64-bit integer type... long long
> checking for struct dirent64... no
> checking for struct stat64... yes
> checking for off64_t... yes
> checking whether byte ordering is bigendian... no
> checking for getcwd... yes
> checking for opendir... yes
> checking for strstr... yes
> checking for strtol... yes
> checking for strtoll... yes
> checking for strtoull... yes
> checking for tmpnam... yes
> checking for waitpid... yes
> checking for strerror... yes
> checking for getwd... yes
> checking for wait3... yes
> checking for uname... yes
> checking for realpath... yes
> checking dirent.h... yes
> checking for errno.h... yes
> checking for float.h... yes
> checking for values.h... yes
> checking for limits.h... (cached) yes
> checking for stdlib.h... yes
> checking for string.h... yes
> checking for sys/wait.h... yes
> checking for dlfcn.h... yes
> checking for unistd.h... (cached) yes
> checking for sys/param.h... yes
> checking for sys/modem.h... no
> checking termios vs. termio vs. sgtty... termios
> checking for fd_set in sys/types... yes
> checking whether struct tm is in sys/time.h or time.h... time.h
> checking for sys/time.h... yes
> checking whether time.h and sys/time.h may both be included... yes
> checking for tm_zone in struct tm... yes
> checking for gmtime_r... yes
> checking for localtime_r... yes
> checking tm_tzadj in struct tm... no
> checking tm_gmtoff in struct tm... yes
> checking long timezone variable... yes
> checking for st_blksize in struct stat... yes
> checking for fstatfs... yes
> checking for 8-bit clean memcmp... yes
> checking for memmove... yes
> checking proper strstr implementation... yes
> checking for strtoul... yes
> checking for strtod... yes
> checking for strtod... (cached) yes
> checking for Solaris2.4/Tru64 strtod bugs... ok
> checking for ANSI C header files... yes
> checking for mode_t... yes
> checking for pid_t... yes
> checking for size_t... yes
> checking for uid_t in sys/types.h... yes
> checking for socklen_t... yes
> checking for opendir... (cached) yes
> checking union wait... yes
> checking for strncasecmp... yes
> checking for BSDgettimeofday... no
> checking for gettimeofday... yes
> checking for gettimeofday declaration... present
> checking whether char is unsigned... no
> checking signed char declarations... yes
> checking for a putenv() that copies the buffer... no
> checking for langinfo.h... yes
> checking whether to use nl_langinfo... yes
> checking for sin... no
> checking for main in -lieee... yes
> checking for main in -linet... no
> checking for net/errno.h... no
> checking for connect... yes
> checking for gethostbyname... yes
> checking how to build libraries... static
> checking for ranlib... ranlib
> checking if 64bit support is requested... no
> checking if 64bit Sparc VIS support is requested... no
> checking system version (for dynamic loading)... ./configure: line 7068:
> syntax error near unexpected token `)'
> ./configure: line 7068: `   OSF*)'
> tcl8.3.2 configuration failed! Exiting ...
> Tcl is not part of the ns project.  Please see www.Scriptics.com
> to see if they have a fix for your platform.
>
>
> the configure file giving error is the tcl8.4.5 configure:
>
>
>  case $system in
># There used to be code here to use FIONBIO under AIX.  However,
># it
># was reported that FIONBIO doesn't work under AIX 3.2.5.  Since
># using O_NONBLOCK seems fine under AIX 4.*, I removed the FIONBIO
># code (JO, 5/31/97).
>
>
> ###
> ### following is line 7068
> ###
>
>OSF*)
>cat >> confdefs.h <<\EOF
> #define USE_FIONBIO 1
> EOF
>
>echo "$ac_t""FIONBIO" 1>&6
>;;
>SunOS-4*)
>

Re: [ns] modified RED error

2006-02-28 Thread Soo-Hyun Choi

what have you modified for RED and what sort of tcl script did you run?


On 2/27/06, Jaewoo Park <[EMAIL PROTECTED]> wrote:
>
> Dear ns-users
>   I've modified RED in ns-2.28 in a recent version of Red Hat.
>   But I get messages such as
>
>   ***glibc detected***corrupted double-linked list: 0x09b70ec0***
>   Aborted
>   ***glibc detected***malloc(): memory corruption (fast): 0x0977f510***
>   Aborted
>
>   when I run the tcl script.
>   What does this indicate?
>
>   I appreciate your help in advance.
>   Sincerely
>   Jae
>
>
>
> -
> Relax. Yahoo! Mail virus scanning helps detect nasty viruses!
>



Re: [ns] check simulation results of LEACH on ns-2.27

2006-02-28 Thread Soo-Hyun Choi

What if you run the same simulation to the paper(s)? Anyway, you'd
better speak to the original authors for this.

On 2/27/06, YoungTae Noh <[EMAIL PROTECTED]> wrote:
>
> Hi all,
>
> thx in advance, I built LEACH on ns-2.27.
>
> To check that the LEACH works correctly, after changing some
> parameter, I simulated wireless.tcl file based on leach_test shell
> script file.
>
>
> With these changed parameters  (in leach_test file)
> ---
> # energy values.  How much energy does each node have initially
> eq_energy=1
> init_energy=0.25
> # stop is the time to stop the simulation if it is still running
> stop=250
> # x,y is the size of the field
> x=1000
> y=1000
> # bs_x, bs_y is the location of the base station in the field.
> bs_x=50
> bs_y=150
> ---
> In addition to,
>
> Since the field 100by100 is changed into 50by50,
> the coordinates of all nodes (in ns-2.27\mit\uAMPS\sims\100nodes.txt)
> are divided by 2.
> ---
>
>
>
>
> These changed parameters are for comparing results from this with the
> results from the original paper below.
>
> W. Heinzelman, A. Chandrakasan, and H. Balakrishnan, "Energy-efficient
> routing protocols for wireless microsensor networks," in Proc.
> 33rd Hawaii Int. Conf. System Sciences (HICSS), Maui, HI, Jan. 2000.
>
>
>
>
>
> Unfortunately, the results bt'n two simultions are very different!
>
>
>
>
> With using these parameters, my result in 'leach.out' file is around
> --
>
> At 139.099638:
>   Total Energy = 40.297139964540001
>   Total Data = 2510
>   Total Alive = 4
>
> Simulation complete.
>
> --
>
> In this simulation,cluster heads are changed  every 2.5sec. (thus, 56
> rounds totally)
>
>
> But, in W. Heinzelman's paper, when the last node dies, the number of
> total rounds is 665 with the same parameters.
>
>
> This is somewhat strange.
>
>
>
> So, I want to ask you,
>
>
> Did I make some mistakes?
>
> Or, should I port LEACH on NS-2.1b5 ?
>
> Thank for reading this.
>
>
>
>
>
> Hopely, waiting for reply.
>
>



Re: [ns] How to speed up ns-2 simulations

2006-02-28 Thread Soo-Hyun Choi

1. A PhD student at Caltech wrote a patch to seep up a usual ns-2
simulation. You can look it up at
http://netlab.caltech.edu/~weixl/technical/ns2patch/ns2patch.htm.

2. As far as my understanding, several hundred nodes with ns-2 might
not be a good choice in terms of CPU time, memory consumption,
debugging etc etc. If your simulation needs to be run with that many
nodes, people usually write his/her own simulator.

3. In general, you would normally need the trace-all trace file in
order to understand/analyse your simulation. Anyway, you should be
able to get rid of it from the script with no error.

Soo-Hyun

On 2/28/06, Michele Battelli <[EMAIL PROTECTED]> wrote:
>
>
>
> Hi all,
>  I am facing the problem of speeding up ns-2 simulations. I have my own
> agent and I do simulation on wireless networks with up to 600 nodes. I
> don't use any routing agent nor I use traffic generators.
> Assuming that my agent is internally well optimized, I tried to reduce
> the number of "things" that ns-2 does in order to avoid unnecessary
> computation. The first thing was to I avoid the use of GOD. Second, I
> disabled all the tracing from my Tcl script.
> Unfortunately I could not disable the creation of the trace file, i.e.,
> I could not get rid of the following lines:
>
> set tracefd  [open wireless-out.tr  w]
> $ns_ trace-all $tracefd
>
> without getting an error.
>
> I would like to know 1) if I can totally disable any internal tracing 2)
> if there are other things that I can disable to make ns-2 run faster
> either in the C part of the simulator or though Tcl script.
>
> Thank you in advance,
> Regards
> Michele Battelli
>
>
>



Re: [ns] How to speed up ns-2 simulations

2006-02-28 Thread Soo-Hyun Choi

On 2/28/06, Michele Battelli <[EMAIL PROTECTED]> wrote:
> Hi Soo-Hyun, thanks for your reply. I have a few comments:
>
> Soo-Hyun Choi wrote:
> 1. A PhD student at Caltech wrote a patch to seep up a usual
> ns-2
simulation. You can look it up
> at
http://netlab.caltech.edu/~weixl/technical/ns2patch/ns2patch.htm.
> I will take a look at this
>
> 2. As far as my understanding, several hundred nodes with ns-2 might
not be
> a good choice in terms of CPU time, memory consumption,
debugging etc etc.
> If your simulation needs to be run with that many
nodes, people usually
> write his/her own simulator.

> Writing your own code is not the best solution for many reasons (check the
> paper "MANET Simulations: The Incredibles" by Stuart Kurkowski et al.),
> that's why I would like to stick with ns-2. So far I managed to have a 600
> hundred nodes static wireless network with my own agent, running within
> 10seconds. I am trying to reduce more the running time by avoiding useless
> ns-2 internal information storage.

This issue would be very controversial depending on a simulation study
that you are running. And people in networking research community have
different views on this. Writing your own code may be worse than using
an existing tool (e.g. NS-2), but that does not necessarily mean that
you are on the right track just because you use NS-2. Conversely, the
fact that you use your own simulator for your study does not mean that
you are doing a wrong way of research.

So I will leave this issue on your own decision. By the way, the
intention of the paper is not about using ns-2 or not, but about a
self-developed simulator which we don't (or cannot) trust.


>
> 3. In general, you would normally need the trace-all trace file in
order to
> understand/analyse your simulation. Anyway, you should be
able to get rid of
> it from the script with no error.

> One of the way I found to speed up simulation is to avoid ns-2 tracing. In
> order to retrieve the data I need I have a dynamic structure in the agent
> that stores the data I need. When the agent is done with its work it simply
> dumps the values in the structure using a simple "cout".
> Unfortunately, removing the line
>
> $ns trace-all $tracefile
>
> ends up in a error when the nodes are instanced in the tcl file. I can't
> figure out why.
> Thank you for further suggestions
>
> Michele
>
>
>
> Soo-Hyun

On 2/28/06, Michele Battelli <[EMAIL PROTECTED]> wrote:

>
Hi all,
I am facing the problem of speeding up ns-2 simulations. I have my
> own
agent and I do simulation on wireless networks with up to 600 nodes.
> I
don't use any routing agent nor I use traffic generators.
Assuming that my
> agent is internally well optimized, I tried to reduce
the number of "things"
> that ns-2 does in order to avoid unnecessary
computation. The first thing
> was to I avoid the use of GOD. Second, I
disabled all the tracing from my
> Tcl script.
Unfortunately I could not disable the creation of the trace
> file, i.e.,
I could not get rid of the following lines:

set tracefd [open
> wireless-out.tr w]
$ns_ trace-all $tracefd

without getting an error.

I
> would like to know 1) if I can totally disable any internal tracing 2)
if
> there are other things that I can disable to make ns-2 run faster
either in
> the C part of the simulator or though Tcl script.

Thank you in
> advance,
Regards
Michele Battelli




>

>
>



Re: [ns] RED parameters

2006-03-02 Thread Soo-Hyun Choi

You will need to change max_p and q_weight as well. Sally's
recommendation for the max_p is to set it as twice as the loss rate.

Soo-Hyun

On 3/2/06, #LIM XIAOWEI# <[EMAIL PROTECTED]> wrote:
>
> HI!!
>
> Would like to clarify some things with you.
> I tried to vary only the min and max thresholds for RED, so as to conclude 
> the min and max behaviors, however, no matter how i change the thresholds, 
> the results are the same.
>
> When i change the threshold values + the throughput of the channel where RED 
> is implemented, the packetloss remains the same, but there is delay.
>
> How should i change so that it becomes drastic change?
>
> Thanks!
> zoe
>



Re: [ns] RED queue

2006-03-03 Thread Soo-Hyun Choi

Yes, there is a possibility that RED queue will drop a packet
depending upon max_p, minth, and maxth.

I would suggest you to read RED paper that Sally wrote.
http://www.icir.org/floyd/papers/red/red.html

SH

On 3/3/06, #LIM XIAOWEI# <[EMAIL PROTECTED]> wrote:
>
> Hi!
>
> Without an error model, would there still be dropping of packets
>
> my RED parameters are set as
> minth threshold 5
> max threshold 15
> q_weight 0.002
> maxp 0.1
> markp 0.5
>
> Thanks!
> zoe
>



Re: [ns] RED parameters

2006-03-03 Thread Soo-Hyun Choi

You can set 1/max_p using linterm_ variable in ns-default.tcl. And I
think you should read http://www.icir.org/floyd/REDparameters.txt
before you conduct an RED experiment.

SH

On 3/3/06, #LIM XIAOWEI# <[EMAIL PROTECTED]> wrote:
>
>
> Hi Soo-Hyun!
>
> Thanks!
> However in my ns-default.tcl, i do not see max_p, i only see cur_max_. Plus
> what should be the suggested q_weight?
>
> Thank you!
> Zoe
>
>  
>
> From: [EMAIL PROTECTED] on behalf of Soo-Hyun Choi
> Sent: Fri 3/3/2006 9:37 AM
> To: #LIM XIAOWEI#
> Cc: ns-users@isi.edu
> Subject: Re: [ns] RED parameters
>
>
>
>
> You will need to change max_p and q_weight as well. Sally's
> recommendation for the max_p is to set it as twice as the loss rate.
>
> Soo-Hyun
>
> On 3/2/06, #LIM XIAOWEI# <[EMAIL PROTECTED]> wrote:
> >
> > HI!!
> >
> > Would like to clarify some things with you.
> > I tried to vary only the min and max thresholds for RED, so as to conclude
> the min and max behaviors, however, no matter how i change the thresholds,
> the results are the same.
> >
> > When i change the threshold values + the throughput of the channel where
> RED is implemented, the packetloss remains the same, but there is delay.
> >
> > How should i change so that it becomes drastic change?
> >
> > Thanks!
> > zoe
> >
>



Re: [ns] RED queue grows beyond limit on ns-2.28-9

2006-03-07 Thread Soo-Hyun Choi

The instantaneous RED queue size shouldn't grow beyond the actual RED
queue size, and the average RED queue size shouldn't grow beyond the
maxthresh.

You may want to check your parameters again.

On 3/7/06, ben <[EMAIL PROTECTED]> wrote:
>
> Hi ns users,
>
> I some doubt about the RED Queue. I run a
> simple tcl script ( can be download from
> http://nile.wpi.edu/NS/Example/red.tcl) for RED queue
> with 2 TCP sources. I observed that the RED queue just
> grow beyond the limit (it is set to 100 packets in the
> tcl script) when run on ns-2.28, ns-2.28 with eurane
> extension and ns-2.29 .
>
> It is perfectly ok when run on ns-2.27 and ns-2.26
> with eurane extension. Any comment on this?
>
> p/s: I'm using fedora core 4 and cygwin on windows
>
> Ok cheers,
>
> Ben
> Master Student.
>
> Send instant messages to your online friends http://uk.messenger.yahoo.com
>
>



Re: [ns] RED queue grows beyond limit on ns-2.28-9

2006-03-07 Thread Soo-Hyun Choi

You need to set the queue size by modifying the following two lines.

$ns queue-limit $node_(r1) $node_(r2) 100
$ns queue-limit $node_(r2) $node_(r1) 100


On 3/7/06, ben <[EMAIL PROTECTED]> wrote:
> Hi Soo-Hyun Choi,
>
> I attached the output of the xgraph in ps format.
> 1. red.ps - red.tcl run on ns2.27 in fedora core 4
> 2. red2.ps - the same red.tcl on ns2.28 in fedora
> core4
>
> In previous post, I wrote the limit is 100. It is
> mistake, it is infact limit_ is equals to 25.
>
>
> In the first part the current queue is below 25
> packets. However, in the second part, the red queue
> just grow beyond 25 packets.
>
>
> Cheers,
>
>
> --- Soo-Hyun Choi <[EMAIL PROTECTED]>
> wrote:
>
> > The instantaneous RED queue size shouldn't grow
> > beyond the actual RED
> > queue size, and the average RED queue size shouldn't
> > grow beyond the
> > maxthresh.
> >
> > You may want to check your parameters again.
> >
> > On 3/7/06, ben <[EMAIL PROTECTED]> wrote:
> > >
> > > Hi ns users,
> > >
> > > I some doubt about the RED Queue. I run a
> > > simple tcl script ( can be download from
> > > http://nile.wpi.edu/NS/Example/red.tcl) for RED
> > queue
> > > with 2 TCP sources. I observed that the RED queue
> > just
> > > grow beyond the limit (it is set to 100 packets in
> > the
> > > tcl script) when run on ns-2.28, ns-2.28 with
> > eurane
> > > extension and ns-2.29 .
> > >
> > > It is perfectly ok when run on ns-2.27 and ns-2.26
> > > with eurane extension. Any comment on this?
> > >
> > > p/s: I'm using fedora core 4 and cygwin on windows
> > >
> > > Ok cheers,
> > >
> > > Ben
> > > Master Student.
> > >
> > > Send instant messages to your online friends
> > http://uk.messenger.yahoo.com
> > >
> > >
> >
>
> Send instant messages to your online friends http://uk.messenger.yahoo.com
>
>



Re: [ns] RED queue grows beyond limit on ns-2.28-9 - solved

2006-03-08 Thread Soo-Hyun Choi

On 3/8/06, ben <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> I think I solved the problem. Actually it is not a
> problem.
>
> I think in ns2.28 the paramater "Queue/RED set
> queue-in-bytes_ true" is set to true by default. In
> ns2.27, the parameter is set to false by default.
>
> I want the queue size in term of packets. To over ride
> this just add the following parameter in red.tcl
> script when using ns228.
>
> "Queue/RED set queue-in-bytes_ false"
>
> I think this is also apply for ns229.
>
> Any reason why we want to monitor the queue in bytes
> rather than in packest?
>

Because actual TCP window size is determined in bytes, so sometimes
the queue length should be measured in bytes not in packets. But, in
ns-2, TCP's cwin is determined in packets as far as I remember.

>
>
> Cheers,
>
> Ben.
> --- ben <[EMAIL PROTECTED]> wrote:
>
> > Hi there,
> >
> > My apologies. "limit_" is my typing error.
> >
> > > > > $ns queue-limit $node_(r1) $node_(r2) 100
> > > > > $ns queue-limit $node_(r2) $node_(r1) 100
> >
> > I set the queue limit according to the command
> > above.As  I previously mentioned, the queue just
> > grew
> > beyond the limit on ns-2.28 as well as ns-2.29.
> >
> > Thank you.
> >
> >
> >
> >
> > --- Soo-Hyun Choi <[EMAIL PROTECTED]>
> > wrote:
> >
> > > 1) what do you precisely mean by "limit_"?
> > > 2) how did you set "limit_"?
> > >
> > >
> > > On 3/7/06, ben <[EMAIL PROTECTED]> wrote:
> > > >
> > > >
> > > >
> > > > Hi,
> > > >
> > > > The red queue still grow beyond the limit_ if  i
> > > set
> > > > to 100 or 25 or any other value on ns-2.28.
> > Please
> > > > refer to redns228.ps.
> > > >
> > > > However, it does not happen when I rerun the tcl
> > > > script on ns-2.27. Both  ns are run on Fedora
> > Core
> > > 4.
> > > > Tcl script that I use can be on obtain from
> > > > ttp://nile.wpi.edu/NS/Example/red.tcl
> > > >
> > > > Cheers,
> > > >
> > > > --- Soo-Hyun Choi
> > <[EMAIL PROTECTED]>
> > > > wrote:
> > > >
> > > > > You need to set the queue size by modifying
> > the
> > > > > following two lines.
> > > > >
> > > > > $ns queue-limit $node_(r1) $node_(r2) 100
> > > > > $ns queue-limit $node_(r2) $node_(r1) 100
> > > > >
> > > > >
> > > > > On 3/7/06, ben <[EMAIL PROTECTED]> wrote:
> > > > > > Hi Soo-Hyun Choi,
> > > > > >
> > > > > > I attached the output of the xgraph in ps
> > > format.
> > > > > > 1. red.ps - red.tcl run on ns2.27 in fedora
> > > core 4
> > > > > > 2. red2.ps - the same red.tcl on ns2.28 in
> > > fedora
> > > > > > core4
> > > > > >
> > > > > > In previous post, I wrote the limit is 100.
> > It
> > > is
> > > > > > mistake, it is infact limit_ is equals to
> > 25.
> > > > > >
> > > > > >
> > > > > > In the first part the current queue is below
> > > 25
> > > > > > packets. However, in the second part, the
> > red
> > > > > queue
> > > > > > just grow beyond 25 packets.
> > > > > >
> > > > > >
> > > > > > Cheers,
> > > > > >
> > > > > >
> > > > > > --- Soo-Hyun Choi
> > > <[EMAIL PROTECTED]>
> > > > > > wrote:
> > > > > >
> > > > > > > The instantaneous RED queue size shouldn't
> > > grow
> > > > > > > beyond the actual RED
> > > > > > > queue size, and the average RED queue size
> > > > > shouldn't
> > > > > > > grow beyond the
> > > > > > > maxthresh.
> > > > > > >
> > > > > > > You may want to check your parameters
> > again.
> > > > > > >
> > > > > > > On 3/7/06, ben <[EMAIL PROTECTED]> wrote:
> > > > > > > >
> > > > > > > > Hi ns users,
> > > > > > > >
> > > > > > > > I some doubt about the RED Queue. I run
> > a
> > > > > > > > simple tcl script ( can be download from
> > > > > > > > http://nile.wpi.edu/NS/Example/red.tcl)
> > > for
> > > > > RED
> > > > > > > queue
> > > > > > > > with 2 TCP sources. I observed that the
> > > RED
> > > > > queue
> > > > > > > just
> > > > > > > > grow beyond the limit (it is set to 100
> > > > > packets in
> > > > > > > the
> > > > > > > > tcl script) when run on ns-2.28, ns-2.28
> > > with
> > > > > > > eurane
> > > > > > > > extension and ns-2.29 .
> > > > > > > >
> > > > > > > > It is perfectly ok when run on ns-2.27
> > and
> > > > > ns-2.26
> > > > > > > > with eurane extension. Any comment on
> > > this?
> > > > > > > >
> > > > > > > > p/s: I'm using fedora core 4 and cygwin
> > on
> > > > > windows
> > > > > > > >
> > > > > > > > Ok cheers,
> > > > > > > >
> > > > > > > > Ben
> > > > > > > > Master Student.
> > > > > > > >
> > > > > > > > Send instant messages to your online
> > > friends
> > > > > > > http://uk.messenger.yahoo.com
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > > > Send instant messages to your online friends
> > > > > http://uk.messenger.yahoo.com
> > > > > >
> > > > > >
> > > > >
> > > >
> > > > Send instant messages to your online friends
> > > http://uk.messenger.yahoo.com
> > > >
> > > >
> > >
> >
> > Send instant messages to your online friends
> > http://uk.messenger.yahoo.com
>
>
> Send instant messages to your online friends http://uk.messenger.yahoo.com
>
>



[ns] RED parameters configuration

2006-03-09 Thread Soo-Hyun Choi

On 3/9/06, Augusto Neto <[EMAIL PROTECTED]> wrote:
> Hi,
>
> The reasons for configurarion fo the RED parameters given by Mrs. Sally
> Floyd, as could see, takes into account the queue management goal. Decisions
> about the dynamically set of the weights are not clear in the text, at least
> considering QoS. Moreover, it is older than the DiffServ :-) that was
> standardized in 1998.

That's right. Its goal is to have a proper queue management, and it
did not address about the parameter settings dynamically. However, I
became to understand how I set the parameters dynamically by reading
the article.

> My problem concerns on choosing the correct value to set the per-queue
> weights according to the bit rate of a flow. For instance, my work consider
> that before the adimition of a flow it is necessary to reserve resources for
> it, its bit rate in the case. So, if the bit rate is 3Mb I need to configure
> the scheduler to reserve 3Mb. In ns-2 the reservation concerns in setting
> the weights correct?
>

RED is exceptionally parameter senstive, and it is hard to say which
values are right for a particular case, as you may know. There are
normally 4 important parameters though.

1) max thresh: maxthresh = queue_size / 2
2) min thresh: minthresh = maxthresh / 3
3) max_p: max_p = 2 * packet_loss_rate
4) q_w: no definitive answer, but it is almost fine if you leave it to
0.002 (ns-2 default value)

This is regarded as a general rule to set the RED paramemters for a
simulation, but not for the real world.

Soo-Hyun


> Regards
>
> Augusto
>
> - Original Message -
> From: "Soo-Hyun Choi" <[EMAIL PROTECTED]>
> To: "Augusto Neto" <[EMAIL PROTECTED]>
> Sent: Wednesday, March 08, 2006 3:59 PM
> Subject: Re: RED parameters configuration
>
>
> > Hi,
> >
> > I think you'd better read this.
> > http://www.icir.org/floyd/REDparameters.txt
> >
> > Soo-Hyun
> >
> > On 3/8/06, Augusto Neto <[EMAIL PROTECTED]> wrote:
> >> Dear Soo
> >>
> >> I need to choose the correct value for weights of RED queues in DiffServ.
> >> For instance, what is the correct value of the weights to be configured
> >> for
> >> a flow with 1Mb of bit rate?
> >> Regards,
> >>
> >> Augusto
> >>
> >> - Original Message -
> >> From: "Soo-Hyun Choi" <[EMAIL PROTECTED]>
> >> To: "ben" <[EMAIL PROTECTED]>
> >> Cc: "ns-users" 
> >> Sent: Tuesday, March 07, 2006 4:00 AM
> >> Subject: Re: [ns] RED queue grows beyond limit on ns-2.28-9
> >>
> >>
> >> >
> >> > You need to set the queue size by modifying the following two lines.
> >> >
> >> > $ns queue-limit $node_(r1) $node_(r2) 100
> >> > $ns queue-limit $node_(r2) $node_(r1) 100
> >> >
> >> >
> >> > On 3/7/06, ben <[EMAIL PROTECTED]> wrote:
> >> >> Hi Soo-Hyun Choi,
> >> >>
> >> >> I attached the output of the xgraph in ps format.
> >> >> 1. red.ps - red.tcl run on ns2.27 in fedora core 4
> >> >> 2. red2.ps - the same red.tcl on ns2.28 in fedora
> >> >> core4
> >> >>
> >> >> In previous post, I wrote the limit is 100. It is
> >> >> mistake, it is infact limit_ is equals to 25.
> >> >>
> >> >>
> >> >> In the first part the current queue is below 25
> >> >> packets. However, in the second part, the red queue
> >> >> just grow beyond 25 packets.
> >> >>
> >> >>
> >> >> Cheers,
> >> >>
> >> >>
> >> >> --- Soo-Hyun Choi <[EMAIL PROTECTED]>
> >> >> wrote:
> >> >>
> >> >> > The instantaneous RED queue size shouldn't grow
> >> >> > beyond the actual RED
> >> >> > queue size, and the average RED queue size shouldn't
> >> >> > grow beyond the
> >> >> > maxthresh.
> >> >> >
> >> >> > You may want to check your parameters again.
> >> >> >
> >> >> > On 3/7/06, ben <[EMAIL PROTECTED]> wrote:
> >> >> > >
> >> >> > > Hi ns users,
> >> >> > >
> >> >> > > I some doubt about the RED Queue. I run a
> >> >> > > simple tcl script ( can be download from
> >> >> > > http://nile.wpi.edu/NS/Example/red.tcl) for RED
> >> >> > queue
> >> >> > > with 2 TCP sources. I observed that the RED queue
> >> >> > just
> >> >> > > grow beyond the limit (it is set to 100 packets in
> >> >> > the
> >> >> > > tcl script) when run on ns-2.28, ns-2.28 with
> >> >> > eurane
> >> >> > > extension and ns-2.29 .
> >> >> > >
> >> >> > > It is perfectly ok when run on ns-2.27 and ns-2.26
> >> >> > > with eurane extension. Any comment on this?
> >> >> > >
> >> >> > > p/s: I'm using fedora core 4 and cygwin on windows
> >> >> > >
> >> >> > > Ok cheers,
> >> >> > >
> >> >> > > Ben
> >> >> > > Master Student.
> >> >> > >
> >> >> > > Send instant messages to your online friends
> >> >> > http://uk.messenger.yahoo.com
> >> >> > >
> >> >> > >
> >> >> >
> >> >>
> >> >> Send instant messages to your online friends
> >> >> http://uk.messenger.yahoo.com
> >> >>
> >> >>
> >> >
> >> >
> >>
> >>
> >>
>
>
>



Re: [ns] RED parameters configuration

2006-03-09 Thread Soo-Hyun Choi

On 3/9/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> Thanks a lot Soo-Hyun, I agree that a definitive answer is inexistent,
> as much as the perfect weights value. I have asked for some researchers
> which has investigated in bandwidth reservations on DiffServ approach,
> and only one requested me, bit_rate/10. However, the ns-2 does not
> accept 0.x values, it gives Floating point exception, so 0.002 is not
> accepted by the ns-2, only from 1.

Although there is not likely a definitive answer for every RED case
about the parameters, there is abviously a recommended answer. :-)

I am having RED simulations with a floating point q_w value without
any problem under ns-2.28. So you should not have "Floating Point
Exception" error by using some floating point values for the queue
weight setting.

If you have changed "double q_w" to something like "TracedDouble q_w"
in red.h, you may want to replace it to the original declaration.

Soo-Hyun


>
> Regards,
>
> Augusto
>
>
>
> Quoting Soo-Hyun Choi <[EMAIL PROTECTED]>:
>
> > On 3/9/06, Augusto Neto <[EMAIL PROTECTED]> wrote:
> >> Hi,
> >>
> >> The reasons for configurarion fo the RED parameters given by Mrs. Sally
> >> Floyd, as could see, takes into account the queue management goal. 
> >> Decisions
> >> about the dynamically set of the weights are not clear in the text, at 
> >> least
> >> considering QoS. Moreover, it is older than the DiffServ :-) that was
> >> standardized in 1998.
> >
> > That's right. Its goal is to have a proper queue management, and it
> > did not address about the parameter settings dynamically. However, I
> > became to understand how I set the parameters dynamically by reading
> > the article.
> >
> >> My problem concerns on choosing the correct value to set the per-queue
> >> weights according to the bit rate of a flow. For instance, my work consider
> >> that before the adimition of a flow it is necessary to reserve resources 
> >> for
> >> it, its bit rate in the case. So, if the bit rate is 3Mb I need to 
> >> configure
> >> the scheduler to reserve 3Mb. In ns-2 the reservation concerns in setting
> >> the weights correct?
> >>
> >
> > RED is exceptionally parameter senstive, and it is hard to say which
> > values are right for a particular case, as you may know. There are
> > normally 4 important parameters though.
> >
> > 1) max thresh: maxthresh = queue_size / 2
> > 2) min thresh: minthresh = maxthresh / 3
> > 3) max_p: max_p = 2 * packet_loss_rate
> > 4) q_w: no definitive answer, but it is almost fine if you leave it to
> > 0.002 (ns-2 default value)
> >
> > This is regarded as a general rule to set the RED paramemters for a
> > simulation, but not for the real world.
> >
> > Soo-Hyun
> >
> >
> >> Regards
> >>
> >> Augusto
> >>
> >> - Original Message -
> >> From: "Soo-Hyun Choi" <[EMAIL PROTECTED]>
> >> To: "Augusto Neto" <[EMAIL PROTECTED]>
> >> Sent: Wednesday, March 08, 2006 3:59 PM
> >> Subject: Re: RED parameters configuration
> >>
> >>
> >> > Hi,
> >> >
> >> > I think you'd better read this.
> >> > http://www.icir.org/floyd/REDparameters.txt
> >> >
> >> > Soo-Hyun
> >> >
> >> > On 3/8/06, Augusto Neto <[EMAIL PROTECTED]> wrote:
> >> >> Dear Soo
> >> >>
> >> >> I need to choose the correct value for weights of RED queues in 
> >> >> DiffServ.
> >> >> For instance, what is the correct value of the weights to be configured
> >> >> for
> >> >> a flow with 1Mb of bit rate?
> >> >> Regards,
> >> >>
> >> >> Augusto
> >> >>
> >> >> - Original Message -
> >> >> From: "Soo-Hyun Choi" <[EMAIL PROTECTED]>
> >> >> To: "ben" <[EMAIL PROTECTED]>
> >> >> Cc: "ns-users" 
> >> >> Sent: Tuesday, March 07, 2006 4:00 AM
> >> >> Subject: Re: [ns] RED queue grows beyond limit on ns-2.28-9
> >> >>
> >> >>
> >> >> >
> >> >> > You need to set the queue size by modifying the following two lines.
> >> >> >
> >> >> > $ns queue-limit $node_(r1) $node_(r2) 100
> >> >> > $ns queue-limit $

Re: [ns] RED parameters configuration

2006-03-09 Thread Soo-Hyun Choi

On 3/9/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> Hi, my comments are bellow ok.
>
> Quoting Soo-Hyun Choi <[EMAIL PROTECTED]>:
>
> > On 3/9/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> >> Thanks a lot Soo-Hyun, I agree that a definitive answer is inexistent,
> >> as much as the perfect weights value. I have asked for some researchers
> >> which has investigated in bandwidth reservations on DiffServ approach,
> >> and only one requested me, bit_rate/10. However, the ns-2 does not
> >> accept 0.x values, it gives Floating point exception, so 0.002 is not
> >> accepted by the ns-2, only from 1.
> >
> > Although there is not likely a definitive answer for every RED case
> > about the parameters, there is abviously a recommended answer. :-)
>
> You're completely correct :-), good.
>
> >
> > I am having RED simulations with a floating point q_w value without
> > any problem under ns-2.28. So you should not have "Floating Point
> > Exception" error by using some floating point values for the queue
> > weight setting.
> >
> > If you have changed "double q_w" to something like "TracedDouble q_w"
> > in red.h, you may want to replace it to the original declaration.
> >
>
> The q_w is on its original declaration, and I can assign floating
> values successfully, however the values needs to be > 0. At least in my
> ns 2.28 the value 0.002 gives "Floating Point Exception".
>
> Sally advises weights values in order to achieve the best performance
> for queue management, as we discussed without QoS consideration. I need
> to achieve resource (BW) assurance for flows, and the BW amount
> reserved for a certain queue (class) increases as reservations requests
> are accepted.
>
> The CBQ and WFQ general discipline
> (http://www.cc.jyu.fi/~sayenko/src/wfq-1.2.4.tar.gz) give functions to
> set percentages of links for some queues (e.g. 30% for queue 0), thus
> configuring the reservations on demand. However CBQ is too complex and
> the WFQ general discipline do not work in DiffServ.
>
> I am using the WFQ discipline for DiffServ
> (http://www.cc.jyu.fi/~sayenko/src/diffserv_wfq.diff), which does not
> provide a explicit function for reservations, so I suppose that the
> reservation is configured by setting the weights on demand, correct?
> The 0.002 weight said by Sally means 2% of the link?
>

No, this is wrong. You don't seem to have correct understanding of
q_weight on RED. The q_weight parameter on RED is to determine how
much portion of the current queue (instantaneous queue) would affect
to the computation of the average queue length.

let)
s_n: the EWA queue length (average queue length) seen by the (n)th
packet arrival at the RED queue
s_(n-1): the EWA queue length seen by the (n-1)th packet
q_n: the instantaneous queue length seen by the (n)th packet
q_w: weighting parameter

then)
s_n = (1-q_w) * s_(n-1) + q_w * q_n


So, the resource reservation does NOT related to the q_weight value
settings at all. As the above equation, it is just a weighting
parameter for average queue length computation.

I recommend you to read the original RED paper first (written by
Sally) before you play with the RED parameters. Otherwise, it is going
to be tricky to convince your simulations to the research community
(or your professors) without having correct understanding for all
parameters that you're trying to manipulate.

Soo-Hyun

> It is a little bit complicated :-), but I need to solve this problem
> which is giving me a big delay.
>
> King regards,
>
> Augusto
>
>
>
> > Soo-Hyun
> >
> >
> >>
> >> Regards,
> >>
> >> Augusto
> >>
> >>
> >>
> >> Quoting Soo-Hyun Choi <[EMAIL PROTECTED]>:
> >>
> >> > On 3/9/06, Augusto Neto <[EMAIL PROTECTED]> wrote:
> >> >> Hi,
> >> >>
> >> >> The reasons for configurarion fo the RED parameters given by Mrs. Sally
> >> >> Floyd, as could see, takes into account the queue management
> >> goal. Decisions
> >> >> about the dynamically set of the weights are not clear in the
> >> text, at least
> >> >> considering QoS. Moreover, it is older than the DiffServ :-) that was
> >> >> standardized in 1998.
> >> >
> >> > That's right. Its goal is to have a proper queue management, and it
> >> > did not address about the parameter settings dynamically. However, I
> >> > became to understand how I set the parameters dynamically by reading
> >> > the article.
>

Re: [ns] Queue in Bytes

2006-03-23 Thread Soo-Hyun Choi

On 3/23/06, Ethan Giordano <[EMAIL PROTECTED]> wrote:
>
> I'm trying to set the queues in my simulation to be measured in bytes
> rather than in # of packets. The following does not seem to work, can
> anyone suggest the correct method? The line to set drop-front queuing
> works as intended, except from analyzing my traces, it does not appear
> that the queue sizing lines are working.
>
> # Get the queue object
> set dt [[$ns link $a $b] queue]
> # Set the queue-in-bytes flag to true
> $dt set qib_ 1

Change the above line as:
$dt set queue_in_bytes_ 1

> # Set the queue bytes
> $dt set qlim_ 5
> # Set the queue to be drop-front
> $dt set drop_front_ 1
>
> Thanks,
>
> ~Ethan
>
>



Re: [ns] Throughput of CBR over TCP

2006-04-12 Thread Soo-Hyun Choi

Hi,

First, in general, CBR is used for UDP traffic, not with TCP. You
should be able to tell the specific reason why you use CBR over TCP.

And the question you asked is also dependent upon a bottleneck link
speed and a bottleneck queue size. If the dely-bandwidth product is
larger than the CBR interval, it is likely that TCP will wait for the
CBR interval in oder to send a packet.

Soo-Hyun


On 4/11/06, 김병길 <[EMAIL PROTECTED]> wrote:
>
> Hi all,
>
>
>
> I perform simulation of TCP using NS-2 simulator.
>
> I already read all mails about CBR over TCP.
>
> But, I really not understand about TCP mechanism when CBR is used.
>
>
>
> 1. use following TCP parameters :
>
> 1)   CBR packetsize : 500
>
> 2)   TCP packetsize : default
>
>
>
> When I start CBR traffic of 500kbps, I can measure throughput of TCP.
>
> The result is 2.2Mbps! Is it possible?
>
>
>
> I know that TCP ignore packetsize upper layer and TCP has own estimation of
> stable link and suitable time to send the packet.
>
> But, my problem is that TCP does not wait the whole size from CBR
>
> It seems that TCP sends own packetsize with CBR interval.
>
>
>
> So, my question is why this is happened? and what is the possible problem?
>
> Or, is it my mistake?
>
>
>
> Thanks in advance.
>
>
>
>



Re: [ns] assert() function not workin

2006-04-17 Thread Soo-Hyun Choi

You could do "./configure --enable-debug" at the ns-2's top directory,
and then try "make" again. It will enable assert() funtion.

Soo-Hyun



On 4/16/06, Dhammika Pathirana <[EMAIL PROTECTED]> wrote:
>
> Hi Vinod,
>
> This is because NDEBUG is defined in the makefile. Replace is with
> DEBUG to enable asserts.
>
> Dhammika
>
>
>
> On 4/16/06, Vinod <[EMAIL PROTECTED]> wrote:
> >
> > hi,
> >
> > can any one tell me why the assert() function is not working in ns-2
> > implementation of AODV. Should we need to enable it somehow?
> >
> > I mean assert(a = b) is not giving any error even though a !=b . I checked
> > this by keeping an if stmt. after that.
> >
> > also is there any command line param for 'ns' to enable debugging ? I
> > remember something of the sort of "-st" in the command line but i forgot.
> > Basically i want to enable all the  #ifdef DEBUG  #endif statments.
> >
> > plz let me know,
> > vinod
> > --
> > Vinod Kone,
> > Btech,Computer Science,
> > VIII sem,
> > Room 177,Kapili,
> > IIT Guwahati.
> >
> > On Sun, 16 Apr 2006, Vinod wrote:
> >
> > > hi,
> > >
> > > ive a doubt in the AODV implementation in ns-2.
> > >
> > > Can anyone tell me a way to find the source of the pkt, given only the
> > > "Packet P". That is ... I want to know the "originator" of the pkt.
> > >
> > > thanx,
> > > vinod
> > > --
> > > Vinod Kone,
> > > Btech,Computer Science,
> > > VIII sem,
> > > Room 177,Kapili,
> > > IIT Guwahati.
> > >
> > >
> >
> >
>
>