#
# This ini file runs Telnet sessions on the NClients network, using
# TelnetApp+TCPGenericSrvApp.
#
# See also fileTransfer.ini and basicHTTP.ini for different kinds of
# network traffic.
#

[General]
#record-eventlog = true

num-rngs = 3
seed-set = 1
**.gen[*].rng-0 = 1
**.mobility.rng-0 = 2

#debug-on-errors = true
#record-eventlog = true

network = mIPv6Network

cmdenv-express-mode = true

tkenv-plugin-path = ../../etc/plugins
# tkenv-default-run = 1

# number of client computers (MN(s) in our case)
 #NOTE: When increasing the number of MN, make sure that they either have different movement patterns, or different speeds, or (incase they have same speed and movement pattern/direction) then they should not have similar positions on the playground (i.e., their positions should not overlap) or else (for some strange reason) MIPv6 operation will not work
*.total_mn = 1

# number of Servers (CN(s) in our case)
*.total_cn = 2

**.neighbourDiscovery.minIntervalBetweenRAs = 0.03s #MinRtrAdvInterval (RFC 3775),applicable when MIPv6Support is true
**.neighbourDiscovery.maxIntervalBetweenRAs = 0.07s #3 ;MaxRtrAdvInterval (RFC 3775),applicable when MIPv6Support is true

#**.CNAddress = "CN[0]" #used by the MN to directly access the CN address. This is a parameter in xMIPv6.ned
#**.CNAddress1 = "CN[1]"
# configurator
#*.configurator.useTentativeAddrs = false # FIXME TBD to be switched to true, for testing DAD!
# = ==================================================================

# channel physical parameters
*.radioMedium.mediumLimitCache.maxTransmissionPower = 2.0mW
*.radioMedium.mediumLimitCache.minReceptionPower = -82dBm
*.radioMedium.mediumLimitCache.minInterferencePower = -82dBm
#**.mgmt.numChannels = 3

# access point

**.MN*.**.mgmt.accessPointAddress = "10:AA:00:00:00:01"
**.wlan*.mgmt.numAuthSteps = 4
**.mgmt.frameCapacity = 10

# ALL APs common parameters
**.AP*.wlan*.mgmt.beaconInterval = 0.1s

# Access Point AP_Home ; AP_1 ; AP_2 ; AP_3 Parameters for EtherMAC
**.AP_Home.wlan*.mgmt.ssid = "HOME"
**.AP_Home.wlan*.mac.address = "10:AA:00:00:00:01"
**.AP_Home.eth[0].address = "10:AE:00:00:00:02"
#**.AP_Home.eth[0].txrate = 100Mbps
**.AP_Home.eth[0].duplexMode = true
**.AP_Home.eth[0].*.scalar-recording = false

**.AP_1.wlan*.mgmt.ssid = "AP1"
**.AP_1.wlan*.mac.address = "10:AA:00:00:A1:01" #the A1:01 specifies AP_1:interface 1
**.AP_1.eth[0].address = "10:AE:00:00:A1:02" #the A1:02 specifies AP_1:interface 2
#**.AP_1.eth[0].txrate = 100Mbps
**.AP_1.eth[0].duplexMode = true
**.AP_1.eth[0].*.scalar-recording = false

# mobility
**.mobility.constraintAreaMinZ = 0m
**.mobility.constraintAreaMaxZ = 0m

**.MN[0].mobilityType = "RectangleMobility"
**.MN[0].mobility.constraintAreaMinX = 180m
**.MN[0].mobility.constraintAreaMinY = 100m
**.MN[0].mobility.constraintAreaMaxX = 530m
**.MN[0].mobility.constraintAreaMaxY = 110m
**.MN[0].mobility.startPos = 0
**.MN[0].mobility.speed = 1mps
**.MN[0].mobility.updateInterval = 0.1s

**.MN[1].mobilityType = "RectangleMobility"
**.MN[1].mobility.constraintAreaMinX = 170m
**.MN[1].mobility.constraintAreaMinY = 100m
**.MN[1].mobility.constraintAreaMaxX = 530m
**.MN[1].mobility.constraintAreaMaxY = 110m
**.MN[1].mobility.startPos = 0
**.MN[1].mobility.speed = 1mps
**.MN[1].mobility.updateInterval = 0.1s

**.MN*.mobilityType = "BonnMotionMobility"
**.MN*.mobility.traceFile = "zarrar.movement" # "linearMotion_2AR_oneWay";"linearMotion_2AR_oneWay" ;"testMove" #"zarrar.movement"
**.MN*.mobility.updateInterval = 0.1s
**.MN*.mobility.nodeId = -1


# = =====================================================================

# udp app (off)
**.numUdpApps = 0
**.udpApp.typename = "UDPBasicApp"

# tcp apps (off)
**.MN[*].numTcpApps = 0                     #changed from 1 to 0
**.MN[*].tcpApp.typename = "TelnetApp"
**.MN[0].tcpApp[0].localAddress = "aaaa:b::8aa:ff:fe00:7"#is this the source addr of the client's TCP app?
**.MN[1].tcpApp[0].localAddress = "aaaa:b::8aa:ff:fe00:8"
**.MN[0].tcpApp[0].localPort = -1
**.MN[1].tcpApp[0].localPort = -1
**.MN[*].tcpApp[0].connectAddress = "CN"
**.MN[0].tcpApp[0].connectPort = 1000 #same destination port numbers
**.MN[1].tcpApp[0].connectPort = 1000 #same destination port numbers

**.MN[*].tcpApp[0].startTime = uniform(10,15)
**.MN[*].tcpApp[0].numCommands = exponential(1)
**.MN[*].tcpApp[0].commandLength = exponential(1)
**.MN[*].tcpApp[0].keyPressDelay = exponential(0.1)
**.MN[*].tcpApp[0].commandOutputLength = exponential(40)
**.MN[*].tcpApp[0].thinkTime = truncnormal(2,3)
**.MN[*].tcpApp[0].idleInterval = truncnormal(3600,1200)
**.MN[*].tcpApp[0].reconnectInterval = 30s

**.CN*.numTcpApps = 0                       #changed from 1 to 0
**.CN*.tcpApp.typename = "TCPGenericSrvApp"
**.CN*.tcpApp[0].localAddress = ""
**.CN*.tcpApp[0].localPort = 1000
**.CN*.tcpApp[0].replyDelay = 0

#preceeded all options with .MN[*].pingApp~
# ping app (on)
**.MN*.numPingApps = 1
**.MN[0].pingApp[0].destAddr = "" #"CN[0]"
**.MN*.pingApp[0].destAddr = "" #"CN[1]"
**.MN*.pingApp[0].srcAddr = ""
**.MN*.pingApp[0].packetSize = 56B
**.MN*.pingApp[*].sendInterval = 0.01s
**.MN*.pingApp[0].hopLimit = 32
**.MN*.pingApp[0].count = 0
**.MN*.pingApp[0].startTime = 200s                 #changed from 1
**.MN*.pingApp[0].printPing = true

# = ===============Added this section for the Correspondent Node (CN) PingApp Parameters====================
**.CN*.numPingApps = 1
**.CN[0].pingApp[0].destAddr = "MN[0]"
**.CN[1].pingApp[0].destAddr = ""
**.CN*.pingApp[0].destAddr = "" #"MN[0]"
**.CN*.pingApp[0].srcAddr = ""
**.CN*.pingApp[0].packetSize = 56B
**.CN*.pingApp[0].sendInterval = 0.5s
**.CN*.pingApp[0].hopLimit = 32
**.CN*.pingApp[0].count = 0
**.CN*.pingApp[0].startTime = 30s  #10s                    #changed from 1s
**.CN*.pingApp[0].stopTime = 2000s #450s
**.CN*.pingApp[0].printPing = true

# = ============================================================================================

# tcp settings.
**.tcp.mss = 1024
**.tcp.advertisedWindow = 14336  # 14*mss
#**.tcp.sendQueueClass = "TCPMsgBasedSendQueue"
#**.tcp.receiveQueueClass = "TCPMsgBasedRcvQueue"
**.tcp.tcpAlgorithmClass = "TCPReno"
**.tcp.recordStats = true

# ip settings
#FIXME
**.routingTableFile = xmldoc("empty.xml")
**.ipv6.procDelay = 10us
**.forwarding = false
#**.routingTable.routingFile = xmldoc("empty.xml")

# ARP configuration
**.arp.retryTimeout = 1s
**.arp.retryCount = 3
**.arp.cacheTimeout = 100s
**.networkLayer.proxyARP = true  # Host's is hardwired "false"

# PPP NIC configuration
**.ppp[*].queueType = "DropTailQueue" # in routers
**.ppp[*].queue.frameCapacity = 10  # in routers

# Ethernet NIC configuration
**.eth[*].queueType = "DropTailQueue" # in routers
**.eth[*].queue.dataQueue.frameCapacity = 10  # in routers
**.eth[*].encap.*.scalar-recording = false
**.eth[*].mac.promiscuous = false
**.eth[*].mac.address = "auto"

##################################
**.eth*.mac.duplexMode = true
**.eth*.mac.*.scalar-recording = false

**.ap.*.scalar-recording = false
**.hub.*.scalar-recording = false

# wireless channels
**.AP_Home.wlan*.radio.channelNumber = 1
**.AP_1.wlan*.radio.channelNumber = 2
**.AP_2.wlan*.radio.channelNumber = 3
**.AP_3.wlan*.radio.channelNumber = 4
**.MN*.wlan*.radio.channelNumber = 0  # just initially -- it'll scan

# wireless configuration
**.wlan*.agent.activeScan = true
**.wlan*.agent.default_ssid = ""
**.wlan*.agent.channelsToScan = "1 2"  # "" means all
**.wlan*.agent.probeDelay = 0.1s
**.wlan*.agent.minChannelTime = 0.15s
**.wlan*.agent.maxChannelTime = 0.3s
**.wlan*.agent.authenticationTimeout = 5s
**.wlan*.agent.associationTimeout = 5s

# nic settings
**.wlan*.bitrate = 2Mbps

**.mac.address = "auto"
**.mac.maxQueueSize = 14
**.mac.rtsThresholdBytes = 4000B
**.wlan*.mac.retryLimit = 7
**.wlan*.mac.cwMinData = 7
**.wlan*.mac.cwMinBroadcast = 31

**.radio.transmitter.power = 2.0mW

# relay unit configuration
**.relayUnitType = "MACRelayUnit"
**.relayUnit.addressTableSize = 100
**.relayUnit.agingTime = 120s
**.relayUnit.bufferSize = 1MiB
**.relayUnit.highWatermark = 512KiB
**.relayUnit.pauseUnits = 300  # pause for 300*512 bit (19200 byte) time
**.relayUnit.addressTableFile = ""
**.relayUnit.numCPUs = 2
**.relayUnit.processingTime = 2us
**.relayUnit.*.scalar-recording = false

**.constraintAreaMinX = 0m
**.constraintAreaMinY = 0m
**.constraintAreaMaxX = 850m
**.constraintAreaMaxY = 850m


[Config One]
description = "Handover 1_RA-Test1"
#sim-time-limit = 308



