Patent ID: 8331373

Claim:
A method for automatically selecting a forwarding approach on a per-module basis, the method comprising: operating an I/O module in a longest prefix matching (LPM) mode, wherein operating the I/O module in the LPM mode includes populating an Internet protocol forwarding database (IPFDB) with entries corresponding to active hosts, populating an LPM table with entries from an IP routing table with routes learned from IP routing protocols, and routing layer 3 packets received by the I/O module using the IPFDB and LPM table of the I/O module; determining a capacity of the LPM table; determining a total number of IP routes in the IP routing table; determining a relationship between the total number of IP routes in the IP routing table and the capacity of the LPM table; and in response to determining that the total number of IP routes in the IP routing table has a predetermined relationship with the capacity of the LPM table, automatically switching the I/O module from the LPM mode to an IPFDB mode, where the IPFDB and the LPM table are populated with entries corresponding to active hosts and routing layer 3 packets received by the I/O module using the IPFDB and the LPM table of the I/O module.