SNMP help

SNMP help

Postby cjg » July 11th, 2012, 11:46 am

Hi,
New guy to ibootbar and snmp although I have used snmpget and snmpset previously.
I want to access ibootbar via the command line using SNMP from a c program but I'm
testing now with just the command line from my MAC. So is there an FAQ or more
help somewhere than what is in the manual? So far I have:
1) set and enabled 1 snmp manager with 192.168.0.253 (via telnet)
2) attempted to communicate with snmpget with "no response"
3) attempted same with snmptrap and was unable to create a file in /var/db/net-snmp
and thus get to an snmpapp.conf.
4) I found in the forum that some one could get a response using snmpwalk which gives me
hope I might be able to use snmpget and snmpset.
My questions:
1) can I use get/set commands?
2) what version snmp is allowed....1,2c,3 ?
3) community names?...Public? my previous system used guru to do the setting of parameters
4) So following my previous experience I tried to communicate with:
snmpget -m ibootbar.mib -c public 192.168.0.253 outletStatus
the above command contained -Lo and used guru instead of public and also contained -u admin
in an attempt to get some response with no luck. If I need the admin how does one communicate
the password?

Thanks in advance for any help getting me started on this....
cjg
 
Posts: 3
Joined: July 11th, 2012, 9:55 am

Re: SNMP help

Postby cjg » July 11th, 2012, 2:33 pm

Still floundering around....
1) mib download site indicates this is snmp version 1 in the mib file itself things are imported from snmp version 2
2) I tried to do a snmptest command and it seemed to be happy with my input but the ibootbar never responds to anything snmp related.
3) I looked at the mib from the other project and I clearly see something defined as snmpCommunityName and I see nothing remotely similar in the ibootbar mib.... am I supposed to edit the mib to add such things? I would think not.

getting frustrated to just get some response so I can make some progress....
cjg
 
Posts: 3
Joined: July 11th, 2012, 9:55 am

Re: SNMP help

Postby cjg » July 11th, 2012, 5:45 pm

Ok I found my error and it must be my lack of snmp knowledge. Since the SNMP managers are 4 in number with different ip addresses (I presume) I assumed the ipaddress could/needed to be different from the one I was telnetting in on. Once I pointed to the default address
(192.168.0.254), selected SNMP v1, and discovered the 2 communities are public (read only) and private (write), I started getting response.
So for you other newbies, this command worked for me (note I renamed the MIB file to ibootbar.mib and it is in my working directory):
snmpget -v 1 -m ibootbar.mib -c public 192.168.0.254 outletStatus.1
resulted in:
IBOOTBAR-MIB::outletStatus.1 = INTEGER: off (0)

which I had set to off using telnet. Changing the ".1" to ".5" gave me the status of outlet #5.

Now it is acting as I expected......
Hope this helps others.....
cjg
 
Posts: 3
Joined: July 11th, 2012, 9:55 am

Re: SNMP help

Postby djmiller » January 21st, 2015, 6:26 pm

On a related topic, I am having a problem with the MIB supplied at http://dataprobe.com/support/ibootbar/i ... ontrol.zip
It appears that the indexing is off by one, so that if I do:
snmpget -v 1 -m ibootbar.mib -c public 192.168.0.254 outletStatus.1
I get the status of outlet #2 on the box.
This would not be a problem, except that if I try to get the outletStatus.0 (for Outlet #1 on the box), I am told that the index is out of range. Same for the outletName or any other indexed item.

> outletName.0 --> Index out of range
> outletName.1 --> "Outlet2"
> outletName.2 --> "Outlet3"
> ...
> outletName.7 --> "Outlet8"
> outletName.8 --> ""
> outletName.9 --> Index out of range

I ended up having to edit the mib to get the lowest numbered outlet to work properly:

>outletIndex OBJECT-TYPE
> SYNTAX Integer32 (1..8) <---- I changed this to (0..7), this is line 261 of the file
> MAX-ACCESS read-only
> STATUS current
> DESCRIPTION
> ""
> ::= { outletEntry 1 }

Is there an error in the MIB, or am I doing something else wrong?
It looks like the MIB is dated 2006, it is ibootbar_v1.50.258.mib (LAST-UPDATED "200601261334Z")
My switch has firmware iBootBar Rev 1.5d.275
djmiller
 
Posts: 2
Joined: January 21st, 2015, 3:25 pm

Re: SNMP help

Postby DP_Sam » January 22nd, 2015, 11:25 am

The zip file you refer to does not contain a mib file.
That zip contains a stand alone SNMPSet program to allow command line control of an iBootBar using a PC.

I believe the command you are trying to use is part of the Apple operating system. (or Linux)
My recommendation is to try the command using the MIB within the following zip.

Post results here if you can.
Sam Savoye
Dataprobe Tech Support
SSavoye@Dataprobe.com
DP_Sam
 
Posts: 123
Joined: January 21st, 2010, 9:39 am
Location: Allendale, NJ

Re: SNMP help

Postby djmiller » January 22nd, 2015, 4:51 pm

ah, right. I pasted the wrong link. I was indeed talking about http://dataprobe.com/support/ibootbar/i ... 58.mib.zip

I am using Linux.
djmiller
 
Posts: 2
Joined: January 21st, 2015, 3:25 pm

Re: SNMP help

Postby DP_Sam » January 23rd, 2015, 10:53 am

The local mib I had worked, and had the same name and version number as the one online.
(internally however, my index was 0..7 as you suspected, so they did not match)

This means the file online was incorrect.
I have addressed the issue and re-posted the correct, working MIB file in the same location.

Please let me know when this works for you.
Sam Savoye
Dataprobe Tech Support
SSavoye@Dataprobe.com
DP_Sam
 
Posts: 123
Joined: January 21st, 2010, 9:39 am
Location: Allendale, NJ


Return to iBootBar

Who is online

Users browsing this forum: No registered users and 1 guest

cron