12.07.2015 Views

The ns Manual (formerly ns Notes and Documentation)1 - NM Lab at ...

The ns Manual (formerly ns Notes and Documentation)1 - NM Lab at ...

The ns Manual (formerly ns Notes and Documentation)1 - NM Lab at ...

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

33.2 Comm<strong>and</strong>s <strong>at</strong> a glance<strong>The</strong> following comm<strong>and</strong>s are used to setup UDP agents in simul<strong>at</strong>ion scripts:set udp0 [new Agent/UDP]This cre<strong>at</strong>es an i<strong>ns</strong>tance of the UDP agent.$<strong>ns</strong>_ <strong>at</strong>tach-agent This is a common comm<strong>and</strong> used to <strong>at</strong>tach any to a given .$traffic-gen <strong>at</strong>tach-agent This a class Applic<strong>at</strong>ion/Traffic/ method which connects the traffic gener<strong>at</strong>or to the given . Forexample, if we want to setup a CBR traffic flow for the udp agent, udp1, we given the following comm<strong>and</strong>sset cbr1 [new Applic<strong>at</strong>ion/Traffic/CBR]$cbr1 <strong>at</strong>tach-agent $udp1$<strong>ns</strong>_ connect This comm<strong>and</strong> sets up an end-to-end connection between two agents (<strong>at</strong> the tra<strong>ns</strong>port layer).$udp set packetSize_ $udp set dst_addr_ $udp set dst_port_ $udp set class_ $udp set ttl_ ..... etc<strong>The</strong> above are different parameter values th<strong>at</strong> may be set as shown above for udp agents. <strong>The</strong> default values can be found in<strong>ns</strong>/tcl/lib/<strong>ns</strong>-default.tcl.For a typical example of setting up an UDP agent used in a simul<strong>at</strong>ion, see the above section 33.1.287

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!