Internal/Mapping/Topologies/Topo2: hotspotAP-10nodes.rb

File hotspotAP-10nodes.rb, 3.8 KB (added by Surya Satyavolu, 18 years ago)
Line 
1############# Topology-2 ###############################
2# Author: Sachin Ganu
3#
4#
5# This script defines a sample hotspot topology
6# that has one AP and 10 clients such that the clients
7# experience different link qualities (reflected by the PHY
8# rates)
9#
10# All nodes- 802.11a channel 36
11# CBR UDP flow at 4 Mbps (1024 byte packets) from each client to the AP
12# AP reports system throughput
13############################################################
14
15
16Experiment.name = "Hotspot-AP"
17Experiment.project = "orbit:mapping"
18
19######
20#To define the experiment-parameters such as send rate and packet size
21#These values are passed on to the traffic generator when defining the
22#group properties
23######
24Experiment.defProperty('rate', 10000, 'KBits per second sent from sender')
25Experiment.defProperty('packetSize', 1024, 'Size of packets sent from sender')
26
27#####
28# Define nodes used in experiment - A corner node is chosen as the AP
29# and 10 other clients are chosen from nearby to faraway nodes so as to
30# get a distribution of different PHY rates to the AP
31#####
32defNodes('AP1', [1,2]) {|node|
33 node.image = nil # assume the right image to be on disk
34 node.prototype("test:proto:receiver", {
35 'protocol' => 'udp',
36 'hostname' => '192.168.1.2'
37
38 })
39 node.net.w0.type = 'a'
40 node.net.w0.ip = "%192.168.%x.%y"
41 node.net.w0.essid = "verizon"
42 node.net.w0.mode = "master"
43}
44
45#####
46# First group of nearby nodes (with 54 Mbps links to AP)
47#####
48defNodes('group1', [[3,2],[5,3],[1,3]]){|node|
49 node.image = nil # assume the right image to be on disk
50 node.prototype("test:proto:sender", {
51 'destinationHost' => '192.168.1.2',
52 'packetSize' => Experiment.property("packetSize"),
53 'rate' => Experiment.property("rate")
54 })
55 node.net.w0.type = 'a'
56 node.net.w0.ip = "%192.168.%x.%y"
57 node.net.w0.essid = "verizon"
58 node.net.w0.mode = "Managed"
59 node.net.w0.rate = "54M"
60}
61
62#####
63# Second group of clients (with 24 Mbps links to AP)
64#####
65defNodes('group2', [[7,3],[1,7],[4,6]]){|node|
66 node.image = nil # assume the right image to be on disk
67 node.prototype("test:proto:sender", {
68 'destinationHost' => '192.168.1.2',
69 'packetSize' => Experiment.property("packetSize"),
70 'rate' => Experiment.property("rate")
71 })
72
73 node.net.w0.type = 'a'
74 node.net.w0.ip = "%192.168.%x.%y"
75 node.net.w0.essid = "verizon"
76 node.net.w0.mode = "Managed"
77 node.net.w0.rate = "24M"
78}
79
80#####
81# Third group of clients (with 12 Mbps links to AP)
82#####
83defNodes('group3', [[11,2],[13,5],[3,13]]){|node|
84 node.image = nil # assume the right image to be on disk
85 node.prototype("test:proto:sender", {
86 'destinationHost' => '192.168.1.2',
87 'packetSize' => Experiment.property("packetSize"),
88 'rate' => Experiment.property("rate")
89 })
90
91 node.net.w0.type = 'a'
92 node.net.w0.ip = "%192.168.%x.%y"
93 node.net.w0.essid = "verizon"
94 node.net.w0.mode = "Managed"
95 node.net.w0.rate = "12M"
96}
97
98#####
99# Fourth group of faraway clients (with 6 Mbps links to AP)
100#####
101defNodes('group4', [18,4]){|node|
102 node.image = nil # assume the right image to be on disk
103 node.prototype("test:proto:sender", {
104 'destinationHost' => '192.168.1.2',
105 'packetSize' => Experiment.property("packetSize"),
106 'rate' => Experiment.property("rate")
107 })
108
109 node.net.w0.type = 'a'
110 node.net.w0.ip = "%192.168.%x.%y"
111 node.net.w0.essid = "verizon"
112 node.net.w0.mode = "Managed"
113 node.net.w0.rate = "6M"
114}
115
116defNodes('clients' , ['group1', 'group2', 'group3' , 'group4'])
117#
118# Now, start the experiment
119#
120whenAllInstalled() {
121 #Let all the client latch on to the AP cell
122 wait 10
123
124 #Start AP (receiver app)
125 nodes('AP1').startApplications
126 wait 5
127
128 #Start clients (sender app)
129 nodes('clients').startApplications
130
131 #Wait for 2 minutes
132 wait 120
133
134 Experiment.done
135}