- $sctp0 trace cwnd_
- $sctp0 trace rto_
- $sctp0 trace errorCount_
- $sctp0 attach $trace_ch
- }
- set sctp1 [new Agent/SCTP]
- $ns attach-agent $n1 $sctp1
- $sctp1 set mtu_ 1500
- $sctp1 set initialRwnd_ 131072
- $sctp1 set useDelayedSacks_ 0
- if {$quiet == 0} {
- $sctp1 set debugMask_ -1
- $sctp1 set debugFileIndex_ 1
- }
- $ns connect $sctp0 $sctp1
- set ftp0 [new Application/FTP]
- $ftp0 attach-agent $sctp0
- }
- Test/sctp-multipleRtx-early instproc run {} {
- $self instvar ns ftp0
- $ns at 0.5 "$ftp0 start"
- $ns at 10.0 "$self finish"
- $ns run
- }
- Test/sctp-newReno instproc init {} {
- $self instvar ns testName ftp0
- global quiet
- set testName newReno
- $self next
- set n0 [$ns node]
- set n1 [$ns node]
- $ns duplex-link $n0 $n1 .5Mb 200ms DropTail
- $ns duplex-link-op $n0 $n1 orient right
- set err [new ErrorModel/List]
- $err droplist {17 29 31}
- $ns lossmodel $err $n0 $n1
- set sctp0 [new Agent/SCTP]
- $ns attach-agent $n0 $sctp0
- $sctp0 set mtu_ 1500
- $sctp0 set dataChunkSize_ 1468
- $sctp0 set numOutStreams_ 1
- $sctp0 set initialCwnd_ 1
- if {$quiet == 0} {
- $sctp0 set debugMask_ -1
- $sctp0 set debugFileIndex_ 0
- set trace_ch [open trace.sctp w]
- $sctp0 set trace_all_ 1
- $sctp0 trace cwnd_
- $sctp0 trace rto_
- $sctp0 trace errorCount_
- $sctp0 attach $trace_ch
- }
- set sctp1 [new Agent/SCTP]
- $ns attach-agent $n1 $sctp1
- $sctp1 set mtu_ 1500
- $sctp1 set initialRwnd_ 131072
- $sctp1 set useDelayedSacks_ 0
- if {$quiet == 0} {
- $sctp1 set debugMask_ -1
- $sctp1 set debugFileIndex_ 1
- }
- $ns connect $sctp0 $sctp1
- set ftp0 [new Application/FTP]
- $ftp0 attach-agent $sctp0
- }
- Test/sctp-newReno instproc run {} {
- $self instvar ns ftp0
- $ns at 0.5 "$ftp0 start"
- $ns at 7.0 "$ftp0 stop"
- $ns at 10.0 "$self finish"
- $ns run
- }
- Test/sctp-noEarlyHBs instproc init {} {
- $self instvar ns testName ftp0
- global quiet
- set testName noEarlyHBs
- $self next
- set n0 [$ns node]
- set n1 [$ns node]
- $ns duplex-link $n0 $n1 .5Mb 200ms DropTail
- $ns duplex-link-op $n0 $n1 orient right
- set sctp0 [new Agent/SCTP]
- $ns attach-agent $n0 $sctp0
- $sctp0 set mtu_ 1500
- $sctp0 set dataChunkSize_ 1468
- $sctp0 set numOutStreams_ 1
- if {$quiet == 0} {
- $sctp0 set debugMask_ -1
- $sctp0 set debugFileIndex_ 0
- set trace_ch [open trace.sctp w]
- $sctp0 set trace_all_ 1
- $sctp0 trace cwnd_
- $sctp0 trace rto_
- $sctp0 trace errorCount_
- $sctp0 attach $trace_ch
- }
- set sctp1 [new Agent/SCTP]
- $ns attach-agent $n1 $sctp1
- $sctp1 set mtu_ 1500
- $sctp1 set initialRwnd_ 131072
- $sctp1 set useDelayedSacks_ 0
- if {$quiet == 0} {
- $sctp1 set debugMask_ -1
- $sctp1 set debugFileIndex_ 1
- }
- $ns connect $sctp0 $sctp1
- set ftp0 [new Application/FTP]
- $ftp0 attach-agent $sctp0
- }
- Test/sctp-noEarlyHBs instproc run {} {
- $self instvar ns ftp0
- $ns at 50.0 "$ftp0 start"
- $ns at 55.0 "$self finish"
- $ns run
- }
- Test/sctp-smallRwnd instproc init {} {
- $self instvar ns testName ftp0
- global quiet
- set testName smallRwnd
- $self next
- set n0 [$ns node]
- set n1 [$ns node]
- $ns duplex-link $n0 $n1 .5Mb 300ms DropTail
- $ns duplex-link-op $n0 $n1 orient right
- $ns queue-limit $n0 $n1 10000
- set err [new ErrorModel/List]
- set sctp0 [new Agent/SCTP]
- $ns attach-agent $n0 $sctp0
- $sctp0 set mtu_ 1500
- $sctp0 set dataChunkSize_ 724
- $sctp0 set numOutStreams_ 1
- if {$quiet == 0} {
- $sctp0 set debugMask_ -1
- $sctp0 set debugFileIndex_ 0
- set trace_ch [open trace.sctp w]
- $sctp0 set trace_all_ 1
- $sctp0 trace cwnd_
- $sctp0 trace rto_
- $sctp0 trace errorCount_
- $sctp0 attach $trace_ch
- }
- set sctp1 [new Agent/SCTP]
- $ns attach-agent $n1 $sctp1
- $sctp1 set mtu_ 1500
- $sctp1 set initialRwnd_ 4096
- $sctp1 set useDelayedSacks_ 0
- if {$quiet == 0} {
- $sctp1 set debugMask_ -1
- $sctp1 set debugFileIndex_ 1
- }
- $ns connect $sctp0 $sctp1
- set ftp0 [new Application/FTP]
- $ftp0 attach-agent $sctp0
- }
- Test/sctp-smallRwnd instproc run {} {
- $self instvar ns ftp0
- $ns at 0.5 "$ftp0 start"
- $ns at 10.0 "$self finish"
- $ns run
- }
- Test/sctp-zeroRtx instproc init {} {
- $self instvar ns testName ftp0
- global quiet
- set testName zeroRtx
- $self next
- set n0 [$ns node]
- set n1 [$ns node]
- $ns duplex-link $n0 $n1 .5Mb 200ms DropTail
- $ns duplex-link-op $n0 $n1 orient right
- set err [new ErrorModel/List]
- $err droplist {31}
- $ns lossmodel $err $n0 $n1
- set sctp0 [new Agent/SCTP]
- $ns attach-agent $n0 $sctp0
- $sctp0 set mtu_ 1500
- $sctp0 set dataChunkSize_ 1468
- $sctp0 set numOutStreams_ 1
- $sctp0 set numUnrelStreams_ 1
- if {$quiet == 0} {
- $sctp0 set debugMask_ -1
- $sctp0 set debugFileIndex_ 0
- set trace_ch [open trace.sctp w]
- $sctp0 set trace_all_ 1
- $sctp0 trace cwnd_
- $sctp0 trace rto_
- $sctp0 trace errorCount_
- $sctp0 attach $trace_ch
- }
- set sctp1 [new Agent/SCTP]
- $ns attach-agent $n1 $sctp1
- $sctp1 set mtu_ 1500
- $sctp1 set initialRwnd_ 131072
- $sctp1 set useDelayedSacks_ 1
- if {$quiet == 0} {
- $sctp1 set debugMask_ -1
- $sctp1 set debugFileIndex_ 1
- }
- $ns connect $sctp0 $sctp1
- set ftp0 [new Application/FTP]
- $ftp0 attach-agent $sctp0
- }
- Test/sctp-zeroRtx instproc run {} {
- $self instvar ns ftp0
- $ns at 0.5 "$ftp0 start"
- $ns at 6.0 "$self finish"
- $ns run
- }
- Test/sctp-zeroRtx-burstLoss instproc init {} {
- $self instvar ns testName ftp0
- global quiet
- set testName zeroRtx-burstLoss
- $self next
- set n0 [$ns node]
- set n1 [$ns node]
- $ns duplex-link $n0 $n1 .5Mb 200ms DropTail
- $ns duplex-link-op $n0 $n1 orient right
- set err [new ErrorModel/List]
- $err droplist {17 18 19 20 21}
- $ns lossmodel $err $n0 $n1
- set sctp0 [new Agent/SCTP]
- $ns attach-agent $n0 $sctp0
- $sctp0 set mtu_ 1500
- $sctp0 set dataChunkSize_ 1468
- $sctp0 set numOutStreams_ 1
- $sctp0 set numUnrelStreams_ 1
- if {$quiet == 0} {
- $sctp0 set debugMask_ -1
- $sctp0 set debugFileIndex_ 0
- set trace_ch [open trace.sctp w]
- $sctp0 set trace_all_ 1
- $sctp0 trace cwnd_
- $sctp0 trace rto_
- $sctp0 trace errorCount_
- $sctp0 attach $trace_ch
- }
- set sctp1 [new Agent/SCTP]
- $ns attach-agent $n1 $sctp1
- $sctp1 set mtu_ 1500
- $sctp1 set initialRwnd_ 131072
- $sctp1 set useDelayedSacks_ 0
- if {$quiet == 0} {
- $sctp1 set debugMask_ -1
- $sctp1 set debugFileIndex_ 1
- }
- $ns connect $sctp0 $sctp1
- set ftp0 [new Application/FTP]
- $ftp0 attach-agent $sctp0
- }
- Test/sctp-zeroRtx-burstLoss instproc run {} {
- $self instvar ns ftp0
- $ns at 0.5 "$ftp0 start"
- $ns at 5.0 "$self finish"
- $ns run
- }
- Test/sctp-hbAfterRto-2packetsTimeout instproc init {} {
- $self instvar ns testName ftp0
- global quiet
- set testName hbAfterRto-2packetsTimeout
- $self next
- set n0 [$ns node]
- set n1 [$ns node]
- $ns duplex-link $n0 $n1 .5Mb 200ms DropTail
- $ns duplex-link-op $n0 $n1 orient right
- set err [new ErrorModel/List]
- $err droplist {15 16 32 33}
- $ns lossmodel $err $n0 $n1
- set sctp0 [new Agent/SCTP/HbAfterRto]
- $ns attach-agent $n0 $sctp0
- $sctp0 set mtu_ 1500
- $sctp0 set dataChunkSize_ 1468
- $sctp0 set numOutStreams_ 1
- if {$quiet == 0} {
- $sctp0 set debugMask_ -1
- $sctp0 set debugFileIndex_ 0
- set trace_ch [open trace.sctp w]
- $sctp0 set trace_all_ 1
- $sctp0 trace cwnd_
- $sctp0 trace rto_
- $sctp0 trace errorCount_
- $sctp0 attach $trace_ch
- }
- set sctp1 [new Agent/SCTP/HbAfterRto]
- $ns attach-agent $n1 $sctp1
- $sctp1 set mtu_ 1500
- $sctp1 set initialRwnd_ 131072
- $sctp1 set useDelayedSacks_ 0
- if {$quiet == 0} {
- $sctp1 set debugMask_ -1
- $sctp1 set debugFileIndex_ 1
- }
- $ns connect $sctp0 $sctp1
- set ftp0 [new Application/FTP]
- $ftp0 attach-agent $sctp0
- }
- Test/sctp-hbAfterRto-2packetsTimeout instproc run {} {
- $self instvar ns ftp0
- $ns at 0.5 "$ftp0 start"
- $ns at 4.5 "$ftp0 stop"
- $ns at 10.0 "$self finish"
- $ns run
- }
- Test/sctp-hbAfterRto-multihome2-2Timeout instproc init {} {
- $self instvar ns testName ftp0
- global quiet
- set testName hbAfterRto-multihome2-2Timeout
- $self next
- set host0_core [$ns node]
- set host0_if0 [$ns node]
- set host0_if1 [$ns node]
- $host0_core color Red
- $host0_if0 color Red
- $host0_if1 color Red
- $ns multihome-add-interface $host0_core $host0_if0
- $ns multihome-add-interface $host0_core $host0_if1
- set host1_core [$ns node]
- set host1_if0 [$ns node]
- set host1_if1 [$ns node]
- $host1_core color Blue
- $host1_if0 color Blue
- $host1_if1 color Blue
- $ns multihome-add-interface $host1_core $host1_if0
- $ns multihome-add-interface $host1_core $host1_if1
- $ns duplex-link $host0_if0 $host1_if0 .5Mb 200ms DropTail
- $ns duplex-link $host0_if1 $host1_if1 .5Mb 200ms DropTail
- set err0 [new ErrorModel/List]
- $err0 droplist {16}
- $ns lossmodel $err0 $host0_if0 $host1_if0
- set err1 [new ErrorModel/List]
- $err1 droplist {1}
- $ns lossmodel $err1 $host0_if1 $host1_if1
- set sctp0 [new Agent/SCTP/HbAfterRto]
- $ns multihome-attach-agent $host0_core $sctp0
- $sctp0 set mtu_ 1500
- $sctp0 set dataChunkSize_ 1468
- $sctp0 set numOutStreams_ 1
- if {$quiet == 0} {
- $sctp0 set debugMask_ -1
- $sctp0 set debugFileIndex_ 0
- set trace_ch [open trace.sctp w]
- $sctp0 set trace_all_ 1
- $sctp0 trace cwnd_
- $sctp0 trace rto_
- $sctp0 trace errorCount_
- $sctp0 attach $trace_ch
- }
- set sctp1 [new Agent/SCTP/HbAfterRto]
- $ns multihome-attach-agent $host1_core $sctp1
- $sctp1 set mtu_ 1500
- $sctp1 set initialRwnd_ 131072
- $sctp1 set useDelayedSacks_ 1
- if {$quiet == 0} {
- $sctp1 set debugMask_ -1
- $sctp1 set debugFileIndex_ 1
- }
- $ns connect $sctp0 $sctp1
- $sctp0 set-primary-destination $host1_if0
- set ftp0 [new Application/FTP]
- $ftp0 attach-agent $sctp0
- }
- Test/sctp-hbAfterRto-multihome2-2Timeout instproc run {} {
- $self instvar ns ftp0
- $ns at 0.5 "$ftp0 start"
- $ns at 9.0 "$ftp0 stop"
- $ns at 12.0 "$self finish"
- $ns run
- }
- Test/sctp-multipleFastRtx-2packetsTimeout instproc init {} {
- $self instvar ns testName ftp0
- global quiet
- set testName multipleFastRtx-2packetsTimeout
- $self next
- set n0 [$ns node]
- set n1 [$ns node]
- $ns duplex-link $n0 $n1 .5Mb 200ms DropTail
- $ns duplex-link-op $n0 $n1 orient right
- set err [new ErrorModel/List]
- $err droplist {15 16 32 33}
- $ns lossmodel $err $n0 $n1
- set sctp0 [new Agent/SCTP/MultipleFastRtx]
- $ns attach-agent $n0 $sctp0
- $sctp0 set mtu_ 1500
- $sctp0 set dataChunkSize_ 1468
- $sctp0 set numOutStreams_ 1
- if {$quiet == 0} {
- $sctp0 set debugMask_ -1
- $sctp0 set debugFileIndex_ 0
- set trace_ch [open trace.sctp w]
- $sctp0 set trace_all_ 1
- $sctp0 trace cwnd_
- $sctp0 trace rto_
- $sctp0 trace errorCount_
- $sctp0 attach $trace_ch
- }
- set sctp1 [new Agent/SCTP/MultipleFastRtx]
- $ns attach-agent $n1 $sctp1
- $sctp1 set mtu_ 1500
- $sctp1 set initialRwnd_ 131072
- $sctp1 set useDelayedSacks_ 0
- if {$quiet == 0} {
- $sctp1 set debugMask_ -1
- $sctp1 set debugFileIndex_ 1
- }
- $ns connect $sctp0 $sctp1
- set ftp0 [new Application/FTP]
- $ftp0 attach-agent $sctp0
- }
- Test/sctp-multipleFastRtx-2packetsTimeout instproc run {} {
- $self instvar ns ftp0
- $ns at 0.5 "$ftp0 start"
- $ns at 4.5 "$ftp0 stop"
- $ns at 10.0 "$self finish"
- $ns run
- }
- Test/sctp-multipleFastRtx-multihome2-2Timeout instproc init {} {
- $self instvar ns testName ftp0
- global quiet
- set testName multipleFastRtx-multihome2-2Timeout
- $self next
- set host0_core [$ns node]
- set host0_if0 [$ns node]
- set host0_if1 [$ns node]
- $host0_core color Red
- $host0_if0 color Red
- $host0_if1 color Red
- $ns multihome-add-interface $host0_core $host0_if0
- $ns multihome-add-interface $host0_core $host0_if1
- set host1_core [$ns node]
- set host1_if0 [$ns node]
- set host1_if1 [$ns node]
- $host1_core color Blue
- $host1_if0 color Blue
- $host1_if1 color Blue
- $ns multihome-add-interface $host1_core $host1_if0
- $ns multihome-add-interface $host1_core $host1_if1
- $ns duplex-link $host0_if0 $host1_if0 .5Mb 200ms DropTail
- $ns duplex-link $host0_if1 $host1_if1 .5Mb 200ms DropTail
- set err0 [new ErrorModel/List]
- $err0 droplist {16}
- $ns lossmodel $err0 $host0_if0 $host1_if0
- set err1 [new ErrorModel/List]
- $err1 droplist {1}
- $ns lossmodel $err1 $host0_if1 $host1_if1
- set sctp0 [new Agent/SCTP/MultipleFastRtx]
- $ns multihome-attach-agent $host0_core $sctp0
- $sctp0 set mtu_ 1500
- $sctp0 set dataChunkSize_ 1468
- $sctp0 set numOutStreams_ 1
- if {$quiet == 0} {
- $sctp0 set debugMask_ -1
- $sctp0 set debugFileIndex_ 0
- set trace_ch [open trace.sctp w]
- $sctp0 set trace_all_ 1
- $sctp0 trace cwnd_
- $sctp0 trace rto_
- $sctp0 trace errorCount_
- $sctp0 attach $trace_ch
- }
- set sctp1 [new Agent/SCTP/MultipleFastRtx]
- $ns multihome-attach-agent $host1_core $sctp1
- $sctp1 set mtu_ 1500
- $sctp1 set initialRwnd_ 131072
- $sctp1 set useDelayedSacks_ 1
- if {$quiet == 0} {
- $sctp1 set debugMask_ -1
- $sctp1 set debugFileIndex_ 1
- }
- $ns connect $sctp0 $sctp1
- $sctp0 set-primary-destination $host1_if0
- set ftp0 [new Application/FTP]
- $ftp0 attach-agent $sctp0
- }
- Test/sctp-multipleFastRtx-multihome2-2Timeout instproc run {} {
- $self instvar ns ftp0
- $ns at 0.5 "$ftp0 start"
- $ns at 9.0 "$ftp0 stop"
- $ns at 12.0 "$self finish"
- $ns run
- }
- Test/sctp-mfrHbAfterRto-Rta2-2FRsTimeout instproc init {} {
- $self instvar ns testName ftp0
- global quiet
- set testName mfrHbAfterRto-Rta2-2FRsTimeout
- $self next
- set host0_core [$ns node]
- set host0_if0 [$ns node]
- set host0_if1 [$ns node]
- $host0_core color Red
- $host0_if0 color Red
- $host0_if1 color Red
- $ns multihome-add-interface $host0_core $host0_if0
- $ns multihome-add-interface $host0_core $host0_if1
- set host1_core [$ns node]
- set host1_if0 [$ns node]
- set host1_if1 [$ns node]
- $host1_core color Blue
- $host1_if0 color Blue
- $host1_if1 color Blue
- $ns multihome-add-interface $host1_core $host1_if0
- $ns multihome-add-interface $host1_core $host1_if1
- $ns duplex-link $host0_if0 $host1_if0 .5Mb 200ms DropTail
- $ns duplex-link $host0_if1 $host1_if1 .5Mb 200ms DropTail
- set err0 [new ErrorModel/List]
- $err0 droplist {16 29 37 38 39 40 41}
- $ns lossmodel $err0 $host0_if0 $host1_if0
- set sctp0 [new Agent/SCTP/MultipleFastRtx]
- $ns multihome-attach-agent $host0_core $sctp0
- $sctp0 set mtu_ 1500
- $sctp0 set dataChunkSize_ 1468
- $sctp0 set numOutStreams_ 1
- $sctp0 set rtxToAlt_ 2
- if {$quiet == 0} {
- $sctp0 set debugMask_ -1
- $sctp0 set debugFileIndex_ 0
- set trace_ch [open trace.sctp w]
- $sctp0 set trace_all_ 1
- $sctp0 trace cwnd_
- $sctp0 trace rto_
- $sctp0 trace errorCount_
- $sctp0 attach $trace_ch
- }
- set sctp1 [new Agent/SCTP/MultipleFastRtx]
- $ns multihome-attach-agent $host1_core $sctp1
- $sctp1 set mtu_ 1500
- $sctp1 set initialRwnd_ 131072
- $sctp1 set useDelayedSacks_ 1
- if {$quiet == 0} {
- $sctp1 set debugMask_ -1
- $sctp1 set debugFileIndex_ 1
- }
- $ns connect $sctp0 $sctp1
- $sctp0 set-primary-destination $host1_if0
- set ftp0 [new Application/FTP]
- $ftp0 attach-agent $sctp0
- }
- Test/sctp-mfrHbAfterRto-Rta2-2FRsTimeout instproc run {} {
- $self instvar ns ftp0
- $ns at 0.5 "$ftp0 start"
- $ns at 9.0 "$ftp0 stop"
- $ns at 12.0 "$self finish"
- $ns run
- }
- Test/sctp-timestamp-multihome2-2Rtx3 instproc init {} {
- $self instvar ns testName ftp0
- global quiet
- set testName timestamp-multihome2-2Rt3
- $self next
- set host0_core [$ns node]
- set host0_if0 [$ns node]
- set host0_if1 [$ns node]
- $host0_core color Red
- $host0_if0 color Red
- $host0_if1 color Red
- $ns multihome-add-interface $host0_core $host0_if0
- $ns multihome-add-interface $host0_core $host0_if1
- set host1_core [$ns node]
- set host1_if0 [$ns node]
- set host1_if1 [$ns node]
- $host1_core color Blue
- $host1_if0 color Blue
- $host1_if1 color Blue
- $ns multihome-add-interface $host1_core $host1_if0
- $ns multihome-add-interface $host1_core $host1_if1
- $ns duplex-link $host0_if0 $host1_if0 .5Mb 200ms DropTail
- $ns duplex-link $host0_if1 $host1_if1 .5Mb 200ms DropTail
- set err [new ErrorModel/List]
- $err droplist {16 17 18}
- $ns lossmodel $err $host0_if0 $host1_if0
- set sctp0 [new Agent/SCTP/Timestamp]
- $ns multihome-attach-agent $host0_core $sctp0
- $sctp0 set mtu_ 1500
- $sctp0 set dataChunkSize_ 1456 # sctp/ip = 32, timestamp = 12
- $sctp0 set numOutStreams_ 1
- if {$quiet == 0} {
- $sctp0 set debugMask_ -1
- $sctp0 set debugFileIndex_ 0
- set trace_ch [open trace.sctp w]
- $sctp0 set trace_all_ 1
- $sctp0 trace cwnd_
- $sctp0 trace rto_
- $sctp0 trace errorCount_
- $sctp0 attach $trace_ch
- }
- set sctp1 [new Agent/SCTP/Timestamp]
- $ns multihome-attach-agent $host1_core $sctp1
- $sctp1 set mtu_ 1500
- $sctp1 set dataChunkSize_ 512
- $sctp1 set initialRwnd_ 131072
- $sctp1 set useDelayedSacks_ 1
- if {$quiet == 0} {
- $sctp1 set debugMask_ -1
- $sctp1 set debugFileIndex_ 1
- }
- $ns connect $sctp0 $sctp1
- $sctp0 set-primary-destination $host1_if0
- set ftp0 [new Application/FTP]
- $ftp0 attach-agent $sctp0
- }
- Test/sctp-timestamp-multihome2-2Rtx3 instproc run {} {
- $self instvar ns ftp0
- $ns at 0.5 "$ftp0 start"
- $ns at 4.5 "$ftp0 stop"
- $ns at 10.0 "$self finish"
- $ns run
- }
- Test/sctp-timestamp-multihome2-2Timeout instproc init {} {
- $self instvar ns testName ftp0
- global quiet
- set testName timestamp-multihome2-2Timeout
- $self next
- set host0_core [$ns node]
- set host0_if0 [$ns node]
- set host0_if1 [$ns node]
- $host0_core color Red
- $host0_if0 color Red
- $host0_if1 color Red
- $ns multihome-add-interface $host0_core $host0_if0
- $ns multihome-add-interface $host0_core $host0_if1
- set host1_core [$ns node]
- set host1_if0 [$ns node]
- set host1_if1 [$ns node]
- $host1_core color Blue
- $host1_if0 color Blue
- $host1_if1 color Blue
- $ns multihome-add-interface $host1_core $host1_if0
- $ns multihome-add-interface $host1_core $host1_if1
- $ns duplex-link $host0_if0 $host1_if0 .5Mb 200ms DropTail
- $ns duplex-link $host0_if1 $host1_if1 .5Mb 200ms DropTail
- set err0 [new ErrorModel/List]
- $err0 droplist {16}
- $ns lossmodel $err0 $host0_if0 $host1_if0
- set err1 [new ErrorModel/List]
- $err1 droplist {1}
- $ns lossmodel $err1 $host0_if1 $host1_if1
- set sctp0 [new Agent/SCTP/Timestamp]
- $ns multihome-attach-agent $host0_core $sctp0
- $sctp0 set mtu_ 1500
- $sctp0 set dataChunkSize_ 1456 # sctp/ip = 32, timestamp = 12
- $sctp0 set numOutStreams_ 1
- if {$quiet == 0} {
- $sctp0 set debugMask_ -1
- $sctp0 set debugFileIndex_ 0
- set trace_ch [open trace.sctp w]
- $sctp0 set trace_all_ 1
- $sctp0 trace cwnd_
- $sctp0 trace rto_
- $sctp0 trace errorCount_
- $sctp0 attach $trace_ch
- }
- set sctp1 [new Agent/SCTP/Timestamp]
- $ns multihome-attach-agent $host1_core $sctp1
- $sctp1 set mtu_ 1500
- $sctp1 set dataChunkSize_ 512
- $sctp1 set initialRwnd_ 131072
- $sctp1 set useDelayedSacks_ 1
- if {$quiet == 0} {
- $sctp1 set debugMask_ -1
- $sctp1 set debugFileIndex_ 1
- }
- $ns connect $sctp0 $sctp1
- $sctp0 set-primary-destination $host1_if0
- set ftp0 [new Application/FTP]
- $ftp0 attach-agent $sctp0
- }
- Test/sctp-timestamp-multihome2-2Timeout instproc run {} {
- $self instvar ns ftp0
- $ns at 0.5 "$ftp0 start"
- $ns at 9.0 "$ftp0 stop"
- $ns at 12.0 "$self finish"
- $ns run
- }
- Test/sctp-packet-loss-dest-conf instproc init {} {
- $self instvar ns testName ftp0
- global quiet
- set testName packet-loss-dest-conf
- $self next
- set host0_core [$ns node]
- set host0_if0 [$ns node]
- set host0_if1 [$ns node]
- set host0_if2 [$ns node]
- $host0_core color Red
- $host0_if0 color Red
- $host0_if1 color Red
- $host0_if2 color Red
- $ns multihome-add-interface $host0_core $host0_if0
- $ns multihome-add-interface $host0_core $host0_if1
- $ns multihome-add-interface $host0_core $host0_if2
- set host1_core [$ns node]
- set host1_if0 [$ns node]
- set host1_if1 [$ns node]
- set host1_if2 [$ns node]
- $host1_core color Blue
- $host1_if0 color Blue
- $host1_if1 color Blue
- $host1_if2 color Blue
- $ns multihome-add-interface $host1_core $host1_if0
- $ns multihome-add-interface $host1_core $host1_if1
- $ns multihome-add-interface $host1_core $host1_if2
- $ns duplex-link $host0_if0 $host1_if0 10Mb 45ms DropTail
- [[$ns link $host0_if0 $host1_if0] queue] set limit_ 50
- $ns duplex-link $host0_if1 $host1_if1 10Mb 45ms DropTail
- [[$ns link $host0_if1 $host1_if1] queue] set limit_ 50
- $ns duplex-link $host0_if2 $host1_if2 10Mb 45ms DropTail
- [[$ns link $host0_if2 $host1_if2] queue] set limit_ 50
- set err0 [new ErrorModel/List]
- $err0 droplist {2 3}
- $ns lossmodel $err0 $host0_if0 $host1_if0
- set sctp0 [new Agent/SCTP]
- $ns multihome-attach-agent $host0_core $sctp0
- $sctp0 set mtu_ 1500
- $sctp0 set dataChunkSize_ 1468
- $sctp0 set numOutStreams_ 1
- if {$quiet == 0} {
- $sctp0 set debugMask_ -1
- $sctp0 set debugFileIndex_ 0
- set trace_ch [open trace.sctp w]
- $sctp0 set trace_all_ 1
- $sctp0 trace cwnd_
- $sctp0 trace rto_
- $sctp0 trace errorCount_
- $sctp0 attach $trace_ch
- }
- set sctp1 [new Agent/SCTP]
- $ns multihome-attach-agent $host1_core $sctp1
- $sctp1 set mtu_ 1500
- $sctp1 set initialRwnd_ 131072
- $sctp1 set useDelayedSacks_ 1
- if {$quiet == 0} {
- $sctp1 set debugMask_ -1
- $sctp1 set debugFileIndex_ 1
- }
- $ns connect $sctp0 $sctp1
- $sctp0 set-primary-destination $host1_if0
- set ftp0 [new Application/FTP]
- $ftp0 attach-agent $sctp0
- }
- Test/sctp-packet-loss-dest-conf instproc run {} {
- $self instvar ns ftp0
- $ns at 0.5 "$ftp0 start"
- $ns at 20.0 "$self finish"
- $ns run
- }
- Test/sctp-cmt-2paths-64K instproc init {} {
- $self instvar ns testName ftp0
- global quiet
- set testName cmt-2paths-64K
- $self next
- set host0_core [$ns node]
- set host0_if0 [$ns node]
- set host0_if1 [$ns node]
- set host0_if2 [$ns node]
- $host0_core color Red
- $host0_if0 color Red
- $host0_if1 color Red
- $host0_if2 color Red
- $ns multihome-add-interface $host0_core $host0_if0
- $ns multihome-add-interface $host0_core $host0_if1
- set host1_core [$ns node]
- set host1_if0 [$ns node]
- set host1_if1 [$ns node]
- $host1_core color Blue
- $host1_if0 color Blue
- $host1_if1 color Blue
- $ns multihome-add-interface $host1_core $host1_if0
- $ns multihome-add-interface $host1_core $host1_if1
- $ns duplex-link $host0_if0 $host1_if0 10Mb 45ms DropTail
- [[$ns link $host0_if0 $host1_if0] queue] set limit_ 50
- $ns duplex-link $host0_if1 $host1_if1 10Mb 45ms DropTail
- [[$ns link $host0_if1 $host1_if1] queue] set limit_ 50
- set cmt_snd [new Agent/SCTP/CMT]
- $ns multihome-attach-agent $host0_core $cmt_snd
- $cmt_snd set initialSsthresh_ 16000
- $cmt_snd set mtu_ 1500
- $cmt_snd set dataChunkSize_ 1468
- $cmt_snd set numOutStreams_ 1
- $cmt_snd set useCmtReordering_ 1
- $cmt_snd set useCmtCwnd_ 1
- $cmt_snd set useCmtDelAck_ 1
- $cmt_snd set eCmtRtxPolicy_ 2 ; #RTX-SSTHRESH
- if {$quiet == 0} {
- $cmt_snd set debugMask_ -1
- $cmt_snd set debugFileIndex_ 0
- set trace_ch [open trace.sctp w]
- $cmt_snd set trace_all_ 1
- $cmt_snd trace cwnd_
- $cmt_snd trace rto_
- $cmt_snd trace errorCount_
- $cmt_snd attach $trace_ch
- }
- set cmt_rcv [new Agent/SCTP/CMT]
- $ns multihome-attach-agent $host1_core $cmt_rcv
- # MTU of 1500 = 1452 data bytes
- $cmt_rcv set mtu_ 1500
- $cmt_rcv set initialRwnd_ 65536
- $cmt_rcv set useDelayedSacks_ 1
- $cmt_rcv set useCmtDelAck_ 1
- if {$quiet == 0} {
- $cmt_rcv set debugMask_ -1
- $cmt_rcv set debugFileIndex_ 1
- }
- $ns connect $cmt_snd $cmt_rcv
- set ftp0 [new Application/FTP]
- $ftp0 attach-agent $cmt_snd
- $cmt_snd set-primary-destination $host1_if0
- }
- Test/sctp-cmt-2paths-64K instproc run {} {
- $self instvar ns ftp0
- $ns at 0.0 "$ftp0 send 1452000"
- $ns at 20.0 "$self finish"
- $ns run
- }
- Test/sctp-cmt-2paths-64K-withloss instproc init {} {
- $self instvar ns testName ftp0
- global quiet
- set testName cmt-2paths-64K-withloss
- $self next
- set host0_core [$ns node]
- set host0_if0 [$ns node]
- set host0_if1 [$ns node]
- $host0_core color Red
- $host0_if0 color Red
- $host0_if1 color Red
- $ns multihome-add-interface $host0_core $host0_if0
- $ns multihome-add-interface $host0_core $host0_if1
- set host1_core [$ns node]
- set host1_if0 [$ns node]
- set host1_if1 [$ns node]
- $host1_core color Blue
- $host1_if0 color Blue
- $host1_if1 color Blue
- $ns multihome-add-interface $host1_core $host1_if0
- $ns multihome-add-interface $host1_core $host1_if1
- $ns duplex-link $host0_if0 $host1_if0 10Mb 30ms DropTail
- [[$ns link $host0_if0 $host1_if0] queue] set limit_ 50
- $ns duplex-link $host0_if1 $host1_if1 10Mb 45ms DropTail
- [[$ns link $host0_if1 $host1_if1] queue] set limit_ 50
- set err [new ErrorModel/List]
- $err droplist {16 17 18}
- $ns lossmodel $err $host0_if0 $host1_if0
- set cmt_snd [new Agent/SCTP/CMT]
- $ns multihome-attach-agent $host0_core $cmt_snd
- $cmt_snd set initialSsthresh_ 16000
- $cmt_snd set mtu_ 1500
- $cmt_snd set dataChunkSize_ 1468
- $cmt_snd set numOutStreams_ 1
- $cmt_snd set useCmtReordering_ 1
- $cmt_snd set useCmtCwnd_ 1
- $cmt_snd set useCmtDelAck_ 1
- $cmt_snd set eCmtRtxPolicy_ 2 ; #RTX-SSTHRESH
- if {$quiet == 0} {
- $cmt_snd set debugMask_ -1
- $cmt_snd set debugFileIndex_ 0
- set trace_ch [open trace.sctp w]
- $cmt_snd set trace_all_ 1
- $cmt_snd trace cwnd_
- $cmt_snd trace rto_
- $cmt_snd trace errorCount_
- $cmt_snd attach $trace_ch
- }
- set cmt_rcv [new Agent/SCTP/CMT]
- $ns multihome-attach-agent $host1_core $cmt_rcv
- # MTU of 1500 = 1452 data bytes
- $cmt_rcv set mtu_ 1500
- $cmt_rcv set initialRwnd_ 65536
- $cmt_rcv set useDelayedSacks_ 1
- $cmt_rcv set useCmtDelAck_ 1
- if {$quiet == 0} {
- $cmt_rcv set debugMask_ -1
- $cmt_rcv set debugFileIndex_ 1
- }
- $ns connect $cmt_snd $cmt_rcv
- set ftp0 [new Application/FTP]
- $ftp0 attach-agent $cmt_snd
- $cmt_snd set-primary-destination $host1_if0
- }
- Test/sctp-cmt-2paths-64K-withloss instproc run {} {
- $self instvar ns ftp0
- $ns at 0.0 "$ftp0 send 1452000"
- $ns at 20.0 "$self finish"
- $ns run
- }
- Test/sctp-cmt-3paths-64K instproc init {} {
- $self instvar ns testName ftp0
- global quiet
- set testName cmt-3paths-64K
- $self next
- set host0_core [$ns node]
- set host0_if0 [$ns node]
- set host0_if1 [$ns node]
- set host0_if2 [$ns node]
- $host0_core color Red
- $host0_if0 color Red
- $host0_if1 color Red
- $host0_if2 color Red
- $ns multihome-add-interface $host0_core $host0_if0
- $ns multihome-add-interface $host0_core $host0_if1
- $ns multihome-add-interface $host0_core $host0_if2
- set host1_core [$ns node]
- set host1_if0 [$ns node]
- set host1_if1 [$ns node]
- set host1_if2 [$ns node]
- $host1_core color Blue
- $host1_if0 color Blue
- $host1_if1 color Blue
- $host1_if2 color Blue
- $ns multihome-add-interface $host1_core $host1_if0
- $ns multihome-add-interface $host1_core $host1_if1
- $ns multihome-add-interface $host1_core $host1_if2
- $ns duplex-link $host0_if0 $host1_if0 10Mb 45ms DropTail
- [[$ns link $host0_if0 $host1_if0] queue] set limit_ 50
- $ns duplex-link $host0_if1 $host1_if1 10Mb 45ms DropTail
- [[$ns link $host0_if1 $host1_if1] queue] set limit_ 50
- $ns duplex-link $host0_if2 $host1_if2 10Mb 45ms DropTail
- [[$ns link $host0_if2 $host1_if2] queue] set limit_ 50
- set cmt_snd [new Agent/SCTP/CMT]
- $ns multihome-attach-agent $host0_core $cmt_snd
- $cmt_snd set initialSsthresh_ 16000
- $cmt_snd set mtu_ 1500
- $cmt_snd set dataChunkSize_ 1468
- $cmt_snd set numOutStreams_ 1
- $cmt_snd set useCmtReordering_ 1
- $cmt_snd set useCmtCwnd_ 1
- $cmt_snd set useCmtDelAck_ 1
- $cmt_snd set eCmtRtxPolicy_ 2 ; #RTX-SSTHRESH
- if {$quiet == 0} {
- $cmt_snd set debugMask_ -1
- $cmt_snd set debugFileIndex_ 0
- set trace_ch [open trace.sctp w]
- $cmt_snd set trace_all_ 1
- $cmt_snd trace cwnd_
- $cmt_snd trace rto_
- $cmt_snd trace errorCount_
- $cmt_snd attach $trace_ch
- }
- set cmt_rcv [new Agent/SCTP/CMT]
- $ns multihome-attach-agent $host1_core $cmt_rcv
- # MTU of 1500 = 1452 data bytes
- $cmt_rcv set mtu_ 1500
- $cmt_rcv set initialRwnd_ 65536
- $cmt_rcv set useDelayedSacks_ 1
- $cmt_rcv set useCmtDelAck_ 1
- if {$quiet == 0} {
- $cmt_rcv set debugMask_ -1
- $cmt_rcv set debugFileIndex_ 1
- }
- $ns connect $cmt_snd $cmt_rcv
- set ftp0 [new Application/FTP]
- $ftp0 attach-agent $cmt_snd
- $cmt_snd set-primary-destination $host1_if0
- }
- Test/sctp-cmt-3paths-64K instproc run {} {
- $self instvar ns ftp0
- $ns at 0.0 "$ftp0 send 1452000"
- $ns at 20.0 "$self finish"
- $ns run
- }
- Test/sctp-cmt-2paths-1path-fails instproc init {} {
- $self instvar ns testName ftp0
- global quiet
- set testName cmt-2paths-1path-fails
- $self next
- set host0_core [$ns node]
- set host0_if0 [$ns node]
- set host0_if1 [$ns node]
- $host0_core color Red
- $host0_if0 color Red
- $host0_if1 color Red
- $ns multihome-add-interface $host0_core $host0_if0
- $ns multihome-add-interface $host0_core $host0_if1
- set host1_core [$ns node]
- set host1_if0 [$ns node]
- set host1_if1 [$ns node]
- $host1_core color Blue
- $host1_if0 color Blue
- $host1_if1 color Blue
- $ns multihome-add-interface $host1_core $host1_if0
- $ns multihome-add-interface $host1_core $host1_if1
- $ns duplex-link $host0_if0 $host1_if0 10Mb 45ms DropTail
- [[$ns link $host0_if0 $host1_if0] queue] set limit_ 50
- $ns duplex-link $host0_if1 $host1_if1 10Mb 45ms DropTail
- [[$ns link $host0_if1 $host1_if1] queue] set limit_ 50
- set cmt_snd [new Agent/SCTP/CMT]
- $ns multihome-attach-agent $host0_core $cmt_snd
- $cmt_snd set initialSsthresh_ 16000
- $cmt_snd set mtu_ 1500
- $cmt_snd set dataChunkSize_ 1468
- $cmt_snd set numOutStreams_ 1
- $cmt_snd set useCmtReordering_ 1
- $cmt_snd set useCmtCwnd_ 1
- $cmt_snd set useCmtDelAck_ 1
- $cmt_snd set eCmtRtxPolicy_ 2 ; #RTX-SSTHRESH
- if {$quiet == 0} {
- $cmt_snd set debugMask_ -1
- $cmt_snd set debugFileIndex_ 0
- set trace_ch [open trace.sctp w]
- $cmt_snd set trace_all_ 1
- $cmt_snd trace cwnd_
- $cmt_snd trace rto_
- $cmt_snd trace errorCount_
- $cmt_snd attach $trace_ch
- }
- set cmt_rcv [new Agent/SCTP/CMT]
- $ns multihome-attach-agent $host1_core $cmt_rcv
- # MTU of 1500 = 1452 data bytes
- $cmt_rcv set mtu_ 1500
- $cmt_rcv set initialRwnd_ 65536
- $cmt_rcv set useDelayedSacks_ 1
- $cmt_rcv set useCmtDelAck_ 1
- if {$quiet == 0} {
- $cmt_rcv set debugMask_ -1
- $cmt_rcv set debugFileIndex_ 1
- }
- $ns connect $cmt_snd $cmt_rcv
- set ftp0 [new Application/FTP]
- $ftp0 attach-agent $cmt_snd
- $cmt_snd set-primary-destination $host1_if0
- $ns rtmodel-at 10.0 down $host0_if1 $host1_if1
- }
- Test/sctp-cmt-2paths-1path-fails instproc run {} {
- $self instvar ns ftp0
- $ns at 0.0 "$ftp0 send 14520000"
- $ns at 120.0 "$self finish"
- $ns run
- }
- Test/sctp-cmt-3paths-1path-fails instproc init {} {
- $self instvar ns testName ftp0
- global quiet
- set testName cmt-3paths-1path-fails
- $self next
- set host0_core [$ns node]
- set host0_if0 [$ns node]
- set host0_if1 [$ns node]
- set host0_if2 [$ns node]
- $host0_core color Red
- $host0_if0 color Red
- $host0_if1 color Red
- $host0_if2 color Red
- $ns multihome-add-interface $host0_core $host0_if0
- $ns multihome-add-interface $host0_core $host0_if1
- $ns multihome-add-interface $host0_core $host0_if2
- set host1_core [$ns node]
- set host1_if0 [$ns node]
- set host1_if1 [$ns node]
- set host1_if2 [$ns node]
- $host1_core color Blue
- $host1_if0 color Blue
- $host1_if1 color Blue
- $host1_if2 color Blue
- $ns multihome-add-interface $host1_core $host1_if0
- $ns multihome-add-interface $host1_core $host1_if1
- $ns multihome-add-interface $host1_core $host1_if2
- $ns duplex-link $host0_if0 $host1_if0 10Mb 45ms DropTail
- [[$ns link $host0_if0 $host1_if0] queue] set limit_ 50
- $ns duplex-link $host0_if1 $host1_if1 10Mb 45ms DropTail
- [[$ns link $host0_if1 $host1_if1] queue] set limit_ 50
- $ns duplex-link $host0_if2 $host1_if2 10Mb 45ms DropTail
- [[$ns link $host0_if2 $host1_if2] queue] set limit_ 50
- set cmt_snd [new Agent/SCTP/CMT]
- $ns multihome-attach-agent $host0_core $cmt_snd
- $cmt_snd set initialSsthresh_ 16000
- $cmt_snd set mtu_ 1500
- $cmt_snd set dataChunkSize_ 1468
- $cmt_snd set numOutStreams_ 1
- $cmt_snd set useCmtReordering_ 1
- $cmt_snd set useCmtCwnd_ 1
- $cmt_snd set useCmtDelAck_ 1
- $cmt_snd set eCmtRtxPolicy_ 2 ; #RTX-SSTHRESH
- if {$quiet == 0} {
- $cmt_snd set debugMask_ -1
- $cmt_snd set debugFileIndex_ 0
- set trace_ch [open trace.sctp w]
- $cmt_snd set trace_all_ 1
- $cmt_snd trace cwnd_
- $cmt_snd trace rto_
- $cmt_snd trace errorCount_
- $cmt_snd attach $trace_ch
- }
- set cmt_rcv [new Agent/SCTP/CMT]
- $ns multihome-attach-agent $host1_core $cmt_rcv
- # MTU of 1500 = 1452 data bytes
- $cmt_rcv set mtu_ 1500
- $cmt_rcv set initialRwnd_ 65536
- $cmt_rcv set useDelayedSacks_ 1
- $cmt_rcv set useCmtDelAck_ 1
- if {$quiet == 0} {
- $cmt_rcv set debugMask_ -1
- $cmt_rcv set debugFileIndex_ 1
- }
- $ns connect $cmt_snd $cmt_rcv
- set ftp0 [new Application/FTP]
- $ftp0 attach-agent $cmt_snd
- $cmt_snd set-primary-destination $host1_if0
- $ns rtmodel-at 10.0 down $host0_if1 $host1_if1
- }
- Test/sctp-cmt-3paths-1path-fails instproc run {} {
- $self instvar ns ftp0
- $ns at 0.0 "$ftp0 send 14520000"
- $ns at 100.0 "$self finish"
- $ns run
- }
- Test/sctp-cmt-packet-loss-dest-conf instproc init {} {
- $self instvar ns testName ftp0
- global quiet
- set testName cmt-packet-loss-dest-conf
- $self next
- set host0_core [$ns node]
- set host0_if0 [$ns node]
- set host0_if1 [$ns node]
- $host0_core color Red
- $host0_if0 color Red
- $host0_if1 color Red
- $ns multihome-add-interface $host0_core $host0_if0
- $ns multihome-add-interface $host0_core $host0_if1
- set host1_core [$ns node]
- set host1_if0 [$ns node]
- set host1_if1 [$ns node]
- $host1_core color Blue
- $host1_if0 color Blue
- $host1_if1 color Blue
- $ns multihome-add-interface $host1_core $host1_if0
- $ns multihome-add-interface $host1_core $host1_if1
- $ns duplex-link $host0_if0 $host1_if0 10Mb 45ms DropTail
- [[$ns link $host0_if0 $host1_if0] queue] set limit_ 50
- $ns duplex-link $host0_if1 $host1_if1 10Mb 45ms DropTail
- [[$ns link $host0_if1 $host1_if1] queue] set limit_ 50
- set err [new ErrorModel/List]
- $err droplist {2 3}
- $ns lossmodel $err $host0_if0 $host1_if0
- set cmt_snd [new Agent/SCTP/CMT]
- $ns multihome-attach-agent $host0_core $cmt_snd
- $cmt_snd set initialSsthresh_ 16000
- $cmt_snd set mtu_ 1500
- $cmt_snd set dataChunkSize_ 1468
- $cmt_snd set numOutStreams_ 1
- $cmt_snd set useCmtReordering_ 1
- $cmt_snd set useCmtCwnd_ 1
- $cmt_snd set useCmtDelAck_ 1
- $cmt_snd set eCmtRtxPolicy_ 2 #RTX-SSTHRESH
- if {$quiet == 0} {
- $cmt_snd set debugMask_ -1
- $cmt_snd set debugFileIndex_ 0
- set trace_ch [open trace.sctp w]
- $cmt_snd set trace_all_ 1
- $cmt_snd trace cwnd_
- $cmt_snd trace rto_
- $cmt_snd trace errorCount_
- $cmt_snd attach $trace_ch
- }
- set cmt_rcv [new Agent/SCTP/CMT]
- $ns multihome-attach-agent $host1_core $cmt_rcv
- # MTU of 1500 = 1452 data bytes
- $cmt_rcv set mtu_ 1500
- $cmt_rcv set initialRwnd_ 65536
- $cmt_rcv set useDelayedSacks_ 1
- $cmt_rcv set useCmtDelAck_ 1
- if {$quiet == 0} {
- $cmt_rcv set debugMask_ -1
- $cmt_rcv set debugFileIndex_ 1
- }
- $ns connect $cmt_snd $cmt_rcv
- set ftp0 [new Application/FTP]
- $ftp0 attach-agent $cmt_snd
- $cmt_snd set-primary-destination $host1_if0
- }
- Test/sctp-cmt-packet-loss-dest-conf instproc run {} {
- $self instvar ns ftp0
- $ns at 0.0 "$ftp0 send 1452000"
- $ns at 20.0 "$self finish"
- $ns run
- }
- Test/sctp-cmt-Rtx-ssthresh instproc init {} {
- $self instvar ns testName ftp0
- global quiet
- set testName cmt-Rtx-ssthresh
- $self next
- set host0_core [$ns node]
- set host0_if0 [$ns node]
- set host0_if1 [$ns node]
- $host0_core color Red
- $host0_if0 color Red
- $host0_if1 color Red
- $ns multihome-add-interface $host0_core $host0_if0
- $ns multihome-add-interface $host0_core $host0_if1
- set host1_core [$ns node]
- set host1_if0 [$ns node]
- set host1_if1 [$ns node]
- $host1_core color Blue
- $host1_if0 color Blue
- $host1_if1 color Blue
- $ns multihome-add-interface $host1_core $host1_if0
- $ns multihome-add-interface $host1_core $host1_if1
- $ns duplex-link $host0_if0 $host1_if0 10Mb 45ms DropTail
- [[$ns link $host0_if0 $host1_if0] queue] set limit_ 50
- $ns duplex-link $host0_if1 $host1_if1 10Mb 45ms DropTail
- [[$ns link $host0_if1 $host1_if1] queue] set limit_ 50
- set err [new ErrorModel/List]
- $err droplist {5 6 7 8}
- $ns lossmodel $err $host0_if0 $host1_if0
- set cmt_snd [new Agent/SCTP/CMT]
- $ns multihome-attach-agent $host0_core $cmt_snd
- $cmt_snd set initialSsthresh_ 16000
- $cmt_snd set mtu_ 1500
- $cmt_snd set dataChunkSize_ 1468
- $cmt_snd set numOutStreams_ 1
- $cmt_snd set useCmtReordering_ 1
- $cmt_snd set useCmtCwnd_ 1
- $cmt_snd set useCmtDelAck_ 1
- $cmt_snd set eCmtRtxPolicy_ 2 #RTX-SSTHRESH
- if {$quiet == 0} {
- $cmt_snd set debugMask_ -1
- $cmt_snd set debugFileIndex_ 0
- set trace_ch [open trace.sctp w]
- $cmt_snd set trace_all_ 1
- $cmt_snd trace cwnd_
- $cmt_snd trace rto_
- $cmt_snd trace errorCount_
- $cmt_snd attach $trace_ch
- }
- set cmt_rcv [new Agent/SCTP/CMT]
- $ns multihome-attach-agent $host1_core $cmt_rcv
- # MTU of 1500 = 1452 data bytes
- $cmt_rcv set mtu_ 1500
- $cmt_rcv set initialRwnd_ 65536
- $cmt_rcv set useDelayedSacks_ 1
- $cmt_rcv set useCmtDelAck_ 1
- if {$quiet == 0} {
- $cmt_rcv set debugMask_ -1
- $cmt_rcv set debugFileIndex_ 1
- }
- $ns connect $cmt_snd $cmt_rcv
- set ftp0 [new Application/FTP]
- $ftp0 attach-agent $cmt_snd
- $cmt_snd set-primary-destination $host1_if0
- }
- Test/sctp-cmt-Rtx-ssthresh instproc run {} {
- $self instvar ns ftp0
- $ns at 0.0 "$ftp0 send 1452000"
- $ns at 20.0 "$self finish"
- $ns run
- }
- Test/sctp-cmt-Rtx-cwnd instproc init {} {
- $self instvar ns testName ftp0
- global quiet
- set testName cmt-Rtx-cwnd
- $self next
- set host0_core [$ns node]
- set host0_if0 [$ns node]
- set host0_if1 [$ns node]
- $host0_core color Red
- $host0_if0 color Red
- $host0_if1 color Red
- $ns multihome-add-interface $host0_core $host0_if0
- $ns multihome-add-interface $host0_core $host0_if1
- set host1_core [$ns node]
- set host1_if0 [$ns node]
- set host1_if1 [$ns node]
- $host1_core color Blue
- $host1_if0 color Blue
- $host1_if1 color Blue
- $ns multihome-add-interface $host1_core $host1_if0
- $ns multihome-add-interface $host1_core $host1_if1
- $ns duplex-link $host0_if0 $host1_if0 10Mb 35ms DropTail
- [[$ns link $host0_if0 $host1_if0] queue] set limit_ 50
- $ns duplex-link $host0_if1 $host1_if1 10Mb 45ms DropTail
- [[$ns link $host0_if1 $host1_if1] queue] set limit_ 50
- set err [new ErrorModel/List]
- $err droplist {30}
- $ns lossmodel $err $host0_if0 $host1_if0
- set cmt_snd [new Agent/SCTP/CMT]
- $ns multihome-attach-agent $host0_core $cmt_snd
- $cmt_snd set initialSsthresh_ 16000
- $cmt_snd set mtu_ 1500
- $cmt_snd set dataChunkSize_ 1468
- $cmt_snd set numOutStreams_ 1
- $cmt_snd set useCmtReordering_ 1
- $cmt_snd set useCmtCwnd_ 1
- $cmt_snd set useCmtDelAck_ 1
- $cmt_snd set eCmtRtxPolicy_ 4 #RTX-CWND
- if {$quiet == 0} {
- $cmt_snd set debugMask_ -1
- $cmt_snd set debugFileIndex_ 0
- set trace_ch [open trace.sctp w]
- $cmt_snd set trace_all_ 1
- $cmt_snd trace cwnd_
- $cmt_snd trace rto_
- $cmt_snd trace errorCount_
- $cmt_snd attach $trace_ch
- }
- set cmt_rcv [new Agent/SCTP/CMT]
- $ns multihome-attach-agent $host1_core $cmt_rcv
- # MTU of 1500 = 1452 data bytes
- $cmt_rcv set mtu_ 1500
- $cmt_rcv set initialRwnd_ 65536
- $cmt_rcv set useDelayedSacks_ 1
- $cmt_rcv set useCmtDelAck_ 1
- if {$quiet == 0} {
- $cmt_rcv set debugMask_ -1
- $cmt_rcv set debugFileIndex_ 1
- }
- $ns connect $cmt_snd $cmt_rcv
- set ftp0 [new Application/FTP]
- $ftp0 attach-agent $cmt_snd
- $cmt_snd set-primary-destination $host1_if0
- }
- Test/sctp-cmt-Rtx-cwnd instproc run {} {
- $self instvar ns ftp0
- $ns at 0.0 "$ftp0 send 1452000"
- $ns at 20.0 "$self finish"
- $ns run
- }
- Test/sctp-cmt-Timeout-pmr instproc init {} {
- $self instvar ns testName ftp0
- global quiet
- set testName cmt-Timeout-pmr
- $self next
- set host0_core [$ns node]
- set host0_if0 [$ns node]
- set host0_if1 [$ns node]
- $host0_core color Red
- $host0_if0 color Red
- $host0_if1 color Red
- $ns multihome-add-interface $host0_core $host0_if0
- $ns multihome-add-interface $host0_core $host0_if1
- set host1_core [$ns node]
- set host1_if0 [$ns node]
- set host1_if1 [$ns node]
- $host1_core color Blue
- $host1_if0 color Blue
- $host1_if1 color Blue
- $ns multihome-add-interface $host1_core $host1_if0
- $ns multihome-add-interface $host1_core $host1_if1
- $ns duplex-link $host0_if0 $host1_if0 10Mb 45ms DropTail
- [[$ns link $host0_if0 $host1_if0] queue] set limit_ 50
- $ns duplex-link $host0_if1 $host1_if1 10Mb 45ms DropTail
- [[$ns link $host0_if1 $host1_if1] queue] set limit_ 50
- set err [new ErrorModel/List]
- $err droplist {3 4 5 6 7 8 9 10}
- $ns lossmodel $err $host0_if0 $host1_if0
- set cmt_snd [new Agent/SCTP/CMT]
- $ns multihome-attach-agent $host0_core $cmt_snd
- $cmt_snd set initialSsthresh_ 16000
- $cmt_snd set mtu_ 1500
- $cmt_snd set dataChunkSize_ 1468
- $cmt_snd set numOutStreams_ 1
- $cmt_snd set useCmtReordering_ 1
- $cmt_snd set useCmtCwnd_ 1
- $cmt_snd set useCmtDelAck_ 1
- $cmt_snd set eCmtRtxPolicy_ 2 #RTX-SSTHRESH
- if {$quiet == 0} {
- $cmt_snd set debugMask_ -1
- $cmt_snd set debugFileIndex_ 0
- set trace_ch [open trace.sctp w]
- $cmt_snd set trace_all_ 1
- $cmt_snd trace cwnd_
- $cmt_snd trace rto_
- $cmt_snd trace errorCount_
- $cmt_snd attach $trace_ch
- }
- set cmt_rcv [new Agent/SCTP/CMT]
- $ns multihome-attach-agent $host1_core $cmt_rcv
- # MTU of 1500 = 1452 data bytes
- $cmt_rcv set mtu_ 1500
- $cmt_rcv set initialRwnd_ 65536
- $cmt_rcv set useDelayedSacks_ 1
- $cmt_rcv set useCmtDelAck_ 1
- if {$quiet == 0} {
- $cmt_rcv set debugMask_ -1
- $cmt_rcv set debugFileIndex_ 1
- }
- $ns connect $cmt_snd $cmt_rcv
- set ftp0 [new Application/FTP]
- $ftp0 attach-agent $cmt_snd
- $cmt_snd set-primary-destination $host1_if0
- }
- Test/sctp-cmt-Timeout-pmr instproc run {} {
- $self instvar ns ftp0
- $ns at 0.0 "$ftp0 send 14520000"
- $ns at 100.0 "$self finish"
- $ns run
- }
- Test/sctp-cmt-multihome2-2Timeout instproc init {} {
- $self instvar ns testName ftp0
- global quiet
- set testName cmt-multihome2-2Timeout
- $self next
- set host0_core [$ns node]
- set host0_if0 [$ns node]
- set host0_if1 [$ns node]
- $host0_core color Red
- $host0_if0 color Red
- $host0_if1 color Red
- $ns multihome-add-interface $host0_core $host0_if0
- $ns multihome-add-interface $host0_core $host0_if1
- set host1_core [$ns node]
- set host1_if0 [$ns node]
- set host1_if1 [$ns node]
- $host1_core color Blue
- $host1_if0 color Blue
- $host1_if1 color Blue
- $ns multihome-add-interface $host1_core $host1_if0
- $ns multihome-add-interface $host1_core $host1_if1
- $ns duplex-link $host0_if0 $host1_if0 .5Mb 200ms DropTail
- $ns duplex-link $host0_if1 $host1_if1 .5Mb 200ms DropTail
- set err0 [new ErrorModel/List]
- $err0 droplist {4}
- $ns lossmodel $err0 $host0_if0 $host1_if0
- set err1 [new ErrorModel/List]
- $err1 droplist {16}
- $ns lossmodel $err1 $host0_if1 $host1_if1
- set sctp0 [new Agent/SCTP/CMT]
- $ns multihome-attach-agent $host0_core $sctp0
- $sctp0 set initialSsthresh_ 16000
- $sctp0 set mtu_ 1500
- $sctp0 set dataChunkSize_ 1468
- $sctp0 set numOutStreams_ 1
- $sctp0 set useCmtReordering_ 1
- $sctp0 set useCmtCwnd_ 1
- $sctp0 set useCmtDelAck_ 1
- $sctp0 set eCmtRtxPolicy_ 2 ; #RTX-SSTHRESH
- if {$quiet == 0} {
- $sctp0 set debugMask_ -1
- $sctp0 set debugFileIndex_ 0
- set trace_ch [open trace.sctp w]
- $sctp0 set trace_all_ 1
- $sctp0 trace cwnd_
- $sctp0 trace rto_
- $sctp0 trace errorCount_
- $sctp0 attach $trace_ch
- }
- set sctp1 [new Agent/SCTP/CMT]
- $ns multihome-attach-agent $host1_core $sctp1
- # MTU of 1500 = 1452 data bytes
- $sctp1 set mtu_ 1500
- $sctp1 set initialRwnd_ 65536
- $sctp1 set useDelayedSacks_ 1
- $sctp1 set useCmtDelAck_ 1
- if {$quiet == 0} {
- $sctp1 set debugMask_ -1
- $sctp1 set debugFileIndex_ 1
- }
- $ns connect $sctp0 $sctp1
- $sctp0 set-primary-destination $host1_if0
- set ftp0 [new Application/FTP]
- $ftp0 attach-agent $sctp0
- }
- Test/sctp-cmt-multihome2-2Timeout instproc run {} {
- $self instvar ns ftp0
- $ns at 0.5 "$ftp0 start"
- $ns at 12.0 "$self finish"
- $ns run
- }
- Test/sctp-cmt-pf-2paths-1path-fails instproc init {} {
- $self instvar ns testName ftp0
- global quiet
- set testName cmt-pf-2paths-1path-fails
- $self next
- set host0_core [$ns node]
- set host0_if0 [$ns node]
- set host0_if1 [$ns node]
- $host0_core color Red
- $host0_if0 color Red
- $host0_if1 color Red
- $ns multihome-add-interface $host0_core $host0_if0
- $ns multihome-add-interface $host0_core $host0_if1
- set host1_core [$ns node]
- set host1_if0 [$ns node]
- set host1_if1 [$ns node]
- $host1_core color Blue
- $host1_if0 color Blue
- $host1_if1 color Blue
- $ns multihome-add-interface $host1_core $host1_if0
- $ns multihome-add-interface $host1_core $host1_if1
- $ns duplex-link $host0_if0 $host1_if0 10Mb 45ms DropTail
- [[$ns link $host0_if0 $host1_if0] queue] set limit_ 50
- $ns duplex-link $host0_if1 $host1_if1 10Mb 45ms DropTail
- [[$ns link $host0_if1 $host1_if1] queue] set limit_ 50
- set cmt_snd [new Agent/SCTP/CMT]
- $ns multihome-attach-agent $host0_core $cmt_snd
- $cmt_snd set initialSsthresh_ 16000
- $cmt_snd set mtu_ 1500
- $cmt_snd set dataChunkSize_ 1468
- $cmt_snd set numOutStreams_ 1
- $cmt_snd set useCmtReordering_ 1
- $cmt_snd set useCmtCwnd_ 1
- $cmt_snd set useCmtDelAck_ 1
- $cmt_snd set eCmtRtxPolicy_ 2 ; #RTX-SSTHRESH
- $cmt_snd set useCmtPF_ 1
- $cmt_snd set cmtPFCwnd 2
- if {$quiet == 0} {
- $cmt_snd set debugMask_ -1
- $cmt_snd set debugFileIndex_ 0
- set trace_ch [open trace.sctp w]
- $cmt_snd set trace_all_ 1
- $cmt_snd trace cwnd_
- $cmt_snd trace rto_
- $cmt_snd trace errorCount_
- $cmt_snd attach $trace_ch
- }
- set cmt_rcv [new Agent/SCTP/CMT]
- $ns multihome-attach-agent $host1_core $cmt_rcv
- # MTU of 1500 = 1452 data bytes
- $cmt_rcv set mtu_ 1500
- $cmt_rcv set initialRwnd_ 65536
- $cmt_rcv set useDelayedSacks_ 1
- $cmt_rcv set useCmtDelAck_ 1
- if {$quiet == 0} {
- $cmt_rcv set debugMask_ -1
- $cmt_rcv set debugFileIndex_ 1
- }
- $ns connect $cmt_snd $cmt_rcv
- set ftp0 [new Application/FTP]
- $ftp0 attach-agent $cmt_snd
- $cmt_snd set-primary-destination $host1_if0
- $ns rtmodel-at 10.0 down $host0_if1 $host1_if1
- }
- Test/sctp-cmt-pf-2paths-1path-fails instproc run {} {
- $self instvar ns ftp0
- $ns at 0.0 "$ftp0 send 14520000"
- $ns at 100.0 "$self finish"
- $ns run
- }
- Test/sctp-cmt-pf-3paths-1path-fails instproc init {} {
- $self instvar ns testName ftp0
- global quiet
- set testName cmt-pf-3paths-1path-fails
- $self next
- set host0_core [$ns node]
- set host0_if0 [$ns node]
- set host0_if1 [$ns node]
- set host0_if2 [$ns node]
- $host0_core color Red
- $host0_if0 color Red
- $host0_if1 color Red
- $host0_if2 color Red
- $ns multihome-add-interface $host0_core $host0_if0
- $ns multihome-add-interface $host0_core $host0_if1
- $ns multihome-add-interface $host0_core $host0_if2
- set host1_core [$ns node]
- set host1_if0 [$ns node]
- set host1_if1 [$ns node]
- set host1_if2 [$ns node]
- $host1_core color Blue
- $host1_if0 color Blue
- $host1_if1 color Blue
- $host1_if2 color Blue
- $ns multihome-add-interface $host1_core $host1_if0
- $ns multihome-add-interface $host1_core $host1_if1
- $ns multihome-add-interface $host1_core $host1_if2
- $ns duplex-link $host0_if0 $host1_if0 10Mb 45ms DropTail
- [[$ns link $host0_if0 $host1_if0] queue] set limit_ 50
- $ns duplex-link $host0_if1 $host1_if1 10Mb 45ms DropTail
- [[$ns link $host0_if1 $host1_if1] queue] set limit_ 50
- $ns duplex-link $host0_if2 $host1_if2 10Mb 45ms DropTail
- [[$ns link $host0_if2 $host1_if2] queue] set limit_ 50
- set cmt_snd [new Agent/SCTP/CMT]
- $ns multihome-attach-agent $host0_core $cmt_snd
- $cmt_snd set initialSsthresh_ 16000
- $cmt_snd set mtu_ 1500
- $cmt_snd set dataChunkSize_ 1468
- $cmt_snd set numOutStreams_ 1
- $cmt_snd set useCmtReordering_ 1
- $cmt_snd set useCmtCwnd_ 1
- $cmt_snd set useCmtDelAck_ 1
- $cmt_snd set eCmtRtxPolicy_ 2 ; #RTX-SSTHRESH
- $cmt_snd set useCmtPF_ 1
- $cmt_snd set cmtPFCwnd 2
- if {$quiet == 0} {
- $cmt_snd set debugMask_ -1
- $cmt_snd set debugFileIndex_ 0
- set trace_ch [open trace.sctp w]
- $cmt_snd set trace_all_ 1
- $cmt_snd trace cwnd_
- $cmt_snd trace rto_
- $cmt_snd trace errorCount_
- $cmt_snd attach $trace_ch
- }
- set cmt_rcv [new Agent/SCTP/CMT]
- $ns multihome-attach-agent $host1_core $cmt_rcv
- # MTU of 1500 = 1452 data bytes
- $cmt_rcv set mtu_ 1500
- $cmt_rcv set initialRwnd_ 65536
- $cmt_rcv set useDelayedSacks_ 1
- $cmt_rcv set useCmtDelAck_ 1
- if {$quiet == 0} {
- $cmt_rcv set debugMask_ -1
- $cmt_rcv set debugFileIndex_ 1
- }
- $ns connect $cmt_snd $cmt_rcv
- set ftp0 [new Application/FTP]
- $ftp0 attach-agent $cmt_snd
- $cmt_snd set-primary-destination $host1_if0
- $ns rtmodel-at 10.0 down $host0_if1 $host1_if1
- }
- Test/sctp-cmt-pf-3paths-1path-fails instproc run {} {
- $self instvar ns ftp0
- $ns at 0.0 "$ftp0 send 14520000"
- $ns at 100.0 "$self finish"
- $ns run
- }
- Test/sctp-cmt-pf-packet-loss-dest-conf instproc init {} {
- $self instvar ns testName ftp0
- global quiet
- set testName cmt-pf-packet-loss-dest-conf
- $self next
- set host0_core [$ns node]
- set host0_if0 [$ns node]
- set host0_if1 [$ns node]
- $host0_core color Red
- $host0_if0 color Red
- $host0_if1 color Red
- $ns multihome-add-interface $host0_core $host0_if0
- $ns multihome-add-interface $host0_core $host0_if1
- set host1_core [$ns node]
- set host1_if0 [$ns node]
- set host1_if1 [$ns node]
- $host1_core color Blue
- $host1_if0 color Blue
- $host1_if1 color Blue
- $ns multihome-add-interface $host1_core $host1_if0
- $ns multihome-add-interface $host1_core $host1_if1
- $ns duplex-link $host0_if0 $host1_if0 10Mb 45ms DropTail
- [[$ns link $host0_if0 $host1_if0] queue] set limit_ 50
- $ns duplex-link $host0_if1 $host1_if1 10Mb 45ms DropTail
- [[$ns link $host0_if1 $host1_if1] queue] set limit_ 50
- set err [new ErrorModel/List]
- $err droplist {2 3}
- $ns lossmodel $err $host0_if0 $host1_if0
- set cmt_snd [new Agent/SCTP/CMT]
- $ns multihome-attach-agent $host0_core $cmt_snd
- $cmt_snd set initialSsthresh_ 16000
- $cmt_snd set mtu_ 1500
- $cmt_snd set dataChunkSize_ 1468
- $cmt_snd set numOutStreams_ 1
- $cmt_snd set useCmtReordering_ 1
- $cmt_snd set useCmtCwnd_ 1
- $cmt_snd set useCmtDelAck_ 1
- $cmt_snd set eCmtRtxPolicy_ 2 ; #RTX-SSTHRESH
- $cmt_snd set useCmtPF_ 1
- $cmt_snd set cmtPFCwnd 2
- if {$quiet == 0} {
- $cmt_snd set debugMask_ -1
- $cmt_snd set debugFileIndex_ 0
- set trace_ch [open trace.sctp w]
- $cmt_snd set trace_all_ 1
- $cmt_snd trace cwnd_
- $cmt_snd trace rto_
- $cmt_snd trace errorCount_
- $cmt_snd attach $trace_ch
- }
- set cmt_rcv [new Agent/SCTP/CMT]
- $ns multihome-attach-agent $host1_core $cmt_rcv
- # MTU of 1500 = 1452 data bytes
- $cmt_rcv set mtu_ 1500
- $cmt_rcv set initialRwnd_ 65536
- $cmt_rcv set useDelayedSacks_ 1
- $cmt_rcv set useCmtDelAck_ 1
- if {$quiet == 0} {
- $cmt_rcv set debugMask_ -1
- $cmt_rcv set debugFileIndex_ 1
- }
- $ns connect $cmt_snd $cmt_rcv
- set ftp0 [new Application/FTP]
- $ftp0 attach-agent $cmt_snd
- $cmt_snd set-primary-destination $host1_if0
- }
- Test/sctp-cmt-pf-packet-loss-dest-conf instproc run {} {
- $self instvar ns ftp0
- $ns at 0.0 "$ftp0 send 1452000"
- $ns at 20.0 "$self finish"
- $ns run
- }
- Test/sctp-cmt-pf-Rtx-ssthresh instproc init {} {
- $self instvar ns testName ftp0
- global quiet
- set testName cmt-pf-Rtx-ssthresh
- $self next
- set host0_core [$ns node]
- set host0_if0 [$ns node]
- set host0_if1 [$ns node]
- $host0_core color Red
- $host0_if0 color Red
- $host0_if1 color Red
- $ns multihome-add-interface $host0_core $host0_if0
- $ns multihome-add-interface $host0_core $host0_if1
- set host1_core [$ns node]
- set host1_if0 [$ns node]
- set host1_if1 [$ns node]
- $host1_core color Blue
- $host1_if0 color Blue
- $host1_if1 color Blue
- $ns multihome-add-interface $host1_core $host1_if0
- $ns multihome-add-interface $host1_core $host1_if1
- $ns duplex-link $host0_if0 $host1_if0 10Mb 45ms DropTail
- [[$ns link $host0_if0 $host1_if0] queue] set limit_ 50
- $ns duplex-link $host0_if1 $host1_if1 10Mb 45ms DropTail
- [[$ns link $host0_if1 $host1_if1] queue] set limit_ 50
- set err [new ErrorModel/List]
- $err droplist {23}
- $ns lossmodel $err $host0_if0 $host1_if0
- set cmt_snd [new Agent/SCTP/CMT]
- $ns multihome-attach-agent $host0_core $cmt_snd
- $cmt_snd set initialSsthresh_ 16000
- $cmt_snd set mtu_ 1500
- $cmt_snd set dataChunkSize_ 1468
- $cmt_snd set numOutStreams_ 1
- $cmt_snd set useCmtReordering_ 1
- $cmt_snd set useCmtCwnd_ 1
- $cmt_snd set useCmtDelAck_ 1
- $cmt_snd set eCmtRtxPolicy_ 2 ; #RTX-SSTHRESH
- $cmt_snd set useCmtPF_ 1
- $cmt_snd set cmtPFCwnd 2
- if {$quiet == 0} {
- $cmt_snd set debugMask_ -1
- $cmt_snd set debugFileIndex_ 0
- set trace_ch [open trace.sctp w]
- $cmt_snd set trace_all_ 1
- $cmt_snd trace cwnd_
- $cmt_snd trace rto_
- $cmt_snd trace errorCount_
- $cmt_snd attach $trace_ch
- }
- set cmt_rcv [new Agent/SCTP/CMT]
- $ns multihome-attach-agent $host1_core $cmt_rcv
- # MTU of 1500 = 1452 data bytes
- $cmt_rcv set mtu_ 1500
- $cmt_rcv set initialRwnd_ 65536
- $cmt_rcv set useDelayedSacks_ 1
- $cmt_rcv set useCmtDelAck_ 1
- if {$quiet == 0} {
- $cmt_rcv set debugMask_ -1
- $cmt_rcv set debugFileIndex_ 1
- }
- $ns connect $cmt_snd $cmt_rcv
- set ftp0 [new Application/FTP]
- $ftp0 attach-agent $cmt_snd
- $cmt_snd set-primary-destination $host1_if0
- }
- Test/sctp-cmt-pf-Rtx-ssthresh instproc run {} {
- $self instvar ns ftp0
- $ns at 0.0 "$ftp0 send 1452000"
- $ns at 20.0 "$self finish"
- $ns run
- }
- Test/sctp-cmt-pf-Rtx-cwnd instproc init {} {
- $self instvar ns testName ftp0
- global quiet
- set testName cmt-pf-Rtx-cwnd
- $self next
- set host0_core [$ns node]
- set host0_if0 [$ns node]
- set host0_if1 [$ns node]
- $host0_core color Red
- $host0_if0 color Red
- $host0_if1 color Red
- $ns multihome-add-interface $host0_core $host0_if0
- $ns multihome-add-interface $host0_core $host0_if1
- set host1_core [$ns node]
- set host1_if0 [$ns node]
- set host1_if1 [$ns node]
- $host1_core color Blue
- $host1_if0 color Blue
- $host1_if1 color Blue
- $ns multihome-add-interface $host1_core $host1_if0
- $ns multihome-add-interface $host1_core $host1_if1
- $ns duplex-link $host0_if0 $host1_if0 10Mb 45ms DropTail
- [[$ns link $host0_if0 $host1_if0] queue] set limit_ 50
- $ns duplex-link $host0_if1 $host1_if1 10Mb 45ms DropTail
- [[$ns link $host0_if1 $host1_if1] queue] set limit_ 50
- set err [new ErrorModel/List]
- $err droplist {23}
- $ns lossmodel $err $host0_if0 $host1_if0
- set cmt_snd [new Agent/SCTP/CMT]
- $ns multihome-attach-agent $host0_core $cmt_snd
- $cmt_snd set initialSsthresh_ 16000
- $cmt_snd set mtu_ 1500
- $cmt_snd set dataChunkSize_ 1468
- $cmt_snd set numOutStreams_ 1
- $cmt_snd set useCmtReordering_ 1
- $cmt_snd set useCmtCwnd_ 1
- $cmt_snd set useCmtDelAck_ 1
- $cmt_snd set eCmtRtxPolicy_ 4 ; #RTX-CWND
- $cmt_snd set useCmtPF_ 1
- $cmt_snd set cmtPFCwnd 2
- if {$quiet == 0} {
- $cmt_snd set debugMask_ -1
- $cmt_snd set debugFileIndex_ 0
- set trace_ch [open trace.sctp w]
- $cmt_snd set trace_all_ 1
- $cmt_snd trace cwnd_
- $cmt_snd trace rto_
- $cmt_snd trace errorCount_
- $cmt_snd attach $trace_ch
- }
- set cmt_rcv [new Agent/SCTP/CMT]
- $ns multihome-attach-agent $host1_core $cmt_rcv
- # MTU of 1500 = 1452 data bytes
- $cmt_rcv set mtu_ 1500
- $cmt_rcv set initialRwnd_ 65536
- $cmt_rcv set useDelayedSacks_ 1
- $cmt_rcv set useCmtDelAck_ 1
- if {$quiet == 0} {
- $cmt_rcv set debugMask_ -1
- $cmt_rcv set debugFileIndex_ 1
- }
- $ns connect $cmt_snd $cmt_rcv
- set ftp0 [new Application/FTP]
- $ftp0 attach-agent $cmt_snd
- $cmt_snd set-primary-destination $host1_if0
- }
- Test/sctp-cmt-pf-Rtx-cwnd instproc run {} {
- $self instvar ns ftp0
- $ns at 0.0 "$ftp0 send 1452000"
- $ns at 20.0 "$self finish"
- $ns run
- }
- Test/sctp-cmt-pf-Timeout-pmr instproc init {} {
- $self instvar ns testName ftp0
- global quiet
- set testName cmt-pf-Timeout-pmr
- $self next
- set host0_core [$ns node]
- set host0_if0 [$ns node]
- set host0_if1 [$ns node]
- $host0_core color Red
- $host0_if0 color Red
- $host0_if1 color Red
- $ns multihome-add-interface $host0_core $host0_if0
- $ns multihome-add-interface $host0_core $host0_if1
- set host1_core [$ns node]
- set host1_if0 [$ns node]
- set host1_if1 [$ns node]
- $host1_core color Blue
- $host1_if0 color Blue
- $host1_if1 color Blue
- $ns multihome-add-interface $host1_core $host1_if0
- $ns multihome-add-interface $host1_core $host1_if1
- $ns duplex-link $host0_if0 $host1_if0 10Mb 35ms DropTail
- [[$ns link $host0_if0 $host1_if0] queue] set limit_ 50
- $ns duplex-link $host0_if1 $host1_if1 10Mb 45ms DropTail
- [[$ns link $host0_if1 $host1_if1] queue] set limit_ 50
- set err [new ErrorModel/List]
- $err droplist {3 4 5 6 7 8 9}
- $ns lossmodel $err $host0_if0 $host1_if0
- set cmt_snd [new Agent/SCTP/CMT]
- $ns multihome-attach-agent $host0_core $cmt_snd
- $cmt_snd set initialSsthresh_ 16000
- $cmt_snd set mtu_ 1500
- $cmt_snd set dataChunkSize_ 1468
- $cmt_snd set numOutStreams_ 1
- $cmt_snd set useCmtReordering_ 1
- $cmt_snd set useCmtCwnd_ 1
- $cmt_snd set useCmtDelAck_ 1
- $cmt_snd set eCmtRtxPolicy_ 2 #RTX-SSTHRESH
- $cmt_snd set useCmtPF_ 1
- $cmt_snd set cmtPFCwnd 2
- if {$quiet == 0} {
- $cmt_snd set debugMask_ -1
- $cmt_snd set debugFileIndex_ 0
- set trace_ch [open trace.sctp w]
- $cmt_snd set trace_all_ 1
- $cmt_snd trace cwnd_
- $cmt_snd trace rto_
- $cmt_snd trace errorCount_
- $cmt_snd attach $trace_ch
- }
- set cmt_rcv [new Agent/SCTP/CMT]
- $ns multihome-attach-agent $host1_core $cmt_rcv
- # MTU of 1500 = 1452 data bytes
- $cmt_rcv set mtu_ 1500
- $cmt_rcv set initialRwnd_ 65536
- $cmt_rcv set useDelayedSacks_ 1
- $cmt_rcv set useCmtDelAck_ 1
- if {$quiet == 0} {
- $cmt_rcv set debugMask_ -1
- $cmt_rcv set debugFileIndex_ 1
- }
- $ns connect $cmt_snd $cmt_rcv
- set ftp0 [new Application/FTP]
- $ftp0 attach-agent $cmt_snd
- $cmt_snd set-primary-destination $host1_if0
- }
- Test/sctp-cmt-pf-Timeout-pmr instproc run {} {
- $self instvar ns ftp0
- $ns at 0.0 "$ftp0 send 58080000"
- $ns at 100.0 "$self finish"
- $ns run
- }
- proc runtest {arg} {
- global quiet
- set quiet 0
- set b [llength $arg]
- if {$b == 1} {
- set test $arg
- } elseif {$b == 2} {
- set test [lindex $arg 0]
- set q [lindex $arg 1]
- if { $q == "QUIET" } {
- set quiet 1
- } else { usage }
- } else { usage }
- switch $test {
- sctp-2packetsTimeout -
- sctp-AMR-Exceeded -
- sctp-Rel1-Loss2 -
- sctp-burstAfterFastRtxRecovery -
- sctp-burstAfterFastRtxRecovery-2 -
- sctp-cwndFreeze -
- sctp-cwndFreeze-multistream -
- sctp-hugeRwnd -
- sctp-initRtx -
- sctp-multihome1-2 -
- sctp-multihome2-1 -
- sctp-multihome2-2AMR-Exceeded -
- sctp-multihome2-2Failover -
- sctp-multihome2-2Failover0 -
- sctp-multihome2-2Failover1 -
- sctp-multihome2-2Rtx1 -
- sctp-multihome2-2Rtx3 -
- sctp-multihome2-2Timeout -
- sctp-multihome2-2TimeoutRta0 -
- sctp-multihome2-2TimeoutRta2 -
- sctp-multihome2-R-2 -
- sctp-multihome3-3Timeout -
- sctp-multipleDropsSameWnd-1 -
- sctp-multipleDropsSameWnd-1-delayed -
- sctp-multipleDropsSameWnd-2 -
- sctp-multipleDropsSameWnd-3 -
- sctp-multipleDropsTwoWnds-1-delayed -
- sctp-multipleRtx -
- sctp-multipleRtx-early -
- sctp-newReno -
- sctp-noEarlyHBs -
- sctp-smallRwnd -
- sctp-zeroRtx -
- sctp-zeroRtx-burstLoss -
- sctp-hbAfterRto-2packetsTimeout -
- sctp-hbAfterRto-multihome2-2Timeout -
- sctp-multipleFastRtx-2packetsTimeout -
- sctp-multipleFastRtx-multihome2-2Timeout -
- sctp-mfrHbAfterRto-Rta2-2FRsTimeout -
- sctp-timestamp-multihome2-2Rtx3 -
- sctp-timestamp-multihome2-2Timeout -
- sctp-packet-loss-dest-conf -
- sctp-cmt-2paths-64K -
- sctp-cmt-2paths-64K-withloss -
- sctp-cmt-3paths-64K -
- sctp-cmt-2paths-1path-fails -
- sctp-cmt-3paths-1path-fails -
- sctp-cmt-packet-loss-dest-conf -
- sctp-cmt-Rtx-ssthresh -
- sctp-cmt-Rtx-cwnd -
- sctp-cmt-Timeout-pmr -
- sctp-cmt-multihome2-2Timeout -
- sctp-cmt-pf-2paths-1path-fails -
- sctp-cmt-pf-3paths-1path-fails -
- sctp-cmt-pf-packet-loss-dest-conf -
- sctp-cmt-pf-Rtx-ssthresh -
- sctp-cmt-pf-Rtx-cwnd -
- sctp-cmt-pf-Timeout-pmr {
- set t [new Test/$test]
- }
- default {
- puts stderr "Unknown test $test"
- exit 1
- }
- }
- $t run
- }
- global argv arg0
- runtest $argv