SNMP:ifAdminStatus 与 ifOperStatus [英] SNMP: ifAdminStatus vs ifOperStatus

查看:317
本文介绍了SNMP:ifAdminStatus 与 ifOperStatus的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个关于 ifAdminStatus 和 ifOperStatus 的问题.这是我使用 ifAdminStatus 的网络接口状态的输出:

I have a question about ifAdminStatus and ifOperStatus. Here is an output of my network interfaces state using ifAdminStatus:

snmpwalk -Os -c public -v 1 192.168.1.1 1.3.6.1.2.1.2.2.1.7ifAdminStatus.1 = INTEGER: up(1)

ifAdminStatus.12 = INTEGER: down(2)
ifAdminStatus.13 = INTEGER: up(1)
ifAdminStatus.14 = INTEGER: up(1)

这里是使用 ifOperStatus 的相同列表:

And here is the same list using ifOperStatus:

snmpwalk -Os -c public -v 1 192.168.1.1 1.3.6.1.2.1.2.2.1.8

ifOperStatus.12 = INTEGER: down(2)
ifOperStatus.13 = INTEGER: down(2)
ifOperStatus.14 = INTEGER: down(2)

如您所见,ifAdminStatus 报告 #13 和 #14 已启动,但 ifOperStatus 报告它们均已关闭.我知道#13 已启动并通过它传递数据包(这是我的 PPPoE Internet 连接接口).根据 cisco 文档如果 ifAdminStatus 已关闭(2),则 ifOperStatus 应关闭(2)."此处似乎并非如此...

As you can see an ifAdminStatus reports that #13 and #14 are up but ifOperStatus reports them both down. I know for a fact that #13 is up and passing packets though it ( it's my PPPoE Internet connection interface). According to cisco documentation "If ifAdminStatus is down(2) then ifOperStatus should be down(2)." Which doesn't seems to be the case here...

我的问题是 - 为什么报告的状态不同,并且仅使用 ifAdminStatus 来判断接口是否已启动并正在运行而不是 ifOperStatus 是否安全?

My question is - why the reported statuses are different and is it safe to use just ifAdminStatus to tell if the interface is up and running instead of ifOperStatus?

谢谢!

这是带有附加接口信息的 snmpwalk:

Here is snmpwalk with additional interfaces info:

snmpwalk -Os -c public -v 1 192.168.1.1 1.3.6.1.2.1.2.2.1
[.....]
ifIndex.12 = INTEGER: 12    
ifIndex.13 = INTEGER: 13
ifIndex.14 = INTEGER: 14
[.....]
ifDescr.12 = STRING: etherip0
ifDescr.13 = STRING: ppp0
ifDescr.14 = STRING: tun1
[.....]
ifType.12 = INTEGER: ethernetCsmacd(6)
ifType.13 = INTEGER: ppp(23)
ifType.14 = INTEGER: other(1)

推荐答案

ifAdminStatus 显示接口是否启用操作

ifAdminStatus reveals whether the interface is enabled for operation

ifOperStatus 显示接口是否已成功形成链接.

ifOperStatus reveals whether the interface has successfully formed a link.

您引用的文档仅断言 ifAdminStatus=down 表示 ifOperStatus=down.ifIndex 12 也是如此.

The documentation you cited only asserts that ifAdminStatus=down means ifOperStatus=down. That much is true with ifIndex 12.

ifAdminStatusifIndex 13 和 14 报告为 up.因此,您从 Cisco 文档中引用的指南不适用.这些接口的运行状态仍可能处于关闭状态,即使它们已启用运行.一种简单的情况是,如果没有电缆插入其中.

ifAdminStatus reports ifIndex 13 and 14 as up. Therefore, the guidance you quoted from Cisco's documentation doesn't apply. The operational status of those interfaces can still be down, even if they are enabled to operate. One simple case would be if no cable was plugged into them.

编辑

我一直在回答这个问题,我以为你有一个运行 IOS 的 Cisco 路由器.根据您的 snmpwalk,这实际上是一个 Linksys

The whole time I have been answering this question, I thought you had a Cisco router running IOS. Based on your snmpwalk, this is in fact a Linksys

sysDescr.0 = STRING: Linux Linksys E4200 2.6.24.111 #8614 
    Tue Dec 20 05:09:38 CET 2011 mips

根据我看到的证据,您无法监控 PPPoE 连接的 ifOperStatus;他们没有将那么多功能编码到 Linksys 上的 SNMP 代理中.

Based on the evidence I have seen, you just cant monitor ifOperStatus for your PPPoE connection; they didnt code that much functionality into the SNMP agent on the Linksys.

这篇关于SNMP:ifAdminStatus 与 ifOperStatus的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆