Sponsored by the National Science Foundation 1 Lab Zero – November 6, 2014 Are you ready for the...

download Sponsored by the National Science Foundation 1 Lab Zero – November 6, 2014 Are you ready for the tutorial? 1.Grab a Worksheet and instructions 2.Did you.

If you can't read please download the document

Transcript of Sponsored by the National Science Foundation 1 Lab Zero – November 6, 2014 Are you ready for the...

  • Slide 1
  • Sponsored by the National Science Foundation 1 Lab Zero November 6, 2014 Are you ready for the tutorial? 1.Grab a Worksheet and instructions 2.Did you do the pre-work? A. Do you have an account? B. Have you installed the tools? * SSH * omni GENI Portal is at: http://portal.geni.net 3.Connect to the network Connect to MSU-Visitor Mac Users: a.Browse to: https://1.1.1.1/login.html b.Enter your e-mail address
  • Slide 2
  • Sponsored by the National Science Foundation Lab Zero: A First Experiment using GENI Sarah Edwards GENI Project Office
  • Slide 3
  • Sponsored by the National Science Foundation 3 Lab Zero November 6, 2014 Hands On Exercise Do a Simple Experiment in GENI Reserve three VMs connected at Layer 2 Layer 2 VM
  • Slide 4
  • Sponsored by the National Science Foundation 4 Lab Zero November 6, 2014 Understand GENI Terminology slice project aggregate experimenter resource
  • Slide 5
  • Sponsored by the National Science Foundation 5 Lab Zero November 6, 2014 Use the GENI Portal and Flack
  • Slide 6
  • Sponsored by the National Science Foundation 6 Lab Zero November 6, 2014 Use the GENI Portal and Jacks
  • Slide 7
  • Sponsored by the National Science Foundation 7 Lab Zero November 6, 2014 Experiment Workflow Part I: Design/Setup Part II: Execute Part III: Finish
  • Slide 8
  • Sponsored by the National Science Foundation 8 Lab Zero November 6, 2014 The GENI Portal is A web-based tool for experimenters to manage experimenters, projects, and slices. Includes simple tools to reserve resources. More to come in the future.
  • Slide 9
  • Sponsored by the National Science Foundation 9 Lab Zero November 6, 2014 Jacks and jFed are Graphical user interfaces (GUIs) for: designing topologies in GENI reserving resources in GENI
  • Slide 10
  • Sponsored by the National Science Foundation 10 Lab Zero November 6, 2014 Experimenter An experimenter is a researcher who uses GENI resources Different types of experimenters have different roles and permissions: Advisor vs Grad Student Teacher vs TA vs Student Experimenter
  • Slide 11
  • Sponsored by the National Science Foundation 11 Lab Zero November 6, 2014 Projects Projects organize research in GENI Project Lead Members Slice Projects contain both people and their experiments A project is led by a single responsible individual: the project lead Today we will use a project created for this class
  • Slide 12
  • Sponsored by the National Science Foundation 12 Lab Zero November 6, 2014 Experiment Workflow Part I: Design/Setup Part II: Execute Part III: Finish
  • Slide 13
  • Sponsored by the National Science Foundation 13 Lab Zero November 6, 2014 Part I: Establish Management Environment 1 Pre-work: Design your experiment 2.1 Pre-work: Create a GENI account 2.2 Pre-work: Project lead (aka professor) adds you to project Project Name: MSUWorkshop 2.3 Generate and Download SSH Keypair
  • Slide 14
  • Sponsored by the National Science Foundation 14 Lab Zero November 6, 2014 Creating a GENI account GENI Portal is at: https://portal.geni.net Instructions for creating an account are: http://groups.geni.net/geni/wiki/SignMeUp
  • Slide 15
  • Sponsored by the National Science Foundation 15 Lab Zero November 6, 2014 InCommon For many experimenters: no new passwords familiar login screens Leverage InCommon for single sign-on authentication Experimenters from 304 educational and research institutions have InCommon accounts
  • Slide 16
  • Sponsored by the National Science Foundation 16 Lab Zero November 6, 2014 Expiration and renewal slice expiration time project expiration time each resource expiration time slice expiration time each resource expiration time aggregates max expiration project slice resource (optional) project expiration time slice expiration time resource expiration time now In general, to extend the lifetime of your resource reservation, you must renew the slice and all resources resource
  • Slide 17
  • Sponsored by the National Science Foundation 17 Lab Zero November 6, 2014 Using SSH with a public/private keypair Login to all GENI compute resources using ssh with a private key 1.The public key is loaded onto the node when you reserve resources. 2.You provide the private key when you log into the node. There are several ways to offer your private key to ssh. You should never be prompted for a password to log into a GENI compute node. If you are, something has always gone wrong. No password!
  • Slide 18
  • Sponsored by the National Science Foundation 18 Lab Zero November 6, 2014 SSH with a password ssh Experimenter local> ssh [email protected] [email protected] password: ######## Welcome to remote! jdoe@remote> exit local> ssh [email protected] [email protected] password: ######## Hash of password stored on each remote machine User enters password once for each connection to each machine *nix-based system (Windows behavior may vary)
  • Slide 19
  • Sponsored by the National Science Foundation 19 Lab Zero November 6, 2014 SSH with a private key Experimenter local> ssh-add ~/.ssh/id_rsa Enter passphrase for ~/.ssh/id_rsa: ######## local> ssh [email protected] Welcome to remote! jdoe@remote> exit local> ssh [email protected] Welcome to remote2! jdoe@remote2> exit local> ssh [email protected] Welcome to remote3! jdoe@remote3> exit ssh Public key is stored on each remote machine User enters passphrase to unlock private key for all connections to all machine Private key is stored only on local machine *nix-based system (Windows behavior may vary)
  • Slide 20
  • You are here Projects Slices Log Messages HelpProfile Tools Map
  • Slide 21
  • 2 Login Join Project Generate SSH Keys & SSL Certs
  • Slide 22
  • On your local machine > mv ~/Downloads/id_geni_ssh_rsa ~/.ssh/. > chmod 600 ~/.ssh/id_geni_ssh_rsa > ssh-add ~/.ssh/id_geni_ssh_rsa 2
  • Slide 23
  • Sponsored by the National Science Foundation 23 Lab Zero November 6, 2014 Resource A resource is a piece of infrastructure A resource can be real or virtual. Resource specifications (aka. RSpecs) are used to describe and request resources. Examples: Compute: computer vs virtual machine (VM) Wireline Network: VLAN or OpenFlow Wireless: WiMAX
  • Slide 24
  • Sponsored by the National Science Foundation 24 Lab Zero November 6, 2014 Aggregate An aggregate manages a set of reservable resources Aggregates include: GENI racks OpenFlow WiMAX InstaGENI RackExoGENI Rack
  • Slide 25
  • Sponsored by the National Science Foundation 25 Lab Zero November 6, 2014 Slice A slice is a container of resources used in an experiment. A slice can contain resources from one or more aggregates A slice is in a single project A slice has an expiration Slice names are public, reusable and unique (within a project)
  • Slide 26
  • Sponsored by the National Science Foundation 26 Lab Zero November 6, 2014 Experimenter (aka Student) Putting it all together slice aggregate project Member: Lead: Experimenter (aka Professor) Layer 2 resource
  • Slide 27
  • Sponsored by the National Science Foundation 27 Lab Zero November 6, 2014 slice Part I continued: Obtain Resources 3.1 Create a slice 3.2 (optional) Renew your slice 3.3 Reserve three VMs at one aggregate 3.4 Check Whether VMs are Ready to be Used Layer 2 VM
  • Slide 28
  • 3.1 Create Slice
  • Slide 29
  • 3.2 Extend slice expiration
  • Slide 30
  • 3.3 Launch tool
  • Slide 31
  • Launch Tool 3.3
  • Slide 32
  • Draw three VMs connected in a triangle 3.3
  • Slide 33
  • Change names of VMs 3.3
  • Slide 34
  • Set IP and mask of interfaces
  • Slide 35
  • 3.3 Reserve resources Bind to an Aggregate Select a Slice
  • Slide 36
  • Resources are READY!!! 3.4
  • Slide 37
  • Sponsored by the National Science Foundation 37 Lab Zero November 6, 2014 Experiment Workflow Part I: Design/Setup Part II: Execute Part III: Finish
  • Slide 38
  • Sponsored by the National Science Foundation 38 Lab Zero November 6, 2014 Part II: Execute Experiment 4.1 Login to all three nodes 5.1 Exercise A: Test Connectivity 5.2 (optional) Exercise B: Configure Routing 5.3 Exercise C: Explore the Data and Control Planes 6.1 Logout of nodes Internet Data Interfaces Control Interfaces ssh Layer 2 Experimenter serverclient
  • Slide 39
  • Login 4.1
  • Slide 40
  • $ sudo ifconfig $ ping 192.168.1.11 c 5 # server data i/f $ ping 172.17.1.9 c 5 # server ctrl i/f $ sudo ifconfig NodeB/ NodeC NodeA 5.1
  • Slide 41
  • Worksheet Slice Name: lab0 5.1 NodeA eth___ 192.168.1.10 ___.___.___.___ NodeB eth___ 192.168.1.11 ___.___.___.___ Data i/f Control i/f Data i/f Control i/f Internet Control plane switch Data plane switch GENI Rack
  • Slide 42
  • $ sudo apt-get install iperf $ hash # server data i/f $ iperf c 192.168.1.11 # server ctrl i/f $ iperf c 172.17.2.4 $ sudo apt-get install iperf $ hash # start an iperf server $ iperf -s NodeB NodeA 5.1
  • Slide 43
  • What is the bandwidth of the data link? Why? What is the bandwidth of the control link? Why? NodeA eth___ 10.1.1.1 ___.___.___.___ NodeB eth___ 10.1.1.2 ___.___.___.___ Data i/f Control i/f Data i/f Control i/f Internet Control plane switch Data plane switch GENI Rack
  • Slide 44
  • Demo here
  • Slide 45
  • 5.2 Configure routing eth___
  • Slide 46
  • 5.2 Configure a static route route add -net 192.168.1.0 netmask 255.255.255.0 gw 192.168.1.1 dev eth0 In above command: add -Indicates that the route is added to routing table. -net -Indicates that desination is a network. 192.168.0.1 -Indicates IP address of destination network. netmask -Indicates the subnetmask of destination network. From: https://www.hscripts.com/tutorials/linux-commands/route.html sudo sh -c 'echo 1 > /proc/sys/net/ipv4/ip_forward' Configure IP routing
  • Slide 47
  • # ping server data i/f $ ping 192.168.1.11 # ping server ctrl i/f $ ping 172.17.2.4 $ exit # For ExoGENI only do: $ sudo service neuca stop # bring down data i/f $ sudo ifconfig eth12541 down # bring down ctrl i/f $ sudo ifconfig eth999 down NodeB NodeA 5.3
  • Slide 48
  • Demo here
  • Slide 49
  • 5.3 When you bring down the data interface, the destination should become unreachable. Why? NodeA eth___ 10.1.1.1 ___.___.___.___ NodeB eth___ 10.1.1.2 ___.___.___.___ Data i/f Control i/f Data i/f Control i/f Internet Control plane switch Data plane switch GENI Rack
  • Slide 50
  • 5.3 After you bring down the control interface, the destination becomes unreachable. Why? NodeA eth___ 10.1.1.1 ___.___.___.___ NodeB eth___ 10.1.1.2 ___.___.___.___ Data i/f Control i/f Data i/f Control i/f Internet Control plane switch Data plane switch GENI Rack
  • Slide 51
  • 5.3 After you bring down the control interface, your ssh session should immediately hang. Why? NodeA eth___ 10.1.1.1 ___.___.___.___ NodeB eth___ 10.1.1.2 ___.___.___.___ Data i/f Control i/f Data i/f Control i/f Internet Control plane switch Data plane switch GENI Rack
  • Slide 52
  • Sponsored by the National Science Foundation 52 Lab Zero November 6, 2014 You are trying to log in to a compute node on GENI using SSH and cant. Which are possible explanations? a)You entered the wrong password b)You didnt offer the private key that matches the public key c)The public key wasnt loaded onto the node d)Permissions on the private key are too permissive e)(b), (c), and (d)
  • Slide 53
  • Sponsored by the National Science Foundation 53 Lab Zero November 6, 2014 Experiment Workflow Part I: Design/Setup Part II: Execute Part III: Finish
  • Slide 54
  • Sponsored by the National Science Foundation 54 Lab Zero November 6, 2014 Finish Dont Delete YET!!! We will clean up later
  • Slide 55
  • Delete Resources 7
  • Slide 56
  • Sponsored by the National Science Foundation 56 Lab Zero November 6, 2014 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 resources at each aggregate slice project aggregate experimenter resource
  • Slide 57
  • Sponsored by the National Science Foundation 57 Lab Zero November 6, 2014 Congratulations! You have Run your first GENI Experiment! Exercised your knowledge of GENI terminology Used the GENI Portal and Flack
  • Slide 58
  • Sponsored by the National Science Foundation 58 Lab Zero November 6, 2014 Welcome to GENI!
  • Slide 59
  • Sponsored by the National Science Foundation 59 Lab Zero November 6, 2014 Backups
  • Slide 60
  • Sponsored by the National Science Foundation 60 Lab Zero November 6, 2014 NodeA eth___ 192.168.1.10 ___.___.___.___ NodeB eth___ 192.168.1.11 ___.___.___.___ Data i/f Control i/f Data i/f Control i/f Internet Control plane switch Data plane switch GENI Rack
  • Slide 61
  • Sponsored by the National Science Foundation 61 Lab Zero November 6, 2014 eth___
  • Slide 62
  • Sponsored by the National Science Foundation 62 Lab Zero November 6, 2014 NodeA eth___ 192.168.1.10 ___.___.___.___ eth___ 192.168.1.11 ___.___.___.___ NodeB Control i/f Internet Control plane switch GENI Rack NodeC eth___ 192.168.3.12 Data plane switch 192.168.2.12 192.168.2.11 eth___ 192.168.3.10
  • Slide 63
  • Sponsored by the National Science Foundation 63 Lab Zero November 6, 2014 NodeA eth___ 192.168.1.10 ___.___.___.___ eth___ 192.168.1.11 ___.___.___.___ NodeB Control i/f Internet Control plane switch GENI Rack NodeC eth___ 192.168.3.12 Data plane switch 192.168.2.12 192.168.2.11 eth___ 192.168.3.10
  • Slide 64
  • Sponsored by the National Science Foundation 64 Lab Zero November 6, 2014 NodeA eth___ 192.168.1.10 ___.___.___.___ eth___ 192.168.1.11 ___.___.___.___ NodeB Control i/f Internet Control plane switch GENI Rack NodeC eth___ 192.168.3.12 Data plane switch 192.168.2.12 192.168.2.11 eth___ 192.168.3.10
  • Slide 65
  • Sponsored by the National Science Foundation 65 Lab Zero November 6, 2014 Data plane switch NodeA eth___ 192.168.1.10 ___.___.___.___ eth___ 192.168.1.11 ___.___.___.___ NodeB Control i/f Internet Control plane switch GENI Rack NodeC eth___ 192.168.3.12 192.168.2.12 192.168.2.11 eth___ 192.168.3.10