Copy/Paste configs in terminal...
I am having issues when I copy/paste configs in my lab equipment (dropped commands, etc...)
I just spent 30 minutes trying to figure out why I couldn't ping between 2 routers to find out the frame relay commands were dropped when I pasted lol. Great for troubleshooting practice but that wasn't the goal
I am also wondering if there is a tool / script I could use to load all my initial configs at startup. Let's say I want to do an OSPF lab, I simply select the OSPF initial config and it would clear the routers & switches, reboot them, then send the proper configs. Any idea if there is such a beast out there?
Thanks!
Marc
I just spent 30 minutes trying to figure out why I couldn't ping between 2 routers to find out the frame relay commands were dropped when I pasted lol. Great for troubleshooting practice but that wasn't the goal
I am also wondering if there is a tool / script I could use to load all my initial configs at startup. Let's say I want to do an OSPF lab, I simply select the OSPF initial config and it would clear the routers & switches, reboot them, then send the proper configs. Any idea if there is such a beast out there?
Thanks!
Marc
Comments
-
JeanM Member Posts: 1,117I believe NNM can, I am sure there are more - HP Network Node Manager i Software Device Support Matrix
I know where I work it's used (among other tools), but it may be too expensive for LAB use unless they have a free/demo.2015 goals - ccna voice / vmware vcp. -
SUBnet192 Banned Posts: 63 ■■□□□□□□□□I believe NNM can, I am sure there are more - HP Network Node Manager i Software Device Support Matrix
I know where I work it's used (among other tools), but it may be too expensive for LAB use unless they have a free/demo.
Nah, not willing to invest into a very complex solution. There has to be a scripted way to do this I'll see if I can come up with a cool solution before I tackle the CCNP TSHOOT (should be taking the ROUTE exam next tuesday). -
NetworkVeteran Member Posts: 2,338 ■■■■■■■■□□The safest / easiest way to accurately get a set of commands onto a router is TFTP. You mention scripting, so I'll note it's possible for a script to read a config file, telnet to the router, and send those commands. I'd setup the TFTP server, personally.Let's say I want to do an OSPF lab, I simply select the OSPF initial config and it would clear the routers & switches, reboot them, then send the proper configs. Any idea if there is such a beast out there?
Most companies own a script that does something similar. It's a few hours of work for a basic version of the above for someone who knows an appropriate scripting language like TCL/Expect, Ruby, Perl, or Python. -
SUBnet192 Banned Posts: 63 ■■□□□□□□□□NetworkVeteran wrote: »The safest / easiest way to accurately get a set of commands onto a router is TFTP. You mention scripting, so I'll note it's possible for a script to read a config file, telnet to the router, and send those commands. I'd setup the TFTP server, personally.
Most companies own a script that does something similar. It's a few hours of work for a basic version of the above for someone who knows an appropriate scripting language like TCL/Expect, Ruby, Perl, or Python.
Not sure I follow you here...
In order to do TFTP, I would need a local TFTP server in the lab. Right now, I access my lab via a Digi CM32 (so telnet or SSH to a range of ports).
Also, using TFTP implies having to configure interfaces (ip address, file to xfer, etc...) before running the tftp command, thus again defeating the purpose of automating the whole thing. -
networker050184 Mod Posts: 11,962 ModAny kind of external script is going to need connectivity to the router obviously. What you can do is create the configs, store them on the router and just load it manually. Or you could have a script that logs into the term server and does it for you automatically, but that seems more trouble than its worth unless you are pretty good at that kind of stuff.An expert is a man who has made all the mistakes which can be made.
-
NetworkVeteran Member Posts: 2,338 ■■■■■■■■□□In order to do TFTP, I would need a local TFTP server in the lab.Right now, I access my lab via a Digi CM32 (so telnet or SSH to a range of ports).Also, using TFTP implies having to configure interfaces (ip address, file to xfer, etc...) before running the tftp command, thus again defeating the purpose of automating the whole thing.
-
SUBnet192 Banned Posts: 63 ■■□□□□□□□□NetworkVeteran wrote: »Check. A TFTP server is just any router, switch, or PC you've configured as such.
I don't know anything about a "Digi CM32". Your PC would need to be capable of pinging at least one device in your network. There are many ways to accomplish that (adding a NIC, for example), which shouldn't give a CCNA any trouble.
If you have a large configurtion file to copy over, changing the IP address and typing one copy command doesn't defeat the purpose. It's less work and less error prone. Alternatively, most staging labs dedicate one interface as the management interface, and either keep the IP address on it consistent or set it to use DHCP. That saves the "changing the IP address" step.
Digi CM32 is an access server. I have no problems adding equipment as required to the lab, nor configuring a TFTP server etc...
The goal is to automate 100% the reload of the lab. No manual steps other than selecting the basic topology I want to load.
Using DHCP would be an idea, however if the interfaces are down by default (router) then again, manual intervention.
Best suggestion so far, having the config file locally and copying them over the startup config and rebooting.
Keep the suggestions coming, if I do find a way to get this to work, I'll make the solution available to all
Marc -
pitviper Member Posts: 1,376 ■■■■■■■□□□You can do this easily... create template labs in GNS3 and fire up whichever topology you needCCNP:Collaboration, CCNP:R&S, CCNA:S, CCNA:V, CCNA, CCENT
-
SUBnet192 Banned Posts: 63 ■■□□□□□□□□You can do this easily... create template labs in GNS3 and fire up whichever topology you need
... Not quite what this conversation is about -
NetworkVeteran Member Posts: 2,338 ■■■■■■■■□□The goal is to automate 100% the reload of the lab. No manual steps other than selecting the basic topology I want to load.
If your goal is to 100% automate the reload of the lab, no manual steps other than selecting the basic topology you want to load, then you need someone who knows scripting. You can hire someone with automation skills for four hours or so, or learn scripting yourself. TCL/Expect is well-suited to this task and even supported on Cisco routers. I suggest the book, "TCL and the TK Toolkit". This particular wheel has been redesigned, with custom tweaks, by most corporations with vast amounts of networking gear. -
SUBnet192 Banned Posts: 63 ■■□□□□□□□□NetworkVeteran wrote: »Oh, I thought you were trying to solve the practical problem of goofing up configs when you copy and paste them to routers. If your goal is to 100% automate the reload of the lab, no manual steps other than selecting the basic topology you want to load, then you need someone who knows scripting. You can hire someone with automation skills for four hours or so, or learn scripting yourself. TCL/Expect is well-suited to this task and even supported on Cisco routers. I suggest the book, "TCL and the TK Toolkit". This particular wheel has been redesigned, with custom tweaks, by most corporations with vast amounts of networking gear.
Well, it started with the issue of copy/paste that's been bugging me for a while, as it was the only lab setup solution I had. If I can find a way to automate it as described, it would be great. I'm comfortable with scripting, I just don't know which method would be the best. The lab is isolated so an injection of the configs through ssh or telnet is about the only way I can think of, as having a local ressource in the lab implies changing the topology (to have the components connected to a management backbone so I can tftp configs to them etc...) -
NetworkVeteran Member Posts: 2,338 ■■■■■■■■□□Well, it started with the issue of copy/paste that's been bugging me for a while, as it was the only lab setup solution I had. If I can find a way to automate it as described, it would be great. I'm comfortable with scripting, I just don't know which method would be the best. The lab is isolated so an injection of the configs through ssh or telnet is about the only way I can think of, as having a local ressource in the lab implies changing the topology (to have the components connected to a management backbone so I can tftp configs to them etc...)
Auto Reloading your router with TCL « Routing-Bits
Check this out. It's not exactly what you need, but it's similar and may give you ideas. -
Forsaken_GA Member Posts: 4,024Unfortunately, the console can drop stuff, it doesn't have any error checking, so if a character gets garbled or the buffer gets overrun, yeah, you're kind of screwed. In a lab scenario, I do virtually all of my configuration from the console, but in the real world, I do as much configuration as possible using in-band management (ie, telnet, ssh) as possible for this exact reason, and maintain the connections to the terminal server as 'oops, I screwed up and cut myself off from the box' or to watch a reboot to make sure everything comes up properly. If I send the command over telnet, I'm reasonably sure it won't drop a character in transit.
-
Trifidw Member Posts: 281I always copy/paste my config from notepad but I always do a reasonably small amount at a time so I can see if any errors were thrown up. I also have a quick read through it before doing a write mem.
-
SUBnet192 Banned Posts: 63 ■■□□□□□□□□NetworkVeteran wrote: »Auto Reloading your router with TCL « Routing-Bits
Check this out. It's not exactly what you need, but it's similar and may give you ideas.
Cool stuff. Thanks for the link -
SUBnet192 Banned Posts: 63 ■■□□□□□□□□The configure replace command can be used to override the current the configuration.
In theory, I could use this to load a generic "startup" script (saved in local flash) that configures all the interfaces to be in the right state for a TFTP load of the config.
R1#configure replace flash:baseline-for-tftp.txt force
== sample content of baseline-for-tftp.txt
interface fa0/0
ip address 10.1.1.10 255.255.255.0
no shutdown
== end sample
R1#configure replace tftp://10.1.1.1/R1.txt force
On the TFTP server, I would have a menu setup (hta file?) that lists all the various configurations available (basic EIGRP, basic OSPF, etc...). Once the user selects the base settings he wants, they get copied to the TFTP root folder.
The hta file would then send a single command to the devices to run a TCL script that executes the above commands (in bold/italic).
Result: Very quick reload of a baseline config, no reboot
1 issue: I need to figure out how to adapt the topology to make the TFTP server reachable from all components. I mean if the R1 router's Fa0/0 interface is connected to SW1's Fa0/1 interface, I possibly won't be able to reach the TFTP server until SW1 is reloaded.
NOTE:
This idea is based on a tip I found on another site, to wipe the configuration clean without rebooting like so:
R1#write erase
Erasing the nvram filesystem will remove all configuration files! Continue? [confirm]
[OK]
Erase of nvram: complete
R1#
R1#configure replace nvram:startup-config force
Router#