-
I do not find any problem with your code.
I have executed it and as it seems to be working fine.

The problem might be that node 1 "looks like" it is sending
packets, but in reality it simply sends-out the previously enqueued
packets, at the time when the CBR app was functioning.

To verify my reasoning, simply restart the cbr app at 9.0 and then
at 15.0 terminate the simulation. At the same time you can also
have executed $ns_ trace-all "<at a file>", so you can check the
trace file instead of NAM in order to verify the situation.

You will see that it works fine. One way to reduce the time that the CBR
will
stop sending packets, i.e. get it closer to 4.2, will be to increase the
link
speed between the 2 nodes, so that they won't get buffered at the exit point
of node 1 because of the slow link.

But again, even with slow links, the behavior of the transmission system
would not be much different in reality, so again if you cannot reduce the
link speed
(because of simulation restrictions) you will not have a problem.

Hope that I've helped

-Fk

On 3/24/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
> Send Ns-users mailing list submissions to
>         ns-users@isi.edu
>
>
> ---------- Forwarded message ----------
> From: "Jezabel Miriam Molina Gil" <[EMAIL PROTECTED]>
> To: ns2 <ns-users@ISI.EDU>
> Date: Fri, 23 Mar 2007 11:25:03 +0000
> Subject: [ns] stop sending paquets
> I am working with ns2 and I have got this code:
>
> set udp_(0) [new Agent/UDP]
> $ns_ attach-agent $node_(1) $udp_(0)
> set null_(0) [new Agent/Null]
> $ns_ attach-agent $node_(0) $null_(0)
>
> set cbr_(0) [new Application/Traffic/CBR]
> $cbr_(0) set packetSize_ 512
> $cbr_(0) set interval_ 0.01
> $cbr_(0) attach-agent $udp_(0)
> $ns_ connect $udp_(0) $null_(0)
> $ns_ at 4.000000 "$cbr_(0) start"
> $ns_ at 4.200000 "$cbr_(0) stop"
>
> but whe simulaticon reach the 4.2 node 1 go on sendig packet. How Can I
> stop
> it at 2.0000?
> --
> Saludos
> Jezabel M. Molina Gil
>
>
>
>
>

-- 
Filippos N Kolovos

Software Systems Analyst & Engineer
M.Sc. (Eng.) in Data Communications

Automation & Networking Department
University of Macedonia Library
Egnatia 156, P.O.Box 1591
540 06 Thessaloniki, Greece

E-Mail: [EMAIL PROTECTED],
           [EMAIL PROTECTED]
----------------------------------------------

Reply via email to