Cisco SDM (Switching Database Manager)

Multilayer switches can be used for a number of different tasks. We can use them for switching, routing or a combination of both. Cisco switches use the TCAM (Ternary Content Addressable Memory) to store layer 2 and 3 information for fast lookups. If you have no idea what TCAM is about, you might want to read my lesson about CEF before you continue.

SDM (Switching Database Manager) is used on Cisco Catalyst switches to manage the memory usage of the TCAM. For example, a switch that is only used for switching won’t require any memory to store IPv4 routing information. On the other hand, a switch that is only used as a router won’t need much memory to store MAC addresses.

SDM offers a number of templates that we can use on our switch, here’s an example of a Cisco Catalyst 3560 switch:

SW1#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:                      0.5K
  number of IPv4/MAC security aces:                 1K

Above you can see that the current template is “desktop default” and you can see how much memory it reserves for the different items. Here’s an example of the other templates:

SW1#show sdm prefer ?
  access              Access bias
  default             Default bias
  dual-ipv4-and-ipv6  Support both IPv4 and IPv6
  ipe                 IPe bias
  routing             Unicast bias
  vlan                VLAN bias
  |                   Output modifiers

Here are the SDM templates for this switch. We can change the template with the sdm prefer command:

We're Sorry, Full Content Access is for Members Only...

If you like to keep on reading, Become a Member Now! Here is why:

  • Learn any CCNA, CCNP and CCIE R&S Topic. Explained As Simple As Possible.
  • Try for Just $1. The Best Dollar You’ve Ever Spent on Your Cisco Career!
  • Full Access to our 739 Lessons. More Lessons Added Every Week!
  • Content created by Rene Molenaar (CCIE #41726)

542 Sign Ups in the last 30 days

100% Satisfaction Guaranteed!
You may cancel your monthly membership at any time.
No Questions Asked!


Forum Replies

  1. Hi @ReneMolenaar

    I have couple of questions :-

    Is SDM template just for TCAM or for both TCAM and CAM ? If it’s just for TCAM what is the need of storing unicast mac addresses since they are stored in CAM table ?

    Does layer two switch have TCAM table ?

    What are the uses of masks that used by unicast mac addresses, since mac address values need to be exact match to make forward decision ?


  2. Hi Hussein,

    It’s for both, you can verify this by looking at the SDM template and MAC address table of the switch:

    SW1#show sdm prefer | include unicast mac
      number of unicast mac addresses:                  8K
    SW1#show mac address-table count | include Space
    Total Mac Address Space Available: 8048

    An L2 switch still has a TCAM table, they can do things like access-lists where we also use the TCAM.

    You can see the content of the TCAM table for L2 entries with show platform tcam table l2 detail or show platform tcam table mac-address detail.

    For some MAC addr

    ... Continue reading in our forum

  3. Hi Renee,

    Is there any specif models of Switch support SDM. I have tried vIOS L2 image in Eve-ng and could not run Sh SDM Prefer?


  4. Hello Mohit

    SDM is a feature that manages CAM and TCAM on a physical device. It doesn’t actually change the way a device will operate. Virtual devices on GNS3 don’t have CAM and TCAM, so there is nothing to manage. Remember GNS3 is an emulator, which means it runs real IOS operating systems on your computer hardware. The computer hardware doesn’t have CAM and TCAM, so the feature itself cannot function.

    In order to see these features in action you will have to either use a simulator like Packet Tracer, which simulates the existence of these memory types and

    ... Continue reading in our forum

9 more replies! Ask a question or join the discussion by visiting our Community Forum