Cisco SDM (Switching Database Manager)

This topic is to discuss the following lesson:

In my years of working with multi-layer switches I never knew these templates existed, thanks!

Hi Emir,

Good to hear you learned something :slight_smile: Might be nice to check some of your production switches, see if their current SDM template is suitable for the job.

Rene

Renee,

Do you know if nx-os has similar feature?

Thanks

Hi Anuj,

It does, you can try the show hardware profile status command and the hardware profile command in configuration mode.

Rene

Hi @ReneMolenaar

I have couple of questions :-

1-
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 ?

2-
Does layer two switch have TCAM table ?

3-
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 ?
Untitled

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 addresses, it shows the mask (FFFF.FFFF.FFFF) which is an exact match.

1 Like

Very useful extra information
thank you very much sir

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?

Thanks

Got SDM command in Packet tracer. must be the image is not a multi-layer switch image. Can you please suggest what image I can use as Multi-layer switch in GnS3 or eve-ng.

Now in Packet tracer there is no Template under SDM prefer :frowning:

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 responds appropriately, (but only to a certain extent as you can see) or you must use real hardware.

Most L3 switches have this feature including the 3750, as well as the higher 4500/4600/9400 and 6500/6600/9600 series catalyst chassis switches.

You can find out more about SDM and GNS3 at this GNS3 forum thread.

I hope this has been helpful!

Laz

Quick question: Is SDM used for Cisco routers at all, or just switches? If not, is there a similar protocol for routers?

Thanks!

Hello Louis

The purpose of SDM is to be able to more appropriately manage memory that is used by a multilayer switch due to the fact that memory is used for both Layer 2 operations as well as Layer 3. Because a router has only layer 3 functionality, it has no need for a similar memory management feature.

Layer 3 switches, depending on how they are employed in your network design, may focus more on L3 operations, or L2 operations.

If L3 operations are highly utilized, then much memory is being wasted by allocating space for L2 operations that are not in much use. Similarly, if L2 operations are highly utilized, then much memory is being wasted by being allocated for L3 operations that are not used very much. SDM templates are applied to more efficiently use allocated memory depending on how you employ the device.

Since routers only allocate memory for L3 operations, no similar memory management feature is necessary.

I hope this has been helpful!

Laz

1 Like

20201214_015742

  1. Why are all tcam utilization values being MAX??
  2. How to check tcam utilization in C9200?

Hello YongHun

Actually, they’re not being maxed out. The first column is titled Max Masks/Values. This column shows the maximum number of masks and the maximum number of values that can be stored for each category. A mask can be used to reference a range of addresses and takes up space in the TCAM. So for unicast MAC addresses, you can have 32988 masks and 32988 values. Although this is outside the scope of the lesson, you can find out more about the types of TCAM used for masks and values at the following link:

Now the Used Masks/values column is what you have actually used in the device. So out of the 32988/32988 maximum, you’ve used only 52/52. The same is true for the rest of the values.

Now it is interesting that for both Max and Used values, you seem to have the same number of masks and values. I believe this has to do with the chosen SDM template and the platform you are using.

I hope this has been helpful!

Laz

1 Like

If the sdm commands are not available on a switch is it safe to assume SDM is not supported on X Switch?

Hello Trenton

If the commands you want are unavailable, then that means that the switch, in its current state, does not support those features.

However, it does not necessarily mean that the switch isn’t capable of supporting those features.

In the past, Cisco IOS operating systems came in many different versions, each one supporting a specific set of features. If a device has a particular IOS image, then it only has the capability that corresponds to that IOS image.

More recently, Cisco has begun shipping devices with a universal image that has all feature sets included. We still have different IOS images depending on the model and version, but no longer different IOS images with feature sets. Instead of all these different IOS images there’s just one. You can then purchase specific licenses that will activate features on the device depending upon what you need.

So your switch may have the capability of SDM, but not the license to enable it.

You can find out more information about how licensing works on IOS images at the following lesson:

I hope this has been helpful!

Laz

Hi all,
I’m trying to wrap my head around some aspects of CAM, TCAM, and SDM.

I have always heard that ‘CAM’ is used for L2 switching (CAM table = MAC table, need exact matches) and ‘TCAM’ is used for functions like routing and ACLs (since it can be used for partial matches).

Since SDM can be used to assign the amount of memory available for MAC addresses, is it accurate to say that the ‘CAM’ used for MAC addresses is the same hardware as the ‘TCAM’ used for other functions such as routing?

If not, I don’t see how SDM could be used to, for example, reduce the amount of ‘CAM’ assigned for MAC addresses and then increase the amount of ‘TCAM’ used for routing and other functions.

Thanks for any clarification!
Jeremy

Hello Jeremy

SDM specifically manages the use of TCAM only. It essentially tells the device how much of the TCAM should be used and for what purpose. Any overflow of the use of TCAM will then use the RAM of the device, with whatever performance consequence that may have.

Now you are correct that in general terms, TCAM is used for ACLs and routing, while CAM is used for the MAC address table. This is further discussed in this NetworkLessons note on the subject. However, in many of the more modern devices, instead of using CAM and TCAM, which are actually physically distinct chips on the circuit board of the device, TCAM is used collectively for both. This is more efficient since you can dynamically allocate TCAM as needed for the use of L3 or L2 constructs, and this is where SDM becomes useful.

As you suggest, if both CAM and TCAM were used as physically distinct memory pools, then SDM would be of little benefit.

I hope this has been helpful!

Laz

Hi Laz,

Thank you for your reply, all clear now. It makes sense to me that L2/L3 functions would share the same memory pool since that allows more flexibility via SDM templates (unless there is a large cost discrepancy between CAM and TCAM memory which would justify keeping L2 functions constrained to a separate CAM chip).

Thanks,
Jeremy

1 Like