Cisco Nexus 6000 Series NX-OS System Management Configuration Guide, Release 6.x
Configuring Switch Profiles
Downloads: This chapterpdf (PDF - 1.43MB) The complete bookPDF (PDF - 4.08MB) | The complete bookePub (ePub - 612.0KB) | The complete bookMobi (Mobi - 1.13MB) | Feedback

Configuring Switch Profiles

Contents

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. 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 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. For example, a dual homed Fabric Extender (FEX) topology requires that most of the configuration is synchronized. In other vPC topologies, the configuration that needs to be synchronized might be a much smaller set of commands.

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 ActionPurpose
    Step 1configure terminal


    Example:
    switch# configure terminal
    switch(config)#
     

    Enters global configuration mode.

     
    Step 2cfs 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 4switch-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 5sync-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 6show 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 7exit


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

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

     
    Step 8copy 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.

     

    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 ActionPurpose
      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 show switch-profile peer


      Example:
      switch# show switch-profile peer
       
      (Optional)

      Displays the switch profile peer configuration.

       
      Step 6 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 ActionPurpose
        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 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 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 copy running-config startup-config


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

        Copies the running configuration to the startup configuration.

         

        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 ActionPurpose
          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 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 show switch-profile


          Example:
          switch# show switch-profile
          
           
          (Optional)

          Displays the switch profile configuration.

           
          Step 8 copy running-config startup-config


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

          Copies the running configuration to the startup configuration.

           

          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.


          1. Configure the switch profile with the same name on both switches.
          2. 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.


          3. Configure the switches by entering the sync-peer destination command.
          4. 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 ActionPurpose
            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 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 ActionPurpose
              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 | profile-only}


              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.
              • profile-only—Deletes the switch profile without the local configuration.
               
              Step 3copy switch-profile-config


              Example:
              switch (config-sync-sp)# copy switch-profile-config bootflash:
              switch (config-sync-sp)#
               
              (Optional)

               

              Step 4 exit


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

              Exits configuration synchronization mode.

               
              Step 5 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 ActionPurpose
                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 show switch-profile


                Example:
                switch# show switch-profile
                 
                (Optional)

                Displays the switch profile configuration.

                 
                Step 6 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 ActionPurpose
                  Step 1switch# configure sync 

                  Enters configuration synchronization mode.

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

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

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

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

                   

                  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.

                    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 expand-port-profile Displays details about the port profile.
                    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 including configuring QoS policies; a vPC peer-link, and a vPC in a switch profile.

                    Procedure
                       Command or ActionPurpose
                      Step 1Enable CFSoIP distribution on the local and the peer switch.

                      Example:
                      switch# configuration terminal
                      switch(config)# cfs ipv4 distribute
                       
                       
                      Step 2Create 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 4Add 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 
                      switch(config-sync-sp-cmap-qos)# match cos 2 
                      switch(config-sync-sp-cmap-qos)# class-map type qos c2 
                      switch(config-sync-sp-cmap-qos)# match cos 5 
                      switch(config-sync-sp-cmap-qos)# policy-map type qos p1 
                      switch(config-sync-sp-pmap-qos)# class c1 
                      switch(config-sync-sp-pmap-c-qos)# set qos-group 2 
                      switch(config-sync-sp-pmap-c-qos)# class c2 
                      switch(config-sync-sp-pmap-c-qos)# set qos-group 3 
                      switch(config-sync-sp-pmap-c-qos)# system qos 
                      switch(config-sync-sp-sys-qos)# service-policy type qos input p1 
                      switch(config-sync-sp-sys-qos)# vlan 1-50 
                      switch(config-sync-sp-vlan)# interface port-channel 100 
                      switch(config-sync-sp-if)# vpc peer-link 
                      switch(config-sync-sp-if)# switchport mode trunk 
                      switch(config-sync-sp-if)# interface port-channel 10 
                      switch(config-sync-sp-if)# vpc 1 
                      switch(config-sync-sp-if)# switchport mode trunk 
                      switch(config-sync-sp-if)# switchport trunk allowed vlan 1, 10-50 
                      
                       
                       
                      Step 5 View the buffered commands.

                      Example:
                      switch(config-sync-sp-if)# show switch-profile switch-profile buffer
                      ----------------------------------------------------------
                      Seq-no  Command
                      ----------------------------------------------------------
                      1       class-map type qos match-all c1
                      1.1       match cos 2
                      2       class-map type qos match-all c2
                      2.1       match cos 5
                      3       policy-map type qos p1
                      3.1       class c1
                      3.1.1       set qos-group 2
                      3.2       class c2
                      3.2.1       set qos-group 3
                      4       system qos
                      4.1       service-policy type qos input p1
                      5       vlan 2-50
                      6       interface port-channel100
                      6.1       vpc peer-link
                      6.2       switchport mode trunk
                      7       interface port-channel10
                      7.1       vpc 1
                      7.2       switchport mode trunk
                      7.3       switchport trunk allowed vlan 1, 10-50
                      
                       
                       
                      Step 6 Verify the commands in the switch profile.

                      Example:
                      switch(config-sync-sp-if)# verify
                      Verification Successful
                      
                       
                       
                      Step 7 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-profile sp
                        sync-peers destination 10.1.1.1
                        class-map type qos match-all c1
                          match cos 2
                        class-map type qos match-all c2
                          match cos 5
                        policy-map type qos p1
                          class c1
                            set qos-group 2
                          class c2
                            set qos-group 3
                        system qos
                          service-policy type qos input p1
                        vlan 2-50
                       
                        interface port-channel10
                          switchport mode trunk
                          vpc 1
                          switchport trunk allowed vlan 1,10-50
                       
                        interface port-channel100
                          switchport mode trunk
                          vpc peer-link
                      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)# 
                      

                      Importing Configurations

                      The following example shows how to import an interface configuration:

                      switch# show running-config interface ethernet1/3
                      
                      !Command: show running-config interface Ethernet1/3
                      !Time: Wed Aug 11 18:12:44 2010
                      
                      version 5.0(2)N1(1)
                      
                      interface Ethernet1/3
                        switchport mode trunk
                        switchport trunk allowed vlan 1-100
                      
                      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)# import interface Ethernet1/3
                      switch(config-sync-sp-import)# show switch-profile sp buffer
                      ----------------------------------------------------------
                      Seq-no  Command
                      ----------------------------------------------------------
                      1       interface Ethernet1/3
                      1.1       switchport mode trunk
                      1.2       switchport trunk allowed vlan 1-100
                      
                      switch(config-sync-sp-import)# verify
                      Verification Successful
                      switch(config-sync-sp-import)# commit
                      Commit Successful
                      switch(config-sync)# 
                      

                      The following example shows how to import the supported commands in a running configuration:

                      switch(config-sync)# switch-profile sp
                      Switch-Profile started, Profile ID is 1
                      switch(config-sync-sp)# import running-config 
                      switch(config-sync-sp-import)# show switch-profile sp buffer
                      ----------------------------------------------------------
                      Seq-no  Command
                      ----------------------------------------------------------
                      1       logging event link-status default
                      2       vlan 1
                      3       port-profile type ethernet pp1
                      3.1       bandwidth 5000
                      3.2       bandwidth inherit
                      3.3       speed 10000
                      3.4       state enabled
                      4       interface port-channel3
                      4.1       switchport mode trunk
                      4.2       vpc peer-link
                      4.3       spanning-tree port type network
                      5       interface port-channel30
                      5.1       switchport mode trunk
                      5.2       vpc 30
                      5.3       switchport trunk allowed vlan 2-10
                      6       interface port-channel31
                      6.1       switchport mode trunk
                      6.2       vpc 31
                      6.3       switchport trunk allowed vlan 11-20
                      7       interface port-channel101
                      7.1       switchport mode fex-fabric
                      7.2       fex associate 101
                      8       interface port-channel102
                      8.1       switchport mode fex-fabric
                      8.2       vpc 102
                      8.3       fex associate 102
                      9       interface port-channel103
                      9.1       switchport mode fex-fabric
                      9.2       vpc 103
                      9.3       fex associate 103
                      10      interface Ethernet1/1
                      11      interface Ethernet1/2
                      12      interface Ethernet1/3
                      13      interface Ethernet1/4
                      13.1      switchport mode trunk
                      13.2      channel-group 3
                      14      interface Ethernet1/5
                      14.1      switchport mode trunk
                      14.2      channel-group 3
                      15      interface Ethernet1/6
                      15.1      switchport mode trunk
                      15.2      channel-group 3
                      16      interface Ethernet1/7
                      16.1      switchport mode trunk
                      16.2      channel-group 3
                      17      interface Ethernet1/8
                      18      interface Ethernet1/9
                      18.1      switchport mode trunk
                      18.2      switchport trunk allowed vlan 11-20
                      18.3      channel-group 31 mode active
                      19      interface Ethernet1/10
                      19.1      switchport mode trunk
                      19.2      switchport trunk allowed vlan 11-20
                      19.3      channel-group 31 mode active
                      20      interface Ethernet1/11
                      21      interface Ethernet1/12
                      ...
                      45      interface Ethernet2/4
                      45.1      fex associate 101
                      45.2      switchport mode fex-fabric
                      45.3      channel-group 101
                      46      interface Ethernet2/5
                      46.1      fex associate 101
                      46.2      switchport mode fex-fabric
                      46.3      channel-group 101
                      47      interface Ethernet2/6
                      47.1      fex associate 101
                      47.2      switchport mode fex-fabric
                      47.3      channel-group 101
                      48      interface Ethernet2/7
                      48.1      fex associate 101
                      48.2      switchport mode fex-fabric
                      48.3      channel-group 101
                      49      interface Ethernet2/8
                      49.1      fex associate 101
                      ...
                      89      interface Ethernet100/1/32
                      90      interface Ethernet100/1/33
                      91      interface Ethernet100/1/34
                      92      interface Ethernet100/1/35
                      93      interface Ethernet100/1/36
                      ...
                      105     interface Ethernet100/1/48
                      switch(config-sync-sp-import)# 
                      

                      The following example shows how to import selected supported commands. First, show the port profile running configuration to identify the configuration that you are going to import:

                      switch# show running-config port-profile 
                      
                      !Command: show running-config port-profile
                      !Time: Thu Aug 12 12:09:11 2010
                      
                      version 5.0(2)N1(1)
                      port-profile type ethernet pp1
                        bandwidth 5000
                        bandwidth inherit
                        speed 10000
                        state enabled
                      
                      switch# 
                      
                      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)# import
                      switch(config-sync-sp-import)# port-profile type ethernet pp1
                      switch(config-sync-sp-import-if)# bandwidth 5000
                      switch(config-sync-sp-import-if)# bandwidth inherit
                      switch(config-sync-sp-import-if)# speed 10000
                      switch(config-sync-sp-import-if)# state enabled
                      switch(config-sync-sp-import-if)# show switch-profile sp buffer
                      ----------------------------------------------------------
                      Seq-no  Command
                      ----------------------------------------------------------
                      1       port-profile type ethernet pp1
                      1.1       bandwidth 5000
                      1.2       bandwidth inherit
                      1.3       speed 10000
                      1.4       state enabled
                      
                      switch(config-sync-sp-import-if)# verify
                      Verification Successful
                      switch(config-sync-sp-import)# commit
                      Commit Successful
                      switch(config-sync)# show running-config switch-profile 
                      switch-profile sp
                        sync-peers destination 10.193.194.52
                        port-profile type ethernet pp1
                          bandwidth 5000
                          bandwidth inherit
                          speed 10000
                          state enabled
                      switch(config-sync)#