Catalyst 2948G-L3 and Catalyst 4908G-L3 Software Feature and Configuration Guide IOS Software, Release 12.0(10)W5(18e)
Configuring Switching Database Manager

Table Of Contents

Configuring Switching Database Manager

Understanding Switching Database Manager

SDM Regions

Configuring SDM

Configuring SDM autolearn

Configuring SDM Regions

Configuring Access Control List Size in TCAM


Configuring Switching Database Manager


This chapter describes the switching database manager (SDM) features built into the Catalyst 2948G-L3 and 4908G-L3 switch routers. This section contains the following sections:

Understanding Switching Database Manager

Configuring SDM

Understanding Switching Database Manager

The Gigabit Ethernet interfaces use the forwarding engine and ternary content addressable memory (TCAM) to implement Layer 3 switching. The Layer 3 switching information is maintained in TCAM. The SDM is the Layer 3 software subsystem that manages the Layer 3 switching information maintained in TCAM.

SDM in Layer 3 organizes the switching information in TCAM into protocol-specific regions and configures the size of these protocol regions. SDM enables exact-match and longest-match address searches, which result in high-speed forwarding. SDM manages TCAM space by partitioning protocol-specific switching information into multiple regions.

The forwarding engine on the Gigabit Ethernet interfaces performs packet processing on multiple channels simultaneously and extracts the packet header information. It uses this packet header information to issue exact-match or longest-match address searches in the switching information stored in TCAM.

TCAM identifies the location index of the Layer 2 or Layer 3 address and conveys it to the forwarding engine. The forwarding engine uses this location index to derive information associated with each Layer 2 and Layer 3 address.

The key benefits of SDM in Layer 3 switching are its ability to organize the switching information in TCAM into protocol-specific regions and its ability to configure the size of these protocol regions. SDM enables exact-match and longest-match address searches, which result in high-speed forwarding.

SDM Regions

SDM partitions TCAM space into multiple protocol-specific regions and interacts with the individual protocol control layers to store Layer 3 switching information. SDM consists of the following types of regions:

Exact-match region—The exact-match region consists of Layer 3 entries for multiple protocol regions such as IP adjacencies and IPX node.

Longest-match region—Each longest-match region consists of multiple buckets or groups of
Layer 3 address entries organized in decreasing order by mask length. All entries within a bucket share the same mask value and key size. The buckets can change their size dynamically by borrowing address entries from neighboring buckets. Although the size of the whole protocol region is fixed, you can reconfigure it.

TCAM space consists of 32,000 entries, each entry being 32 bits wide. Because SDM is responsible for managing TCAM space, SDM partitions the entire TCAM space for each protocol region based on user configuration. Although the maximum size of all protocol regions is fixed, you can reconfigure the size of each protocol region. A change in the partition configuration takes effect only during the next system reboot.

Table 10-1 lists default partitioning for each protocol region in TCAM.

Table 10-1 Default Partitioning by Protocol Region in TCAM

Protocol Region
Lookup Type
Key Size
Default Size
No. of TCAM Entries

ipx-bvi-network

Exact-match

32 bits

32

32

ip-adjacency

Exact-match

32 bits

2048

2048

ipx-node

Exact-match

64 bits

2048

4096

ip-prefix

Longest-match

32 bits

8192

8192

ipx-network

Exact-match

32 bits

6144

6144

ip-mcast

Longest-match

64 bits

3072

6144

l2-switching

Exact-match

64 bits

1024

2048

access-list

First-match

128 bits

512

8192



Note The enhanced Gigabit Ethernet interface is available with 32K TCAM space.


Configuring SDM

This section describes the commands necessary to configure the SDM. It includes commands to configure the autolearn feature in SDM and commands to configure the size of the SDM regions. The commands described in this section are unique to Layer 3 switching software.

Configuring SDM autolearn

SDM groups entries based on their mask lengths into buckets. The size of each bucket in the protocol region varies. The autolearn feature automatically saves the mask length distribution (bucket size distribution) for the longest-match region in the switching database. SDM uses this information to set up the partitions, which are effective during the next system reboot.

Layer 3 switching enables the autolearn feature by default. The no form of the sdm autolearn command disables the autolearn feature. You can reenable autolearn by entering the sdm autolearn command from global configuration mode.

Router# configure terminal
Router (config)# sdm autolearn
Router (config)# end

Configuring SDM Regions

TCAM space consists of 32,000 entries, each entry being 32 bits wide. Since SDM is responsible for managing TCAM space, SDM partitions the entire TCAM space for each protocol region based on user configuration. A change in the partition configuration takes effect the next time you reboot the system.

The protocol region size in SDM is represented by the number of 32-bit or 64-bit entries. The combined size of all the application regions should be calculated in terms of 32-bit TCAM entries and should not exceed 32K, which is the total TCAM size.


Note Although the size of the whole protocol region is configured by default, you can reconfigure it. The reconfigured size of the protocol region is effective only at the next system reboot.


To configure SDM size for each protocol region, perform the following task beginning in global configuration mode:

 
Command
Purpose

Step 1 

Router(config)# sdm size region-name {k-entries}num-of-entries

Set the name of the protocol region for which you want to configure the size. You can enter the size either as multiples of 1K (that is, 1024) entries or in absolute number of entries.

Step 2 

Router(config)# end

Router#

Return to privileged EXEC mode.

The following output is an example of configuring 2K entries for the ip-prefix region:

Router # configure terminal
Router (config)# sdm size ip-prefix k-entries 2 
Router (config)# end

The combined size entered for all the protocol regions should not exceed 32K, which is the total TCAM size. To display the supported size of SDM, enter the show sdm size command from global configuration mode:

Router # show sdm size 
Switching Database Region Sizes :
IPX Direct Network  :256     32-bit entries
IP Adjacency        :2048    32-bit entries
IPX Node            :1024    64-bit entries
IP Prefix           :2048    32-bit entries
IPX Network         :2048    32-bit entries
IP Multicast        :1024    64-bit entries
MAC Addr            :2048    64-bit entries
Access List         :512     128-bit entries

The following output is an example of borrowing 1 K, 32-bit entries from the IPX-Network region and adding it to the ACL region, as a 256 128-bit entry:

Router # configure terminal
Router (config)# sdm size ipx-network k-entries 1
Router (config)# sdm size access-list 256
Router (config)# end

Router # show sdm size 
Switching Database Region Sizes :
IPX Direct Network  :256     32-bit entries
IP Adjacency        :2048    32-bit entries
IPX Node            :1024    64-bit entries
IP Prefix           :2048    32-bit entries
IPX Network         :1024    32-bit entries
IP Multicast        :1024    64-bit entries
MAC Addr            :2048    64-bit entries
Access List         :768     128-bit entries

The following example shows the IP adjacency and IP prefix protocol regions configured to the maximum size possible, as the other regions are configured to the minimum size possible in the 32K TCAM. The combined size for all the protocol regions should not exceed the 32K TCAM size.

Router# show sdm size
Switching Database Region Sizes :
IPX BVI Network     :32      32-bit entries
IP Adjacency        :16240   32-bit entries
IPX Node            :32      64-bit entries
IP Prefix           :16240   32-bit entries
IPX Network         :32      32-bit entries
IP Multicast        :32      64-bit entries
MAC Addr            :32      64-bit entries
Access List         :512     128-bit entries

Configuring Access Control List Size in TCAM

The enhanced Gigabit Ethernet interface module supports TCAM sizes of 32K. The combined size of the protocol regions and access lists should not exceed your TCAM space. The default size of the access control lists (ACLs) in a 32K TCAM is 512. You can enter the sdm access-list command to partition the TCAM space for ACLs.

To partition the TCAM space for access lists, perform the following task:

Command
Purpose

sdm access-list num-entries

Set the name of the protocol region for which you want to configure the size. You can enter the size as an absolute number of entries.


Before you configure the access-list region in TCAM, make sure that TCAM has enough space to accommodate the ACL region. If there is not enough space available in the TCAM, you can borrow space from other less used regions. Enter the show internal all-regions command to verify how much space is available in TCAM.

The following output is an example of configuring 8192 entries for the ACL region in TCAM:

Router# configure terminal 
Router(config)# sdm access-list 8192

Router(config)# end