CEF (Cisco Express Forwarding)


(Rene Molenaar) #21

Hi Jason,

On some of the older switches you might find only a CAM for switching. Nowadays, even the L2 switches have some “L3” capabilities like QoS and access-lists so they’ll have a TCAM.

The 2960-X can also do some routing (just static routes with SVI interfaces) so you’ll find a TCAM for sure. I don’t have an older 2950/2960 switch around but if you have one, try the following command to see what kind of TCAM tables it has:

Switch#show platform tcam utilization 

CAM Utilization for ASIC# 0                      Max            Used
                                             Masks/Values    Masks/values

 Unicast mac addresses:                       8412/8412        199/199   
 IPv4 IGMP groups + multicast routes:         1120/1120          1/1     
 IPv4 unicast directly-connected routes:      4096/4096          3/3     
 IPv4 unicast indirectly-connected routes:    2048/2048         38/38    
 IPv4 policy based routing aces:               442/442          12/12    
 IPv4 qos aces:                                512/512           6/6     
 IPv4 security aces:                           954/954          42/42

The output above is from a 3560E.

Rene


(Gaurav T) #22

Hello Rene

Can you explain the difference between “attached” and “received” in SHOW IP CEF command ?

SW1#sh ip cef
Prefix               Next Hop             Interface
0.0.0.0/0            no route
0.0.0.0/8            drop
0.0.0.0/32           receive              
11.11.11.11/32       receive              Loopback1
11.11.12.0/24        attached             FastEthernet0/24
11.11.12.0/32        receive              FastEthernet0/24

Thanks
Gary


(Rene Molenaar) #23

Hi Gary,

You will see a receive entry for the IP addresses that the router is using itself. As you can see this is a /32 entry (single IP address).

The attached entry are for the subnets on the directly connected interfaces.

Rene


(Gaurav T) #24

Thanks Rene,

I have another question, in the above section where u have mention about ARP request construct, I think the behavior of switches are different

The multilayer switch will check the routing table, notices that 192.168.20 /24 is directly connected and the following will happen:
The destination MAC address changes from FFF (Multilayer switch Fa0/1 ) to BBB (ComputerB).
The source MAC address changes from AAA (ComputerA) to GGG (Multilayer switch Fa0/2).===This seems to be Incorrect

I LAB this up with 3 switches (all real hardware 3550/3560) [ c3560-ipservicesk9-mz.122-55.SE10/ c3550-ipservicesk9-mz.122-44.SE6]

Simple topology- SW is just acting as regular sw with fa 0/23 & 19 as access port, SW2 and SW3 are acting like a end host (sort of PC with IP address on them)

SW2 -----------{fa 0/23 on both end}----------------SW1-----------{fa 0/19 on both end}-----------------SW3

When ARP request is created by SW2, its destination is always SW1 fa 0/19 and NOT fa 0/23 on SW1!, I also took packet capture and its shows the same thing,

Here is the relevant data, I will appreciate if you can review the config and attached screen shot and advise, Thanks Gary

------------------------------------------------------------------------------

SW1#sh int status | inc 0/19|0/23          
Fa0/19                       connected    1          a-full  a-100 10/100BaseTX
Fa0/23                       connected    1          a-full  a-100 10/100BaseTX
SW1#sh cdp nei
Capability Codes: R - Router, T - Trans Bridge, B - Source Route Bridge
                  S - Switch, H - Host, I - IGMP, r - Repeater, P - Phone, 
                  D - Remote, C - CVTA, M - Two-port Mac Relay 

Device ID        Local Intrfce     Holdtme    Capability  Platform  Port ID
SW2              Fas 0/23          146             R S I  WS-C3560- Fas 0/23
SW3              Fas 0/19          128             R S I  WS-C3550- Fas 0/19

!!! Before PING, SW1 MAC table don’t have any dynamic entry!!!

SW1#sh mac address-table 
          Mac Address Table
-------------------------------------------

Vlan    Mac Address       Type        Ports
----    -----------       --------    -----
 All    0100.0ccc.cccc    STATIC      CPU
 All    0100.0ccc.cccd    STATIC      CPU
 All    0180.c200.0000    STATIC      CPU
 All    0180.c200.0001    STATIC      CPU
 All    0180.c200.0002    STATIC      CPU
 All    0180.c200.0003    STATIC      CPU
 All    0180.c200.0004    STATIC      CPU
 All    0180.c200.0005    STATIC      CPU
 All    0180.c200.0006    STATIC      CPU
 All    0180.c200.0007    STATIC      CPU
 All    0180.c200.0008    STATIC      CPU
 All    0180.c200.0009    STATIC      CPU
 All    0180.c200.000a    STATIC      CPU
 All    0180.c200.000b    STATIC      CPU
 All    0180.c200.000c    STATIC      CPU
 All    0180.c200.000d    STATIC      CPU
 All    0180.c200.000e    STATIC      CPU
 All    0180.c200.000f    STATIC      CPU
 All    0180.c200.0010    STATIC      CPU
 All    ffff.ffff.ffff    STATIC      CPU
   1    0015.2b95.4c00    DYNAMIC     Fa0/19
   1    0023.05c6.b6c1    DYNAMIC     Fa0/23
Total Mac Addresses for this criterion: 22
SW2#sh run int fa 0/23
Building configuration...

Current configuration : 86 bytes
!
interface FastEthernet0/23
 no switchport
 ip address 10.10.12.2 255.255.255.0
end

!!! Before PING, SW2 MAC table don’t have any dynamic entry!!!

SW2#sh mac address-table 
          Mac Address Table
-------------------------------------------

Vlan    Mac Address       Type        Ports
----    -----------       --------    -----
 All    0100.0ccc.cccc    STATIC      CPU
 All    0100.0ccc.cccd    STATIC      CPU
 All    0180.c200.0000    STATIC      CPU
 All    0180.c200.0001    STATIC      CPU
 All    0180.c200.0002    STATIC      CPU
 All    0180.c200.0003    STATIC      CPU
 All    0180.c200.0004    STATIC      CPU
 All    0180.c200.0005    STATIC      CPU
 All    0180.c200.0006    STATIC      CPU
 All    0180.c200.0007    STATIC      CPU
 All    0180.c200.0008    STATIC      CPU
 All    0180.c200.0009    STATIC      CPU
 All    0180.c200.000a    STATIC      CPU
 All    0180.c200.000b    STATIC      CPU
 All    0180.c200.000c    STATIC      CPU
 All    0180.c200.000d    STATIC      CPU
 All    0180.c200.000e    STATIC      CPU
 All    0180.c200.000f    STATIC      CPU
 All    0180.c200.0010    STATIC      CPU
 All    ffff.ffff.ffff    STATIC      CPU
Total Mac Addresses for this criterion: 20
SW3#sh run int fa 0/19
Building configuration...

Current configuration : 86 bytes
!
interface FastEthernet0/19
 no switchport
 ip address 10.10.12.3 255.255.255.0
end

!!! Before PING, SW3 MAC table don’t have any dynamic entry!!!

SW3#sh mac address-table 
          Mac Address Table
-------------------------------------------

Vlan    Mac Address       Type        Ports
----    -----------       --------    -----
 All    0015.2b95.4c00    STATIC      CPU
 All    0015.2b95.4c01    STATIC      CPU
 All    0015.2b95.4c02    STATIC      CPU
 All    0015.2b95.4c03    STATIC      CPU
 All    0015.2b95.4c04    STATIC      CPU
 All    0015.2b95.4c05    STATIC      CPU
 All    0015.2b95.4c06    STATIC      CPU
 All    0015.2b95.4c07    STATIC      CPU
 All    0015.2b95.4c08    STATIC      CPU
 All    0015.2b95.4c09    STATIC      CPU
 All    0015.2b95.4c0a    STATIC      CPU
 All    0015.2b95.4c0b    STATIC      CPU
 All    0015.2b95.4c0c    STATIC      CPU
 All    0015.2b95.4c0d    STATIC      CPU
 All    0015.2b95.4c0e    STATIC      CPU
 All    0015.2b95.4c0f    STATIC      CPU
 All    0015.2b95.4c10    STATIC      CPU
 All    0015.2b95.4c11    STATIC      CPU
 All    0015.2b95.4c12    STATIC      CPU
 All    0015.2b95.4c13    STATIC      CPU
 All    0015.2b95.4c14    STATIC      CPU
 All    0015.2b95.4c15    STATIC      CPU
 All    0015.2b95.4c16    STATIC      CPU
 All    0015.2b95.4c17    STATIC      CPU
 All    0015.2b95.4c18    STATIC      CPU
 All    0015.2b95.4c19    STATIC      CPU
 All    0015.2b95.4c1a    STATIC      CPU
 All    0100.0c00.0000    STATIC      CPU
 All    0100.0ccc.cccc    STATIC      CPU
 All    0100.0ccc.cccd    STATIC      CPU
 All    0100.0ccd.cdce    STATIC      CPU
 All    0180.c200.0000    STATIC      CPU
 All    0180.c200.0001    STATIC      CPU
 All    0180.c200.0002    STATIC      CPU
 All    0180.c200.0003    STATIC      CPU
 All    0180.c200.0004    STATIC      CPU
 All    0180.c200.0005    STATIC      CPU
 All    0180.c200.0006    STATIC      CPU
 All    0180.c200.0007    STATIC      CPU
 All    0180.c200.0008    STATIC      CPU
 All    0180.c200.0009    STATIC      CPU
 All    0180.c200.000a    STATIC      CPU
 All    0180.c200.000b    STATIC      CPU
 All    0180.c200.000c    STATIC      CPU
 All    0180.c200.000d    STATIC      CPU
 All    0180.c200.000e    STATIC      CPU
 All    0180.c200.000f    STATIC      CPU
 All    0180.c200.0010    STATIC      CPU
Total Mac Addresses for this criterion: 48
SW2#sh int fa 0/23
FastEthernet0/23 is up, line protocol is up (connected) 
  Hardware is Fast Ethernet, address is 0023.05c6.b6c1 (bia 0023.05c6.b6c1)
  Internet address is 10.10.12.2/24
SW1#sh int fa 0/19       
FastEthernet0/19 is up, line protocol is up (connected) 
  Hardware is Fast Ethernet, address is 0023.05cb.2815 (bia 0023.05cb.2815)
SW1#sh int fa 0/23
FastEthernet0/23 is up, line protocol is up (connected) 
  Hardware is Fast Ethernet, address is 0023.05cb.2819 (bia 0023.05cb.2819)
SW3#sh int fa 0/19
FastEthernet0/19 is up, line protocol is up (connected) 
  Hardware is Fast Ethernet, address is 0015.2b95.4c00 (bia 0015.2b95.4c00)
  Internet address is 10.10.12.3/24

!!! AFTER PING, SW1 MAC table now having dynamic entry and notice the MAC address is of SW2 and SW3!!!

SW1#sh mac address-table 
          Mac Address Table
-------------------------------------------

Vlan    Mac Address       Type        Ports
----    -----------       --------    -----
 All    0100.0ccc.cccc    STATIC      CPU
 All    0100.0ccc.cccd    STATIC      CPU
 All    0180.c200.0000    STATIC      CPU
 All    0180.c200.0001    STATIC      CPU
 All    0180.c200.0002    STATIC      CPU
 All    0180.c200.0003    STATIC      CPU
 All    0180.c200.0004    STATIC      CPU
 All    0180.c200.0005    STATIC      CPU
 All    0180.c200.0006    STATIC      CPU
 All    0180.c200.0007    STATIC      CPU
 All    0180.c200.0008    STATIC      CPU
 All    0180.c200.0009    STATIC      CPU
 All    0180.c200.000a    STATIC      CPU
 All    0180.c200.000b    STATIC      CPU
 All    0180.c200.000c    STATIC      CPU
 All    0180.c200.000d    STATIC      CPU
 All    0180.c200.000e    STATIC      CPU
 All    0180.c200.000f    STATIC      CPU
 All    0180.c200.0010    STATIC      CPU
 All    ffff.ffff.ffff    STATIC      CPU
   1    0015.2b95.4c00    DYNAMIC     Fa0/19 -----!!!!!This is MAC of 0/19 on sw3
   1    0023.05c6.b6c1    DYNAMIC     Fa0/23-----!!!!!This is MAC of 0/23 on sw2
Total Mac Addresses for this criterion: 22

(Rene Molenaar) #25

Hi Gaurav,

In your example, SW1 is a multilayer switch but it is only acting as a L2 switch, switching frames within VLAN 1. It’s not doing any routing and won’t alter anything. The only thing it’ll do is learn source MAC addresses and forward frames based on the destination MAC address.

Rene


(Gaurav T) #26

make sense, thanks Rene


(sze jie k) #27

Hi Rene,

Thanks for the nice illustration and explanation.

If we have CEF turn on, is forwarding decision done in the FIB and is base on the longest matched ?

e.g.

router# show ip route
     ....
     D   192.168.32.0/26 [90/25789217] via 10.1.1.1
     R   192.168.32.0/24 [120/4] via 10.1.1.2
     O   192.168.32.0/19 [110/229840] via 10.1.1.3

I would believe the same entries appear in the FIB. So when required to route a packet to e.g. 192.168.32.200, does the forwarding decision take place in the FIB base on the longest match ? or it is still done using the RIB ?

Regards,

Alan


(Rene Molenaar) #28

Hi Alan,

The FIB is built based on information in the RIB.

In the RIB we install routes with the most longest match. When two routes are equal, it’s up to the administrative distance to select the route.

In your example, these three routes will also show up in the FIB.

Rene


(sze jie k) #29

Hi Rene,

Thanks for the response and sorry for the late reply.

router# show ip route

D 192.168.32.0/26 [90/25789217] via 10.1.1.1
R 192.168.32.0/24 [120/4] via 10.1.1.2
O 192.168.32.0/19 [110/229840] via 10.1.1.3

As per mentioned by you, since the 3 routes will exists in the FIB - let’s say i have a packet to 192.168.32.3, with the longest match ( it will take the 192.168.32.0/24 route).

is this decision to take the longest matched route (192.168.32.0/24 via 10.1.1.2) done using the RIB table or the FIB ?

Regards,
Alan


(Rene Molenaar) #30

Hi Alan,

In this example, the longest match will be your 192.168.32.0/26 route for 192.168.32.3 :slight_smile:

The decisions are made by the router, the best routes are installed in the routing table (RIB). The information from the RIB is then copied to the FIB so that forwarding can be done as fast as possible.

Rene


(sze jie k) #31

Hi Rene,

Thanks for your reply.
Yeap i make a mistake, it should be 192.168.32.0/26.

However, i think you have misunderstood me.
What i meant is, since these 3 routes are all installed in the routing table (RIB) and copied to the FIB table; the router must still select 1 path to use (which is the longest match path - 192.168.32.0/26).

But this selection of the routes out of the 3 available, is done by the router using the RIB or the FIB table ?
Meaning

  1. does the router go to the routing table
    (see that there are 3 routes, and choose the longest match route)

  2. or the router go to the FIB table
    (see that there are 3 routes,entries and choose the longest match route)

Regards,
Alan


(Andrew P) #32

Hi Alan,
I believe I understand what you are asking. You are asking whether routing rules, such as “always choose the longest match” require processing at the RIB level or whether this can be done by the FIB. The answer is the FIB.

When CEF is functional, the RIB is simply a control plane mechanism that collects all the best routes from all the routing protocols (or static routes) on the router. A mirror image of all of these is copied to the FIB so that there is a one-to-one ratio between what’s in the RIB and the FIB. The goal of the FIB is to avoid interrupting the main CPU of the router as much as possible. Because of this, more simple decisions like “always use longest matching route” is processed by the FIB.


(sze jie k) #33

Hi Andrew!,

Glad to see you around and yea! thanks for confirming my doubt.

I have a few more doubts that i have no where to turn to and i hope you will enlightened me…

My coreswitch has ip cef turn on my default.

q1) I have been reading up abit on cisco about IP CEF and it seems like to enable/disable IP CEF, you have to do in at the ingress interface as the decision (e.g. load balance is done there). – is it right ?

Assuming i have “no ip cef” and only wish to turn on ip cef on certain interfaces and ->
q2) if i want to do to packet loadbalancing, should “ip load-share per packet” command be issue on the ingress interface as well ?

q3) Reading How to Verify Cisco Express Forwarding -> “http://www.cisco.com/c/en/us/support/docs/ios-nx-os-software/ios-software-releases-120-mainline/47205-cef-whichpath.html

Use the show interface x/x stat command and determine the number of packets and bytes that the router forwarded through "Processor" instead of "Route cache." Note that "Route cache" includes both fast-switched and CEF-switched packets.
router#show interface stats     
FastEthernet0/0           
Switching path Pkts In  Chars In Pkts Out Chars Out 
Processor 95084 26211621 33493 3386174 
Route cache 24581 1132797 24542 13297583 
Distributed cache 0 0 0 0 
Total  119665 27344418 58035 16683757

Should this command be issue on the ingress or egress interface ?
if it is to be issue on the INGRESS interface -> What does the “Pkts Outs” under Route cache means then ?

Really hope to hear from you soon.

Regards,
Alan


(Shannon S) #34

Noticed a typo under the section where you explain the FIB table:

You wrote this 0.0.0.0 /4 instead of 224.0.0.0 /4 and 0.0.0.0 /24 instead 224.0.0.0 /24.


(Rene Molenaar) #35

Thanks Shannon, it has been fixed.


(sze jie k) #36

Hi Rene, Andrew,

Can i check how to we really verify ip cef are really taking place ?

Following cisco documentation leads to nowhere, as it does not specify which interface (ingress or egress) should we monitor ?

router#show interface stats FastEthernet0/0 Switching path Pkts In Chars In Pkts Out Chars Out Processor 95084 26211621 33493 3386174 Route cache 24581 1132797 24542 13297583 Distributed cache 0 0 0 0 Total 119665 27344418 58035 16683757

On my ingress interface, i am seeing
24581 pkts in (under route-cache) and 24525 pkts out.

So what does it really means ( 24581 inbound packets are cef processed ? - what about the outbound ?)

Really hope someone could shed some light on this.

Regards,
Alan


(Shannon S) #37

Thanks Rene!


(Rene Molenaar) #38

Hi Alan,

That command does show the number of CEF processed packets:

R1#show interfaces stats                 
GigabitEthernet0/0
          Switching path    Pkts In   Chars In   Pkts Out  Chars Out
               Processor     227073   41570717     668663  108107547
             Route cache       1062     370522          0          0
                   Total     228135   41941239     668663  108107547

Route cache contains both fast-switched and CEF switched packets. You can see incoming and outgoing packets.

Rene


(Networklessons Admin) split this topic #39

19 posts were merged into an existing topic: CEF (Cisco Express Forwarding)


(Davis W) #40

Hi Rene,

I got one ASR1001X and would like to check what is the maximum IPV4 FIB route can handle and the maximum memory for FIB. when i show cef memory, result as below. I can’t find how much the total memory for the FIB or the maximum IPV4 route can handle. It just show allocated but not show the total. How i can check it?

Below is the show cef memory with 500K IPV4 route in FIB

ASR1001X#show cef memory
  Memory                          in use/allocated         Count
  ------------------------------------------------------------------
  ADJ: GSB                  :       1552/1736       ( 89%) [2]
  ADJ: NULL adjacency       :        436/528        ( 82%) [1]
  ADJ: adj sev context      :        232/416        ( 55%) [2]
  ADJ: adjacency            :      12224/12776      ( 95%) [6]
  ADJ: mcprp_adj_inject_sb  :      16588/16680      ( 99%) [1]
  ADJ: request resolve      :       4688/4872       ( 96%) [2]
  ADJ: sevs                 :        432/616        ( 70%) [2]
  CEF: Brkr Updat           :      10040/10776      ( 93%) [8]
  CEF: Brkr Update Rec      :        328/512        ( 64%) [2]
  CEF: Brkr zone            :       1448/3288       ( 44%) [20]
  CEF: Broker               :       7168/9008       ( 79%) [20]
  CEF: Brokers Array        :        308/400        ( 77%) [1]
  CEF: EVENT msg chunks     :        332/424        ( 78%) [1]
  CEF: FIB LC array         :        452/544        ( 83%) [1]
  CEF: FIB subtree context  :        416/968        ( 42%) [6]
  CEF: FIBHWIDB             :       7556/9672       ( 78%) [23]
  CEF: FIBIDB               :      15112/17688      ( 85%) [28]
  CEF: IPv4 ARP throttle    :       2052/2144       ( 95%) [1]
  CEF: IPv4 process         :        980/1256       ( 78%) [3]
  CEF: IPv6 FIB subblock    :        712/896        ( 79%) [2]
  CEF: OCE get hash callbac :         52/144        ( 36%) [1]
  CEF: Protocol Discard sub :       2364/4480       ( 52%) [23]
  CEF: TABLE msg chunks     :        804/896        ( 89%) [1]
  CEF: Table rate Monitor S :        352/720        ( 48%) [4]
  CEF: arp throttle chunk   :      28168/28352      ( 99%) [2]
  CEF: cover need           :       1864/2232       ( 83%) [4]
  CEF: cover need deagg chu :        344/528        ( 65%) [2]
  CEF: dQ elems             :        360/544        ( 66%) [2]
  CEF: dQ walks             :        480/664        ( 72%) [2]
  CEF: fib                  :  158091136/158520960  ( 99%) [4672]
  CEF: fib GSB              :      23612/24072      ( 98%) [5]
  CEF: fib deps             :        368/552        ( 66%) [2]
  CEF: fib loop sb          :        344/528        ( 65%) [2]
  CEF: fib_fib_co           :        672/856        ( 78%) [2]
  CEF: fib_fib_covered chun :        368/552        ( 66%) [2]
  CEF: fib_fib_rp_bfd_sb    :       2728/2912       ( 93%) [2]
  CEF: fib_fib_sr           :       5248/6536       ( 80%) [14]
  CEF: fib_fib_src_adj_sb   :        376/560        ( 67%) [2]
  CEF: fib_fib_src_adj_sb_a :        320/504        ( 63%) [2]
  CEF: fib_fib_src_interfac :        432/616        ( 70%) [2]
  CEF: fib_fib_src_mcast_sb :        376/560        ( 67%) [2]
  CEF: fib_fib_src_rr_sb    :        376/560        ( 67%) [2]
  CEF: fib_fib_src_special_ :        344/528        ( 65%) [2]
  CEF: fib_head_s           :        720/904        ( 79%) [2]
  CEF: fib_head_sb chunk    :        376/560        ( 67%) [2]
  CEF: fib_member           :       2528/2896       ( 87%) [4]
  CEF: fib_member_sb chunk  :        368/552        ( 66%) [2]
  CEF: fib_rib_route_update :       5200/5384       ( 96%) [2]
  CEF: fib_table_fibswsb_de :        592/776        ( 76%) [2]
  CEF: fibhwidb table       :    1048580/1048672    ( 99%) [1]
  CEF: fibidb plist dq it   :        544/728        ( 74%) [2]
  CEF: fibidb table         :    1048580/1048672    ( 99%) [1]
  CEF: fibswsb ct           :      11696/12064      ( 96%) [4]
  CEF: fibswsb ctl          :       1680/1864       ( 90%) [2]
  CEF: hash table           :     262152/262336     ( 99%) [2]
  CEF: ipv6 feature error c :       7564/7656       ( 98%) [1]
  CEF: ipv6 feature error s :       7564/7656       ( 98%) [1]
  CEF: ipv6 not cef switche :       1276/1368       ( 93%) [1]
  CEF: ipv6 not cef switche :       1276/1368       ( 93%) [1]
  CEF: loadinf16            :        928/1112       ( 83%) [2]
  CEF: loadinfo2            :        432/616        ( 70%) [2]
  CEF: mpls long path exts  :        488/672        ( 72%) [2]
  CEF: mpls path exts       :        368/552        ( 66%) [2]
  CEF: nh entry context     :        344/528        ( 65%) [2]
  CEF: nh entry params      :        360/544        ( 66%) [2]
  CEF: non_ip entry context :        432/616        ( 70%) [2]
  CEF: pathl                :      12848/13584      ( 94%) [8]
  CEF: pathl ifs            :       2160/2712       ( 79%) [6]
  CEF: pathl its            :        648/832        ( 77%) [2]
  CEF: pathloutputchain     :        792/976        ( 81%) [2]
  CEF: paths                :      13656/14392      ( 94%) [8]
  CEF: plist dq it          :        488/672        ( 72%) [2]
  CEF: prefix query msg chu :       2692/2784       ( 96%) [1]
  CEF: subtree context      :       2232/3336       ( 66%) [12]
  CEF: table                :       1736/2104       ( 82%) [4]
  CEF: table GSB            :       1080/1264       ( 85%) [2]
  CEF: table walks          :        432/616        ( 70%) [2]
  CEF: terminal fibs list   :        128/312        ( 41%) [2]
  CEF: test fib entry sbs   :        472/656        ( 71%) [2]
  CEF: up event c           :        784/968        ( 80%) [2]
  CEF: up event chunk       :        232/416        ( 55%) [2]
  CEF: v6 nd discard thrott :       4100/4192       ( 97%) [1]
  CEF: v6 nd throttle chunk :      19368/19552      ( 99%) [2]
  CEF: vrf                  :       2272/2456       ( 92%) [2]
  COLL: coll rec            :        368/552        ( 66%) [2]
  TAL: MTRIE n08            :   46892072/47022896   ( 99%) [1422]
  TAL: control block        :        520/888        ( 58%) [4]
  TAL: item list elem       :        232/416        ( 55%) [2]
  TAL: mtrie control block  :       3560/3744       ( 95%) [2]
  TAL: rtree aux            :        448/816        ( 54%) [4]
  TAL: rtree control block  :        312/680        ( 45%) [4]
  TAL: rtree node           :       1936/2120       ( 91%) [2]
  TAL: rtree nodes          :        848/1032       ( 82%) [2]
  TAL: tree control         :        448/1000       ( 44%) [6]
  ------------------------------------------------------------------
  Totals                    :  207615456/208208120  ( 99%) [6442]

When i disable the BGP peering and leave 41 route in FIB. the result show as below

ASR1001X#show cef fib
41 allocated IPv4 entries, 0 failed allocations
13 allocated IPv6 entries, 0 failed allocations
ASR1001X#  show cef memory
  Memory                          in use/allocated         Count
  ------------------------------------------------------------------
  ADJ: GSB                  :       1552/1736       ( 89%) [2]
  ADJ: NULL adjacency       :        436/528        ( 82%) [1]
  ADJ: adj sev context      :        232/416        ( 55%) [2]
  ADJ: adjacency            :      12224/12776      ( 95%) [6]
  ADJ: mcprp_adj_inject_sb  :      16588/16680      ( 99%) [1]
  ADJ: request resolve      :       4688/4872       ( 96%) [2]
  ADJ: sevs                 :        432/616        ( 70%) [2]
  CEF: Brkr Updat           :      10040/10776      ( 93%) [8]
  CEF: Brkr Update Rec      :        328/512        ( 64%) [2]
  CEF: Brkr zone            :       1448/3288       ( 44%) [20]
  CEF: Broker               :       7168/9008       ( 79%) [20]
  CEF: Brokers Array        :        308/400        ( 77%) [1]
  CEF: EVENT msg chunks     :        332/424        ( 78%) [1]
  CEF: FIB LC array         :        452/544        ( 83%) [1]
  CEF: FIB subtree context  :        416/968        ( 42%) [6]
  CEF: FIBHWIDB             :       7556/9672       ( 78%) [23]
  CEF: FIBIDB               :      15112/17688      ( 85%) [28]
  Memory                          in use/allocated         Count
  ------------------------------------------------------------------

  CEF: IPv4 ARP throttle    :       2052/2144       ( 95%) [1]
  CEF: IPv4 process         :        980/1256       ( 78%) [3]
  CEF: IPv6 FIB subblock    :        712/896        ( 79%) [2]
  CEF: OCE get hash callbac :         52/144        ( 36%) [1]
  CEF: Protocol Discard sub :       2364/4480       ( 52%) [23]
  CEF: TABLE msg chunks     :        804/896        ( 89%) [1]
  CEF: Table rate Monitor S :        352/720        ( 48%) [4]
  CEF: arp throttle chunk   :      28168/28352      ( 99%) [2]
  CEF: cover need           :       1864/2232       ( 83%) [4]
  CEF: cover need deagg chu :        344/528        ( 65%) [2]
  CEF: dQ elems             :        360/544        ( 66%) [2]
  CEF: dQ walks             :        480/664        ( 72%) [2]
  CEF: fib                  :     500048/501888     ( 99%) [20]
  CEF: fib GSB              :      23612/24072      ( 98%) [5]
  CEF: fib deps             :        368/552        ( 66%) [2]
  CEF: fib loop sb          :        344/528        ( 65%) [2]
  CEF: fib_fib_co           :        672/856        ( 78%) [2]
  CEF: fib_fib_covered chun :        368/552        ( 66%) [2]
  CEF: fib_fib_rp_bfd_sb    :       2728/2912       ( 93%) [2]
  Memory                          in use/allocated         Count
  ------------------------------------------------------------------

  CEF: fib_fib_sr           :       5248/6536       ( 80%) [14]
  CEF: fib_fib_src_adj_sb   :        376/560        ( 67%) [2]
  CEF: fib_fib_src_adj_sb_a :        320/504        ( 63%) [2]
  CEF: fib_fib_src_interfac :        432/616        ( 70%) [2]
  CEF: fib_fib_src_mcast_sb :        376/560        ( 67%) [2]
  CEF: fib_fib_src_rr_sb    :        376/560        ( 67%) [2]
  CEF: fib_fib_src_special_ :        344/528        ( 65%) [2]
  CEF: fib_head_s           :        720/904        ( 79%) [2]
  CEF: fib_head_sb chunk    :        376/560        ( 67%) [2]
  CEF: fib_member           :       2528/2896       ( 87%) [4]
  CEF: fib_member_sb chunk  :        368/552        ( 66%) [2]
  CEF: fib_rib_route_update :       5200/5384       ( 96%) [2]
  CEF: fib_table_fibswsb_de :        592/776        ( 76%) [2]
  CEF: fibhwidb table       :    1048580/1048672    ( 99%) [1]
  CEF: fibidb plist dq it   :        544/728        ( 74%) [2]
  CEF: fibidb table         :    1048580/1048672    ( 99%) [1]
  CEF: fibswsb ct           :      11696/12064      ( 96%) [4]
  CEF: fibswsb ctl          :       1680/1864       ( 90%) [2]
  CEF: hash table           :     262152/262336     ( 99%) [2]
  Memory                          in use/allocated         Count
  ------------------------------------------------------------------

  CEF: ipv6 feature error c :       7564/7656       ( 98%) [1]
  CEF: ipv6 feature error s :       7564/7656       ( 98%) [1]
  CEF: ipv6 not cef switche :       1276/1368       ( 93%) [1]
  CEF: ipv6 not cef switche :       1276/1368       ( 93%) [1]
  CEF: loadinf16            :        928/1112       ( 83%) [2]
  CEF: loadinfo2            :        432/616        ( 70%) [2]
  CEF: mpls long path exts  :        488/672        ( 72%) [2]
  CEF: mpls path exts       :        368/552        ( 66%) [2]
  CEF: nh entry context     :        344/528        ( 65%) [2]
  CEF: nh entry params      :        360/544        ( 66%) [2]
  CEF: non_ip entry context :        432/616        ( 70%) [2]
  CEF: pathl                :      12848/13584      ( 94%) [8]
  CEF: pathl ifs            :       2160/2712       ( 79%) [6]
  CEF: pathl its            :        648/832        ( 77%) [2]
  CEF: pathloutputchain     :        792/976        ( 81%) [2]
  CEF: paths                :      13656/14392      ( 94%) [8]
  CEF: plist dq it          :        488/672        ( 72%) [2]
  CEF: prefix query msg chu :       2692/2784       ( 96%) [1]
  CEF: subtree context      :       2232/3336       ( 66%) [12]
  Memory                          in use/allocated         Count
  ------------------------------------------------------------------

  CEF: table                :       1736/2104       ( 82%) [4]
  CEF: table GSB            :       1080/1264       ( 85%) [2]
  CEF: table walks          :        432/616        ( 70%) [2]
  CEF: terminal fibs list   :         76/168        ( 45%) [1]
  CEF: test fib entry sbs   :        472/656        ( 71%) [2]
  CEF: up event c           :        784/968        ( 80%) [2]
  CEF: up event chunk       :        232/416        ( 55%) [2]
  CEF: v6 nd discard thrott :       4100/4192       ( 97%) [1]
  CEF: v6 nd throttle chunk :      19368/19552      ( 99%) [2]
  CEF: vrf                  :       2272/2456       ( 92%) [2]
  COLL: coll rec            :        368/552        ( 66%) [2]
  TAL: MTRIE n08            :      65952/66136      ( 99%) [2]
  TAL: control block        :        520/888        ( 58%) [4]
  TAL: item list elem       :        232/416        ( 55%) [2]
  TAL: mtrie control block  :       3560/3744       ( 95%) [2]
  TAL: rtree aux            :        448/816        ( 54%) [4]
  TAL: rtree control block  :        312/680        ( 45%) [4]
  TAL: rtree node           :       1936/2120       ( 91%) [2]
  TAL: rtree nodes          :        848/1032       ( 82%) [2]
  Memory                          in use/allocated         Count
  ------------------------------------------------------------------

  TAL: tree control         :        448/1000       ( 44%) [6]
  ------------------------------------------------------------------
  Totals                    :    3198196/3232144    ( 98%) [369]

Davis