About Switch Profiles
Several applications require consistent configuration across devices in the network. For example, with a virtual port channel (vPC), you must have identical configurations. Mismatched configurations can cause errors or misconfigurations that can result in service disruptions. The configuration synchronization (config-sync) feature allows you to configure one switch profile and have the configuration be automatically synchronized to the peer switch.
A switch profile provides the following benefits:
-
Allows configurations to be synchronized between switches.
-
Merges configurations when connectivity is established between two switches.
-
Provides control of exactly which configuration gets synchronized.
-
Ensures configuration consistency across peers through merge and mutual-exclusion checks.
-
Provides verify and commit semantics.
-
Allows for migrating existing vPC configurations to a switch profile.
Switch Profile Configuration Modes
The switch profile feature includes the following configuration modes:
-
Configuration synchronization mode (config-sync)
-
Switch profile mode (config-sync-sp)
-
Switch profile import mode (config-sync-sp-import)
Configuration Synchronization Mode
The configuration synchronization mode (config-sync) allows you to create switch profiles.
Switch Profile Mode
The switch profile mode (config-sync-sp) allows you to add supported configuration commands to a switch profile temporary buffer that is later synchronized with a peer switch. Commands that you enter in the switch profile mode are not executed until you enter the commit command. Although the syntax of the commands are validated when you enter them, there is no guarantee that the commands will be successful when you enter the commit command.
Switch Profile Import Mode
The switch profile import mode (config-sync-sp-import) allows you to import existing switch configurations from the running configuration to a switch profile and specify which commands you want to include in that profile. This option is especially useful when you upgrade from a Cisco NX-OS release that does not support switch profiles to a release that does.
Cisco recommends that you import the necessary configurations from the running configuration using the switch profile import mode and commit the changes before making any additional changes in the switch profile or global configuration mode. Otherwise, you might jeopardize the import, requiring you to abandon the current import session and perform the process again. For more information, see Importing a Switch Profile.
Configuration Validation
Two types of configuration validation checks can identify switch profile failures:
-
Mutual exclusion checks
-
Merge checks
Mutual Exclusion Checks
The mutual exclusion of configuration commands is enforced in order to avoid duplicate commands in the config-sync and global configuration modes. When you commit the configuration of a switch profile, mutual exclusion (mutex) checks are performed on the local switch as well as the peer switch (if configured). If no failures are reported on both switches, the commit is accepted and pushed into the running configuration.
A command that is included in a switch profile cannot be configured outside of the switch profile.
If a mutex check identifies errors, they are reported as mutex failures, and they must be manually corrected. For details, see Manually Correcting Mutex and Merge Failures.
The following exceptions apply to the mutual exclusion policy:
-
Interface configuration—An interface configuration can be partially present in a switch profile and partially present in the running configuration as long as there are no conflicts.
-
Shutdown/no shutdown
-
System QoS
Merge Checks
Merge checks are done on the peer switch that is receiving a configuration. The merge checks ensure that the received configuration does not conflict with the switch profile configuration that already exists on the receiving switch. The merge check occurs during the verify or commit process. Errors are reported as merge failures and must be manually corrected. For details, see Manually Correcting Mutex and Merge Failures.
When one or both switches are reloaded and the configurations are synchronized for the first time, the merge check verifies that the switch profile configurations are identical on both switches. Differences in the switch profiles are reported as merge errors and must be manually corrected.
Software Upgrades and Downgrades with Switch Profiles
You must delete the switch profile when downgrading from a Cisco NX-OS release that supports switch profiles to a release that does not.
When you upgrade from an earlier release to a Cisco NX-OS release that supports switch profiles, you have the option to move some of the running-configuration commands to a switch profile. For details, see Switch Profile Import Mode.
An upgrade can occur if there are buffered (uncommitted) configurations; however, the uncommitted configurations will be lost.