ifAdminStatus 和 ifOperStatus 两种状态说明

ifAdminStatus是指配置状态。
ifOperStatus是指实际工作状态。

配置状态,是什么状态?

配置状态就是你配置这个端口是什么状态,比如是“up” or “down”。
例如:你配置端口的状态是“up”,ifAdminStatus是“up”
   但是如果这个端口没有插线,那么ifOperStatus是“down”

转载于:https://www.cnblogs.com/wowchky/archive/2012/10/18/2729040.html

  • 1
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
ifMib 中可以通过 ifOperStatus 对象 ID 来获取端口的状态ifOperStatus 对象 ID 为 1.3.6.1.2.1.2.2.1.8。 该对象 ID 对应的值表示接口的当前操作状态,其定义如下: ``` ifOperStatus OBJECT-TYPE SYNTAX INTEGER { up(1), down(2), testing(3), unknown(4), dormant(5), notPresent(6), lowerLayerDown(7) } MAX-ACCESS read-only STATUS current DESCRIPTION "The current operational state of the interface. The testing(3) state indicates that no operational packets can be passed. If ifAdminStatus is down(2) then ifOperStatus should be down(2). If ifAdminStatus is changed to up(1) then ifOperStatus should change to up(1) if the interface is ready to transmit and receive network traffic; it should change to dormant(5) if the interface is waiting for external actions (such as a serial line waiting for an incoming connection); it should remain in the down(2) state if and only if there is a fault that prevents it from going to the up(1) state; it should remain in the notPresent(6) state if the relevant interface has not been created by the agent." ::= { ifEntry 8 } ``` 以上是 ifOperStatus 对象 ID 的定义。其中,取值含义如下: - up(1):表示接口处于 UP 状态,即已经准备好传输数据。 - down(2):表示接口处于 DOWN 状态,即不处于可传输数据的状态。 - testing(3):表示接口正在进行测试,无法传输数据。 - unknown(4):表示接口的状态未知。 - dormant(5):表示接口处于休眠状态,等待外部特定事件发生。 - notPresent(6):表示接口不存在。 - lowerLayerDown(7):表示下层接口处于 DOWN 状态,因此本层接口也处于 DOWN 状态。 因此,可以通过 SNMP 协议获取对应端口的 ifOperStatus 对象 ID 的值,从而获得端口的状态信息。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值