cancel
Showing results for 
Search instead for 
Did you mean: 

Converting standalone x670-G2-48x-4q to a stack. Best way to edit port number configuration?

Converting standalone x670-G2-48x-4q to a stack. Best way to edit port number configuration?

Ken_Applebaum
New Contributor II
We have 2 stand-alone, MLAG'ed x670-G2-48x-4q switches. I have purchased 2 more of the same model. We want to convert the stand alone switches to stacks, add a switch to each one, and mlag these stacks.

I realize that when we convert the stand-alone switch to a stack, the switch configuration needs to be manually edited to change the port numbering scheme from Port to Slot:Port.

The configuration file is 1800 lines long, with references to ports and port ranges throughout, so a simple search and replace won't work. Is there any tool, or automated way this can be done? Does anyone have any tips on how we can best accomplish this, and avoid missing port renames in the config?

Thanks,
Ken
10 REPLIES 10

Ken, There are so many commands it's hard to catch them all. Thanks for letting me know! I just updated the script to account for this configuration.

Thanks again,

Stephen

Stephen,
I realized that I ran the script on the primary.cfg that was in use before I upgraded to firmware version 16.1.3.6. So I booted the switch to the upgraded image, and then copied the primary.cfg to my PC, and ran the script again. Much better results.

However, any line starting with configure stpd s0 add vlan did not label the ports correctly, as in the example below:
configure stpd s0 add vlan v111-PH-1 ports 57 1:dot1d
configure stpd s0 add vlan v112-PH-2 ports 57 1:dot1d

configure stpd s0 add vlan v113-PH-3 ports 57 1:dot1d
configure stpd s0 add vlan v120-CASA ports 57 1:dot1d

Much less to manually change, but still over 300 lines in this section of the config.

Hi Stephen,
I installed Python 2.7 on my workstation, then ran the script against a .cfg file I uploaded from the switch. Some ports were renamed, and others were not. Below are some examples where the ports did not rename, or there is a space between the colon and port number:

Original line is: configure stpd s0 add vlan v11-FLL ports 57 dot1d
After running script: configure stpd s0 add vlan v11-FLL ports 57 1:dot1d

Original line is: configure vlan v53-OC3 add ports 3, 5-6, 49, 57 tagged
After running script: configure vlan v53-OC3 add ports 1:3,1: 5-6, 49, 57 tagged

Other lines renamed the ports OK:
configure vlan default delete ports all
configure vr VR-Default delete ports 1:1-64
configure vr VR-Default add ports 1:1-64
configure vlan default delete ports 1:1-64
configure ports 1:6 auto off speed 10000 duplex full
disable port 1:7

configure ports 1:7 auto off speed 10000 duplex full
disable port 1:8

I am not sure if I did something wrong or not. Any advice would be greatly appreciated.

Ken,

How did it work for you? I want to make sure we get all the feedback we can so we can improve the script.
GTM-P2G8KFN