Maps an SNMP community string to an SNMP context.
None
Global configuration mode
Use the no form of this command to remove a community string and its associated context name.
Any incoming SNMPv1/v2c requests with the specified community name uses the context name specified by this command. The context name can be used in SNMP requests for "ipCidrRouteTable."One community can be mapped to only one context. However, a single context can be mapped to multiple communities.
Before mapping the community to context, a valid context should be configured by using the snmp-server context command and a valid community string should be configured by using the snmp-server community command.
The following example maps an SNMP community string to a context name.
device# configure terminal device(config)# snmp-server mib community-map public context mycontext
The following example removes an SNMP community string and its associated context name.
device(config)# no snmp-server mib community-map public context mycontext