CS183 Lab 6: Routing

Goal: In this lab, you will learn how to setup a simple Linux-based router.

Details: You will need to use 2 VMs, each with two Ethernet interfaces. You will need to disable the primary interface (eth0) from one VM, the Host VM, and route all the traffic from this VM via another VM, the Router VM. You will use tools like ping, traceroute and tcpdump to make sure this is the case.

There are several ways of creating two VMs we need for this lab. One way of doing this is to add a secondary ethernet adaptor on the existing VM, and then copy the whole VM directory to a new one. For example:

  1. Make sure the partition where /extra resides has at least extra 5G disk space before starting this lab. If not, you will have to move your VM to another unoccupied machine that has enough disk space.
  2. Start the VMWare program (do NOT power on your VM just yet). From the menu, select VM/Settings, add a secondary Ethernet adaptor, pick Host-only as the network connection, and terminate the VMWare.
  3. Duplicate the original VM, say from weesan to weesan2:
      $ cp -av /extra/weesan /extra/weesan2
    
Then, start the VMware for both VMs, one at a time. Be warned that when starting the 2nd VM, VMware will detect that and ask if you need to create a new ID for the VM, just click "CREATE".

Questions

  1. The outputs that show all the traffic from the Host VM go through the Router VM.

Scoring


Notes & Tips: