Changes between Initial Version and Version 1 of GENIEducation/HyperNets


Ignore:
Timestamp:
08/06/13 12:09:16 (11 years ago)
Author:
shuang@bbn.com
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • GENIEducation/HyperNets

    v1 v1  
     1[[PageOutline]]
     2= Hints about using GENI Infrastructure as well as other tools in the GENI system =
     3
     4== GPO Wiki ==
     5 - To find ppl: http://groups.geni.net/syseng/wiki/ContactInfo#CurrentGPOpeople
     6 - New Experiment Tutorial Template: http://groups.geni.net/geni/wiki/GENIEducation/SampleAssignments/Template/ExerciseLayout
     7
     8== ExoGENI ==
     9 - Support multiple lines of `execute` and `install` in the rspec file for one node?  ------ No It still does not support (as of 07/08/2013)
     10 - ExoGENI relies on neuca service to boot up NIC interfaces (or virtual network interfaces on KVM), which takes some time after the (virtual) machine is boot up
     11  - Sometimes when experimenter has its own post-boot scripts defined in Rspec, the neuca service failed to boot up the interfaces and assign IP addresses (defined in Rspec) to them.
     12  - In this case, you need to write your own script to automatically call "/usr/local/bin/neuca-netconf" to boot up and configure the interfaces
     13  - If your functional script relies on running interfaces, you need to write some supportive script to detect that the interfaces are up and running
     14  - an example can be found here: http://www.gpolab.bbn.com/experiment-support/OpenFlowExampleExperiment/software/writeifmap
     15 - ExoGENI uhvmsite: IP begin with 129
     16 - ExoGENI rcivmsite: IP begin with 152
     17 - ExoGENI fiuvmsite: IP begin with 131
     18 - ExoGENI bbnvmsite: IP begin with 192.1
     19
     20== About trace-oml2 ==
     21 - run trace-oml2 using the following command:
     22{{{
     23sudo trace-oml2 -i eth2 --oml-id eNodeB --oml-domain shufeng-t38-2013-07-03T17-03-28-04-00 --oml-collect tcp:emmy9.casa.umass.edu:3004
     24or use a configuration file:
     25sudo trace-oml2 -i eth2 --oml-config OpenFlowTutorial.eNodeB.xml
     26The xml file can be something like the following:
     27<omlc id="switch_left" encoding="binary">
     28  <collect url="tcp:emmy9.casa.umass.edu:3004"name="traffic">
     29    <stream mp="ip" interval="1">
     30      <filter field="ip_len" operation="sum" rename="throughput" />
     31    </stream>
     32  </collect>
     33</omlc>
     34}}}
     35 - trace-oml2 also supports a filter option "-f" or "--filter" that user can define what kind of packets they are particularly interested.
     36  - http://linux.die.net/man/7/pcap-filter shows how to write a filter
     37
     38== Postgresql ==
     39!LabWiki uses Postgresql to store experimental data for in the OMF/OML system.
     40{{{
     41psql -h locahost -U oml -d shufeng-t38-2013-07-03T17-03-28-04-00(your experiment name)       -> to log into the database corresponding to your experiment
     42\dt       -> show all tables in that database
     43connect shufeng-t38-2013-07-03T17-03-28-04-00         -> connect to another database
     44}}}
     45
     46== All about !LabWiki ==
     47 - To set up the new !Labwiki:
     48  - git clone https://github.com/geni-gimi/GIMI.git
     49  - install iRods from www.irods.org
     50  - create an irods account from GENI portal
     51  - run gimi_init.py from the GIMI.git you cloned in the 1st step
     52
     53 - Server side log files:
     54{{{
     55OMF Log: /tmp/[experiment-name].log ..
     56OML log: /var/log/oml2-server.log
     57}}}
     58 - Client side log file:
     59{{{
     60/var/log/omf-resctl.log
     61}}}
     62 - To plot multiple graphs on !LabWiki?
     63  Simply define more graphs using `defGraph`. The defProperty('graph', true, "Display graph or not") will control whether or not to display all defined graphs.
     64 - For the current !LabWiki to work with oml v. 2.10.0 : (as of 07/08/2013)
     65  - Do not use "uint64" (and some other data types) in your definition of trace/iperf/nmetrics
     66  - rename your trace/iperf/nmetrics application using, e.g., :
     67  {{{
     68  cp /usr/bin/trace-oml2 /usr/bin/trace
     69  }}}
     70 - To write oml configure XML files: http://oml.mytestbed.net/doc/oml/latest/liboml2.conf.5.html
     71 - To write specific SQL queries: http://sequel.rubyforge.org/rdoc/files/doc/querying_rdoc.html
     72
     73== Traffic Control ==
     74{{{
     75tc qdisc add dev eth2 root handle 1:0 netem delay 100ms loss 5%
     76tc qdisc add dev eth2 parent 1:0 tbf rate 20mbit buffer 20000 limit 16000
     77}}}
     78It seems that tc qdisc tbf does not work well (in terms of controlling the throughput of TCP flows) on ovs when ovs switch is connected with a controller. [[BR]]
     79Instead, we use ovs-vsctl:
     80{{{
     81ovs-vsctl set Interface eth2 ingress_policing_rate=1000
     82ovs-vsctl set Interface eth2 ingress_policing_burst=100
     83}}}
     84The above sets the ingress rate to be in 900kbps-1100kbps. [[BR]]
     85To set it back to no rate control, use:
     86{{{
     87ovs-vsctl set Interface eth2 ingress_policing_rate=0
     88}}}
     89
     90It is a little bit tricky to configure delay/loss on an OpenVZ virtual machine [[BR]]
     91Step 1: find our qdisc family number by executing "sudo /sbin/tc qdisc", a sample output could be like the following:
     92{{{
     93[shufeng@center ~]$ sudo /sbin/tc qdisc
     94qdisc htb 270: dev mv6.47 root refcnt 2 r2q 10 default 1 direct_packets_stat 0
     95qdisc netem 260: dev mv6.47 parent 270:1 limit 1000
     96qdisc htb 150: dev mv6.41 root refcnt 2 r2q 10 default 1 direct_packets_stat 0
     97qdisc netem 140: dev mv6.41 parent 150:1 limit 1000
     98qdisc htb 190: dev mv6.43 root refcnt 2 r2q 10 default 1 direct_packets_stat 0
     99qdisc netem 180: dev mv6.43 parent 190:1 limit 1000
     100qdisc htb 230: dev mv6.45 root refcnt 2 r2q 10 default 1 direct_packets_stat 0
     101qdisc netem 220: dev mv6.45 parent 230:1 limit 1000
     102}}}
     103Now if the ethernet card you want to change is mv6.43, you can find from following line:
     104{{{
     105qdisc htb 190: dev mv6.43 root refcnt 2 r2q 10 default 1 direct_packets_stat 0
     106qdisc netem 180: dev mv6.43 parent 190:1 limit 1000
     107}}}
     108As a result, you change the delay/loss by executing the following:
     109{{{
     110sudo /sbin/tc -s qdisc change dev mv6.43 parent 190:1 handle 180: netem limit 1000 delay 100ms loss 5%
     111sudo /sbin/tc -s qdisc change dev mv6.43 parent 190:1 handle 180: netem limit 1000
     112}}}
     113
     114== OpenVSwitch Commands ==
     115{{{
     116ovs-vsctl add-br br0
     117ovs-vsctl add-port br0 eth2
     118ovs-vsctl set-fail-mode br0 standalone   (when loses connection with the controller, the switch acts as a normal switch)
     119ovs-vsctl set-fail-mode br0 secure    (when loses connection with the controller, the switch wont forward any packets)
     120ovs-vsctl set bridge br0 datapath_type=netdev   (without kernel support, if the vswitch is gonna be used in userspace)
     121}}}
     122
     123== git Commands ==
     124{{{
     125git clone [url]
     126git add -A . (add all files and folders in the current directory)
     127git commit -m "commit message"
     128git status (to check the status of your local copy)
     129git fetch origin
     130git merge origin/master
     131git push origin master (upload your local copy to master (global) repository)
     132}}}
     133
     134== OpenFlow Trema ==
     135To restart Trema controller as well as the attached switch:
     136{{{
     1371. kill trema process: kill $(pidof ruby)
     1382. delete lock file: rm /opt/trema...../tmp/pid/controller.pid  (controller is the name of your controller, in the case of Load Balancing, its `Load_Balancer`)
     1393. unlink the switches from controller: ovs-vsctl del-controller br0
     1404. start controller: /opt/trema....../trema run controller.rb (controller is the name of your controller, in the case of Load Balancing, its  load_balancer.rb)
     1415. link switches to the controller: ovs-vsctl set-controller br0 tcp:127.0.0.1
     142 (might need to wait for 2 seconds for the switch to connect to the controller, to verify that, print something in the "switch_ready" function so that you can see the output when switch is connected)
     143}}}