cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
7447
Views
20
Helpful
13
Replies

Software CEF vs Hardware CEf

reetesh
Frequent Visitor
Frequent Visitor

I'm really confused about software and hardware cef. Here is an extract from the study material from cisco "A router with Cisco Express Forwarding enabled uses information from tables that are built by the CPU, such as the routing table and the ARP table, to build hardware-based tables that are known as the Forwarding Information Base
(FIB) and adjacency tables. These tables are then used to make hardware-based forwarding decisions for
all frames in a data flow, even the first frame"!!! 

Here is an extract from the official cisco ccnp study guide "The general-purpose CPUs on software-based and hardware-based routers are similar and perform all the same functions; the difference is that on software-based routers, the general purpose CPU is in charge of all operations, including CEF switching (software CEF), and the hardware-based routers do CEF switching using forwarding engines that are implemented in specialized ASICs, ternary content addressable memory (TCAM), and NPUs (hardware CEF)"

reetesh_0-1669539549773.png

It's really confusing. From the first extract the FIB and Adjacency are hardware tables which are built by the CPU.

The Extract from the official study guide says software CEF consists of the FIB and the adjacency tables.

Can someone clarity this concept please. Thank you in advance.

 

 

1 Accepted Solution

Accepted Solutions

13 Replies 13

friend dont confuse, the first think the router do is build table FIB and adjacency in CPU,
if the router is software-based then all forwarding done in CPU 
if the router is hardware-based then the CPU will copy tables (FIB and Adj.) to all ASIC card, and from there ASIC now do forwarding. 

that the different. 
images.png

Thank you for your reply.
Still when we read the extract from cisco, in CEF, hardware forwarding
tables are ceated by the cpu regardless of traffic flows and all packets
switched using hardware.

What i can grasped is that the FIB & Adjacency tables reside in the data
plane and hence switched directly through hardware.

you are right reside in the data plane BUT data plane which is run in hardware ACIS not run in software which is CPU.

I will ask you something here, which one is faster router or switch (L3SW) ??

Thank you very much. 👍👍👍

You are so so welcome friend 

Sorry i missed out your question.
Layer 3 switch is faster as switching is done in ASICS. (Hardware)

Really helpful compared to cisco press ccnp encor book

cosmingrosu
Frequent Visitor
Frequent Visitor

The official ENCOR Cert Guide is really confusing when explaining CEF:
For instance:
1. under Key topic: Cisco Express Forwarding, it says ...the difference is that on software-based routers, the general-
purpose CPU is in charge of all operations, including CEF switching (software CEF)...

cosmingrosu_0-1686738193644.png

but a bit later, under Key Topic: Software CEF it says: Upon receipt of an IP packet, the FIB is checked for a valid entry. If an entry is missing, it is a “glean” adjacency in CEF, which means the packet should go to the CPU because CEF is unable to handle it.

??? What does it mean the packet should go to the CPU? It said earlier, that the entire software CEF function is performed by the CPU!

2. under Hardware CEF, it keeps talking about the advantages of distributed forwarding architectures:

cosmingrosu_1-1686738536096.png

Why?? Am I to understand that Hardware CEF is found on distributed forwarding architecture devices only?

In the end I had to figure out all these concepts searching the web, so it's not okay at all

Currently reading the OCG and am having the same exact questions! Don’t forget to print out the 33 page errata 😐

What questions do you have regarding switching/forwarding?

Disclaimer: Bad answers are my own fault as they are not AI generated.

Joseph W. Doherty
Hall of Fame
Hall of Fame

Although this is a very late reply to the question, in general, software "X" vs. hardware "X" basically means "X" is provided by the device's CPU vs. using additional special functionality hardware.  The net difference being the  additional special hardware provides "X" sooner.  I.e. same result, but how long to obtain is what differs.

To muddy the waters, also know CPU capabilities evolve including providing additional special functionality.  That said, CPU new capabilities, generally, would only be those used by large market segments.

Oh, I might mention, for CPUs another design approach is to reduce their functional capabilities, but what they still can do, they do much faster.  This latter approach, tends to pair itself with more of them and/or more capable additional hardware.

For a typical network engineer, more-or-less, functionally, CEF is CEF.  How CEF, or other network capabilities, are supported on the hardware, impacts speed/capacity.  Yeah, a Cisco exam may expect you to "know" some statements about software CEF vs. hardware CEF, but assuming you stumble across some CEF bug, are you going to actually identify the actual bug's cause?

Oh, one last point.  Software running on the CPU is what almost aways sets up and maintains the special hardware.

Oh, for those using PCs, if you do gaming or CADD on it, you're probably aware of the importance/impact of the graphics/video card/board being used.  Well such a PC card/board is very much akin/parallel to ASICs/acceleration hardware found in network devices in addition to the CPU.

On a PC can you do advanced graphics on it without such a video card?  You can.  However, instead of a game, for example, running at so many FPS (frames per second), it might be seconds, minutes, hours and even days (yes, if not even longer) per single frame!  However, the finally rendered frame can be identical to the same frame hardware rendered in, say, 10 ms.

On network devices, one reason routers usually offer considerably less throughput vs. switches, routers are, generally, much network feature richer than switches, so overall performance is mostly dependent on CPU performance as there's no (often) possible/great hardware acceleration for many advanced network features.

Again, possibly for a Cisco exam, you'll be expected to know some information, which for most typical real-world usage is needless.

Conversely, some technical information, Cisco holds very close to the vest unless they see a purpose, to their benefit, to release it.  Sometimes the "benefit" is technically showing how their latest hardware is better than another vendor's, or even better than (laugh) prior Cisco hardware.

One of my best examples was Cisco's original 3750(G)'s StackWise vs. 3750E's StackWise+.  The former provided "32Gbps" the latter doubled it to "64Gbps". Okay, that's nice, but StackWise+ also provided "spacial reuse" (for unicast traffic).  Huh, what's that?

Well, it turns out, in original StackWise, each and every switch member placed all of its traffic on the ring, even traffic moving between two ports on the same switch member.  Further, such traffic flowed completely around the full ring and was removed from the ring by the source switch member.  I.e. when destination switch received traffic for it, it wasn't removed from the ring.  (Basically, topology wise, a StackWise ring was sort of a high speed Ethernet hub.)

In StackWise+, a member switch only placed non local destination traffic on the ring, and the destination switch member removed traffic from the ring.  These two changes could be very beneficial for stacks as their stack member count increased and/or they are working with lots of traffic.

BTW, I think I've read, some of the latest Cisco StackWise technology take into account specific physical ring loading and/or switch member hops between source and destination switch members.  Both approaches would help insure the optimal transfer rate between switch members.

I don't know if Cisco exams have questions on the varieties of StackWise, but information, as above, could be important for optimal usage of StackWise stacks.

So, practically, it may be worthwhile know what features, like CEF, have hardware support, but knowing the logical steps and CEF specific terms, possibly not as important, again, in typical real-world networking.  Laugh, of course, that just my personal opinion.

Also, personally, when I've been asked to conduct a technical interview, I usually have no problem stumping the interviewee, but what I'm looking for is not something like can you provide the book definition of something like CEF's glean, I'm looking for deeper understanding of concepts, how you pursue information you don't know, your interest in providing solutions to solve real word problems.  For example, for something like CEF, what problem is it addressing and are there other approaches, currently or past, to address the same issue?  When you understand networking concepts (too), when something like CEF comes along (or its improvement), it's much easier to understand and appreciate the technology.