This document provides an overview of the Switching Database Manager
(SDM) on the Catalyst 2948G-L3 and 4908G-L3 Layer 3 switches, and provides some
SDM configuration examples and troubleshooting tips based on common
deployments. The SDM is implemented in all versions of Cisco IOS ® Software for
the Catalyst 2948G-L3 and 4908G-L3 switches.

The default Ternary Content Addressable Memory (TCAM) partition sizes
may or may not be appropriate for a given network deployment. Therefore, it is
important to gauge your network requirements before reallocating the TCAM
regions and understand your network protocol mix and traffic before deploying
and configuring the Catalyst 2948G-L3 or 4908G-L3 Layer 3 switches.

The information in this document is based on the software and hardware
versions below.

Catalyst 2948G-L3 running Cisco IOS Software Release
12.0(18)W5(22b)

Catalyst 4908G-L3 running Cisco IOS Software Release
12.0(18)W5(22b)

The information presented in this document was created from devices in
a specific lab environment. All of the devices used in this document started
with a cleared (default) configuration. If you are working in a live network,
ensure that you understand the potential impact of any command before using
it.

The SDM manages the Layer 2 and Layer 3 switching information on the
Catalyst 2948G-L3 and 4908G-L3 switches. The Layer 2 and Layer 3 information is
maintained in the TCAM. The Gigabit Ethernet interfaces use both the forwarding
engine and the TCAM for forwarding lookups.

The Catalyst 2948G-L3 has both a Content-Addressable Memory (CAM) table
and a TCAM table for storing the IP prefix, IP adjacencies, IPX networks, IPX
nodes, and other Layer 3 information. The TCAM stores this information that is
used by Gigabit Ethernet interfaces. The TCAM table stores a maximum of 24K
total entries. The 24K entries in the shared CAM must be consistent with the
entries in the TCAM used by the Gigabit Ethernet interfaces. The Catalyst
4908G-L3 only has gigabit Ethernet ports, therefore its TCAM table does not
need to synchronize its entries with a CAM table.

The diagram below shows the relationship between the dynamic CAM on the
Fast Ethernet interfaces and the TCAM on the Gigabit Ethernet interfaces.

The TCAM space on the Gigabit Ethernet interfaces consists of 32K
entries, where each entry is 32 bits wide. By default, the SDM partitions
approximately 24K of the 32K TCAM space at bootup. There are two reasons for
not partitioning the entire TCAM space:

On the Catalyst 2948G-L3, the entries in the shared CAM and the TCAM
must be consistent. Therefore, on the Catalyst 2948G-L3, it is not recommended
that you allocate the remaining 8K entries for protocol-specific regions, to
reduce the likelihood of inconsistencies between the shared CAM on Fast
Ethernet interfaces and the TCAMs on the Gigabit interfaces. Such
inconsistencies are still possible if the number of entries for a given region
in the TCAM exceeds the allocated space while there is still space for the
entries in the shared CAM.

Future features on the Catalyst 2948G-L3 and 4908G-L3 (such as future
support for data-place Access Control Lists (ACLs) on Gigabit ports) will
require some portion of the total TCAM space in order to function. Therefore,
it is not recommended that you allocate the remaining 8K entries on either the
Catalyst 2948G-L3 or the 4908G-L3 unless you require the additional entries and
you do not anticipate using data-plane ACLs in the future. Doing so reduces the
TCAM space available for ACL usage and may require that you reallocate your
TCAM space to implement these features.

Unlike the shared CAM used on fast Ethernet interfaces, the SDM
partitions switching information in the TCAM into protocol-specific regions.
There are two types of TCAM regions, exact-match and longest-match.

Entries in the longest-match TCAM regions are grouped into buckets from
the most-specific (longest) to the least-specific (shortest) mask length, where
all entries within a bucket share the same mask value and key size. The bucket
sizes in each protocol-specific region vary. The SDM increases the size of the
buckets dynamically during system operation, moving existing TCAM entries as
necessary. This dynamic bucket size, within the set protocol areas, allows
neighboring buckets to borrow addresses from one another to accommodate for
changes in network traffic.

To increase efficiency, the SDM autolearn function saves the
bucket-size (mask-length) distribution for these regions so that the
bucket-size distribution is preserved across a system reload. This increases
system efficiency by reducing the need to move TCAM entries due to dynamic
bucket sizing. The autolearn function is enabled by default, but can be
disabled if desired. The autolearn function is implemented based on the
assumption that the prefix distribution in a network is consistent and will be
the same after the system is reloaded.

There are eight protocol-specific TCAM regions controlled by the SDM.
Six of these regions are user-configurable, refer to the table below.

In this example the following configuration changes are made to show
how the modify the SDM protocol partitions. The IPX network and the IPX
adjacency TCAM partitions are reduced to their minimum size of 32 entries. The
IP adjacency and IP prefix TCAM partitions are increased to 4K and 12K
respectively, and the SDM autolearn function is disabled.

Note: You must reload the system in order for the changes to take effect

To modify the default TCAM region sizes, use the following procedure:

Based on your network protocol mix and the number of prefixes and
stations in the network, determine the required size of the various
protocol-specific TCAM regions. Issue the show sdm
size command to verify the current settings.

Modify the size of each region by issuing the sdm
size global configuration command. Notice that when using the
sdm size command you can specify the exact number of
entries in the region, or you can use the k-entries keyword to specify the size
of the region in Kilobytes.

Caution: Take care in disabling the autolearn function, it should not be
disabled unless absolutely necessary. If the autolearn function is disabled,
the administrator has to manually program the TCAM space. If this is not done
properly, then the switch will experience high CPU utilization.

Verify that the desired sizing is reflected in the configuration
before reloading the system (issue the show
running-config command).

In this example, the Catalyst 2948G-L3 or 4908G-L3 Layer 3 switch is
deployed in an IP-only network. Therefore, the SDM default TCAM partitions are
reconfigured to allocate more TCAM space to the IP-related regions.

In the following configuration example, the IPX network, IPX node, and
12-switching (MAC Addr) regions are reduced to the minimum size possible,
permitting additional entries to be used for the IP adjacency, IP prefix, and
IP multicast regions.

Note: You must reload the system in order for the changes to take
effect.

In this example, the Catalyst 2948G-L3 or 4908G-L3 Layer 3 switch is
deployed in an Novell IPX-only network. Therefore, the SDM default TCAM
partitions are reconfigured to allocate more TCAM space to the IPX-related
regions.

In the following configuration example, the IP multicast and
12-switching (MAC Addr) regions are reduced to the minimum size possible, while
the IP prefix and IP adjacency regions are reduced to 2K and 1K, respectively,
permitting additional entries to be used for the IPX network and IPX node
regions. The IP prefix and IP adjacency regions are not reduced to the minimum
to permit IP-based management and other basic IP functionality on the Layer 3
switch to continue to operate.

Note: You must reload the system in order for the changes to take effect

In this example, the Catalyst 2948G-L3 or 4908G-L3 Layer 3 switch is
deployed in a mixed IP and Novell IPX network. For the most part, the default
SDM allocations are adequate in such an environment. However, the entries
reserved for the 12-switching region can be reallocated to IP or IPX regions if
desired.

In this example, the Catalyst 2948G-L3 or 4908G-L3 Layer 3 switch is
deployed in an IP-only network where Integrated Routing and Bridging (IRB) is
required. Therefore, the SDM default TCAM partitions are reconfigured to
allocate more TCAM space to the 12-switching region (under the assumption that
the default IP partitions are adequate in this example).

In the following configuration example, the IPX network, IPX node, and
IP multicast regions are reduced to the minimum size possible. In addition, the
IP prefix and IP adjacency regions are reduced to 2K and 1K entries,
respectively. The 12-switching region is allocated 13K entries.

Note: You must reload the system in order for the changes to take effect

Problem—The Layer 3 switch generates a
Total protocol partitions exceed TCAM size!!
error message while you are configuring the SDM partition sizes. There are two
reasons the system might generate this error:

The command entered cannot be processed because the command you
entered would cause the total size of the TCAM protocol partitions to exceed
32K.

The command entered cannot be processed because the command you
entered would cause the size of that specific TCAM protocol partition to exceed
the maximum allowed size for that partition.

Workaround—Specify a protocol partition size that does
not exceed the total TCAM size, or the maximum size of the specified protocol
partition.

Example—In this example, the system generates an error
when you attempt to specify more than 16000 entries for the 12-switching
region. The workaround is to ensure the specified size is less than or equal to
the maximum region size, and the sum of all of the protocol regions does not
exceed 32K entries.

The system generates the %LSS-1-SDM: Region reached
limit. Cannot accept more entries syslog message for a specific
protocol region when the system fails to install one or more entries in the
TCAM because the specified region is full.

Workaround—You must increase the size of the specified
protocol region by issuing the sdm size command and
reloading the system.

Note: The recommended size for the TCAM region varies depending on the
network.

Example—This example shows that the system was unable
to install one or more entries in the TCAM for the IP adjacency and IP prefix
regions. These syslog messages indicate that the TCAM regions should be
reconfigured to allow more entries for IP prefix and adjacency entries.