FIB Entries
The FIB includes the following entries, referred to by the FIB as flags:
• Attached
• Connected
• Recursive
• Default Route Handler
• Learned from IGPs
The following sections discuss each of these entries, detailing how CEF uses them. FIB entries can be viewed on a router using the show ip cef command, as shown in the examples provided in the following sections.
Attached FIB Entry
An attached FIB entry is created when the destination is directly attached to the router. In Example 2-3, the attached FIB entry represents a statically configured route with the next hop pointing to an interface attached to the router.
Example 2-3. Attached FIB Entry
Router#show ip route 10.1.1.0 255.255.255.0 Routing entry for 10.1.1.0/24
Known via "static", distance 1, metric 0 (connected) Routing Descriptor Blocks: * directly connected, via Serial0/1
Route metric is 0, traffic share count is 1
Router#show ip cef 10.1.1.0 255.255.255.0
10.1.1.0/24, version 56, attached, cached adjacency to Serial0/1 0 packets, 0 bytes via Serial0/1, 0 dependencies valid cached adjacency
Connected FIB Entry
A connected FIB entry is an attached FIB entry that is created as a result of an IP address being configured on a router's interface. In Example 2-4, note that the entry shows as being attached as well as connected, while static routes configured with an interface as their next hop are only flagged as attached.
|
Code View: Scroll / Show All |
|||||||||||||||||||
|
Router#show ip route 192.168.30.0 255.255.255.0 |
|||||||||||||||||||
|
Routing entry for 192.168.30.0/24 |
|||||||||||||||||||
|
Known via "connected", distance 0, metric 0 (connected, |
via interface) |
||||||||||||||||||
|
Routing Descriptor Blocks: |
|||||||||||||||||||
|
* directly connected, via Serial0/1 |
|||||||||||||||||||
|
Route metric is 0, traffic share count is 1 |
|||||||||||||||||||
|
Router#show ip cef 192.168.30.0 255.255.255.0 |
|||||||||||||||||||
|
192.168.30.0/24, version 50, attached, connected, cached |
adjacency to |
||||||||||||||||||
|
Serial0/1 |
|||||||||||||||||||
|
0 packets, 0 bytes |
|||||||||||||||||||
|
via Serial0/1, 0 dependencies |
|||||||||||||||||||
|
valid cached adjacency |
CEF uses a receive FIB entry when the IP address is configured on one of the router's interfaces. The router must accept and process packets destined to receive entry, 172.17.1.12, rather than switch the packets through the router out another interface. In Example 2-5, note that the FIB entry is flagged as receive because it is the IP address assigned to the interface. Example 2-5. Receive FIB Entry Router#show running-configuration interface Serial0/3 interface Serial0/3 ip address 172.17.1.12 255.255.255.0 Router#show ip cef 172.17.1.12 255.255.255.255 172.17.1.12/32, version 17, epoch 0, receive The following list describes two special receive entries: • 172.17.1.0/32— A receive FIB entry is built for the all-0s host address of a network. This entry allows the router to receive broadcasts sent to the all-0s host address on the network segment. • 172.17.1.255/32— A receive FIB entry is built for the all-1s host address of a network. This entry allows the router to receive broadcasts sent to the all-1s host address on the network segment. Recursive FIB EntryThe concept of performing a lookup for the next-hop IP address toward a destination is called a recursive lookup. Recursive routes are routes that require the forwarding and adjacency information of another route. A recursive FIB entry is used when the router must look up the next-hop IP address of a prefix referenced to find the corresponding Layer 2 header rewrite string and output interface for the destination prefix. Border Gateway Protocol (BGP) is the most common source of recursive entries, because the IP addresses used as the next hop for advertised prefixes are almost never directly connected to the router. In Example 2-6, note the FIB entry shows as recursive. Example 2-6. Recursive FIB Entry Router#show ip route 172.31.12.0 255.255.255.0 Routing entry for 172.31.12.0/24 Known via "static", distance 1, metric 0 Routing Descriptor Blocks: * 192.170.1.10 Route metric is 0, traffic share count is 1 Router#show ip cef 172.31.12.0 255.255.255.0 172.31.12.0/24, version 55, cached adjacency 192.170.1.10 0 packets, 0 bytes tag information set local tag: 4 via 192.170.1.10, 0 dependencies, recursive next hop 192.170.1.10, FastEthernet0/1 via 192.170.1.10/32 valid cached adjacency Figure 2-9 illustrates recursive routing. Figure 2-9. Recursive Routing [View full size image] Figure 2-9. Recursive Routing [View full size image]
In Figure 2-9, Router A's only knowledge of the 172.31.12.0/24 network is through the static route configured. The router installs this static route with a next-hop IP address of 192.170.1.10. When switching a packet toward a destination on the 172.31.12.0/24 network, Router A must perform another lookup on 192.170.1.10 to determine the respective outbound interface, Layer 2 header rewrite string, and other next-hop information installed for that destination. Internet backbone routers carry large routing tables that are mostly comprised of BGP routes. The majority of BGP routes are recursive routes. For example, most BGP peering is performed between loopback interfaces. The next-hop IP address of received prefixes is generally the peer's loopback address, which is not connected to the local router. Therefore, the router must perform multiple route lookups on a prefix's next-hop IP address for a single destination, so performance becomes a factor. To reduce performance impact, CEF performs recursive resolution. CEF performs recursive resolution by following the recursive chain of lookups down to the leaf level. The FIB entry is flagged as recursive and is populated with the forwarding details from the path of the next hop, also referred to as the parent. Recursive routes are resolved when a recursive path is created. If a valid next hop is not found upon initial creation, the recursive path is queued in a list for periodic reresolution by the CEF background resolution process. CEF maintains a dependency list to keep track of changes. All the children paths depending on a parent's path are installed in the parent's dependents list. If a parent's path information changes, any dependents will also be reresolved. CEF does not limit the amount of levels required for recursion. However, multilevel recursion used for load balancing was not supported until the CEF/MFI rewrite in Cisco IOS Software Release 12.2S, which is covered in Chapter 3. On a router running pre-MFI IOS, multilevel recursion with load balancing results in CEF using all the paths at the first level and then choosing only one of the paths at the subsequent levels. The results do not guarantee that load balancing will occur because of lack of code support. Default Route Handler FIB EntryThe FIB installs the default route handler entry as a default entry placeholder. Packets destined to nonspecific destinations installed in the FIB use this entry and are discarded. Any default routes that are statically configured or learned from dynamic routing protocols are installed in place of this entry. However, if the default route is removed from the routing table, the FIB default route handler entry is reinstalled as a placeholder. Example 2-7 provides an example of the default route handler FIB entry. Example 2-7. Default Route Handler FIB Entry 0.0.0.0/0, version 2, epoch 0, attached, default route handler 0 packets, 0 bytes via 0.0.0.0, 0 dependencies valid no route adjacency ADJFIB FIB EntryThe ADJFIB entry is a special FIB entry that reflects an entry in the adjacency table. The best way to describe this entry is by providing an example. For a broadcast network, the FIB table will represent the connected network entry as 1.1.1.0/24. This entry will point to a glean adjacency, indicating that packets matching host prefixes within the connected network entry, such as 1.1.1.1, will need to glean more information to forward the packet. On an Ethernet interface, the router uses ARP to learn the necessary details used to forward packets destined to these host entries. Upon receiving an ARP response, the router installs the Layer 2 rewrite string and output interface details in the ARP table and the adjacency table. The router then installs an ADJFIB entry in the FIB table to reflect this adjacency. Example 2-8 shows a representation of an ADJFIB FIB entry. Example 2-8. ADJFIB FIB Entry interface Ethernet0/0 ip address 1.1.1.2 255.255.255.0 Router#show ip cef 1.1.1.0 255.255.255.0 1.1.1.0/24, version 4, epoch 0, attached, connected 0 packets, 0 bytes via Ethernet0/0, 0 dependencies valid glean adjacency Router#show ip cef 1.1.1.1 1.1.1.1/32, version 10, epoch 0, connected, cached adjacency 1.1.1.1 0 packets, 0 bytes via 1.1.1.1, Ethernet0/0, 0 dependencies next hop 1.1.1.1, Ethernet0/0 valid cached adjacency Learned from IGPsEntries learned from IGPs are the most common source of prefixes installed in the FIB. Example 2-9 illustrates a route learned through Open Shortest Path First (OSPF), which is programmed in the FIB table as a valid cached adjacency. Example 2-9. FIB Entry Learned Through an IGP Code View: Scroll / Show All Router#show ip route 100.1.1.0 Routing entry for 100.1.1.0/24 Known via "ospf 1", distance 110, metric 10, type extern 2, forward metric 10 Last update from 38.0.0.2 on Ethernet1/0, 00:03:11 ago Routing Descriptor Blocks: * 38.0.0.2, from 46.0.0.2, 00:03:11 ago, via Ethernet1/0 Route metric is 10, traffic share count is 1 Router#show ip cef 100.1.1.0 100.1.1.0/24, version 17, epoch 0, cached adjacency 38.0.0.2 0 packets, 0 bytes via 38.0.0.2, Ethernet1/0, 0 dependencies next hop 38.0.0.2, Ethernet1/0 valid cached adjacency A set of generic FIB entries are also created on every router; these entries are covered in the next section. Generic FIB Entries Any router can have, at the minimum, the FIB entries listed in Example 2-10, which are not tied to any particular interface. Note that the Interface column for these entries is empty. Readers' Questions
The following list describes each of the entries shown in Example 2-10: • 0.0.0.0/32 receive— This entry allows the router to receive packets transmitted to the 0.0.0.0 broadcast address. Because Routing Information Protocol (RIP) and other protocols, such as DHCP/BOOTP, use broadcast packets to transmit information, the router must receive packets transmitted to the broadcast address. • 224.0.0.0/4 drop— This entry drops packets destined to this reserved IP multicast address space when IP Multicast Routing is disabled. If IP Multicast Routing is enabled, the FIB entry will be reported as a punt adjacency. Note that CEF does not support the switching of multicast packets. By default, multicast packets are fast-switched through a router. • 224.0.0.0/24 receive— The range of multicast IP addresses, 224.0.0.0 through 224.0.0.255, is reserved for the use of routing and discovery protocols. For example, Enhanced Interior Gateway Routing Protocol (EIGRP) transmits hello packets to multicast address 224.0.0.10 to maintain neighbor relationships. This FIB entry allows the router to receive and process packets destined to this IP address range. • 255.255.255.255/32 receive— This entry allows the router to receive packets transmitted to the link local broadcast address. Continue reading here: Punt Adjacency Was this article helpful? |