CCIE Lab - Telnet scripting .bat to hit all your lab devices
So I setup a 2509 as a terminal server with octal cable consoled into all my devices - 3750 sw, HQ router, PSTNWAN router, 3524 sw, BR1, BR2.
I have windows telnet service enabled (not enabled by default but available on windows 7), and I've created .bat files for each side to hit each device (to access each telnet line, you enter the IP of the terminal server but instead of port 23, a separate port is used for each device.) I'm using ports 2001 - 2008. Here is what my bat files look like:
title HQ
telnet 192.168.2.200 2002
Question: The problem I have is that the "Title" command (which changes the title of the cmd window) renames to "telnet 192.168.2.200" for all windows but I'd like it to name each window as the device connected.
This wont be that important once I load images and get each of these routers out of rommon and named with hostnames, but I'm wondering what you guys use in your telnet scripts. Also, I use putty, but I havent looked up how to use the command line instead. maybe that has more options
I have windows telnet service enabled (not enabled by default but available on windows 7), and I've created .bat files for each side to hit each device (to access each telnet line, you enter the IP of the terminal server but instead of port 23, a separate port is used for each device.) I'm using ports 2001 - 2008. Here is what my bat files look like:
title HQ
telnet 192.168.2.200 2002
Question: The problem I have is that the "Title" command (which changes the title of the cmd window) renames to "telnet 192.168.2.200" for all windows but I'd like it to name each window as the device connected.
This wont be that important once I load images and get each of these routers out of rommon and named with hostnames, but I'm wondering what you guys use in your telnet scripts. Also, I use putty, but I havent looked up how to use the command line instead. maybe that has more options
Comments
-
auos Member Posts: 186Hi,
No sure exactly but you can create multiple sessions for each device and given the window title (Window -> behaviour -> Window title), then using Putty command inside .bat file to load each device by using
d:\putty.exe -load "current device session name"
Hope this help you. -
instant000 Member Posts: 1,745To add on to what the prior poster said.
Look at the list of tips here, and especially tip#10.
10 Awesome PuTTY Tips and Tricks You Probably Didn’t Know
EDIT: One more thing I somehow forgot to mention earlier: you really shouldn't be using telnet. :P
Hope this helps.Currently Working: CCIE R&S
LinkedIn: http://www.linkedin.com/in/lewislampkin (Please connect: Just say you're from TechExams.Net!) -
rchase Member Posts: 126Thanks guys and awesome site Instant
I looked up "tabbed putty" and found
Downloads - TTY Plus
This is the best solution because I create the sessions in putty with Titles like auos said, but then instead of having 6 different .bat scripts I have to click on to open sessions to all the devices, I just open the tabbed putty program and then I can click once to connect to each device and click between the tabs instead of trying to find windows!
Another problem solved on TE lol