Maps the context name in an SNMPv3 packet protocol data unit (PDU) to the name of a VPN routing and forwarding (VRF) instance.
None
Global configuration mode
Use the no form of the command to delete the SNMP server context.
For SNMPv1 and SNMPv2, you must map the context with the community string. The SNMP agent supports 256 contexts to support context-to-VRF mapping.
For SNMPv3, you only need to map the context with the VRF. The SNMPv3 request PDU itself provisions for the context. Only one context is allowed for each VRF instance.
Important
SNMP SET requests work only on the default VRF.The following example configures an SNMP server context to a VRF for SNMPv1 or SNMPv2.
device# configure terminal device(config)# snmp-server community public groupname admin device(config)# snmp-server context mycontext vrf myvrf device(config)# snmp-server mib community-map public context mycontext
The following example configures an SNMP server context to a VRF for SNMPv3.
device# configure terminal device(config)# snmp-server context mycontext1 vrf myvrf1