Using QualNet Part I - University Of Delaware

Transcription

Using QualNet – Part ISimulating Well-Known ProtocolsWhy QualNet?Rapid prototyping of protocolsComparative performance evaluation ofalternative protocols at each layerBuilt-in measurements on each layerModular, layered stack designStandard API for composition of protocols acrossydifferent layersScalability via support for parallel execution &dual-core processorGUI Tools for system/protocol modeling2

QualNet Layer ModelApplicationFTP, Telnet, CBRTransportIPTCP, UDPRoutingMACWiredRadioPhysicalChannelOSPF, AODV802.3, 802.11, CSMARadio, Bus, Point to PointFree space, Two-ray3Installing QualNetRefer to QualNet-4.0-InstallationGuide.pdfObtain QQualNet 4.0 packagepg from stimpy.cispy cd working dir gtar -4.0-university-wireless-mme.tar.gzObtain the license file cd qualnet/4.0 t.liclicense dir/.Note: for successful license check, QualNet must beinstalled on machines within EECIS domain (128.4.*.*),not even UD domain4

Installing QualNet (cont’d)Set QUALNET HOME/JDK HOME environmentvariable setenv QUALNET HOMEQUALNET HOME working working dir /qualnet/4.0dir /qualnet/4.0 csh/tcsh QUALNET HOME working dir /qualnet/4.0sh/bash export QUALNET HOMEBuild an executable cd main cp Makefile-solaris Makefile makePlatform-dependent(cpu/os/compiler);Note:(1) solaris/sparc supported,but not solaris/x86; (2) redefineCC/Ca e e u / do s“CC/CXX”in Makefile-unix/windowscommon for a different gcc versionif neededTest QualNet’s installation cd ./bin ./qualnet default.config cd ./gui/netbeans/bin runide.sh5Running QualNetDefault configuration file ./qualnet default.configQUALNET HOME /usa/kli/qualnet/4.0QualNet Version 4.0Attempting license checkout (should take less than 2 seconds) . success., Node 1 ((210.35,, 159.63,, 0.00).)Initial node’s coordinate ((x,y,z),y, )Partition 0,Partition 0, Node 2 (479.92, 134.36, 0.00).:Partition 0, Node 30 (1391.27, 1219.75, 0.00).Initialization completed in0.2608 secCurrent Sim Time[s] 0.000000000 RealCurrent Sim Time[s] 9.046229850 Real:Current Sim Time[s] 891.040233635 RealCurrent Sim Time[s] 900900.000000000000000000 RealExecuted 379907 events in2.3882 secTime[s] Time[s] 00CompletedCompleted0%1%Time[s] Time[s] 11Completed 99%Completed100% SimulationProgress6

Output Statistics – default.statNodeAddress Instance ],[1],[2],[2],IP lue802.11b,Signals transmitted 547802.11b,Signals received and forwarded to MAC 1064802.11MAC,Packets from network 45802.11MAC,UNICAST packets sent to channel 42FIFO,Total Packets Queued 4FIFO,Total Packets Dequeued 4FIFO,Total Packets Queued 0FIFO,Total Packets Dequeued 0FIFO,Total Packets Queued 41FIFO,Total Packets Dequeued 41Layer* perl and awk are great tools forprocessing statistic outputs7Configuration FilesLine entry format:[Qualifier] PARAMETER VALUE Qualifier (optional) specifies a range of nodes and hasprecedence over the general one E.g. MOBILITY NONE[5 thru 10] MOBILITY RANDOM-WAYPOINTNotes: Some settings require additional parametersparameters,e.g. NODE-PLACEMENTLines starting with # are treated as commentsRefer to scenarios/default/default.config8

QualifiersDetermine the scope of the parameter Global QualifierMOBILITY NONESubnet Qualifier[N8-2.0] MAC-PROTOCOL MACANode Qualifier[5 thru 15] MOBILITY NONE9Simulation ParametersGlobal Parameters: Simulation timeC di t systemCoordinatetandd terraintiRandom seedTopology and subnetsLayer/Protocol related parameters: Channel/RadioPhysical LayerMAC LayerNetwork LayerApplication Layer10

Important Global ParametersEXPERIMENT-NAME: Name of the output statisticfilee.g.eg EXPERIMENTEXPERIMENT-NAMENAME defaultResulting statistics are written in default.statSIMULATION-TIME: The length of time tosimulate.e.g. SIMULATION-TIME 15M(Available time units: NS, US, MS, S, M, H, D; default isini seconds)d )SEED: The random seed used to derive all otherseeds used in the simulation.e.g. SEED111Coordinate System and Terrain DimentionsCOORDINATE-SYSTEM: LATLONALT or CARTESIANe.g., COORDINATE-SYSTEMCARTESIANTERRAIN-DIMENSIONS: The size of the rectangular area to simulate (inmeters) for Cartesian coordinatecoordinate.e.g., TERRAIN-DIMENSIONS(1000, 1000)Terrain corners are required by LATLONALT systeme.g., TERRAIN-SOUTH-WEST-CORNER (30.00, 40.00)TERRAIN-NORTH-EAST-CORNER (30.01, 40.01)Irregular terrainTERRAIN-DATA-TYPE DEMDEM-FILENAME[0] ./data/terrain/los angeles-wDEM-FIlENAME[1] ./data/terrain/los angeles-e# Tie nodes to the ground levelMOBILITY-GROUND-NODE YES12

Specifying TopologyNODE-PLACEMENT: GRID, RANDOM, UNIFORM, FILEGRIDRANDOMUNIFORMGRID-UNITUse FILE to specify node positions in a fileNODE-PLACEMENTFILENODE-PLACEMENT-FILE ./default.nodes Format: nodeId 0 (x, y, z) [azimuth elevation]13Specifying SubnetSUBNET Parameter SUBNET subnet { comma-delimited list of nodes }Ex. SUBNET N8-1.0 { 1, 3, 7 thru 9 } NodeIds 1, 3, 7, 8, and 9 have network interfaces with address 0.0.1.1through 0.0.1.5Node IDInterface 5Basic form: SUBNET N16-0 { 1 thru n } n is the number of nodes IP address and Node ID are identicalÆ Node 5 has IP address 0.0.0.514

Subnet ShorthandFormat:N # host bits - address with front end 0’s omitted Ex. N8-1.0The subnet address is 0.0.1.0Host IP addresses are 8 bits This allows for 28-2 (254) hosts in this subnet with IPaddresses numbered from 0.0.1.1 through 0.0.1.254The broadcast address for this subnet is 0.0.1.255The subnet mask is 255.255.255.0N8-0.0.1.0 is an equivalent representation15Mobility ModelNONE, TRACERANDOM-WAYPOINTe g MOBILITY -MIN-SPEED 0MOBILITY-WP-MAX-SPEED RITY: distance in metersat which a node’s location is updated) small values potentially slow down the simulationLocation updates when granularity 55m1mLocation updates when granularity 116

Approximate mobility speedScenarioWalkingSpeed Speed (m/s)5 mph2 2 m/s2.2City driving35 mph15.5 m/sFree way driving65 mph28.8 m/sAircraftMach 1332 m/s17Propagation ModelPROPAGATION-LIMIT: received signals with power belowthis limit (in dBm) will not be processed.e.g. ATION-PATHLOSS: specifies path-loss model FREE-SPACE Æ Empty space, no groundTWO-RAY Æ Flat ground Considers a ray bounced back from the grounddhTXd’hRXground ITM Æ Irregular terrain (terrain database required)18

Fading ModelApplied to only narrowband channels (flat fading)Specified by PROPAGATION-FADING-MODELAvailable models NONE – No fadingRAYLEIGH – Highly mobile, no line of sightRICEAN – requires an additional parameter RICEAN-K-FACTOR K 0 : no line of sight (similar to RAYLEIGH) K : strong line of sighte.g.FADING MODEL RAYLEIGHe g PROPAGATIONPROPAGATION-FADING-MODEL19Physical Layer ModelNoise modeling Thermal noise PHY-NOISE-FACTOR ((default 10)) PHY-TEMPERATURE (in K; default 290) Interference PHY-RX-MODEL (SNR-THRESHOLD-BASED BER-BASED 802.11b)Parameters specific to 802.11 PHY802.11-DATA-RATE (in bps)PHY802.11b-TX-POWER-* (in dBm)PHY802.11b-RX-SENSITIVITY-* (in dBm)PHY802.11b-RX-THRESHOLD-* (in dBm)Rx thresholdACBRx sensitivity20

MAC Layer ModelMAC-PROTOCOL: specifies MAC layer protocol CSMA Requires carrier sensing before transmission If the channel is free, the packet is transmitted immediately Otherwise, set a random timeout MACA Uses RTS/CTS to acquire channel Does not carrier sense MACDOT11 IEEE 802.11 CSMA/CA with ACKs and optional RTS/CTS MAC802.16 Æ WiMAXTDMA, GSM, ALOHAMAC802.3/SWITCHED-ETHERNET Æ Wired networksSATCOM Æ Satellite networksPROMISCUOUS-MODE: set to YES to allow nodes to overhearpackets destined to the neighboring node (required by DSR).21IP ProtocolCurrently the only supported network layer protocolAvailable queuing models First-inFirstin first-outfirst out (FIFO)Variations of Random Early Detection: RED, RIO, WRED,Three priority types supported: control (0), real-time (1),and non-real-time (2)IP-QUEUE-PRIORITY-QUEUE-SIZE specifies the queue’ssize (in bytes) EachE h priorityi it queue's' sizei can beb specifiedifi d separatelyt lIP-QUEUE-PRIORITY-QUEUE-SIZE[0] 25000IP-QUEUE-PRIORITY-QUEUE-SIZE[1] 50000IP-QUEUE-PRIORITY-QUEUE-SIZE[2] 5000022

Routing ProtocolsProactive protocols BELLMANFORDRIPv22OSPFv2OLSR-INRIAReactive protocols AODVDSRLAR1Static routing: requires STATIC-ROUTE-FILE23Application SpecificationAPP-CONFIG-FILE: Specifies a file with alist of apps/traffic generators to run. FTPTELNETCBR/MCBRHTTPVOIP etc See scenarios/default/default.app for moredetails24

Layer StatisticsSome statistics include: BILITY-STATISTICS(YES NO)(YES NO)(YES NO)(YES NO)(YES NO)(YES NO)(YES NO)(YES NO)(YES NO)25Other Configuration FilesNode placement: NODE-PLACEMENT-FILEÆ See details in scenarios/default/default.nodesStatic routing: STATICSTATIC-ROUTE-FILEROUTE FILEÆ See details in scenarios/default/default.routesstaticLink/node faults: FAULT-CONFIG-FILEÆ See details in scenarios/default/default.faultMulticast membership: MULTICAST-GROUP-FILEÆSee details in default member26

Example – routing protocol comparisonComparing throughput of an FTP application overAODV and DSR reactive routing protocols ApplicationAli ti traffic:t ffi one FTP sessioniRouting protocols: AODV/DSRCollected statistics: application layerConfigure application Create bin/ftp.app containing only one line:FTP 1 30 10 150SThe session starts at 150 secs.There are 10 items to be sentNode 30 is the server (receiver)Node 1 is the client (sender)27Preparing Config File for AODVAODV: copy the file default.config to aodv.config, thenmodify aodv.config on the following V./ftp.appYESNONONONONONONONONONONONONO28

Preparing Config File for DSRDSR: Copy the modified aodv.config to dsr.config, editROUTING-PROTOCOL parameter and enable promiscuous DEdsrDSRYES29Collecting and Comparing StatisticsRun qualNet on the two configuration files cd QUALNET QUALNET HOME/binHOME/bin ./qualnet aodv.config ./qualnet dsr.configExamine output statistics: grep "Server,Throughput"30, , [2], Application, grep "Server,Throughput"30, , [2], Application,Throughputdifferenceaodv.statFTP Server,Throughput (bits/s) 38034dsr.statFTP Server,Throughput (bits/s) 6294630

More InformationPlain-text explanation for configuration files: QUALNET HOME/scenarios/default/default.*QualNet manuals QUALNET HOME/documentation/*.pdfesp. Installation Guide, Users Guide, andProgrammers GuideQualNet community forums http://www.scalable-networks.com/forums/QualNet exercises http://degas.cis.udel.edu/QualNet/31

Using QualNet - Part I Simulating Well-Known Protocols Why QualNet? Rapid prototyping of protocols Comparative performance evaluation of alternative protocols at each layer Built-in measurements on each layer Modular, layered stack design Standard API for composition of protocols across