ns tips 1. Traces To trace additional variables, use TraceVar, as explained in the manual, Section 3.4.3. See also the following snippet: set cf [open "cwnd.out" w] $tcp_fwd trace cwnd_ $tcp_fwd attach $cf 2. Advertised window The size of the advertised window cannot be set by simply changing the value of the window_ parameter. In reality, the advertised window depends on several parameters that can be set as follows (in this case, the target window is 128): # Set default TCP parameters Agent/TCP set window_ 128 Agent/TCP set maxcwnd_ 128 Agent/TCP set windowInitOption_ 1 Agent/TCP set windowInit_ 2 Agent/TCP set slow_start_restart_ false The exact meaning of these parameters can be obtained from an analysis of the tcp.cc source file.