CS 552 Fall 2004
Assignment 2

Due Date:

Friday, Nov. 12th, 2004

Overview:

In this assignment, you will build small (2-node) Virtual Local Area Network (VLAN) using the click infrastructure from MIT.

Theory of Operation

You will build a click element and program that allows a set of co-operating machines to form a virtual LAN over the Internet. The main packet flow for the assignment is shown in Figure 1.



Figure 1. Data flow of a packet between 2 hosts in the virtual LAN.



Each machine will have at 2 MAC-layer interfaces. The 'real' interface (the one that is actually on the LAN) is bound to a globally reachable IP address. The second virtual interface is the one used to form the virtual LAN.

The packet flow use to form the virtual LAN are illustrated in Figure 1 as follows. Note that there is the notion of the “Local machine”, i.e., the sender, and the “remote machine”, i.e. the receiver.

  1. The application sends a packet to an IP address on the virtual LAN.

  2. The click program captures packets on the virtual interface.

  3. The click program performs a virtual IP to global IP lookup of the packet. It adds the necessary IP and UDP headers to the packet and sends the encapsulated packet out the global interface.

  4. The encapsulated packet then cross the global Internet

  5. The remote click program receives packets on well-know UDP port. It removes the global IP headers, the leaving only the local virtual headers.

  6. The remote click program then sends the decapsulated packet the the local virtual interface.

  7. The OS on the remote machine routes the packet to the application which is listening for packets on the local port.

Notes:

The TA has a page with addition resources, including a skeleton click element. It can be reached off of his main cs552 page here.

Your scheme must support broadcast addressing. That is, an address of “all ones” (e.g. X.X.255.255) must go to all machines on the virtual LAN. This is too allow ARP to work, so the system will behave exactly like a LAN.

You will need to write both a click program and a click element. Your click element serves to route packets to the correct destination. For example, it may keep a table like:

Click Output Port

Virtual IP

Global IP

Virtual MAC

Global MAC

1

192.168.1.2

128.6.4.4

00:23:AC:45:D2:76

00:87:12:A6:BE:62

2

192.168.1.3

128.6.4.5

00:23:AC:56:CA:21

00:23:AC:45:2D:51

In the above example, the table is used to route packets to the correct output port of the click element. The virtual IP address is used to find the correct output port, and the other fields serve to assist in constructing the packet headers.

Infrastructure Resources

Because we have only secured 2 nameless machines for the assignment, you're VLAN will only span 2 machines for this project.You will have to ssh into them using only the IP numbers (128.6.171.157 and 128.6.171.148). In addition, we have accounts and passwords for them. Send email to the TA to get an account name and password.

The machines also have a set of pre-configured dummy IP addresses and interfaces. Each machine has 16 dummy IPs, 192.168.1.1 - 192.168.1.32. The lower half (192.168.1.1-192.168.1.16) is with machine 128.6.171.157 and the upper half with the other one. Will will assign each person a virtual IP address to use on each machine to avoid collisions.

In addition, click is already installed on each machine.

Handing the assignment in.

Email the click program and element to the TA: Send your .click file to the TA via email as a text attachments. The subject line should read “CS552 assignment 2”.