cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
470
Views
3
Helpful
5
Replies

What is CEF?

ravisyadav
Level 1
Level 1

Hello Guys,

Can some brief me the CEF technology. How it works? If you can brief with example would be better.

Thanks in advance.

5 Replies 5

Mark Malone
VIP Alumni
VIP Alumni

Hi basically it takes the burden off the CPU on a switch it is a layer 3 advanced switching technology that caches the routing table to speed up switching

Extract

CEF uses a FIB to make IP destination prefix-based switching decisions. The FIB is conceptually similar to a routing table or information base. It maintains a mirror image of the forwarding information contained in the IP routing table.

Cef table has cached copy of route below for fast switching so it does not have to look up every time

CORE#sh ip route 189.x.x.x

Routing entry for 189.x.x.x/24

  Known via "eigrp 1", distance 170, metric 52224

  Tag 12, type external

  Redistributing via eigrp 1

  Last update from 172.x.x.x on Port-channel5, 1w2d ago

  Routing Descriptor Blocks:

    172.21.253.6, from 172.21.253.6, 1w2d ago, via Port-channel5

      Route metric is 52224, traffic share count is 1

      Total delay is 40 microseconds, minimum bandwidth is 50000 Kbit

     Reliability 255/255, minimum MTU 1500 bytes

      Loading 4/255, Hops 3

      Route tag 12

  * 172.21.253.2, from 172.21.253.2, 1w2d ago, via Port-channel4

      Route metric is 52224, traffic share count is 1

      Total delay is 40 microseconds, minimum bandwidth is 50000 Kbit

      Reliability 255/255, minimum MTU 1500 bytes

      Loading 6/255, Hops 3

      Route tag 12

CORE#sh ip cef 189.x.x.x

189.x.x.x/24

  nexthop 172.21.253.2 Port-channel4

  nexthop 172.21.253.6 Port-channel5

CORE#

Thank You very much Mark. Appreciate your response. 

Peter Paluch
Cisco Employee
Cisco Employee

Hello,

In addition to Mark's response, in the CCIE Routing and Switching v5.0 Official Certification Guide, Volume 1 book from Cisco Press I co-authored with Narbik Kocharians, I have done a deep-dive into CEF, and fortunately, precisely the chapter with the CEF description including examples is available for free download here:

http://www.ciscopress.com/content/images/9781587143960/samplepages/9781587143960.pdf

Happy reading ;)

Best regards,
Peter

P.S.: Cisco also has a document about CEF here - it is somewhat shorter and not written by me but we reused some of the figures in the Cisco Press book:

http://www.cisco.com/c/en/us/support/docs/ip/express-forwarding-cef/13706-20.html

Thanks...Peter. Appreciate your response.

 

Joseph W. Doherty
Hall of Fame
Hall of Fame

Disclaimer

The Author of this posting offers the information contained within this posting without consideration and with the reader's understanding that there's no implied or expressed suitability or fitness for any purpose. Information provided is for informational purposes only and should not be construed as rendering professional advice of any kind. Usage of this posting's information is solely at reader's own risk.

Liability Disclaimer

In no event shall Author be liable for any damages wha2tsoever (including, without limitation, damages for loss of use, data or profit) arising out of the use or inability to use the posting's information even if Author has been advised of the possibility of such damage.

Posting

Very briefly, it's a way to do destination IP to route lookups very fast.  How it does that might not easily be explained briefly because variable length route prefixes makes the issue complex. Peter's references explain the "how".

The slowness of destination IP to route lookups, before CEF, was such is why you had sayings like "switch when you can, route when you must", tag switching (which became MPLS), and various different route caching techniques.

Review Cisco Networking products for a $25 gift card