When you replace a Cisco top-of-rack (ToR) or spine switch in a rack, you must replace it with a Cisco switch that has the same identical specifications as the one you are replacing. The replacement ToR or spine switch must be the same model and have the same version of the Cisco switch operating system as the one it is replacing.

Before you begin

  • Verify your Cloud Foundation environment is operational. You can do this by verifying that the workload domains you have in the environment are running.

  • Verify that backups have been taken of the component configurations. If the backups have not been taken, take the backups as described in Back Up Component Configurations Using the SoS Tool.

  • Verify you have the following items:

    • The backup file of the to-be-replaced Cisco ToR or switch's configuration. In the set of backups taken by the SoS tool for the rack, this file is named ToR-or-spine-switch-IP-address-cisco-running-config.gz where ToR-or-spine-switch-IP-address is the switch's IP address, such as 192.168.0.20-cisco-running-config.gz for a ToR switch with IP address of 192.168.0.20. For the location of this file within the SoS tool's output, see Back Up Component Configurations Using the SoS Tool.

    • The credentials for the management switch of the rack which has the ToR or spine switch you are replacing. Steps in the replacement procedure require copying files to and from the management switch. For steps on how to look up this password, see Look Up Account Credentials Using the Lookup-Password Command.

    • A replacement Cisco switch of the same model as the Cisco switch you are replacing.

    • A diagram or photo of the to-be-replaced switch's wiring, so that you can refer to it after you have disconnected the switch. See the Cloud Foundation VIA User's Guide for the switch wiremaps.

  • Verify the replacement switch has the same version of the Cisco OS installed on it that is supported for use in this Cloud Foundation release. For the Cisco OS version that is supported in this release, see the Release Notes.

About this task

For a list of the Cisco switch models that are supported for use as a ToR or spine switch in this release, see VMware Cloud Foundation Compatibility Guide.

The goal of this procedure is to restore the previously taken backup configuration of the working state of the system on to the replacement ToR or spine switch.

Procedure

  1. Copy the to-be-replaced switch's backup configuration file to its rack's management switch's /var/tmp directory.

    scp ToR-or-spine-switch-IP-address-cisco-running-config.gz cumulus@192.168.100.1:/var/tmp

    As an example, when replacing the Cisco ToR switch with IP address 192.168.0.20, you copy the backup configuration file named 192.168.0.20-cisco-running-config.gz to the management switch in that ToR switch's rack.

  2. Disconnect the switch you are replacing and remove it from the rack.
  3. Install the replacement switch into the rack and wire it according to the same wiring connections the previous one had.

    Refer to the diagram or photo you took of the previous switch before removing it or to the wiring diagrams in the Cloud Foundation VIA User's Guide.

  4. Boot the newly installed switch.
  5. Exit out of the POAP (PowerOn Auto Provisioning) mode by following the instructions in the switch console screen.
  6. Following the prompts in the switch console screen, set a password for the "admin" user.
    Important:

    Make a note of the password you set. This step is required for all Cisco Nexus switches. Even though the admin password will be updated when the backup configuration is applied to this switch in a later step, you want to ensure you have a working password as you perform the steps prior to applying the backup configuration.

  7. Using the original switch's IP address, configure that same IP address with subnet mask /24 on the new switch on the interface named mgmt 0 and configure VRF (virtual routing and forwarding) to the mgmt 0 port.

    As an example, when replacing a ToR switch that has IP address 192.168.0.20, the example configuration is:

    switch# configure Terminal
    switch(config)# interface mgmt 0
    switch(config-if)# ip address 192.168.0.20/24
    switch(config-if)# vrf member management
    switch(config-if)# no shut
    switch(config-if)# end

    When replacing a spine switch that has IP address 192.168.0.31, the example configuration is:

    switch# configure Terminal
    switch(config)# interface mgmt 0
    switch(config-if)# ip address 192.168.0.31/24
    switch(config-if)# vrf member management
    switch(config-if)# no shut
    switch(config-if)# end
  8. Verify the newly installed switch can reach the management switch (at IP 192.168.100.1) by using the ping command.
    switch(config)# ping 192.168.100.1 vrf management
    PING 192.168.100.1 (192.168.100.1): 56 data bytes
    64 bytes from 192.168.100.1: icmp seq=0 ttl=63 time=1.574 ms
    ...
  9. Copy the previous switch's backup configuration file to the newly installed switch from the location on the rack's management switch where you copied it in step 1.

    As an example, when replacing the Cisco ToR switch that has the backup configuration file named 192.168.0.20-cisco-running-config.gz that was copied to the /var/tmp location on the rack's management switch at IP address 192.168.100.1:

    switch(config)# copy scp: bootflash: vrf management
    Enter source filename: /var/tmp/192.168.0.20-cisco-running-config.gz
    Enter hostname for the scp server: 192.168.100.1
    Enter username: cumulus
    cumulus@192.168.100.1's password:
    192.168.0.20-cisco-running-config.gz 100% 1891 1.9KB/s 00:00
    Copy complete, now saving to disk (please wait)...
  10. Use the dir bootflash: command to verify the backup configuration file was copied to the flash.
    switch(config)# dir bootflash:
  11. Decompress the copied backup configuration file.

    Using the example from the previous step:

    switch(config)# gunzip bootflash:///192.168.0.20-cisco-running-config.gz
    

    As a result of this step, the backup file is saved in bootflash: without the .gz extension.

  12. Install the backup configuration into the new switch's startup configuration:

    Using the example from the previous step:

    switch(config)# copy 192.168.0.20-cisco-running-config startup-configuration
    
  13. Copy the switch's startup configuration to its running configuration.

    Using the example from the previous step:

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

Results

The replacement switch is in place and has the backup configuration from the switch it replaced.

Note:

Restoring the configuration to the new switch also restores the admin password.

What to do next

Verify the new switch is operating correctly by seeing if all hosts and virtual machines are reachable from both ToR switches or both spine switches, depending on which type you replaced.