I have 2 debian boxes, one at stable, the other one at testing.
If i run "snmpwalk -v 1 -c public localhost system" at the testing box
I get the results I expect:
SNMPv2-MIB::sysDescr.0 = STRING: Linux Box2 2.6.19.061203 #1 Sun Dec 3
15:32:44 CET 2006 i686
SNMPv2-MIB::sysObjectID.0 = OID: NET-SNMP-MIB::netSnmpAgentOIDs.10
DISMAN-EVENT-MIB::sysUpTimeInstance = Timeticks: (493706) 1:22:17.06
SNMPv2-MIB::sysContact.0 = STRING: Root (configure
/etc/snmp/snmpd.local.conf)
...
[snip]
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?
Stable uses NET-SNMP version: 5.1.2, testing NET-SNMP version: 5.2.3.
snmpd.conf on testing reads:
#
com2sec readonly default public
#
group MyROSystem v1 paranoid
group MyROSystem v2c paranoid
group MyROSystem usm paranoid
group MyROGroup v1 readonly
group MyROGroup v2c readonly
group MyROGroup usm readonly
group MyRWGroup v1 readwrite
group MyRWGroup v2c readwrite
group MyRWGroup usm readwrite
#
view all included .1 80
view system included .iso.org.dod.internet.mgmt.mib-2.system
#
access MyROSystem "" any noauth exact system none none
access MyROGroup "" any noauth exact all none none
access MyRWGroup "" any noauth exact all all none
--
Bookmark/Search this post with:
snmpwalk to remote address gives timeout
Fabrice LORRAIN schreef:
> Bart wrote:
> > I have 2 debian boxes, one at stable, the other one at testing.
> >
> > If i run "snmpwalk -v 1 -c public localhost system" at the testing box
> > I get the results I expect:
> > SNMPv2-MIB::sysDescr.0 = STRING: Linux Box2 2.6.19.061203 #1 Sun Dec 3
> > 15:32:44 CET 2006 i686
> > SNMPv2-MIB::sysObjectID.0 = OID: NET-SNMP-MIB::netSnmpAgentOIDs.10
> > DISMAN-EVENT-MIB::sysUpTimeInstance = Timeticks: (493706) 1:22:17.06
> > SNMPv2-MIB::sysContact.0 = STRING: Root (configure
> > /etc/snmp/snmpd.local.conf)
> > ...
> > [snip]
> >
> > 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
--
snmpwalk to remote address gives timeout
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?
--
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?
--
Solution
I think it is not current now, but for the guys surfing the net:
The solution is to add these 2 lines to snmpd.conf
interface eth0 - the network card you want to use
agentaddress ip-address:161 - the listening IP address and port
Solution
On Fri, Aug 31, 2007 at 01:36:03AM +0200, dunkel wrote:
>
> I think it is not current now, but for the guys surfing the net:
> The solution is to add these 2 lines to snmpd.conf
> interface eth0 - the network card you want to use
> agentaddress ip-address:161 - the listening IP address and port
If you want to put the solution to a problem in the archives so that
others can find it, it would help to tell us what the ** you are talking
about. While you're at it, for lines you suggest adding to a file, put
them on their own line, and use standard notation e.g [your ip
address].
Doug.
--
I hope You are satisfied now :)
The original problem was:
"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?"
The solution is:
[/]open snmpd.conf with your favourite editor and
add these 2 lines:
interface eth0agentaddress [ip address of your host]:[ening port - 161 is the default]