In addition to the
default template, you can create a maximum of 16 templates (which means that
you can have 17 templates at one time). You can specify whatever sizes of
ternary content addressable memory (TCAM) regions you want.
You can apply the
following operations on each template:
-
Create
-
Modify
-
Delete
-
Commit
Each template can
be in one of the following states:
Create
When you create a
template, the size of the TCAM regions are initialized to the default values.
When a template is created, the template is in the saved state by default. Once
you create a template, you can modify it to change the size of any TCAM region.
You should configure the size of the region in multiples of 64 because the size
of each TCAM block is 64 entries. If you enter a value that is not a multiple
of 64, an error message asks you to enter the value again.
Modify
You can modify
any saved template to change the size of any TCAM region but you cannot modify
the size of any region in the TCAM to 0. During the modification, the software
checks that the size that you entered is on a 64 boundary. When you modify a
template, the combined size of all the TCAM regions might have fewer than 4096
entries. During a modification, the software does not check that you have fewer
than 4096 entries.
You can modify a
template only when it is in the saved state. After a template is committed, you
cannot modify it.
A user-defined
committed template can be changed to the created state by servicing another
user-defined template or default template.
To service another
user-defined template, enter the following command:
hardware profile tcam resource service-template
user-defined-template
To service a
default template, enter the following command:
no hardware profile tcam resource service-template
currently-committed- template
Delete
You can delete
any saved template. After you delete a template, all information about the
template is lost. A committed template cannot be deleted.
A user-defined
committed template can be changed to the created state by servicing another
user-defined template or default template.
To service another
user-defined template, enter the following command:
hardware profile tcam resource service-template
user-defined-template
To service a
default template, enter the following command:
no hardware profile tcam resource service-template
currently-committed- template
Commit
You can commit
any of your user-defined templates or the default template that is provided by
the software. To commit a template, enter the
commit
command and perform a reboot of the switch. When you enter the
commit
command, the software validates the template. If the validation is successful,
the software prompts you to reboot the switch. The template (user defined or
default) is applied after the reboot. If you did not choose to reboot, no
changes are made to the TCAM regions and no template is committed.
From Cisco NX-OS Release 9.3(3) onwards, after you commit a template, the system prompts you whether to proceed with copying
the running configuration to the startup configuration and rebooting the switch. After you agree to continue, the following
occurs:
-
The committed
template is saved in the startup configuration.
-
The switch is
rebooted.
-
The committed
template is used by the software.
-
The template
goes to the running state.
Note
|
Prior to Cisco NX-OS Release 9.3(3), after you commit a template, the system does not automatically reboot but a message is
displayed in the commit command output asking you to reboot the switch for the committed template to take effect.
|
If you perform a
write erase, reload, and copy running configuration from a back-up
configuration containing uncommitted TCAM profile, the following occurs:
-
After the TCAM
profile is committed, switch automatically reloads without any prompt.
-
Any
configuration after TCAM carving CLI is not applied.
-
To restore
configuration with the committed TCAM profile, you need to copy backup
configuration to running configuration again. However, there is no switch
reload as the TCAM carving profile is already committed.
When the switch is
reloaded due to the new committed TCAM profile, the
show
system reset-reason command displays the reason for the reload as
shown below:
switch# show system reset-reason
----- reset reason for Supervisor-module 1 (from Supervisor in slot 1) ---
1) At 302777 usecs after Sun Jan 20 22:02:37 2019
Reason: Reload due to change in TCAM service-template
Service:
Version: 9.3(3)
2) At 314447 usecs after Sun Jan 20 21:52:58 2019
Reason: Reset Requested by CLI command reload
Service:
Version: 9.3(3)
3) At 20142 usecs after Sun Jan 20 21:27:33 2019
Reason: Reset Requested by CLI command reload
Service:
Version: 9.3(3)
After the switch
reboots, the committed template is applied to all ASICs on the Cisco Nexus
device. You cannot commit different templates to different ASICs on the Cisco
Nexus device. All saved templates and committed templates along with the size
of each region of each template are displayed in the running configuration.
When a template
is committed, the software checks the following:
-
The combined
size of all regions in the TCAM is 4096 entries.
-
The size of
each region fits within the TCAM. At any point of time, there is always a
running size for the TCAM region. This running size (the current size in the
hardware TCAM) is defined by either the default or a user-defined template that
was committed and is currently being used as the running template. If you
increase the size of a region in a template that is currently being committed,
from the current running size, the software checks if there are enough free
entries outside the current region (entries that are not allocated to any other
region) that can be used to increase the size of the region. If you decrease
the size of a region in a template that is currently being committed from the
current running size, the software checks to determine if there are enough free
entries within the region that can be freed up to reduce the size of the TCAM
region. All changes that reduce the sizes of the regions within the template
are done before the changes to increase the sizes of regions within the
template.
-
You cannot
change the supervisor region size to be smaller than 256 entries because the
software must have 256 entries to support all features in the sup-region.
-
The supervisor
region default size 128 entries even though 256 entries are available. By using
TCAM carving, the additional 128 entries can be used. The
sup keyword
is available in the CLI to change the values of the sup-region to 128, 192, or
256.
-
The hardware
does not support more than 256 entries in the supervisor region and span
regions. This check is done during validation.
If all these
checks pass, you can commit he template and you are prompted to apply the
template by rebooting.
If these checks
fail, the commit fails and the template goes back to the saved state. If the
commit fails, the
commit
command output displays the reasons that it failed.
You cannot modify
or delete the default template. You can only move this template from saved to
committed or committed to saved. If the default template is committed, it is
not displayed in the running configuration. To apply the default template,
enter the
no commit
command using the currently running template. Entering this command executes
the same validation checks that were performed when you committed the template.
If all validations succeed, the software prompts you to reboot the switch. If
you agree to reboot, the template is saved in the startup configuration and the
system is rebooted. After the reboot, the default template is applied. The
startup configuration has the committed template that you committed before
rebooting. After rebooting, the template in the startup configuration is used.
If there is no committed template in the startup configuration, the default
template is used.
You create and
manage the TCAM carving templates by entering the template manager commands.
The template-based TCAM carving CLI is supported in config-sync. Only template
creation is supported inside config-sync. Template commit should be performed
separately on each switch outside the config-sync context.