[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ns] delay command in NS



Hi Enrique and NS users,

Thank you very much for your help, But I think your code asks TCP to schedule
the next transmission based on the Current "Sending" time, not based on the
time when TCP finishes sucessfully its transmission with ACKs confirmation.

For example, according to your current solution, if you start sending first
chunk of packets at 1.0 second, your next schedule time will be 31.0, 61.0,
.... no matter how much it takes to transmit 20000 bytes!

What I want to simulate is the "user behaviour". To do that I have to take
the Thinking time (random time) and transmission time & ACK feedback time
into acount. Then, if it takes 2 seconds to get the ACK feedbacks, the next
tranmission time will be 33.0, 65.0 , ...  The expected outcome will be some
thing like this: " if transmission time (application delay) is big, users
themself will ease their traffic generation". And we may experience less
traffic load.

Are there any available traffic model that have done this?

Thanks again very much for your help. I would appreciate very much your
alternative solution to my problem.

Huan Pham


Enrique Campos-Nanez wrote:

> You can use the "done" call back for the TCP agent,
> and schedule a future event at that time. For example:
>
> Agent/TCP instproc done {} {
>         set ns [Simulator instance]
>         $ns at [expr [$ns now]+30.0] "$self send 20000"
> }
>
> By the way, the FTP session is not necessary if you are only sending
> information
> in this fashion.
>
> Enrique Campos-Nanez
>
> On Thursday, May 17, 2001, at 07:45 PM, Huan Pham wrote:
>
> >
> > What I want to simulate now is to have a FTP  traffic source. It
> > generate 20 packets, each of 1000 bytes. It waits until transmission
> > finished.  Then it delays an random time (let's say 30 seconds in
> > average, stands for user reading time) before keep produce another more
> > 20 packets.
> >
> > Can anyone tell me, if NS know when FTP finishes transmission , and
> > what is the command  to do "Delay 30 second "  in  NS.
> >
> > Thanks

--

Huan Pham - PhD Student
School of Information Technology
James Cook University, QLD4811, Australia
Phone: 61-7-4781 6909    Mobile: 61-418-875084
Fax: 61-7-4781 4029
Homepage: http://www.cs.jcu.edu.au/~huan