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

Re: Difference between Agent/UDP+Application/Traffic/CBR & Agent/CBR



> Bancherdvanich Terdsak wrote:
> 
> 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
> 
> ii) set cbr0 [new Agent/CBR]
>     $ns attach-agent $n0 $cbr0
> 
> Thank you
> 
> Terdsak
> 
> 

When you open a connection on a real network you have several
layers. UDP is the transport layer, it is a protocol. CBR 
(Constant Bit Rate) generates datas that are sent by the UDP
protocol, so the first solution is close to reality.

In the second one you don't use any transport agent,
what never occurs in reality (in most cases). It work 
in NS but you should not use it.

You should document yourself about layers,
it is very important to understand this if
you want to do anything about networking.

You can have a look at this page :

http://www.cml.upmc.edu/cml/slides/cmi-98/CMI-008/sld025.htm



-- 
Vera Mickael Stagiaire