使用 SNMP 查询 MIB-II 对象,如何识别充当路由器的设备,即转发数据包?
识别它们的唯一方法是通过标识符、类型或描述,或者我可以通过数据包流量识别它吗?
使用 SNMP 查询 MIB-II 对象,如何识别充当路由器的设备,即转发数据包?
识别它们的唯一方法是通过标识符、类型或描述,或者我可以通过数据包流量识别它吗?
如果您只是想知道他们是否转发流量,那么实际上有一个 MIB 对象可以告诉您:
IP-MIB::ipForwarding
ipForwarding OBJECT-TYPE
-- FROM IP-MIB
SYNTAX INTEGER {forwarding(1), notForwarding(2)}
MAX-ACCESS read-write
STATUS current
DESCRIPTION "The indication of whether this entity is acting as an IPv4
router in respect to the forwarding of datagrams received
by, but not addressed to, this entity. IPv4 routers forward
datagrams. IPv4 hosts do not (except those source-routed
via the host).
When this object is written, the entity should save the
change to non-volatile storage and restore the object from
non-volatile storage upon re-initialization of the system.
Note: a stronger requirement is not used because this object
was previously defined."
::= { iso(1) org(3) dod(6) internet(1) mgmt(2) mib-2(1) ip(4) 1 }