[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: snmpwalk to remote address gives timeout



Fabrice LORRAIN wrote:
> Bart wrote:
> > Fabrice LORRAIN wrote:
> >> Bart wrote:
> >>> Fabrice LORRAIN schreef:
> >>>
> >> ...
> >>>>> However if I run "snmpwalk -v 1 -c public 192.168.1.36 system" on the
> >>>>> stable box, with 192.168.1.36 the IP address of the testing box, i get:
> >>>>> Timeout: No Response from 192.168.1.36
> >>>>>
> >>>>> snmpd is up and running, I can ping both ways, there are no firewalls
> >>>>> in place. What could be wrong?
> >>>>>
> >>>> Is snmpd listening on your interfaces ?
> >>>>
> >>>> Check with "sudo netstat -natup | grep 161" on the sarge box.
> >>>>
> >>>> @+,
> >>>> 	Fab
> >>>>
> >>> On Sarge I have:
> >>> netstat -natup | grep 161
> >>> udp        0      0 0.0.0.0:161             0.0.0.0:*
> >>>        707/snmpd
> >>> But Sarge is looking for snmp info on Etch. So for the fun of it, on
> >>> Etch it is:
> >>> netstat -natup | grep 161
> >>> udp        0      0 127.0.0.1:161           0.0.0.0:*
> >>>        1636/snmpd
> >> snmpd is only binded to your localhost interface (127.0.0.1:161) on this
> >> box. Check your conf. to have it listening on the 192.168.1.36 one.
> >>
> >> @+,
> >> 	Fab
> >
> > Thanks for your tip. At first I couldn't find where the 127.0.0.1 was
> > coming from on Etch, but after some digging around I found
> > /etc/defaults/snmpd (I always forget this folder)
> > SNMPDOPTS='-Lsd -Lf /dev/null -u snmp -I -smux -p /var/run/snmpd.pid
> > 127.0.0.1' (this is SNMPDOPTS='-Lsd -Lf /dev/null -p
> > /var/run/snmpd.pid' on sarge)
> >
> > I cut off the 127.0.0.1 bit, and it goes better now. Although no
> > errors, I also get no output on Sarge from Etch:
> > sarge:/# snmpwalk -v 1 -c public 192.168.1.36 system
> > End of MIB
> >
> > So i tried something more specific on Etch:
> > etch:/# snmpget -v 1 -c public localhost system.sysUpTime.0
> > Error in packet
> > Reason: (noSuchName) There is no such variable name in this MIB.
> > Failed object: DISMAN-EVENT-MIB::sysUpTimeInstance
> >
> > Yet on Sarge I get:
> > sarge:/# snmpget -v 1 -c public localhost system.sysUpTime.0
> > SNMPv2-MIB::sysUpTime.0 = Timeticks: (3251425) 9:01:54.25
> >
> > Both sarge and etch have no specific (or default) snmp.conf, and should
> > get (?) their MIBs from /usr/share/snmp/mibs/ which look similar on
> > both hosts. Any ideas?
>
> Not much. Bunch of things to try :
> - check on both boxes the interface binding of snmpd (netstat -natup |
> grep 161).
> - test with local interrogation on both box with snmpwalk first :
> # snmpwalk -v 1 -c public localhost_or/and_local_ip .
> "." means start from the root of the mib-tree (could use .1 also). You
> should get something. If not either you use the wrong community either
> your /etc/snmp/snmpd.conf is uterly broken --> fix it.
> - test from the other box.
>
> Sorry for not being more helpful, but I don't have any etch computer to
> test.
>
> @+,
> 	Fab
Thanks for your tips. Here's what I tried on my Etch box:
Etch:/# netstat -natup | grep 161
udp        0      0 0.0.0.0:161             0.0.0.0:*
       6007/snmpd
So that seems ok.
I've created this bare settings file in /etc/snmp/snmpd.conf
# /etc/snmp/snmpd.conf
#         sec.name  source     community
trapsink  readonly  localhost  public
#                sec.model  sec.name
group MyROGroup  v1         readonly
#           incl/excl subtree                          mask
view all    included  .1                               80
#                context sec.model sec.level match  read   write  notif
access MyROGroup ""      any       noauth    exact  all    none   none
# end of file
And stopped en started snmpd (restart only stops snmpd, this seems like
a bug). And tried snmpwalk again:
Etch:/# snmpwalk -v 1 -c public localhost
End of MIB

So again no results. I'm kinda lost here. I might purge the snmpd
package and try reinstalling it, let's see where that gets me. Or does
anyone spot the error?



Reply to: