Configuring Switch Profiles

This chapter contains the following sections:

About Switch Profiles

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

  • Supports configuring and synchronizing port profile configurations.

  • Provides an import command to migrate existing vPC configurations to a switch profile.

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 primary. 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.

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

Consider the following guidelines and limitations when configuring switch profiles:

  • 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.

  • 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.

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


    Note


    Several port channel sub-commands 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.

  • Defaulting an interface does not remove a channel group from the config-sync configuration for that interface. You must apply the no channel-group command on the interface or include the port channel in the config-sync configuration to prevent any conflicting configurations from being pushed by the config-sync module.

Guidelines for Synchronizing After Connectivity Loss

  • 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 will occur when the mgmt0 interface comes up and the configuration is applied on the other switch.

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.

SUMMARY STEPS

  1. configure terminal
  2. cfs ipv4 distribute
  3. config sync
  4. switch-profile name
  5. sync-peers destination IP-address
  6. (Optional) show switch-profile name status
  7. exit
  8. (Optional) copy running-config startup-config

DETAILED STEPS

  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.

SUMMARY STEPS

  1. config sync
  2. switch-profile name
  3. sync-peers destination destination IP
  4. exit
  5. (Optional) show switch-profile peer
  6. (Optional) copy running-config startup-config

DETAILED STEPS

  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.

SUMMARY STEPS

  1. config sync
  2. switch-profile name
  3. Command argument
  4. (Optional) show switch-profile name buffer
  5. verify
  6. commit
  7. (Optional) show switch-profile name status
  8. exit
  9. (Optional) copy running-config startup-config

DETAILED STEPS

  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.

SUMMARY STEPS

  1. config sync
  2. switch-profile name
  3. import {interface port/slot | running-config [exclude interface ethernet]}
  4. commit
  5. (Optional) abort
  6. exit
  7. (Optional) show switch-profile
  8. (Optional) copy running-config startup-config

DETAILED STEPS

  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.

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)#

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.

SUMMARY STEPS

  1. config sync
  2. switch-profile name
  3. verify
  4. exit
  5. (Optional) copy running-config startup-config

DETAILED STEPS

  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.

SUMMARY STEPS

  1. config sync
  2. no switch-profile name {all-config | local-config}
  3. exit
  4. (Optional) copy running-config startup-config

DETAILED STEPS

  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.

SUMMARY STEPS

  1. config sync
  2. switch-profile name
  3. no sync-peers destination destination IP
  4. exit
  5. (Optional) show switch-profile
  6. (Optional) copy running-config startup-config

DETAILED STEPS

  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

SUMMARY STEPS

  1. switch# configure sync
  2. switch(config-sync) # switch-profile profile-name
  3. switch(config-sync-sp) # show switch-profileprofile-name buffer

DETAILED STEPS

  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 3600 platform 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:

SUMMARY STEPS

  1. Reapply configurations that were changed on the peer switch during the reboot.
  2. Enter the commit command.
  3. Verify that the configuration is applied correctly and both peers are back synchronized.

DETAILED STEPS


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.

Supported Switch Profile Commands

The following switch profile commands are supported:

  • logging event link-status default

  • [no] vlan vlan-range

  • ip access-list acl-name

  • policy-map type network-qos jumbo-frames

    • class type network-qos class-default

    • mtu mtu value

  • system qos

    • service-policy type network-qos jumbo-frames

  • vlan configuration vlan id

    • ip igmp snooping querier ip

  • spanning-tree port type edge default

  • spanning-tree port type edge bpduguard default

  • spanning-tree loopguard default

  • no spanning-tree vlan vlan id

  • port-channel load-balance ethernet source-dest-port

  • interface port-channel number

    • description text

    • switchport mode trunk

    • switchport trunk allowed vlan vlan list

    • spanning-tree port type network

    • no negotiate auto

    • vpc peer-link

  • interface port-channel number

    • switchport access vlan vlan id

    • spanning-tree port type edge

    • speed 10000

    • vpc number

  • interface ethernetx/y

    • switchport access vlan vlanid

    • spanning-tree port type edge

    • channel-group number mode active

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.

SUMMARY STEPS

  1. Enable CFSoIP distribution on the local and the peer switch.
  2. Create a switch profile on the local and the peer switch.
  3. Verify that the switch profiles are the same on the local and the peer switch.
  4. Verify the commands in the switch profile.
  5. Apply the commands to the switch profile and to synchronize the configurations between the local and the peer switch.

DETAILED STEPS

  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

Verify the commands in the switch profile.

Example:

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

Step 5

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)#