Step By Step Guide for Using PlanetLab

Mofassir Ul Haque, Krzysztof Pawlikowski

The Department of Computer Science and Software Engineering

University of Canterbury

15 March, 2011

Introduction 1. There are many tutorials available on Internet about the use of PlanetLab. All these tutorials have primarily been written for audience with background knowledge of Linux and are difficult to comprehend. There is no comprehensive tutorial available for window users. This step by step PlanetLab guide has been written for individuals using windows operating system.

What is PlanetLab? 2. PlanetLab is a distributed test bed consisting of computers located in more than forty countries. It allows researchers to run their experiments in a real world scenario, on nodes which are thousands of miles apart. Important Terms 3. a. Principal Investigator. PI is the controller of PlanetLab nodes at a particular site and is responsible for everything being done by users of the site. He gives approval of new user accounts, creates slices, etc. b. Technical contact. He is responsible for installing PlanetLab operating system on new nodes, monitoring of nodes and day to day maintenance if required.

c. User.

Actual user who conducts experiment on PlanetLab.

d. PLC. It is an abbreviation for PlanetLab Central. PLC is the main controller of PlanetLab. They provide basic interface for controlling and managing slices and nodes. e. Site.

f.

A physical location where nodes have been kept e.g. University of Canterbury

Node. Actual computers provided by the participating universities / organizations. Minimum of two nodes have to be provided by each participating university / organization. Linux operating system runs on these computers.

g. Slice. It is a network wide resource container. A maximum of 10 slices can be created by Principal Investigator of a university and only two slices by Principal Investigator of an organization. Any number of Nodes can be added to a slice. Slices can only be created by Principal Investigator but users can add nodes to them.

h. Sliver. It is actual allocated resources on a node. Slivers are implemented using Linux – VServers.

Soft ware Needed to Connect with PlanetLab 4. Following software are required to access PlanetLab nodes using Microsoft Operating System. a.

Putty. It is used for making connection with remote PlanetLab node.

b.

Putty gen. It is used for generating public and private key pair.

c.

PSCP. It is used for transferring files to remote nodes.

5. All these software are executable programs therefore there is no need to install them. They can be downloaded for free from the address given below: http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html Creating New Account on PlanetLab 6. Go to PlanetLab’s web site i.e. (http://www.planet-lab.org/) and click on ‘create an account’.

7. Fill required information e.g. user name, password etc and select your own PlanetLab site in front of SITE entry. After completing the form, click register button. Form will be sent to your PI for approval. You need to ask your PI to approve your account request and create slice for you.

Creating/Uploading private key & Adding Nodes to Slice 8. You will receive an e-mail from PI, confirming the approval of your account. In order to communicate with PlanetLab nodes you need 7public/private key pair. Putty generator will be used for creating public and private key pair. Run putty gen by clicking on it. In putty generator GUI, select SSH-2 & 1024 as number of digits in key and then press generate key.

9. Click ‘Save private key’ and copy public key form putty generator window and save it in text file.

10. Go to PlanetLab’s web site and open your account using user name and password. Select ‘My Account’ sub menu and click on ‘Key’. It will display browse and upload option. Upload the text file containing the public key.

11. Open your account and go to ‘My Slices’. Click on your slice name. It will display list of nodes which are part of slice. Select and click in front of nodes which you want to add to your slice and click on ‘add selected’. It will only be possible if Principal Investigator has already created slice for you.

Connecting with Remote Nodes in your Slice 12. Putty will be required to connect with remote sites. Open putty by double clicking on it. Select session and write down IP address of the remote node. Assign this session a name in ‘Saved Sessions’ and click ‘Save’. Click on ‘Auth’ under ‘SSH’ category given on left plane. Browse and point to the place where file containing private key was saved. Click on ‘Open’. If everything goes fine, then a command comm window with active prompt & name of slice will open. You can type ‘pwd’ to see path of your current directory and ‘ls’ to list files’ names in this directory. At that moment, there will be no programs installed on the remote node.

Copying Program to Remote Node 13. Write a client program using C or C++ language which opens a socket connection with another computer and sends your message to it. Write a server program, which opens socket and waits for connection from client program and after establishing socket connection it replies back with a message. PSCP will be used to copy program to remote node. PSCP is command line tool. Open it in command prompt by typing PSCP. Syntax for copying file to remote node is as under :-

C:\>pscp -scp c:\file name plab:/home/canterbury_slice1 First part ‘-scp ’ is forcing PSCP to use scp protocol , second part ‘c:\file name’ is location and name of the file to be copied, third part ‘plab’ is name of session saved in Putty, and last part ‘/home/canterbury_slice1’ is location on remote node where the file has to be saved. This location can be found by typing ‘pwd’ (Present Working Directory) in command comm of remote node.

Executing Programs on Remote Node 14. In order to run C program, first install C compiler on remote node. This can be done by writing ‘sudo yum install gcc ‘on remote node command comm prompt. Once C compiler has been installed, compile your program at remote node using command ‘gcc -0 cient client.c’. It will generate an executable file with a name of client. Connect to another node and repeat the above procedure to create an executable program for server. You can now run a program by typing ‘. /program name’. First, run server program on one of the node and then run client program on another node if everything runs fine then server should reply back to you.

Conclusion This guide gives a head start to a new user of PlanetLab with Windows Operating System. In order to exploit full benefits of PlanetLab the best thing would be to learn Linux.