wiki:GENIEducation/SampleAssignments/IPRouting/Procedure

Version 35 (modified by sedwards@bbn.com, 6 years ago) (diff)

--

IPv4 Routing Assignment

Overview:

In this experiment you will learn how to set up static routing with the route command. We will use the following network topology for this experiment:
route topology
   

Prerequisites:

For this tutorial you need :

Tools:

All the tools will already be installed on your nodes. For your reference we are going to use:
   

Where to get help:

  • Take a look at the Tips section in the end of the exercise
  • Contact your TA and/or Professor for help. If you are doing this exercise outside the context of a course, please email help@geni.net

Design/Setup

1. Verify your Environment Setup:

This exercise assumes you have already setup your account at the GENI Portal. In particular ensure that:
  1. You can login to the GENI Portal
  2. You are a member of a GENI Project (there is at least a project listed under the ''Projects'' tab.
  3. You have setup your ssh keys (there is at least one key listed under the ''Profile->SSH Keys'' tab.

2. Setup the Topology:

  1. Login to the GENI Portal
  2. Reserve resources within this slice using the EG-3nodes-mesh rspec
Action:Take a screenshot of your slice when all the nodes are ready and include it in your write up


Execute

3. Setup the routing

The goal of this exercise is to setup the routing as indicated in Figure 1; i.e. packets from A send 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

Questions:

  1. What happens when you traceroute from A to IP address 192.168.2.12? 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.


Finish

4. Cleanup

After you are done with the exercise and you have captured everything requested for the writeup, you should release your resources so that other experimenters can use them. In order to cleanup your slice :
  1. In Flack, press the Delete button in the bottom of your canvas
  2. Select Delete at used managers and confirm your selection.
Wait and after a few moments all the resources will have been released and you will have an empty canvas again. Notice that your slice is still there. There is no way to delete a slice, it will be removed automatically after its expiration date, but remember that a slice is just an empty container so it doesn't take up any resources.

What to hand in:

  1. A screenshot of your slice when all the nodes are ready.
  2. The answers to questions 1-3.
  3. Screenshots of the output of the traceroute command invoked on Node A for IP 192.168.2.2 before and after the setup of static routes.
  4. Screenshots of the route table of Nodes A, B and C

Tips

  • 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
    

Attachments (1)

Download all attachments as: .zip