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

Re: [ns] TCP Session start and stops



Done doesn't do anything at all. It does what you want it to do. The  flow
control isn't changed by using done. So the state of the TCP agent is what
it would be after you send n bytes. And it has received the last ACK.
To answer your question, if TCP/Agent resets the control parameters (I don't
know that) after each send the answer would be yes, otherwise the answer
would be no and you should probably call $self reset in done {}.
Summarizing if it works without done, it works with done. Done only provides
a point in time where you can do other things (I mainly use it to remove the
agents)
Again this is all explained in the ns manual section 33.2.4 (as well as the
recv and resume callbacks) I suggest you just play around with it and if you
run into difficulties send the tcl script and describe what problem you
encountered.

Regards
Mark

----- Original Message -----
From: "Nabil Seddigh" <[email protected]>
To: <[email protected]>
Cc: <[email protected]>; <[email protected]>
Sent: Tuesday, December 19, 2000 4:55 PM
Subject: Re: [ns] TCP Session start and stops


> Does using "done" as described below "reset"
> the TCP sender's flow control parameters for each
> "send"? Or does it simply use the same flow control
>  parameters? i.e. will the cwnd start at one for
> each new "send"?
>
> Regards,
> Nabil Seddigh
>
> >
> >To: <[email protected]>, <[email protected]>
> >Subject: Re: [ns] TCP Session start and stops
> >From: "Mark Janssen" <[email protected]>
> >Date: Tue, 19 Dec 2000 11:46:32 +0100
> >
> >-------------------------------------
> >
> >Hello,
> >
> >you can use a tcl-procedure named done. If you define this
> >procedure for the whole agent class, it will be called
> > when the last ack is received by the
> >sender (I am not exactly sure whether this works
> > with start and stop) So you
> >would get something like:
> >
> >XXXX instproc done {} {
> >    global ns
> >    puts "[$ns now]: Last ACK received"
> >    $ns at [expr [$ns now] + 5.0] "$self send 1000"
> ># I am not sure about the expr now + 5.0 part but it should be
> >something
> >like that
> >}
> >
> >This would send 1000 bytes with an interval of 5.0 seconds (from last
> >ACK to
> >first new sent byte) XXXX of course is the name of the agent (e.g.
> >Agent/TCP)
> >
> >For more information, you can look at the done callback for agents in
> >the NS
> >manual.
> >Now is a method of a Simulator object which gives the current
> >simulation-time.,
> >
> >Hope this helps.
> >
> >Mark
> >----- Original Message -----
> >From: <[email protected]>
> >To: <[email protected]>
> >Sent: Monday, December 18, 2000 5:59 PM
> >Subject: [ns] TCP Session start and stops
> >
> >
> >>
> >> hi everyone,
> >> i have a problem in which i am trying to simulate a number
> >> of sessions, one after the other, between a source destination pair.
> >> the idea is to open a TCP connection between the source destination
> >> pair and
> >>
> >> step 1. transfer a file (or a given no. of packets) between them
> >> step 2. wait for some time say 5 seconds
> >> step 3. go to step 1
> >>
> >> my problem is how do i know, (other than looking in the trace file)
> >> that my first transfer is over? and is there any way so that i can
> >> put all this in the .tcl file for the simulator? Thanks,
> >>
> >> Biplab Sikdar,
> >> Grad. Student,
> >> Dept. of eCSE,
> >> Rensselaer Polytechnic Inst.,
> >> Troy NY 12180.
> >>
> >>
>
>
>