Skip to content

Tests for reference router

Neelakandan Manihatty Bojan edited this page Oct 24, 2013 · 3 revisions

The following are the tests for reference router project:

hw_arp_misses

Send packets to each interface from an external 10G NIC such that the routing table matches, but the ARP table misses. Packets should be sent to the CPU. Check ARP miss counter.

hw_badipchksum_packet

Send IP packets to each interface from an external 10G NIC with a bad IP header checksum. Check that the packets are all dropped. Check the counters. Following is the steps involved in the test.

  1. Initialize netfpga hardware.
  2. Send packet with bad IP checksum with random size from external ethernet port to router port.
  3. Get the drop counter for the router port.
  4. Check that drop counter matches the packets sent.
  5. Repeat test for other router port.

hw_invalidttl_packet
Send packets to each interface from an external 10G NIC with IP time-to-live=1 or 0. Packets should be sent to the CPU. Check the counters.

  1. Initialize netfpga hardware.
  2. Send packet with TTL = 0x0 with random size from external ethernet port to router port.
  3. Check that packet are forwarded to CPU.
  4. Get the drop counter for the router port.
  5. Check that drop counter is same as the number of packets sent.
  6. Repeat test for other router port.

hw_ipdestfilter_hit Send packets to each interface from an external 10G NIC destined to IP addresses in the destination IP filter table (such as the router's IP addresses). Packets should be sent to the CPU. Check the counters.

hw_lpm_generic

hw_lpm_misses

Send packets to each interface from an external card to an IP address that does not match in the routing table. Packets should be sent to the CPU. Check LPM miss counter.

hw_lpm_nexthop

Insert an entry in the routing table with next hop 0.0.0.0 then send packets to that subnet. Check that the packets are being sent with the next hop set as the destination address.

hw_nonip_packet

Send packets to each interface from an external 10G NIC with an Ethertype that is not IP. Packets should be sent to the CPU. Check the counters.

  1. Initialize netfpga hardware.
  2. Send packet with EtherType= 0x802 with random size from external ethernet port to router port.
  3. Get the drop counter for the router port.
  4. Check that packet are forwarded to CPU.
  5. Check that drop counter is 300.
  6. Repeat test for other router port.

hw_nonipv4_packet

hw_packet_forwarding

hw_router_table

hw_wrong_destMAC

Clone this wiki locally