| UCLA Computer Science Department |
| High Performance Internet Lab |
[ NRL > HPI Lab > TCPW > NS-2]
In this page you can find the TCP Westwood Modules for the NS-2 network simulator.
TCP Westwood modules for NS-2 come in two flavors:
TCP WestwoodNR (TCP Westwood based on TCP NewReno) with installation instructions
(we suggest to use TCP WestwoodNR and compare it to the NewReno protocol)
TCP Westwood (TCP Westwood based on TCP Reno) with installation instructions
Other material:
Support:
For any question about the NS-2 code, please contact: tcpw-support@cabernet.cs.ucla.edu?
tcp-westwood-nr.cc (for NS-2 version 2.1b8a only; see the COMPATIBILITY NOTES if you use other versions of NS-2)
Add the modules tcp-westwood-nr.cc and tcp-westwood-nr.h to the main NS-2 directory (which is something like: ../ns-allinone-2.1b8a/ns-2.1b8a)
Modify the Makefile so that it compiles and links the new module (i.e. add tcp-westwood-nr.o anywhere in the OBJ_CC? variable, for example near the other TCP related modules like tcp-newreno.o or tcp-vegas.o).?You can find the Makefile under the main NS-2 directory
Add the following lines to ns-default.tcl (it can be found in the tcl/lib directory of the main NS-2 directory):
# Added for TCP WestwoodNR Agent/TCP/WestwoodNR set current_bwe_ 0 Agent/TCP/WestwoodNR set last_bwe_sample_ 0 Agent/TCP/WestwoodNR set unaccounted_ 0 Agent/TCP/WestwoodNR set fr_a_ 1 Agent/TCP/WestwoodNR set min_rtt_estimate 10000 Agent/TCP/WestwoodNR set myseqno_ 1 Agent/TCP/WestwoodNR set lastackno_ 0 Agent/TCP/WestwoodNR set lastackrx_ 0 Agent/TCP/WestwoodNR set fr_alpha_ 0.9 Agent/TCP/WestwoodNR set filter_type_ 3 Agent/TCP/WestwoodNR set tau_ 1.0 # setting this to 1 implements some changes to reno? # proposed by Janey Hoe (other than fixing reno's # unnecessary retransmit timeouts) Agent/TCP/WestwoodNR set newreno_changes_ 0 # setting this to 1 allows the retransmit timer to expire for # a window with many packet drops Agent/TCP/WestwoodNR set newreno_changes1_ 0 Agent/TCP/WestwoodNR set partial_window_deflation_ 0 Agent/TCP/WestwoodNR set exit_recovery_fix_ 0 |
tcp-westwood.cc (for NS-2 version 2.1b8a only; see the COMPATIBILITY NOTES if you use other versions of NS-2)
| # Added for TCP Westwood Agent/TCP/Westwood set current_bwe_ 0 Agent/TCP/Westwood set last_bwe_sample_ 0 Agent/TCP/Westwood set unaccounted_ 0 Agent/TCP/Westwood set fr_a_ 1 Agent/TCP/Westwood set min_rtt_estimate 10000 Agent/TCP/Westwood set myseqno_ 1 Agent/TCP/Westwood set lastackno_ 0 |
To make the TCPW modules compatible with future versions of NS-2 just do the following:
/// double rtt_estimate = t_rtt_ * tcp_tick_; if ((rtt_estimate < min_rtt_estimate)&&(rtt_estimate > 0)) { |
previous version of modified TCPW (with the "idle_interval bug"): tcp-westwood.cc, tcp-westwood.h
original TCP Westwood files from Casetti (to be used with NS-2 version 2.1b6):
and original Casetti's TCPW page