DX NetOps

 View Only
  • 1.  Netscreen NCM script

    Posted Oct 12, 2016 03:27 PM

    We have a script in place to capture the configuration of a Juniper Netscreen Firewall however we have not had much luck going the other way.  That is we are unable to upload changes or utilize the "Repair" feature within an NCM alarm.  Does anyone have a script that works for upload to a Netscreen device via NCM?



  • 2.  Re: Netscreen NCM script

    Posted Oct 12, 2016 04:40 PM

    Skip.Taylor, we do not use Juniper, but I would suggest looking at the upload script CA provides for the Cisco NX OS device family. From there, you can create your own current script to fit your needs and use CA's as a template, or you can wait for someone to be kind and give you their script, if it's not prohibited by their company.

     

    I am no Perl expert, but the upload script is simple. It stores the uploaded content in a variable, connects to a device using SSH, verifies login using a regular expression to check for prompt characters, enters privilege mode as needed, enters config mode, then uploads the content.

     

    To create an upload script for unsupported H3C devices, I manually followed the script though each step to ensure the prompt characters were correct and to ensure we were entering the commands at the correct spot. There was a LOT of debugging that had to be done, as I wasn't too familiar with Perl. For debugging, I used this thread to turn on debugging. I also included extra text and error messages so that the output would show me exactly where the script failed. I sent 50+ pushes before I got it right, so test devices are necessary!

     

    We did have to discard some of the expect statements and extra verifications that the script makes. Unfortunately it was a lot of guess and check work, but it only took about two days to figure it out.

     

    BTW, I have an idea for improving the NCM script section and replacing it with a GUI. Please check this thread and upvote if you believe this would improve Spectrum Reach out if you have minor questions regarding the scripting.



  • 3.  Re: Netscreen NCM script

    Posted Oct 13, 2016 07:17 AM

    Thanks Karl,

    Currently my issue may be SSH.  Once I get SSH access to the device I'll be able to test and move forward.  Stay tuned.

    Thanks