08-23-2017 06:34 AM - edited 03-01-2019 03:58 AM
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
Solved! Go to Solution.
08-23-2017 06:42 AM
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
08-23-2017 06:42 AM
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
08-25-2017 10:32 AM
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?
08-26-2017 06:31 PM
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
10-13-2017 06:26 AM
Thank you Hiro ! Appreciate it
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide