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.

$tcp set window_ For all possible configur<strong>at</strong>ion parameters available for TCP see section 34.1.4. <strong>The</strong> default configur<strong>at</strong>ion values can also befound in <strong>ns</strong>/tcl/lib/<strong>ns</strong>-default.tcl.Following is an example of a simple TCP connection setup:set tcp [new Agent/TCP]$<strong>ns</strong>_ <strong>at</strong>tach-agent $node_(s1) $tcp$tcp set fid_ 0set ftp [new Applic<strong>at</strong>ion/FTP]$ftp <strong>at</strong>tach-agent $tcpset sink [new Agent/TCPSink]$<strong>ns</strong>_ <strong>at</strong>tach-agent $node_(k1) $sink$sink set fid_ 0$<strong>ns</strong>_ connect $ftp $sink$<strong>ns</strong>_ <strong>at</strong> $start-time "$ftp start";# cre<strong>at</strong>e tcp agent;# bind src to node;# set flow ID field;# cre<strong>at</strong>e ftp traffic;# bind ftp traffic to tcp agent;# cre<strong>at</strong>e tcpsink agent;# bind sink to node;# set flow ID field;# active connection src to sink;# start ftp flowFor an example of setting up a full-tcp connection see section 34.3.1.297

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

Saved successfully!

Ooh no, something went wrong!