Changes between Version 28 and Version 29 of GIMIv1.1Tutorial/Orchestrate


Ignore:
Timestamp:
10/18/12 11:14:25 (7 years ago)
Author:
zink@cs.umass.edu
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • GIMIv1.1Tutorial/Orchestrate

    v28 v29  
    5252}}}
    5353
    54 
    55 === C.1.2 Verification of Topology ===
     54----
     55
     56=== C.1.2 Setup Routing in Experiment Topology ===
     57In more complex topologies routing has to be set up. In our case, this is achieved with the aid of an [[http://emmy9.casa.umass.edu:/GEC15-GIMI-Tutorial/routing.rb OMF experiment script]]. The one we use for this tutorial is shown below.
     58
     59{{{
     60defGroup('Node1', "nodeA")
     61defGroup('Node2', "nodeB")
     62defGroup('Node3', "nodeC")
     63defGroup('Node4', "nodeD")
     64defGroup('Node5', "nodeE")
     65
     66
     67onEvent(:ALL_UP) do |event|
     68  wait 1
     69  info 'Changing routing setup'
     70
     71  group('Node1').exec("route add -net 192.168.1.0/24 gw 192.168.4.10")
     72  group('Node1').exec("route add -net 192.168.2.0/24 gw 192.168.4.10")
     73  group('Node1').exec("route add -net 192.168.3.0/24 gw 192.168.5.12")
     74  group('Node1').exec("route add -net 192.168.6.0/24 gw 192.168.5.12")
     75  group('Node1').exec("echo 1 >  /proc/sys/net/ipv4/ip_forward")
     76
     77  group('Node2').exec("route add -net 192.168.3.0/24 gw 192.168.1.13")
     78  group('Node2').exec("route add -net 192.168.5.0/24 gw 192.168.4.11")
     79  group('Node2').exec("route add -net 192.168.6.0/24 gw 192.168.2.12")
     80  group('Node2').exec("echo 1 >  /proc/sys/net/ipv4/ip_forward")
     81
     82  group('Node3').exec("route add -net 192.168.1.0/24 gw 192.168.3.13")
     83  group('Node3').exec("route add -net 192.168.4.0/24 gw 192.168.5.11")
     84  group('Node3').exec("echo 1 >  /proc/sys/net/ipv4/ip_forward")
     85
     86  group('Node4').exec("route add -net 192.168.2.0/24 gw 192.168.3.12")
     87  group('Node4').exec("route add -net 192.168.4.0/24 gw 192.168.1.10")
     88  group('Node4').exec("route add -net 192.168.5.0/24 gw 192.168.3.12")
     89  group('Node4').exec("route add -net 192.168.6.0/24 gw 192.168.3.12")
     90  group('Node4').exec("echo 1 >  /proc/sys/net/ipv4/ip_forward")
     91
     92  group('Node5').exec("route add -net 192.168.2.0/24 gw 192.168.6.12")
     93  group('Node5').exec("route add -net 192.168.1.0/24 gw 192.168.6.12")
     94  group('Node5').exec("route add -net 192.168.3.0/24 gw 192.168.6.12")
     95  group('Node5').exec("route add -net 192.168.4.0/24 gw 192.168.6.12")
     96  group('Node5').exec("route add -net 192.168.5.0/24 gw 192.168.6.12")
     97
     98  info 'Routing setup finished'
     99  wait 5
     100  info 'Stopping applications'
     101  allGroups.stopApplications
     102  wait 1
     103  Experiment.done
     104end
     105}}}
     106
     107This script can be easily adapted if the experimenter wishes to set up the routing between the nodes
     108differently.
     109
     110The script is executed from the user workspace as follows:
     111
     112{{{
     113$ cd ~/Tutorials/GIMI/common/
     114$ omf-5.4 exec --no-am -S gimiXX routing.rb
     115}}}
     116
     117Where gimiXX has to be replaced by the slice name you are using for your experiment.
     118
     119You should see the following output after executing the omf command.
     120
     121{{{
     122
     123}}}
     124
     125----
     126
     127=== C.1.3 Verification of Topology ===
    56128After establishing the slice on which the experiment will be executed, the experimenter will be most likely
    57129be interested in verifying if the slice has been initiated correctly. In this tutorial, we use an [[http://emmy9.casa.umass.edu:/GEC15-GIMI-Tutorial/ping_all.rb OMF experiment script]] that executes pings between neighboring nodes.
     
    224296}}}
    225297
    226 === C.1.3 Setup Routing in Experiment Topology ===
    227 In more complex topologies routing has to be set up. In our case, this is achieved with the aid of an [[http://emmy9.casa.umass.edu:/GEC15-GIMI-Tutorial/routing.rb OMF experiment script]]. The one we use for this tutorial is shown below.
    228 
    229 {{{
    230 defGroup('Node1', "nodeA")
    231 defGroup('Node2', "nodeB")
    232 defGroup('Node3', "nodeC")
    233 defGroup('Node4', "nodeD")
    234 defGroup('Node5', "nodeE")
    235 
    236 
    237 onEvent(:ALL_UP) do |event|
    238   wait 1
    239   info 'Changing routing setup'
    240 
    241   group('Node1').exec("route add -net 192.168.1.0/24 gw 192.168.4.10")
    242   group('Node1').exec("route add -net 192.168.2.0/24 gw 192.168.4.10")
    243   group('Node1').exec("route add -net 192.168.3.0/24 gw 192.168.5.12")
    244   group('Node1').exec("route add -net 192.168.6.0/24 gw 192.168.5.12")
    245   group('Node1').exec("echo 1 >  /proc/sys/net/ipv4/ip_forward")
    246 
    247   group('Node2').exec("route add -net 192.168.3.0/24 gw 192.168.1.13")
    248   group('Node2').exec("route add -net 192.168.5.0/24 gw 192.168.4.11")
    249   group('Node2').exec("route add -net 192.168.6.0/24 gw 192.168.2.12")
    250   group('Node2').exec("echo 1 >  /proc/sys/net/ipv4/ip_forward")
    251 
    252   group('Node3').exec("route add -net 192.168.1.0/24 gw 192.168.3.13")
    253   group('Node3').exec("route add -net 192.168.4.0/24 gw 192.168.5.11")
    254   group('Node3').exec("echo 1 >  /proc/sys/net/ipv4/ip_forward")
    255 
    256   group('Node4').exec("route add -net 192.168.2.0/24 gw 192.168.3.12")
    257   group('Node4').exec("route add -net 192.168.4.0/24 gw 192.168.1.10")
    258   group('Node4').exec("route add -net 192.168.5.0/24 gw 192.168.3.12")
    259   group('Node4').exec("route add -net 192.168.6.0/24 gw 192.168.3.12")
    260   group('Node4').exec("echo 1 >  /proc/sys/net/ipv4/ip_forward")
    261 
    262   group('Node5').exec("route add -net 192.168.2.0/24 gw 192.168.6.12")
    263   group('Node5').exec("route add -net 192.168.1.0/24 gw 192.168.6.12")
    264   group('Node5').exec("route add -net 192.168.3.0/24 gw 192.168.6.12")
    265   group('Node5').exec("route add -net 192.168.4.0/24 gw 192.168.6.12")
    266   group('Node5').exec("route add -net 192.168.5.0/24 gw 192.168.6.12")
    267 
    268   info 'Routing setup finished'
    269   wait 5
    270   info 'Stopping applications'
    271   allGroups.stopApplications
    272   wait 1
    273   Experiment.done
    274 end
    275 }}}
    276 
    277 This script can be easily adapted if the experimenter wishes to set up the routing between the nodes
    278 differently.
    279 
    280 The script is executed from the user workspace as follows:
    281 
    282 {{{
    283 $ cd ~/Tutorials/GIMI/common/
    284 $ omf-5.4 exec --no-am -S gimiXX routing.rb
    285 }}}
    286 
    287 Where gimiXX has to be replaced by the slice name you are using for your experiment.
    288 
    289 You should see the following output after executing the omf command.
    290 
    291 {{{
    292 
    293 }}}
    294 
    295298----
    296299