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 <cr>
Here are the SDM templates for this switch. We can change the template with the sdm prefer command:
In my years of working with multi-layer switches I never knew these templates existed, thanks!
Good to hear you learned something Might be nice to check some of your production switches, see if their current SDM template is suitable for the job.
Do you know if nx-os has similar feature?
It does, you can try the show hardware profile status command and the hardware profile command in configuration mode.
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 ?