Routes can be used to forward traffic only when they have directly connected next hops. However, this condition may not be met when routes are generated. The system then needs to search for directly connected next hops and corresponding outbound interfaces. This process is called route iteration. In most cases, BGP routes, static routes, and user network routes (UNRs) do not have directly connected next hops, and route iteration is required. The following examples demonstrate how route iteration generates an FIB entry.
A next-hop IP address of a BGP route is often the IP address of an indirectly connected peer's Loopback interface, and therefore the BGP route needs to be iterated. The system searches the IP routing table for a direct route (an IGP route in most cases) that is destined for the next-hop IP address of the BGP route. Then, the system adds the next-hop IP address and outbound interface of the IGP route to the IP routing table, generating a FIB entry.
A next-hop IP address of a BGP VPN route is often the IP address of an indirectly connected PE's Loopback interface, and the BGP route needs to be iterated to a tunnel. The system searches the tunnel list for a tunnel that is destined for this Loopback IP address. Then, the system adds the tunnel information to the routing table, generating a FIB entry.