When I just add the ifPhysAddress, the application just exists, with out any message. 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. 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ás Brailovsky wrote: > 2009/10/1 Rocir Santiago <rocirleite / gmail.com> > >> Hi, Nicolás. >> >> Thanks for the reply. My switch works fine with SNMP. It's 3com Baseline >> Switch 2226 Plus. > > > Problem is though it may support SNMP protocol it sure won't support all > 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 mac > internal to the switch, not the mac of the device in that port (there > may be > many known macs per port too). > > Regards, > -- > Nicolás Brailovsky - http://nicolasb.com.ar/ -- Posted via http://www.ruby-forum.com/.