Switch database management

By stretch | Wednesday, May 21, 2008 at 12:36 a.m. UTC

Ternary Content Addressable Memory (TCAM) is used by Cisco Catalyst switches to store information necessary for hardware processing. Its utilization depends on the features supported by the platform, but the TCAM is generally partitioned into sections designated for unicast routes, multicast routes, VLANs, and entries for routed, VLAN, and QoS ACLs.

All switches ship with default TCAM partitions. For example, the 3560 and 3750 support 6K unicast MAC addresses and 8K unicast IP routes by default. However, an administrator may wish to favor layer two functionality over layer three functionality, or vice versa, depending on the role of the switch. This can be accomplished with Switch Database Management (SDM) templates. (Yes, this is an unfortunate acronym, overlapping with the Security Device Manager application.)

The Catalyst 3560/3750 support several specialized SDM templates in addition to the default. The Routing template supports 11K unicast IP routes and only 3K MAC addresses, whereas the VLAN template supports 12K MAC addresses and 0 IP routes. Notice how the same amount of physical TCAM is repartitioned to better support layer three or layer two features, respectively, while the default template maintains a comfortable balance between the two. The advanced IP services image also provides two IPv4-and-IPv6 subtemplates for dual-stack implementations.

To view the active SDM template and the features it supports:

Switch# show sdm prefer
 The current template is "desktop default" template.
 The selected template optimizes the resources in
 the switch to support this level of features for
 8 routed interfaces and 1024 VLANs.

number of unicast mac addresses:                  6K
  number of IPv4 IGMP groups + multicast routes:    1K
  number of IPv4 unicast routes:                    8K
    number of directly-connected IPv4 hosts:        6K
    number of indirect IPv4 routes:                 2K
  number of IPv4 policy based routing aces:         0
  number of IPv4/MAC qos aces:                      512
  number of IPv4/MAC security aces:                 1K

To change the SDM template:

Switch(config)# sdm prefer routing
Changes to the running SDM preferences have been stored, but cannot take effect 
until the next reload.
Use 'show sdm prefer' to see what SDM preference is currently active.

Note that a reload is required for the change to take effect (the TCAM must be partitioned at boot time).

About the Author

Jeremy Stretch is a network engineer living in the Raleigh-Durham, North Carolina area. He is known for his blog and cheat sheets here at Packet Life. You can reach him by email or follow him on Twitter.

Posted in Hardware

Comments


david lai (guest)
December 29, 2009 at 11:46 p.m. UTC

This seems like a cool feature, but who has ever experienced over-utilization of TCAM memory to justify switching from default template to VLAN template...especially on an access layer type switch such as 3560/3750?


sad_man (guest)
March 21, 2010 at 7:24 p.m. UTC

I just did last night :( Using ME-C3750-24TE's i brought up routing between my datacenters on 100mb UVN connections, to replace a set of ds3's on 3745's. Found out the hard way. These metro 3750's had learned over 3k indirect ipv4 routes. As a result, packets were being process switched instead of hardware switched. CPU spiked causing delay and packet loss.

Wish i would have read this sooner, so I would have started with routing template :(


TCAM FULL (guest)
July 12, 2012 at 12:30 p.m. UTC

I am having TCAM fulll issues with a 6509. It does not have the SDM option in the CLI. Does this need to be turned on? Or does the 6509 handle TCAM utilization different?

Comments have closed for this article due to its age.