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.

34.5 Tracing TCP Dynamics<strong>The</strong> behavior of TCP is often observed by co<strong>ns</strong>tructing a sequence number-vs-time plot. Typically, a trace is performed byenabling tracing on a link over which the TCP packets will pass. Two trace methods are supported: the default one (used fortracing TCP agents), <strong>and</strong> an exte<strong>ns</strong>ion used only for FullTcP.34.6 One-Way Trace TCP Trace DynamicsTCP packets gener<strong>at</strong>ed by one of the one-way TCP agents <strong>and</strong> destined for a TCP sink agent passing over a traced link (seesection 26) will gener<strong>at</strong>e a trace file lines of the form:+ 0.94176 2 3 tcp 1000 ------ 0 0.0 3.0 25 40+ 0.94276 2 3 tcp 1000 ------ 0 0.0 3.0 26 41d 0.94276 2 3 tcp 1000 ------ 0 0.0 3.0 26 41+ 0.95072 2 0 ack 40 ------ 0 3.0 0.0 14 29- 0.95072 2 0 ack 40 ------ 0 3.0 0.0 14 29- 0.95176 2 3 tcp 1000 ------ 0 0.0 3.0 21 36+ 0.95176 2 3 tcp 1000 ------ 0 0.0 3.0 27 42<strong>The</strong> exact form<strong>at</strong> of this trace file is given in section 26.4. When tracing TCP, packets of type tcp or ack are relevant. <strong>The</strong>irtype, size, sequence number (ack number for ack packets), <strong>and</strong> arrival/depart/drop time are given by field positio<strong>ns</strong> 5, 6, 11,<strong>and</strong> 2, respectively. <strong>The</strong> + indic<strong>at</strong>es a packet arrival, d a drop, <strong>and</strong> - a departure. A number of scripts process this file toproduce graphical output or st<strong>at</strong>istical summaries (see, for example, ~<strong>ns</strong>/test-suite.tcl, the finish procedure.34.7 One-Way Trace TCP Trace DynamicsTCP packets gener<strong>at</strong>ed by FullTcp <strong>and</strong> passing over a traced link contain additional inform<strong>at</strong>ion not displayed by defaultusing the regular trace object. By enabling the flag show_tcphdr_ on the trace object (see section refsec:traceform<strong>at</strong>), 3additional header fields are written to the trace file: ack number, tcp-specific flags, <strong>and</strong> header length.34.8 Comm<strong>and</strong>s <strong>at</strong> a glance<strong>The</strong> following is a list of comm<strong>and</strong>s used to setup/manipul<strong>at</strong>e TCP flows for simul<strong>at</strong>io<strong>ns</strong>:set tcp0 [new Agent/TCP]This cre<strong>at</strong>es an i<strong>ns</strong>tance of a TCP agent. <strong>The</strong>re are several flavors of TCP-sender <strong>and</strong> TCP-receiver (or sink) agent currentlyimplemented in <strong>ns</strong>. TCP-senders currently available are: Agent/TCP, Agent/TCP/Reno, Agent/TCP/Newreno,Agent/TCP/Sack1, Agent/TCP/Vegas, Agent/TCP/Fack.TCP-receivers currently available are: Agent/TCPSink, Agent/TCPSink/DelAck, Agent/TCPSink/Sack1,Agent/TCPSink/Sack1/DelAck.<strong>The</strong>re is also a two-way implement<strong>at</strong>ion of tcp called Agent/TCP/FullTcp. For details on the different TCP flavors see earliersectio<strong>ns</strong> of this chapter.Configur<strong>at</strong>ion parameters for TCP flows maybe set as follows:296

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

Saved successfully!

Ooh no, something went wrong!