Changes between Version 6 and Version 7 of GEC13Agenda/ExperimenterWorkflowTutorial/Tutorial


Ignore:
Timestamp:
03/12/12 20:30:18 (12 years ago)
Author:
nriga@bbn.com
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • GEC13Agenda/ExperimenterWorkflowTutorial/Tutorial

    v6 v7  
    870870For example for Alice that was assigned subnet 133 she would try :
    871871{{{
    872 }}}
    873    
     872ping 10.42.133.YYY
     873}}}
     874 
     875Since there is OpenFlow sliver configured yet to forward packets in your subnet, ping should fail.
     876
     877'''Ask us to give a slip of paper with the information about your OpenFlow sliver.'''
     878
    874879   * Personalize your rspec. There is a sample !OpenFlow rspec, under the rspecs
    875880folder ('''rspecs/openflow-tutorial-template.rspec'''), that you would need to
     
    893898   }}}
    894899
    895    
    896 
    897 === 1d. Deflect layer 2 ping using your controller ===
    898 For this exercise we have already reserved the hosts for you. There are two
    899 layer 2 ping servers running and one host that will be used as a client. You
    900 will need to login to the client using your key.
    901 {{{
    902 ssh -i ssh/gpousrXX_key inki@pg30.emulab.net
    903 }}}
    904 
    905 After you login run :
    906 {{{
    907 cd pingPlus
    908 }}}
    909 
    910 Run a layer two ping using each one of your two ethernet types. What do you
    911 notice?
    912 {{{
    913 sudo ./pingPlus 00:15:17:d4:64:c2 eth1.1750 <ETH_TYPE1>
    914 sudo ./pingPlus 00:15:17:d4:64:c2 eth1.1750 <ETH_TYPE2>
    915 }}}
    916 
    917 = IV. Exercise 3: Using Software Routers to Create Your Experiment Topology =
    918 In this exercise we are going to use a click router to bandwidth limit our
    919 traffic. For this we are going to use the protogeni host you
    920 reserved in the beginning.
    921 
    922 '''Note:''' If you are using one of the hosts pc1.gpolab.bbn.com,
    923 pc11.gpolab.bbn.com or pg30.emulab.net your node has already been
    924 reserved. Please call us to tell you how to access it. 
    925 
    926    * check that your sliver is ready
    927    {{{
    928    omni.py sliverstatus -a <AM_NICKNAME> gpousr##
    929    }}}
    930 
    931    * If your sliver is ready, run readyToLogin to figure out how to login to the
    932 node. (if your host is '''pg33''' please read the notes):
    933    {{{
    934    readyToLogin -a <AM_NICKNAME> gposlice##
    935    }}}
    936 
    937 
    938    '''NOTE 1:''' If your node is '''pg33.emulab.net''' then run
    939    {{{
    940    xterm -e xterm -e ssh -i ssh/gpousr##_key -F ssh/config gpousr##@pg33 & &
    941    }}}
    942    
    943    * Check to see that the software has been downloaded :
    944    {{{
    945    [alice@protogeni1 ~]$ ls
    946    config_dir  pingPlus click-2.0.1
    947    }}}
    948 
    949    * Configure the node. When you login to the node, the data interface of the
    950 host is not configured.
    951    {{{
    952     [alice@protogeni1 ~]$ /sbin/ifconfig
    953    }}}
    954    This should list only two interface, the loopback and the control interface.
    955 Part of the tarball that was downloaded, is a script that will configure the
    956 node, and compile the Layer 2 ping software. Run
    957    {{{
    958     ./config_dir/configure.sh
    959    }}}
    960    The output for Alice would look like
    961    {{{
    962 [alice@protogeni1 ~]$ ./config_dir/configure.sh
    963 DEVICE=eth1.1750
    964  USERCTL=no
    965  VLAN=yes
    966  IPADDR=10.42.131.146
    967  NETMASK=255.255.255.0
    968  BOOTPROTO=static
    969  ONBOOT=yes
    970 
    971 Added VLAN with VID == 1750 to IF -:eth1:-
    972 gcc    -c -o packetFunctions.o packetFunctions.c
    973 gcc    -c -o pingPlusListener.o pingPlusListener.c
    974 gcc  packetFunctions.o pingPlusListener.o  -o pingPlusListener
    975 gcc    -c -o pingPlus.o pingPlus.c
    976 gcc  packetFunctions.o pingPlus.o -o pingPlus
    977    }}}
    978    Verify that the data interface is up :
    979    {{{
    980    [alice@protogeni1 ~]$ /sbin/ifconfig
    981    }}}
    982    and note the name of the data interface, the data interface is the one that
    983 has an IP address in the 10.42.131.0/24 subnet:
    984    {{{
    985    eth1.1750 Link encap:Ethernet  HWaddr 00:1F:29:32:92:4D 
    986           inet addr:10.42.131.146  Bcast:10.42.131.255  Mask:255.255.255.0
    987           inet6 addr: fe80::21f:29ff:fe32:924d/64 Scope:Link
    988           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
    989           RX packets:118 errors:0 dropped:0 overruns:0 frame:0
    990           TX packets:115 errors:0 dropped:0 overruns:0 carrier:0
    991           collisions:0 txqueuelen:0
    992           RX bytes:5428 (5.3 KiB)  TX bytes:3482 (3.4 KiB)
    993 
    994    }}}
    995    In this case the name is 'eth1.1750'.
    996 
    997    * Configure the click router
    998    {{{
    999    cd click-2.0.1/conf
    1000    }}}
    1001    And edit the "gec12_conf.click" file to personalize it.
    1002    * '''IF_NAME''' is the name of the interface that was configured in the
    1003 previous step
    1004    * '''MAC_ADDRESS''' is the mac address of that interface.
    1005 
    1006    * Run the click router
    1007    {{{
    1008    cd ../userlevel/
    1009    sudo ./click ../conf/gec12_conf.click
    1010    }}}
    1011 
    1012    * Start the new controller. First of all kill the controller that is
    1013 currently
    1014    {{{
    1015    ps -ef |grep nox_core
    1016    sudo kill -9 <PID>
    1017    }}}
    1018    Start the new controller
    1019    {{{
    1020    ./nox_core -i ptcp:<PORT> -d mbox
    1021    }}}
    1022 
    1023    * On your two PL hosts install iperf by running :
    1024    {{{
    1025    sudo yum install iperf
    1026    }}}
    1027 
    1028    * And then on one host run the server
    1029    {{{
    1030    iperf -s -i 2
    1031    }}}
    1032    Run the client on the other host
    1033    {{{
    1034    iperf -c <host> -i 2
    1035    }}}
    1036 
    1037    Look how your traffic is capped.
     900   * Try pinging again
     901    {{{
     902       ping 10.42.<IP_SUBNET_OCT>.YYY
     903    }}}
     904
     905Notice how the first ping packets have higher delay than the subsequent packets.
     906This is because when the first packet goes through, the switches will ask your controller about how to handle the packet. Your controller will install a flow on the switch to handle this and all subsequent packets of the flow. The large delay reflects the roundtrip time between the switch and your controller. Subsequent packets will be forwarded directly by the switch based on the flow that your controller installed and thus their switching will be faster.
     907
     908=== 1d. Try the Layer 2 ping using your controller ===
     909Try running the Layer 2 ping that you did before but using the <ETH_TYPE> that was assigned to you, in your OpenFlow slip.
     910{{{
     911sudo /usr/local/bin/pingPlus 00:0c:29:7b:c5:b3 <interface_name> <ETH_TYPE>
     912}}}
     913
    1038914= V. Cleanup resources =
    1039915Although all your reservations, have expiration times, its always good practice
     
    1045921release the resources
    1046922{{{
    1047 omni.py deletesliver -a <AM URL> <username>slice
     923omni.py deletesliver -a <AM URL> sliceomni##
     924omni.py deletesliver -a <AM URL> sliceflack##
    1048925}}}
    1049926For Alice this would look like
    1050927{{{
    1051928# Delete ProtoGENI sliver
    1052 omni.py deletesliver -a http://www.emulab.net/protogeni/xmlrpc/am aliceslice
     929omni.py deletesliver -a pg-utan aliceslice
    1053930
    1054931# Delete MyPLC slivers
    1055 omni.py deletesliver -a https://myplc.stanford.edu:12346 aliceslice
     932omni.py deletesliver -a pl-stanford aliceslice
     933omni.py deletesliver -a pl-gpo aliceslice
    1056934
    1057935#Delete OpenFlow slivers
    1058  omni.py deletesliver -a
    1059 https://expedient-tutorial.gpolab.bbn.com:1443/openflow/gapi/1 aliceslice
     936 omni.py deletesliver -a of-tut aliceslice
    1060937}}}
    1061938
     
    1073950
    1074951=== 1a. Get a temporary account ===
    1075 To get a temporary account that will be deactivated on August 12th 2011, apply
     952To get a temporary account that will be deactivated on March 31st 2012, apply
    1076953for an account at this page https://www.pgeni.gpolab.bbn.com/joinproject.php3.
    1077954For Project name use : Gec11Gpo.