ubuntu 下的net-snmp包的安装

重复贴和参考价值不大的帖子,版主维护
回复
ashi12
帖子: 1
注册时间: 2008-12-29 12:25
送出感谢: 0
接收感谢: 0

ubuntu 下的net-snmp包的安装

#1

帖子 ashi12 » 2008-12-29 12:39

ubuntu 下的net-snmp包的安装是按照google搜索的网页进行安装的,安装后测试
snmpwalk -v 2c -c public 192.168.1.254 if
Timeout:NO Response from 192.168.1.254
为什么测试不通过,是什么原因,望大家指点一下
头像
be00
帖子: 805
注册时间: 2008-07-28 19:51
来自: 长沙
送出感谢: 1 次
接收感谢: 2 次
联系:

Re: ubuntu 下的net-snmp包的安装

#2

帖子 be00 » 2008-12-29 13:24

先看下snmp服务有没有开,应该是udp的161端口

代码: 全选

zhanggang@T60:~$ sudo netstat -upna
激活Internet连接 (服务器和已建立连接的)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
udp        0      0 127.0.0.1:161           0.0.0.0:*                           18137/snmpd   
估计是本机的端口snmp没开吧,我自己也是一样

代码: 全选

zhanggang@T60:/etc/snmp$ snmpwalk -v 2c -c public 127.0.0.1 if
IF-MIB::ifTable = No more variables left in this MIB View (It is past the end of the MIB tree)

zhanggang@T60:/etc/snmp$ snmpwalk -v 2c -c public 192.168.100.122 if
Timeout: No Response from 192.168.100.122
但是看别的没有问题,比如交换机的

代码: 全选

zhanggang@T60:~$  snmpwalk -v 2c -c public 192.168.0.1  if  
IF-MIB::ifIndex.1 = INTEGER: 1
IF-MIB::ifDescr.1 = STRING: Ethernet-WAN
IF-MIB::ifType.1 = INTEGER: ethernetCsmacd(6)
IF-MIB::ifMtu.1 = INTEGER: 1492
IF-MIB::ifSpeed.1 = Gauge32: 0
IF-MIB::ifPhysAddress.1 = STRING: 0:17:9a:60:f0:94
IF-MIB::ifAdminStatus.1 = INTEGER: up(1)
IF-MIB::ifOperStatus.1 = INTEGER: up(1)
IF-MIB::ifLastChange.1 = Timeticks: (251140) 0:41:51.40
IF-MIB::ifInOctets.1 = Counter32: 3445220
IF-MIB::ifInUcastPkts.1 = Counter32: 1797
IF-MIB::ifInNUcastPkts.1 = Counter32: 0
IF-MIB::ifInDiscards.1 = Counter32: 0
IF-MIB::ifInErrors.1 = Counter32: 0
IF-MIB::ifInUnknownProtos.1 = Counter32: 0
IF-MIB::ifOutOctets.1 = Counter32: 338244
IF-MIB::ifOutUcastPkts.1 = Counter32: 1126
IF-MIB::ifOutNUcastPkts.1 = Counter32: 7
IF-MIB::ifOutDiscards.1 = Counter32: 0
IF-MIB::ifOutErrors.1 = Counter32: 0
IF-MIB::ifOutQLen.1 = Gauge32: 16
IF-MIB::ifSpecific.1 = OID: ccitt
End of MIB
我的乌斑兔儿:http://zhanggang.net/m/b/b1/ubuntu右键选择在新的窗体打开
右边有一只黄手 ----> 或者注册Dropbox中文版感谢我
回复

回到 “归档贴”