Project 2: Longest Prefix Match (LPM)

Assigned: 10/15/09, Due: 10/29/09


Project Goal

Internet prefixes were originally envisioned to belong to three classes: Class A, Class B, and Class C. That changed with the invention of Classless Inter-Domain Routing (CIDR), which allows prefixes in routing tables to be of arbitrary lengths. In this project, we will provide you with CIDR prefixes from one core router in the backbone of the Internet. Your task is to load up the prefixes in the form of a routing table and record 1) the time to construct the routing table, 2) memory required to hold it, 3) average lookup time to perform longest prefix match and 4) average time to update the routing table. Your program must be written in C/C++ and should work on the Burrow or Sharkestra Linux machines.

Project Specification

Your program, lpm, should take a plain-text file containing IPv4 prefixes and their corresponding next hop router addresses, one on each line, as its input. The steps you should follow in this project are:

Routing Table Data Structures

The basic version of the project requires you to implement one type of data structure for the routing table: binary trie.

Program Output

Output the following statistics for each instance of routing table:

Testing

The following three sample input files should help you in your testing.

Also, try testing these specific addresses for the following behaviors:

Miscellaneous/Resources

Extra Credit

For 10% extra credit, implement multibit trie.

Deliverables and Grading

The grading will be based on the following four deliverables. The Status Report is due, Thursday October 22, 2009 in class. The remaining deliverables are due by 11:55 pm on the due date.