Configuring Switch Profiles

This chapter contains the following sections:

Information About Switch Profiles

Several applications require consistent configuration across Cisco Nexus Series switches in the network. 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.

Switch Profile Configuration Modes

The switch profile feature includes the following configuration modes:

  • Configuration Synchronization Mode

  • Switch Profile Mode

  • Switch Profile Import Mode

Configuration Synchronization Mode

The configuration synchronization mode (config-sync) allows you to create switch profiles using the config sync command on the local switch that you want to use as the master. After you create the profile, you can enter the config sync command on the peer switch that you want to synchronize.

Switch Profile Mode

The switch profile mode allows you to add supported configuration commands to a switch profile that is later synchronized with a peer switch. Commands that you enter in the switch profile mode are buffered until you enter the commit command.

Switch Profile Import Mode

When you upgrade from an earlier release, you have the option to enter the import command to copy supported running-configuration commands to a switch profile. After entering the import command, the switch profile mode (config-sync-sp) changes to the switch profile import mode (config-sync-sp-import). The switch profile import mode allows you to import existing switch configurations from the running configuration and specify which commands you want to include in the switch profile.

Because different topologies require different commands that are included in a switch profile, the import command mode allows you to modify the imported set of commands to suit a specific topology.

You need to enter the commit command to complete the import process and move the configuration into the switch profile. Because configuration changes are not supported during the import process, if you added new commands before entering the commit command, the switch profile remains unsaved and the switch remains in the switch profile import mode. You can remove the added commands or abort the import. Unsaved configurations are lost if the process is aborted. You can add new commands to the switch profile after the import is complete.

Configuration Validation

Two types of configuration validation checks can identify two types of switch profile failures:

  • Mutual Exclusion Checks

  • Merge Checks

Mutual Exclusion Checks

To reduce the possibility of overriding configuration settings that are included in a switch profile, mutual exclusion (mutex) checks the switch profile commands against the commands that exist on the local switch and the commands on the peer switch. A command that is included in a switch profile cannot be configured outside of the switch profile or on a peer switch. This requirement reduces the possibility that an existing command is unintentionally overwritten.

As a part of the commit process, the mutex-check occurs on both switches if the peer switch is reachable; otherwise, the mutex-check is performed locally. Configuration changes made from the configuration terminal occur only on the local switch.

If a mutex-check identifies errors, they are reported as mutex failures and they must be manually corrected.

The following exceptions apply to the mutual exclusion policy:

  • Interface configuration—Port channel interfaces must be configured fully in either switch profile mode or global configuration mode.


    Note


    Several port channel subcommands are not configurable in switch profile mode. These commands can be configured from global configuration mode even if the port channel is created and configured in switch profile mode.

    For example, the following command can only be configured in global configuration mode:

    switchport private-vlan association trunk primary-vlan secondary-vlan


  • 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 merge or commit process. Errors are reported as merge failures and must be manually corrected.

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

When you downgrade to an earlier release, you are prompted to remove an existing switch profile that is not supported on earlier releases.

When you upgrade from an earlier release, you have the option to move some of the running-configuration commands to a switch profile. The import command allows you to import relevant switch profile commands. An upgrade can occur if there are buffered configurations (uncommitted); however, the uncommitted configurations are lost.

When you perform an In Service Software Upgrade (ISSU) on one of the switches included in a switch profile, a configuration synchronization cannot occur because the peer is unreachable.

Prerequisites for Switch Profiles

Switch profiles have the following prerequisites:

  • You must enable Cisco Fabric Series over IP (CFSoIP) distribution over mgmt0 on both switches by entering the cfs ipv4 distribute command.

  • You must configure a switch profile with the same name on both peer switches by entering the config sync and switch-profile commands.

  • Configure each switch as peer switch by entering the sync-peers destination command

Guidelines and Limitations for Switch Profiles

The Switch profile has the following guidelines and limitations:

  • You can only enable configuration synchronization using the mgmt0 interface.

  • Configuration synchronization is performed using the mgmt 0 interface and cannot be performed using a management SVI.

  • You must configure synchronized peers with the same switch profile name.

  • Commands that are qualified for a switch profile configuration are allowed to be configured in the configuration switch profile (config-sync-sp) mode.

  • Supported switch profile commands relate to virtual port channel (vPC) commands. Fiber Channel over Ethernet (FCoE) commands are not supported.

  • One switch profile session can be in progress at a time. Attempts to start another session will fail.

  • Supported command changes made from the configuration terminal mode are blocked when a switch profile session is in progress. You should not make unsupported command changes from the configuration terminal mode when a switch profile session is in progress.

  • When you enter the commit command and a peer switch is reachable, the configuration is applied to both peer switches or neither switch. If there is a commit failure, the commands remain in the switch profile buffer. You can then make necessary corrections and try the commit again.

  • We recommend that you enable preprovisioning for all Generic Expansion Modules (GEMs) and Cisco Nexus Fabric Extender modules whose interface configurations are synchronized using the configuration synchronization feature. Follow these guidelines in Cisco Nexus Fabric Extender active/active topologies where the Fabric Extenders might not be online on one switch and its configuration is changed and synchronized on the other switch. In this scenario, if you do not enable preprovisioning, a commit fails and the configuration is rolled back on both switches.

  • Once a port channel is configured using switch profile mode, it cannot be configured using global configuration (config terminal) mode.


    Note


    Several port channel subcommands are not configurable in switch profile mode. These commands can be configured from global configuration mode even if the port channel is created and configured in switch profile mode.

    For example, the following command can only be configured in global configuration mode:

    switchport private-vlan association trunk primary-vlan secondary-vlan


  • Shutdown and no shutdown can be configured in either global configuration mode or switch profile mode.

  • If a port channel is created in global configuration mode, channel groups including member interfaces must also be created using global configuration mode.

  • Port channels that are configured within switch profile mode may have members both inside and outside of a switch profile.

  • If you want to import a member interface to a switch profile, the port channel including the member interface must also be present within the switch profile.

Guidelines for Synchronizing After Reboot, Connectivity Loss, or Failure

  • Synchronizing configurations after vPC peer link failure— If both switches are operational when a peer link fails, the secondary switch shuts down its vPC ports. In a Fabric Extender A/A topology, the A/A Fabric Extender disconnects from the secondary switch. If the configuration is changed using a switch profile on the primary switch, configurations are not accepted on the secondary switch unless the A/A Fabric Extender is preprovisioned. When using the configuration synchronization feature, we recommend that you preprovision all A/A Fabric Extenders.

  • Synchronizing configurations after mgmt0 interface connectivity loss—When mgmt0 interface connectivity is lost and configuration changes are required, apply the configuration changes on both switches using the switch profile. When connectivity to the mgmt0 interface is restored, both switches synchronize automatically.

    If a configuration change is made on only one switch, a merge occurs when the mgmt0 interface comes up and the configuration is applied on the other switch.

  • Synchronizing configurations when an ISSU is performed on one switch and a configuration change is made on the peer switch—In a vPC topology, configuration changes on the peer switch are not allowed when an ISSU is performed on the other switch. In topologies without vPCs, configuration changes are allowed and the switch undergoing an ISSU synchronizes new configurations when the upgrade is complete.

Configuring Switch Profiles

You can create and configure a switch profile. Enter the switch-profile name command in the configuration synchronization mode (config-sync).

Before you begin

You must create the switch profile with the same name on each switch and the switches must configure each other as a peer. When connectivity is established between switches with the same active switch profile, the switch profiles are synchronized.

Procedure

  Command or Action Purpose

Step 1

configure terminal

Example:

switch# configure terminal
switch(config)#

Enters global configuration mode.

Step 2

cfs ipv4 distribute

Example:

switch(config)# cfs ipv4 distribute
switch(config)#

Enables CFS distribution between the peer switches.

Step 3

config sync

Example:

switch# config sync
switch(config-sync)#

Enters configuration synchronization mode.

Step 4

switch-profile name

Example:

switch(config-sync)# switch-profile abc
switch(config-sync-sp)#

Configures the switch profile, names the switch profile, and enters switch profile synchronization configuration mode.

Step 5

sync-peers destination IP-address

Example:

switch(config-sync-sp)# sync-peers destination 10.1.1.1
switch(config-sync-sp)#

Configures the peer switch.

Step 6

(Optional) show switch-profile name status

Example:

switch(config-sync-sp)# show switch-profile abc status
switch(config-sync-sp)#
(Optional)

Views the switch profile on the local switch and the peer switch information.

Step 7

exit

Example:

switch(config-sync-sp)# exit
switch#

Exits the switch profile configuration mode and returns to EXEC mode.

Step 8

(Optional) copy running-config startup-config

Example:

switch(config)# copy running-config startup-config
(Optional)

Saves the change persistently through reboots and restarts by copying the running configuration to the startup configuration.

Example

The following example shows how to configure a switch profile and shows the switch profile status.

switch# configuration terminal
switch(config)# cfs ipv4 distribute
switch(config-sync)# switch-profile abc 
switch(config-sync-sp)# sync-peers destination 10.1.1.1
switch(config-sync-sp)# show switch-profile abc status
Start-time:  15801 usecs after Mon Aug 23 06:21:08 2010
End-time:   6480 usecs after Mon Aug 23 06:21:13 2010
 
Profile-Revision: 1
Session-type: Initial-Exchange
Peer-triggered: Yes
Profile-status: Sync Success
 
Local information:
----------------
Status: Commit Success
Error(s):
 
Peer information:
----------------
IP-address: 10.1.1.1
Sync-status: In Sync.
Status: Commit Success
Error(s):
switch(config-sync-sp)# exit
switch#

Adding a Switch to a Switch Profile

Enter the sync-peers destination destination IP command in switch profile configuration mode to add the switch to a switch profile.

Follow these guidelines when adding switches:

  • Switches are identified by their IP address.

  • Destination IPs are the IP addresses of the switches that you want to synchronize.

  • The committed switch profile is synchronized with the newly added peers (when they are online) if the peer switch is also configured with configuration synchronization.

    If you want to import a member interface to a switch profile, the port channel including the member interface must also be present within the switch profile.

Before you begin

After creating a switch profile on the local switch, you must add the second switch that will be included in the synchronization.

Procedure

  Command or Action Purpose

Step 1

config sync

Example:

switch# config sync
switch(config-sync)#

Enters configuration synchronization mode.

Step 2

switch-profile name

Example:

switch(config-sync)# switch-profile abc
switch(config-sync-sp)#

Configures switch profile, names the switch profile, and enters switch profile synchronization configuration mode.

Step 3

sync-peers destination destination IP

Example:

switch(config-sync-sp)# sync-peers destination 10.1.1.1
switch(config-sync-sp)#

Adds a switch to the switch profile.

Step 4

exit

Example:

switch(config-sync-sp)# exit
switch#

Exits switch profile configuration mode.

Step 5

(Optional) show switch-profile peer

Example:

switch# show switch-profile peer
(Optional)

Displays the switch profile peer configuration.

Step 6

(Optional) copy running-config startup-config

Example:

switch# copy running-config startup-config
(Optional)

Copies the running configuration to the startup configuration.

Adding or Modifying Switch Profile Commands

To modify a command in a switch profile, add the modified command to the switch profile and enter the commit command to apply the command and synchronize the switch profile to the peer switch if it is reachable.

Follow these guidelines when adding or modifying switch profile commands:

  • Commands that are added or modified are buffered until you enter the commit command.

  • Commands are executed in the same order in which they are buffered. If there is an order-dependency for certain commands, for example, a QoS policy must be defined before being applied, you must maintain that order; otherwise, the commit might fail. You can use utility commands, such as the show switch-profile name buffer command, the buffer-delete command, or the buffer-move command, to change the buffer and correct the order of already entered commands.

Before you begin

After configuring a switch profile on the local and the peer switch, you must add and commit the supported commands to the switch profile. The commands are added to the switch profile buffer until you enter the commit command. The commit command does the following:

  • Triggers the mutex check and the merge check to verify the synchronization.

  • Creates a checkpoint with a rollback infrastructure.

  • Applies the configuration on the local switch and the peer switch.

  • Executes a rollback on all switches if there is a failure with an application on any of the switches in the switch profile.

  • Deletes the checkpoint.

Procedure

  Command or Action Purpose

Step 1

config sync

Example:

switch# config sync
switch(config-sync)#

Enters configuration synchronization mode.

Step 2

switch-profile name

Example:

switch(config-sync)# switch-profile abc
switch(config-sync-sp)#

Configures the switch profile, names the switch profile, and enters switch profile synchronization configuration mode.

Step 3

Command argument

Example:

switch(config-sync-sp)# interface Port-channel100
switch(config-sync-sp-if)# speed 1000
switch(config-sync-sp-if)# interface Ethernet1/1
switch(config-sync-sp-if)# speed 1000
switch(config-sync-sp-if)# channel-group 100

Adds a command to the switch profile.

Step 4

(Optional) show switch-profile name buffer

Example:

switch(config-sync-sp)# show switch-profile abc buffer
switch(config-sync-sp)#
(Optional)

Displays the configuration commands in the switch profile buffer.

Step 5

verify

Example:

switch(config-sync-sp)# verify

Verifies the commands in the switch profile buffer.

Step 6

commit

Example:

switch(config-sync-sp)# commit

Saves the commands in the switch profile and synchronizes the configuration with the peer switch.

Step 7

(Optional) show switch-profile name status

Example:

switch(config-sync-sp)# show switch-profile abc status
switch(config-sync-sp)#
(Optional)

Displays the status of the switch profile on the local switch and the status on the peer switch.

Step 8

exit

Example:

switch(config-sync-sp)# exit
switch#

Exits the switch profile configuration mode.

Step 9

(Optional) copy running-config startup-config

Example:

switch# copy running-config startup-config
(Optional)

Copies the running configuration to the startup configuration.

Example

The following example shows how to create a switch profile, configure a peer switch, and add commands to the switch profile.

switch# configuration terminal
switch(config)# cfs ipv4 distribute
switch(config-sync)# switch-profile abc 
switch(config-sync-sp)# sync-peers destination 10.1.1.1
switch(config-sync-sp)# interface port-channel100
switch(config-sync-sp-if)# speed 1000
switch(config-sync-sp-if)# interface Ethernet1/1
switch(config-sync-sp-if)# speed 1000
switch(config-sync-sp-if)# channel-group 100
switch(config-sync-sp)# verify
switch(config-sync-sp)# commit
switch(config-sync-sp)# exit
switch#

The following example shows an existing configuration with a defined switch profile. The second example shows how the switch profile command changed by adding the modified command to the switch profile.

switch# show running-config
switch-profile abc
  interface Ethernet1/1
    switchport mode trunk
    switchport trunk allowed vlan 1-10

switch# config sync
switch(config-sync)# switch-profile abc
switch(config-sync-sp)# interface Ethernet1/1
switch(config-sync-sp-if)# switchport trunk allowed vlan 5-10
switch(config-sync-sp-if)# commit

switch# show running-config
switch-profile abc
  interface Ethernet1/1
    switchport mode trunk
    switchport trunk allowed vlan 5-10

Importing a Switch Profile

You can import a switch profile based on the set of commands that you want to import. Using the configuration terminal mode, you can do the following:

  • Add selected commands to the switch profile.

  • Add supported commands that were specified for an interface.

  • Add supported system-level commands.

  • Add supported system-level commands excluding the physical interface commands.

When you import commands to a switch profile, the switch profile buffer must be empty.

If new commands are added during the import, the switch profile remains unsaved and the switch remains in the switch profile import mode. You can enter the abort command to stop the import. For additional information importing a switch profile, see the “Switch Profile Import Mode” section.

Procedure

  Command or Action Purpose

Step 1

config sync

Example:

switch# config sync
switch(config-sync)#

Enters configuration synchronization mode.

Step 2

switch-profile name

Example:

switch(config-sync)# switch-profile abc
switch(config-sync-sp)#

Configures the switch profile, names the switch profile, and enters switch profile synchronization configuration mode.

Step 3

import {interface port/slot | running-config [exclude interface ethernet]}

Example:

switch(config-sync-sp)# import ethernet 1/2
switch(config-sync-sp-import)#

Identifies the commands that you want to import and enters switch profile import mode.

  • <CR>—Adds selected commands.

  • interface—Adds the supported commands for a specified interface.

  • running-config—Adds supported system-level commands.

  • running-config exclude interface ethernet—Adds supported system-level commands excluding the physical interface commands.

Note

 

If this is a QSFP+GEM or a breakout port, the port syntax is QSFP-module/port .

Step 4

commit

Example:

switch(config-sync-sp-import)# commit

Imports the commands and saves the commands to the switch profile.

Step 5

(Optional) abort

Example:

switch(config-sync-sp-import)# abort
(Optional)

Aborts the import process.

Step 6

exit

Example:

switch(config-sync-sp)# exit
switch#

Exits switch profile import mode.

Step 7

(Optional) show switch-profile

Example:

switch# show switch-profile
(Optional)

Displays the switch profile configuration.

Step 8

(Optional) copy running-config startup-config

Example:

switch# copy running-config startup-config
(Optional)

Copies the running configuration to the startup configuration.

Example

The following example shows how to import supported system-level commands excluding the Ethernet interface commands into the switch profile named sp:

switch(config-vlan)# conf sync
switch(config-sync)# switch-profile sp
Switch-Profile started, Profile ID is 1
switch(config-sync-sp)# show switch-profile buffer
 
switch-profile  : sp
----------------------------------------------------------
Seq-no  Command
----------------------------------------------------------
 
switch(config-sync-sp)# import running-config exclude interface ethernet
switch(config-sync-sp-import)#
switch(config-sync-sp-import)# show switch-profile buffer
 
switch-profile  : sp
----------------------------------------------------------
Seq-no  Command
----------------------------------------------------------
3       vlan 100-299
4       vlan 300
4.1       state suspend
5       vlan 301-345
6       interface port-channel100
6.1       spanning-tree port type network
7       interface port-channel105
 
switch(config-sync-sp-import)#

Importing Configurations in a vPC Topology

You can import configurations in a two-switch vPC topology.


Note


For specific information about the following steps, see the appropriate sections in this chapter.


  • Configure the switch profile with the same name on both switches.

  • Import the configurations to both switches independently.


    Note


    Ensure that the configuration moved to the switch profile on both switches is identical; otherwise, a merge-check failure might occur.


  • Configure the switches by entering the sync-peer destination command.

  • Verify that the switch profiles are the same by entering the appropriate show commands.

Verifying Commands in a Switch Profile

You can verify the commands that are included in a switch profile by entering the verify command in switch profile mode.

Procedure

  Command or Action Purpose

Step 1

config sync

Example:

switch# config sync
switch(config-sync)#

Enters configuration synchronization mode.

Step 2

switch-profile name

Example:

switch(config-sync)# switch-profile abc
switch(config-sync-sp)#

Configures the switch profile, names the switch profile, and enters switch profile synchronization configuration mode.

Step 3

verify

Example:

switch(config-sync-sp)# verify

Verifies the commands in the switch profile buffer.

Step 4

exit

Example:

switch(config-sync-sp)# exit
switch#

Exits the switch profile configuration mode.

Step 5

(Optional) copy running-config startup-config

Example:

switch# copy running-config startup-config
(Optional)

Copies the running configuration to the startup configuration.

Isolating a Peer Switch

You can isolate a peer switch in order to make changes to a switch profile. This process can be used when you want to block a configuration synchronization or when you want to debug configurations.

Isolating a peer switch requires that you remove the switch from the switch profile and then add the peer switch back to the switch profile.

To temporarily isolate a peer switch, follow these steps:

  1. Remove a peer switch from a switch profile.

  2. Make changes to the switch profile and commit the changes.

  3. Enter debug commands.

  4. Undo the changes that were made to the switch profile in Step 2 and commit.

  5. Add the peer switch back to the switch profile.

Deleting a Switch Profile

You can delete a switch profile by selecting the all-config or the local-config option:

  • all-config—Deletes the switch profile on both peer switches (when both are reachable). If you choose this option and one of the peers is unreachable, only the local switch profile is deleted. The all-config option completely deletes the switch profile on both peer switches.

  • local-config—Deletes the switch profile on the local switch only.

Procedure

  Command or Action Purpose

Step 1

config sync

Example:

switch# config sync
switch(config-sync)#

Enters configuration synchronization mode.

Step 2

no switch-profile name {all-config | local-config}

Example:

switch(config-sync)# no switch-profile abc local-config
switch(config-sync-sp)#

Deletes the switch profile as follows:

  • all-config—Deletes the switch profile on the local and peer switch. If the peer switch is not reachable, only the local switch profile is deleted.

  • local-config—Deletes the switch profile and local configuration.

Step 3

exit

Example:

switch(config-sync-sp)# exit
switch#

Exits configuration synchronization mode.

Step 4

(Optional) copy running-config startup-config

Example:

switch# copy running-config startup-config
(Optional)

Copies the running configuration to the startup configuration.

Deleting a Switch from a Switch Profile

You can delete a switch from a switch profile.

Procedure

  Command or Action Purpose

Step 1

config sync

Example:

switch# config sync
switch(config-sync)#

Enters configuration synchronization mode.

Step 2

switch-profile name

Example:

switch(config-sync)# switch-profile abc
switch(config-sync-sp)#

Configures the switch profile, names the switch profile, and enters the switch profile synchronization configuration mode.

Step 3

no sync-peers destination destination IP

Example:

switch(config-sync-sp)# no sync-peers destination 10.1.1.1
switch(config-sync-sp)#

Removes the specified switch from the switch profile.

Step 4

exit

Example:

switch(config-sync-sp)# exit
switch#

Exits the switch profile configuration mode.

Step 5

(Optional) show switch-profile

Example:

switch# show switch-profile
(Optional)

Displays the switch profile configuration.

Step 6

(Optional) copy running-config startup-config

Example:

switch# copy running-config startup-config
(Optional)

Copies the running configuration to the startup configuration.

Displaying the Switch Profile Buffer

Procedure

  Command or Action Purpose

Step 1

switch# configure sync

Enters configuration synchronization mode.

Step 2

switch(config-sync) # switch-profile profile-name

Enters switch profile synchronization configuration mode for the specified switch profile.

Step 3

switch(config-sync-sp) # show switch-profileprofile-name buffer

Enters interface switch profile synchronization configuration mode for the specified interface.

Example

The following example shows how to display the switch profile buffer for a service profile called sp:

switch# configure sync
Enter configuration commands, one per line.  End with CNTL/Z.
switch(config-sync)# switch-profile sp
Switch-Profile started, Profile ID is 1 
switch(config-sync-sp)# show switch-profile sp buffer
----------------------------------------------------------
Seq-no  Command
----------------------------------------------------------
1       vlan 101
1.1       ip igmp snooping querier 10.101.1.1
2       mac address-table static 0000.0000.0001 vlan 101 drop
3       interface Ethernet1/2
3.1       switchport mode trunk
3.2       switchport trunk allowed vlan 101

switch(config-sync-sp)# buffer-move 3 1
switch(config-sync-sp)# show switch-profile sp buffer
----------------------------------------------------------
Seq-no  Command
----------------------------------------------------------
1       interface Ethernet1/2
1.1       switchport mode trunk
1.2       switchport trunk allowed vlan 101
2       vlan 101
2.1       ip igmp snooping querier 10.101.1.1
3       mac address-table static 0000.0000.0001 vlan 101 drop
switch(config-sync-sp)# 

Synchronizing Configurations After a Switch Reboot

If a Cisco Nexus Series switch reboots while a new configuration is being committed on a peer switch using a switch profile, complete the following steps to synchronize the peer switches after reload:

Procedure


Step 1

Reapply configurations that were changed on the peer switch during the reboot.

Step 2

Enter the commit command.

Step 3

Verify that the configuration is applied correctly and both peers are back synchronized.


Example

Switch Profile Configuration show Commands

The following show commands display information about the switch profile.

Command Purpose
show switch-profile name Displays the commands in a switch profile.
show switch-profile name buffer Displays the uncommitted commands in a switch profile, the commands that were moved, and the commands that were deleted.
show switch-profile name peer IP-address Displays the synchronization status for a peer switch.
show switch-profile name session-history Displays the status of the last 20 switch profile sessions.
show switch-profile name status Displays the configuration synchronization status of a peer switch.
show running-config exclude-provision Displays the configurations for offline preprovisioned interfaces that are hidden.
show running-config switch-profile Displays the running configuration for the switch profile on the local switch.
show startup-config switch-profile Displays the startup configuration for the switch profile on the local switch.

For detailed information about the fields in the output from these commands, see the system management command reference for your platform.

Configuration Examples for Switch Profiles

Creating a Switch Profile on a Local and Peer Switch Example

The following example shows how to create a successful switch profile configuration on a local and peer switch.

Procedure

  Command or Action Purpose

Step 1

Enable CFSoIP distribution on the local and the peer switch.

Example:

switch# configuration terminal
switch(config)# cfs ipv4 distribute

Step 2

Create a switch profile on the local and the peer switch.

Example:

switch(config-sync)# switch-profile abc 
switch(config-sync-sp)# sync-peers destination 10.1.1.1

Step 3

Verify that the switch profiles are the same on the local and the peer switch.

Example:

switch(config-sync-sp)# show switch-profile abc status
 
Start-time:  15801 usecs after Mon Aug 23 06:21:08 2010
End-time:   6480 usecs after Mon Aug 23 06:21:13 2010
 
Profile-Revision: 1
Session-type: Initial-Exchange
Peer-triggered: Yes
Profile-status: Sync Success
 
Local information:
----------------
Status: Commit Success
Error(s):
 
Peer information:
----------------
IP-address: 10.1.1.1
Sync-status: In Sync.
Status: Commit Success
Error(s):

Step 4

Add the configuration commands to the switch profile on the local switch. The commands will be applied to the peer switch when the commands are committed.

Example:

switch(config-sync-sp)# class-map type qos c1 

Step 5

Verify the commands in the switch profile.

Example:

switch(config-sync-sp-if)# verify
Verification Successful

Step 6

Apply the commands to the switch profile and to synchronize the configurations between the local and the peer switch.

Example:

switch(config-sync-sp)# commit
Commit Successful
switch(config-sync)#

Verifying the Synchronization Status Example

The following example shows how to verify the synchronization status between the local and the peer switch:

switch(config-sync)# show switch-profile switch-profile status
Start-time: 804935 usecs after Mon Aug 23 06:41:10 2010
End-time: 956631 usecs after Mon Aug 23 06:41:20 2010
 
Profile-Revision: 2
Session-type: Commit
Peer-triggered: No
Profile-status: Sync Success
 
Local information:
----------------
Status: Commit Success
Error(s):
 
Peer information:
----------------
IP-address: 10.1.1.1
Sync-status: In Sync.
Status: Commit Success
Error(s):
 
switch(config-sync)# 

Displaying the Running Configuration

The following example shows how to display the running configuration of the switch profile on the local switch:

switch# configure sync
switch(config-sync)# show running-config switch-profile

switch(config-sync)#

Displaying the Switch Profile Synchronization Between Local and Peer Switches

This example shows how to display the synchronization status for two peer switches:

switch1# show switch-profile sp status

Start-time: 491815 usecs after Thu Aug 12 11:54:51 2010
End-time: 449475 usecs after Thu Aug 12 11:54:58 2010

Profile-Revision: 1
Session-type: Initial-Exchange
Peer-triggered: No
Profile-status: Sync Success

Local information:
----------------
Status: Commit Success
Error(s): 

Peer information:
----------------
IP-address: 10.193.194.52
Sync-status: In Sync.
Status: Commit Success
Error(s): 

switch1# 


switch2# show switch-profile sp status

Start-time: 503194 usecs after Thu Aug 12 11:54:51 2010
End-time: 532989 usecs after Thu Aug 12 11:54:58 2010

Profile-Revision: 1
Session-type: Initial-Exchange
Peer-triggered: Yes
Profile-status: Sync Success

Local information:
----------------
Status: Commit Success
Error(s): 

Peer information:
----------------
IP-address: 10.193.194.51
Sync-status: In Sync.
Status: Commit Success
Error(s): 

switch2# 

Displaying Verify and Commit on Local and Peer Switches

This example shows how to configure a successful verify and commit of the local and peer switch:

switch1# configure sync
Enter configuration commands, one per line.  End with CNTL/Z.
switch1(config-sync)# switch-profile sp
Switch-Profile started, Profile ID is 1
switch1(config-sync-sp)# interface ethernet1/1
switch1(config-sync-sp-if)# description foo
switch1(config-sync-sp-if)# verify
Verification Successful
switch1(config-sync-sp)# commit
Commit Successful
switch1(config-sync)# show running-config switch-profile
switch-profile sp
  sync-peers destination 10.193.194.52
  interface Ethernet1/1
    description foo
switch1(config-sync)# show switch-profile sp status

Start-time: 171513 usecs after Wed Aug 11 17:51:28 2010
End-time: 676451 usecs after Wed Aug 11 17:51:43 2010

Profile-Revision: 3
Session-type: Commit
Peer-triggered: No
Profile-status: Sync Success

Local information:
----------------
Status: Commit Success
Error(s): 

Peer information:
----------------
IP-address: 10.193.194.52
Sync-status: In Sync.
Status: Commit Success
Error(s): 

switch1(config-sync)# 


switch2# show running-config switch-profile
switch-profile sp
  sync-peers destination 10.193.194.51
  interface Ethernet1/1
    description foo
switch2# show switch-profile sp status

Start-time: 265716 usecs after Wed Aug 11 16:51:28 2010
End-time: 734702 usecs after Wed Aug 11 16:51:43 2010

Profile-Revision: 3
Session-type: Commit
Peer-triggered: Yes
Profile-status: Sync Success

Local information:
----------------
Status: Commit Success
Error(s): 

Peer information:
----------------
IP-address: 10.193.194.51
Sync-status: In Sync.
Status: Commit Success
Error(s): 

switch2# 

Successful and Unsuccessful Synchronization Examples

The following example shows a successful synchronization of the switch profile on the peer switch:

switch# show switch-profile abc peer

switch# show switch-profile sp peer 10.193.194.52
Peer-sync-status           : In Sync.
Peer-status                : Commit Success
Peer-error(s)              : 
switch1# 

The following example shows an unsuccessful synchronization of a switch profile on the peer switch, with a peer not reachable status:

switch# show switch-profile sp peer 10.193.194.52
Peer-sync-status           : Not yet merged. pending-merge:1 received_merge:0
Peer-status                : Peer not reachable
Peer-error(s)              : 
switch# 

Configuring the Switch Profile Buffer, Moving the Buffer, and Deleting the Buffer

This example shows how to configure the switch profile buffer, the buffer-move configuration, and the buffer-delete configuration:

switch# configure sync
Enter configuration commands, one per line.  End with CNTL/Z.
switch(config-sync)# switch-profile sp
Switch-Profile started, Profile ID is 1
switch(config-sync-sp)# vlan 101
switch(config-sync-sp-vlan)# ip igmp snooping querier 10.101.1.1
switch(config-sync-sp-vlan)# exit
switch(config-sync-sp)# mac address-table static 0000.0000.0001 vlan 101 drop 
switch(config-sync-sp)# interface ethernet1/2
switch(config-sync-sp-if)# switchport mode trunk 
switch(config-sync-sp-if)# switchport trunk allowed vlan 101
switch(config-sync-sp-if)# exit
switch(config-sync-sp)# show switch-profile sp buffer
----------------------------------------------------------
Seq-no  Command
----------------------------------------------------------
1       vlan 101
1.1       ip igmp snooping querier 10.101.1.1
2       mac address-table static 0000.0000.0001 vlan 101 drop
3       interface Ethernet1/2
3.1       switchport mode trunk
3.2       switchport trunk allowed vlan 101

switch(config-sync-sp)# buffer-move 3 1
switch(config-sync-sp)# show switch-profile sp buffer
----------------------------------------------------------
Seq-no  Command
----------------------------------------------------------
1       interface Ethernet1/2
1.1       switchport mode trunk
1.2       switchport trunk allowed vlan 101
2       vlan 101
2.1       ip igmp snooping querier 10.101.1.1
3       mac address-table static 0000.0000.0001 vlan 101 drop

switch(config-sync-sp)# buffer-delete 1
switch(config-sync-sp)# show switch-profile sp buffer
----------------------------------------------------------
Seq-no  Command
----------------------------------------------------------
2       vlan 101
2.1       ip igmp snooping querier 10.101.1.1
3       mac address-table static 0000.0000.0001 vlan 101 drop

switch(config-sync-sp)# buffer-delete all
switch(config-sync-sp)# show switch-profile sp buffer
switch(config-sync-sp)# 

Sample Migrations Using the Import Command

Migrating Cisco NX-OS Release 5.0(2)N1(1) in a Fabric Extender A-A Topology Example

This examples shows the tasks used to migrate to Cisco NX-OS Release 5.0(2)N1(1) in a Fabric Extender A-A topology. For details on the tasks, see the appropriate sections in this chapter.

Procedure


Step 1

Ensure configurations are the same on both switches.

Step 2

Configure the switch-profile with same name on both switches.

Step 3

Enter the import running config command on both switches.

Step 4

Enter the switch-profile name buffer command to ensure all configurations are correctly imported on both switches.

Step 5

Remove unwanted configuration settings by editing the buffer.

For details, see Configuring the Switch Profile Buffer, Moving the Buffer, and Deleting the Buffer.

Step 6

Enter the commit command on both switches.

Step 7

Enter the sync-peers destination IP-address command to configure the peer switch on both switches.

Step 8

Enter the switch-profile name status command to ensure both switches are synchronized.


Migrating Cisco NX-OS Release 5.0(2)N1(1) in a Fabric Extender Fabric Extender Straight-Through Topology Example

This example shows the tasks used to migrate to Cisco NX-OS Release 5.0(2)N1(1) in a Fabric Extender Straight-Through topology. For details on the tasks, see the appropriate sections in this chapter.

Procedure


Step 1

Ensure the vPC port-channel configurations are the same on both switches.

Step 2

Configure the switch-profile with the same name on both switches.

Step 3

Enter the import interface port-channel x-y, port-channel z command for all vPC port-channels on both switches.

Step 4

Enter the show switch-profile name buffer command to ensure all configurations are correctly imported on both switches.

Step 5

Remove unwanted configuration settings by editing the buffer.

For details, see Configuring the Switch Profile Buffer, Moving the Buffer, and Deleting the Buffer.

Step 6

Enter the commit command on both switches.

Step 7

Enter the sync-peers destination IP-address command to configure the peer switch on both switches.

Step 8

Enter the show switch-profile name status command to ensure both switches are synchronized.


Replacing a Cisco Nexus 5000 Series Switch

When a Cisco Nexus 5000 Series switch has been replaced, perform the following configuration steps on the replacement switch to synchronize it with the existing Cisco Nexus 5000 Series switch. The procedure can be done in a hybrid Fabric Extender A/A topology and Fabric Extender Straight-Through topology.

  1. Do not connect any peer-link, vPC, A/A or Straight-Through topology fabric ports to the replacement switch.

  2. Boot the replacement switch. The switch comes up with no configuration.

  3. Enable pre-provisioning on all Fabric Extender A/A and ST modules.

  4. Configure the replacement switch:

    If the running-configuration was saved offline, follow steps 5-9 to apply the configuration.

    If the running-configuration was not saved offline, you can obtain it from the peer switch if the configuration synchronization feature is enabled. (See Steps 1 and 2 from "Creating a Switch Profile on a Local and Peer Switch" then begin with step 10 below).

    If neither condition is met, manually add the configuration and then begin with step 10 below.

  5. Edit the configuration file to remove the sync-peer command if using the configuration synchronization feature.

  6. Configure the mgmt port IP address and download the configuration file.

  7. Copy the saved configuration file to the running configuration.

  8. Verify the configuration is correct by entering the show running-config command and the show provision failed-config slot command.

  9. If switch-profile configuration changes were made on the peer switch while the replacement switch was out-of-service, apply those configurations in the switch-profile and then enter the commit command.

  10. Shutdown all Fabric Extender ST topology ports that are included in a vPC topology.

  11. Connect the Fabric Extender ST topology fabric ports.

  12. Wait for Fabric Extender ST topology switches to come online.

  13. Ensure the vPC role priority of the existing switch is better than the replacement switch.

  14. Connect the peer-link ports to the peer switch.

  15. Connect the Fabric Extender A/A topology fabric ports.

  16. Connect the switch vPC ports.

  17. Enter the no shutdown command on all Fabric Extender ST vPC ports.

  18. Verify that all vPC switches and the Fabric Extenders on the replacement switch come online and that there is no disruption in traffic.

  19. If you are using the configuration synchronization feature, add the sync-peer configuration to the switch-profile if this wasn’t enabled in Step 4.

  20. If you are using the configuration synchronization feature, enter the show switch-profile name status command to ensure both switches are synchronized.