Hi. I know that I can do the normal copy and paste, but I will like to know if there is command that will do that for you, like something like this [/code]SH run /notepad
show and more Command Output Keywords for Writing to a File
This feature enhances the show commands in the Cisco IOS CLI to allow large amounts of data output to be written directly to a file for later reference. This file can be saved on local or remote storage devices such as flash memory, a SanDisk, or an external memory device.
For each show command issued, a new file can be created, or the output can be appended to an existing file. Command output can optionally be displayed on-screen while being redirected to a file by using the tee keyword. Redirection is available using a pipe (|) character after any show command, combined with the redirect, append, or tee keywords.
These extensions can also be added to more commands.
enter filename (just copy and paste filename to save time)
bobs your uncle, now when i do this I always perform a reload to make sure nothing running in the running config is saved to startup. Just my preference but everyone each to their own.
DevOps Engineer and Security Champion. https://blog.pash.by - I am trying to find my writing style, so please bear with me.
If you are using PuTTy, etc, you can turn on logging and issue your sho run or sho start. The output will then be logged to whichever file you specified in your logging configuration on your telnet client.
I don't know if you've gotten an answer that you can use, but here's the simplest way that I know to explain it:
1. Open up HyperTerm or puTTy or whatever teminal emulation program you use.
2. Connect to the hardware that you want to copy.
I think you should be in privileged mode.
3. Type in
sh run
4. Highlight the resulting text, right-click and "copy"
5. Right-click on your monitor desktop and click "new" and "text document"
6. Open up the text document and right-click and "paste"
7. Rename the file and you're done.
Hope that helps.
Experience is a harsh teacher. She gives the test first, the lesson afterwards.
I know that I can copy and paste, but I would like to know something that can be faster than that. I have to copy the config of 300+ routers, 600+ switchs.
I know that I can copy and paste, but I would like to know something that can be faster than that. I have to copy the config of 300+ routers, 600+ switchs.
Then a script is a must.
Write a perl script that logs into your routers, show a sh run-config then pipes the output to a text file and closes the connection. You should probably learn the language so you know how to troubleshoot.
I know that I can copy and paste, but I would like to know something that can be faster than that. I have to copy the config of 300+ routers, 600+ switchs.
Then a script is a must.
Write a perl script that logs into your routers, show a sh run-config then pipes the output to a text file and closes the connection. You should probably learn the language so you know how to troubleshoot.
I would like to learn the basics. Where is a good place to start and a good book to read.
I know that I can copy and paste, but I would like to know something that can be faster than that. I have to copy the config of 300+ routers, 600+ switchs.
Then a script is a must.
Write a perl script that logs into your routers, show a sh run-config then pipes the output to a text file and closes the connection. You should probably learn the language so you know how to troubleshoot.
I would like to learn the basics. Where is a good place to start and a good book to read.
I know that I can copy and paste, but I would like to know something that can be faster than that. I have to copy the config of 300+ routers, 600+ switchs.
Then a script is a must.
Write a perl script that logs into your routers, show a sh run-config then pipes the output to a text file and closes the connection. You should probably learn the language so you know how to troubleshoot.
I would like to learn the basics. Where is a good place to start and a good book to read.
Sorry men, but I'm not asking how do I search for Pearl info, I am asking for the best. If I go to the bookstore, I know where to look for the pearl books, but how do I know which one is the best. The only way is to asking question.
I know that I can copy and paste, but I would like to know something that can be faster than that. I have to copy the config of 300+ routers, 600+ switchs.
Thanks for all the input. Right now, I'm reading Perl. Also, I have a question; Is Perl the language to go when you are working in a cisco environment.
Sorry, I know that this sounds harsh but your last question really suggests that the role of Perl is a little beyond your current understanding. There has been a lot of development with Perl for a whole range of different applications. If you were to search for "Perl Cisco" you'll find that there are quite a lot of matches specific to the use of Perl of configuring/managing Cisco switches/routers.
However - depending upon your application and the platforms available to you - can I suggest that you do yourself a really big favour by checking out Rancid (www.shrubbery.net/rancid). This fantastic package allows you go get your configurations and will store them in a database. As changes are made it will also allow you to track them ... making it possible to go back to the config 3 weeks ago when everything "worked". As an extension, it will also allow you to create "scripts" (lists of CLI commands) that can be run against "all core switches" or "all Joes's routers".
There's no point in reinventing the wheell if you don't need to and, for backups of Cisco configs, there really should be no need to!!!
Hey ixg123, I understand what you are saying. I'm looking for something like rancid, but I the same time I would like to understand perl. Everything that will help me to have a better knowledge is a plus to me.
No problem. A good understanding of Perl will allow you to do so much more than you can really imagine, it's an incredible language that has had substantial investment from a very wide user base. If this is the way that you want to go then the "best" approach would probably be to split your focus a little. Get a basic understanding of what Perl does, and how it works then search for the Cisco modules that do what you are looking for. Use the "documentation"/ or examples to install the modules and then get them working in your environment ... then look to customise what they do to meet exactly your needs - this will then force you back to the manuals with a purpose!
I'd still recommend taking a look if RANCID can't give you a better starting position though. It's already stable and is in use in a huge number of networks around the globe. Using your developing knowledge of Perl you would have the ability to take the information collected and process/format it into whatever form you choose.
Oh, if you're getting into programming "languages", you might also want to take a look at Ciscos implementation of TCL ... which will allow you to run scripts directly at the switch/router.
Comments
show and more Command Output Keywords for Writing to a File
This feature enhances the show commands in the Cisco IOS CLI to allow large amounts of data output to be written directly to a file for later reference. This file can be saved on local or remote storage devices such as flash memory, a SanDisk, or an external memory device.
For each show command issued, a new file can be created, or the output can be appended to an existing file. Command output can optionally be displayed on-screen while being redirected to a file by using the tee keyword. Redirection is available using a pipe (|) character after any show command, combined with the redirect, append, or tee keywords.
These extensions can also be added to more commands.
You may learn something!
enter ip of remote host
enter filename (just copy and paste filename to save time)
bobs your uncle, now when i do this I always perform a reload to make sure nothing running in the running config is saved to startup. Just my preference but everyone each to their own.
http://gomezd.com <
My Tshoot test Blog
http://twitter.com/ipnet255
1. Open up HyperTerm or puTTy or whatever teminal emulation program you use.
2. Connect to the hardware that you want to copy.
I think you should be in privileged mode.
3. Type in 4. Highlight the resulting text, right-click and "copy"
5. Right-click on your monitor desktop and click "new" and "text document"
6. Open up the text document and right-click and "paste"
7. Rename the file and you're done.
Hope that helps.
http://gomezd.com <
My Tshoot test Blog
http://twitter.com/ipnet255
Then a script is a must.
Write a perl script that logs into your routers, show a sh run-config then pipes the output to a text file and closes the connection. You should probably learn the language so you know how to troubleshoot.
You may learn something!
I would like to learn the basics. Where is a good place to start and a good book to read.
http://gomezd.com <
My Tshoot test Blog
http://twitter.com/ipnet255
Jeeze man, have you ever used the internet?
http://www.google.com/search?hl=en&q=PERL
http://www.perl.org
http://www.perl.com
http://www.cpan.org
Sorry men, but I'm not asking how do I search for Pearl info, I am asking for the best. If I go to the bookstore, I know where to look for the pearl books, but how do I know which one is the best. The only way is to asking question.
http://gomezd.com <
My Tshoot test Blog
http://twitter.com/ipnet255
Apply the O'Reilly rule.... If it's an O'Reilly book and it has a cute animal on the cover, it's got to be good.
Plus that's what I started with, and I never felt the need to look for Perl books by other publishers.
Learning Perl
Programming Perl
Intermediate Perl
Mastering Perl
Perl Best Practices
Perl Cookbook
Perl Pocket Reference
Perl Hacks
Page through Learning Perl and Programming Perl and see which you like better. I preferred the Camel over the Llama.
http://www.kiwisyslog.com/kiwi-cattools-overview/
http://www.solarwinds.com/products/cirrus/index.aspx
RK
http://gomezd.com <
My Tshoot test Blog
http://twitter.com/ipnet255
However - depending upon your application and the platforms available to you - can I suggest that you do yourself a really big favour by checking out Rancid (www.shrubbery.net/rancid). This fantastic package allows you go get your configurations and will store them in a database. As changes are made it will also allow you to track them ... making it possible to go back to the config 3 weeks ago when everything "worked". As an extension, it will also allow you to create "scripts" (lists of CLI commands) that can be run against "all core switches" or "all Joes's routers".
There's no point in reinventing the wheell if you don't need to and, for backups of Cisco configs, there really should be no need to!!!
Kind regards
http://gomezd.com <
My Tshoot test Blog
http://twitter.com/ipnet255
I'd still recommend taking a look if RANCID can't give you a better starting position though. It's already stable and is in use in a huge number of networks around the globe. Using your developing knowledge of Perl you would have the ability to take the information collected and process/format it into whatever form you choose.
Oh, if you're getting into programming "languages", you might also want to take a look at Ciscos implementation of TCL ... which will allow you to run scripts directly at the switch/router.
http://www.cisco.com/en/US/docs/ios/12_3t/12_3t2/feature/guide/gt_tcl.html