From: "Nicolás Brailovsky" Date: 2009-10-02T00:32:31+09:00 Subject: Re: Problems with SNMP --0016364d24f197d1890474e15a76 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable 2009/10/1 Rocir Santiago > When I just add the ifPhysAddress, the application just exists, with out > any message. > You'll have to find what's the exception by capturing it yourself then, there's no way my psychic powers can reach that far. > > I know the switch supports what I want because at the web interface I > can see a image that shows all the pluged machines and I can see the MAC > address of each one. > Doesn't mater, the web interface may show it but that doesn't mean SNMP supports this functionality. Reffer to the different RFCs for SNMP and chec= k if it's supported using another SNMP tool, like those from netsnmp. Regards --=20 Nicol=E1s Brailovsky - http://nicolasb.com.ar/ > > What I just need is to get those mapings into ruby code. My app need > that information but I can't just figure out a way to do that. > > Nicol=E1s Brailovsky wrote: > > 2009/10/1 Rocir Santiago > > > >> Hi, Nicol=E1s. > >> > >> Thanks for the reply. My switch works fine with SNMP. It's 3com Baseli= ne > >> Switch 2226 Plus. > > > > > > Problem is though it may support SNMP protocol it sure won't support al= l > > the > > options (OIDs) the RFC defines. Some switches do support listing known > > devices, some don't. > > > > > >> My doubt it's about the ruby code to find the MAC > >> address of each computer "pluged" in my switch. I can figure out some > >> examples at the doc page of this lib. But when I just try to get the > >> ifPhysAddress, the application raises an error and I don't know why. > >> > > > > My experience with SNMP si mostly in C++, not Ruby, but it may be > > helpful to > > know which exception is your application raising. It may be because the > > OID > > is not supported (no such instance exception) or because it's not > > defined in > > your code. To assert if the switch does support this OID try using > > snmpget > > from console, not from within a program. > > > > BTW, if I remember correctly ifPhysAddress will give you the iface's ma= c > > internal to the switch, not the mac of the device in that port (there > > may be > > many known macs per port too). > > > > Regards, > > -- > > Nicol=E1s Brailovsky - http://nicolasb.com.ar/ > > -- > Posted via http://www.ruby-forum.com/. > > --0016364d24f197d1890474e15a76--