= [.. Lab Zero: A First Experiment Using GENI] = {{{ #!html
Image Map
}}} == 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 === {{{ #!html
  1. To get login information for a VM from the Slice Jacks page, click on the node and scroll through the information on the left. In addition, depending on the configuration of your system, you may be able to click on the SSH button.
  2. However, to get login information for a VM from the Slice page, again click on the "slice page" link at the top of the page.
  3. This will bring you to the slice page and you can click on the "Details" button in your aggregate rectangle.



Slice Details
Figure 4-1 Get Login VM Details.
Login information for a VM
Figure 4-2 Login to a VM.
Tip To ssh from the command line on unix-based machines, do the following (substitute the values shown on the screen):
ssh USERNAME@HOSTNAME 
Tip To ssh from Windows machines, launch your favorite ssh client and substituting the values shown on the screen.
}}} == 5. Execute Experiment == === 5.1 Exercise A: Test Connectivity === ==== 5.1.1 Send IP traffic ==== The first simple experiment that we will run is to verify the IP connectivity between our hosts. a. Check the interfaces of your nodes. In the terminal type: {{{ sudo ifconfig }}} You should see at least three interfaces: * A single '''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. * The '''data interfaces'''. These are the interfaces that are used for sending experimental traffic. These interfaces connect 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 interfaces are the ones that have an IP address and mask that match what you configured before you reserved your resources.''' b. Fill in the worksheet, noting the name and IP address of the control and of the data interfaces for each node. {{{ #!html
Tip The command prompt on each node may say "NodeA", "NodeB", and "NodeC" respectively.
}}} c. From NodeA, `ping` the adjacent NodeB '''data plane interface'''. From the terminal window that is logged in to the client type : {{{ ping -c 5 }}} For example: {{{ ping 192.168.2.11 -c 5 }}} d. Now, `ping` the NodeB '''control plane interface'''. From the terminal window that is logged in to NodeA type : {{{ ping -c 5 }}} For example: {{{ ping 172.17.1.9 -c 5 }}} ==== 5.1.2 Install and use `iperf` ==== a. Install the `iperf` software on both NodeA and NodeB: {{{ sudo apt-get install iperf hash }}} b. Start an `iperf` server on NodeB: {{{ iperf -s }}} c. From NodeA, run an `iperf` client via the data plane: {{{ iperf -c }}} For example: {{{ iperf -c 192.168.2.11 }}} ''What is the bandwidth of this link?'' ''Why?'' d. On NodeA, run an `iperf` client via the control plane: {{{ iperf -c }}} For example: {{{ iperf -c 172.17.2.2 }}} ''What is the bandwidth of this link?'' ''Why?'' e. Type `CTRL-C` on NodeB to stop the `iperf` server. === 5.2 Exercise B: Configure Routing === {{{ #!html In this experiment you will learn how to set up static routing with the route command. In this exercise, you will setup the routing as indicated in the figure; i.e. packets from A sent to IP address 192.168.2.12 on node C should be routed via node B. In order to create this routing behavior you will need to modify the routing tables in your nodes using the linux route command . See the Tips section below for hints on how to complete the assignment.
We will use the following network topology for this experiment:
route topology

Questions:

  1. What happens when you traceroute from A to IP address 192.168.2.12 before you setup the static routes? Why?
    Include the output of the traceroute in your writeup
  2. Setup the routing from A to 192.68.2.12 so that it goes through B. Was it enough to just modify the routing tables? What else did you need to change in order for the traffic to flow? Ensure that you have connectivity by running a ping from A to 192.168.2.12
    In your writeup include all the commands you ran and a screenshot of the routing configuration
  3. What happens when you traceroute from A to IP address 192.168.2.12 after you setup the static routes?
    In your writeup include a screenshot of the traceroute output.
Tip
  • If you get a "Command not found " error when executing standard commands like `ifconfig` add `sbin` to your path:
           export PATH=$PATH:/sbin
        
  • Remember that you can use “ifconfig” to determine which Ethernet interface (e.g., eth0) is bound to what IP address at each of the nodes.
  • In order to enable IP forwarding of packets on a node you have to execute the following command:
    sudo sh -c 'echo 1 > /proc/sys/net/ipv4/ip_forward'
        
  • A new slice will always be in its initial state with NO routing set up!
  • A useful tool to debug the packet flow is tcpdump. In order to install it run:
           sudo apt-get install tcpdump
        
}}} === 5.3 Exercise C: Explore the Data and Control Planes === ==== 5.3.1 Bring down one of NodeB's data interfaces ==== a. 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 }}} {{{ #!html
ExoGENI The ExoGENI "neuca" service controls a variety of network configuration details.
}}} b. From NodeA, start pinging one of NodeB's '''data plane interfaces''': {{{ ping }}} c. On NodeB, bring down the '''data plane interface''' (being careful to disable the data interface NOT the control interface): {{{ sudo ifconfig down }}} ''After you bring down the data interface, the pings should indicate that the destination is unreachable.'' ''Why?'' {{{ #!html
Warning 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.3.2 Bring down NodeB's control interface ==== a. From NodeA, start pinging NodeB's '''control plane interface''': {{{ ping }}} b. From NodeB, bring down the '''control plane interface''' and try to ping it from NodeA: {{{ sudo ifconfig 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?'' {{{ #!html
Tip Unfortunately, in order to recover from a situation like this where you've lost the ability to login to your nodes, the only 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! ---- = [../DesignSetup Setup] = = [../Finish Next: Finish] =