| CS/COE 536 | Reconfigurable System on Chip Design | Lockwood, Fall 2002 |
| Assigned | Monday, September 23, 2002 at 4:00PM |
| Due Date | Tuesday, October 1, 2002 at 5:00PM |
| Purpose: | Extend the firewall to use content matching CAM rules. |
| Points | 75 |
Standard firewalls are not effective at blocking several types of low-priority traffic because they only examine the Source Address, Destination Address, Ports, and Proto fields of the IP header. This however, does not give enough information to block all Napster and SPAM traffic. Some Napster users switched to the standard web port 80 in order to bypass firewalls. SPAM still flows through the email port 25. In this lab, you will upgrade your firewall to drop packets based on the content of their payload. This assignment builds upon the first Machine Problem to allow for filtering both on header and payload data.
A module has been developed that scans packets for regular expressions in FPGA hardware and reports which content matches. This module performs regular expression matching on each phrase defined by the phrase lists, which is done in parallel. The packet is held in a buffer until the content match operation completes. The match result is returned as an 8 bit vector that is set along with start of frame (SOF) output. This module uses the nearly the same output interface as the protocol wrappers, and so inserting the 'regex_app' module between the protocol wrappers and MP1 should be almost transparent. The one enhancement to the interface is the 8 bit content match vector, which is described in more detail in the following section.

Figure 1: Content Matching Module Interface
A set of phrase lists has been compiled to categorize traffic into eight classifications. The content matching module uses the phrase list definitions shown below:
If one of the above phrases is found anywhere in the payload, then the corresponding bit of the content match vector will be set to one. A zero indicates that none of the phrases were found. Multiple bits in the vector can be set if the content contains phrases from multiple lists. The vector is only valid on the clock cycle that start of frame (SOF) signal is asserted.

Figure 2: Diagram of the Match Vector
A decision to drop the packet can be made using results from any combination of header and payload matching results. The CAM registers will need to be updated to include the match vector.

Figure 3: Diagram of the Updated CAM Lookup Circuit
The UDP control packets will include additional fields for the match vector.

Figure 4: Updated UDP Control Packet
Table 1: Symbol Key
|
|
|
|
| Of Interest | Modify | Synthesizable |
Table 2: Contents of MP2.tar.gz
|
|
FireWall/sim/ Simulation Folder | ||||||
|
|
/testbench/ | ||||||
|
|
testbench.vhd | The testbench for this FPX module. | |||||
|
|
clock.vhd | The clock for this FPX module. | |||||
|
|
fake_NID_in.vhd | The fake input from the NID | |||||
|
|
fake_NID_out.vhd | The fake output from the NID | |||||
|
|
INPUT_CELLS.TBP | Testbench Script for generating the incoming IP packets. |
|
|
|||
|
|
testbench.do | The Modelsim macro files. | |||||
|
|
wave.do | Another Modelsim macro files. | |||||
|
|
Makefile | Example make file used to automate compilation and simulation | |||||
|
|
FireWall/syn/ Synthesis Folder | ||||||
|
|
/rad-xcv2000e/ | ||||||
|
|
fpx.ucf | The FPGA chip pin constraints file | |||||
|
|
bitgen.ut | The BITGEN option file. | |||||
|
|
build | The backend script for executing the Xilinx backend tools | |||||
|
|
*.edn | The EDIF Macro files for synthesis with the Xilinx backend tools. |
|
||||
|
|
wrapper_app.prj | The project files for Synplicity Pro. It tells Synplicity Pro which vhdl files should be included for synthesis. | |||||
|
|
Makefile | Example make file used to automate synthesis | |||||
|
|
FireWall/vhdl/ VHDL Source Folder | ||||||
|
|
wrappers/ | ||||||
|
|
cellproc_sim.vhd | The vhdl file for simulating the Cell Processor. | |||||
|
|
frameproc_sim.vhd | The vhdl file for simulating the Frame Processor. | |||||
|
|
ipproc_sim.vhd | The vhdl file for simulating the IP Processor. | |||||
|
|
udpproc_sim.vhd | The vhdl file for simulating the UDP Processor. | |||||
|
|
framewrapper.vhd | The vhdl file for the Frame Wrapper. It instantiates the Cell Processor and the Frame Processor and connects them together. |
|
||||
|
|
ipwrapper.vhd | The vhdl file for the IP Wrapper. It instantiates the Frame Wrapper and the IP Processor and connects them together. |
|
||||
|
|
udpwrapper.vhd | The vhdl file for the UDP Wrapper. It instantiates the IP Wrapper and the UDP Processor and connects them together. |
|
||||
|
|
/rad_loopback/ The Rad_Loopback Package Folder | ||||||
|
|
blink.vhd | he vhdl file for the blink component. It controls the blinking of the LED on the FPX. |
|
||||
|
|
loopback_module.vhd | The vhdl file for the loopback_module that is instantiated by the rad_loopback_core |
|
||||
|
|
rad_loopback_core.vhd | The vhdl file for the rad_loopback_core component. It instantiates the wrapper_module at the ingress and the loopback_module at the egress. |
|
||||
|
|
rad_loopback.vhd | The vhdl file for the top-level design of the rad_loopback. |
|
||||
|
|
regex_app_sim.vhd | The vhdl file for simulating the Content Matching Module. Use this file to copy the regex_app interface. |
|
||||
|
|
wrapper_module.vhd | The vhdl file for the FireWall_module. |
|
|
|
||
|
|
<wrapper_app.vhd> | The vhdl file for the FireWall_module. This needs to be copied from MP1. |
|
|
|
||
Things to Turn In:
Here is a checklist of the things you need to turn in: