Sunday, September 26, 2010

If Your Lab Went Smoothly - Most Likely You Didn't Learn as Much as You Could Have!


As mentioned in my earlier blog, "The Classful vs. Classless Routing Behavior Dilemma", there was a problem with our lab last week. Classful routing behavior was working for us, as described in the lab. As it turns out, to get the lab to work correctly, we needed to disable CEF, Cisco Express Forwarding. With which platforms, which version of ios, the no ipclassless command stopped working, I am not sure. Doesn’t matter, really. What’s more important, I believe, is that we understand the difference between process switching and CEF so you know what it is you are disabling in the lab. No better time like the present to take a look at these two different technologies (there are others, as well, but let’s focus on process switching and CEF today).

As we have discussed already, there are three main steps to forwarding a packet through a router: 1) determine if the packet’s destination is reachable, 2) determine the next hop toward the destination, and the interface through which that next hop is reachable, and 3) rewrite the source and destination MAC address on the frame header so it will successfully reach its next hop. I am not going to go into a lot of detail, but I do want to briefly introduce several switch technologies used by Cisco IOS releases. Let’s start with process switching.

Process switching is available on every version of IOS, on every platform. With process switching, the forwarding decision and information used to rewrite the MAC header on the packet are taken from the RIB (routing Information Base) and the ARP table cache (which maps the MAC header information to the IP address of each host that is directly connected to the router). Processes that normally run on the router are not interrupted to process switch a packet.

The input interface processor detects there is a packet on the network media, and transfers the packet to the input/output memory on the router. The interface processor generates a receive interrupt, and during the interrupt, the central processor determines what type of packet it is. If it is an IP packet, the processor places the packet in an input queue and the interrupt is released. When the scheduler runs, it finds the packet in the input queue of ip_input and schedules the process to run. When ip_input runs, it consults the RIB to determine the next hop and the output interface, then consults the ARP cache to determine the correct physical layer address for this next hop. Ip_input then rewrites the packet’s MAC header, and places the packet on the output queue of the correct outbound interface. The packet is copied from the output queue of the outbound interface to the transmit queue of the outbound interface. The output interface processor detects the packet on its transmit queue, and transfers to packet onto the network media.

Cisco Express Forwarding (CEF) is advanced, Layer 3 IP switching technology. It stores the reachability and forwarding information in two different tables. An adjacency table holds the forwarding information and the CEF table holds the reachability information. The CEF table is called the FIB (Forwarding Information Base) table. Both are built without process switching any packets.

Whereas process switched technologies used the routing table, CEF uses this FIB table. Because the FIB lookup table contains all known routes that exist in the routing table, it eliminates route cache maintenance (fast switch technology). CEF uses a FIB to make IP destination prefix-based switching decisions. The FIB is conceptually similar to a routing table and maintains a mirror image of the forwarding information contained in the IP routing table. When routing or topology changes occur in the network, the IP routing table is updated and those changes are reflected in the FIB. The FIB maintains next-hop address information based on the information in the IP routing table. Because there is a one-to-one correlation between FIB entries and routing table entries, the FIB contains all known routes and eliminates the need for route cache maintenance associated with fast switching.

In addition to the FIB, CEF uses adjacency tables to prepend Layer 2 addressing information. The adjacency table maintains Layer 2 next-hop addresses for all FIB entries. When CEF mode is enabled, the CEF FIB and adjacency tables reside on the route processor (along with the routing table), and the route processor performs the express forwarding. When distributed CEF mode is enabled (dCEF), line cards maintain an identical copy of the FIB and adjacency tables. The line cards then perform the express forwarding between port adapters, relieving the route processor of involvement in the switching operation. Inter Process Communication mechanism acts as an interface between the route processor and the line cards to ensure synchronization of FIBs and adjacency table.

I hope this brief explanation of process switching (routing as we know it) and CEF gives you some idea of the difference between the two technologies. In order to see the difference between classful and classless behavior, as explained to us in our text, powerpoint, and lab of chapter 8, we needed to disable cef with the no ip cef command. As put in the title of this blog entry, if our labs run smoothly each week, we probably are not learning as much as we could!

Anyway, hope this helps!

Joanne

No comments:

Post a Comment