# * --------------------------------------------------------------------------
# *
# *     //====//  //===== <===//===>  //====//
# *    //        //          //      //    //    SCTP Optimization Project
# *   //=====   //          //      //====//   ==============================
# *        //  //          //      //           University of Duisburg-Essen
# *  =====//  //=====     //      //
# *
# * --------------------------------------------------------------------------
# *
# *   Copyright (C) 2009-2015 by Thomas Dreibholz
# *
# *   This program is free software: you can redistribute it and/or modify
# *   it under the terms of the GNU General Public License as published by
# *   the Free Software Foundation, either version 3 of the License, or
# *   (at your option) any later version.
# *
# *   This program is distributed in the hope that it will be useful,
# *   but WITHOUT ANY WARRANTY; without even the implied warranty of
# *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# *   GNU General Public License for more details.
# *
# *   You should have received a copy of the GNU General Public License
# *   along with this program.  If not, see <http://www.gnu.org/licenses/>.
# *
# *   Contact: dreibh@iem.uni-due.de

[General]
network             = testNetwork
rng-class           = cMersenneTwister
seed-0-mt           = 1
output-scalar-file  = scalars.sca
output-vector-file  = vectors.vec
sim-time-limit      = 0s 3600s 1ms
simtime-scale       = -8   # 10ns time scale

cmdenv-express-mode = yes     # *** Enable debugging messages here! ***
**.testing          = false   # *** Enable debugging messages here! ***
**.checkQueues      = false   # *** Enable checkOutstandingBytes() calls here! ***

testNetwork.**.vector-recording           = no
testNetwork.**.vector-recording-intervals = 0s..0s 3600s


# ===== General Scenario Settings ======================
testNetwork.systems = 5

# ===== Network QoS Settings ===========================
testNetwork.westernCoreRouter.ppp[0].ppp.mtu             = 1500 B
testNetwork.westernCoreRouter.ppp[0].queueType           = "inet.examples.inet.netperfmeter.REDQueue"
testNetwork.westernCoreRouter.ppp[0].queue.red.wq        = 0.002
testNetwork.westernCoreRouter.ppp[0].queue.red.minth     = 30
testNetwork.westernCoreRouter.ppp[0].queue.red.maxth     = 90
testNetwork.westernCoreRouter.ppp[0].queue.red.maxp      = 0.1
testNetwork.westernCoreRouter.ppp[0].queue.red.pkrate    = 8333.333
testNetwork.westernCoreRouter.ppp[0].queue.frameCapacity = 100
testNetwork.westernCoreRouter.pppg$o[0].channel.datarate = 1e+07 bps
testNetwork.westernCoreRouter.pppg$o[0].channel.delay    = 10 ms
testNetwork.westernCoreRouter.pppg$o[0].channel.per      = 0
testNetwork.westernCoreRouter.pppg$o[0].channel.ber      = 0
testNetwork.easternCoreRouter.ppp[0].ppp.mtu             = 1500 B
testNetwork.easternCoreRouter.ppp[0].queueType           = "inet.examples.inet.netperfmeter.REDQueue"
testNetwork.easternCoreRouter.ppp[0].queue.red.wq        = 0.002
testNetwork.easternCoreRouter.ppp[0].queue.red.minth     = 30
testNetwork.easternCoreRouter.ppp[0].queue.red.maxth     = 90
testNetwork.easternCoreRouter.ppp[0].queue.red.maxp      = 0.1
testNetwork.easternCoreRouter.ppp[0].queue.red.pkrate    = 8333.333
testNetwork.easternCoreRouter.ppp[0].queue.frameCapacity = 100
testNetwork.easternCoreRouter.pppg$o[0].channel.datarate = 1e+07 bps
testNetwork.easternCoreRouter.pppg$o[0].channel.delay    = 10 ms
testNetwork.easternCoreRouter.pppg$o[0].channel.per      = 0
testNetwork.easternCoreRouter.pppg$o[0].channel.ber      = 0

# ----- Common Settings --------------------------------
testNetwork.*.ppp[*].ppp.mtu = 1500 B

# ===== Application Parameters ===========================
# ----- NetPerfMeter Active Node--------------------------
testNetwork.client*[*].netPerfMeterApp[*].activeMode      = true
testNetwork.client*[*].netPerfMeterApp[*].connectTime     = 0.001 s
testNetwork.client*[*].netPerfMeterApp[*].startTime       = uniform(0.9s,1.1s)
testNetwork.client*[*].netPerfMeterApp[*].resetTime       = 19 s
testNetwork.client*[*].netPerfMeterApp[*].stopTime        = 60 s
testNetwork.client*[*].netPerfMeterApp[*].queueSize       = 5e+06 B
testNetwork.client*[*].netPerfMeterApp[*].unordered       = 1
testNetwork.client*[*].netPerfMeterApp[*].unreliable      = 0
testNetwork.client*[*].netPerfMeterApp[*].outboundStreams = 1
testNetwork.client*[*].netPerfMeterApp[*].maxMsgSize      = 1452 B
testNetwork.client*[*].netPerfMeterApp[*].frameRate       = 0 Hz
testNetwork.client*[*].netPerfMeterApp[*].frameSize       = 1452 B
testNetwork.client*[*].netPerfMeterApp[*].frameRateString = ""
testNetwork.client*[*].netPerfMeterApp[*].frameSizeString = ""
testNetwork.client*[*].netPerfMeterApp[*].onTime          = -1s
testNetwork.client*[*].netPerfMeterApp[*].offTime         = -1s
testNetwork.client*[*].netPerfMeterApp[*].maxReconnects   = 0
testNetwork.client*[*].numPcapRecorders                   = 1   # *** Enable pcap dump here! ***
testNetwork.client*[*].pcapRecorder[0].pcapFile           = ${N1=fullPath()}+".pcap"

# ----- NetPerfMeter Passive Node ------------------------
testNetwork.server*[*].netPerfMeterApp[*].activeMode        = false
testNetwork.server*[*].netPerfMeterApp[*].connectTime       = 0.001 s
testNetwork.server*[*].netPerfMeterApp[*].startTime         = uniform(0.9s,1.1s)
testNetwork.server*[*].netPerfMeterApp[*].resetTime         = 19 s
testNetwork.server*[*].netPerfMeterApp[*].stopTime          = 60 s
testNetwork.server*[*].netPerfMeterApp[*].queueSize         = 5e+06 B
testNetwork.server*[*].netPerfMeterApp[*].unordered         = 1
testNetwork.server*[*].netPerfMeterApp[*].unreliable        = 0
testNetwork.server*[*].netPerfMeterApp[*].maxInboundStreams = 16
testNetwork.server*[*].netPerfMeterApp[*].frameRate         = 0 Hz
testNetwork.server*[*].netPerfMeterApp[*].frameSize         = 0 B
testNetwork.server*[*].netPerfMeterApp[*].frameRateString   = ""
testNetwork.server*[*].netPerfMeterApp[*].frameSizeString   = ""
testNetwork.server*[*].netPerfMeterApp[*].maxMsgSize        = 1452 B
testNetwork.server*[*].numPcapRecorders                     = 1   # *** Enable pcap dump here! ***
testNetwork.server*[*].pcapRecorder[0].pcapFile             = ${N2=fullPath()}+".pcap"

# ----- NetPerfMeter Connections -------------------------
testNetwork.clientMain[*].numNetPerfMeterApps              = 1
testNetwork.serverMain[*].numNetPerfMeterApps              = 1
testNetwork.clientMain[*].netPerfMeterApp[*].localPort     = 20000+${alphaMainClientNetPerfMeterID=ancestorIndex(0)}
testNetwork.clientMain[*].netPerfMeterApp[*].remotePort    = 8000+${alphaMainClientNetPerfMeterID}
testNetwork.clientMain[*].netPerfMeterApp[*].remoteAddress = "testNetwork.serverMain[" + string(${alphaMainClientID=ancestorIndex(1)}) + "]%ppp0"
testNetwork.clientMain[*].netPerfMeterApp[*].primaryPath   = "testNetwork.serverMain[" + string(${alphaMainClientID}) + "]%ppp0"
testNetwork.serverMain[*].netPerfMeterApp[*].localPort     = 8000+${alphaMainServerNetPerfMeterID=ancestorIndex(0)}
testNetwork.clientMain[*].netPerfMeterApp[*].protocol      = "SCTP"
testNetwork.serverMain[*].netPerfMeterApp[*].protocol      = "SCTP"

# ===== SCTP Parameters ==================================
testNetwork.*.sctp.arwnd                 = 5e+06
testNetwork.*.sctp.hbInterval            = 30 s
testNetwork.*.sctp.enableHeartbeats      = true

# ===== TCP Parameters ===================================
testNetwork.*.tcp.advertisedWindow       = 5e+06
testNetwork.*.tcp.mss                    = 1452
testNetwork.*.tcp.tcpAlgorithmClass      = "TCPReno"
testNetwork.*.tcp.sackSupport            = true
testNetwork.*.tcp.timestampSupport       = true
testNetwork.*.tcp.windowScalingSupport   = true
testNetwork.*.tcp.delayedAcksEnabled     = true
testNetwork.*.tcp.limitedTransmitEnabled = true
testNetwork.*.tcp.increasedIWEnabled     = false

# ===== IP Parameters ====================================
testNetwork.*.ip.procDelay         = 10us
testNetwork.*.routing.procDelay    = 0.2us
testNetwork.*.inputQueue.procDelay = 0.1us


[Config TraceFile]
testNetwork.systems = 1
testNetwork.client*[*].netPerfMeterApp[*].traceFile = "trace111.trace"
testNetwork.*[*].netPerfMeterApp[*].stopTime        = 600s

[Config SCTP-with-OLIA]
testNetwork.systems = 1
testNetwork.netPerfMeterApp[*].protocol = "SCTP"
testNetwork.netPerfMeterApp[*].protocol = "SCTP"
testNetwork.*.sctp.arwnd                       = 5e+05
testNetwork.*.sctp.cmtSendAllVariant           = "smallestLastTransmission"
testNetwork.*.sctp.cmtRetransmissionVariant    = "normal"
testNetwork.*.sctp.cmtBufferSplitVariant       = "bothSides"
testNetwork.*.sctp.cmtBufferSplittingUsesOSB   = true
testNetwork.*.sctp.cmtCUCVariant               = "pseudoCumAckV2"
testNetwork.*.sctp.cmtUseSFR                   = true
testNetwork.*.sctp.cmtUseDAC                   = true
testNetwork.*.sctp.cmtUseFRC                   = true
testNetwork.*.sctp.cmtCCVariant                = "olia"
testNetwork.*.sctp.cmtCCPathGroups             = ""
testNetwork.*.sctp.cmtSackPath                 = "smallestSRTT"
testNetwork.*.sctp.nrSack                      = true
testNetwork.*.sctp.disableReneging             = false
testNetwork.*.sctp.gapReportLimit              = 1e+08
testNetwork.*.sctp.gapListOptimizationVariant  = "none"
testNetwork.*.sctp.smartOverfullSACKHandling   = true
testNetwork.*.sctp.cmtUseOOPG                  = false
testNetwork.*.sctp.strictCwndBooking           = false
testNetwork.*.sctp.osbWithHeader               = false
testNetwork.*.sctp.sackNow                     = true
testNetwork.*.sctp.packetDrop                  = false
testNetwork.*.sctp.highSpeedCC                 = false
testNetwork.*.sctp.maxBurst                    = 4
testNetwork.*.sctp.maxBurstVariant             = "maxBurst"
testNetwork.*.sctp.initialWindow               = 0
testNetwork.*.sctp.cmtSmartT3Reset             = true
testNetwork.*.sctp.cmtSmartReneging            = true
testNetwork.*.sctp.cmtSmartFastRTX             = true
testNetwork.*.sctp.cmtSlowPathRTTUpdate        = true
testNetwork.*.sctp.cmtSendBufferControlVariant = "none"
testNetwork.*.sctp.cmtSendBufferBlockThreshold = 0.5
testNetwork.*.sctp.cmtMovedChunksReduceCwnd    = true
testNetwork.*.sctp.movedChunkFastRTXFactor     = 2
testNetwork.*.sctp.streamsToPaths              = ""
testNetwork.*.sctp.RTXMethod                   = 0   # "once"
testNetwork.*.sctp.ssModule                    = 0   # "roundRobin"
