[General]
network = tcptimestamps

warnings = true
sim-time-limit = 60.0s

cmdenv-event-banners = true   # for normal (non-express) mode only

tkenv-plugin-path = ../../../etc/plugins

#
# Network specific settings
#

# ip settings
**.ip.procDelay = 0s
**.forwarding = false

# ARP settings
**.arp.retryTimeout = 1s
**.arp.retryCount = 3
**.arp.cacheTimeout = 100s

# NIC settings
**.ppp[*].queueType = "DropTailQueue"
**.ppp[*].queue.frameCapacity = 100    # packets

# tcp apps - client
**.client.numTcpApps = 1
**.client.tcpApp[*].typename = "TCPSessionApp"  # FTP
**.client.tcpApp[*].sendBytes = 100MiB
**.client.tcpApp[*].active = true
**.client.tcpApp[*].localPort = 10020
**.client.tcpApp[*].connectAddress = "server"
**.client.tcpApp[*].connectPort = 10021
**.client.tcpApp[*].tOpen = 0s
**.client.tcpApp[*].tSend = 0s
**.client.tcpApp[*].tClose = 0s
**.client.tcpApp[*].sendScript = ""

# tcp apps - server
**.server.numTcpApps = 1
**.server.tcpApp[*].typename = "TCPSinkApp"
**.server.tcpApp[*].localPort = 10021

# tcp settings
**.tcp.advertisedWindow = 65535                      # in bytes, corresponds with the maximal receiver buffer capacity (Note: normally, NIC queues should be at least this size)
**.tcp.delayedAcksEnabled = false                    # delayed ACK algorithm (RFC 1122) enabled/disabled
**.tcp.nagleEnabled = true                           # Nagle's algorithm (RFC 896) enabled/disabled
**.tcp.limitedTransmitEnabled = false                # Limited Transmit algorithm (RFC 3042) enabled/disabled (can be used for TCPReno/TCPTahoe/TCPNewReno/TCPNoCongestionControl)
**.tcp.increasedIWEnabled = false                    # Increased Initial Window (RFC 3390) enabled/disabled
**.tcp.sackSupport = false                           # Selective Acknowledgment (RFC 2018, 2883, 3517) support (header option) (SACK will be enabled for a connection if both endpoints support it)
**.tcp.windowScalingSupport = false                  # Window Scale (RFC 1323) support (header option) (WS will be enabled for a connection if both endpoints support it)
**.tcp.timestampSupport = true                       # Timestamps (RFC 1323) support (header option) (TS will be enabled for a connection if both endpoints support it)
**.tcp.mss = 1012                                    # Maximum Segment Size (RFC 793) (header option)
**.tcp.tcpAlgorithmClass = "TCPReno"                 # TCPReno/TCPTahoe/TCPNewReno/TCPNoCongestionControl/DumbTCP
**.tcp.recordStats = true                            # recording of seqNum etc. into output vectors enabled/disabled

# pcapRecorder settings
**.numPcapRecorders = 1

#
# Config specific settings
#

# Examples from [RFC1323]:
# "The following examples illustrate these rules.  Here A, B, C...
# represent data segments occupying successive blocks of sequence
# numbers, and ACK(A),...  represent the corresponding
# acknowledgment segments.  Note that ACK(A) has the same sequence
# number as B.  We show only one direction of timestamp echoing, for
# clarity." [RFC1323]

[Config One]
description = "RFC_1323_Example_1"
**.tcp.delayedAcksEnabled = true
**.client.pcapRecorder[0].pcapFile = "RFC_1323_Example_1_Client_Log.pcap"
**.server.pcapRecorder[0].pcapFile = "RFC_1323_Example_1_Server_Log.pcap"
#      "Packets arrive in sequence, and some of the ACKs are delayed.
#
#      By Case (A), the timestamp from the oldest unacknowledged
#      segment is echoed.
#
#                                            TS.Recent
#          <A, TSval=1> ------------------->
#                                                1
#          <B, TSval=2> ------------------->
#                                                1
#          <C, TSval=3> ------------------->
#                                                1
#                   <---- <ACK(C), TSecr=1>
#          (etc)" [RFC1323]

[Config Two]
description = "RFC_1323_Example_2"
**.client.pcapRecorder[0].pcapFile = "RFC_1323_Example_2_Client_Log.pcap"
**.server.pcapRecorder[0].pcapFile = "RFC_1323_Example_2_Server_Log.pcap"
**.client.ppp[*].numOutputHooks = 1
**.client.ppp[*].outputHook[0].typename = "OrdinalBasedDropper" # Nop | ThruputMeter | OrdinalBasedDropper | OrdinalBasedDuplicator | ...
**.client.ppp[*].outputHook[0].dropsVector = "4;8;"
#      "Packets arrive out of order, and every packet is
#      acknowledged.
#
#      By Case (B), the timestamp from the last segment that
#      advanced the left window edge is echoed, until the missing
#      segment arrives; it is echoed according to Case (C).  The
#      same sequence would occur if segments B and D were lost and
#      retransmitted..
#                                            TS.Recent
#          <A, TSval=1> ------------------->
#                                                1
#                   <---- <ACK(A), TSecr=1>
#                                                1
#          <C, TSval=3> ------------------->
#                                                1
#                   <---- <ACK(A), TSecr=1>
#                                                1
#          <B, TSval=2> ------------------->
#                                                2
#                   <---- <ACK(C), TSecr=2>
#                                                2
#          <E, TSval=5> ------------------->
#                                                2
#                   <---- <ACK(C), TSecr=2>
#                                                2
#          <D, TSval=4> ------------------->
#                                                4
#                   <---- <ACK(E), TSecr=4>
#          (etc)" [RFC1323]


# References
#
#   [RFC1323]  Jacobson, V., Branden, R. and Borman, D.,  "TCP
#              Extensions for High Performance", RFC 1323, May 1992.
