SNMP Plugin
TSC Update
December, 18 2014
www.opendaylight.org
History
Posted SNMP Plugin project on 12/4/2014
Needed by Device Identification and Driver Management (DIDM)
project to fetch identification information from a device using
SNMP
Proposed a very simple SNMP Plugin using open source SNMP
library (eg, snmp4j)
Concerns were raised stating the SNMP Plugin should be an “MDSAL plugin” representing MIBs as YANG models and using MDSAL access mechanism
Cisco has developed a lot of the code for an MD-SAL SNMP
Plugin
This project is to continue and complete the work started by Cisco
www.opendaylight.org
2
Motivation
Applications need the ability to interact with a device
using SNMP
Use Cases:
Device type identification
Determine capabilities not available via OF protocol
VLAN configuration
VxLAN configuration
Etc…..
www.opendaylight.org
3
Goals
Allow ODL Applications (plugins) access to SNMP
stack
Use Yang Models to represent SNMP MIBs
Provides a consists, well defined, method for
interacting with devices using SNMP (REST API,
RPCs, DB Storage)
Use MD-SAL architecture
www.opendaylight.org
4
Architecture
Maven
OID Plugin
Opendaylight
SNMP
Plugin
SNMP4J
MIBs Plugin
YANG
Models
MIB file
OID file
Much of the code has
been developed and
contributed by Cisco
www.opendaylight.org
5
MIB/OID
Architecture
YANG
ifIndex OBJECT-TYPE
SYNTAX
InterfaceIndex
MAX-ACCESS read-only
STATUS
current
DESCRIPTION
"A unique value, greater than zero, for each interface. It
is recommended that values are assigned contiguously
starting from 1. The value for each interface sub-layer
must remain constant at least from one re-initialization of
the entity's network management system to the next reinitialization."
::= { ifEntry 1 }
ifDescr OBJECT-TYPE
SYNTAX
DisplayString (SIZE (0..255))
MAX-ACCESS read-only
STATUS
current
DESCRIPTION
"A textual string containing information about the
interface. This string should include the name of the
manufacturer, the product name and the version of the
interface hardware/software."
::="ifNumber"
{ ifEntry 2 }
"1.3.6.1.2.1.2.1"
"ifTable"
"1.3.6.1.2.1.2.2"
"ifEntry"
"1.3.6.1.2.1.2.2.1"
"ifIndex"
"1.3.6.1.2.1.2.2.1.1"
"ifDescr"
"1.3.6.1.2.1.2.2.1.2"
"ifType"
"1.3.6.1.2.1.2.2.1.3"
"ifMtu"
"1.3.6.1.2.1.2.2.1.4"
"ifSpeed"
"1.3.6.1.2.1.2.2.1.5"
"ifPhysAddress"
"1.3.6.1.2.1.2.2.1.6"
"ifAdminStatus"
"1.3.6.1.2.1.2.2.1.7"
"ifOperStatus"
"1.3.6.1.2.1.2.2.1.8"
"ifLastChange"
"1.3.6.1.2.1.2.2.1.9"
JAVA
@Override
@OID(value = "1.3.6.1.2.1.2.2.1.7")
public IfAdminStatus getIfAdminStatus() {
return _ifAdminStatus;
}
leaf ifDescr {
@Override
type smiv2:DisplayString {
@OID(value = "1.3.6.1.2.1.2.2.1.2")
length "0..255";
public java.lang.String getIfDescr() {
}
return _ifDescr;
config false;
}
description
"A textual string containing information about the
@Override
interface. This string should include the name of the
@OID(value = "1.3.6.1.2.1.2.2.1.13")
manufacturer, the product name and the version of the
public Counter32 getIfInDiscards() {
interface hardware/software.";
return _ifInDiscards;
}
}
leaf ifType {
@Override
type ianaiftype-mib:IANAifType;
@OID(value = "1.3.6.1.2.1.2.2.1.14")
config false;
public Counter32 getIfInErrors() {
description
return _ifInErrors;
"The type of interface. Additional values for ifType are
}
assigned by the Internet"ifNumber"
Assigned Numbers Authority (IANA),
"1.3.6.1.2.1.2.1"
through updating the syntax
of the IANAifType textual
"ifTable"
"1.3.6.1.2.1.2.2"
convention.";
"ifEntry"
"1.3.6.1.2.1.2.2.1"
}
"ifIndex"
"1.3.6.1.2.1.2.2.1.1"
"ifDescr"
"1.3.6.1.2.1.2.2.1.2"
"ifType"
"1.3.6.1.2.1.2.2.1.3"
"ifMtu"
"1.3.6.1.2.1.2.2.1.4"
"ifSpeed"
"1.3.6.1.2.1.2.2.1.5"
"ifPhysAddress"
"1.3.6.1.2.1.2.2.1.6"
"ifAdminStatus"
"1.3.6.1.2.1.2.2.1.7"
"ifOperStatus"
"1.3.6.1.2.1.2.2.1.8"
6
"ifLastChange"
"1.3.6.1.2.1.2.2.1.9"
www.opendaylight.org
Architecture
SNMP Lifecycle
Get MIB + OID files
Convert MIB.my into YANG
model
Use libsmi or similar
OID Maven Plugin
Add OID tags to generated
JAVA code using MIB.oid
file
YANG-TOOLS Maven
Plugin
Convert YANG model of
MIBs into JAVA code
GET-BULK using SNMP4J
RPC Method Invoked
Get the specified MIB on a
given host
1 request per table, using
OID tags from mvn plugin
Aggregate results from all
tables in a MIB
Return fully populated
MIB table
www.opendaylight.org
7
Scope
Allow ODL applications (plugins) access to SNMP stack
Represent SNMP MIBs as YANG models to ensure
consistent and well defined access to SNMP MIB data
Support SNMP versions v1, v2, and v3
Support Gets, Sets, Walks, Traps
Dynamic loading of MIBs at runtime
Move OID tags from OID plugin to YANG extensions in
YANG tools
www.opendaylight.org
8
Dependencies
No dependencies on other projects
Offset 1 project:
DIDM is dependent on SNMP Plugin project
www.opendaylight.org
9
Project Details
Project Lead (elected by Committers) – Steve Dean
Project Contact – Steve Dean
Test Contact – Steve Dean
Initial code contribution from Cisco
Initial committers – 2 Cisco, 2 HP
Draft Lithium Release Plan – Available for review
https://wiki.opendaylight.org/view/SNMP_Plugin:Lithium
www.opendaylight.org
10
© Copyright 2026 Paperzz