Solved

What is the purpose of CEF and the FIB and AT tables

Posted on 2010-09-03
8
1,266 Views
Last Modified: 2012-05-10
My understanding of routers is that they can use Distributed CEF, CEF, Fast switching and Process switching.

Is the above routing or switching?

If you use CEF then you need a FIB and AT tables? No CEF then no FIB or AT?

A FIB appears to me to be a combination of the Route Table and the ARP cache.

The AT table is confusing but the name seems to imply it is similar to a mac-address-table.

I have tried reading about CEF many times but it is confusing because I don't understand the basics...The router starts off routing and then determines distinct flows of data and then starts switching using CEF?

If a Router does not have CEF then no FIB and AT and all packets are Routed but not switched?

I have looked at the FIB using the show ip cef and it makes sense but when I try to look at the AT table it appears blank or does not make sense to me. Maybe I am running the wrong command; I have ran something like sh ip cef adjacencies or something similar.

Is CEF just offloading the routing from the CPU to the switching ASICS?
0
Comment
Question by:Dragon0x40
  • 4
  • 3
8 Comments
 
LVL 6

Assisted Solution

by:joopv
joopv earned 100 total points
Comment Utility
Regarding your last line: yes.

The CPU in the average cisco router is not very powerful.  If it would have to de-capsulate, decode, inspect every incoming packet, modify or drop, buffer it and encapsulate and send it out to another interface "manually" (process switching) the performance of the router would be very low.

There are various levels of offloading these tasks to dedicated designed hardware chips.

By using specialized hardware, the CPU only handles a new tcp session once at the beginning.of a tcp session (eg a http request).

There exist Cisco devices that run on more or less ordinary Intel PC hardware.  (PIX).  These run fully process-switched, but only support ethernet ports and IP protocols.

In fact, there exists a PIX emulator that can be run on a PC so you can run PIX IOS (Intel code) in full speed on any Intel PC...
0
 
LVL 50

Accepted Solution

by:
Don Johnston earned 400 total points
Comment Utility
>Is the above routing or switching?
It's used in layer-3 packet forwarding (Routers and Multi-layer switches)

>If you use CEF then you need a FIB and AT tables? No CEF then no FIB or AT?
Correct

>A FIB appears to me to be a combination of the Route Table and the ARP cache.
No, the FIB is like the routing table. The difference is that routing tables contain networks. The FIB can contain networks AND hosts.

>The AT table is confusing but the name seems to imply it is similar to a mac-address-table.
The AT is like the ARP cache.

>I have tried reading about CEF many times but it is confusing because I don't understand the basics...The router starts off routing and then determines distinct flows of data and then starts switching using CEF?
Close. In the old days, everything was process switched. The router CPU did everything (de-encapsulation, routing table lookup, ARP cache lookup, encapsulation, etc). Then they started caching the results of the routing table lookups and ARP cache lookups. Then they put in chips that could do the decapsulate, lookup the cached info and rewrite. This is "fast switching". But if the info wasn't cached, it still had to be process switched. CEF and fast switching are similar except that CEF uses a FIB/AT while fast switching uses a fast switching cache.

>If a Router does not have CEF then no FIB and AT and all packets are Routed but not switched?
Unless they're fast switched. But if there's no fast switching cache entry or the router doesn't support fast switching, then the packet will be process switched.

>I have looked at the FIB using the show ip cef and it makes sense but when I try to look at the AT table it appears blank or does not make sense to me. Maybe I am running the wrong command; I have ran something like sh ip cef adjacencies or something similar.
That's the right command. There's also a "show adjacency" Can you post your table and point to what you don't understand?

Is CEF just offloading the routing from the CPU to the switching ASICS?
Close. It offloads the layer-2 rewrite and FIB/AT lookup to an ASIC.


0
 

Author Comment

by:Dragon0x40
Comment Utility
thanks joopv,

What is PIX? Private Internet Exchange? A firewall?

thanks donjohnston,
I will post the show adjacencies.
0
 
LVL 50

Expert Comment

by:Don Johnston
Comment Utility
PIX is what Cisco used to call their firewalls. Now they're called ASA's (Adaptive Security Appliances).
0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 

Author Comment

by:Dragon0x40
Comment Utility
I don't understand what the numbers in the parentheses mean under the sh adj command. ex (5)

Does the adjacency table mean that a device with ip xx.xxx.24.209 is physically adjacent and can be reached by sending the packets to vlan interface 500?

What do the receive and attached under the sh ip cef command mean?

Does a packet have to match 10.xxx.9.0/24 exactly to be sent to GigabitEthernet9/48

#sh ip int br | ex unassigned
Interface                  IP-Address      OK? Method Status                Protocol
Vlan500                    xx.xxx..1.2      YES NVRAM  up                    up
Vlan900                    yyy.yy.192.2    YES NVRAM  up                    up
GigabitEthernet9/47        10.xxx.8.10     YES NVRAM  down                  down
GigabitEthernet9/48        10.xxx.9.10     YES NVRAM  up                    up

#sh run
interface Vlan1
 no ip address
 shutdown
!
interface Vlan500
 ip address xx.xxx.1.2 255.255.0.0
!
interface Vlan900
 ip address yyy.yy.xxx.2 255.255.255.0
!
router ospf 777
 log-adjacency-changes
 network xx.xxx.0.0 0.0.255.255 area 500
 network yyy.yy.xxx.0 0.0.0.255 area 500
!
ip nat inside source list 10 interface Vlan500 overload
ip classless
ip route 0.0.0.0 0.0.0.0 10.xxx9.1
ip route 0.0.0.0 0.0.0.0 10.xxx.8.1
ip route xx.0.0.0 255.0.0.0 xx.xxx.1.1
ip route yyy.yy.0.0 255.255.0.0 yyy.yy.192.1


#sh adjacency
Protocol Interface                 Address
IP       Vlan500                   xx.xxx..24.209(5)
IP       Vlan500                   xx.xxx..144.89(5)
IP       Vlan500                   xx.xxx..44.229(5)
IP       GigabitEthernet9/48       10.xxx.9.1(7)
IP       Vlan500                   xx.xxx..72.65(5)
IP       Vlan500                   xx.xxx..24.17(5)
IP       Vlan500                   xx.xxx..56.49(5)
IP       Vlan500                   xx.xxx..44.36(5)
IP       Vlan500                   xx.xxx..144.152(5)
IP       Vlan500                   xx.xxx..45.37(5)
IP       Vlan500                   xx.xxx..72.71(5)
IP       Vlan500                   xx.xxx..45.34(5)
IP       Vlan500                   xx.xxx..44.34(5)
IP       Vlan500                   xx.xxx..16.30(5)
IP       Vlan500                   xx.xxx..73.71(5)
IP       Vlan500                   xx.xxx..27.21(5)
IP       Vlan500                   xx.xxx..144.158(5)
IP       Vlan500                   xx.xxx..72.69(5)
IP       Vlan500                   xx.xxx..46.35(5)
IP       GigabitEthernet9/48       10.xxx.9.4(5)

#sh ip cef
Prefix              Next Hop             Interface
0.0.0.0/0           10.xxx.9.1           GigabitEthernet9/48
0.0.0.0/32          receive
10.192.9.0/24       attached             GigabitEthernet9/48
10.192.9.0/32       receive
10.192.9.1/32       10.xxx.9.1           GigabitEthernet9/48
10.192.9.4/32       10.xxx.9.4           GigabitEthernet9/48
10.192.9.10/32      receive
10.192.9.13/32      10.xxx.9.13          GigabitEthernet9/48
10.192.9.255/32     receive
11.0.0.0/8          11.xxx.1.1           Vlan500
11.128.0.0/16       yyy.yy.192.1         Vlan900
                    yyy.yy.192.3         Vlan900
11.136.0.0/16       yyy.yy.192.3         Vlan900
                    172.25.192.4         Vlan900
11.192.0.0/16       attached             Vlan500
11.192.0.0/32       receive
11.192.1.1/32       xx,xxx.1.1           Vlan500
0
 
LVL 50

Expert Comment

by:Don Johnston
Comment Utility
Your output is different than I'm used to seeing.

>I don't understand what the numbers in the parentheses mean under the sh adj command. ex (5)

The only thing I think of is the number in parentheses is the time remaining

http://www.ciscosystems.com/en/US/docs/routers/7600/ios/12.1E/command/reference/r1.html#wp1080156

>Does the adjacency table mean that a device with ip xxx.xx.24.209 is  physically adjacent and can be reached by sending the packets to vlan  interface 500?

Yes.

>What do the receive and attached under the sh ip cef command mean?

Attached means the interface is attached to that network.<br>Receive is the network, broadcast and IP address for the attached network.

>Does a packet have to match 10.xxx9.0/24 exactly to be sent to GigabitEthernet9/48

No. That's (in your case) a network. There will never be a packet with a destination address of 10.xxx.9.0
0
 

Author Comment

by:Dragon0x40
Comment Utility
I don't know if it is time remaining because the (5) never changes when I re-enter the comand "show adjacency".

I looked at the link you sent me and it had a show adjacency summary command:

#sh adj summary
Adjacency Table has 511 adjacencies
  Table epoch: 0 (511 entries at this epoch)

  Interface                 Adjacency Count
  EOBC0/0                   1
  GigabitEthernet9/48       3
  Vlan500                   504
  Vlan900                   3

What is interface EOBC0/0?

I did not mean the packet had to match the network...I meant to ask does it have to match exactly the first 24 bits. Ex: 10.192.9.X
0
 
LVL 50

Expert Comment

by:Don Johnston
Comment Utility
Routing table, CEF, it doesn't matter. It's always longest match first.
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

This article is focussed on erradicating the confusion with slash notations. This article will help you identify and understand the purpose and use of slash notations. A deep understanding of this will help you identify networks quicker especially w…
Getting hacked is no longer a matter or "if you get hacked" — the 2016 cyber threat landscape is now titled "when you get hacked." When it happens — will you be proactive, or reactive?
After creating this article (http://www.experts-exchange.com/articles/23699/Setup-Mikrotik-routers-with-OSPF.html), I decided to make a video (no audio) to show you how to configure the routers and run some trace routes and pings between the 7 sites…
After creating this article (http://www.experts-exchange.com/articles/23699/Setup-Mikrotik-routers-with-OSPF.html), I decided to make a video (no audio) to show you how to configure the routers and run some trace routes and pings between the 7 sites…

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now