跳到主要内容

5.2. Interfaces 组

对所有系统而言, Interfaces 组的实现都是 mandatory 的.

OBJECT: ifNumber { interfaces 1 }

Syntax: INTEGER

Definition: 本系统能够在其上发送/接收 IP 数据报的网络接口数量 (无论这些接口当前处于何种状态).

Access: read-only

Status: mandatory

5.2.1. Interfaces 表​

OBJECT: ifTable { interfaces 2 }

Syntax: SEQUENCE OF IfEntry

Definition: 接口表项的列表. 表项数量由 ifNumber 的值给出.

Access: read-write

Status: mandatory

OBJECT: ifEntry { ifTable 1 }

Syntax:

IfEntry ::= SEQUENCE {
ifIndex
INTEGER,
ifDescr
OCTET STRING,
ifType
INTEGER,
ifMtu
INTEGER,
ifSpeed
Gauge,
ifPhysAddress
OCTET STRING,
ifAdminStatus
INTEGER,
ifOperStatus
INTEGER,
ifLastChange
TimeTicks,
ifInOctets
Counter,
ifInUcastPkts
Counter,
ifInNUcastPkts
Counter,
ifInDiscards
Counter,
ifInErrors
Counter,
ifInUnknownProtos
Counter,
ifOutOctets
Counter,
ifOutUcastPkts
Counter,
ifOutNUcastPkts
Counter,
ifOutDiscards
Counter,
ifOutErrors
Counter,
ifOutQLen
Gauge
}

Definition: 一个接口表项, 其中包含针对某个特定接口的, 位于子网层及其以下各层的对象.

Access: read-write

Status: mandatory

下面我们逐一考察每个接口表项的各个组成部分:

OBJECT: ifIndex { ifEntry 1 }

Syntax: INTEGER

Definition: 每个接口的唯一取值. 其取值范围在 1 到 ifNumber 的值之间. 每个接口的取值至少应从实体的网络管理系统的一次重新初始化到下一次重新初始化之间保持不变.

Access: read-only

Status: mandatory

OBJECT: ifDescr { ifEntry 2 }

Syntax: OCTET STRING

Definition: 一段包含接口相关信息的文字串. 该字符串应包含制造商名称, 产品名称以及硬件接口的版本. 该字符串是供人阅读的; 它不得包含可打印 ASCII 字符之外的任何内容.

Access: read-only

Status: mandatory

OBJECT: ifType { ifEntry 3 }

Syntax:

INTEGER {
other(1), -- none of the following
regular1822(2),
hdh1822(3),
ddn-x25(4),
rfc877-x25(5),
ethernet-csmacd(6),
iso88023-csmacd(7),
iso88024-tokenBus(8),
iso88025-tokenRing(9),
iso88026-man(10),
starLan(11),
proteon-10MBit(12),
proteon-80MBit(13),
hyperchannel(14),
fddi(15),
lapb(16),
sdlc(17),
t1-carrier(18),
cept(19), -- european equivalent of T-1
basicIsdn(20),
primaryIsdn(21),
-- proprietary serial
propPointToPointSerial(22)
}

Definition: 接口的类型, 根据协议栈中紧邻 IP "之下" 的物理/链路/网络协议来区分.

Access: read-only

Status: mandatory

OBJECT: ifMtu { ifEntry 4 }

Syntax: INTEGER

Definition: 可在该接口上发送/接收的最大 IP 数据报的大小, 以八位组为单位.

Access: read-only

Status: mandatory

OBJECT: ifSpeed { ifEntry 5 }

Syntax: Gauge

Definition: 对接口当前带宽的估计, 以每秒比特数为单位. 对于带宽不变化的接口, 或无法做出准确估计的接口, 该对象应包含标称带宽.

Access: read-only

Status: mandatory

OBJECT: ifPhysAddress { ifEntry 6 }

Syntax: OCTET STRING

Definition: 该接口在协议栈中紧邻 IP "之下" 协议层上的地址. 对于没有此类地址的接口 (例如串行线路), 该对象应包含长度为零的八位组串.

Access: read-only

Status: mandatory

OBJECT: ifAdminStatus { ifEntry 7 }

Syntax:

INTEGER {
up(1), -- ready to pass packets
down(2),
testing(3) -- in some test mode
}

Definition: 接口的期望状态. testing(3) 状态表示不能传递任何可运行的报文.

Access: read-write

Status: mandatory

OBJECT: ifOperStatus { ifEntry 8 }

Syntax:

INTEGER {
up(1), -- ready to pass packets
down(2),
testing(3) -- in some test mode
}

Definition: 接口当前的操作状态. testing(3) 状态表示不能传递任何可运行的报文.

Access: read-only

Status: mandatory

OBJECT: ifLastChange { ifEntry 9 }

Syntax: TimeTicks

Definition: 接口进入其当前操作状态时的 sysUpTime 值. 如果当前状态是在本地网络管理子系统上次重新初始化之前进入的, 则该对象包含的值为零.

Access: read-only

Status: mandatory

OBJECT: ifInOctets { ifEntry 10 }

Syntax: Counter

Definition: 在该接口上接收到的八位组总数, 包括成帧字符.

Access: read-only

Status: mandatory

OBJECT: ifInUcastPkts { ifEntry 11 }

Syntax: Counter

Definition: 交付给更高层协议的 (子网) 单播报文数量.

Access: read-only

Status: mandatory

OBJECT: ifInNUcastPkts { ifEntry 12 }

Syntax: Counter

Definition: 交付给更高层协议的非单播 (即子网广播或子网多播) 报文数量.

Access: read-only

Status: mandatory

OBJECT: ifInDiscards { ifEntry 13 }

Syntax: Counter

Definition: 被选择丢弃的入站报文数量, 这些报文虽未检测到任何阻止其交付给更高层协议的错误. 丢弃此类报文的一个可能原因是为了腾出缓冲区空间.

Access: read-only

Status: mandatory

OBJECT: ifInErrors { ifEntry 14 }

Syntax: Counter

Definition: 包含错误, 从而无法交付给更高层协议的入站报文数量.

Access: read-only

Status: mandatory

OBJECT: ifInUnknownProtos { ifEntry 15 }

Syntax: Counter

Definition: 经由该接口接收到的, 因协议未知或不受支持而被丢弃的报文数量.

Access: read-only

Status: mandatory

OBJECT: ifOutOctets { ifEntry 16 }

Syntax: Counter

Definition: 从该接口发出的八位组总数, 包括成帧字符.

Access: read-only

Status: mandatory

OBJECT: ifOutUcastPkts { ifEntry 17 }

Syntax: Counter

Definition: 更高层协议请求向子网单播地址发送的报文总数, 包括那些被丢弃或未发送的报文.

Access: read-only

Status: mandatory

OBJECT: ifOutNUcastPkts { ifEntry 18 }

Syntax: Counter

Definition: 更高层协议请求向非单播 (即子网广播或子网多播) 地址发送的报文总数, 包括那些被丢弃或未发送的报文.

Access: read-only

Status: mandatory

OBJECT: ifOutDiscards { ifEntry 19 }

Syntax: Counter

Definition: 被选择丢弃的出站报文数量, 这些报文虽未检测到任何阻止其发送的错误. 丢弃此类报文的一个可能原因是为了腾出缓冲区空间.

Access: read-only

Status: mandatory

OBJECT: ifOutErrors { ifEntry 20 }

Syntax: Counter

Definition: 因错误而无法发送的出站报文数量.

Access: read-only

Status: mandatory

OBJECT: ifOutQLen { ifEntry 21 }

Syntax: Gauge

Definition: 输出报文队列的长度 (以报文数为单位).

Access: read-only

Status: mandatory