Addressing and Routing on Emulab

Due date

Check the course schedule for the due date.

Introduction

In this lab you will create an emulated network using the Emulab environment.  Using an emulator allows one to prototype network architectures and performance. In this lab, you will investigate addressing and routing.

Goals

Acknowledgments

This lab is based on experiment 15 from Hands-On Networking with Internet Technologies by Douglas Comer (2nd edition, 2005).

References

RFCs 950, 4632

Logistics

This is an individual project in that each student will have their own network developed within Emulab.  It is expected that you will talk to other students, faculty, etc., about the project, but you are to create your own network specification using NS.

You will have the entire break to complete this assignment. You may wish to start early to allow time to acquire the necessary Emulab resources.

Preparation

You should already have a login for the Emulab project CSC364-2009S. Please terminate your old experiments if you are done with them.

Assignment

Part A: Subnetting

  1. Create an ns file to configure the following network. Don't start your experiment just yet.

    Your network will include four LANs.  LAN A is connected to LAN B by a router and to LAN C by another router.  LAN B is connected to LAN C by another router and LAN C is connected to LAN D by another router.  In addition to the routers, each LAN has two other hosts.

  2. With pencil and paper, plan the addressing scheme for your network.

    1. Use the IP address 192.168.0.0 as the overall network address.

    2. Use the third octet to assign a unique subnet addresses to each of the four LANs.

    3. In assigning each router interface, detemine a 'standard' method of assigning router IP addresses on each subnet.  What approach is used on the MathLAN? (Hint: Use netstat -r -n and look at the default route.)

  3. Modify your ns file to specify an address for each interface using the command tb-set-ip-lan, which is documented here.

  4. Finally, run your ns file as a new experiment! When you are successful, paste your ns file and the visualization of the resulting network into your lab notebook.
  5. Use netstat -r -n, ping, and traceroute to check out your network. (Don't go overboard; checking a few paths should suffice.) Record these exchanges using script and paste them into your notebook.

Part B: Enabling RIP

  1. Enable routing using RIP as follows.
    1. Disable static routing by commenting out the appropriate line in the ns file.
    2. For each router, add a line of the following form to your ns file:
      tb-set-node-startcmd $routerName "/proj/CSC364-2009S/router-startup"
    3. For each host, add a line of the following form to your ns file:
      tb-set-node-startcmd $nodeName "/proj/CSC364-2009S/host-startup <net-address> <netmask> <router-name>"

      net-address should be the address of your network, 192.168.0.0.  Normally this would be a default route, but you need to be able to ssh to your nodes over the Internet!

    The result of adding these lines is to run scripts located in the /proj/CSC364-2009S directory upon startup of each node. I wrote these scripts, and you will look at them later. LET ME KNOW IF YOU RUN INTO PROBLEMS WITH THIS!

    Note that my files assume your routers are named routerA, routerB, routerC, and routerD.  If you've given them different names, you should make your own copies of the files router-startup, host-startup, and gated.conf in your Emulab home directory, /users/<username>. 

  2. Restart your experiment.
  3. Use netstat -r -n, ping, and traceroute to check out your network.  Record these exchanges using script and paste them into your notebook.

  4. On one of the nodes, examine the contents of the /proj/CSC364-2009S directory. Answer the following questions.
    1. What does the router-startup script do?
    2. What does the host-startup script do?
    3. What seems to be the purpose of the gated.conf file?

Part C: Experiments with RIP

  1. Read about Emulab's event interface in the advanced tutorial

  2. Take a router down by executing a following command of the following form: tevc -e proj/exp now routerAB down

  3. Use netstat -r -n, ping, and traceroute to see how routes have changed as a result of this change in network connectivity. Record these exchanges using script and paste them into your notebook.

  4. Bring the router back up and see whether the original routes are restored.

Part D: CIDR

  1. Consider the CIDR block 192.186.0.0/13.  Use 9 additional bits (beyond the /13 prefix) for subnet addressing, and assign a unique subnet address to each of the 5 networks in your intranet.  Write down the addresses in CIDR notation.

  2. Assign an IP address to each router interface, and configure each router with an address and mask for each of its interfaces.

  3. Configure the routing table in each router with next-hop information for each of the five possible destination networks. (Do not enable automatic routing update protocols).

  4. Assign each host an IP address, and configure each host to know its address.

  5. Use ping and traceroute to checkout your network.  Record these exchanges using script.

WHEN YOU ARE DONE, PLEASE SWAP OUT YOUR EXPERIMENT SO THAT OTHERS CAN USE YOUR NODES!

Assessment

To earn a B, complete parts A and B and answer the discussion questions.
To earn a B+, also complete part C.
To earn an A, also complete part D.

Advice

Emulab is a shared resource used by many schools and research labs.   Thus, you might have to schedule your time to ensure that you can get particular resources. That is especially true for this assignment, which will require a total of 12 nodes!

Lab Notebook

Include your ns file, a visualization of your network, answers to any questions embedded in the lab exercises, and appropriate script sessions.

Discussion Questions

  1. Use whois to find out who owns the 192.168.0.0 class B address block. Why do you think I asked you to use this as the address for your network?

  2. Why do you think I did not have you change the default route for your nodes? (Hint: Look back at the default route in the output you got from netstat -r -n. What was the address of the default router?)

  3. P&D exercise 4.26
  4. How long did you spend on this lab? How did you spend your time?

WHEN YOU ARE DONE, PLEASE SWAP OUT YOUR EXPERIMENT SO THAT OTHERS CAN USE YOUR NODES!

Janet Davis (davisjan@cs.grinnell.edu)

Created March 11, 2009
Last revised April 2, 2009