跳到主要内容

3. 规范

本文档的目的是规定一种标准的 ping, traceroute 和 OSI 路由表转储机制, 供 OSI 互联网中的 ISO 8473 (CLNP) 协议使用. 所规定机制的详细描述如下. 这些机制必须 (MUST) 在每一个为互联网提供 OSI 服务的路由器 (中间系统) 或主机 (端系统) 上可用. 这三种功能是互联网 OSI 网络层的基本工具集.

3.1. Ping​

3.1.1. 协议支持​

如 1575 中所述, 长期回显机制需要在 ISO 8473 网络协议数据单元 (NPDU), 或者更准确地说是报文的报文头中使用两个新的类型值. 这两个值是:

1E(hex) - for the echo-request Selector and,
1F(hex) - for the echo-response Selector.

支持 ISO 8473 但不支持这两个新值 (用于 ISO 8473 报文头中类型代码选项字段) 的节点, 如果报文中设置了 ERROR 报告标志, 则必须 (MUST) 发回一个错误报文.

为了支持 ISO 8473 的 ping 功能, 所有端系统 (主机) 和中间系统 (路由器) 必须 (MUST) 支持 RFC 1575 [3] 定义的 "长期" 回显功能, 并且还要在 8473 报头中设置 ERROR 报告标志.

设置 ERROR 报告标志是必需的, 因为这为遵守规范的主机或路由器 ping 不遵守规范的主机或路由器提供了一种途径. 当不遵守规范的主机或路由器收到带有新类型功能 (回显请求选择器, Echo Request Selector) 的 "ping" 报文时, 它必须 (MUST) 尝试向发起主机返回一个 ISO 8473 错误报文, 从而表明可达性.

3.1.2. ping 工具支持的功能​

ping 工具必须 (MUST) 能够提供每个报文的往返时间 (Round trip time), 以及多个 ping 报文的平均最小和最大 RTT. 当节点收到错误报文时, ping 工具必须 (MUST) 向用户报告错误代码.

3.2. Traceroute​

CLNP 跟踪与 ping 工具类似, 不同之处在于它利用 ISO 8473 报文中的 "Lifetime" 字段. 支持 OSI 的主机和路由器还必须 (MUST) 支持 CLNP 跟踪. "Lifetime" 字段的作用与 IP 报文中的生存时间 (Time To Live, TTL) 字段相同. 节点 (路由器或主机) 不能转发 Lifetime 值为零的 ISO 8473 报文. 如果 ISO 8473 报文中设置了 ERROR REPORT 标志, 则会向报文的发起者返回一个错误报文.

3.2.1. 基本 Traceroute​

如果发送的 ISO 8473 回显请求报文的 "Lifetime" 字段值为 1, 则第一跳节点 (路由器或端系统) 将向该报文的发起者返回一个错误报文. 如果第一跳节点支持回显请求类型字段, 则错误代码将是以下之一:

A0 (hex) - Lifetime Expired while Data Unit in Transit
A1 (hex) - Lifetime Expired during Re-assembly

如果第一跳节点不支持回显请求类型字段, 则错误代码将是:

B0 (hex) - Unsupported Option not Specified.

在尝试跟踪到远程节点的路由时, 发送的回显请求报文中的目的地址应为该远程目的地址. 通过在 "Lifetime" 字段中使用递增的值, 可以穿过网络跟踪到远程节点的路由. 应在每个系统 (主机或路由器) 上实现此 traceroute 功能, 以允许用户跟踪到远程主机或路由器的网络路径.

错误消息用作第一跳的可达性和身份的证据. 然后发起者发送一个 "lifetime" 字段值为 2 的报文. 第一跳递减 "Lifetime", 由于 "Lifetime" 仍大于 0, 它将其转发出去. 第二跳递减 "Lifetime" 字段值, 并将带有上述两个 "Lifetime Expired" 错误代码之一的错误报文 (ER NPDU) 发送给发起者. 重复此序列, 直到出现以下情况之一:

- the remote host is reached an either an echo-response packet is
sent back or (for nodes that do not have the required Echo
support) an error packet is sent back, or

- the an error packet is received with error code (B0) indicating
that a node will not pass the echo-response packet, or

- an error packet is received with one of the following errors:

80(hex) - Destination Address Unreachable
81(hex) - Destination Address Unknown.

如果在错误报文中收到以下任何错误代码, 发起节点应发送第二个报文:

CodeReason from 8473
-----------------------------
00(hex) - Reason not specified
01(hex) - Protocol procedure error
02(hex) - Incorrect checksum
03(hex) - Packet Discarded due to Congestion
04(hex) - Header Syntax Error (cannot be parsed)
05(hex) - Segmentation needed but not permitted
06(hex) - Incomplete packet received
07(hex) - Duplicate Option
B1(hex) - Unsupported Protocol Version
B2(hex) - Unsupported Security Option
B3(hex) - Unsupported Source Routeing Option
B4(hex) - Unsupported Recording of Route Option
C0(hex) - Reassembly Interface

如果检测到这些错误之一, 应向用户返回一个错误值. 在一个 "Lifetime" 值下可以发送多个回显报文. 附加回显报文的数量由该 traceroute 功能的实现自行决定.

如果收到以下错误之一, 并且回显请求报文中未指定 "部分源路由" (partial source route), 则以一个 "Lifetime" 值向目的地址发送第二个回显请求报文:

Code      Reason from 8473
--------------------------------
90(hex) Unspecified Source Routeing Error
91(hex) Syntax Error in Source Routeing Field
92(hex) Unknown Address in Source Routeing Field
93(hex) Path not Acceptable

(回显请求报文可能在穿过网络时已损坏.)

3.2.2. 在 traceroute 中使用部分源路由​

当前的 IP traceroute 具有第三方或 "松散源路由" (loose source route) 功能. ISO 8473 协议也支持 "部分源路由" (partial source routeing) 功能. 但是, 如果节点 (路由器或主机) 不支持 "部分源路由" 功能, 则 ISO 8473 报文会沿路径传递, "就像未选择该功能一样. 报文不应因此被丢弃." [2]

为了在 OSI traceroute 中利用部分源路由功能, 节点必须 (MUST) 设置 "源路由" (source routeing) 选项以及该选项内的 "部分源路由" (partial source routeing) 参数. 第三方或 "松散源路由" traceroute 功能要求节点发送设置了 "松散源路由" 字段的回显请求报文. 第三方/"松散源路由" traceroute 的工作方式相同, 但以下错误会导致 traceroute 终止:

Code      Reason from ISO 8473
--------------------------------------------------
92 Unknown Address in Source Routeing Field
93 Path not Acceptable

这些错误可能表明回显请求报文中为该目的地址列出的 "松散源路由" 存在问题. 具有相同 lifetime 的附加报文只会重复此错误. 这些错误应报告给 traceroute 功能的用户.

3.2.3. Traceroute 工具需要提供的信息​

traceroute 工具应向用户提供以下信息:

- the identity of systems that comprise the path or route
to the destination (the identifiers are called Network
Entity Titles or NETs in OSI and ISO 8473)

- ping times (in Round trip times) for each
hop in the path,

- error codes from error packet received as a
response to the an echo-request packet, and

- any other error conditions encountered
by traceroute.

3.3. OSI 路由表转储​

每个 OSI 主机 (端系统) 或路由器 (中间系统) 必须 (MUST) 能够转储其任何路由表. 路由表可能来自:

a.) the ES-IS information
b.) static
c.) IS-IS
d.) IDRP

或任何其他来源.

每个系统必须 (MUST) 能够通过某种带外机制转储路由表条目. 必须存在提供这些条目的方法. 应创建一个 show osi routes 命令, 并带有以下选项:

- a        for all routes
- esis for es-is routes
- isis for is-is routes
- idrp for idrp routes
- static for static routes
- other for routes from other sources.

此外, 路由表应可通过 SNMP 或 CMIP 获得. CMIP 变量的规范不在本规范的范围内. 第 3.4 节规定了必须 (MUST) 通过 SNMP 获得的 RFC 1238 MIB 变量. 这两个变量只是让用户获得一些基本的 CLNS 路由信息.

请注意, 并非所有请求的信息都可通过 CLNS MIB 获得. 因此, 预计将来会对 CLNS MIB 开展更多工作. 当编写新的 MIB 时, 预计本文档将更新以包含额外的 MIB 变量, 用于收集诸如 ES-IS 缓存之类的信息.

3.4. 可通过 SNMP 获取的 MIB 变量​

简单网络管理协议 [6] 在监控互联网中多协议受管资源方面发挥着重要作用. 按照惯例, SNMP 被映射到用户数据报协议 (UDP), 6); 但是, 在无法通过 UDP 上的 SNMP 与 ISO 8473 受管资源通信, 或者通过 SNMP/UDP 与 ISO 8473 受管资源通信不可行或不适当的情况下, SNMP 报文应映射到 OSI 传输 (7). 为便于使用 SNMP 进行远程监控, 应支持以下用于 SNMP 的受管对象:

简单网络管理协议 (SNMP) 在监控互联网中多协议受管资源方面发挥着重要作用. 按照惯例, SNMP 被映射到用户数据报协议 (UDP); 但是, 在无法通过 UDP 上的 SNMP 与 ISO 8473 受管资源通信, 或者通过 SNMP/UDP 与 ISO 8473 受管资源通信不可行或不适当的情况下, SNMP 应映射到 OSI 传输 (8). 为便于使用 SNMP 进行远程监控, 应支持以下受管对象:

3.4.1. MIB 变量摘要​

RFC 1238 CLNS MIB [5]

1) clnpAddrTable - Addresses for Interfaces
2) clnpRoutingTable - OSI routes in system routing table.

3.4.2. 这些 MIB 变量的 ASN.1 语法​

为便于参考, 下面列出了 CLNS MIB (RFC 1238) 中这两个变量的 ASN.1 语法. 该 RFC 仍然是 MIB 定义的权威来源.

1) clnpAddrTable

  clnpAddrTable OBJECT-TYPE
  object.id =  .... {clnp 21 }

  clnpAddrTable = SEQUENCE OF ClnpAddrEntry
  CLNPAddrEntry ::= SEQUENCE {
        clnpAdEntAddr
                CLNPAddres,
        clnpAdEntIfIndex,
                INTEGER,
        clnpAdEntReasmMaxSize
                INTEGER (0...65535);
        }

    clnpAdEntAddr = ClnpAddress
    clnpAddress = OCTET string (Size (1...20);
    clnpAdEntIfIndex = INTEGER;
    clnpAdEntReasmMaxSize = INTEGER (0...65535);   #

Descriptions of Table entry values:

clnpAdEntAddr - CLNP address for this interface value
clnpAdEntIfIndex - Interface Index value corresponding to
                   IfIndex value.
clnpAdEntReasmMaxSize = Maximum size of a pdu that can be
                        reassembled from incoming PDUs
                        received on this interface.

2)  clnpRoutingTable

   object id =....{clnp 22}
   clnpRoutingTable =  SEQUENCE OF ClnpRouteEntry;
   ClnpRouteEntry = SEQUENCE OF {
                clnpRouteDest,
                clnpRouteIfIndex,
                clnpRouteMetric1,
                clnpRouteMetric2,
                clnpRouteMetric3,
                clnpRouteNextHop,
                clnpRouteType,
                clnpRouteProto,
                clnpRouteAge,
                clnpRouteInfo}

  clnpRoutDest ::= ClnpAddress;    # Address in Route table
                                   # (prefix or full address
  clnpRouteIfIndex ::= Integer;    # IfIndex value for
                                   # interface next hop can
                                   # be reached through.
  clnpRouteMetric1 ::= Integer;    # primary routing metric
                                   # for this protocol.
                                   # Specific meaning
                                   # depends on clnpRouteProto
                                   # value -1 if not used
  clnpRouteMetric2 ::= Integer;    # alternate routing metric
                                   # for this protocol.
                                   # Specific meaning
                                   # depends on clnpRouteProto
                                   # value -1 if not used
  clnpRouteMetric3 ::= Integer;    # alternate routing metric
                                   # for this protocol.
                                   # Specific meaning
                                   # depends on clnpRouteProto
                                   # value -1 if not used
  clnpRouteMetric4::= Integer;     # alternate routing metric
                                   # for this protocol.
                                   # Specific meaning
                                   # depends on clnpRouteProto
                                   # value -1 if not used
  clnpRouteNextHop::= ClnpAddress; # Address of Next Hop in
                                   # Routing
                                   # Table
  clnpRouteType::=INTEGER {
                other (1),         # none of following
                invalid (2),       # an invalid route
                direct(3),         # a direct route

                remote(4)}         # a remote route

  clnprouteProto::= INTEGER {
                other (1),         # none of the following
                                   # (manually configured
                                   # falls in this category)
                local(2),          # configured entries
                netmngt(3),        # set via Network
                                   # management
                is-is(9),          # ISO 10589
                ciscoIgrp(11),     # Ciscos OSI IGRP
                ospf(13),          # OSPF set
                bgp(14),           # BGP sets
                idrp(15)           # addition suggested to
                                   # rfc 1238
                                   # in processing
  clnpRouteMetric5::= Integer;     # alternate routing metric
                                   # for this protocol.
                                   # Specific meaning
                                   # depends on clnpRouteProto
                                   # value -1 if not used
  clnpRouteInfo ::= OBJECT-ID;     # protocol id that
                                   # installed this route
                }