PDF

Policy compression

Want to summarize with AI?

Log in

Beginning with Cisco APIC release 4.0(1), policy compression reduces ternary content-addressable memory usage by allowing identical filter rules to share an entry.


Policy compression is a fabric optimization feature that uses policy group labels to associate multiple identical filter rules with a shared ternary content-addressable memory (TCAM) entry.

  • Allows multiple provider and consumer EPG pairs with identical filter rules to share one TCAM entry.

  • Uses policy group labels to create indirect associations between policies and TCAM entries.

  • Increases the total number of filter rules that the fabric can support.

Policy compression operation

The following figure shows a one-to-many configuration in which indirect associations through policy group labels reduce the number of TCAM entries and increase the number of filter rules that the fabric can support.

Figure 1. Policy compression
Note

Enabling policy compression prevents the system from tracking statistics for individual contracts because multiple contracts share the same TCAM entry.


Guidelines and limitations for policy compression

Observe the following guidelines and limitations when you enable policy compression for contracts.

The following guidelines and limitations apply to policy compression:

  • Policy compression disables statistics for individual filter rules. Identical filter rules from different contracts share ternary content-addressable memory (TCAM) space, so the system does not retain statistics for each rule. Enabling policy compression for a contract discards any existing individual rule statistics.

    To retain individual rule statistics for a contract, do not enable policy compression for that contract.

  • Policy compression is supported on Cisco Nexus 9300-FX and later platforms.

  • Policy compression applies only to user-defined rules. You cannot enable policy compression for implicit rules that the Cisco APIC creates.

  • Policy compression applies only to permit and permit-log rules. The system ignores the policy compression setting for copy, redir, deny, and deny-log rules.

  • You cannot enable policy compression on contracts that have labels or subject exceptions associated with them.

  • Policy compression applies only to contracts for which it is explicitly enabled. If multiple contracts use the same filter, enable policy compression on each contract that you want to compress.

  • You can enable policy compression on only one contract for each EPG pair.

  • The size of the table that maps source and destination classes to labels depends on the policy profile. For scale information, see the Verified Scalability Guide.

    When the table is full, the system stores additional contracts in uncompressed format.

    To view the current capacity usage in the Cisco APIC GUI, choose Operations > Capacity Dashboard > Leaf Capacity.

  • TCAM space is not reduced unless policy compression is enabled. The system dynamically partitions TCAM space when the feature is enabled. If you delete all rules that have policy compression enabled, the system returns the allocated TCAM space.

  • If policy compression and bidirectional contracts are both enabled, the compression logic selects the contract that provides the greatest compression.

    Policy compression takes priority over bidirectional contract compression. If the label table is exhausted or lookup collisions occur, the system falls back to bidirectional contract compression.

  • When a switch with many rules reloads, the rules remain uncompressed until the switch receives the end-of-bootstrap indication.

  • When you upgrade to release 4.0(1) and enable policy compression, delete and reconfigure the contracts if the source release is 3.2(1) or later.

  • When you upgrade to release 4.0(1) and enable policy compression, delete and reconfigure the contracts and filters if the source release is earlier than 3.2(1).


Enable policy compression by using the APIC GUI

Enable policy compression on an existing contract subject filter to reduce the TCAM space required for compatible contract rules.

Procedure

  1. Log in to the APIC GUI.

  2. In the Navigation pane, choose Tenants > tenant-name > Contracts > Standard > contract-name > subject-name .

  3. In the Filters table, double-click the filter for which you want to enable policy compression.

    The Filter dialog appears.

  4. Check the Enable Policy Compression check box.

  5. Click Submit.

    Policy compression is enabled for the contract filter.