2010-04-04 14:21:36
Cisco Express Forwarding (CEF)
The two main components of CEF are the forwarding information base (FIB) and the adjacency table. IP routing table is maintained by a router’s control plane. CEF operates in the data plane.
sh ip cef
Shows layer 3 forwarding information. Version is the version of the table and epoch is the number of times the table has been rebuilt.
R1#sh ip cef 10.1.1.1 10.1.1.1/32, version 42, epoch 0, receive
clear ip cef epoch
Here you can see that I rebuild the CEF table and increase the epoch count.
R1#sh ip cef 10.1.1.1 10.1.1.1/32, version 42, epoch 0, receive R1#clear ip cef epoch R1#sh ip cef 10.1.1.1 10.1.1.1/32, version 42, epoch 1, receive
sh ip cef 10.0.0.0 255.0.0.0 longer-prefixes
Attached, obviously the subnet is attached to this router. Receive, the router listens on that subnet or address.
R1#sh ip cef 10.0.0.0 255.0.0.0 longer-prefixes Prefix Next Hop Interface 10.1.1.0/30 attached Serial0/0/0.12 10.1.1.0/32 receive 10.1.1.1/32 receive 10.1.1.3/32 receive 10.1.1.4/30 10.1.1.2 Serial0/0/0.12 10.1.1.8/30 10.1.1.2 Serial0/0/0.12 10.1.4.4/30 10.1.1.2 Serial0/0/0.12 10.1.4.8/30 10.1.1.2 Serial0/0/0.12 10.2.1.0/24 10.1.1.2 Serial0/0/0.12 10.2.2.0/24 10.1.1.2 Serial0/0/0.12 10.2.4.12/30 10.1.1.2 Serial0/0/0.12
sh adjacency
Verifies an adjacency exists for a connected host.
R1#sh adjacency Protocol Interface Address IP Serial0/0/0.12 point2point(19) IPV6 Serial0/0/0.12 point2point(10) IP Serial0/1/0.15 point2point(7)
Troubleshooting Layer 2 to Layer 3 Mapping
sh ip arp — Shows the ARP cache of the router, by default stores them for four hours. IT is the MAC address to IP address mapping.
sh frame-relay map — Displays the Frame Relay DLCIs and their next hop ip address.
sh adjacency detail — Displays information from a router CEF adjacency table.
sh ip arp
R4#sh ip arp Protocol Address Age (min) Hardware Addr Type Interface Internet 10.1.4.10 207 0018.1825.2543 ARPA FastEthernet0/1 Internet 10.1.4.9 - 001b.d421.480b ARPA FastEthernet0/1 Internet 10.1.4.6 41 0012.d9a5.1542 ARPA FastEthernet0/0 Internet 10.1.4.5 - 001b.d421.480a ARPA FastEthernet0/0
sh frame-relay map
R1#sh frame-relay map Serial0/0/0.12 (up): point-to-point dlci, dlci 102(0x66,0x1860), broadcast status defined, active Serial0/1/0.15 (up): point-to-point dlci, dlci 105(0x69,0x1890), broadcast status defined, active
sh adjacency detail
R1#sh adjacency detail Protocol Interface Address IP Serial0/0/0.12 point2point(19) 25 packets, 1940 bytes 18610800 CEF expires: 00:02:35 refresh: 00:00:35 Epoch: 0 IPV6 Serial0/0/0.12 point2point(10) 0 packets, 0 bytes 186186DD IPv6 CEF never Epoch: 0 IP Serial0/1/0.15 point2point(7) 32 packets, 3955 bytes 18910800 CEF expires: 00:02:26 refresh: 00:00:26 Epoch: 0