cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
841
Views
0
Helpful
4
Replies

NSO - SNMP southbound support

jmendonc
Cisco Employee
Cisco Employee

Hi Experts,

I'm pretty new to NSO and wanted to know if there exists any SNMP southbound support for NSO so that I could fetch device data using SNMP mibs?

-Regards

Joyal mendonca

1 Accepted Solution

Accepted Solutions

Hiro Takahashi
Cisco Employee
Cisco Employee

Hello Joyal,

You can create an SNMP NED to communicate with devices via SNMP.

All you need is to prepare .mib files and execute following command.

ncs-make-package --snmp-ned <.mib directory> <package name>

I tested IOS IF-MIB and following is how it looks like.

admin@ncs# show running-config devices device R2 config

devices device R2

config

  if-mib:IF-MIB ifTable ifEntry 1

   ifAdminStatus          down

   ifLinkUpDownTrapEnable enabled

   ifPromiscuousMode      false

   ifAlias                ""

  !

  if-mib:IF-MIB ifTable ifEntry 2

   ifAdminStatus          up

   ifLinkUpDownTrapEnable enabled

   ifPromiscuousMode      false

Hope this helps.

Best regards,

Hiro

View solution in original post

4 Replies 4

Hiro Takahashi
Cisco Employee
Cisco Employee

Hello Joyal,

You can create an SNMP NED to communicate with devices via SNMP.

All you need is to prepare .mib files and execute following command.

ncs-make-package --snmp-ned <.mib directory> <package name>

I tested IOS IF-MIB and following is how it looks like.

admin@ncs# show running-config devices device R2 config

devices device R2

config

  if-mib:IF-MIB ifTable ifEntry 1

   ifAdminStatus          down

   ifLinkUpDownTrapEnable enabled

   ifPromiscuousMode      false

   ifAlias                ""

  !

  if-mib:IF-MIB ifTable ifEntry 2

   ifAdminStatus          up

   ifLinkUpDownTrapEnable enabled

   ifPromiscuousMode      false

Hope this helps.

Best regards,

Hiro

Thanks for sharing the info, Hiro!

Is there an example of setting up the device config (authgroup, device-type, etc) for being able to access both cli and snmp for the same device?

Hello Timothy,

Following is show outputs in my lab.

NSO connects to R2 via CLI and R2m via SNMP.

Note, R2 and R2 are same device, but NSO communicates with them via different protocol.

admin@ncs# show devices list

NAME  ADDRESS   DESCRIPTION  NED ID     ADMIN STATE 

---------------------------------------------------

R1    10.1.1.2  -            cisco-ios  unlocked    

R2    20.1.1.2  -            cisco-ios  unlocked    

R2m   20.1.1.2  -            snmp       unlocked    

admin@ncs# show running-config devices device R2   

devices device R2

address   20.1.1.2

authgroup IOS

device-type cli ned-id cisco-ios

device-type cli protocol telnet

state admin-state unlocked

config

  ios:tailfned police cirmode

  ios:version   15.1

  ios:service timestamps debug datetime msec

  ios:service timestamps log datetime msec

  no ios:service password-encryption

  ios:service compress-config

  ios:hostname  R2

  ios:enable secret 4 tnhtc92DXBhelxjYk8LWJrPV36S2i4ntXrpb4RFmfqY

Aborted: by user

admin@ncs# show running-config devices device R2m

devices device R2m

address 20.1.1.2

device-type snmp version v2c

device-type snmp snmp-authgroup SNMP

state admin-state unlocked

config

  if-mib:IF-MIB ifTable ifEntry 1

   ifAdminStatus          down

   ifLinkUpDownTrapEnable enabled

   ifPromiscuousMode      false

   ifAlias                ""

  !

  if-mib:IF-MIB ifTable ifEntry 2

   ifAdminStatus          up

   ifLinkUpDownTrapEnable enabled

   ifPromiscuousMode      false

   ifAlias                ""

Aborted: by user

admin@ncs#

Please feel free to let me know if you need any more details.

Best regards,

Hiro

Thank you Hiro ! Appreciate it