[信息与通信]以太网OAM协议解析及测试关注点.doc
以太网OAM(802.3ah)协议分析及测试关注点DOCUMENT ID: PRODUCT: RELEASE:2.0FEATURE: SUBSYSTEM:DISTRIBUTE TO:1以太网OAM简介22以太网OAM在网络上的应用23OAMPDU报文解析及工作原理23.1报文解析23.2几种最常见的OAMPDU用法:23.2.1Information OAMPDU23.2.2Event Notification OAMPDU23.2.3Loopback Control OAMPDU23.3以太网OAM工作原理:23.3.1建立以太网OAM连接:23.3.2链路监控23.3.3远端故障检测23.3.4远端环回24Feature list24.1主要功能24.2工作原理24.3Event Notification的处理24.4OAMPDU报文24.5Local Information TLVs24.6Remote Information TLVs24.7Link Event TLVs24.8Variables Descriptors and Containers25测试关注点:25.1概述:25.2具体测试点:21 以太网OAM简介以太网OAM(Operations, Administration and Maintenance,操作、管理和维护)是一种监控网络问题的工具。它工作在数据链路层,利用设备之间定时交互OAMPDU(OAM Protocol Data Units,OAM 协议数据单元)来报告网络的状态,使网络管理员能够更有效地管理网络。 2 以太网OAM在网络上的应用 随着数据业务的广泛应用,以太网在通信网络中扮演着越来越重要的作用,但是以太网与传统的SDH相比,在网络故障告警、链路质量、维护手段等方面都略逊一筹。于是国际标准化组织IEEE,先后推出了802.3ah(2004)和802.1ag(2007)两个标准化协议来强化以太网在维护、告警方面的能力。 802.3ah的以太网OAM主要是链路方面的监测和维护,是一种偏物理层的OAM,它主要应用在网络的边缘设备上(接入层),且OAMPDU报文只能转发一跳,主要用来监测链路质量、收集链路告警等。而802.1ag的以太网OAM是偏网络和应用的OAM,主要用在汇聚层和核心层上,它的OAMPDU报文能够传输多跳。它不仅能够监测链路质量、收集告警,还能够实现电信级快速倒换以及traceroute、ping等功能。在TN705/725上的MPLS OAM就部分参考了802.1ag的协议,大家有兴趣可以仔细研究下。 由于TN703产品主要定位于接入网络边缘,因而目前只要求支持802.3ah的以太网OAM即可。802.3ah以太网OAM最主要的功能主要有三个方面,分别是:1、链路性能监测:可以对链路故障进行检测;2、故障侦测和告警:可以在链路出现故障时及时通知网络管理员;3、环路测试:通过将非OAMPDU 环回来检测链路故障。注:下文中“以太网OAM”如未特殊标明,均指802.3ah的以太网OAM。3 OAMPDU报文解析及工作原理3.1 报文解析几个重要字段的含义如下:。 Dest addr:以太网OAM 报文的目的MAC 地址,为组播MAC 地址0180c2000002。Source addr:以太网OAM 报文的源MAC 地址,为发送端的桥MAC 地址,该地址是一个单播MAC 地址。Type:以太网OAM 报文的协议类型,为0x8809。Subtype:以太网OAM 报文的协议子类型,为0x03。Flags:Flags 域,包含了以太网OAM 实体的状态信息。Code:本字段指明了OAMPDU的报文类型。0x00 表示Information OAMPDU、0x01 表示Event Notification OAMPDU 、0x04 表示Loopback Control OAMPDUØ Flags 域:主要用来标示链路的故障信息:值得注意的是对于Critical Event, Dying Gasp, and Link Fault 这些链路告警的具体定义,在802.3ah协议中是没有注明的。这可能要厂家根据需要自行定义。3.2 几种最常见的OAMPDU用法:在ETH OAM中最常见的三种OAMPDU报文分别是Information OAMPDU、Event Notification OAMPDU和Loopback Control OAMPDU,下面将分别加以介绍:3.2.1 Information OAMPDU用于将以太网OAM 实体的状态信息(包括本地信息、远端信息和自定义信息)发给远端的以太网OAM 实体,保持以太网OAM 连接。具体的报文结构形式:3.2.2 Event Notification OAMPDU(事件通知OAMPDU)一般用于链路监控,是用于对连接本端和远端以太网OAM 实体的链路发生的故障进行告警。具体的报文格式:3.2.3 Loopback Control OAMPDU(环路控制OAMPDU)报文主要用于远端环回控制。环回控制OAMPDU 报文用来控制远端设备的OAM 环回状态,该报文中带有使能或去使能环回功能的信息,根据该信息开启或关闭远端环回功能。具体的报文格式:3.3 以太网OAM工作原理:3.3.1 建立以太网OAM连接: 以太网OAM 连接过程也称作Discovery 阶段,本阶段是OAM 实体发现远端设备的OAM 实体,并与之建立稳定对话的过程。 在这个阶段中,相连的以太网OAM 实体(即使能OAM 功能的端口)通过交互Information OAMPDU 向对端通报各自的以太网OAM 配置信息及本地节点支持的以太网OAM 能力信息。OAM 实体收到对端配置参数后,决定是否同意建立OAM连接,如果两端的以太网OAM 对Loopback 功能、单向链路检测及链路事件的配置都通过检查时,以太网OAM 协议将在链路层开始正常工作。 我们可以选择两种模式来进行以太网OAM的连接:主动模式和被动模式两种模式下的设备处理能力如下表所示: 处理能力主动模式被动模式初始化以太网OAM Discovery 过程可以不可以对以太网OAM Discovery 初始化过程的响应可以可以发送Information OAMPDU可以可以发送Event Notification OAMPDU可以可以发送不携带TLV 的Information OAMPDU可以可以发送Loopback Control OAMPDU可以不可以对Loopback Control OAMPDU 的响应可以,但需要对端也处于主动模式下可以发送组织指定的OAMPDU可以可以发送 Variable Request OAMPDUs可以不可以发送Variable Response OAMPDUs可以可以发送带团队属性的特殊 OAMPDUs可以可以当然在两个peer to peer 的端口上,都配置成active端口也是可以的。以太网OAM 连接建立后,两端的OAM 实体通过发送Information OAMPDU 保持连接。若在5 秒钟内没有收到对端OAM 实体的Information OAMPDU,则认为连接超时,需要重新建立OAM 连接。3.3.2 链路监控链路监控用于检测和发现链路层的故障。以太网OAM 利用Event Notification OAMPDU 的交互来进行链路监控。当链路故障发生时,本地链路监控到故障后,将向对端以太网OAM 实体发送Event NotificationOAMPDU,通报一般链路事件。我们可以通过观察日志信息动态地掌握网络的状况。一般链路事件的定义如下: 一般链路事件定义错误信号事件单位时间内的错误信号数量超过定义的阈值错误帧事件单位时间内的错误帧数量超过定义的阈值错误帧周期事件指定帧数N 为周期,在收到N 个帧的周期内错误帧数超过定义的阈值错误帧秒数事件指定M 秒数下有错误帧的秒数超过了定义的阈值(错误帧秒的定义:在某一秒内发生了错误帧,则该秒为错误帧秒)3.3.3 远端故障检测OAMPDU 定义了一个标志(Flag 域)允许以太网OAM 实体把该故障信息传送给对端。该标志可以表示下列紧急链路事件:.链路故障(Link Fault):对端链路信号丢失。.致命故障(Dying Gasp):不可预知的状态发生,比如电源中断。. 紧急事件(Critical Event):不能确定的紧急事件发生。以太网OAM 连接过程中是不断的发送Information OAMPDU 的,本端OAM 实体可以将本端发生的紧急链路事件信息通过Information OAMPDU 告诉远端OAM 实体。当A与B之间的链路有一条发生故障时,B设备就会立即将含有链路故障信息的OAMPDU报文通过另一条链路发送给A。这样,可以通过观察日志信息动态地了解链路的状态,对相应的错误及时进行处理。 需要注意的是远端的故障监测只能工作在双发双收的链路上,即双向链路中有一条失效,另一条还继续工作的那种情况。3.3.4 远端环回 Loopback OAMPD U的底层转发流程:远端环回只有在以太网OAM 连接建立完成后才能实现。在连接建立的情况下,主动模式的OAM 实体发起远端环回命令,对端实体对该命令进行响应。当远端处于环回模式下,除了OAMPDU 报文以外的所有报文都将按照原路返回,而OAMPDU报文将继续上送至被环回设备的CPU进行处理。通过进行环回检测可以及时发现网络故障,并通过分段环回检测来帮助定位故障发生的具体区域。4 Feature list4.1 主要功能ItemFeatureSubclauseValue/CommentSupportOMOAM object class30.3.6MustCSIOAM client service interfaces57.2.5MustISIInternal service interfaces57.2.8Must*ACTVActive mode57.2.9 Must*PASSPassive mode57.2.9 Must*LBOAM remote loopback57.2.11, Table 578MustUNIUnidirectional operation57.2.12, Table 578Requires support for unidirectional operation as defined in Clause 66.Must*EVNTLink Events57.4.3.2,57.5.3Must*VARVariable Retrieval57.4.3.3,57.4.3.4May*OSPOrganization SpecificOAMPDU57.4.3.6May*OSEOrganization Specific Events57.5.3.5MayOSIOrganization SpecificInformation TLV57.5.2.3May4.2 工作原理ItemFeatureSubclauseValue/CommentSupportOFS1Passive mode limited transmission57.2.9.2Cannot send Variable Request orLoopback Control OAMPDUs MustOFS2Discovery state diagram57.3.2.1Implemented as defined in Figure575MustOFS3Transmit state diagram57.3.2.2Implemented as defined in Figure576MustOFS4OAMPDU transmission when local_pdu is set to LF_INFO57.3.2.2.6Only Information OAMPDUs with Link Fault bit of Flags field and without Information TLVs can be transmittedMustOFS5OAMPDU transmission when local_pdu is set to RX_INFO57.3.2.2.6No OAMPDU transmission allowedMustOFS6OAMPDU transmission when local_pdu is set to INFO57.3.2.2.6Only Information OAMPDUs can be transmittedMustOFS7OFS8OAMPDU transmission when local_pdu is set to ANY:OAM_CTL.request service primitive with one or more critical link event parametersOAMPDU.request service primitive57.3.2.2.657.3.2.2.6Requests transmission of Information OAMPDU with appropriate bits of Flags field setRequests transmission ofOAMPDUMustOFS9OFS10OAMPDU Flags field reserved encodingsRemote Stable and RemoteEvaluating bitsLocal Stable and Local Eval- uating bitsTable 573Table 573Encoding of 0x3 is not transmittedEncoding of 0x3 is not transmittedMustOFS11Reserved bitsTable 573Reserved bits are zero on transmissionMustOFS12OAMPDU Code field57.4.2.2Only defined Code field values are permitted in transmitted OAMP- DUsMustOFS13OAMPDU reception when local_pdu is not set to ANY57.3.2.3Only Information OAMPDUs are sent to OAM client entityMustOFS14OAMPDU reception when local_pdu is set to ANY57.3.2.3All OAMPDUs are sent to OAMclient entityMustOFS15Multiplexer state diagram57.3.3Implemented as defined in Figure577MustOFS16Multiplexer transparent pass- through57.3.3.2Provide transparent pass-through of frames from superior sublayer to subordinate sublayerMustOFS17Effect of OAMPDU on a frame already submitted to subordinate sublayer57.3.3.2Has no effectMustOFS18Parser state diagram57.3.4Implemented as defined in Figure578Must4.3 Event Notification的处理ItemFeatureSubclauseValue/CommentSupportEV1Response to Critical Events57.2.10.3Set/clear Flag bits based on OAM_CTL.request service primitiveMustEV2Critical Event reception57.2.10.4Indicated via Flags field of OAMPDU.indication service primitiveMustEV3Link Event reception57.2.10.4Indicated via OAMPDU.indication service primitive with all received Event Notification OAMPDUsMust4.4 OAMPDU报文ItemFeatureSubclauseValue/CommentSupportPDU1Tagging57.4.2OAMPDUs cannot be taggedMustPDU2OAMPDU structure57.4.2As defined in Figure 579 and field definitionsMustPDU3Minimum OAMPDU size57.4.2Support OAMPDUs minFrame- Size in lengthMustPDU4Information OAMPDU frame structure57.4.3.1Shown in Figure 5710MustPDU5Information OAMPDU when local_pdu set to LF_INFO57.4.3.1Data field contains zeroInformation TLVsMustPDU6PDU7Information OAMPDU when local _pdu not set to LF_INFOremote_state_valid=FALSEremote_state_valid=TRUE57.4.3.157.4.3.1Data field contains LocalInformation TLVData field contains Local andRemote Information TLVsMustPDU8Type values 0x03-0xFDTable 576Not to be sentMustPDU9Type value 0xFFTable 576Not to be sentMustPDU10Event Notification OAMPDUframe structure57.4.3.2Shown in Figure 5711MustPDU11Event Notification OAMPDU Sequence Number57.4.3.2The first two bytes of the Data field contain a Sequence Number encoded as an unsigned 16-bit integerMustPDU12Event Notification OAMPDU Event(s)57.4.3.2Data field containing one or more Link Event TLVsfollowing the Sequence NumberMustPDU13Variable Request OAMPDUframe structure57.4.3.3Shown in Figure 5712MayPDU14Variable Request OAMPDU Data field57.4.3.3Data field contains one or moreVariable DescriptorsMayPDU15Variable Response OAMPDUframe structure57.4.3.4Shown in Figure 5713MayPDU16Variable Response OAMPDU Data field57.4.3.4Data field contains one or moreVariable ContainersMayPDU17Loopback Control OAMPDUframe structure57.4.3.5Shown in Figure 5714MustPDU18Loopback Control OAMPDU Data field57.4.3.5Data field contains a single OAM Remote Loopback command from Table 575.MustPDU19Command value 0x00Table 575Not to be sentMustPDU20Command values 0x03-0xFFTable 575Not to be sentMustPDU21Organization SpecificOAMPDU frame structure57.4.3.6Shown in Figure 5715MayPDU22Organization Specific OAMPDU Organizationally Unique Identifier field57.4.3.6Contains 24-bit OrganizationallyUnique IdentifierMay4.5 Local Information TLVsItemFeatureSubclauseValue/CommentSupportLIT1Local Information TLV57.5.2.1Contains the following fields: Information Type, Information Length, OAM Version, Revision, State, OAM Configuration, OAMPDU Configuration, OUI, Vendor Specific InformationMustLIT2Local Information TLV OAM Version field57.5.2.1Contains 0x01 to claim compliance to this specificationMustLIT3Local Information TLV Revi- sion Field57.5.2.1Starts at zero and incremented each time a Local Information TLV field changes.MustLIT4Local Information TLV State field57.5.2.1As defined in Table 577MustLIT5Local Information TLV State field Parser Action 0x3 value57.5.2.1Is not transmittedMustLIT6Reserved bitsTable 577Reserved bits are zero on transmissionMustLIT7Local Information TLV OAM Configuration field57.5.2.1As defined in Table 578MustLIT8Reserved bitsTable 578Reserved bits are zero on transmissionMustLIT9Local Information TLV OAMPDU Configuration field57.5.2.1As defined in Table 579MustLIT10Local Information TLV OUIfield57.5.2.1As defined in Table 5710MustLIT11Reserved bitsTable 579Reserved bits are zero on transmissionMustLIT12Local Information TLV VendorSpecific Information field57.5.2.1As defined in Table 5711Must4.6 Remote Information TLVsItemFeatureSubclauseValue/CommentSupportRIT1Remote Information TLV57.5.2.2Contains the Information Type field specifying the Remote Information TLV Type value and all remaining fields are copied from the last received Local Information TLV from remote OAM peerMust4.7 Link Event TLVsItemFeatureSubclauseValue/CommentSupportET1Errored Symbol Period EventTLV structure57.5.3.1Contains the following fields: Event Type, Event Length, Event Time Stamp, Errored Symbol Window, Errored Symbol Threshold, Errored Symbols, Error Running Total, Event Running TotalMustET2Errored Frame Event TLV structure57.5.3.2Contains the following fields: Event Type, Event Length, Event Time Stamp, Errored Frame Window, Errored Frame Threshold, Errored Frames, Error Running Total, Event Running TotalMustET3Errored Frame Period Event TLV structure57.5.3.3Contains the following fields: Event Type, Event Length, Event Time Stamp, Errored Frame Window, Errored Frame Threshold, Errored Frames, Error Running Total, Event Running TotalMustET4Errored Frame Seconds Summary Event TLV structure57.5.3.4Contains the following fields: Event Type, Event Length, Event Time Stamp, Errored Frame Seconds Summary Window, Errored Frame Seconds Summary Threshold, Errored Frame Seconds Summary, Error Running Total, Event Running TotalMustET5Organization Specific Event TLV structure57.5.3.5Contains the following fields: Event Type, Event Length, Organizationally Unique Identifier, Organization Specific ValueMustET6Organization Specific Event Organizationally Unique Identifier field57.5.3.5Contains 24-bit Organizationally Unique IdentifierMustET7Type values 0x05-0xFDTable 5712Not to be sentMustET8Type value 0xFFTable 5712Not to be sentMust4.8 Variables Descriptors and Containers (主要用于mib管理)ItemFeatureSubclauseValue/CommentSupportVAR1Variable Descriptor structure57.6.1As defined in Table 5713MayVAR2VAR3Variable Descriptor / VariableBranchreferences attributesdoes not reference actions57.6.157.6.1If an object or package is referenced, only attributes can be found within Variable ContainerActions are not found inVariable ContainersMayVAR4Variable Container structure for an attribute57.6.2As defined in Table 5714MayVAR5VAR6Variable Container / VariableBranchreferences attributesdoes not reference actions57.6.257.6.2If an object or package is referenced, only attributes can be found within Variable ContainerActions are not found inVariable ContainersMayVAR7Type value 0x00Table 5716Not to be sentMayVAR8Type values 0x02-0x1FTable 5716Not to be sentMayVAR9Type values 0x25-0x2FTable 5716Not to be sentMayVAR10Type values 0x45-0x5FTable 5716Not to be sentMayVAR11Type values 0x65-0x7FTable 5716Not to be sentMay5 测试关注点:5.1 概述: 由于ETH OAM是TN703产品新增的协议模块,有关协议一致性的测试将通过IXIA的协议测试套来进行,以保证和标准协议的一致性。测试这边将从以下几个部分进行测试:(一) 协议一致性测试:Ø OAMPDU报文一致性测试Ø 协议状态机测试(二) 功能测试:Ø 故障监测Ø 链路监测Ø 远端环回(三) 功能组合测试:与mac层的组合测试与lacp的组合测试与流控的组合测试(四) 性能规格测试:Ø 多端口同时启用Ø 大流量情况测试(五) 组网应用测试Ø 复杂流量测试Ø 长时间老化测试(六) 异常及攻击测试Ø 异常操作Ø 异常攻击5.2 具体测试点:NumberAssertionReferenc