test-suite-sctp.tcl
来自「一款用来进行网络模拟的软件」· TCL 代码 · 共 2,235 行 · 第 1/5 页
TCL
2,235 行
# Copyright (c) 2006-2007 by the Protocol Engineering Lab, U of Delaware# All rights reserved.## Protocol Engineering Lab web page : http://pel.cis.udel.edu/## Paul D. Amer <amer@@cis,udel,edu># Armando L. Caro Jr. <acaro@@cis,udel,edu># Janardhan Iyengar <iyengar@@cis,udel,edu># Preethi Natarajan <nataraja@@cis,udel,edu># Nasif Ekiz <nekiz@@cis,udel,edu>## Redistribution and use in source and binary forms, with or without# modification, are permitted provided that the following conditions# are met:## 1. Redistributions of source code must retain the above copyright# notice, this list of conditions and the following disclaimer.## 2. Redistributions in binary form must reproduce the above copyright# notice, this list of conditions and the following disclaimer in the# documentation and/or other materials provided with the distribution.## 3. Neither the name of the University nor of the Laboratory may be used# to endorse or promote products derived from this software without# specific prior written permission.## THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE# ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF# SUCH DAMAGE.#### To run all of the tests in this file: ./test-all-sctp## To run an individual test:# ns test-suite-sctp.tcl sctp-2packetsTimeout# ns test-suite-sctp.tcl sctp-AMR-Exceeded# ns test-suite-sctp.tcl sctp-Rel1-Loss2 # ns test-suite-sctp.tcl sctp-burstAfterFastRtxRecovery # ns test-suite-sctp.tcl sctp-burstAfterFastRtxRecovery-2 # ns test-suite-sctp.tcl sctp-cwndFreeze # ns test-suite-sctp.tcl sctp-cwndFreeze-multistream # ns test-suite-sctp.tcl sctp-hugeRwnd # ns test-suite-sctp.tcl sctp-initRtx # ns test-suite-sctp.tcl sctp-multihome1-2 # ns test-suite-sctp.tcl sctp-multihome2-1# ns test-suite-sctp.tcl sctp-multihome2-2AMR-Exceeded# ns test-suite-sctp.tcl sctp-multihome2-2Failover # ns test-suite-sctp.tcl sctp-multihome2-2Failover0# ns test-suite-sctp.tcl sctp-multihome2-2Failover1# ns test-suite-sctp.tcl sctp-multihome2-2Rtx1 # ns test-suite-sctp.tcl sctp-multihome2-2Rtx3 # ns test-suite-sctp.tcl sctp-multihome2-2Timeout# ns test-suite-sctp.tcl sctp-multihome2-2TimeoutRta0# ns test-suite-sctp.tcl sctp-multihome2-2TimeoutRta2# ns test-suite-sctp.tcl sctp-multihome2-R-2# ns test-suite-sctp.tcl sctp-multihome3-3Timeout# ns test-suite-sctp.tcl sctp-multipleDropsSameWnd-1 # ns test-suite-sctp.tcl sctp-multipleDropsSameWnd-1-delayed # ns test-suite-sctp.tcl sctp-multipleDropsSameWnd-2 # ns test-suite-sctp.tcl sctp-multipleDropsSameWnd-3 # ns test-suite-sctp.tcl sctp-multipleDropsTwoWnds-1-delayed # ns test-suite-sctp.tcl sctp-multipleRtx # ns test-suite-sctp.tcl sctp-multipleRtx-early # ns test-suite-sctp.tcl sctp-newReno# ns test-suite-sctp.tcl sctp-noEarlyHBs# ns test-suite-sctp.tcl sctp-smallRwnd # ns test-suite-sctp.tcl sctp-zeroRtx # ns test-suite-sctp.tcl sctp-zeroRtx-burstLoss ## ns test-suite-sctp.tcl sctp-hbAfterRto-2packetsTimeout# ns test-suite-sctp.tcl sctp-hbAfterRto-multihome2-2Timeout## ns test-suite-sctp.tcl sctp-multipleFastRtx-2packetsTimeout# ns test-suite-sctp.tcl sctp-multipleFastRtx-multihome2-2Timeout## ns test-suite-sctp.tcl sctp-mfrHbAfterRto-Rta2-2FRsTimeout## ns test-suite-sctp.tcl sctp-timestamp-multihome2-2Rtx3# ns test-suite-sctp.tcl sctp-timestamp-multihome2-2Timeout## ns test-suite-sctp.tcl sctp-packet-loss-dest-conf# # ns test-suite-sctp.tcl sctp-cmt-2paths-64K# ns test-suite-sctp.tcl sctp-cmt-2paths-64K-withloss# ns test-suite-sctp.tcl sctp-cmt-3paths-64K# ns test-suite-sctp.tcl sctp-cmt-2paths-1path-fails# ns test-suite-sctp.tcl sctp-cmt-3paths-1path-fails# ns test-suite-sctp.tcl sctp-cmt-packet-loss-dest-conf# ns test-suite-sctp.tcl sctp-cmt-Rtx-ssthresh# ns test-suite-sctp.tcl sctp-cmt-Rtx-cwnd# ns test-suite-sctp.tcl sctp-cmt-Timeout-pmr# ns test-suite-sctp.tcl sctp-cmt-multihome2-2Timeout# ns test-suite-sctp.tcl sctp-cmt-pf-2paths-1path-fails# ns test-suite-sctp.tcl sctp-cmt-pf-3paths-1path-fails# ns test-suite-sctp.tcl sctp-cmt-pf-packet-loss-dest-conf# ns test-suite-sctp.tcl sctp-cmt-pf-Rtx-ssthresh# ns test-suite-sctp.tcl sctp-cmt-pf-Rtx-cwnd# ns test-suite-sctp.tcl sctp-cmt-pf-Timeout-pmr Class TestSuite# 2 packets get dropped and their fast rtx gets lost too.... forcing them# to timeout.Class Test/sctp-2packetsTimeout -superclass TestSuite# This script tests that the appropriate action is taken when the # Association.Max.Retrans exceeded... abruptly close the association!Class Test/sctp-AMR-Exceeded -superclass TestSuite# tests unreliable stream with k-rtx value of 1 with 2 losses of same chunk.Class Test/sctp-Rel1-Loss2 -superclass TestSuite# This tests the Max.Burst feature added in the SCTP implementors# guide draft v4. This script carefully choose a small receiver window# and drops a specific packet to generate the scenario where the# receiver has a full window and is waiting on the rtx of an earlier# lost chunk. Once the sender fast retransmits the chunk and the# receiver receives it, the entire receiver window is free'd up and# now the sender has plenty of room to send. This WOULD create a# burst, but Max.Burst limits the burst in this scenario.Class Test/sctp-burstAfterFastRtxRecovery -superclass TestSuite# This tests the Max.Burst feature added in the SCTP implementors# guide draft v4. This script carefully choose a small receiver window# and drops a specific packet to generate the scenario where the# receiver has a full window and is waiting on the rtx of an earlier# lost chunk. Once the sender fast retransmits the chunk and the# receiver receives it, the entire receiver window is free'd up and# now the sender has plenty of room to send. This WOULD create a# burst, but Max.Burst limits the burst in this scenario. Class Test/sctp-burstAfterFastRtxRecovery-2 -superclass TestSuite# The SCTP implementor's guide clarifies a point in the congestion# control algorithm which allows PTMU-1 bytes over cwnd in# flight. This script tests that it is done properly and that cwnd# does NOT freeze.Class Test/sctp-cwndFreeze -superclass TestSuite# The SCTP implementor's guide clarifies a point in the congestion control# algorithm which allows PTMU-1 bytes over cwnd in flight. This script# tests that it is done properly (with multistreams) and that cwnd does# NOT freeze.Class Test/sctp-cwndFreeze-multistream -superclass TestSuite# This script tests for proper behavior when using a huge rwnd and mtu# size chunks.Class Test/sctp-hugeRwnd -superclass TestSuite# tests that it recovers from losing an INIT chunkClass Test/sctp-initRtx -superclass TestSuite# Demonstrates multihoming. One endpoint is single homed while the# other is multihomed. Shows that the 2 can be combined. The sender is# multihomed.Class Test/sctp-multihome1-2 -superclass TestSuite# Demonstrates multihoming. One endpoint is single homed while the other is# multihomed. Shows that the 2 can be combined. The receiver is multihomed.Class Test/sctp-multihome2-1 -superclass TestSuite# This script tests that the appropriate action is taken when the association# is multihomed and Association.Max.Retrans exceeded... abruptly close the # association!Class Test/sctp-multihome2-2AMR-Exceeded -superclass TestSuite# Demonstrates a failover with multihoming (using a heartbeat timer per# dest). Two endpoints with 2 interfaces with direct connections between# each pair. Eventually in the primary becomes active again and all# traffic moves back to the primary.Class Test/sctp-multihome2-2Failover -superclass TestSuite# Demonstrates a failover with multihoming, but this example has# heartbeating turned off. Two endpoints with 2 interfaces with direct# connections between each pair. Eventually in the primary becomes active# again, but since heartbeating is turned off, traffic never moves back to# the primary.Class Test/sctp-multihome2-2Failover0 -superclass TestSuite# Demonstrates a failover with multihoming (using one heartbeat timer for# all dests). Two endpoints with 2 interfaces with direct connections# between each pair. Eventually in the primary becomes active again and# all traffic moves back to the primary.Class Test/sctp-multihome2-2Failover1 -superclass TestSuite# Demonstrates retransmissions with multihoming. Two endpoints with 2# interfaces with direct connections between each pair. A packet gets# dropped and later gets retransmitted on an alternate path.Class Test/sctp-multihome2-2Rtx1 -superclass TestSuite# Demonstrates retransmissions with multihoming. Two endpoints with 2# interfaces with direct connections between each pair. 3 packets get# dropped and later get retransmitted on an alternate path.Class Test/sctp-multihome2-2Rtx3 -superclass TestSuite# Demonstrates retransmissions with multihoming. Two endpoints with 2# interfaces with direct connections between each pair. A packet gets# dropped and fast rtx'd on the alternate path. The retransmit gets# lost and times out, causing yet another retransmission.Class Test/sctp-multihome2-2Timeout -superclass TestSuite# Demonstrates experimental retransmission policies (Rta0 = retransmit on# the same path) with multihoming. Two endpoints with 2 interfaces with# direct connections between each pair. A packet gets dropped and fast# rtx'd on the same path. The retransmit gets lost and times out, causing# yet another retransmission on the same path.Class Test/sctp-multihome2-2TimeoutRta0 -superclass TestSuite# Demonstrates experimental retransmission policies (Rta1 = fast rtx on# the same path and timeout rtx on the alternate path) with# multihoming. Two endpoints with 2 interfaces with direct connections# between each pair. A packet gets dropped and fast rtx'd on the same# path. The retransmit gets lost and times out, causing yet another# retransmission on the alternate path.Class Test/sctp-multihome2-2TimeoutRta2 -superclass TestSuite# Demonstrates multihoming. Two endpoints with 2 interfaces each all# connected via a router. In the middle of the association, a change# primary is done.Class Test/sctp-multihome2-R-2 -superclass TestSuite# Demonstrates retransmissions with multihoming. Two endpoints with 3# interfaces with direct connections between each pair. A packet gets dropped # and fast rtx'd on the alternate path. The retransmit gets lost and times out,# causing a retransmission on the the third althernate path.Class Test/sctp-multihome3-3Timeout -superclass TestSuite# One burst loss and one individual loss in same window (without delayed sacks).Class Test/sctp-multipleDropsSameWnd-1 -superclass TestSuite# One burst loss and one individual loss in same window (with delayed sacks).Class Test/sctp-multipleDropsSameWnd-1-delayed -superclass TestSuite# Burst loss in same window.Class Test/sctp-multipleDropsSameWnd-2 -superclass TestSuite# Two independent burst losses in same window.Class Test/sctp-multipleDropsSameWnd-3 -superclass TestSuite# One continuous burst loss.Class Test/sctp-multipleDropsTwoWnds-1-delayed -superclass TestSuite# This test drops TSN 15 (ns pkt 16) and the Fast Rtx of the same# (ns pkt 35). According to the proposed Section 7.2.4.5, Fast Rtx# happens only once for any TSN. This graph illustrates this point -# if Fast Rtx is enabled after the timeout rtx of the TSN, it can be# clearly seen that there WILL be a false Fast Rtx for the TSN.Class Test/sctp-multipleRtx -superclass TestSuite# This test drops TSN 3 (ns pkt 4) and the Fast Rtx of the same (ns# pkt 11). According to the proposed Section 7.2.4.5, Fast Rtx# happens only once for any TSN. This graph illustrates this point -# if Fast Rtx is enabled after the timeout rtx of the TSN, it can be# clearly seen that there WILL be a false Fast Rtx for the TSN. (Note:# this script is basically the same as multipleRtx.tcl, except here we# are testing the same condition when it happens early in the# connection.)Class Test/sctp-multipleRtx-early -superclass TestSuite# Test NewReno changes (fast recovery & HTNA algorithm) in impguide-08Class Test/sctp-newReno -superclass TestSuite# test that HEARTBEATs don't start until the association is establishedClass Test/sctp-noEarlyHBs -superclass TestSuite# This script tests for proper behavior when using a small rwnd and# medium size chunks.Class Test/sctp-smallRwnd -superclass TestSuite# tests unreliable stream with k-rtx value of 0 with one loss.Class Test/sctp-zeroRtx -superclass TestSuite# test unreliable stream with k-rtx value of 0 with a burst loss.Class Test/sctp-zeroRtx-burstLoss -superclass TestSuite# Test HbAfterRto extension. 2 packets get dropped and their fast rtx gets# lost too.... forcing them to timeout.Class Test/sctp-hbAfterRto-2packetsTimeout -superclass TestSuite# Test HbAfterRto extension. Demonstrates retransmissions with# multihoming. Two endpoints with 2 interfaces with direct connections# between each pair. A packet gets dropped and fast rtx'd on the alternate# path. The retransmit gets lost and times out, causing a retransmission# on the original path (primary).Class Test/sctp-hbAfterRto-multihome2-2Timeout -superclass TestSuite# Test MultipleFastRtx extension. 2 packets get dropped and their fast rtx gets# lost too.... NORMALLY forcing them to timeout, but with this extension# they are fast rtx'd again.Class Test/sctp-multipleFastRtx-2packetsTimeout -superclass TestSuite# Test MultipleFastRtx extension. Demonstrates retransmissions with# multihoming. Two endpoints with 2 interfaces with direct connections# between each pair. A packet gets dropped and fast rtx'd on the alternate# path. The retransmit gets lost and fast rtx'd again (instead of# timeout!) on the original path (primary).Class Test/sctp-multipleFastRtx-multihome2-2Timeout -superclass TestSuite# Test MfrHbAfterRto extension with RTA=2. Two endpoints with 2 interfaces# with direct connections between each pair. A packet gets dropped and# fast rtx'd on the same path. The rtx gets lost, and the packet is fast rtx'd# again. Then all packets on primary are lost, so a timeout occurs and the same# packet gets retransmitted on alternate path.Class Test/sctp-mfrHbAfterRto-Rta2-2FRsTimeout -superclass TestSuite# Test Timestamp extension. Demonstrates retransmissions with timestamps# and multihoming. Two endpoints with 2 interfaces with direct connections# between each pair. 3 packets get dropped and later get retransmitted on# an alternate path.Class Test/sctp-timestamp-multihome2-2Rtx3 -superclass TestSuite# Test Timestamp extension. Demonstrates retransmissions with# multihoming. Two endpoints with 2 interfaces with direct connections# between each pair. A packet gets dropped and fast rtx'd on the alternate# path. The retransmit gets lost and times out, causing a retransmission# on the original path (primary).Class Test/sctp-timestamp-multihome2-2Timeout -superclass TestSuite# Demonstrates SCTP destination confirmation.# There are two endpoints with 3 interfaces each. Two of the heartbeats used # for destination confirmation are lost, which delays the start of data # transfer. Data transfer does not start until all the destinations are # confirmed. Class Test/sctp-packet-loss-dest-conf -superclass TestSuite# Demonstrates Concurrent Multipath Transfer (CMT) using multihoming. # Two endpoints with 2 interfaces with direct connections between each pair.Class Test/sctp-cmt-2paths-64K -superclass TestSuite# Demonstrates Concurrent Multipath Transfer (CMT) using multihoming. # Two endpoints with 2 interfaces with direct connections between each pair.# Loss introduced on Path0, and delay of Path0 different from Path1.Class Test/sctp-cmt-2paths-64K-withloss -superclass TestSuite# Demonstrates Concurrent Multipath Transfer (CMT) using multihoming. # Two endpoints with 3 interfaces with direct connections between each pair.Class Test/sctp-cmt-3paths-64K -superclass TestSuite# Demonstrates Concurrent Multipath Transfer (CMT) using multihoming. # There are two endpoints with 2 interfaces each. One of the independent paths# between end points becomes inactive(goes down) during the transfer. The # transfer is completed using the other path.Class Test/sctp-cmt-2paths-1path-fails -superclass TestSuite# Demonstrates Concurrent Multipath Transfer (CMT) using multihoming. # There are two endpoints with 3 interfaces each. One of the independent paths# between end points becomes inactive(goes down) during the transfer. The # transfer is completed using the other paths.Class Test/sctp-cmt-3paths-1path-fails -superclass TestSuite# Demonstrates Concurrent Multipath Transfer (CMT) destination confirmation.# There are two endpoints with 2 interfaces. Two of the heartbeats used for # destination confirmation are lost, which delays the start of data transfer.# Data transfer does not start until all the destinations are confirmed. Class Test/sctp-cmt-packet-loss-dest-conf -superclass TestSuite# Demonstrates Concurrent Multipath Transfer (CMT) using multihoming and # RTX_SSTHRESH retransmission policy. There are two endpoints with 2 # interfaces each. Four consecutive data packets from the first interface are # dropped to cause a Timeout. Retransmissions are sent to the destination with# the highest ssthresh value.Class Test/sctp-cmt-Rtx-ssthresh -superclass TestSuite# Demonstrates Concurrent Multipath Transfer (CMT) using multihoming and # RTX_CWND retransmission policy. There are two endpoints with 2 interfaces # each. A random packet is lost to force fast rtx. of the packet. The rtx. is # sent to the destination with the highest cwnd value.Class Test/sctp-cmt-Rtx-cwnd -superclass TestSuite# Demonstrates Concurrent Multipath Transfer (CMT) using multihoming.# There are two endpoints with 2 interfaces each. A number of packets are lost# from one of the destinations to get PMR+1 consecutive timeouts. These # timeouts change the status of the destination to INACTIVE. The data transfer# continues to the remaining active destination. When INACTIVE destination # becomes ACTIVE, data packets can be send to the all the destinations again. Class Test/sctp-cmt-Timeout-pmr -superclass TestSuite# Demonstrates a Timeout with multihoming for Concurrent Multipath # Transfer (CMT). There are two endpoints with 2 interfaces with direct # connections between each pair. A packet gets dropped and fast rtx. # The rtx. gets lost and times out, causing yet another retransmission.Class Test/sctp-cmt-multihome2-2Timeout -superclass TestSuite# Demonstrates Concurrent Multipath Transfer with Potentially Failed (CMT-PF) # using multihoming. There are two endpoints with 2 interfaces each. One of # the independent paths between hosts becomes inactive(goes down) during the # transfer. On the first Timeout on the failed path, data is no longer # transferred along the failed destination. The transfer is completed using # the other path.Class Test/sctp-cmt-pf-2paths-1path-fails -superclass TestSuite# Demonstrates Concurrent Multipath Transfer with Potentially Failed (CMT-PF)# using multihoming. There are two endpoints with 3 interfaces each. One of # the independent paths between hosts becomes inactive(goes down) during the # transfer. On the first Timeout on the failed destination, data is no longer # transferred along the failed path. The transfer is completed using the other# paths.Class Test/sctp-cmt-pf-3paths-1path-fails -superclass TestSuite# Demonstrates Concurrent Multipath Transfer with Potentially Failed (CMT-PF) # destination confirmation. There are two endpoints with 2 interfaces each. # Two of the heartbeats used for destination confirmation are lost, which # delays the start of data transfer. Data transfer does not start until all # the destinations are confirmed. Class Test/sctp-cmt-pf-packet-loss-dest-conf -superclass TestSuite# Demonstrates Concurrent Multipath Transfer with Potentially Failed (CMT-PF) # using multihoming and RTX_SSTHRESH retransmission policy.# There are two endpoints with 2 interfaces each. A random packet is lost# and its fast rtx. is sent to the destination with the highest ssthresh value.Class Test/sctp-cmt-pf-Rtx-ssthresh -superclass TestSuite# Demonstrates Concurrent Multipath Transfer with Potentially Failed (CMT-PF) # using multihoming and RTX_CWND retransmission policy.# There are two endpoints with 2 interfaces each. A random packet is lost# and its fast rtx. is sent to the destination with the highest cwnd value.Class Test/sctp-cmt-pf-Rtx-cwnd -superclass TestSuite# Demonstrates Concurrent Multipath Transfer with Potentially Failed (CMT-PF) # using multihoming. There are two endpoints with 2 interfaces. A number of # packets are lost from one of the destinations to get PMR+1 consecutive # timeouts. These timeouts change the status of the destination to INACTIVE. # The data transfer continues to the remaining active destination. When # INACTIVE destination becomes ACTIVE, data packets can be send to the all # the destinations again. Class Test/sctp-cmt-pf-Timeout-pmr -superclass TestSuiteproc usage {} { global argv0 puts stderr "usage: ns $argv0 <test> " exit 1}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?