wiki:GENIExperimenter/Tutorials/jacks/GetStart_PartI_IPRoute/Procedure/Execute

Version 12 (modified by sedwards@bbn.com, 9 years ago) (diff)

--

Lab Zero: A First Experiment Using GENI

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

  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: Configure Routing

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.2 Exercise B: Explore the Data and Control Planes

5.2.1 Send IP traffic

The first simple experiment that we will run is to verify the IP connectivity between our hosts.

  1. 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.
  2. Fill in the worksheet, noting the name and IP address of the control and of the data interfaces for each node.
    Tip The command prompt on each node may say "NodeA", "NodeB", and "NodeC" respectively.
  3. From NodeA, ping the adjacent NodeB data plane interface. From the terminal window that is logged in to the client type :
        ping <NodeB data IP addr> -c 5
    
    For example:
        ping 192.168.2.11 -c 5
    
  4. Now, ping the NodeB control plane interface. From the terminal window that is logged in to NodeA type :
        ping <NodeB control IP addr> -c 5
    
    For example:
        ping 172.17.1.9  -c 5
    

5.2.2 Install and use iperf

  1. Install the iperf software on both NodeA and NodeB:
        sudo apt-get install iperf
        hash
    
  1. Start an iperf server on NodeB:
        iperf -s
    
  2. From NodeA, run an iperf client via the data plane:
        iperf -c <NodeB data IP addr>
    
    For example:
        iperf -c 192.168.2.11
    

What is the bandwidth of this link?

Why?

  1. On NodeA, run an iperf client via the control plane:
    iperf -c <NodeB control IP addr>
    
    For example:
    iperf -c 172.17.2.2
    

What is the bandwidth of this link?

Why?

  1. Type CTRL-C on NodeB to stop the iperf server.

5.2.3 Bring down the server's data interface

  1. 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
    
    ExoGENI The ExoGENI "neuca" service controls a variety of network configuration details.
  2. From the client node, start pinging the server data plane interface:
        ping <server data IP addr> 
    
  3. 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?

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.2.4 Bring down the server's control interface

  1. From the client node, start pinging the server control plane interface:
        ping <server control IP addr>
    
  2. 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?

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!


Setup

Next: Finish