Because, in that particular example, the node is just the sink of the
VoIP traffic. It does not send packets in the reverse direction.

If bidirectional VoIP flows was desired, then you would need an udp0
in one direction, and another in the reverse direction.
Something like:
set udp0 [new Agent/UDP]
$ns attach-agent $n(1) $udp0
set udp1 [new Agent/UDP]
$ns attach-agent $n(2) $udp1
$ns connect $udp0 $udp1

Regards,
Pedro Fortuna
INESC Porto

On 8/7/06, Renata Vidal <[EMAIL PROTECTED]> wrote:
> why always we have a null agent attached to a udp agent?
>
> On 8/4/06, Pedro Fortuna <[EMAIL PROTECTED] > wrote:
> >
> > Thanks for the tip.
> > I've even found an example on a previous msg of this mailling list:
> >
> > "  ...
> >   set udp0 [new Agent/UDP]
> >   $ns attach-agent $n(1) $udp0
> >   set null0 [new Agent/Null]
> >   $ns attach-agent $n(2) $null0
> >   $ns connect $udp0 $null0
> >
> >   # create 16 Paroto On/Off source traffic
> >   for {set i 0} { $i < 16} {incr i} {
> >           set par($i) [new Application/Traffic/Pareto]
> >           $par($i) set rate_ [expr 64*4]k
> >           $par($i) set packetsize_ 210
> >           $par($i) set burst_time_ 500ms
> >           $par($i) set idle_time_ 50ms
> >           $par($i) attach-agent $udp0
> >           $ns at 0.5 "$par($i) start"
> >   }
> > "
> > thanks,
> > Pedro Fortuna
> > INESC Porto
> >
> > On 8/4/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> > >
> > > If you want to simulate VoIP traffic you could also use the Paretto
> > > generator, I think it will simulate bursty VoIP more precisely than
> > > Exponential.
> > >
> > > Douglas Nascimento - UFRGS
> > >
> > > Quoting Pedro Fortuna <[EMAIL PROTECTED]>:
> > >
> > > >
> > > > I assume that there's a correlation, because two people do not talk
> > > > exactly at the same time. They usually talk and then listen. Thus, one
> > > > flow periods of idleness usually correlate to the other flow's periods
> > > > of burstiness. Maybe the best way to model that is with a single
> > > > on/off source, but I don't know the details.
> > > >
> > > > I followed a simpler approach, where I setup a flow in each direction,
> > > > with the same burst and idle mean values and also with the same data
> > > > rates. With this kind of strategy, you'll have very simetric data
> > > > passing in the pipes. This means that in such kind of conversations,
> > > > both in the short and in the long run, people will talk aproximately
> > > > the same time... which sounds more like a political debate than a
> > > > regular phone conversation :-)
> > > >
> > > > On 8/4/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> > > >> Is it necessary to consider the correlation between UL and DL voice
> traffic?
> > > >>
> > > >> Or we simply assume UL and DL are independent traffic stream both
> > > >> generated by
> > > >> Application/Traffic/Exponential?
> > > >>
> > > >> I am simulating VoIP in 802.11 networks, where UL and DL compete
> > > >> for the same
> > > >> channel.
> > > >>
> > > >> Thanks
> > > >>
> > > >>
> > > >> Quoting Pedro Fortuna <[EMAIL PROTECTED]>:
> > > >>
> > > >> >
> > > >> > Hello,
> > > >> >
> > > >> > I've been using Application/Traffic/Exponential as a traffic
> generator
> > > >> > on top of Agent/UDP. It's not perfect, because, for instance, I
> > > >> > specified 8Kbit data rate, but often I only see 5 or 6Kbit/s
> passing
> > > >> > through... but maybe i'm doing something wrong....
> > > >> >
> > > >> > Pedro Fortuna
> > > >> > INESC Porto
> > > >> >
> > > >> > On 8/4/06, Matthew Jakeman <[EMAIL PROTECTED]> wrote:
> > > >> > >
> > > >> > > VoIP is basically just UDP packets encapsulating RTP packets
> > > >> with the voice
> > > >> > > data inside, all you should need to do to simulate a VoIP
> > > >> stream is set the
> > > >> > > correct packet size and frequency that the packets are sent out
> and that
> > > >> > > would simulate a stream, all of which can be done easily inside
> your tcl
> > > >> > > script!
> > > >> > >
> > > >> > > Matt
> > > >> > >
> > > >> > > On Thursday 03 August 2006 16:41, lekkie omotayo wrote:
> > > >> > > > Hi,
> > > >> > > >
> > > >> > > > Does anybody know an existing VoIP simulated Application
> > > >> existing on NS2?
> > > >> > > >
> > > >> > > > I am ready to develop it myself, however, most of my questions
> has no
> > > >> > > > been answered.
> > > >> > >
> > > >> > >
> > > >> >
> > > >> >
> > > >> > --
> > > >> > Cumprimentos,
> > > >> > Pedro Fortuna
> > > >> >
> > > >> >
> > > >>
> > > >>
> > > >>
> > > >>
> > > >
> > > >
> > > > --
> > > > Cumprimentos,
> > > > Pedro Fortuna
> > > >
> > > >
> > >
> > >
> > >
> > >
> ----------------------------------------------------------------
> > > This message was sent using IMP, the Internet Messaging Program.
> > >
> > >
> > >
> >
> >
> > --
> > Cumprimentos,
> > Pedro Fortuna
> >
> >
>
>
>
> --
> Renata Vidal
> "Triste é o destino de quem tenta vencer as batalhas e ter sucesso nos
> ataques sem cultivar o espírito da iniciativa (A Arte da Guerra – SUN TSU –
> pg 102)"

Reply via email to