cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
850
Views
0
Helpful
7
Replies

CEF stream timers

ahintzsche
Level 1
Level 1

Hello,

Can anybody advise of when CEF flushes entries in its forwarding table? Are there any commands to view that table and can timers to flush entries be influenced? I mean can I change the timer to flush the entry if the source/destination stream has been idle for a specific time.

Thanks a lot. Anke

7 Replies 7

Istvan_Rabai
Level 7
Level 7

Hi Anke,

CEF is topology based, not flow-based.

This means the CEF table is built and modified dynamically in accordance with the changes to the routing table, not according to the most current streams or flows through the router.

Fast switching is the switching method that is based on flows (streams) where the entries in the fast switching cache time out after a specified time.

Cheers:

Istvan

Hello Istvan

Aha. I thought CEF was a different switching method to fast-switching. Looks like its a different process that runs before fast-switching.

All I could see is that 1/20th of the CEF cache gets invalidated every minute. Is there a rule (oldest, random, etc.) to it? How can you show the CEF cache?

If it is the fast-switching cache that I need to time out faster, how would I go about it?

Thanks Anke

Hi Anke,

You thought right. CEF is a quite different switching method.

Nowadays, it is prevalent in Cisco routers and switches.

The CEF cache can be seen with the "show ip cef" command.

I don't quite get what you are trying to accomplish.

I would suggest you to read the following book about CEF architecture, then you probably will get the answers you want:

http://www.ciscopress.com/bookstore/product.asp?isbn=1587052369

Cheers:

Istvan

Hi Istvan, oh dear, they've written a whole book on it. Looks like I had the wrong impression, I thought it had individual datastreams in it's cache (like 1.1.1.100 - 2.2.2.100), but it looks more like a routing table (dest 2.2.2.0 via x). I just wanted to randomise the load balancing more.

In my test net I want to load balance between 10.137.1.100 and 10.137.2.0/24. In the ip cef table I have prefix entries for 10.137.2.0/24 via (equal) next hop 10.137.1.11 and 10.137.1.10. I just want to know how does CEF do its load balancing decision between the two. (source/dest host, source/dest network, source only). And how often is the next hop decision renewed? Let's say there were no packets between 10.137.1.100 and 10.137.2.100 for x minutes, when would CEF choose a new next hop?

Thanks Anke

PS: I'll have a look at the book. There is not much written on the web about the ins and outs of CEF.

Hi Anke,

CEF indeed does load sharing that can be configured under the respective outgoing interfaces.

As far as I know, CEF will not do load-sharing between next-hop routers over the same outgoing interface, but only between different outgoing interfaces.

2 types of load sharing exist:

- per packet load sharing: configured with the "ip load-sharing per-packet" command under the outgoing interfaces.

- per source ip - destination ip pair load sharing: configured with the "ip load-sharing per-destination" command under the outgoing interfaces.

Next-hop information is not timing out in CEF. It is renewed only if the routing table itself is renewed as a result of reconvergence of the routing protocol(s).

EDIT:

For load-sharing between next-hop routers over the same outgoing interface you can configure policy-based routing.

Depending on the traffic characteristics you can set different ip next-hops in the route-map.

But this will most probably do an uneven load sharing between the next-hop routers.

Also, policy-based routing is process-switched, not CEF-switched, that will cause an additional load on the CPU of the router.

Cheers:

Istvan

Thanks Istvan,

I've tested again in my test network. per-destination seems the default. It's good, it does do source/dest pair load balancing. And even on one single outgoing interface.

Fair enough the CEF next hop table doesn't time out. But there must be a more specific switching table (source/dest pair) that times out after a while. Is it the fast switching table? I'll have a look at the book, it seems to go quite in detail about the different switching methods.

I think I will have to try it out in the real network to see what the split is going to be.

Thanks for all your help Anke.

I believe CEF is fully deterministic in how it "hashes" flows across multiple paths. The only impact with timers would perhaps be it tracking a flow's stats.

On some platforms/(later)IOSs, there's a configuration option to change how CEF hashes its flows. This seems similar in concept to switches supporting Etherchannel hash options.

The major difference between CEF and other "cache" methods, CEF treats every packet alike when making a packet's forwarding decision. Other cache methods do much forwarding decision work on a flow's 1st packet, "save" (cache) that decision, and apply it to subsequent flow packets.

CEF negates the need/benefit for other cache methods, except perhaps for flow cache. The reason being, although CEF improves forwarding decision performance especially for 1st packet, there's often other decision peformance issues such as ACLs. (NB: Incidently, at least for ACLs, on the higher router platforms, there's compiled ACLs to improve ACL processing without caching too.)

Review Cisco Networking products for a $25 gift card