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...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Chapter 36Agent/SRMThis chapter describes the internals of the SRM implement<strong>at</strong>ion in <strong>ns</strong>. <strong>The</strong> chapter is in three parts: the first part is an overviewof a minimal SRM configur<strong>at</strong>ion, <strong>and</strong> a “complete” description of the configur<strong>at</strong>ion parameters of the base SRM agent. <strong>The</strong>second part describes the architecture, internals, <strong>and</strong> the code p<strong>at</strong>h of the base SRM agent. <strong>The</strong> last part of the chapter is adescription of the exte<strong>ns</strong>io<strong>ns</strong> for other types of SRM agents th<strong>at</strong> have been <strong>at</strong>tempted to d<strong>at</strong>e.<strong>The</strong> procedures <strong>and</strong> functio<strong>ns</strong> described in this chapter can be found in ~<strong>ns</strong>/tcl/mcast/srm.tcl, ~<strong>ns</strong>/tcl/mcast/srm-adaptive.tcl,~<strong>ns</strong>/tcl/mcast/srm-nam.tcl, ~<strong>ns</strong>/tcl/mcast/srm-debug.tcl, <strong>and</strong> ~<strong>ns</strong>/srm.{cc, h}.36.1 Configur<strong>at</strong>ionRunning an SRM simul<strong>at</strong>ion requires cre<strong>at</strong>ing <strong>and</strong> configuring the agent, <strong>at</strong>taching an applic<strong>at</strong>ion-level d<strong>at</strong>a source (a trafficgener<strong>at</strong>or), <strong>and</strong> starting the agent <strong>and</strong> the traffic gener<strong>at</strong>or.36.1.1 Trivial Configur<strong>at</strong>ionCre<strong>at</strong>ing the Agentset <strong>ns</strong> [new Simul<strong>at</strong>or]$<strong>ns</strong> enableMcastset node [$<strong>ns</strong> node]set group [$<strong>ns</strong> allocaddr];# preamble initializ<strong>at</strong>ion;# agent to reside on this node;# multicast group for this agentset srm [new Agent/SRM]$srm set dst_ $group ;# configure the SRM agent$<strong>ns</strong> <strong>at</strong>tach-agent $node $srm$srm set fid_ 1$srm log [open srmSt<strong>at</strong>s.tr w]$srm trace [open srmEvents.tr w];# optional configur<strong>at</strong>ion;# log st<strong>at</strong>istics in this file;# trace events for this agent<strong>The</strong> key steps in configuring a virgin SRM agent are to assign its multicast group, <strong>and</strong> <strong>at</strong>tach it to a node.308

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

Saved successfully!

Ooh no, something went wrong!