cancel
Showing results for 
Search instead for 
Did you mean: 

snmpwalk not working

yngvi thorfinnsson_1
Frequent Advisor

snmpwalk not working

Hi, I've two nodes on the same network,
but I'm not able to do snmpwalk.

snmpwalk -c public hermann.siminn.is system
snmpwalk: No response arrived before timeout.

on the host 'hermann.siminn.is':

snmpd -v

NET-SNMP version: 5.2.3



Can you help?
10 REPLIES
Ivan Ferreira
Honored Contributor

Re: snmpwalk not working

Try adding the -v option to indicate the version you want to use:

snmpwalk -Os -c public -v 1 hermann.siminn.is system

Ensure that no firewall is running or ensure that traffic is allowed.
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
Mel Burslan
Honored Contributor

Re: snmpwalk not working

telnet hermann.siminn.is 161

what do you see ?
________________________________
UNIX because I majored in cryptology...
yngvi thorfinnsson_1
Frequent Advisor

Re: snmpwalk not working

rex# snmpwalk -c public -v 1 hermann.siminn.is system
snmpwalk: No response arrived before timeout.

rex# telnet hermann.siminn.is 161
Trying...
telnet: Unable to connect to remote host: Connection refused
Mel Burslan
Honored Contributor

Re: snmpwalk not working

connection refused for a targeted port telnet means, either a firewall between the source and target servers, not allowing traffic for port 161, snmp protocol or both depending on the behavior of the firewall, or, your snmpd is not running or not running on the default port 161.

On the target server, if you run these two commands:

ps -ef | grep -i snmp
netstat -an | grep 161

what output do you see ?
________________________________
UNIX because I majored in cryptology...
Ivan Ferreira
Honored Contributor

Re: snmpwalk not working

It seems that your service is not running at the server.
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
yngvi thorfinnsson_1
Frequent Advisor

Re: snmpwalk not working

Thanks for the replies :-)


hermann:/# ps -ef | grep -i snmp
snmp 10415 1 0 15:03 ? 00:00:00 /usr/sbin/snmpd -Lsd -Lf /dev/null -u snmp -I -smux -p /var/run/snmpd.pid 127.0.0.1

hermann:/# netstat -an | grep 161
tcp6 0 0 :::8161 :::* LISTEN
tcp6 0 0 :::61613 :::* LISTEN
tcp6 0 0 :::61616 :::* LISTEN
tcp6 0 0 :::61617 :::* LISTEN
tcp6 0 0 ::ffff:157.157.19:36237 ::ffff:157.157.19:61616 TIME_WAIT
tcp6 0 0 ::ffff:157.157.19:36236 ::ffff:157.157.19:61616 TIME_WAIT
.
.
.

tcp6 0 0 ::ffff:157.157.19:36211 ::ffff:157.157.19:61616 TIME_WAIT
tcp6 0 0 ::ffff:157.157.19:36210 ::ffff:157.157.19:61616 TIME_WAIT
tcp6 0 0 ::ffff:127.0.0.1:61616 ::ffff:127.0.0.1:50104 ESTABLISHED
tcp6 0 0 ::ffff:157.157.19:61616 ::ffff:157.157.19:36244 ESTABLISHED
tcp6 0 0 ::ffff:127.0.0.1:50104 ::ffff:127.0.0.1:61616 ESTABLISHED
udp 0 0 127.0.0.1:161 0.0.0.0:*



Mel Burslan
Honored Contributor

Re: snmpwalk not working

Well, then your snmpd is running and listening on port 161 on the target server. Hence I have to say, the snmp traffic is not traversing from source to the target server, most probably due to a firewall or a filtering router of some sort in between the two.
________________________________
UNIX because I majored in cryptology...
yngvi thorfinnsson_1
Frequent Advisor

Re: snmpwalk not working

we had to config this file as well

/etc/default/snmpd

as well as the

/etc/snmp/snmpd.conf
Mel Burslan
Honored Contributor

Re: snmpwalk not working

I am not very familiar with snmp on Linux platform but sounds like the snmp traffic is not reaching the target server at all. I'd suggest using something like tcpdump on the target server to verify this actually is the case. Then you can chase network team to figure out what is blacking the traffic and remove it.

Here is a page, showing you how you can run tcpdump for different scenarios.

http://linux.byexamples.com/archives/283/simple-usage-of-tcpdump/

Hope it helps
________________________________
UNIX because I majored in cryptology...
yngvi thorfinnsson_1
Frequent Advisor

Re: snmpwalk not working

Thanks a lot Mel, the problem was solved, by congiuring both files.