410 likes | 647 Views
Tutorial: OpenFlow in GENI with Instrumentation and Monitoring. Divya Bhat Shufeng Huang Niky Riga GENI Project Office GEC17. GENI Programmable Network. Key GENI concept: slices & deep programmability Internet: open innovation in application programs
E N D
Tutorial: OpenFlow in GENI with Instrumentation and Monitoring DivyaBhat Shufeng Huang Niky Riga GENI Project Office GEC17
GENI Programmable Network • Key GENI concept: slices & deep programmability • Internet: open innovation in application programs • GENI: open innovation deep into the network OpenFlow switches one of the ways GENI is providing deep programmability Good old Internet Slice 0 Slice 1 Slice 1 Slice 2 Slice 3 Slice 4
Racks and Campuses • GENI Rack projects are expanding available GENI infrastructure in the US. • Racks provide reservable, sliceable compute and network resources using Aggregate Managers. • GENI AM API compliance
GENI Rack Campuses Fundsin hand • 43 racks planned this year • Each rack has an OpenFlow-enabled switch Needs funding Oct. 24, 2012
Core Networks NLR committed to 2013 meso-scale expansion following reorganization Internet2 adding 10GbE paths to Advanced Layer 2 Services (AL2S) at 4 of 5 OpenFlow meso-scale/ProtoGENI Pops GENI Aggregate Manager in Internet2 AL2S and dynamic stitching with GENI coming in Spiral 5 Internet2 SDN networks
FOAM • An OpenFlow Aggregate Manager • It’s a GENI compliant reservation service • Helps experimenters reserve flowspace in the FlowVisor • Speaks AM API v1 • Rspecs GENI v3, OpenFlow v3 extension
OpenFlow Experiments Debugging OpenFlow experiments is hard: • Network configuration debugging requires coordination • Many networking elements in play • No console access to the switch Before deploying your OpenFlow experiment test your controller. http://mininet.github.com/ http://openvswitch.org/
OpenFlow common PitFalls • Controller is responsible for all traffic, not just your application! • ARP, DHCP, LLDP • Reactive controllers • UDP • Performance in hardware switches • Not all actions are supported in hardware • No STP • Broadcast storms
Part I: Design/Setup • Network Load Balancing and OpenFlow • Design your experiment • Obtain Resources • Part II: Execute • Configure and Initialize Services • Execute Experiment • Collect Measurements • Part III: Finish • Archive results • Teardown Experiment
Balanced Service • Balance load between two or more server providers • In networks Balance traffic between two or more paths Need to run load balancer in each decision point, i.e. within the network Picture from : www.inetu.ne
OpenFlow • The controller is responsible for populating forwarding table of the switch • Controller can get statistics directly from each switch: • per port • per flow • per table Any Host OpenFlow Controller OpenFlow Protocol (SSL/TCP) Switch Control Path OpenFlow Data Path (Hardware) Modified slide from : http://www.deutsche-telekom-laboratories.de/~robert/GENI-Experimenters-Workshop.ppt
Today’s Experiment • Two paths from source to destination • Balance traffic between the two paths so that: • Both paths are equally utilized • All TCP flows have similar performance Picture from : www.spacegamejunkie.com
Part I: Design/Setup • Network Load Balancing and OpenFlow • Design your experiment • Obtain Resources • Part II: Execute • Configure and Initialize Services • Execute Experiment • Collect Measurements • Part III: Finish • Archive results • Teardown Experiment
Design Your Experiment • Start OpenFlow Load Balancing Controller • Connect OpenFlow Switch to Controller • Start several TCP flows from Sender to Receiver VM VM VM LB R S OF Ctl SW Modified slide from : http://www.deutsche-telekom-laboratories.de/~robert/GENI-Experimenters-Workshop.ppt
Design Your Experiment in GIMI #start Load Balancing Controller Group('Switch').exec("/opt/trema-trema-f995284/trema run /root/load-balancer.rb") #connect OpenFlow Switch to Controller Group('Switch').exec(“ovs-vsctl set-controller br0 tcp:127.0.0.1 ptcp:6634:127.0.0.1") #start a couple of new TCP flows group('Receiver').exec("iperf -s") for i in 1..10 group('Sender').exec("iperf -c 10.10.10.2 -t 100") wait 5 end Modified slide from : http://www.deutsche-telekom-laboratories.de/~robert/GENI-Experimenters-Workshop.ppt
Monitor Your Experiment Monitor Total Traffic SW VM VM VM LB R S OF Ctl Throughput Modified slide from : http://www.deutsche-telekom-laboratories.de/~robert/GENI-Experimenters-Workshop.ppt
Part I: Design/Setup • Network Load Balancing and OpenFlow • Design your experiment • Obtain Resources • Part II: Execute • Configure and Initialize Services • Execute Experiment • Collect Measurements • Part III: Finish • Archive results • Teardown Experiment
Part I: Design/Setup • Network Load Balancing and OpenFlow • Design your experiment • Obtain Resources • Part II: Execute • Configure and Initialize Services • Execute Experiment • Collect Measurements • Part III: Finish • Archive results • Teardown Experiment
Configure and Initialize Services • Figure out the interfaces to monitor • Update GIMI Script to monitor the correct interface: left = ‘eth1’ right = ‘eth2’ • start Load Balancing Controller
Part I: Design/Setup • Network Load Balancing and OpenFlow • Design your experiment • Obtain Resources • Part II: Execute • Configure and Initialize Services • Execute Experiment • Collect Measurements • Part III: Finish • Archive results • Teardown Experiment
Execute Experiment • Follow Instructions on Tutorial page to execute your experiment on LabWiki • Pay attention to the output of your OpenFlow Controller:
Trema • Trema is NOT an OpenFlow Controller • Trema is a Programming Framework for implementing OpenFlow Controllers • Trema is a Platform to run OpenFlow Controllers • You need to: • Write your own controller using TremaAPI • Run your controller with Trema
TremaAPI • API for both C and Ruby • Event-triggered Functions: • start() iscalledwhencontrollerstartsup • switch_ready() iscalledwhenswitchconnects in • packet_in() iscalledwhen a packet isreceived • stats_reply() iscalledwhen a flowstatsreplymessageisreceived • ...... • More information about Trema API: • http://rubydoc.info/github/trema/trema/master/frames
TremaHelloWorld class HelloTrema < Controller defstart info “Hello Trema!” end defswitch_readydatapath_id info “Hello %#x!” % datapath_id end defpacket_indatapath_id, message send_flow_mod_add( datapath_id, :match => Match.from( message ), :actions => Trema::ActionOutput.new( OFPP_FLOOD ) ) end end Modified slide from : http://www.deutsche-telekom-laboratories.de/~robert/GENI-Experimenters-Workshop.ppt
Run Trema • ./trema run [controller] • e.g., ./trema run hello_trema.rb • Trema Advantage: • Simple, easy to write • You will need to write your own OpenFlow Controller in this tutorial using Trema (in Ruby)!
Part I: Design/Setup • Network Load Balancing and OpenFlow • Design your experiment • Obtain Resources • Part II: Execute • Configure and Initialize Services • Execute Experiment • Collect Measurements • Part III: Finish • Archive results • Teardown Experiment
Labwiki and OML • Developed by NICTA, used for GIMI (GENI Instrumentation and Measurement Infrastructure) • 3 Simple steps • Plan • Prepare • Execute • A video demonstration of LabWiki is available at http://labwiki.mytestbed.net/
Plan • Plan your Experiment • Write descriptions about steps to perform experiments, see and compare results • Lab notebook where graphs can be inserted • Editable for additional comments about results • Can be saved for future reference
Prepare • Write OMF Scripts • Simple Ruby like scripts that call OML-ified applications like ping, nmetrics and many more • Select from Existing templates • Edit the template • Save it as your own copy • Click and drag to the execute window when the script is ready
Execute • Run your Experiment • Enter Experiment name, slice name from the GENI Portal and set graph to true • Scroll to the bottom and Start Experiment • Logs are displayed. When the resources are turned ON, experiment begins • Scroll to the bottom and see the live graph • Drag and Drop Graph to Plan window to see live visualization in the “lab notebook”
Part I: Design/Setup • Network Load Balancing and OpenFlow • Design your experiment • Obtain Resources • Part II: Execute • Configure and Initialize Services • Execute Experiment • Collect Measurements • Part III: Finish • Archive results • Teardown Experiment
Collect and Archive Experimenter iRODS Automated 6.Obtain 5.Save 5.Save LabWiki 1.Instrument 4.Plot 4.Plot OML Server 0.Reserve 2.Run 2.Run 3.Collect 3.Collect GENI TestBed OMLClient
Archive - iRODs • Integrated Rule-Oriented Data System • LabWiki stores all experiment related data here. Your scripts, result data and the manifest Rspec is stored in a user-specific directory structure • Download iRODs client (already on VM) - https://www.irods.org/index.php/Downloads • Go to the GENI Portal, under Profile and Click iRODs account • Configure iRODs Environment • To view experiment related data, go to iDrop, web interface for viewing iRODs data (link on GENI Portal and enter user name and password as shown.
Part I: Design/Setup • Network Load Balancing and OpenFlow • Design your experiment • Obtain Resources • Part II: Execute • Configure and Initialize Services • Execute Experiment • Collect Measurements • Part III: Finish • Archive results • Teardown Experiment
Part III: Finish Experiment When your experiment is done, you should always release your resources. • Normally this is when you would archive your data • Delete your slivers at each aggregate sliver credentials sliver project RSpec resource user AM API aggregate certificate slice