Skip to main content

Renaming a Cisco IP switch

You might need to rename a Cisco IP switch to provide consistent naming throughout your configuration.

About this task

In the examples in this task, the switch name is changed from myswitch to IP_switch_A_1.

  1. Enter global configuration mode: configure terminal

    Example

    The following example shows the configuration mode prompt. Both prompts show the switch name of myswitch.
    myswitch# configure terminal
    myswitch(config)#
  2. Rename the switch: switchname new-switch-name

    If you are renaming both switches in the fabric, use the same command on each switch.

    Example

    The CLI prompt changes to reflect the new name:
    myswitch(config)# switchname IP_switch_A_1
    IP_switch_A_1(config)#
  3. Exit configuration mode: exit

    Example

    The top-level switch prompt is displayed:
    IP_switch_A_1(config)# exit
    IP_switch_A_1#
  4. Copy the current running configuration to the startup configuration file: copy running-config startup-config
  5. Verify that the switch name change is visible from the ONTAP cluster prompt.

    Note that the new switch name is shown, and the old switch name (myswitch) does not appear.
    1. Enter advanced privilege mode, pressing y when prompted: set -privilege advanced
    2. Display the attached devices: network device-discovery show
    3. Return to admin privilege mode: set -privilege admin

    Example

    The following example shows that the switch appears with the new name, IP_switch_A_1:
    cluster_A::storage show> set advanced 

    Warning: These advanced commands are potentially dangerous; use them only when directed to do so by Lenovo personnel.
    Do you want to continue? {y|n}: y

    cluster_A::storage show*> network device-discovery show
    Node/ Local Discovered
    Protocol Port Device Interface Platform
    ----------- ------ ------------------------- ---------------- ----------------
    node_A_2/cdp
    e0M LF01-410J53.mycompany.com(SAL18516DZY)
    Ethernet125/1/28 N9K-C9372PX
    e1a IP_switch_A_1(FOC21211RBU)
    Ethernet1/2 N3K-C3232C
    e1b IP_switch_A_1(FOC21211RBU)
    Ethernet1/10 N3K-C3232C
    .
    .
    . Ethernet1/18 N9K-C9372PX
    node_A_1/cdp
    e0M LF01-410J53.mycompany.com(SAL18516DZY)
    Ethernet125/1/26 N9K-C9372PX
    e0a IP_switch_A_2(FOC21211RB5)
    Ethernet1/1 N3K-C3232C
    e0b IP_switch_A_2(FOC21211RB5)
    Ethernet1/9 N3K-C3232C
    e1a IP_switch_A_1(FOC21211RBU)
    .
    .
    .
    16 entries were displayed.