На страницах нашего онлайн портала alivahotel.ru мы расскажем много самого интересного и познавательного, полезного и увлекательного для наших постоянных читателей.
В финальной части мы быстренько пробежимся по CEF, посмотрим какое место в этой технологии занимают Forward Information Base (FIB) и ее часть – Adjacency Table.
CEF MLS содержит в себе два функциональных блока – layer 3 engine, формирующий информацию о маршрутах, которую может использовать layer 3 forwarding engine для обработки пакетов аппаратными средствами.
Forward Information Base
Layer 3 engine (фактически маршрутизатор) формирует таблицу маршрутизации, поддерживает ее в актуальном состоянии и, что самое главное, форматирует и компилирует ее в новый формат – Forward Information Base. FIB строится согласно следующей логике: таблица маршрутизации форматируется в упорядоченный список, где для каждой сети существует один или несколько маршрутов. Первым, понятное дело, идет наиболее длинный префикс (longest prefix match). Одновременно с этим FIB содержит next-hop адрес устройства для каждой записи. Помимо информации из таблицы маршрутизации в FIB попадают маршруты до directly conntect хостов.
Любая актуализация таблицы маршрутизации тут же отражается в FIB благодаря стараниям Layer 3 engine, так же как изменения next-hop и ARP записей.
После того, как FIB скомпилирована, загружена в TCAM/SRAM за дело берется layer 3 forwarding engine, занимаясь маршрутизацией данных с помощью аппаратного обеспечения, за исключением нескольких случаев, описанных в первой статье.
Типы CEF в модульных MLS
Adjacency Table
Таблицы содержащие инофрмацию о подсети и адресе next-hop устройства и ARP таблицы соответствия Layer 3 адресов к Layer 2 держаться отдельно. Часть FIB, содержащая информацию о MAC адресе next-hop устройства, носит названиеadjacency table.
Посмотреть на содержимое adjacency table можно следующим образом:
Эта таблица содержит и Layer 3 адреса и MAC адреса в записях о всех next-hop и directly connected устройствах. MAC адрес записан в длиннющей последовательности шестнадцатеричных символов, в которую, помимо этого входим MAC SVI VLAN 20 (в моем примере) и значение EtherType (0x0800 – IP).
Состояние CEF glean
Adjacency table строится Layer 3 engine из ARP таблицы. В том случае если нет записи о next-hop адресе в ARP таблице CEF помечает такую FIB запись как “CEF glean”. Это означает, что Layer 3 forwarding engine стоит дернуть Layer 3 engine, которые должен в свою очередь генерировать ARP request и справедливо ожидать на него ARP reply.
Мониторится это следующим образом:
В adjacency table помимо соответствия layer 3 – layer 2 адресов хранятся другие типы данных:
IP Switching Cisco Express Forwarding Configuration Guide
Book Title
IP Switching Cisco Express Forwarding Configuration Guide
Chapter Title
View with Adobe Reader on a variety of devices
Results
Chapter: CEF Overview
CEF Overview
This module contains an overview of the Cisco Express Forwarding feature. Cisco Express Forwarding is an advanced Layer 3 IP switching technology. It optimizes network performance and scalability for all kinds of networks: those that carry small amounts of traffic and those that carry large amounts of traffic in complex patterns, such as the Internet and networks characterized by intensive web-based applications or interactive sessions.
Finding Feature Information
Your software release may not support all the features documented in this module. For the latest caveats and feature information, see Bug Search Tool and the release notes for your platform and software release. To find information about the features documented in this module, and to see a list of the releases in which each feature is supported, see the feature information table at the end of this module.
Use Cisco Feature Navigator to find information about platform support and Cisco software image support. To access Cisco Feature Navigator, go to www.cisco.com/go/cfn. An account on Cisco.com is not required.
Information About CEF
Cisco Platform Support for Central CEF and dCEF
Cisco Express Forwarding is enabled by default on most Cisco platforms running Cisco IOS software Release12.0 or later. When Cisco Express Forwarding is enabled on a router, the Route Processor (RP) performs the express forwarding.
To find out if Cisco Express Forwarding is enabled on your platform, enter the show ip cef command. If Cisco Express Forwarding is enabled, you receive output that looks like this:
If Cisco Express Forwarding is not enabled on your platform, the output for the show ip cef command looks like this:
Distributed Cisco Express Forwarding is enabled by default on the Catalyst 6500 series switch, the Cisco 7500 series router, and the Cisco 12000 Series Internet Router. When distributed Cisco Express Forwarding is enabled on your platform, the line cards perform the express forwarding.
If Cisco Express Forwarding is not enabled on your platform, use the ip cef command to enable (central) Cisco Express Forwarding or the ip cef distributed command to enable distributed Cisco Express Forwarding.
Cisco Express Forwarding Benefits
Improved performance—Cisco Express Forwarding is less CPU-intensive than fast switching route caching. As a result, more CPU processing power can be dedicated to Layer 3 services such as quality of service (QoS) and encryption.
Scalability—Cisco Express Forwarding offers full switching capacity at each line card when distributed Cisco Express Forwarding mode is active. Distributed Cisco Express Forwarding is a distributed switching mechanism that scales linearly with the number of interface cards and the bandwidth installed in the router.
Resilience—Cisco Express Forwarding offers an unprecedented level of switching consistency and stability in large dynamic networks. In dynamic networks, fast-switched cache entries are frequently invalidated by routing changes. These changes can cause traffic to be process-switched through use of the routing table, rather than fast switched through use of the route cache. Because the forwarding information base (FIB) lookup table contains all known routes that exist in the routing table, it eliminates the need for route cache maintenance and the steps involved with fast-switch or process-switch forwarding. Cisco Express Forwarding can switch traffic more efficiently than typical demand caching schemes.
You can use Cisco Express Forwarding in any part of a network. For example, the figure below shows Cisco Express Forwarding being run on routers at aggregation points at the core of a network where traffic levels are high and performance is critical.
Figure 1. Cisco Express Forwarding Example
Cisco Express Forwarding in platforms at the network core provides the performance and scalability that networks need to respond to continued growth and steadily increasing network traffic. Cisco Express Forwarding is a distributed switching mechanism that scales linearly with the number of interface cards and the bandwidth installed in the router.
Media Supported by CEF
Cisco Express Forwarding supports the following media:
ATM/AAL5snap, ATM/AAL5mux, and ATM/AAL5nlpid
High-Level Data Link Control (HDLC)
Spatial Reuse Protocol (SRP)
Main Components of CEF
Information conventionally stored in a route cache is stored in several data structures for Cisco Express Forwarding switching. The data structures provide optimized lookup for efficient packet forwarding. The two main components of Cisco Express Forwarding operation are the forwarding information base (FIB) and the adjacency tables.
The FIB is conceptually similar to a routing table or information base. A router uses this lookup table to make destination-based switching decisions during Cisco Express Forwarding operation. The FIB is updated when changes occur in the network and contains all routes known at the time. For more information, see the FIB Overview section.
Adjacency tables maintain Layer 2 next-hop addresses for all FIB entries. For more information, see the CEF Adjacency Tables Overview section.
This separation of the reachability information (in the Cisco Express Forwarding table) and the forwarding information (in the adjacency table), provides a number of benefits:
The adjacency table can be built separately from the Cisco Express Forwarding table, allowing both to be built without any packets being process-switched.
The MAC header rewrite used to forward a packet is not stored in cache entries, so changes in a MAC header rewrite string do not require validation of cache entries.
FIB Overview
Cisco Express Forwarding uses a forwarding information base (FIB) to make IP destination prefix-based switching decisions.
The FIB contains the prefixes from the IP routing table structured in a way that is optimized for forwarding. When routing or topology changes occur in the network, the IP routing table is updated, and those changes are reflected in the FIB. The FIB maintains next-hop address information based on the information in the IP routing table.
Because there is a one-to-one correlation between FIB entries and routing table entries, the FIB contains all known routes and eliminates the need for the route cache maintenance that is associated with switching paths such as those used in fast switching and optimum switching.
CEF FIB and Load Balancing
Several paths can lead to a destination prefix. This occurs, for example, when a router is configured for simultaneous load balancing and redundancy. For each resolved path, the FIB contains a pointer for the adjacency corresponding to the next hop interface for that path.
Note
Layer 3 Equal-cost multi path (ECMP) load balancing is based on source IP address, destination IP address, source port, destination port, and layer 4 protocol. Fragmented packets will be treated on two different links based on the algorithm calculated using these parameters. Any changes in one of these parameters will result in load balancing.
CEF Adjacency Tables Overview
A node is said to be adjacent to another node if the node can be reached with a single hop across a link layer (Layer 2). Cisco Express Forwarding stores forwarding information (outbound interface and MAC header rewrite) for adjacent nodes in a data structure called the adjacency table. Cisco Express Forwarding uses adjacency tables to prepend Layer 2 addressing information to packets. The adjacency tables maintain Layer 2 next-hop addresses for all FIB entries.
The following sections provide additional information about adjacencies:
Adjacency Discovery
Each adjacency table is populated as adjacencies are discovered. Adjacencies are added to the table through indirect manual configuration or dynamically—discovered through a mechanism like Address Resolution Protocol (ARP). Adjacencies can also be added through the use of a routing protocol, such as Border Gateway Protocol (BGP) or Open Shortest Path First (OSPF), which forms neighbor relationships. Each time an adjacency entry is created, a link-layer header for that adjacent node is computed and stored in the adjacency table.
The adjacency information is subsequently used for encapsulation during Cisco Express Forwarding switching of packets.
Adjacency Types That Require Special Handling
In addition to adjacencies associated with next-hop interfaces (host-route adjacencies), other types of adjacencies are used to expedite switching when certain exception conditions exist. Prefixes requiring exception processing or special handling are cached with one of the special adjacencies listed in the table below.
Table 1 Adjacency Types That Require Special Handling
Packets of This Adjacency Type
Receive This Processing
Packets destined for a Null0 interface are dropped. Null adjacency can be used as an effective form of access filtering.
When a device is connected to a multiaccess medium, the FIB table on the device maintains a prefix for the subnet rather than for the individual host prefixes. The subnet prefix points to a glean adjacency. A glean adjacency entry indicates that a particular next hop should be directly connected, but there is no MAC header rewrite information available. When the device needs to forward packets to a specific host on a subnet, Cisco Express Forwarding requests an ARP entry for the specific prefix, ARP sends the MAC address, and the adjacency entry for the host is built.
The device forwards packets requiring special handling or packets sent by features not yet supported in CEF switching paths to the next higher switching level for handling.
The device discards the packets.
The device drops the packets.
Unresolved Adjacency
When a link-layer header is prepended to a packet, the FIB requires the prepended header to point to an adjacency corresponding to the next hop. If an adjacency was created by the FIB and not discovered through a mechanism such as ARP, the Layer 2 addressing information is not known and the adjacency is considered incomplete or unresolved. Once the Layer 2 information is known, the packet is forwarded to the RP, and the adjacency is determined through ARP. Thus, the adjacency is resolved.
Central CEF Mode Operation
You can use central Cisco Express Forwarding mode when line cards are not available for Cisco Express Forwarding switching, when you need to use features not compatible with distributed Cisco Express Forwarding switching, or when you are running on a nondistributed platform. When central Cisco Express Forwarding mode is enabled, the Cisco Express Forwarding FIB and adjacency tables reside on the RP, and the RP performs the express forwarding.
The figure below shows the relationship between the routing table, the FIB, and the adjacency table during central Cisco Express Forwarding mode operation. The Catalyst switches forward traffic from workgroup LANs to a Cisco 7500 series router on the enterprise backbone running central Cisco Express Forwarding. The RP performs the express forwarding.
Distributed CEF Mode Operation
For additional scalability, Cisco Express Forwarding runs in the distributed Cisco Express Forwarding form on certain platforms by spreading processing tasks across two or more line cards. When distributed Cisco Express Forwarding mode is enabled, line cards maintain identical copies of the FIB and adjacency tables. The line cards perform the express forwarding between port adapters, relieving the RP of involvement in the switching operation, thus also enhancing system performance.
Distributed Cisco Express Forwarding uses an interprocess communication (IPC) mechanism to ensure synchronization of FIB tables and adjacency tables on the RP and line cards.
The figure below shows the relationship between the RP and line cards when distributed Cisco Express Forwarding mode is active.
In the Cisco 12000 Series Internet Router, shown in the figure above, the line cards perform the switching. In other routers where you can mix various types of cards in the same router, all cards might not support distributed Cisco Express Forwarding. When a line card that does not support distributed Cisco Express Forwarding receives a packet on one of these other routers, the line card forwards the packet to the next higher switching layer (the RP). This structure allows legacy interface processors to exist in the router with newer interface processors.
Note
The Cisco 12000 Series Internet routers operate only in distributed Cisco Express Forwarding mode.
CEF Features Enabled by Default
Per-destination load balancing and the universal load sharing algorithm
Cisco Express Forwarding supports distributed tunnel switching, such as that made possible by generic routing encapsulation (GRE) tunnels. Distributed tunnel switching is enabled automatically when you enable Cisco Express Forwarding or distributed Cisco Express Forwarding. You do not perform any additional tasks to enable distributed tunnel switching once you enable Cisco Express Forwarding or distributed Cisco Express Forwarding.
CEF-Switched Multipoint GRE Tunnels
The Cisco Express Forwarding-Switched Multipoint GRE Tunnels feature enables Cisco Express Forwarding switching of IP traffic to and from multipoint GRE tunnels. Traffic can be forwarded to a prefix through a tunnel destination when both the prefix and the tunnel destination are specified by the application. GRE creates a virtual point-to-point link to other routers at remote points over an IP internetwork. GRE can encapsulate a wide variety of protocol type packets. By connecting multiprotocol subnetworks in a single-protocol backbone environment, IP tunneling using GRE allows network expansion across a single-protocol backbone environment.
Links for the CEF Features
The table below contains links to information about features that you can configure for use with Cisco Express Forwarding or distributed Cisco Express Forwarding operation.
Table 2 Features to Configure for Cisco Express Forwarding or Distributed Cisco Express Forwarding Operation
For Information on This Feature.
See the Following Document.
Configuring and verifying basic Cisco Express Forwarding operation
Configuring Basic Cisco Express Forwarding for Improved Performance, Scalability, and Resiliency in Dynamic Networks
Enabling or disabling Cisco Express Forwarding or distributed Cisco Express Forwarding switching and forwarding
Enabling or Disabling Cisco Express Forwarding or Distributed Cisco Express Forwarding to Customize Switching and Forwarding for Dynamic Networks
Changing your load-balancing scheme
Configuring a Load-Balancing Scheme for Cisco Express Forwarding Traffic
Refreshing or rebuilding adjacency or Cisco Express Forwarding tables
Configuring Epochs to Clear and Rebuild Cisco Express Forwarding and Adjacency Tables
Customizing the display of recorded Cisco Express Forwarding events
Customizing the Display of Recorded Cisco Express Forwarding Events
How to Configure CEF
There are no tasks for configuring Cisco Express Forwarding. Cisco Express Forwarding is enabled by default on most Cisco devices running Cisco software.
See the “Related Documents” section for links to configuration information for Cisco Express Forwarding features and services.
Configuration Examples for CEF
There are no configuration examples for the Cisco Express Forwarding.
See the “Related Documents” section for links to configuration information for Cisco Express Forwarding features and services.
Where to Go Next
See the «Related Documents» section for links to configuration information for Cisco Express Forwarding features and services.
Additional References
Related Documents
Cisco IOS commands
IP switching commands: complete command syntax, command modes, command history, defaults, usage guidelines, and examples.
Cisco IOS IP Switching Command Reference
Tasks for verifying Cisco Express Forwarding information on your router
Configuring Basic Cisco Express Forwarding for Improved Performance, Scalability, and Resiliency in Dynamic Networks
Tasks for enabling or disabling Cisco Express Forwarding or distributed Cisco Express Forwarding
Enabling or Disabling Cisco Express Forwarding or Distributed Cisco Express Forwarding to Customize Switching and Forwarding for Dynamic Networks
Tasks for configuring a load-balancing scheme for Cisco Express Forwarding
Configuring a Load-Balancing Scheme for Cisco Express Forwarding Traffic
Tasks for configuring Cisco Express Forwarding consistency checkers
Configuring Cisco Express Forwarding Consistency Checkers for Route Processors and Line Cards
Tasks for configuring epochs for Cisco Express Forwarding tables
Configuring Epochs to Clear and Rebuild Cisco Express Forwarding and Adjacency Tables
Tasks for configuring and verifying Cisco Express Forwarding network accounting
Tasks for customizing the display of recorded Cisco Express Forwarding events
Customizing the Display of Recorded Cisco Express Forwarding Events
Verification steps for Cisco Express Forwarding switching
Troubleshooting tips for incomplete adjacencies
Description and use of the Cisco Express Forwarding consistency checkers available for the Cisco 7500 and 12000 series routers
Information about troubleshooting Cisco Express Forwarding routing loops and suboptimal routing
Causes of common Cisco Express Forwarding-related error messages on platforms running distributed Cisco Express Forwarding switching (Cisco 7500 series routers and Cisco 12000 Series Internet routers) and how to troubleshoot them
Explanation of and troubleshooting information for the Cisco IOS software implementation of Layer 3 load balancing across multiple parallel links when Cisco Express Forwarding is used
Troubleshooting guide for unicast IP routing on Catalyst 6500/6000 switches with Supervisor Engine 2, Policy Feature Card 2 (PFC2), or Multilayer Switch Feature Card 2 (MSFC2)
QoS features that require Cisco Express Forwarding
Standards
No new or modified standards are supported by this feature, and support for existing standards has not been modified by this feature.
No new or modified MIBs are supported by this feature, and support for existing MIBs has not been modified by this feature.
To locate and download MIBs for selected platforms, Cisco IOS releases, and feature sets, use Cisco MIB Locator found at the following URL:
Generic Route Encapsulation (GRE)
Generic Routing Encapsulation (GRE)
Key and Sequence Number Extensions to GRE
Technical Assistance
The Cisco Support and Documentation website provides online resources to download documentation, software, and tools. Use these resources to install and configure the software and to troubleshoot and resolve technical issues with Cisco products and technologies. Access to most tools on the Cisco Support and Documentation website requires a Cisco.com user ID and password.
Feature Information for CEF
The following table provides release information about the feature or features described in this module. This table lists only the software release that introduced support for a given feature in a given software release train. Unless noted otherwise, subsequent releases of that software release train also support that feature.
Use Cisco Feature Navigator to find information about platform support and Cisco software image support. To access Cisco Feature Navigator, go to www.cisco.com/go/cfn. An account on Cisco.com is not required.
Table 3 Feature Information for Cisco Express Forwarding Overview
Feature Configuration Information
Cisco Express Forwarding-Switched Multipoint GRE Tunnels
This feature enables Cisco Express Forwarding switching of IP traffic to and from multipoint GRE tunnels. Prior to the introduction of this feature, only process switching was available for multipoint GRE tunnels.
CEF Support for IP Routing between IEEE 802.1Q vLANs
Cisco IOS XE Release 2.1 15.0(1)S
This feature was introduced on Cisco ASR 1000 Series Routers.
This feature was integrated into Cisco IOS Release 15.0(1)S.