Header Only - DO NOT REMOVE - Extreme Networks

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


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

Userlevel 6
Maybe this one works for you ?
https://github.com/extremenetworks/ExtremeScripting/tree/master/EXOS/Python/non_stacking_config_conv...
Userlevel 7
Hi Ken,
Take a look at this Python script on The Hub. You can even run it on the switch if you're running 16.1.
https://github.com/extremenetworks/ExtremeScripting/tree/master/EXOS/Python/non_stacking_config_conv...

-Drew
Userlevel 6
Drew C. wrote:

Hi Ken,
Take a look at this Python script on The Hub. You can even run it on the switch if you're running 16.1.
https://github.com/extremenetworks/ExtremeScripting/tree/master/EXOS/Python/non_stacking_config_conv...

-Drew

Too late 😉
Thank you both. I will check it out!
Userlevel 6
Ken Applebaum wrote:

Thank you both. I will check it out!

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.
Ken Applebaum wrote:

Thank you both. I will check it out!

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 Applebaum wrote:

Thank you both. I will check it out!

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.
Userlevel 6
Ken Applebaum wrote:

Thank you both. I will check it out!

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
Ken Applebaum wrote:

Thank you both. I will check it out!

WOW! Thanks Stephen. I will download the script, and give it another shot.
Userlevel 6
Ken Applebaum wrote:

Thank you both. I will check it out!

Great. Let me know how it works. Making these config changes can be very time consuming, so we need this script to work.
Userlevel 7
Hi Ken,

you could take a look at https://github.com/extremenetworks/ExtremeScripting/tree/master/EXOS/Python/non_stacking_config_conv...

Br,
Erik

Edit: I was too slow... 😉
Hi Ken,

Unless I am missing something that the other folks in here caught, then you may not need to convert the configuration at all. Check out the GTAC Knowledge article: https://gtacknowledge.extremenetworks.com/articles/How_To/How-to-create-stack-with-Summit-X460-48p-a...

Can someone correct me if I missed something?
Looks like enabling stacking will remove the configuration. We definitely don't want to do that! Please disregard.

Reply