Version 68 (modified by 9 years ago) (diff) | ,
---|
Lab Zero: A First Experiment Using GENI
4. Configure and Initialize
Now that you have reserved your resources, you are ready to run your first GENI experiment.
4.1 Login to nodes
Note the login information for the two nodes (client and server) on the Slice page. Either click on the "Details" button or click on each node and find the SSH to information on the left (in the format |
Mac OS X/Linux
- In a command line terminal, start SSH by typing:
ssh -i <private key location> <username>@<hostname> -p <port number>
or alternatively, if your key is not added to the authentication agentssh -i <private key location> <username>@<hostname> -p <port number>
- Enter your passphrase you chose when generating your key pair when prompted. Note: If you are prompted for a password then something went wrong. Make sure that the login information and passphrase are correct.
Windows PuTTY
- Run PuTTY.
- On the Basic options screen, in the Host Name field enter:
<username>@<hostname>
- In the Port field enter: <port number>
- Make sure Connection type is: SSH
- Under the settings categories on the left navigate to Connection-> SSH ->Auth.
- Next to the "Private key file for authentication" field at the bottom, click Browse... and select the private key file you saved to your computer, and click Open.
- Click Open to establish the SSH connection.
- If prompted about whether you trust the host (key not cached in registry), click Yes.
- When prompted for the Passphrase enter the passphrase you chose when generating your key pair.
Windows FireSSH
After you Install FireSSH :
- Load this URL into firefox:
ssh://<username>@<hostname>:<port number>
- In the pop-up window, enter the passphrase you chose when generating your key pair in the (mislabeled) password field, and click Browse...
- Select the private key, and click Open.
- Click OK.
- If prompted about whether you trust the host (host key not cached in registry), click Yes.
5. Execute Experiment
5.1 Send IP traffic
The first simple experiment that we will run is to verify the IP connectivity between our hosts.
- Check the interfaces of your nodes. In each terminal type:
sudo ifconfig
You should see at least two interfaces:- The control interface. This is the interface you use to access the node, e.g. ssh into your host. The control interface is mainly used for control traffic, i.e. traffic for controlling the node and the experiment. (likely something like 172.17.1.9)
- The data interface. This is the interface that is used for sending experimental traffic. This is the interface that connects to the other hosts of your experiment through GENI. The links between these interfaces are the ones that allow you to run non-IP experiments. The data interface is the one that has an IP address and mask that match what you configured before you reserved your resources. (likely something like 10.10.1.2)
- Fill in the worksheet, noting the name and IP address of the control and of the data interfaces for each node.
The command prompt on each node may say "client" or "server" respectively. - From the client,
ping
the server data plane interface. From the terminal window that is logged in to the client type :ping <server data IP addr> -c 5
For example:ping 10.10.1.2 -c 5
- Now,
ping
the server control plane interface. From the terminal window that is logged in to the client type :ping <server control IP addr> -c 5
For example:ping 172.17.1.9 -c 5
5.2 Install and use iperf
- Install the
iperf
software on both nodes:sudo apt-get install iperf
- On both nodes run the hash command to ensure the new iperf command is accessable from the command line:
hash
- Start an
iperf
server on the server node:iperf -s
- Run an
iperf
client via the data plane:iperf -c <server data IP addr>
For example:iperf -c 10.10.1.2
What is the bandwidth of this link?
Why?
- Run an
iperf
client via the control plane:iperf -c <server control IP addr>
For example:iperf -c 172.17.2.2
What is the bandwidth of this link?
Why?
- Type
CTRL-C
on the server node to stop theiperf
server.
5.3 Bring down the server's data interface
- (Only run this step if you selected an ExoGENI aggregate when requesting resources) ExoGENI nodes run a service called "neuca" that managed network interfaces on the node. To manually adjust the IP address, we must first disable neuca on both nodes.
sudo service neuca stop
The ExoGENI "neuca" service controls a variety of network configuration details. - From the client node, start pinging the server data plane interface:
ping <server data IP addr>
- On the server node, bring down the data plane interface
(being careful to disable the data interface NOT the control interface):
sudo ifconfig <server data interface name> down
After you bring down the data interface, the pings should indicate that the destination is unreachable.
Why?
Be extra careful to disable the IP on the data interface, bringing down the IP on the control interface means that you will lose connectivity to your host. |
5.4 Bring down the server's control interface
- From the client node, start pinging the server control plane interface:
ping <server control IP addr>
- From the server node, bring down the control plane interface and try to ping it from the client node:
sudo ifconfig <server control interface name> down
Your ssh session should immediately hang.
Why?
After you bring down the control interface, the pings should indicate that the destination is unreachable. Why?
In general, in order to recover from a situation like this where you've lost the ability to login to your nodes, the best way to recover is to delete your resources and start again. |
6. Analyze Experiment
Now is when you would ordinarily analyze the results of your experiment.
6.1 Logout of your nodes
- Then type
exit
in your open terminal.
Congratulations you have run an experiment in GENI!