Architectures of Generic Routers

IP ROUTE LOOKUPS 366 space. In order to use the address space efficiently, bundles of class C addresses were given out instead of class B addresses. This also causes massive growth of routing table entries. To reduce the number of routing table entries, classless interdomain routing Ž . w x CIDR 4 was introduced to allow for arbitrary aggregation of networks. A network that has identical routing information for all subnets except a single one requires only two entries in the routing table: one for the specific Ž . subnet which has preference if it is matched and the other for the remain- ing subnets. This decreases the size of the routing table and results in better usage of the available address space. On the other hand, an efficient mechanism to do IP route lookups is required. In the CIDR approach, a routing table consists of a set of IP routes. Each ² : IP route is represented by a route prefixrprefix length pair. The prefix length indicates the number of significant bits in the route prefix. Search- ing is done in a longest-matching manner. For example, a routing table ² : ² : ² : may have the prefix routes 12.0.54.8r32 , 12.0.54.0r24 , and 12.0.0.0r16 . ² : If a packet has the destination address 12.0.54.2 , the second prefix route is matched, and its next hop is retrieved and used for forwarding the packet. This chapter is organized as follows: Starting from Section 13.1, the architectures of generic routers are described and the design criteria that should be considered for IP lookups is discussed. Recently, there have been a number of techniques proposed to provide fast IP lookups w x 2, 3, 5, 6, 9, 12, 14, 15, 16 . From Section 13.2 to Section 13.9 we will look at several IP route-lookup schemes proposed over the past few years.

13.1 IP ROUTER DESIGN

13.1.1 Architectures of Generic Routers

The architectures of generic routers can be broadly classified into two categories. One is schematically shown in Figure 13.1. A number of network interfaces , forwarding engines, and a network processor are interconnected with a switching fabric. Inbound interfaces send packet headers to the forwarding engines through the switching fabric. The forwarding engines in turn deter- mine which outgoing interface the packet should be sent to. This information is sent back to the inbound interface, which forwards the packet to the outbound interface. The only task of a forwarding engine is to process packet headers. All other tasksᎏsuch as participating in routing protocols, resource reservation, handling packets that need extra attention, and other adminis- trative dutiesᎏare handled by the network processor. The BBN multigigabit w x router 13 is an example of this design. Another router architecture is shown in Figure 13.2. Here, processing elements in the inbound interface decide to which outbound interface IP ROUTER DESIGN 367 Fig. 13.1 Router design with forwarding engines. Fig. 13.2 Router design with processing power on interfaces. packets should be sent. The GRF routers from Ascend Communications, for instance, use this design. The forwarding engines in Figure 13.1 and the processing elements in Figure 13.2 use a local version of the routing tableᎏa forwarding table, downloaded from the network processorᎏto make their routing decisions. It is not necessary to download a new forwarding table for each routing update. Routing updates can be frequent, but since routing protocols need time on the order of minutes to converge, forwarding tables can be allowed to grow a little stale and need not change more than once per second. The network processor needs a dynamic routing table designed for fast updates and fast generation of forwarding tables. The forwarding tables, on the other hand, can be optimized for lookup speed and need not be dynamic. IP ROUTE LOOKUPS 368

13.1.2 IP Route Lookup Design