The snmp-agent command enables the SNMP agent function.
The undo snmp-agent command disables the SNMP agent function.
By default, the SNMP agent function is disabled.
Usage Scenario
Before configuring SNMP, you need to enable the SNMP agent function.
By executing the snmp-agent command with any parameter enables the SNMP agent function. For example, if you execute the snmp-agent community command, the community name gets created and also SNMP agent function is enabled.
Precautions
After the snmp-agent command is executed, both the IPv4 and IPv6 services are enabled for the SNMP agent. By default, the switch listens on the IP address 0.0.0.0, that is, all IP addresses. This default setting is a threat to data confidentiality. You are advised to run the snmp-agent protocol source-interface interface-type interface-number command to specify the source interface that receives and responds to SNMP requests from the NMS.