⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 test-suite-newreno.tcl

📁 ns-2的文件包。多多下载
💻 TCL
📖 第 1 页 / 共 4 页
字号:
}## With Reno:# With Limited Transmit but without bugfix, with reordering there#  is only one unnecessary Fast Retransmit. #Class Test/reno5_noBF -superclass TestSuiteTest/reno5_noBF instproc init {} {	$self instvar net_ test_ guide_	set net_	net4a	set test_	reno5_noBF	Agent/TCP set bugFix_ false	Agent/TCP set singledup_ 1	set guide_ \	"Reno #5, reordering, with Limited Transmit, without bugfix."  	Test/reno5_noBF instproc run {} [Test/reno5 info instbody run ]	$self next pktTraceFile}## Reno:# Only one unnecessary retransmit#Class Test/reno5_noLT_noBF -superclass TestSuiteTest/reno5_noLT_noBF instproc init {} {	$self instvar net_ test_ guide_	set net_	net4a	set test_	reno5_noLT_noBF	Agent/TCP set bugFix_ false	Agent/TCP set singledup_ 0	set guide_ \	"Reno #5, reordering, without Limited Transmit, without bugfix."	Test/reno5_noLT_noBF instproc run {} [Test/reno5 info instbody run ]	$self next pktTraceFile}## With multiple reordering events, Reno reduces the congestion#   window more times than necessary.#Class Test/reno5a -superclass TestSuiteTest/reno5a instproc init {} {	$self instvar net_ test_ guide_	set net_	net4a	set test_	reno5a	Agent/TCP set bugFix_ true	Agent/TCP set singledup_ 1	set guide_ \	"Reno #5, reordering, with Limited Transmit, with bugfix."	$self next pktTraceFile}Test/reno5a instproc run {} {	global quiet	$self instvar guide_ ns_ node_	if {$quiet == "false"} {puts $guide_}        ErrorModel set delay_pkt_ true        ErrorModel set drop_ false        ErrorModel set delay_ 0.05	$self setTopo	$self set_lossylink1	$self drop_pkts1 { 25 31 35 40 }        $self setup Reno {100000} 0}## Reno:#Class Test/reno5a_noLT_noBF -superclass TestSuiteTest/reno5a_noLT_noBF instproc init {} {	$self instvar net_ test_ guide_	set net_	net4a	set test_	reno5a_noLT_noBF	Agent/TCP set bugFix_ false	Agent/TCP set singledup_ 0	set guide_ \	"Reno #5a, reordering, without Limited Transmit, without bugfix."	Test/reno5a_noLT_noBF instproc run {} [Test/reno5a info instbody run ]	$self next pktTraceFile}## In this scenario, we do a Fast Retransmit after packet 33 is dropped,# and that seems good.  Packet 33 was sent after the first# Fast Retransmit was initiated.#Class Test/newreno6 -superclass TestSuiteTest/newreno6 instproc init {} {	$self instvar net_ test_ guide_	set net_	net4	set test_	newreno6	Agent/TCP set singledup_ 1	set guide_ "NewReno, a new packet transmitted after FR is dropped."	$self next pktTraceFile}Test/newreno6 instproc run {} {	global quiet; $self instvar guide_	if {$quiet == "false"} {puts $guide_}	Agent/TCP set bugFix_ false        $self setup Newreno {14 26 28 33}}########################################################### New validation tests on timestamps, from Andrei Gurtov########################################################### BugFix prevents a Fast Retransmit for a lost packet.Class Test/newreno_rto_loss -superclass TestSuiteTest/newreno_rto_loss instproc init {} {	$self instvar net_ test_ guide_	set net_	net4	set test_	newreno_rto	set guide_ "NewReno after timeout, lost packet."	$self next pktTraceFile}Test/newreno_rto_loss instproc run {} {	global quiet; $self instvar guide_	if {$quiet == "false"} {puts $guide_}	$self rfc2582        $self setup Newreno {15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 37}} # The ACK heuristic allows a productive Fast Retransmit.Class Test/newreno_rto_loss_ack -superclass TestSuiteTest/newreno_rto_loss_ack instproc init {} {	$self instvar net_ test_ guide_	set net_	net4	set test_	newreno_rto_loss_ack	Agent/TCP set bugFix_ack_ true	set guide_ "NewReno after timeout, lost packet, ACK heuristic."	$self next pktTraceFile	Test/newreno_rto_loss_ack instproc run {} [Test/newreno_rto_loss info instbody run]} Class Test/newreno_rto_loss_ts -superclass TestSuiteTest/newreno_rto_loss_ts instproc init {} {	$self instvar net_ test_ guide_	set net_	net4	set test_	newreno_rto_loss_ts	Agent/TCP set timestamps_ true	Agent/TCPSink set ts_echo_rfc1323_ true        set guide_ "NewReno after timeout, lost packet, timestamps."	$self next pktTraceFile	Test/newreno_rto_loss_ts instproc run {} [Test/newreno_rto_loss info instbody run]}Class Test/newreno_rto_loss_tsh -superclass TestSuiteTest/newreno_rto_loss_tsh instproc init {} {	$self instvar net_ test_ guide_	set net_	net4	set test_	newreno_rto_loss_tsh	Agent/TCP set bugFix_ts_ true	Agent/TCP set timestamps_ true	Agent/TCPSink set ts_echo_rfc1323_ true	set guide_ "NewReno after timeout, lost packet, timestamp heuristic."	$self next pktTraceFile	Test/newreno_rto_loss_tsh instproc run {} [Test/newreno_rto_loss info instbody run]} Class Test/newreno_rto_dup -superclass TestSuiteTest/newreno_rto_dup instproc init {} {        $self instvar net_ test_ guide_        set net_        net4        set test_       newreno_rto_dup        set guide_ "NewReno after timeout, false dupacks"        $self next pktTraceFile}Test/newreno_rto_dup instproc run {} {        global quiet; $self instvar guide_        if {$quiet == "false"} {puts $guide_}        $self setup Newreno {24 25 26 28 31 35 40 45 46 47 48 51}} ## The ACK heuristic doesn't make any difference in this case,## as one would want.Class Test/newreno_rto_dup_ack -superclass TestSuiteTest/newreno_rto_dup_ack instproc init {} {        $self instvar net_ test_ guide_        set net_        net4        set test_       newreno_rto_dup_ack	Agent/TCP set bugFix_ack_ true        set guide_ "NewReno after timeout, false dupacks, ACK heuristic"        $self next pktTraceFile	Test/newreno_rto_dup_ack instproc run {} [Test/newreno_rto_dup info instbody run]} TestSuite instproc drop_acks acks {    $self instvar ns_ node_    set emod2 [new ErrorModule Fid]    [$ns_ link $node_(k1) $node_(r1)] errormodule $emod2    set errmodel1 [new ErrorModel/List]    $errmodel1 droplist $acks    $emod2 insert $errmodel1    $emod2 bind $errmodel1 1}# ACK heuristic fails due to ACK losses.Class Test/newreno_rto_loss_ackf -superclass TestSuiteTest/newreno_rto_loss_ackf instproc init {} {        $self instvar net_ test_ guide_        set net_        net4        set test_       newreno_rto_loss_ackf        Agent/TCP set bugFix_ack_ true        set guide_ "NewReno after timeout, lost packet and ACKs, ACK heuristic fails."              $self next pktTraceFile}Test/newreno_rto_loss_ackf instproc run {} {        global quiet        $self instvar guide_        if {$quiet == "false"} {puts $guide_}	$self rfc2582        $self setTopo        $self drop_acks {23 24 25 26}        $self setup Newreno {15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 43} 0} Class Test/newreno_rto_dup_ts -superclass TestSuiteTest/newreno_rto_dup_ts instproc init {} {	$self instvar net_ test_ guide_	set net_	net4	set test_	newreno_rto_dup_ts	Agent/TCP set timestamps_ true	set guide_ "NewReno after timeout, false dupacks, timestamps."	$self next pktTraceFile	Test/newreno_rto_dup_ts instproc run {} [Test/newreno_rto_dup info instbody run]}## The timestamp heuristic doesn't make any difference in this case,## as one would want.Class Test/newreno_rto_dup_tsh -superclass TestSuiteTest/newreno_rto_dup_tsh instproc init {} {	$self instvar net_ test_ guide_	set net_	net4	set test_	newreno_rto_dup_tsh	Agent/TCP set timestamps_ true	Agent/TCP set bugFix_ts_ true	set guide_ "NewReno after timeout, false dupacks, timestamp heuristic."	$self next pktTraceFile	Test/newreno_rto_dup_tsh instproc run {} [Test/newreno_rto_dup info instbody run]}#########################################################################3# Impatient (newreno_changes1_ to 1) vs. # Slow-but-steady (newreno_changes1_ 0)#########################################################################3Class Test/impatient1 -superclass TestSuiteTest/impatient1 instproc init {} {	$self instvar net_ test_ guide_	set net_	net4b	set test_	impatient1	Agent/TCP/Newreno set newreno_changes1_ 1	set guide_ \	"NewReno, Impatient."	$self next pktTraceFile}Test/impatient1 instproc run {} {	global quiet; $self instvar guide_	if {$quiet == "false"} {puts $guide_}	Agent/TCP/Newreno set partial_window_deflation_ 1	Agent/TCP set singledup_ 1        $self setup Newreno {15 16 17 18 19 20 21 22 23 24 25 26 27 } 1 10 16}Class Test/slow1 -superclass TestSuiteTest/slow1 instproc init {} {	$self instvar net_ test_ guide_	set net_	net4b	set test_	slow1	Agent/TCP/Newreno set newreno_changes1_ 0	set guide_ \	"NewReno, Slow-but-Steady.  Impatient is better."	Test/slow1 instproc run {} [Test/impatient1 info instbody run]	$self next pktTraceFile}Class Test/impatient2 -superclass TestSuiteTest/impatient2 instproc init {} {	$self instvar net_ test_ guide_	set net_	net4b	set test_	impatient2	Agent/TCP/Newreno set newreno_changes1_ 1	set guide_ \	"NewReno, Impatient.  Slow-but-Steady is better."	$self next pktTraceFile}Test/impatient2 instproc run {} {	global quiet; $self instvar guide_	if {$quiet == "false"} {puts $guide_}	Agent/TCP/Newreno set partial_window_deflation_ 1	Agent/TCP set singledup_ 1        $self setup Newreno {15 16 17 18 19 } 1 10 16}Class Test/slow2 -superclass TestSuiteTest/slow2 instproc init {} {	$self instvar net_ test_ guide_	set net_	net4b	set test_	slow2	Agent/TCP/Newreno set newreno_changes1_ 0	set guide_ \	"NewReno, Slow-but-Steady."	Test/slow2 instproc run {} [Test/impatient2 info instbody run]	$self next pktTraceFile}Class Test/impatient3 -superclass TestSuiteTest/impatient3 instproc init {} {	$self instvar net_ test_ guide_	set net_	net4b	set test_	impatient3	Agent/TCP/Newreno set newreno_changes1_ 1	set guide_ \	"NewReno, Impatient.  Slow-but-Steady is better."	$self next pktTraceFile}Test/impatient3 instproc run {} {	global quiet; $self instvar guide_	if {$quiet == "false"} {puts $guide_}	Agent/TCP/Newreno set partial_window_deflation_ 1	Agent/TCP set singledup_ 1        $self setup Newreno {15 16 17 18 19 22 27 } 1 10 16}Class Test/slow3 -superclass TestSuiteTest/slow3 instproc init {} {	$self instvar net_ test_ guide_	set net_	net4b	set test_	slow3	Agent/TCP/Newreno set newreno_changes1_ 0	set guide_ \	"NewReno, Slow-but-Steady."	Test/slow3 instproc run {} [Test/impatient3 info instbody run]	$self next pktTraceFile}Class Test/impatient4 -superclass TestSuiteTest/impatient4 instproc init {} {	$self instvar net_ test_ guide_	set net_	net4b	set test_	impatient4	Agent/TCP/Newreno set newreno_changes1_ 1	set guide_ \	"NewReno, Impatient."	$self next pktTraceFile}Test/impatient4 instproc run {} {	global quiet; $self instvar guide_	if {$quiet == "false"} {puts $guide_}	Agent/TCP/Newreno set partial_window_deflation_ 1	Agent/TCP set singledup_ 1        $self setup Newreno {30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55} 1 20 32}Class Test/slow4 -superclass TestSuiteTest/slow4 instproc init {} {	$self instvar net_ test_ guide_	set net_	net4b	set test_	slow4	Agent/TCP/Newreno set newreno_changes1_ 0	set guide_ \	"NewReno, Slow-but-Steady.  Impatient is better."	Test/slow4 instproc run {} [Test/impatient4 info instbody run]	$self next pktTraceFile}TestSuite runTest

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -