I am trying to streamline SNMP configs on my Wireless and switched setup. As there are many different settings in the devices, i would think that it is a good idea to start from the same point - i.e. scratch - and then input the commands as I want them to be.
Only issue is that, When I issue "no snmp-server" and hit enter all SNMP cfg are gone, but as soon as I type in just one , any given snmp- server command - no matter what - ALL THE OLD CFG IS BACK in running- config!
Any way other ways to scratch the SNMP cfg and start over ?
My AP are C1242 and 1231, but same behavoir gomes for a C2960 switch I run 12.2.52 IOS on the switch and 12.3.8 on the AP's
Thx for your reply That is correct, that a "no snmp-server" wr mem, reload do the trick, but that is really not an option, as I will have to do this on several hundres of AP's Also "no-ing" each line is not an option as I can not tell what lines are in the device. I will not be doing this by hand, but via a central configuration system / NMS. So I need to define a template that then will be deployed.
Meanwhile, at the comp.dcom.sys.cisco Job Justification Hearings, MBilgrav chose the tried and tested strategy of:
Why is no-ing a line that isn't there a problem? It will generate an error message, but it's not fatal.
I use RANCID to monitor Cisco configs. RANCID has a variety of backends for different kit, eg for Cisco it's 'clogin'. RANCID has a config file called router.db that defines each bit of kit to be monitored, with a field for IP address, device type and whether it's down or up, each separated with ':', for example:
So bulk config changes go something like this, as the RANCID user:
$ for i in `cat router.db | grep up$ | awk -F: '{ print $1 }'`; do clogin $i; done;
This would log into 1.2.3.4, edge-r-1 and 10.11.12.13 in order. I would then have a snippet of config on the clipboard ready and waiting, something like
conf t snmp-server contact Support Team - 01234 567 890 end copy run start logo
and as soon as I see the enable prompt it gets pasted in. Takes about 20 seconds per router, and far less tedious and error prone than doing it manually.
The pasting aspect can be eliminated and the process automated entirely by putting the snippet of config into a file called, say, config.txt, and replacing
do clogin $i;
with
do clogin -x config.txt $i;
The reason I don't is that a) I'm only usually doing this on tens of routers at a time, not 500, and b) I'm a pussy and don't want to destroy loads of routers at once. With something simple like SNMP config changes the risk should be minimal to non-existent.
Cabling-Design.com Forums website is not affiliated with any of the manufacturers or service providers discussed here.
All logos and trade names are the property of their respective owners.