cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
15994
Views
5
Helpful
4
Replies
Highlighted
Beginner

no snmp-server does not remove snmp configuration

I have run into a situation where typing:

Switch# (config): no snmp-server

does not =actually= remove all the snmp-server configuration.

We are trying to baseline/remove non-v3 SNMP configurations from our LAN. We had a script that started with "no snmp-server" then applied the new SMNP configuration. Unfortunately, while it looks like the snmp config is removed (show run | i snmp-server) with the above command, pasting the new configuration magically brings back parts of the old version 2 config.

What’s the deal?

Everyone's tags (3)
1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Cisco Employee

no snmp-server does not remove snmp configuration

No snmp-server is not a command intended to remove the snmp configuration. This command would stop the SNMP ENGINE process in IOS, responsible to process snmp in IOS. When SMP ENGINE stops any snmp related command would be disabled from configuration and if you run any snmp related show command you'll see it will show an error as :

%SNMP agent not enabled

As soon as you enter any snmp related command, it will enable the SNMP ENGINE process which will bring the snmp configuration back.

To remove any configuration, no format of that command should be used. Any user guide will say and recommend this. Using no snmp-server is not a recommended/supported way.

-Thanks Vinod **Rating Encourages contributors, and its really free. **

View solution in original post

4 REPLIES 4
Highlighted
Hall of Fame Guru

no snmp-server does not remove snmp configuration

When you enter "no snmp-server" it disables ALL snmp versions - 1, 2c and 3. Subsequently entering the configuration for any of them will re-enable them all.

If you want to disable access for an SNMP community (e.g. snmp v1 community RO and RW strings), set the community string for that community to the null string (do not enter a value for the community string).

This is noted in the IOS Configuration Guide (example for IOS 15.0(1) on the 3750 here).

Highlighted
Beginner

Sorry for the necro reply. 

Sorry for the necro reply.  There is a behavior that doesn't make sense.

no snmp-server or default snmp-server

wr mem

sh run | i snmp-server <<<<nothing shows up

sh start | i snmp-server <<<<nothing shows up

reboot

Post reboot add snmp-server enable traps

every prior line of snmp-server config returns including specific snmp-server hosts and community strings.

Where are these specific lines of configuration being recalled from?

Highlighted
Cisco Employee

no snmp-server does not remove snmp configuration

No snmp-server is not a command intended to remove the snmp configuration. This command would stop the SNMP ENGINE process in IOS, responsible to process snmp in IOS. When SMP ENGINE stops any snmp related command would be disabled from configuration and if you run any snmp related show command you'll see it will show an error as :

%SNMP agent not enabled

As soon as you enter any snmp related command, it will enable the SNMP ENGINE process which will bring the snmp configuration back.

To remove any configuration, no format of that command should be used. Any user guide will say and recommend this. Using no snmp-server is not a recommended/supported way.

-Thanks Vinod **Rating Encourages contributors, and its really free. **

View solution in original post

Highlighted
Beginner

no snmp-server does not remove snmp configuration

"no snmp-server" removed the snmp configurration from the running configuration. Where is the SNMP configuration really stored?

If you type no snmp-server, write, and reload the switch, how does it know the old SNMP configuration.

CreatePlease to create content
Content for Community-Ad