Configuring SNMP for Inband Access
You can configure SNMP for inband access using the following:
• Using SNMP v2 without context—You can use a community that is mapped to a context. In this case,
the SNMP client does not need to know about the context.
• Using SNMP v2 with context—The SNMP client needs to specify the context by specifying a community;
for example, <community>@<context>.
• Using SNMP v3—You can specify the context.
Procedure
PurposeCommand or Action
Enters global configuration mode.switch# configuration terminal
Step 1
Maps an SNMP context to the management
VRF or default VRF. Custom VRFs are not
switch(config)# snmp-server context
context-name vrf vrf-name
Step 2
supported. The names can be any alphanumeric
string up to 32 characters.
By default, SNMP sends the traps
using the management VRF. If you
do not want to use the management
VRF, you must use this command to
specify the desired VRF.
Note
Maps an SNMPv2c community to an SNMP
context and identifies the group to which the
switch(config)# snmp-server community
community-name group group-name
Step 3
community belongs. The names can be any
alphanumeric string up to 32 characters.
Maps an SNMPv2c community to an SNMP
context. The names can be any alphanumeric
string up to 32 characters.
switch(config)# snmp-server mib
community-map community-name context
context-name
Step 4
Example
The following SNMPv2 example shows how to map a community named snmpdefault to a context:
switch# config t
Enter configuration commands, one per line. End with CNTL/Z.
switch(config)# snmp-server context def vrf default
switch(config)# snmp-server community snmpdefault group network-admin
switch(config)# snmp-server mib community-map snmpdefault context def
switch(config)#
The following SNMPv2 example shows how to configure and inband access to the community comm
which is not mapped:
switch# config t
Enter configuration commands, one per line. End with CNTL/Z.
switch(config)# snmp-server context def vrf default
Cisco Nexus 3548 Switch NX-OS System Management Configuration Guide, Release 7.x
101
Configuring SNMP
Configuring SNMP for Inband Access