Brocade Fibre Channel Networking Community

Expand all | Collapse all

Pasting Multiple Lines in CLI

  • 1.  Pasting Multiple Lines in CLI

    Posted 10-31-2019 11:04 AM
    Hello,

    I'm running 7.4.1d firmware and constantly making changes to zones and since I'm not using 8.2 code or higher I can't use PyFOS.

    That said, is it possible to past multiple lines of commands at once into the CLI? Is this recommended? Will it cause problems?



    ------------------------------
    Sr. Storage Admin
    ------------------------------


  • 2.  RE: Pasting Multiple Lines in CLI

    Posted 11-01-2019 02:50 AM
    @marshit   Copy & Paste is a quite commonly used practice when it comes to zoning or switch configuration, so  ​yes, it's possible and there are no issues with that.  However I'd recommend to paste the command in smaller blocks, so that you'd be able to monitor/check  the outcome of the commands in your CLI window. If you paste too many commands at once, you might miss some error messages and mess up things...

    ------------------------------
    Senior Systems Engineer
    Broadcom - Brocade Storage Networking
    ------------------------------



  • 3.  RE: Pasting Multiple Lines in CLI

    Posted 11-01-2019 08:07 AM
    Eric,

    I do not know if it is recommended to paste multiple lines of commands in the CLI, but I have done it without any problems. I am running FOS 8.2.1, but I think I was on 7.x when I first did it. We were migrating from Cisco switches, and I pasted entire fabrics at a time.

    When my VMware team adds blades to the farm, there can be hundreds of new zones required due to single-initiator single-target policy. It would take a long time to add them through the GUI, and I would not trust myself to make no mistakes, so I write a Perl script to generate all the zoning commands, make a text file from the output, check it very carefully, and then paste them in.

    -David


  • 4.  RE: Pasting Multiple Lines in CLI

    Posted 11-01-2019 09:33 AM
    Thanks for the feedback folks, much appreciated.

    ------------------------------
    Sr. Storage Admin
    ------------------------------



  • 5.  RE: Pasting Multiple Lines in CLI

    Posted 11-01-2019 12:35 PM
    I have had commands get dropped when pasting many commands. I never tried to figure out why, I just limited the number of commands to 32 and never had a problem. I was working from the east coast US talking to switches on the west coast so plenty of room for things to go wrong having nothing to do with FOS.

    To Thomas Scheld's point, it's probably a good idea to limit the number of commands anyway.

    ------------------------------
    Field Applications Engineer
    Broadcom
    ------------------------------



  • 6.  RE: Pasting Multiple Lines in CLI

    Posted 11-04-2019 10:01 AM
    I've also had lines missed when doing large pastes so always limit to a page at a time to track errors and avoid missing commands, I tend to use putty via a RDP session, not the most direct route so some buffer somewhere maybe tripping up. Has worked from 6.4 - 8.1 with this caveat. :)


  • 7.  RE: Pasting Multiple Lines in CLI

    Posted 11-05-2019 11:33 AM
    Hi Folks,

    The issue is with how quickly the device OS can handle the commands and the latency of your connection. Some commands on some device OS require longer to process when pasted than others.

    Putty doesn't have a way of changing this but you can use Rutty - https://sourceforge.net/projects/rutty/?source=typ_redirect that allows you to add line-delay or in Secure CRT I beleive it's called Transmit Delay..


  • 8.  RE: Pasting Multiple Lines in CLI

    Posted 11-07-2019 04:09 AM
    Hello,

    if you need to put a hundred of commands to CLI use STDIN of linux or mobaxterm.
    You may redirect STDIN from file

    ssh switchname < commands.txt

    ------------------------------
    If my answer fulfilled your question please mark the reply as "Make Best Answer"

    Kind Regards

    Marian
    ------------------------------