Yesterday I was reading Jeff Doyle TCP IP/Routing and got a overlapping problem. In that Jeff Doyl explained how BGP selects the best route in case of overlapping. The excerpt is given cite
“A BGP-speaking router can transmit overlapping routes to another BGP speaker. Overlapping routes are nonidentical routes that point to the same destination. For example, the routes 188.8.131.52/19 and 184.108.40.206/17 are overlapping. The first route is included in the second route, although the second route also points to other more-specific routes besides 220.127.116.11/19.When making a best-path decision, a router always chooses the more-specific path. When advertising routes, however, the BGP speaker has several options for dealing with overlapping routes:”
In the above excerpt jeff has explicitly cited that route always choose more-specfic path but BGP has many options for dealt. But the question comes in mind how router process the overlapping of routes because now-a-days cisco routers are using CEF, it means all the routing information stored in FIB which is forwarding information base.
Without wasting any time let’s see how the information is stored & processed by FIB in case of overlapping of ip addresses. CEF will create the table given in figure for storing the prefixes. As per the figure the first block is responsible till 191 & another block is responsible for rest of the prefixes. Only pointer will be used which will point towards the addresses.