What Are the Components of CEF

CEF has two main data structures: the Forwarding Information Base (FIB) and the adjacency table. The FIB is also referred to as just the CEF table. Look at Figure 6-2 to see an overview of CEF and its components.

What Are the Components of CEF? 151

Figure 6-2 Overview of CEF

CEF Table (FIB)

Adjacency Table

CEF Table (FIB)

Adjacency Table

The Adjacency Table

The adjacency table is the CEF component that is responsible for the MAC or Layer 2 rewrite. When routers and hosts are adjacent, they learn about each other by some means. They can discover each other dynamically or by means of configuration. If routers are adjacent across a point-to-point connection, they discover each other trivially. However, on a multiaccess medium such as Ethernet, it is necessary for the routers to use a dynamic mechanism to discover each other. This mechanism is ARP, which maps Layer 2 (for example, Ethernet MAC) addresses to IP addresses.

Because routers usually run routing protocols among each other, the ARP table is built with the MAC addresses of the connecting routers on the Ethernet interfaces. If the interface is Frame Relay or ATM, it can be point-to-point or multipoint. In the first case, only one adjacency exists per interface; in the second case, multiple adjacencies can exist per interface. The adjacency table holds one adjacency or Layer 2 rewrite structure per router that is connected to that multipoint interface. This adjacency can be built from information learned from Address Resolution Protocol (ARP), ATM, or Frame Relay map statements, and inverse ARP on ATM or Frame Relay. Although the FIB decides where to forward the packet, the Layer 2 rewrite of the frame is done with the information found in the adjacency table. The Layer 2 rewrite string contains the new Layer 2 header that is used on the forwarded frame. For Ethernet, this is the new destination and source MAC address and the Ethertype (the protocol number for the Layer 3 payload). For PPP, the Layer 2 header is the complete PPP header, including the Layer 3 protocol ID. Example 6-2

shows an adjacency table holding one adjacency for a point-to-point interface and one for a multipoint interface (Ethernet). The highlighted section shows the Layer 2 rewrite string and how it was learned.

Example 6-2 CEF Adjacency Table

new-york#show adjacency

Protocol Interface

Address

IP Ethernet3/3

10.200.203.1(12)

IP Serial4/0

point2point(11)

new-york#show adjacency detail

Protocol Interface

Address

IP Ethernet3/3

10.200.203.1(12)

48 packets, 3673 bytes

epoch 0

sourced in sev-epoch 6

Encap length 14

00604700881F00036CC898570800

ARP

IP Serial4/0

point2point(11)

41 packets, 2637 bytes

epoch 0

sourced in sev-epoch 6

Encap length 4

0F000800

The CEF table or FIB is the CEF component that is responsible for the Layer 3 forwarding decision that is made. The CEF table looks similar to the IP routing table on the router. In fact, each prefix in the routing table has the same prefix in the CEF table. The CEF table holds the essential information—taken from the routing table—to be able to make a forwarding decision for a received IP packet. This information is the IP prefix, the recursively evaluated next hop, and the outgoing interface. Information such as distance and metric of the protocol that put the prefix in the routing table are used to decide which paths are put into the routing table. However, they are not essential to forward a packet, so they are omitted from the CEF table. Example 6-3 shows the FIB on a router.

Example 6-3 CEF Table or FIB

new-york#show ip cef Prefix Next Hop

0.0.0.0/32 receive

10.200.200.0/24 10.200.203.1

10.200.201.0/24 10.200.203.1

10.200.203.0/24 attached

Interface

Ethernet3/3 Ethernet3/3 Ethernet3/3

>-3 CEF Table or FIB

(Continued)

10.200

203.0/32

receive

10.200

203.1/32

attached

Ethernet3/3

10.200

203.2/32

receive

10.200

203.255/32

receive

10.200

254.1/32

10.200.203.1

Ethernet3/3

©

254.2/32

10.200.203.1

Ethernet3/3

©

254.3/32

receive

224.0.«

1.0/4

drop

224.0.«

1.0/24

receive

255.255.255.255/32

receive

An important aspect of the CEF table is that recursive prefixes are immediately resolved. If, for instance, a Border Gateway Protocol (BGP) prefix is in the routing table, and it points to a BGP next hop—which is learned via an Interior Gateway Protocol (IGP)—the BGP prefix is inserted into the CEF table with a next hop that is learned from recursing to the BGP next hop. In Example 6-4, a BGP prefix 10.99.1.1/32 with a next hop of 10.200.254.4 recurses to the IGP prefix 10.200.254.4. Therefore, the prefix 10.99.1.1/32 inherits the next-hop 10.200.200.2 from the IGP prefix 10.200.254.4. The CEF table immediately shows that the next hop of 10.99.1.1/32 is 10.200.200.2. This recursion is not done in the routing table. The next hop of the BGP prefix 10.99.1.1/32 is 10.200.254.4 in the routing table.

Example 6-4 Example of Recursion london#show ip bgp 10.99.1.1

BGP routing table entry for 10.99.1.1/32, version 13

Paths: (1 available, best #1, table Default-IP-Routing-Table) Not advertised to any peer Local

10.200.254.4 (metric 85) from 10.200.254.4 (10.200.254.4) Origin IGP, metric 0, localpref 100, valid, internal, best london#show ip cef 10.99.1.1

nexthop 10.200.200.2 Ethernet0/0/0 label 23

london#show ip cef 10.200.254.4

10.200.254.4/32

nexthop 10.200.200.2 Ethernet0/0/0 label 23

Micro Expression Master

Micro Expression Master

If You Could Read Everyone Life A Book You Can Have Better Career, Great Relationships And Become Successful. This Book Is One Of The Most Valuable Resources In The World When It Comes To Reading the smallest and tiniest body Language and know what people are thinking about.

Get My Free Ebook


Post a comment