Changes between Version 18 and Version 19 of Tutorials/oMF/tut2
- Timestamp:
- Oct 20, 2014, 4:06:40 PM (10 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Tutorials/oMF/tut2
v18 v19 10 10 In this exercise, we will try to drive synthetic traffic through the router and measure key performance characteristics such as throughput and forwarding latency. Since MobilityFirst presents a hop-by-hop block data transport, we can vary the unit size of the data block and observe it's impact on the performance. We will also try to visualize the performance results using OMF's result service by installing an OML-enabled monitor on the routers. 11 11 12 === Pre-requisites === 13 14 * Experimenters are expected to have basic networking knowledge and familiarity with Linux OS and some of its tools (command line tools, ssh, etc.). 15 * An ORBIT user account. 16 * Some familiarity with the !MobilityFirst terminology. 17 12 18 === Deploy the Network === 13 19 … … 16 22 [[Image(Tutorials/oMF:MFTurorialNetwork.png)]] 17 23 18 [[CollapsibleStart(If not coming from the previous exercise follow these instructions to setup your network)]] 19 20 Once logged into the grid console: 24 If not coming from [wiki:Tutorials/oMF/tut1 exercise 1] follow these instructions on how to setup the topology. Running exercise 1 before moving to exercise 2 is advised to understand the steps and software components involved. 25 26 [[CollapsibleStart(4 nodes topology setup)]] 27 28 First of all, log in into the grid console using SSH: 21 29 22 30 {{{ … … 26 34 }}} 27 35 28 From the console we will start by loading the Mobilityfirst image into the four nodes that have been assigned to you: 36 For simplicity, open 3 different consoles on your laptop and access the grid's console with all of them; you will need them in the continuation of the exercise. 37 From the console we will start loading the !Mobilityfirst image into the four nodes that have been assigned to you: 29 38 30 39 {{{ … … 34 43 }}} 35 44 36 '' 'system:topo:mf-groupX''' represents the group of 4 nodes and '''mf-groupX''' has to be replaced by the group id assigned to you.37 38 For example, '' 'mf-group1''' will load the image on nodes 'node1-1,node1-2,node2-1,node2-2'39 40 If theoutput of your console looks similar to:45 ''system:topo:mf-groupX'' represents the topology of 4 nodes that has been assigned to you're group and ''mf-groupX'' has to be replaced by the group id assigned to you. 46 47 For example, ''mf-group1'' will load the image on nodes 'node20-20,node20-19,node19-19,node19-20' 48 49 If at the end of the execution, the final output of your console looks similar to: 41 50 42 51 {{{ … … 59 68 === Deploy Network === 60 69 61 Software and experiment control in the ORBIT testbed can be automated greatly using the OMF framework. An OMF control script is written in Ruby and allows the experimenter to specify the set of nodes, their network configuration, to specify software components and arguments, and to control their execution on one or more nodes. We will use an OMF script to bring up 4 ORBIT nodes to host our topology, with corresponding software components.62 63 We will first introduce the main details of the scripts that will be run and then w ill step to the executionitself.70 Software and experiment control in the ORBIT testbed can be automated greatly using the OMF framework. An OMF control script is written in Ruby and allows the experimenter to specify the set of nodes, their network configuration, to specify software components and arguments, and to control their execution on one or more nodes. We will use an OMF script to bring up 4 ORBIT nodes to host our topology, with the corresponding software components. 71 72 We will first introduce the main details of the scripts that will be run and then we will step to the execution process itself. 64 73 65 74 ==== Software Component Specification ==== 66 75 67 The following snippet shows the specification of the MobilityFirst router along with the required arguments:76 The following snippet shows the specification of the !MobilityFirst components along with the required arguments. A typical application will have at least a brief description, a path for the associated binary to execute and a list of properties that correspond to the parameters that will be passed once starting the executable. 68 77 69 78 {{{ 70 79 #!ruby 71 80 81 #Application definition of a MobilityFirst access router 72 82 defApplication('MF-Router', 'router') {|app| 73 83 app.shortDescription = "Click-based MobilityFirst Access Router" … … 90 100 } 91 101 102 #Application definition of a GNRS server 92 103 defApplication('MF-GNRS', 'gnrs') {|app| 93 104 app.shortDescription = "GNRS Server" … … 98 109 } 99 110 100 #Enable OML reporting by default 111 112 #Application definition of the client network protocol stack 101 113 defApplication('MF-HostStack', 'hoststack') {|app| 102 114 app.shortDescription = "MF host network stack" … … 107 119 }}} 108 120 109 As seen above, the router is configured with both 'core' and 'edge' interfaces. The core interfaces connect routers towards the core of the network, while the edge interface enables hosts to connect and access the MobilityFirst network. 110 111 Also seen above is the GNRS service related arguments that specify which server (IP and port) the router should use for in-network name resolution purpose, both for sending requests and to receive responses. By default it will listen on all interfaces and port 10001. 121 A few considerations on the defined applications: 122 123 * As seen above, the router is configured with both 'core' (''core_dev'') and 'edge' (''edge_dev'') interfaces. Different router configurations are available depending on the required functionality. In this case we use what we call a !MobilityFirst Access Router, which has the particularity of having the core interfaces connected towards the core of the network, while the edge interface enables hosts to connect and access the !MobilityFirst network. 124 125 * For this basic setup, the GNRS has been configured to be running as a single server instance, but in a larger experiment, it is designed to be a distributed system deployed at different locations. 126 127 * Most of the client settings are located in a configuration file pre-loaded on the ORBIT image in the folder ''/usr/local/src/mobilityfirst/eval/orbit/conf/''. 112 128 113 129 ==== Setting up the Software Node Groups ==== 114 130 115 The following s hows how the node groups for the routers are setup in the OMF control scripts. Node groups allows experimenters to use single statements to set configuration and execute commands across all nodes inthe group.131 The following snippet shows how the node groups for the routers are setup in the OMF control scripts. Node groups allow experimenters to use single statements to set configuration (e.g. network interfaces) and execute commands across all nodes belonging to the group. 116 132 117 133 {{{ 118 134 #!ruby 119 135 136 #Create router groups 120 137 for i in 1..num_routers 138 #Create a topology with a single router in it 121 139 defTopology("topo:router_#{i}") { |t| 122 140 aNode = routersTopo.getNodeByIndex(i-1) … … 125 143 } 126 144 145 #Through the group definition we set up the applications to run 127 146 defGroup("router_#{i}", "topo:router_#{i}") {|node| 128 147 node.addApplication('MF-Router') {|app| … … 140 159 } 141 160 142 #If i s the first router add the GNRS161 #If it is the first router add the GNRS 143 162 if i == 1 144 aNode = routersTopo.getNodeByIndex(i-1)145 info aNode, " will also host the GNRS server"146 147 app.setProperty('log4j_config_file', GNRS_log_file)148 app.setProperty('jar_file', GNRS_jar_file)149 app.setProperty('config_file', GNRS_conf_file)150 163 aNode = routersTopo.getNodeByIndex(i-1) 164 info aNode, " will also host the GNRS server" 165 node.addApplication('MF-GNRS') {|app| 166 app.setProperty('log4j_config_file', GNRS_log_file) 167 app.setProperty('jar_file', GNRS_jar_file) 168 app.setProperty('config_file', GNRS_conf_file) 169 } 151 170 end 152 171 172 #Setup the node interfaces 173 #The first ethernet interface is used as the core interface 153 174 node.net.e0.ip = "192.168.100.#{i}" 154 175 node.net.e0.netmask = '255.255.255.0' 155 176 156 node.net.w0.mode = "adhoc" 157 node.net.w0.type = 'g' 158 node.net.w0.channel = "11" 159 node.net.w0.essid = "SSID_group_#{i}" 160 node.net.w0.ip = "192.168.#{i}.1" 177 #The first wireless interface is used to give access to clients 178 node.net.w0.mode = "adhoc" 179 node.net.w0.type = 'g' 180 node.net.w0.channel = "11" 181 node.net.w0.essid = "SSID_group_#{i}" 182 node.net.w0.ip = "192.168.#{i}.1" 161 183 } 162 184 end … … 164 186 #Create host groups 165 187 for i in 1..num_hosts 188 #Create a topology with a single router in it 166 189 defTopology("topo:host_#{i}") { |t| 167 190 aNode = hostsTopo.getNodeByIndex(i-1) … … 170 193 } 171 194 195 #Through the group definition we set up the applications to run 172 196 defGroup("host_#{i}", "topo:host_#{i}") {|node| 173 197 node.addApplication('MF-HostStack') {|app| … … 175 199 app.setProperty('log_level', log_level) 176 200 } 177 178 #node.net.e0.ip = "192.168.#{i}.#{i+100}"179 #node.net.e0.netmask = '255.255.255.0'180 201 181 node.net.w0.mode = "adhoc" 182 node.net.w0.type = 'g' 183 node.net.w0.channel = "11" 184 node.net.w0.essid = "SSID_group_#{i}" 185 node.net.w0.ip = "192.168.#{i}.2" 186 } 202 #The first wifi interface is used to connect to the Access Router 203 node.net.w0.mode = "adhoc" 204 node.net.w0.type = 'g' 205 node.net.w0.channel = "11" 206 node.net.w0.essid = "SSID_group_#{i}" 207 node.net.w0.ip = "192.168.#{i}.2" 208 } 187 209 end 188 210 }}} 189 As can be seen above, properties which were defined in the MF-Router, MF-GNRS and MF-HostStack applications have been set here. Moreover, node interfaces have been set up, and IP addresses have been assigned to them. As we discussed earlier the router is configured with both edge and core interfaces. The ethernet interface is used to connect to the core of the network, and the wireless interface is for connection to the clients. On the other side, the client is equipped with wifi interface to connect to the access router. 190 211 212 As it can be seen above, once defining applications that each group will execute, the application properties are set accordingly. While we do not want to enter the details of each parameter, it is important to notice how by simple use of counters, the different nodes can be assigned different values. 213 214 Moreover, resources such node interfaces and their corresponding IP addresses have to be set up in this phase of the experiment. As we discussed earlier the router is configured with both edge and core interfaces. An ethernet interface is used to connect to 2 core routers, while a wireless interface is used to provide access for the clients. 191 215 192 216 [[CollapsibleEnd]] 193 217 194 We will assume the network described and initialized in Exercise 1 is up and functional. Here also we will use mfping to send packets between the hosts. In addition to the deployment specified in exercise 1, we install OML-enabled statistics monitor for MobilityFirst routers. 218 ==== Setting up the 'OML enabled Monitor on Routers Application' ==== 219 220 At this point, the network topology described and initialized in Exercise 1 is up and functional. In order to produce synthetic traffic, we will use mfping to send packets between the hosts. In order to perform more advanced network measurements, other applications are also available, such as a modified version of the commonly used application ''iperf''. In addition to the deployment specified in exercise 1, we install OML-enabled statistics monitor for MobilityFirst routers. 195 221 196 222 The entire script is available as part of the tutorial package as orbit/tutorial/scripts/exercise2.rb 197 223 198 224 The key extensions over previous script are briefly discussed below. 199 200 ==== Setting up the 'OML enabled Monitor on Routers Application' ====201 225 202 226 The following snippet from the script shows the code added to set up the OML enabled Monitor on Routers Application and its arguments: