#----------------------------------------------------------------------------- [Config Wireless01] description = Two hosts communicating wirelessly network = WirelessA sim-time-limit = 25s *.host*.networkLayer.arpType = "GlobalARP" *.hostA.numUdpApps = 1 *.hostA.udpApp[0].typename = "UDPBasicApp" *.hostA.udpApp[0].destAddresses = "hostB" *.hostA.udpApp[0].destPort = 5000 *.hostA.udpApp[0].messageLength = 1000B *.hostA.udpApp[0].sendInterval = exponential(12ms) *.hostA.udpApp[0].packetName = "UDPData" *.hostB.numUdpApps = 1 *.hostB.udpApp[0].typename = "UDPSink" *.hostB.udpApp[0].localPort = 5000 *.host*.wlan[0].typename = "IdealWirelessNic" *.host*.wlan[0].mac.useAck = false *.host*.wlan[0].mac.fullDuplex = false *.host*.wlan[0].radio.transmitter.communicationRange = 500m *.host*.wlan[0].radio.receiver.ignoreInterference = true *.host*.**.bitrate = 1Mbps #----------------------------------------------------------------------------- [Config Wireless02] description = Setting up some animations extends = Wireless01 *.hostA.wlan[0].radio.displayCommunicationRange = true *.visualizer.sceneVisualizer.descriptionFigure = "title" *.visualizer.mediumVisualizer.displaySignals = true *.visualizer.physicalLinkVisualizer.displayLinks = true *.visualizer.physicalLinkVisualizer.packetFilter = "UDPData*" #----------------------------------------------------------------------------- [Config Wireless03] description = Adding more nodes and decreasing the communication range extends = Wireless02 network = WirelessB *.host*.wlan[0].radio.transmitter.communicationRange = 250m *.hostR1.wlan[0].radio.displayCommunicationRange = true #----------------------------------------------------------------------------- [Config Wireless04] description = Setting up static routing extends = Wireless03 *.host*.forwarding = true *.configurator.config = xml("") *.configurator.optimizeRoutes = false *.host*.routingTable.netmaskRoutes = "" *.visualizer.physicalLinkVisualizer.displayLinks = true *.visualizer.dataLinkVisualizer.displayLinks = true *.visualizer.networkRouteVisualizer.displayRoutes = true *.visualizer.*LinkVisualizer.lineShift = 0 *.visualizer.networkRouteVisualizer.lineShift = 0 *.visualizer.networkRouteVisualizer.packetFilter = "UDPData*" #----------------------------------------------------------------------------- [Config Wireless05] description = Taking interference into account extends = Wireless04 *.host*.wlan[0].radio.receiver.ignoreInterference = false *.host*.wlan[0].radio.transmitter.interferenceRange = 500m *.hostA.wlan[0].radio.displayInterferenceRange = true *.visualizer.dataLinkVisualizer.packetFilter = "" #----------------------------------------------------------------------------- [Config Wireless06] description = Using CSMA to better utilize the medium extends = Wireless05 *.host*.wlan[0].typename = "WirelessNic" *.host*.wlan[0].radioType = "IdealRadio" *.host*.wlan[0].macType = "CsmaCaMac" #----------------------------------------------------------------------------- [Config Wireless07] description = Turning on ACKs in CSMA extends = Wireless06 *.host*.wlan[0].mac.useAck = true #----------------------------------------------------------------------------- [Config Wireless08] description = Modeling energy consumption extends = Wireless07 *.host*.wlan[0].radio.energyConsumerType = "StateBasedEpEnergyConsumer" *.host*.wlan[0].radio.energyConsumer.offPowerConsumption = 0mW *.host*.wlan[0].radio.energyConsumer.sleepPowerConsumption = 1mW *.host*.wlan[0].radio.energyConsumer.switchingPowerConsumption = 1mW *.host*.wlan[0].radio.energyConsumer.receiverIdlePowerConsumption = 2mW *.host*.wlan[0].radio.energyConsumer.receiverBusyPowerConsumption = 5mW *.host*.wlan[0].radio.energyConsumer.receiverReceivingPowerConsumption = 10mW *.host*.wlan[0].radio.energyConsumer.transmitterIdlePowerConsumption = 2mW *.host*.wlan[0].radio.energyConsumer.transmitterTransmittingPowerConsumption = 100mW *.host*.energyStorageType = "IdealEpEnergyStorage" *.host*.wlan[0].radio.displayInterferenceRange = false *.hostR1.wlan[0].radio.displayCommunicationRange = false *.visualizer.mediumVisualizer.displaySignals = false #----------------------------------------------------------------------------- [Config Wireless09] description = Configuring node movements extends = Wireless08 *.hostR*.mobilityType = "LinearMobility" *.hostR*.mobility.speed = 12mps *.hostR*.mobility.angle = 270deg *.host*.wlan[0].mac.maxQueueSize = 10 *.visualizer.mobilityVisualizer.displayVelocities = true *.visualizer.mobilityVisualizer.displayMovementTrails = true #----------------------------------------------------------------------------- [Config Wireless10] description = Configuring ad-hoc routing (AODV) extends = Wireless09 *.configurator.addStaticRoutes = false *.hostType = "AODVRouter" *.hostB.wlan[0].radio.displayCommunicationRange = true *.visualizer.dataLinkVisualizer.packetFilter = "AODV*" #----------------------------------------------------------------------------- [Config Wireless11] description = Adding obstacles to the environment extends = Wireless10 network = WirelessC *.host*.mobility.initialZ = 1.7m *.physicalEnvironment.config = xmldoc("walls.xml") *.radioMedium.obstacleLossType = "IdealObstacleLoss" #----------------------------------------------------------------------------- [Config Wireless12] description = Changing to a more realistic radio model extends = Wireless11 *.mediumType = "APSKScalarRadioMedium" *.radioMedium.backgroundNoise.power = -90dBm *.radioMedium.mediumLimitCache.carrierFrequency = 2GHz *.host*.wlan[0].radioType = "APSKScalarRadio" *.host*.wlan[0].radio.carrierFrequency = 2GHz *.host*.wlan[0].radio.bandwidth = 2MHz *.host*.wlan[0].radio.transmitter.power = 1.4mW *.host*.wlan[0].radio.transmitter.preambleDuration = 10us *.host*.wlan[0].radio.transmitter.headerBitLength = 0b *.host*.wlan[0].radio.receiver.sensitivity = -85dBm *.host*.wlan[0].radio.receiver.energyDetection = -85dBm *.host*.wlan[0].radio.receiver.snirThreshold = 4dB #----------------------------------------------------------------------------- [Config Wireless13] description = Configuring a more accurate pathloss model extends = Wireless12 *.physicalEnvironment.groundType = "FlatGround" *.physicalEnvironment.ground.elevation = 0m *.radioMedium.pathLossType = "TwoRayGroundReflection" #----------------------------------------------------------------------------- [Config Wireless14] description = Introducing antenna gain extends = Wireless13 *.host*.wlan[0].radio.antennaType = "ConstantGainAntenna" *.host*.wlan[0].radio.antenna.gain = 3dB #-----------------------------------------------------------------------------