[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Difference between Agent/UDP+Application/Traffic/CBR & Agent/CBR
> X-Authentication-Warning: mash.CS.Berkeley.EDU: majrdomo set sender to
[email protected] using -f
> From: "Bancherdvanich Terdsak" <[email protected]>
> To: <[email protected]>
> Subject: Difference between Agent/UDP+Application/Traffic/CBR & Agent/CBR
> Date: Thu, 4 Nov 1999 22:50:36 +0800
> MIME-Version: 1.0
> X-Priority: 3
> X-MSMail-Priority: Normal
> X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300
>
> Hi,
>
> I am new in NS-2. I would like to ask what is the difference between
>
> i) set udp0 [new Agent/UDP]
> $ns attach-agent $n0 $udp0
> set cbr0 [new Application/Traffic/CBR]
> $cbr0 attach-agent $udp0
udp is a transport agent
>
> ii) set cbr0 [new Agent/CBR]
> $ns attach-agent $n0 $cbr0
cbr is for constant bit rate and is a traffic source. But this way of doing has
been deprecated; you should use something like:
set cbr [new Application/Traffic/CBR]
An example of a cbr source over a udp agent would be:
set udp [new Agent/UDP]
$ns attach-agent $n0 $udp
set cbr [new Application/Traffic/CBR]
$cbr attach-agent $udp
set sink [new Agent/LossMonitor]
$ns attach-agent $n1 $sink
$ns connect $udp $sink
$ns at 0.0 "$cbr start"
$ns at 1.0 "$cbr stop"
as of ns-2.1b5.
>
> Thank you
>
> Terdsak
>
>
Tarik