brief: I have configured net-snmp on a centos Linux server , but the data couldn't be collected from remote host,the network connecttion has no problem , and also the firewall ,the snmp log shows there was remote machine connectted 。but on the contract, I could get info through snmp on the server itself using the exactly same command-line.
I have configured net-snmp on a CentOS Linux 5.10 server (For simplicity call it __Machine A__), the configuration info is
Code:
com2sec notConfigUser default ibccdg
group notConfigGroup v2c notConfigUser
view systemview included .1.3.6.1.2.1.1
view systemview included .1.3.6.1.2.1.25.1.1
access notConfigGroup "" any noauth exact systemview none none
syslocation Unknown (edit /etc/snmp/snmpd.conf)
syscontact Root <root@localhost> (configure /etc/snmp/snmp.local.conf)
pass .1.3.6.1.4.1.4413.4.1 /usr/bin/ucd5820stat
rouser jkb
I wasn't quite familliar with SNMP, since what I need is SNMPv3,it seems the front five lines was useless。
I exec the below command-line on machine A
Code:
# snmpwalk -v 3 -l authNoPriv -a MD5 -u user -A password X.X.X.X:161 sysDescr
SNMPv2-MIB::sysDescr.0 = STRING: Linux localhost.localdomain 2.6.18-238.el5 #1 SMP Thu Jan 13 15:51:15 EST 2011 x86_64
It works just fine,but the completely same command-line does not work on the other machines(the ip in the above command-line is a public ip) ,it respones an error
Quote:
No log handling enabled - turning on stderr logging
snmpwalk: Timeout (Sub-id not found: (top) -> sysDescr)
|
even I have turned off the iptables , and the SELinux was not enabled。On an other CentOS Linux 5.6 machine (For simplicity call it __Machine B__), it also have net-snmp configured, and there is no any problem。So I try to copy the configuration of net-snmp on the Machine B (/etc/snmp/snmpd.conf and the configure file under /var/net-snmp etc) to Machine A,So there is no difference in the configuration of net-snmp on the two machine ,but this does not solve the problem, I counld gather info by use snmpwalk command-line on Machine A,but the same command-line does not work out on the other machine,still shows error just like before
Quote:
"snmpwalk: Timeout (Sub-id not found: (top) -> sysDescr)
|
I have tried to use SNMPv2 , it get an error too.
Quote:
"snmp Timeout: No Response from X.X.X.X"
|
software inforamtion
- on machine B
Code:
-bash-3.2# rpm -qa | grep snmp
net-snmp-5.3.2.2-17.el5_8.1
net-snmp-devel-5.3.2.2-17.el5_8.1
net-snmp-libs-5.3.2.2-17.el5_8.1
net-snmp-devel-5.3.2.2-17.el5_8.1
net-snmp-libs-5.3.2.2-17.el5_8.1
net-snmp-utils-5.3.2.2-17.el5_8.1
-bash-3.2# ls /var/net-snmp/
snmpd.conf
-bash-3.2# ls /var/net-snmp/ -a
. .. snmpd.conf .snmp-exec-cache
-bash-3.2# cat /etc/redhat-release
CentOS release 5.6 (Final)
- on machine A
Code:
[root@localhost snmp]# rpm -qa | grep snmp
net-snmp-libs-5.3.2.2-20.el5
net-snmp-libs-5.3.2.2-20.el5
net-snmp-devel-5.3.2.2-20.el5
net-snmp-utils-5.3.2.2-20.el5
net-snmp-5.3.2.2-20.el5
net-snmp-devel-5.3.2.2-20.el5
[root@localhost snmp]# cat /etc/redhat-release
CentOS release 5.10 (Final)
I have tried to use `snmpd -f -Le` to get more debug information,but this doesn't give much useful info, except
Quote:
Duplicate IP address detected, some interfaces may not be visible in IP-MIB
|
I didn't quite realize what dose it means,On the machine A, there is a sub-interface: eth0:1, so the machine A has two IP on it's eth0。
Any help would be appreciated !