ExtremeSwitching (Other)

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

    Posted 05-18-2016 11:34
    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


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

    Posted 05-18-2016 11:38
    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


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



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

    Posted 05-18-2016 11:40
    Thank you both. I will check it out!


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

    Posted 05-18-2016 11:40
    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.


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

    Posted 05-18-2016 11:40
    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.



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

    Posted 05-18-2016 11:40
    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.


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

    Posted 05-18-2016 11:40
    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



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

    Posted 05-18-2016 11:40
    WOW! Thanks Stephen. I will download the script, and give it another shot.


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

    Posted 05-18-2016 11:40
    Great. Let me know how it works. Making these config changes can be very time consuming, so we need this script to work.


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

    Posted 05-18-2016 11:59
    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... 😉