Configuring the Switching Database Manager


This chapter describes the switching database manager (SDM) features built into the ML100T-12 and ML1000-2 cards.

This chapter contains the following major sections:

Understanding the SDM

SDM Regions

Configuring SDM

Understanding the SDM

ML-Series cards use the forwarding engine and ternary content-addressable memory (TCAM) to implement high-speed forwarding. The high-speed forwarding information is maintained in TCAM. The SDM is the software subsystem that manages the switching information maintained in TCAM.

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

TCAM identifies a location index associated with each packet forwarded and conveys it to the forwarding engine. The forwarding engine uses this location index to derive information associated with each forwarded packet.

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

SDM Regions

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

Exact-match region—The exact-match region consists of entries for multiple application regions such as IP adjacencies.

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 application region is fixed, you can reconfigure it.

Weighted-exact-match region—The weighted-exact-match region consists of exact-match-entries with an assigned weight or priority. For example, with quality of service (QoS), multiple exact match entries might exist, but some have priority over others. The weight is used to select one entry when multiple entries match.

TCAM space consists of 65,536 entries, each entry being 64 bits wide. Because SDM is responsible for managing TCAM space, SDM partitions the entire TCAM space for each application region based on user configuration. Although the maximum size of all application regions is fixed, you can reconfigure the maximum size of each application region.

Table 14-1 lists default partitioning for each application region in TCAM.

Table 14-1 Default Partitioning by Application Region in TCAM

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

IP Adjacency

Exact-match

64 bits

65536 (shared)

65536 (shared)

IP Prefix

Longest-match

64 bits

65536 (shared)

65536 (shared)

QoS Classifiers

Weighted exact-match

64 bits

65536 (shared)

65536 (shared)

IP VRF Prefix

Longest prefix match

64 bits

65536 (shared)

65536 (shared)

IP Multicast

Longest prefix match

64 bits

65536 (shared)

65536 (shared)

MAC Addr

Longest prefix match

64 bits

65536 (shared)

65536 (shared)

Access List

Weighted exact match

64 bits

65536 (shared)

65536 (shared)


Configuring SDM

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

Configuring SDM Regions

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

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

To configure SDM maximum size for each application region, perform the following procedure, beginning in global configuration mode:

 
Command
Purpose

Step 1 

Router(config)# sdm size 
region-name 
[k-entries]number-of-entries

Sets the name of the application region whose size you want to configure. You can enter the size as multiples of 1K (that is, 1024) entries or in absolute number of entries.

Step 2 

Router(config)# end

Exits to privileged EXEC mode.

An example of this is shown in Example 14-1.

Example 14-1 Limiting the IP-Prefix Region to 2K Entries

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

To display the number of available TCAM entries, enter the show sdm size command from global configuration mode:

Router # show sdm size 
Active Switching Database Region Maximum Sizes :
    IP Adjacency        : 65536   64-bit entries
    IP Prefix           : 2048	64-bit entries
    QoS Classifiers     : 65536   64-bit entries
    IP VRF Prefix       : 65536   64-bit entries
    IP Multicast        : 65536   64-bit entries
    MAC Addr            : 65536   64-bit entries
    Access List         : 65536	64-bit entries

Configuring Access Control List Size in TCAM

The default maximum size of the access control list (ACL) is 65,536 64-bit entries. You can enter the sdm access-list command to limit the TCAM space for ACLs, as shown in Table 14-2.

Table 14-2 Partitioning the TCAM Size for ACLs

Task
Command
sdm access-list number-entries

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


An example of this is shown in Example 14-2.

Example 14-2 Configuring 8,192 Entries for the ACL Region in TCAM

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