- CEF Overview
- Configuring Basic Cisco Express Forwarding
- Enabling or Disabling CEF or dCEF
- Configuring a Load-Balancing Scheme
- Configuring Epochs
- Configuring CEF Consistency Checkers
- Configuring CEF Network Accounting
- Customizing the Display of Recorded CEF Events
- Customizing the Display of CEF Event Trace Messages
- SNMP CEF-MIB Support
- Cisco Express Forwarding Command Changes
- CEF Enhancements
- Finding Feature Information
- Prerequisites for a Load-Balancing Scheme
- Restrictions for a Load-Balancing Scheme
- Information About a Load-Balancing Scheme
- How to Configure a Load-Balancing Scheme
- Configuration Examples for a Load-Balancing Scheme
- Additional References
- Feature Information for a Load-Balancing Scheme
- Glossary
Configuring a Load-Balancing Scheme
This module contains information about Cisco Express Forwarding and describes the tasks for configuring a load-balancing scheme for Cisco Express Forwarding traffic. Load-balancing allows you to optimize resources by distributing traffic over multiple paths.
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
- Prerequisites for a Load-Balancing Scheme
- Restrictions for a Load-Balancing Scheme
- Information About a Load-Balancing Scheme
- How to Configure a Load-Balancing Scheme
- Configuration Examples for a Load-Balancing Scheme
- Additional References
- Feature Information for a Load-Balancing Scheme
- Glossary
Finding Feature Information
Your software release may not support all the features documented in this module. For the latest feature information and caveats, see 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 document.
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.
Prerequisites for a Load-Balancing Scheme
- Cisco Express Forwarding or distributed Cisco Express Forwarding must be enabled on your switch or router.
- If you enable per-packet load balancing for traffic going to a particular destination, all interfaces that can forward traffic to that destination must be enabled for per-packet load balancing.
Restrictions for a Load-Balancing Scheme
You must globally configure load balancing on Cisco 12000 Series Router E2 line cards in the same way: either in per-destination or per-packet mode. It is not possible (as in other Cisco IOS software-based platforms) to configure some packet prefixes in per-destination mode and others in per-packet mode.
Information About a Load-Balancing Scheme
- Cisco Platform Support for Central CEF and dCEF
- CEF Load-Balancing Overview
- Per-Destination Load Balancing
- Per-Packet Load Balancing
- Load-Balancing Algorithms
Cisco Platform Support for Central CEF and dCEF
Cisco Express Forwarding is enabled by default on most Cisco platforms running Cisco IOS software Release 12.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 cefcommand. If Cisco Express Forwarding is enabled, you receive output that looks like this:
Router# show ip cef
Prefix Next Hop Interface
[...]
10.2.61.8/24 192.168.100.1 FastEthernet1/0/0
192.168.101.1 FastEthernet6/1
[...]
If Cisco Express Forwarding is not enabled on your platform, the output for the show ip cefcommand looks like this:
Router# show ip cef
%CEF not running
Distributed Cisco Express Forwarding is enabled by default on the Catalyst 6500 series switch, the Cisco 7500 series router, and the Cisco 12000 series 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 cefcommand to enable (central) Cisco Express Forwarding or the ip cef distributed command to enable distributed Cisco Express Forwarding.
CEF Load-Balancing Overview
Cisco Express Forwarding load balancing is based on a combination of source and destination packet information; it allows you to optimize resources by distributing traffic over multiple paths.
You can configure load balancing on a per-destination or per-packet basis. Because load-balancing decisions are made on the outbound interface, load balancing must be configured on the outbound interface.
Per-Destination Load Balancing
Per-destination load balancing allows the router to use multiple paths to achieve load sharing across multiple source-destination host pairs. Packets for a given source-destination host pair are guaranteed to take the same path, even if multiple paths are available. Traffic streams destined for different pairs tend to take different paths.
Per-destination load balancing is enabled by default when you enable Cisco Express Forwarding. To use per-destination load balancing, you do not perform any additional tasks once Cisco Express Forwarding is enabled. Per-destination is the load-balancing method of choice for most situations.
Because per-destination load balancing depends on the statistical distribution of traffic, load sharing becomes more effective as the number of source-destination host pairs increases.
You can use per-destination load balancing to ensure that packets for a given host pair arrive in order. All packets intended for a certain host pair are routed over the same link (or links).
Typically, you disable per-destination load balancing when you want to enable per-packet load balancing.
Note |
The Cisco 10000 series router and the Cisco 12000 series router are configured by default to perform per-destination load balancing. |
Per-Packet Load Balancing
Cisco Express Forwarding Per-packet load balancing allows the router to send successive data packets over different paths without regard to individual hosts or user sessions. It uses the round-robin method to determine which path each packet takes to the destination. Per-packet load balancing ensures that the traffic is balanced over multiple links.
Per-packet load balancing is good for single-path destinations, but packets for a given source-destination host pair might take different paths. Per-packet load balancing can therefore introduce reordering of packets. This type of load balancing is inappropriate for certain types of data traffic (such as voice traffic over IP) that depend on packets arriving at the destination in sequence.
Use per-packet load balancing to help ensure that a path for a single source-destination host pair does not get overloaded. If the bulk of the data passing through parallel links is for a single pair, per-destination load balancing overloads a single link while other links have very little traffic. Enabling per-packet load balancing allows you to use alternate paths to the same busy destination.
Note |
Although per-packet load balancing is intended for use on the majority of Cisco IOS routers, it is not supported on the Cisco ASR 1000 (and higher) Series Aggregation Services Router. Also, per-packet load balancing can result in out-of-sequence (OOS) packet delivery errors on some routers, which can cause applications such as VoIP to malfunction. Therefore, per-packet load balancing is not recommended. For more information, see the release notes and caveats for your platform and software release. |
Load-Balancing Algorithms
The following load-balancing algorithms are provided for use with Cisco Express Forwarding traffic. You select a load-balancing algorithm with the ip cef load-sharing algorithm command.
- Original algorithm--The original Cisco Express Forwarding load-balancing algorithm produces distortions in load sharing across multiple routers because the same algorithm was used on every router. Depending on your network environment, you should select either the universal algorithm (default) or the tunnel algorithm instead.
- Universal algorithm--The universal load-balancing algorithm allows each router on the network to make a different load sharing decision for each source-destination address pair, which resolves load-sharing imbalances. The router is set to perform universal load sharing by default.
- Tunnel algorithm--The tunnel algorithm is designed to balance the per-packet load when only a few source and destination pairs are involved.
- Include-ports algorithm--The include-ports algorithm allows you to use the Layer 4 source and destination ports as part of the load-balancing decision. This method benefits traffic streams running over equal cost paths that are not load shared because the majority of the traffic is between peer addresses that use different port numbers, such as Real-Time Protocol (RTP) streams. The include-ports algorithm is available in Cisco IOS Release 12.4(11)T and later releases.
How to Configure a Load-Balancing Scheme
- Enabling or Disabling Per-Destination Load Balancing
- Configuring Per-Packet Load Balancing
- Selecting a Tunnel Load-Balancing Algorithm
- Selecting an Include-Ports Layer 4 Load-Balancing Algorithm
Enabling or Disabling Per-Destination Load Balancing
Perform this task to enable or disable Cisco Express Forwarding per-destination load balancing.
Typically, you disable per-destination load balancing when you want to enable per-packet load balancing.
- interface type slot / port
- interface type slot / port-adapter / port
DETAILED STEPS
Configuring Per-Packet Load Balancing
Perform the following task to configure Cisco Express Forwarding per-packet load balancing.
- interface type slot / port
- interface type slot / port-adapter / port
DETAILED STEPS
Command or Action | Purpose | |||
---|---|---|---|---|
|
Example: Router> enable |
Enables privileged EXEC mode.
|
||
|
Example: Router# configure terminal |
Enters global configuration mode. |
||
|
Example: Router(config)# interface ethernet 1/1 Example: or Example: Router(config)# interface fastethernet 1/0/0 |
Configures an interface type and enters interface configuration mode.
|
||
|
Example: Router(config-if)# ip load-sharing per-packet |
Enables per-packet load balancing for Cisco Express Forwarding on the interface. |
||
|
Example: Router(config-if)# end |
Exits to privileged EXEC mode. |
Selecting a Tunnel Load-Balancing Algorithm
Perform the following task to select a tunnel load-balancing algorithm for Cisco Express Forwarding traffic. Select the tunnel algorithm when your network environment contains only a few source and destination pairs.
DETAILED STEPS
Command or Action | Purpose | |
---|---|---|
|
Example: Router> enable |
Enables privileged EXEC mode.
|
|
Example: Router# configure terminal |
Enters global configuration mode. |
|
Example: Router(config)# ip cef load-sharing algorithm tunnel |
Selects a Cisco Express Forwarding load-balancing algorithm.
|
|
Example: Router(config)# end |
Exits to privileged EXEC mode. |
Selecting an Include-Ports Layer 4 Load-Balancing Algorithm
Perform the following task to select an include-ports load-balancing algorithm for Cisco Express Forwarding traffic. Select the include-port algorithm when your network environment contains traffic running over equal-cost paths that is not load shared because the majority of the traffic is between peer addresses with different port numbers, such as RTP streams.
Your system must be using an image that supports Cisco Express Forwarding in Cisco IOS Release 12.4(11)T or a later release.
Note |
The Layer 4 load-balancing algorithm applies to software switched packets. For platforms that switch traffic using a hardware forwarding engine, the hardware load-balancing decision might be different from the software load-balancing decision for the same traffic stream. You might want to override the configured algorithm. > |
DETAILED STEPS
Command or Action | Purpose | |
---|---|---|
|
Example: Router> enable |
Enables privileged EXEC mode.
|
|
Example: Router# configure terminal |
Enters global configuration mode. |
|
Example: Router(config)# ip cef load-sharing algorithm include-ports source destination |
Selects a Cisco Express Forwarding load-balancing algorithm.
|
|
Example: Router(config)# end |
Exits to privileged mode. |
Configuration Examples for a Load-Balancing Scheme
- Example Enabling or Disabling Per-Destination Load Balancing
- Example Configuring Per-Packet Load Balancing
- Example Selecting a Tunnel Load-Balancing Algorithm
- Example Selecting an Include-Ports Layer 4 Load-Balancing Algorithm
Example Enabling or Disabling Per-Destination Load Balancing
Per-destination load balancing is enabled by default when you enable Cisco Express Forwarding. Typically, you disable per-destination load balancing when you want to enable per-packet load balancing. The following example shows how to disable per-destination load balancing:
configure terminal
!
interface ethernet 1/1
no ip load-sharing per-destination end
Example Configuring Per-Packet Load Balancing
The following example shows how to configure per-packet load balancing for Cisco Express Forwarding:
configure terminal !
interface ethernet 1/1
ip load-sharing per-packet end
If you want to enable per-packet load balancing for traffic intended for a particular destination, all interfaces that can forward traffic to that destination must be enabled for per-packet load-balancing.
Example Selecting a Tunnel Load-Balancing Algorithm
The following example shows how to select a tunnel load-balancing algorithm for Cisco Express Forwarding:
configure terminal !
ip cef load-sharing algorithm tunnel
end
The following example shows how to disable the tunnel load-balancing algorithm:
configure terminal !
no ip cef load-sharing algorithm tunnel
end
Example Selecting an Include-Ports Layer 4 Load-Balancing Algorithm
The following example shows how to select an include-ports Layer 4 load-balancing algorithm for Cisco Express Forwarding traffic:
configure terminal !
ip cef load-sharing algorithm include-ports source
end
This example sets up load sharing that includes the source port in the load-balancing decision.
To disable the include-ports Layer 4 load-balancing algorithm and return to the default universal mode, enter the following commands:
configure terminal !
no ip cef load-sharing algorithm
end
Additional References
Related Documents
Related Topic |
Document Title |
---|---|
Cisco IOS commands |
|
IP switching commands: complete command syntax, command modes, command history, defaults, usage guidelines, and examples. |
Cisco IOS IP Switching Command Reference |
Overview of the Cisco Express Forwarding feature |
Cisco Express Forwarding Overview |
Tasks for verifying basic Cisco Express Forwarding and distributed Cisco Express Forwarding operation |
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 Network |
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 |
Configuring 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 |
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 Load Balancing Over Parallel Links Using Cisco Express Forwarding |
Standards
Standard |
Title |
---|---|
No new or modified standards are supported by this feature, and support for existing standards has not been modified by this feature. |
-- |
MIBs
MIB |
MIBs Link |
---|---|
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: |
RFCs
RFC |
Title |
---|---|
No new or modified RFCs are supported by this feature, and support for existing RFCs has not been modified by this feature. |
-- |
Technical Assistance
Description |
Link |
---|---|
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 a Load-Balancing Scheme
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 1 | Feature Information for Configuring a Load-Balancing Scheme for Cisco Express Forwarding Traffic |
Feature Name |
Releases |
Feature Configuration Information |
---|---|---|
Cisco Express Forwarding Support for Layer 4 Port-Based Load Balancing |
12.4(11)T |
This feature allows Cisco Express Forwarding to include Layer 4 port information in the decision for load sharing on paths. In 12.4(11)T, this feature was introduced. The following commands were modified by this feature: ip cef load-sharing algorithm and show ip cef exact-route. |
Glossary
adjacency --A relationship formed between selected neighboring routers and end nodes for the purpose of exchanging routing information. Adjacency is based upon the use of a common media segment by the routers and nodes involved.
Cisco Express Forwarding --A Layer 3 switching technology. Cisco Express Forwarding can also refer to central Cisco Express Forwarding mode, one of two modes of Cisco Express Forwarding operation. Cisco Express Forwarding enables a Route Processor to perform express forwarding. Distributed Cisco Express Forwarding is the other mode of Cisco Express Forwarding operation.
distributed Cisco Express Forwarding --A mode of Cisco Express Forwarding operation in which line cards (such as Versatile Interface Processor [VIP] line cards) maintain identical copies of the forwarding information base (FIB) and adjacency tables. The line cards perform the express forwarding between port adapters; this relieves the Route Switch Processor of involvement in the switching operation.
FIB --forwarding information base. A component of Cisco Express Forwarding that is conceptually similar to a routing table or information base. The router uses the FIB lookup table to make destination-based switching decisions during Cisco Express Forwarding operation. The router maintains a mirror image of the forwarding information in an IP routing table.
LSP --label switched path. A sequence of hops (Router 0...Router n). A packet travels from R0 to Rn by means of label switching mechanisms. An LSP can be chosen dynamically, based on normal routing mechanisms, or you can configure the LSP manually.
prefix --The network address portion of an IP address. A prefix is specified by a network and mask and is generally represented in the format network/mask. The mask indicates which bits are the network bits. For example, 1.0.0.0/16 means that the first 16 bits of the IP address are masked, making them the network bits. The remaining bits are the host bits. In this example, the network number is 10.0.
RIB --Routing Information Base. A central repository of routes that contains Layer 3 reachability.
Cisco and the Cisco logo are trademarks or registered trademarks of Cisco and/or its affiliates in the U.S. and other countries. To view a list of Cisco trademarks, go to this URL: www.cisco.com/go/trademarks. Third-party trademarks mentioned are the property of their respective owners. The use of the word partner does not imply a partnership relationship between Cisco and any other company. (1110R)
Any Internet Protocol (IP) addresses and phone numbers used in this document are not intended to be actual addresses and phone numbers. Any examples, command display output, network topology diagrams, and other figures included in the document are shown for illustrative purposes only. Any use of actual IP addresses or phone numbers in illustrative content is unintentional and coincidental.