DanPJ

updated

15 years ago

D

DanPJ

2 Intern

•

309 Posts

0

2060

December 15th, 2011 12:00

Run a script in Cisco SAN-OS/NX-OS

Hello,

I need to create many device aliases. How can I run the instructions below in one batch file without copy-n-pasting chunks of a big file into my terminal?

Thanks.

copy run start

 

device-alias database

device-alias name vmaxXXX-fa8e0 pwwn XX:XX:XX:XX:XX:XX:XX:XX

...

...

...

device-alias commit

exit

config t

  • dynamox

    11 Legend

    •

    20419 Posts

    •

    87439 Points

    855

    0

    Posted December 15th, 2011 13:00

    i have not done it with device-aliases but i always do it with fcalias

    create a file that starts like this:

    config terminal

    device-alias name vmaxXXX-fa8e0 pwwn XX:XX:XX:XX:XX:XX:XX:XX

    device-alias name vmaxXXX-fa8e0 pwwn XX:XX:XX:XX:XX:XX:XX:XX

    device-alias name vmaxXXX-fa8e0 pwwn XX:XX:XX:XX:XX:XX:XX:XX

    device-alias name vmaxXXX-fa8e0 pwwn XX:XX:XX:XX:XX:XX:XX:XX

    blah blah

    device-alias commit

    then copy from tftp/scp into running config

  • DanPJ

    2 Intern

    •

    309 Posts

    853

    0

    Posted December 16th, 2011 10:00

    That works.  Thanks.

  • dynamox

    11 Legend

    •

    20419 Posts

    •

    87439 Points

    854

    0

    Posted September 23rd, 2014 12:00

    copy tftp://12.33.33.33/file.txt running-config

  • na75369

    20 Posts

    853

    0

    Posted September 23rd, 2014 12:00

    What command did u use to copy from tftp/scp into running config

  • dynamox

    11 Legend

    •

    20419 Posts

    •

    87439 Points

    853

    0

    Posted October 1st, 2014 20:00

    may the force of perl and regex be with you

  • na75369

    20 Posts

    853

    0

    Posted October 1st, 2014 20:00

    I want to collect sh fcs data from every switch into a file in one of our servers so that we can query to know if a wwn visible on fabric ......if yes then on which switch and on which port and its device alias if any. Any idea how to accomplish this?

  • na75369

    20 Posts

    853

    0

    Posted October 1st, 2014 22:00

    Maybe u too got influenced by Modi's speech at Central park