Q: Are there any simple tools and methods? Run the script automatically on N or so cisco switches according to the script, and then return the result?
Method 1: Download and modify the vswitch configuration file and upload it to N vswitches. Restart or copy start run.
Method 2: Create a bat file under windows. The content in the file is the same as the command you used to telnet to the vswitch for modification, except that the IP address needs to be N times, which is troublesome. Then run the bat file.
Method 3: Use ciscoworks 2000 for configuration once. This method has certain restrictions, such as configuring SNMP in each switch first. If it is a newly enabled switch, or SNMP is not configured), if the password of each switch is different, you still cannot configure it.
Method 4: Use Perl to write a small script, although it takes one or two days for beginners. But it is definitely worth it.
#! /Usr/bin/perl
Use strict;
Use Net: Telnet: Cisco;
My $ infile = "input.txt"; # Cisco Device List
My $ username = "user"; # login username
My $ passwd = "password"; # login password
Open (INFILE, "$ infile") | die "Can't open $ infile $! ";
While (my $ ip = <INFILE> ){
Chomp $ ip;
My $ t = Net: Telnet: Cisco-> new (Timeout => 10, Input_log => "input. log ");
$ T-> open ($ ip );
$ T-> login ($ username, $ passwd );
$ T-> enable ($ passwd );
$ T-> cmd ('TERM length 0 ');
$ T-> cmd ('sh ver '); # you can change the command sh ver to your command
$ T-> close;
}
Close INFILE;