############# Tutorial1 ################################## # This script defines the experiment # that has one sender and one receiver # Sender, Receiver - 802.11g # UDP flow offered load = 1 Mbps # Receiver reports throughput, packet loss,avg. delay and jitter # Traffic Generator is D-ITG ############################################################ Experiment.name = "tutorial-itg" Experiment.project = "orbit:tutorial" # # Define nodes used in experiment ########################################### # Receiver definition and configuration ########################################## defNodes('receiver', [1,2]) {|node| node.image = nil # assume the right image to be on disk node.prototype("test:proto:itgreceiver", { 'logfile' => "/tmp/res" } ) node.net.w0.ip = "%192.168.%x.%y" node.net.w0.mode = "master" node.net.w0.type = 'b' node.net.w0.essid = "helloworld" } ########################################### # Decoder definition and configuration # Note that we need a decoder to extract # information from the binary file and print ########################################### defNodes('decoder' , [1,2]) {|node| node.image = nil # assume the right image to be on disk node.prototype("test:proto:itgdecoder", { 'logfile' => "/tmp/res", 'tput_report_interval' => 1000, 'delay_report_interval' => 1000, 'loss_report_interval' => 1000, 'jitter_report_interval' => 1000 } ) } # Sender definition and configuration ########################################### defNodes('sender', [1,1]) {|node| node.image = nil # assume the right image to be on disk # use prototype "sender" # and set it's property "destinationHost" to # the receiver node # and bind the remaining properties to the # experiment property space node.prototype("test:proto:itgcbrsender", { 'destinationHost' => '192.168.1.2', 'meter' => 'owdm', #One way delay 'protocol' => 'udp', #UDP client 'constsize' => 1024, #Const payload size (bytes) 'constrate' => 10, #packets per second 'duration' => 60000, #Expt duration (msec) 'gen_delay' => 10000, 'recv_port' => 8000 }) node.net.w0.ip = "%192.168.%x.%y" node.net.w0.mode = "managed" node.net.w0.type = 'b' node.net.w0.essid = "helloworld" } ########################################### # When nodeAgents have reported "OK" to # the nodeHandler start the application ########################################### whenAllInstalled() { wait 20 NodeSet['receiver'].startApplications ###Need to separate receiver and sender start # Receiver opens a TCP port for sending control # information, sender binds to that port. Sleep is # to ensure that receiver is definitely up before # the sender wait 20 ### NodeSet['sender'].startApplications wait 300 NodeSet['decoder'].startApplications wait 10 ########################################### # Shutdown nodes ########################################### Experiment.done }
Last modified
18 years ago
Last modified on Sep 5, 2006, 9:57:13 PM
Note:
See TracWiki
for help on using the wiki.