Published On: August 6ᵗʰ, 2019 02:08

Cisco Enterprise Network Function Virtualization Infrastructure Software Configuration Guide, Release 3.6.1

Introduction about SNMP

Simple Network Management Protocol (SNMP) is an application-layer protocol that provides a message format for communication between SNMP managers and agents. SNMP provides a standardized framework and a common language used for the monitoring and management of devices in a network.

The SNMP framework has three parts:

  • SNMP manager - The SNMP manager is used to control and monitor the activities of network hosts using SNMP.

  • SNMP agent - The SNMP agent is the software component within the managed device that maintains the data for the device and reports these data, as needed, to managing systems.

  • MIB - The Management Information Base (MIB) is a virtual information storage area for network management information, which consists of collections of managed objects.

A manager can send the agent requests to get and set MIB values. The agent can respond to these requests. Independent of this interaction, the agent can send unsolicited notifications (traps or informs) to the manager to notify the manager of network conditions.

SNMP Operations

SNMP applications perform the following operations to retrieve data, modify SNMP object variables, and send notifications:
  • SNMP Get - The SNMP GET operation is performed by a Network Management Server (NMS) to retrieve SNMP object variables.

  • SNMP Set - The SNMP SET operation is performed by a Network Management Server (NMS) to modify the value of an object variable.

  • SNMP Notifications - A key feature of SNMP is its capability to generate unsolicited notifications from an SNMP agent.

SNMP Get

The SNMP GET operation is performed by a Network Management Server (NMS) to retrieve SNMP object variables. There are three types of GET operations:

  • GET--Retrieves the exact object instance from the SNMP agent.

  • GETNEXT--Retrieves the next object variable, which is a lexicographical successor to the specified variable.

  • GETBULK--Retrieves a large amount of object variable data, without the need for repeated GETNEXT operations.

The command for SNMP GET is :

snmpget -v2c -c [community-name] [NFVIS-box-ip] [tag-name, example ifSpeed].[index value]

SNMP Walk

SNMP walk is an SNMP application that uses SNMP GETNEXT requests to query a network entity for a tree of information.

An object identifier (OID) may be given on the command line. This OID specifies which portion of the object identifier space will be searched using GETNEXT requests. All variables in the subtree below the given OID are queried and their values presented to the user.

The command for SNMP walk is:

snmpwalk -v2c -c [community-name] [nfvis-box-ip]


snmpwalk -v2c -c myUser 172.19.147.115 1.3.6.1.2.1.1

SNMPv2-MIB::sysDescr.0 = STRING: Cisco NFVIS 

SNMPv2-MIB::sysObjectID.0 = OID: SNMPv2-SMI::enterprises.9.12.3.1.3.1291

DISMAN-EVENT-MIB::sysUpTimeInstance = Timeticks: (43545580) 5 days, 0:57:35.80

SNMPv2-MIB::sysContact.0 = STRING: 

SNMPv2-MIB::sysName.0 = STRING: 

SNMPv2-MIB::sysLocation.0 = STRING: 

SNMPv2-MIB::sysServices.0 = INTEGER: 70

SNMPv2-MIB::sysORLastChange.0 = Timeticks: (0) 0:00:00.00

SNMP Notifications

A key feature of SNMP is the ability to generate notifications from an SNMP agent. These notifications do not require that requests be sent from the SNMP manager. Unsolicited (asynchronous) notifications can be generated as traps or inform requests. Traps are messages alerting the SNMP manager to a condition on the network. Inform requests (informs) are traps that include a request for confirmation of receipt from the SNMP manager. Notifications can indicate improper user authentication, restarts, the closing of a connection, loss of connection to a neighbor router, or other significant events.

SNMP Versions

Cisco enterprise NFVIS supports the following versions of SNMP:

  • SNMP v1—The Simple Network Management Protocol: A Full Internet Standard, defined in RFC 1157. (RFC 1157 replaces the earlier versions that were published as RFC 1067 and RFC 1098.) Security is based on community strings.

  • SNMP v2c—The community-string based Administrative Framework for SNMPv2. SNMPv2c (the "c" stands for "community") is an Experimental Internet Protocol defined in RFC 1901, RFC 1905, and RFC 1906. SNMPv2c is an update of the protocol operations and data types of SNMPv2p (SNMPv2 Classic), and uses the community-based security model of SNMPv1.

Both SNMP v1 and SNMP v2c use a community-based form of security. The community of managers able to access the agent MIB is defined by an IP address Access Control List and password.

Authentication of the community with the user configuration is implemented even though SNMP v1 and v2 traditionally do not require a user configuration to be set. For both SNMP v1 and v2 on NFVIS, the user must be set with the same name and version as the corresponding community name. The user group must also match an existing group with the same SNMP version for snmpwalk commands to work.

Configuring SNMP Support

Though SNMP v1 and v2c is using community-based string, the following is still required:

  • Same community and user name.

  • Same SNMP version for user and group.

To configure SNMP Support:


configure terminal
snmp community public community-access readOnly

snmp group testgroup snmp 2 noAuthNoPriv read read-access write write-access notify notify-access

snmp user public user-group testgroup user-version 2

snmp host host2 host-ip-address 2.2.2.2 host-port 162 host-user-name public host-version 2 host-security-level noAuthNoPriv

snmp enable traps linkUp

Note

SNMP host configuration is supported for NFVIS 3.6.1 release. Host trap server configuration will be officially supported for NFVIS 3.7.1 release.


Verify the configuration for SNMP support

Use the show snmp agent command to verify the snmp agent description and ID.


nfvis# show snmp agent 

snmp agent sysDescr "Cisco NFVIS "
snmp agent sysOID 1.3.6.1.4.1.9.12.3.1.3.1291


Use the show snmp traps command to verify the state of snmp traps.


nfvis# show snmp traps

TRAP      TRAP      
NAME      STATE     
--------------------
linkDown  disabled  
linkUp    enabled


Use the show snmp stats command to verify the snmp stats.


nfvis# show snmp stats

snmp stats sysUpTime    57351917
snmp stats sysServices  70
snmp stats sysORLastChange 0
snmp stats snmpInPkts   104
snmp stats snmpInBadVersions 0
snmp stats snmpInBadCommunityNames 0
snmp stats snmpInBadCommunityUses 0
snmp stats snmpInASNParseErrs 0
snmp stats snmpSilentDrops 0
snmp stats snmpProxyDrops 0


Use the show running-config snmp command to verify the interface configuration for snmp.


nfvis# show running-config snmp

snmp agent enabled true
snmp agent engineID 00:00:00:09:11:22:33:44:55:66:77:88
snmp enable traps linkUp
snmp community pub_comm
community-access readOnly
!
snmp community tachen
community-access readOnly
!
snmp group tachen snmp 2 noAuthNoPriv
read   test
write  test
notify test
!
snmp group testgroup snmp 2 noAuthNoPriv
read   read-access
write  write-access
notify notify-access
!
snmp user public
user-version  2
user-group    2
auth-protocol md5
priv-protocol des
!
snmp user tachen
user-version 2
user-group   tachen
!
snmp host host2
host-port           162
host-ip-address     2.2.2.2
host-version        2
host-security-level noAuthNoPriv
host-user-name      public
!

SNMP Support APIs and Commands

APIs

Commands

  • /api/config/snmp/agent

  • /api/config/snmp/communities

  • /api/config/snmp/enable/traps

  • /api/config/snmp/hosts

  • /api/config/snmp/user

  • /api/config/snmp/groups

  • agent

  • community

  • trap-type

  • host

  • user

  • group