From 7040c9031a0cba01f70d5fb2a45f55a3ffe2a362 Mon Sep 17 00:00:00 2001 From: Andras Varga Date: Tue, 12 Sep 2023 22:51:53 +0200 Subject: [PATCH] examples: added inet/tcpthroughput For studying how TCP (and its various flavors) tolerate long link delays. --- examples/inet/tcpthroughput/ClientServer.ned | 29 + examples/inet/tcpthroughput/General.anf | 1281 ++++++++++++++++++ examples/inet/tcpthroughput/README | 9 + examples/inet/tcpthroughput/omnetpp.ini | 49 + 4 files changed, 1368 insertions(+) create mode 100644 examples/inet/tcpthroughput/ClientServer.ned create mode 100644 examples/inet/tcpthroughput/General.anf create mode 100644 examples/inet/tcpthroughput/README create mode 100644 examples/inet/tcpthroughput/omnetpp.ini diff --git a/examples/inet/tcpthroughput/ClientServer.ned b/examples/inet/tcpthroughput/ClientServer.ned new file mode 100644 index 00000000000..0e186b06849 --- /dev/null +++ b/examples/inet/tcpthroughput/ClientServer.ned @@ -0,0 +1,29 @@ +// +// Copyright (C) 2000 Institut fuer Telematik, Universitaet Karlsruhe +// +// SPDX-License-Identifier: LGPL-3.0-or-later +// +// + +package inet.examples.inet.tcpthroughput; + +import inet.networklayer.configurator.ipv4.Ipv4NetworkConfigurator; +import inet.node.inet.StandardHost; +import ned.DatarateChannel; + + +network ClientServer +{ + submodules: + client1: StandardHost { + @display("p=250,150;i=device/pc3"); + } + server: StandardHost { + @display("p=400,150;i=device/pc2"); + } + configurator: Ipv4NetworkConfigurator { + @display("p=100,100;is=s"); + } + connections: + client1.pppg++ <--> { datarate = 10Mbps; } <--> server.pppg++; +} diff --git a/examples/inet/tcpthroughput/General.anf b/examples/inet/tcpthroughput/General.anf new file mode 100644 index 00000000000..8e8e262099f --- /dev/null +++ b/examples/inet/tcpthroughput/General.anf @@ -0,0 +1,1281 @@ + + + + + + + + + + + + + + + + + + + + + + +]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +]]> + + + + + + + + + + + + + +]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +]]> + + + + + + + + + + + + + +]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/examples/inet/tcpthroughput/README b/examples/inet/tcpthroughput/README new file mode 100644 index 00000000000..e14637b1c60 --- /dev/null +++ b/examples/inet/tcpthroughput/README @@ -0,0 +1,9 @@ +For studying how TCP (and its various flavors) tolerate long link delays. + +Run the Experiment parameter study, then plot the sum of the tcpRcvPayloadBytes +statistics of the TCP connection in the server. You can make the parameter study +cover more input variations by uncommenting the lines that define more iteration +values. + +Observe that larger link delays necessitate larger advertised windows for TCP to +produce throughputs that are near the link capacity. diff --git a/examples/inet/tcpthroughput/omnetpp.ini b/examples/inet/tcpthroughput/omnetpp.ini new file mode 100644 index 00000000000..543c6103378 --- /dev/null +++ b/examples/inet/tcpthroughput/omnetpp.ini @@ -0,0 +1,49 @@ +[General] +network = ClientServer + +**.numApps = 1 +**.client*.app[*].typename = "TcpSessionApp" +**.client*.app[0].active = true +**.client*.app[0].localPort = -1 +**.client*.app[0].connectAddress = "server" +**.client*.app[0].connectPort = 1000 +**.client*.app[0].tOpen = 0.1s +**.client*.app[0].tSend = 1s +**.client*.app[0].sendBytes = 1GB +**.client*.app[0].sendScript = "" +#**.client*.app[0].tClose = 25s + +**.server*.app[*].typename = "TcpEchoApp" +**.server*.app[0].localPort = 1000 +**.server*.app[0].echoFactor = 0 + +**.ppp[*].queue.typename = "DropTailQueue" # in routers +**.ppp[*].queue.packetCapacity = 10 + +*.configurator.config=xml("") + +[Delay-01us] +**.channel.delay = 0.1us + +[Delay-100ms] +**.channel.delay = 100ms + +[Delay-100ms-advWin64K] +**.channel.delay = 100ms +**.advertisedWindow = 65535 + +[Delay-100ms-advWin1MB] +**.channel.delay = 100ms +**.advertisedWindow = 1024*1024 +**.windowScalingSupport = true +**.windowScalingFactor = ask # max 14 + +[Experiment] +sim-time-limit = 240s +**.channel.delay = ${linkDelay=1us,100ms} +#**.advertisedWindow = ${advertisedWindowKiB=8,64,256,1024}*1024 +**.advertisedWindow = ${advertisedWindowKiB=8,1024 ! linkDelay}*1024 +**.windowScalingSupport = true +**.windowScalingFactor = 6 # for advertisedWindow > 64K +**.tcpAlgorithmClass = "Tcp"+${tcpAlgorithm="Vegas", "Westwood", "NewReno", "Reno", "Tahoe", "NoCongestionControl"} # and there's DcTcp too +#**.tcpAlgorithmClass = "Tcp"+${tcpAlgorithm="NewReno", "Reno"}