10-19-2020 04:50 PM
I am new to NSO development, I am having trouble with compiling MIBs for creating SNMP NED package for certain devices. I am trying to get the ARP table from the device.
As per my understanding from NSO documentation, i have to get the MIBs corresponding to particular OID and then compile them to create a NSO package corresponding to the device. Am i right in my understanding?
Also i am using the Cisco Devnet NSO sandbox and in order to find the mibs corresponding to the images on some of the devices in sandbox, i ran "Show version" on a device. It gave me the image file as : "bootflash:disk0/xrvr-os-mbi-6.3.1/mbixrvr-rp.vm"
how do you think can i get the image name because the cisco SNMP object navigator does not take any possible combination of image name out of "bootflash:disk0/xrvr-os-mbi-6.3.1/mbixrvr-rp.vm"
Solved! Go to Solution.
12-10-2020 03:14 PM - edited 12-10-2020 03:15 PM
So finally i have been able to compile the MIBs and get the SNMP NED to obtain the ARP information. Here is the step by step guide to what i did:
1) Used https://snmp.cloudapps.cisco.com/Support/SNMP/do/BrowseOID.do?local=en to find the object ID corresponding to ARP and thus find the MIB corresponding to the object ID. Turns out for ARP it is IP-MIB
2) I downloaded the IP-MIB from the same site and renamed the file to IP-MIB.mib. I moved the IP-MIB to a folder named MIB in my home directory.
3) I ran the command
ncs-make-package --snmp-ned ./MIB/ acme
and further ran
cd acme/src/; make;
on running the make NSO threw me an error and asked for these MIBS: INET-ADDRESS-MIB IF-MIB
4) I used the same source to get the MIBs and copied them into the MIB folder. and then repeated step 4 again. This time it asked me add IANAifType-MIB.
For me this was the last MIB that i added before the NSO compiled the NED but i would advice doing steps 3 and 4 until the NED is compiled properly. Now you just have to load the package into NSO, configure authentication for the device and connect to your device using the compiled NED.
10-20-2020 03:54 AM
You are correct, you need to get the right MIB files and compile them to a NED. What kind of problems are you hitting?
10-20-2020 01:08 PM
Thank you for replying!
So in order to get the ARP information from device, i need to have the IP-MIB. when i use the Cisco SNMP object navigator i get the dependancy MIBs, it shows two non Cisco MIBs: RFC 1212 and RFC 1155-SMI.
I am not able to find good source for these MIBs. I found them on this source but i guess they are not reliable because they keep throwing error when i compile them in NSO.
I also used the snmp dump from net snmp utilities to extract the MIBs from RFCs but no use.
Either i am doing something wrong or the MIB files are causing trouble.
10-21-2020 12:03 AM
Hi!
NSO is quite picky about the MIBs adhering to the SMI standard so first make sure they are correct by running them through smilint or similar. Here is an online version https://www.ibr.cs.tu-bs.de/projects/libsmi/tools/ (disclaimer: I havent tried it)
10-21-2020 07:08 PM
Thanks again for your reply. I will try this and see if it works.
10-21-2020 10:08 PM
So i used smilint. Turns out the errors i get when i try to compile these MIBs in libsmi tools is the same that NSO throws. That confirms that i am following the right process but their maybe some issue with the MIBs i am trying to compile.
Can you point me towards a good resource or give any general advice that can help me to troubleshoot these errors? any guide or anything. I have never worked with mibs before. Just learning about it as i am getting familiar with NSO.
12-10-2020 03:14 PM - edited 12-10-2020 03:15 PM
So finally i have been able to compile the MIBs and get the SNMP NED to obtain the ARP information. Here is the step by step guide to what i did:
1) Used https://snmp.cloudapps.cisco.com/Support/SNMP/do/BrowseOID.do?local=en to find the object ID corresponding to ARP and thus find the MIB corresponding to the object ID. Turns out for ARP it is IP-MIB
2) I downloaded the IP-MIB from the same site and renamed the file to IP-MIB.mib. I moved the IP-MIB to a folder named MIB in my home directory.
3) I ran the command
ncs-make-package --snmp-ned ./MIB/ acme
and further ran
cd acme/src/; make;
on running the make NSO threw me an error and asked for these MIBS: INET-ADDRESS-MIB IF-MIB
4) I used the same source to get the MIBs and copied them into the MIB folder. and then repeated step 4 again. This time it asked me add IANAifType-MIB.
For me this was the last MIB that i added before the NSO compiled the NED but i would advice doing steps 3 and 4 until the NED is compiled properly. Now you just have to load the package into NSO, configure authentication for the device and connect to your device using the compiled NED.
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