Table Of Contents
Configuring the Switching Database Manager
Understanding the SDM
SDM Regions
Configuring SDM
Configuring SDM autolearn
Configuring SDM Regions
Configuring Access Control List Size in TCAM
Configuring the 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 major sections:
•
Understanding the SDM
•
Configuring SDM
Understanding the SDM
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
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 procedure, 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 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
Router#
|
Exit to privileged EXEC mode.
|
The following is an example of configuring 2K entries for the IP-Prefix region:
Router # configure terminal
Router (config)# sdm size ip-prefix k-entries 2
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:
Switching Database Region Sizes :
TCAM Total Size : 32768 32-bit entries
TCAM Allocated Size : 31488 32-bit entries
Reserved Space : 32 32-bit entries
IPX Direct : 224 32-bit entries
IPX Node : 2048 64-bit entries
IP Adjacency : 2048 32-bit entries
IP Prefix : 8192 32-bit entries
IPX Network : 6144 32-bit entries
IP Multicast : 3072 64-bit entries
UDP Flooding : 256 64-bit entries
MAC Addr : 1024 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. The 1 K 32-bit entries translates to an additional 256 128-bit entry:
Router # configure terminal
Router (config)# sdm size ipx-network k-entries 5
Router (config)# sdm access-list 768
The following output displays only after rebooting the system:
Switching Database Region Sizes :
TCAM Total Size : 32768 32-bit entries
TCAM Allocated Size : 31488 32-bit entries
Reserved Space : 32 32-bit entries
IPX Direct : 224 32-bit entries
IPX Node : 2048 64-bit entries
IP Adjacency : 2048 32-bit entries
IP Prefix : 8192 32-bit entries
IPX Network : 5120 32-bit entries
IP Multicast : 3072 64-bit entries
UDP Flooding : 256 64-bit entries
MAC Addr : 1024 64-bit entries
Access List :768 128-bit entries
The following example shows the sdm entry allocation with the IP-Prefix protocol region configured to 12288 (12 K) 32-bit entries, the IP-Adjacency region configured to 6144 (6 K) 32-bit entries, Layer 2 switching configured to 5120 (5 K) 64-bit entries, and the other regions are configured to the minimum size possible.
Switching Database Region Sizes :
TCAM Total Size :32768 32-bit entries
TCAM Allocated Size :31648 32-bit entries
Reserved Space :32 32-bit entries
IPX Direct :224 32-bit entries
IPX Node :32 64-bit entries
IP Adjacency :6144 32-bit entries
IP Prefix :12288 32-bit entries
IPX Network :32 32-bit entries
IP Multicast :32 64-bit entries
UDP Flooding :256 64-bit entries
MAC Addr :5120 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:
Task
|
Command
|
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.
|
sdm access-list num-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 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