|
#1
|
|||
|
|||
![]()
Hello,
The main reason I am using SecureCRT is because I need to change the hostname (and interface descriptions) for over more than 5000+ Cisco routers/switches in a practical and "fast" way. It seems that the best method for completing this task is using the VanDyke's example script "RunCommandsOnMultipleHostsAndLogResults.vbs" which allows to connect to a list of IP Addresses (or hostnames) and run a list of commands. However this list of commands (in my case) must be unique for each IP address, due the configuration of different hostnames. That is, executing a unique set of commands suck as #hostname HOSTA, for IP_1; then #hostname HOSTB, for IP_2 and so on... If you have any suggestion for this requirement, I will be more than grateful. Many thanks in advance, Ruben D. Colmenares ruben.colmenares@wdna.com |
#2
|
|||
|
|||
Hi Ruben,
I think "fast" may be a subjective term in this case. ![]() If I understand correctly what you are saying, you are going to need 5000 separate ##commands_variable.txt files, correct? Have you done any of the setup so far? If so, is any part of the specific entry in the ##hosts.txt file used to identify the specific "commands filename"?
__________________
Thanks, --Brenda VanDyke Software Technical Support support@vandyke.com (505) 332-5730 |
#3
|
|||
|
|||
Hey Brenda!
Indeed, maybe "fast" was incorrectly used. What I meant, was to look a more efficient way through SecureCRT rather updating each NE's hostname manually. Answering your first question, Yes. I'd need a specific configuration file for each router/switch; considering that each hostname will be different. For the hosts.txt file, I'll have something like this: 14.191.214.6 14.191.214.5 Then, the commands to execute: enable config sysname NEW_HOSTNAME So as you can see there is no specification of the configuration command script in the hostname files. Thanks, |
#4
|
|||
|
|||
Hi Ruben,
Are you saying in the commands file, only that one command differs from host to host? Do you want to be prompted to provide NEW_HOSTNAME? If not, is there some sort of pattern so it can be automated? Can you list the explicit steps of how you would do this manually? If the list contains sensitive data, please send an email to support@vandyke.com and include "Attn Brenda - Forum Thread #12733" in the subject line.
__________________
Thanks, --Brenda VanDyke Software Technical Support support@vandyke.com (505) 332-5730 |
#5
|
|||
|
|||
That's correct Brenda. The only "field" that'll be different from one command configuration script from another is the "NEW_HOSTNAME" info.
The manual configuration it's very simple: Right after the NE is logged on: <CX-OpLab>system-view [CX-OpLab] [CX-OpLab]sysname TestsNamingConvention [TestNamingConvention] [TestNamingConvention] And for the interfaces description: [TestNamingConvention]inter [TestNamingConvention]interface GigabitEthernet6/0/13 [TestNamingConvention-GigabitEthernet6/0/13]description InterfaceNamingConvention Every NE to manipulate holds the same OS and syntaxis, so the command script can be used to all 5000+ NEs. However the HOSTNAME information must be different for each element. |
#6
|
|||
|
|||
Hi Ruben,
What is the "TestsNamingConvention" pattern you will be using? What is the "InterfaceNamingConvention" pattern will be using? Is this something that can be derived from the IP address? Do you already have a file that contains all 5000 IP addresses?
__________________
Thanks, --Brenda VanDyke Software Technical Support support@vandyke.com (505) 332-5730 |
![]() |
Tags |
batch , change , hostname , script |
Thread Tools | |
Display Modes | Rate This Thread |
|
|