Configuring SNMP
Procedure
Step 1
Step 2
Step 3
Step 4
The following SNMPv2 example shows how to map a community named snmpdefault to a context:
switch# config t
Enter configuration commands, one per line.
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.
switch(config)# snmp-server context def vrf default
switch(config)# snmp-server community comm group network-admin
switch(config)#
The following SNMPv3 example shows how to use a v3 username and password:
switch# config t
Enter configuration commands, one per line.
switch(config)# snmp-server context def vrf default
switch(config)#
Enabling SNMP Notifications
You can enable or disable notifications. If you do not specify a notification name, Cisco NX-OS enables all
notifications.
The snmp-server enable traps CLI command enables both traps and informs, depending on the configured
Note
notification host receivers.
The following table lists the CLI commands that enable the notifications for Cisco NX-OS MIBs.
OL-31641-01
Command or Action
switch# configuration terminal
switch(config)# snmp-server context
context-name vrf vrf-name
switch(config)# snmp-server
community community-name group
group-name
switch(config)# snmp-server mib
community-map community-name
context context-name
Cisco Nexus 5600 Series NX-OS System Management Configuration Guide, Release 7.x
Enabling SNMP Notifications
Purpose
Enters global configuration mode.
Maps an SNMP context to the management VRF or
default VRF. Custom VRFs are not supported. The
names can be any alphanumeric string up to 32
characters.
Maps an SNMPv2c community to an SNMP context
and identifies the group to which the 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.
End with CNTL/Z.
End with CNTL/Z.
End with CNTL/Z.
161