The ipv6 router stores several routes as the first bits of an n address. In 2000, researchers found only 14 different prefix lengths in 1,500 ipv6 routes. Incoming packets are routed to different outgoing ports based on the longest prefix match, so if the first 8 bits of packet x correspond to an 8-bit route, but the first 48 bits of the same packet correspond to a 48-bit route, then the router should select 48-bit route.
My router processes so many packets that the search speed in memory in the routing table is a limiting factor. What is a good algorithm for finding the longest matching prefix in my routing table?
source share