cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
532
Views
0
Helpful
2
Replies

change password of cisco switches from VTP server

Almas Saiyed
Level 1
Level 1

Hi All,

Is it possible to change vty and enable password of Cisco l2 switches which are members of VTP domain? we have 90 l2 switches I want to change password of vty and enable password all switches from VTP server. or is there any other method that I can change password of all switches?

Thanks,

A S

2 Replies 2

cadet alain
VIP Alumni
VIP Alumni

Hi,


line passwords and enable password have no relationship with VTP, all VTP does is replicate VLAN infos between switches in the same VTP domain.

Regards.

Alain.

Don't forget to rate helpful posts.

Hi,

VTP is a vlan management domain, it means you can create and delete vlans in VTP server and that will propegate to all client switches. But it is not possible to change line passwords or enable password with VTP as said they have no relationship with VTP.

Ok, to change password of all switches here is a part of a bat I used for such a purpose:


set ip=172.25.0.71

ping -n 2 172.25.0.11
snmpset -v3 -u userv3 -lauthNoPriv -A XXXX_SNMP! -a md5 -r 0 172.25.0.11 .1.3.6.1.4.1.9.2.1.50.%ip% s addconf.txt
snmpset -v3 -u userv3 -lauthNoPriv -A XXXX_SNMP! -a md5 -r 0 172.25.0.11 .1.3.6.1.4.1.9.2.1.54.0 i 1


Now, usage instructions:


You have to run on your laptop or PC as TFTP server that can be accessed by all switches, and you have to create a txt file that contains the above commands you want to issue (in my case it's called addconf.txt).


The first line (set ip=...) sets the environmental variable ip, this is your laptop (TFTP) IP. Again, this address has to be accessible by all switches.
The ping, although hilarious enough, wakes up the switch. The ARP on Cisco switches is always kinda slow and causes the first packet to be missed, which will make this entire script to malfunction.

The snmpset command has been written for SNMPv3 as this is were the project's requirements, but it should be pretty easy to change the syntax for v2. userv3 is the user for configures for SNMP and XXXX stuff is the password. In case of v2 you will only use the rw community.
The IP following it the target switch's IP. addconf.txt I already told you about it.
The second snmpset command has the same ip in it and acts like the wr command.

You have to write this for every switch you have (make one big bat file), so it can be a hassle if you're only using it once. However, if you do use it periodically it will save you a lot of time.

For the snmp utilities I used "Net-SNMP" should be freely available somwhere on the web, and for TFTP used Klever Pumpkin (has a nice sound when something is uploaded or downloaded  ), freely available as well.


Hope this will help you.

Please rate the helpfull posts.
Regards,
Naidu.

Review Cisco Networking for a $25 gift card