Chinaunix首页 | 论坛 | 博客
  • 博客访问: 244374
  • 博文数量: 91
  • 博客积分: 2510
  • 博客等级: 少校
  • 技术积分: 1100
  • 用 户 组: 普通用户
  • 注册时间: 2007-10-15 14:35
文章分类

全部博文(91)

文章存档

2008年(91)

我的朋友

分类: LINUX

2008-03-23 00:27:58

snmpwalk - retrieve a subtree of management values using SNMP GETNEXT requests

 

 

snmpwalk  is  an SNMP application that uses SNMP GETNEXT requests to query a network entity for a tree of  information.

       An object identifier (OID) may be given on the command line.  This OID specifies  which  portion  of  the  object  identifier space will be searched using GETNEXT requests.  All variables in the subtree below the  given OID are queried and their values presented to the user.  Each variable name is given in the  format  specified in variables(5).

       If  no  OID  argument is present, snmpwalk will search the subtree rooted at SNMPv2-SMI::mib-2 (including  any MIB object values from other MIB modules, that are defined as lying within  this  subtree).   If  the  network entity has an error processing the request packet, an error packet will be returned and a message will be shown, helping to pinpoint why the request was malformed.

       If the tree search causes attempts to search beyond the end of the MIB, the message "End of MIB" will  be displayed.

以上是对snmpwalk的解释。

下面是常用到的命令

/usr/local/bin/snmpwalk -v2c  -c community ip RFC1213-MIB::atPhysAddress

抓取ip,这个下面接的所有服务器的mac.但是我在工作中遇到的是ip为核心交换机的。才能抓到其下的所有的服务器的mac。如果是2层交换机的IP。而本机是在其他的交换机下的服务器,则就抓不到了哦。

阅读(8506) | 评论(0) | 转发(0) |
0

上一篇:net-snmp

下一篇:创新意识

给主人留下些什么吧!~~