Changes between Version 18 and Version 19 of Tutorials/oMF/tut2


Ignore:
Timestamp:
Oct 20, 2014, 4:06:40 PM (10 years ago)
Author:
wontoniii
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Tutorials/oMF/tut2

    v18 v19  
    1010In 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.
    1111
     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
    1218=== Deploy the Network ===
    1319
     
    1622[[Image(Tutorials/oMF:MFTurorialNetwork.png)]]
    1723
    18 [[CollapsibleStart(If not coming from the previous exercise follow these instructions to setup your network)]]
    19 
    20 Once logged into the grid console:
     24If 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
     28First of all, log in into the grid console using SSH:
    2129
    2230{{{
     
    2634}}}
    2735
    28 From the console we will start by loading the Mobilityfirst image into the four nodes that have been assigned to you:
     36For 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.
     37From the console we will start loading the !Mobilityfirst image into the four nodes that have been assigned to you:
    2938
    3039{{{
     
    3443}}}
    3544
    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 the output 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
     47For example, ''mf-group1'' will load the image on nodes 'node20-20,node20-19,node19-19,node19-20'
     48
     49If at the end of the execution, the final output of your console looks similar to:
    4150
    4251{{{
     
    5968=== Deploy Network ===
    6069
    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 will step to the execution itself.
     70Software 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
     72We will first introduce the main details of the scripts that will be run and then we will step to the execution process itself.
    6473
    6574==== Software Component Specification ====
    6675
    67 The following snippet shows the specification of the MobilityFirst router along with the required arguments:
     76The 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.
    6877
    6978{{{
    7079#!ruby
    7180
     81#Application definition of a MobilityFirst access router
    7282defApplication('MF-Router', 'router') {|app|
    7383        app.shortDescription = "Click-based MobilityFirst Access Router"
     
    90100}
    91101
     102#Application definition of a GNRS server
    92103defApplication('MF-GNRS', 'gnrs') {|app|
    93104        app.shortDescription = "GNRS Server"
     
    98109}
    99110
    100 #Enable OML reporting by default
     111
     112#Application definition of the client network protocol stack
    101113defApplication('MF-HostStack', 'hoststack') {|app|
    102114        app.shortDescription = "MF host network stack"
     
    107119}}}
    108120
    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.
     121A 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/''.
    112128
    113129==== Setting up the Software Node Groups ====
    114130
    115 The following shows 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 in the group.
     131The 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.
    116132
    117133{{{
    118134#!ruby
    119135
     136#Create router groups
    120137for i in 1..num_routers
     138        #Create a topology with a single router in it
    121139        defTopology("topo:router_#{i}") { |t|
    122140                aNode = routersTopo.getNodeByIndex(i-1)
     
    125143        }
    126144 
     145        #Through the group definition we set up the applications to run
    127146        defGroup("router_#{i}", "topo:router_#{i}") {|node|
    128147                node.addApplication('MF-Router') {|app|
     
    140159                }
    141160
    142           #If is the first router add the GNRS
     161          #If it is the first router add the GNRS
    143162          if i == 1
    144       aNode = routersTopo.getNodeByIndex(i-1)
    145       info aNode, " will also host the GNRS server"
    146                   node.addApplication('MF-GNRS') {|app|
    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                }
    151170          end
    152171       
     172          #Setup the node interfaces
     173          #The first ethernet interface is used as the core interface
    153174          node.net.e0.ip = "192.168.100.#{i}"
    154175          node.net.e0.netmask = '255.255.255.0'
    155176   
    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"
    161183        }
    162184end
     
    164186#Create host groups
    165187for i in 1..num_hosts
     188        #Create a topology with a single router in it
    166189        defTopology("topo:host_#{i}") { |t|
    167190                aNode = hostsTopo.getNodeByIndex(i-1)
     
    170193        }
    171194 
     195        #Through the group definition we set up the applications to run
    172196        defGroup("host_#{i}", "topo:host_#{i}") {|node|
    173197                node.addApplication('MF-HostStack') {|app|
     
    175199                        app.setProperty('log_level', log_level)
    176200                }
    177          
    178     #node.net.e0.ip = "192.168.#{i}.#{i+100}"
    179           #node.net.e0.netmask = '255.255.255.0'
    180201   
    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      }
    187209end
    188210}}}
    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
     212As 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
     214Moreover, 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.
    191215
    192216[[CollapsibleEnd]]
    193217
    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
     220At 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.
    195221
    196222The entire script is available as part of the tutorial package as orbit/tutorial/scripts/exercise2.rb
    197223
    198224The key extensions over previous script are briefly discussed below.
    199 
    200 ==== Setting up the 'OML enabled Monitor on Routers Application' ====
    201225
    202226The following snippet from the script shows the code added to set up the OML enabled Monitor on Routers Application and its arguments: