Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CATALYST Snmp set failure

Status
Not open for further replies.

sumncguy

IS-IT--Management
Joined
May 22, 2006
Messages
118
Location
US
#! /bin/ksh
#
while read ord typ hn ip
do
#Define the IP address of the TFTP server
snmpset -c xxxx $ip .1.3.6.1.4.1.9.5.1.5.1.0 s 146.170.71.103
#
touch /tftpboot/$ip.preconfigos
chmod 777 /tftpboot/$ip.preconfigos
#Define the TFTP filename
snmpset -c xxxx $ip .1.3.6.1.4.1.9.5.1.5.2.0 s $ip.preconfigos
#
#define the supervisor module, module "1"
snmpset -c xxxx $ip .1.3.6.1.4.1.9.5.1.5.3.0 i 1
#
#Copy running configuration from CatOS to TFTP server
snmpset -c xxxx $ip .1.3.6.1.4.1.9.5.1.5.4.0 i 3
#
#Copy config from TFTP server to CatOS
snmpset -c xxxx $ip .1.3.6.1.4.1.9.5.1.5.4.0 i 2
#
#Define the TFTP filename, "current-config" to the CatOS switch
snmpset -c xxxxx $ip .1.3.6.1.4.1.9.5.1.5.2.0 s changeos
#
done

I do not receive any errors, yet I do not see my changes on the switch. All are cat os switches but models vary.

Output is
/tftpboot> dochange.sh
SNMPv2-SMI::enterprises.9.5.1.5.1.0 = STRING: "10.17.71.10"
SNMPv2-SMI::enterprises.9.5.1.5.2.0 = STRING: "back.cfg"
SNMPv2-SMI::enterprises.9.5.1.5.3.0 = INTEGER: 1
SNMPv2-SMI::enterprises.9.5.1.5.2.0 = STRING: "sendchanges"


Any ideas ?
 
Hi,

Would you expect to see any changes on the switches ? It looks like you are trying to copy config files off to a tftp server....

Do you get the files are your tftp server ?


Nigel Bowden
 
Nope. Very strange.
It seemed that the cats werent answering in time so I added sleeps between sleep 30 and it still isnt working.

#! /bin/ksh
while read xray
do
# Copy the configuration file from the CatOS device to the TFTP server.
# Define the IP address of the TFTP server.
snmpset -c XX -r 5 -t 15 $xray .1.3.6.1.4.1.9.5.1.5.1.0 s 10.17.7.10

# Define the TFTP filename that you will use to copy the configuration.
snmpset -c XX -r 5 -t 15 $xray .1.3.6.1.4.1.9.5.1.5.2.0 s previous-config

# Define the supervisor module on the catalyst switch.
snmpset -c XX -r 5 -t 15 $xray .1.3.6.1.4.1.9.5.1.5.3.0 i 1

# Uploads the "write term all" configuration to the TFTP server.
snmpset -c XX -r 5 -t 15 $xray .1.3.6.1.4.1.9.5.1.5.4.0 i 3

# Check sets
snmpset -c XX -r 5 -t 15 $xray .1.3.6.1.4.1.9.5.1.5

# Copy the configuration file from the TFTP server to the CatOS device.
# Define the TFTP filename that you will use to copy the configuration.
snmpset -c XX -r 5 -t 15 $xray .1.3.6.1.4.1.9.5.1.5.2.0 s XXXn-config

# Downloads the configuration on the TFTP server to the CatOS switch.
snmpset -c XX -r 5 -t 15 $xray .1.3.6.1.4.1.9.5.1.5.4.0 i 2

# Check sets
snmpset -c XX -r 5 -t 15 $xray .1.3.6.1.4.1.9.5.1.5

# Copy the new configuration file from the CatOS device to the TFTP server.
# Define the TFTP filename that you will use to copy the configuration.
snmpset -c XX -r 5 -t 15 $xray .1.3.6.1.4.1.9.5.1.5.2.0 s current-config

# Uploads the "write term all" configuration to the TFTP server.
snmpset -c XX -r 5 -t 15 $xray .1.3.6.1.4.1.9.5.1.5.4.0 i 3
done
 

The answer is - Im not waiting long enough after the write for the cat to realize it has a change.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top