snmp-server mib community-map

Maps an SNMP community string to an SNMP context.

Syntax

snmp-server mib community-map community-name context context-name
no snmp-server mib community-map community-name context context-name

Command Default

None

Parameters

community-name
Specifies an SNMP community name.
context context-name
Specifies an SNMP context.

Modes

Global configuration mode

Usage Guidelines

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.

Examples

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