
802.1ag协议详细介绍.ppt
91页802.1ag(CFM)详解l802.1ag的由来l802.1ag体系架构l802.1ag详细介绍l802.1ag应用举例l讨论与思考议程l802.1ag的由来l802.1ag体系架构l802.1ag详细介绍l802.1ag应用举例l讨论与思考为什么需要802.1ag在传统的电信网络里面,SDH有着专用的管理通道,可以快速发现网络连接中的问题,实现快速保护切换,同时提供了丰富的信息供管理员方便地定位故障所在所以传统电信网络稳定性高,可管理性强,定位问题的手段丰富由于Ethernet的简单性,低成本,高可扩展性,对突发流量很好的支持等极具吸引力的优势,传统电信网络逐步向Ethernet发展,Ethernet取代SDH已经是大势所趋但是Ethernet网络相比SDH,也有着很多不足,其中的一个就是可管理性差,这包括很多方面,定位故障的手段不丰富,定位故障的速度慢,从而导致网络恢复时间慢,维护成本高这个问题解决不了,Ethernet在电信网络里面的应用就会受到很大的局限,而Carrier Ethernet,跟普通的Ethernet网络相比,就是开发了很多新技术,来弥补普通Ethernet网络的诸多不足,其中,为了解决Ethernet网络中的可管理性问题(主要是错误管理),IEEE提出了802.1ag标准。
什么是802.1ag802.1ag是IEEE提出的一个用于Carrier Ethernet网络中进行错误管理的一个标准,即Connectivity Fault Management (CFM)它提供了如下5项功能:n路径发现(Path discovery)n故障检测(Fault detection)n故障确认和定位(Fault verification and isolation)n故障通知(Fault notification)n故障恢复(Fault recovery)其中最后一项故障恢复要联合其它协议(STP)一起来执行,不在802.1ag讨论范围之内由于CFM的概念来自于传统电信网络,所以其协议设计理念和里面的很多技术,都来自于SDH跟802.1ag相关的协议Y.1731:这是ITU基于802.1ag提出的一个标准,是802.1ag的超集,另外加了一些功能,比如performance monitor等,更加全面地考虑了电信网络的需求G.8031和G.8032:这是两个APS (automatic protection switch,自动保护切换)协议,前者提供linear保护,后者提供ring保护。
理论上CFM和APS结合起来应用才能完整的提供对一个网络的管理和保护前者发现,定位报告故障,后者快速反应,对故障通道进行保护切换议程l802.1ag的由来l802.1ag体系架构l802.1ag详细介绍l802.1ag应用举例l讨论与思考802.1ag的设计理念802.1ag把整个网络(customer, provider, operator)划分成很多的维护域(MD, Maintenance Domain),MD是有层次的,最多8个层次在每个MD里面,针对该MD所提供的每一个服务(service)进行维护管理,这些service会跨越网络中很多个节点,802.1ag的核心思想是在这个service所涉及到的部分或者全部节点上进行维护监控,从而发现故障以及定位出故障的网络段参与维护监控的节点称为维护点(Maintenance Point), MP不是配置在bridge上,而是配置在bridge的某个具体的port上,从而将维护粒度进一步细化MP有两类,一类是位于MD的边缘,称为维护端点(Maintenance association End Point, MEP).另外一类则是中间节点,称为维护中间点(Maintenance domain Intermediate Point , MIP)每一个service都有两个(点对点)或者两个以上(点对多点)MEP,这些MEP的组合称为维护关联(Maintenance Association, MA).每个MA都对应一个服务实例(Service Instance), 802.1ag就是对一个个MA来进行管理维护,检测MA中的故障,其实本质上就是对service instance来进行管理维护,检测service instance中的故障。
MA中每个MEP之间都会有full mesh的连接,每个MEP-MEP之间点到点的连接称为维护实体(Maintenance Entity). 这是CFM作用的最小单位维护域(MD)网络中可以有很多个MD,每个MD都处于特定的level,共有8个levelLevel越高,维护的网络范围越大,反之则越小除了Level,每个MD都有一个全局唯一的MD Name,用于标识该MD.相同level的维护域可以不止一个,彼此之间独立目前实践中,通常会划分这些维护域,Customer domain, Service provider domain, operator domain, link domain, level由前往后依次降低维护域 Architecture维护域的几个准则MD可以相切MD不能交叠MD可以嵌套维护域工作原理每个维护域的维护者只看到他自己的维护域底层的维护域为它直接相邻的上层提供服务在图例中,Customer Domain检测出问题之后,管理员只知道本MD出了问题,它可以定位出是customer设备到provider之间出了问题,还是provider网络出了问题,但是如果是后者,它无法进一步定位是具体哪里出了问题。
于是定位工作就交给了Provider DomainProvider Domain跨越了多个Operator Domain,它可以定位出是哪个Operator Domain或者结合处出了问题,但是无法进一步定位该Operator Domain里面哪里出了问题,于是定位工作继续交给了Operator Domain, 在Operator Domain,管理员可以定位是哪一段网络出了问题如果该Operator Domain比较大,它仍然可以在里面继续再划分几个低层次的Domain.可以有效地缩小故障范围维护域服务接入点(DoSAP)Domain Service Access Point (DoSAP)即维护与服即维护与服务接入点是一组特殊的服务接入点,它们为外界提供了务接入点是一组特殊的服务接入点,它们为外界提供了访问本访问本MD的接口,所以都是位于的接口,所以都是位于MD的边缘,在的边缘,在802.1ag中会被配置成中会被配置成MEP.一个MD为外界提供的每个service,都会在该MD中找到至少两个DoSAP.实际设备配置中,是不会出现DoSAP这个概念的,它只存在于802.1ag的理论模型中,实际配置中,我们接触到的都只会是MEP,因为从理论模型上看,一个MEP就是一个维护域服务接入点。
见下面两个图,分别是从Customer的角度看运营商为它提供的service,和从运营商的角度看它为外面提供的service.从不同角度看Service Instance运营商的角度用户的角度从整个网络看Service Instance维护关联(MA)Maintenance Association (MA),即维护关联一个MD通常对外提供多个服务实例(service instance), 802.1ag最终想维护的其实是service而不是domain一个MA就唯一地跟一个service instance相关联如果一个service是点对点的,那么它相应的MA中就相应的包含两个MEP(注:这个说法其实并不是很恰切,因为在某些情况下,即便是点对点服务,一个接入设备上可能有多个DoSap,这样其实在service的一端,该MA就可以包含多个MEP), 否则如果是点对多点,那它相应的MA就包含多个MEP在当前的Carrier Ethernet实际部署中,provider domain里面的MA通常是跟一个EVC关联,因为EVC就代表了一个service instance. EVC可以是点对点或者点对多点的,相应的MA也就是点对点或者点对多点的。
每个EVC的UNI就配置一个MEP,而且是UP MEP当然,对于802.1ag来说,它并没有提到任何EVC相关的东西,这里只是说在Carrier ethernet发展的目前这个初级阶段,很少会配置customer domain,通常都是provider domain,而provider domain配置的MA,通常都是用来管理维护EVC后面的” 802.1ag应用举例”一节会详细讨论EVC上的MAMA的一些特性每个MD可以包含多个MA,而一个MA只能属于一个MD,所以一个MA也继承了该MD的level属性,只能属于一个特定的level.每个MA有一个MA name,这个name在它所属的domain里面是唯一的每个MA有一个MA ID,它由两部分组成,分别是MD name和MA name这样MAID就是全局唯一的为了跟Y.1731兼容,MD name可以为空,这样就要求MA name必须全局唯一在Carrier Ethernet里面,service instance通常由vlanId来标识,而MA又跟service instance一一对应,所以MA跟vlanId之间也是有着某种关联。
通常的实践中,一个MA唯一对应着一个vlanId,但是802.1ag允许多个vlanId受一个MA来管理维护,这些vlanId中,有一个vlan是primary vlan(有点vlan代表的意思),所有在该MA中传递的报文中,都只会出现该vlan(为什么会有多个vlanId对应一个MA呢?最后的“讨论与思考”一节会进行讨论通常,在实践中,md level+vlanId可以唯一的标志一个MA(不同MD中的vlan标志不同的MA)但是802.1ag允许同一个MD中,同一个vlan对应多个MA. 但是有条件限制,这些MA中,最多只能有一个MA配置UP MEP,而其它MA都只能配置down MEP.(什么是UP MEP和Down MEP见后面),而且这些down MEP必须配置在不同的port上关于这个问题,“讨论与思考”一节也会进行讨论维护端点(MEP )Maintenance association End Point (MEP),即维护端点,它是CFM中的核心部件,每个MEP都跟一个特定的DoSap相关联,配置在DoSap所在port上MEP负责发起所有的CFM报文,包括CCM, LTM, LBM,从而主动负责path discovery, fault detection, fault verification and isolation, fault notification. 它是一个MA(或者说一个Service在该Domain里面的终结点。
CFM主要的协议行为,状态机,都发生在MEP上MEP分为两种,分别是UP MEP和Down MEPDown MEP and UP MEPDown MEP和UP MEP是CFM中非常重要的概念,但是初学者经常搞不清楚什么是UP什么是Down,也搞不清楚为什么要区分UP和Down.根据802.1ag的定义,在一个bridge里面,如果一个MEP从Lan侧发送和接收它对应的MA的CFM报文,那么这个MEP就是Down MEP;如果一个MEP从Bridge Relay侧发送和接收它对应的MA的CFM报文,那么这个MEP就是UP MEP当然,对不熟悉802.1D/Q模型的人来说,这个说法仍然是很模糊抽象的用一句更通俗的话来解释,是这样的:如果我在一个bridge的port A上配置了MEP,它所对应的MA是MA1属于MA1的CFM报文直接从Port A进入该bridge,终结在该MEP,那么该MEP就是Down MEP否则,如果属于MA1的CFM报文是从该Bridge的别的port进入该bridge,然后终结在该MEP上,那么这个MEP就是UP MEP要再深入理解一下UP MEP和Down MEP,需要看后面的Bridge模型图解Down MEP和UP MEP的区别这是一个802.1D/Q里面的Bridge模型BridgeMac Relay EntityPort A Port BUP MepDown MepCFM PacketCFM Packet为什么要有UP MEP和Down MEP的区别如果用一句话来解释为什么要区别UP MEP和Down MEP的话,只能说有很多协议行为,在UP MEP和Down MEP上是不同的,即你不能说某个行为在MEP上应该是如何如何的,而只能说某个行为在Down MEP上如何,在UP MEP上如何。
具体都有哪些行为,可以从接下来的协议描述中去细细体会另外,最后的“讨论与思考”一节也会再讨论这个问题维护中间点(MIP)Maintenance domain Intermediate Point (MIP),即维护中间点,它不能配置在DoSAP上,而只能是ISAP (internal Service Access Point),它不是一个MA终结点,而是一个中间点,它可以接收/发送CFM报文从/到 LAN侧和Mac Relay侧,逻辑上,它包含两个MHF(MIP Half Function),一个是down MHF,另外一个是UP MHF当MIP接收/发送CFM报文从/到LAN侧的时候,它执行的是Down MHF的功能,反之,执行的是UP MHF的功能当然这只是逻辑上的,在物理上,MIP就是配置一个bridge port上,是双向的,没有UP/Down之分MIP不能主动发送CFM报文,只能响应收到的CFM报文的时候,发送Reply以及转发也不负责检测,上报故障MD, MA, ME, MEP之间的关系前面提到了MD, MA, MEP, ME等概念,他们之间是有密切联系的,这里总结一下。
一个网络可以有多个MD, 每个MD都有一个MD level属性,可以有多个相同level的MD一个MD里面,可以配置多个MA,它们都具有相同的MD level, MA name是在MD内唯一的,而MAID则是全局唯一的每个MA可以对应多个vlan,但是只能有一个primary vlan(实践中,通常只有一个vlan)实践中,Vlan+md level通常可以唯一决定一个MA,但是这种说法并不永远都是对的,1ag也允许vlan+md level对应多个MA.每个MA包含多个MEP,而每个MEP只能属于唯一的MA,具有唯一MD level,对应唯一的primary vlan一个ME由两个点对点的MEP组成每个MEP有一个MEPID,这个MEPID在MA内是唯一的,全局不需要唯一图解MD, MEP, MIP, MA路径发现路径发现(Path Discovery)由MEP和MIP通过Link Trace手段来完成MEP朝一个唯一的目的地发送Link Trace Message (LTM),在路上每经过一个MIP,MIP就发送一个Link Trace Reply (LTR)回去,然后继续往前转发,直到最终到达目的地或者找不到继续前进的道路了。
在这个过程中,source MEP就可以学到这条路上都经过了哪些MIP,从而达到path discovery的目的故障检测和故障报告故障检测(Fault Detection)由MEP通过Connectivity Check来完成MEP会周期性的multicast Connectivity Check Message (CCM),如果路径没问题,远端的MEP会定期收到该MEP发送的CCM,如果连续几个周期都没有收到,或者收到的CCM有错误,远端MEP就知道出问题了故障报告(Fault Notification)一旦检测到错误,MEP就会发送消息(比如通过SNMP)到管理中心,提醒管理员某个MA出现故障故障确认故障确认(Fault Verification)由MEP或者MEP+MIP通过Loopback协同完成在检测到故障之后,管理员可能需要手动确认一下是否错误真的存在(防止误报)MEP朝某个目的地发送Loopback Message (LBM),如果该目的地收到了并且发送回Loopback Reply,说明这一段路径不存在故障否则,如果源MEP没有收到Reply,则说明真的是有故障存在。
故障定位故障定位需要MEP和MIP的协同工作,可以使用Loopback也可以使用Link TraceLoopback, 假设管理员已经知道了故障路径上有哪些MIP存在,它可以朝这些MIP一个一个的发送LBM,如果发到A的LBM能有LBR回来而发到B的没有,则说明A跟B之间出了问题Link Trace, 管理员可以从故障MA内的一个MEP向另外一个MEP发送LTM,故障段之前的MIP都会回复LTR而之后的则都不会回复,通过这种方式可以一次就找到故障段所以通常做故障定位的时候,Link Trace比Loopback更有效议程l802.1ag的由来l802.1ag体系架构l802.1ag详细介绍l802.1ag应用举例l讨论与思考802.1ag详细介绍前面介绍了802.1ag中的基本概念和总体架构,工作原理从这一节开始,详细介绍MEP, MIP, CCM, LTM/LTR, LBM/LBR的工作机制,要注意的问题等细节MEP主要功能定期主动发送CCM报文 验证收到的CCM报文的正确性丢弃收到的来自lower level的CFM报文发送LBM报文,接收处理收到的LBR报文发送LTM报文,接收处理收到的LTR报文 用LBR来响应收到的LBM用LTR来响应收到的LTM维护 MEP CCM数据库可选择性地维护MIP CCM数据库MEP内部体系结构这是一个Down MEP的内部体系结构对MEP体系结构的分析上图是MEP的体系结构,从这个结构可以看到,一个MEP由两个基本服务接入点(SAP),一个是Active SAP,另外一个是Passive SAP,按照802.1ag 19.1的定义,所谓的Active SAP,是指CFM协议报文在这个点上被产生或者处理。
而passive SAP则是指该MEP不处理的协议报文以及数据报文被从这个点送出去这两个SAP在实际网络配置中是不可见的,但是对理解MEP的内部逻辑有帮助这个体系结构也能教我们如何区分Down MEP和UP MEP如果Active SAP靠近LAN侧(按照1ag的模型,是靠近DoSAP),Passive SAP靠近relay侧(按照1ag的模型,是远离DoSAP),也即Active SAP在下,Passive SAP在上,那这个MEP是Down MEP,反之则是UP MEP比如上图中,展示的就是Down MEP的内部结构,如果要表示UP MEP,上图要反转一下从图上能看到UP MEP和Down MEP明显的一个区别,标记为*的path只有Down MEP才有(Down MEP不经过Linktrace responder,直接发送LTM到LAN),而标记为+的LTI SAP则只有UP MEP才有关于这里的细节,具体看后面的LTM/LTR处理MIP(MHF)主要功能a) 验证收到的LTM的正确性b) 可选择性地验证收到CCM的正确性并且维护MIP CCM数据库c) 发送回一个LBR来响应收到的LBM d) 转发收到的LTM并且发送回一个LTR来响应LTMMIP Half Function (MHF) 内部体系结构MEP/MIP CCM Database每个MEP都必须维护着一个MEP CCM Database,这个database是手动配置的,每条记录对应一个remote MEP。
它的使用详见后面的描述每个MEP和MIP都可选地维护着一个MIP CCM Database,这个Database实际上是一个FDB表,每条记录都是一个{Mac, Fid, Port}三元组这个记录的都是通过Mac学习动态学到的MEP的信息(要发送到某个MEP去的报文,应该从哪个port送出)这个数据库主要是给LinkTrace用的,详见后面描述CFM 通用报文格式—Ethernet headerCFM报文由Ethernet header,Common header,具体报文类型自己的header组成Ethernet Header:nMacDa: 具体见CCM/LBM/LBR/LTM/LTRnMacSa: 是发送报文的MP的Mac,在实现的时候,通常是bridge port mac.nTPID: 8902nVlan: 可以是tagged or untagged.但是通常是tagged, untagged只用于特定的场景中最后的“讨论与思考”中会详细讨论这个问题Common Header: Common Header紧接在Ethernet header之后,每个CFM报文都有这个header。
CFM 通用报文格式—Common Header(1)CFM 通用报文格式—Common Header(2)MD level:标志该packet的MD levelVersion: 目前都是0OpCode:表示发的是什么消息,见后面Flags: 它的解释具体取决于各个OpCode.First TLV offset:指从这个field往后,直到PDU中第一个TLV之间,有多少个字节Varies with value of OpCode :是指具体的OpCode所对应的headerEnd TLV:是最后一个TLV,type=0,没有length和valueCFM 通用报文格式—Common Header(3)OpCode:CFM 通用报文格式—Common Header(4)TLV格式CFM 通用报文格式—Common Header(5)具体的TLVCCMCCM:Connectivity Check Message,专门用来进行故障检测CCM报文的MacDa可以是unicast mac(仅仅用于兼容Y.1731以及用于PBT),也可以是multicast macMulticast Mac是01-80-C2-00-00-3y. 其中y = MD level。
CCM报文中携带的vlan是它所属的MA的primary vlanCCM报文格式注a:在当前版本中,这个field不存在,是为以后扩展用,所以版本0的MP,可以忽略这个field注b:在版本0的CCM中,First TLV offset肯定等于70CCM中的flagsFlags是8个bits的字段,在CCM报文中,最高bit代表RDI,最低3个bits代表interval,其它4个bits保留CCM IntervalCCM Interval是CCM报文发送的间隔,而CCM lifetime则是当一个MEP在这么长时间内没有从remote MEP收到任何MEP报文就认为到它的连接断掉了的时间,通常是3.25 interval or 3.5 interval802.1ag规定了7种interval,可用于不同场合CCM---RDIRDI = remote defect indicator它作为一个bit携带在CCM的flags中,被remote MEP用来告诉local MEP,该local MEP或者local MEP到这个remote MEP的单向连接出现了问题什么时候会需要用到RDI呢?考虑下面的情况。
由于CCM不需要reply,所以一个MEP并不知道它发送到remote MEP的CCM报文是否被收到了,并且是否正确比如,假设在一个有10个MEP的MA中, 某个MEP发往其它9个MEP的CCM报文全部丢失,所有其它这9个MEP知道这一个MEP出了问题,但是它自己不知道,而为了让管理员有效地判断一个MA是否工作正常,这个MA中的每个MEP都需要被检查正因为如此,所以才需要在CCM中携带RDI这个bit如果一个MEP从一个remote MEP收到一个CCM,RDI被置为0,那这就意味着这个remote MEP正在正常地从local MEP接受CCM否则,如果RDI被置为1,则意味着remote MEP已经检测到了该local MEP的defectCCM---序列号每个传输的CCM报文里面需要包含序列号(sequence number),这个sequence number可以帮助管理员来检测并且计算包丢失情况偶尔的包丢失意味着网络可能负担太重,或者某些link不稳定等,这可以帮助管理员尽早发现问题,在转发路径最终出问题之前,就预先认识到问题并且及早采取措施CCM --- defectCCM—defect 的说明xconCCMdefect:表示收到了一个或者多个cross connect的CCM报文,所谓Cross connect是指MD有交叉,导致一个MEP收到了lower level的CCM报文。
errorCCMdefect:表示收到了一个或者多个错误的CCM报文someRMEPCCMdefect:表示至少从一个Remote MEP那里收到了错误的CCM报文someMACstatusDefect:表示至少有一个remote MEP正在报告它的interface TLV不是isUp或者所有的remote MEP都在报告他们的port TLV状态都不是forwardingsomeRDIdefect:表示至少有一个remote MEP发过来的CCM中,RDI flag被置为1.CCM—defect优先级CCM中的每个defect优先级不同,具体见上面表格优先级一个很重要的作用是进行defect报告抑制当MEP检测到一个defect之后,马上上报,然后起一个timer,在timer没有过期之前,如果又检测到了高优先级的defect,会立即上报,但是如果检测到低优先级或者同优先级的defect,则不再上报,从而达到抑制的目的CCM的各种状态机一旦802.1ag各种配置配好之后(包括MD, MA, MEP等),enable CCM之后,CCM的各种状态机就开始运行,802.1ag就是通过各种CCM的状态机来检测和报告故障。
这些状态机包括nCCM发起者状态机nCCM接收者状态机nRmep状态机nRmep错误状态机nCross Connect状态机注:下面状态机中标注的UCT是无条件转移的意思CCM 发起者状态机xmitCCM()a) Sets the destination_address to the corresponding value, according to the MEP’s MD Level;b) Sets the source_address to the MAC address of the MEP.c) Sets the priority according to the configured MEP’s priority.d) Sets the drop_eligible to false;e) Places the MEP’s MD Level in the MD Level field.f) Fills the CCM Interval field with the CCM transmission interval g) Fills the RDI field h) Should copy CCIsentCCMs to the Sequence Number field of the CCM , else copies 0 into that field;i) Places the MEP’s MAID into the appropriate fields of the CCM.j) Places the MEP’s MEPID into the MEPId field.k) places a Sender ID TLV in the CCM, identifying the transmitting system;l) Optionally, places a Port Status TLV in the CCM, reporting the status of the Port;m) Optionally, places an Interface Status TLV in the CCM, reporting the status of the Port; n) Increments CCIsentCCMs by 1, wrapping around from 232 – 1 to 0.CCM接收者状态机MEPprocessEqualCCM()a) MEPprocessEqualCCM() shall process the CCM according to 20.46.4.2, and may validate the CCM according to 20.46.4.3, and discard any frames that fail the validation.b) Otherwise, if the MAID of the received CCM does not exactly match the MAID configured in the receiving ME, then sets xconCCMreceived to true, reconstructs the frame containing the CCM into recvdFrame, and places a timer counter value into recvdInterval corresponding to the value of the CCM Interval field in the received CCM.c) Otherwise, if: 1) MEPID in the received CCM is not configured in the receiving MEP or 2) MEPID in the received CCM matches the MEPID of the receiving MEP or 3) CCM Interval field in the received CCM does not match that configured for the receiving MEP. Then MEPprocessEqualCCM() sets errorCCMreceived (20.21.1) true, reconstructs the frame containing the CCM into recvdFrame, and places a timer counter value into recvdInterval corresponding to the value of the CCM Interval field in the received CCM.d) Otherwise, 1) Copies the source_address parameter into recvdMacAddress; 2) Copies the RDI field to recvdRDI; 3) Optionally copies the Port Status TLV to recvdPortState; 4) Optionally copies the Interface Status TLV to recvdInterfaceStatus; 5) Optionally copies the Sender ID TLV to recvdSenderId; 6) Optionally updates the Bridge’s MIP CCM Database; and 7) Sets the rCCMreceived variable for the particular instance of the Remote MEP state machine corresponding to the Maintenance association End Point Identifier field in the CCM.e) Compare the Sequence Number field in the received CCM to the value saved in the MEP CCM Database;f) If both values are not 0, and if the new value is not 1 greater than the last, increment CCMsequenceErrors (20.16.12); and g) Store the received Sequence Number in the MEP CCM Database.Rmep状态机Rmep错误状态机MEP Cross Connect状态机LTM报文格式注a:在当前版本中,这个field不存在,是为以后扩展用,所以版本0的MP,可以忽略这个field注b:在版本0的LTM中,First TLV offset肯定等于22。
LTM中的flagsLTM只用到了flag中的一个BitLTM中的transactionId和TTLtransactionId类似于sequence number, MEP每发送一个LTM,transactionId就加1.TTL的意义跟IP中的TTL一样,LTM发送的时候有一个初始值,通常是64,然后每经过一个MP,TTL就减1(在继续往前转发的LTM和往回发送的LTR中都会减1)如果进来的TTL是0,LTM被丢掉,并且不会有LTR发回去;如果进来的TTL是1,LTM被丢掉,同时会有LTR发回去否则,LTM既会转发,又会有LTR发回去LTM中的original/target mac addressOriginal mac address是发送的MP的individual mac address,并且每经过一个MIP,MIP在继续往前转发的时候,都会把这个mac改成自己的MacTarget mac address是要trace的目的MP的individual mac address,整个传送过程中会一直保持不变LTM中包含的额外的TLVLTM中应该要包含这个TLVLTM Egress Identifier TLV.LTM中可能会包含下面两个TLV Sender ID TLV Organization-Specific TLV(s).所有这三个TLV在报文中出现的顺序可以是任意的。
LTM Egress Identifier TLVEgress Identifier是一个8bytes的ID,低6 bytes包含了MEP Linktrace initiator or Linktrace responder的Mac address,高2 bytes则包含一个可以唯一标识这个该LTM得值,通常情况下恒为0就可以了LTR报文格式注a:在当前版本中,这个field不存在,是为以后扩展用,所以版本0的MP,可以忽略这个field注b:在版本0的LTM中,First TLV offset肯定等于11LTR中的flagsLTR中的transactionId, TTL和Relay ActionTransactionId等于它所reply的LTM的transactionId.TTLLTM/LTR—工作原理Link Trace Message (LTM)和Link Trace Reply (LTR)在CFM中的作用是路径发现(path discovery)和错误定位(fault isolation). 它的原理跟IP中的traceroute很相似,都是通过逐跳检查和逐跳反馈的机制来定位错误出在哪一段,同时也用这种方式来发现两个端点(MEP)之间的路径上都经过了哪些中间节点(MIP)。
LTM只能由MEP来发起(down/up MEP均可),而且必须是管理员手动触发LTM发出之后,每经过同一个MA里面的MIP,MIP都会发送一个LTR回去,让source MEP学习到路径上的该MIP,同时也知道至少到该MIP的这一段路径是没问题的该MIP同时会继续转发该LTM(不是原封不动的转发,而是会修改,而且转发也是有条件的,具体见后面对转发流程的描述),直到走到最终的目的MP或者路径断了再也转发不出去Source MEP根据收到的最后的MP发来的LTR报文,就可以知道path在哪一段出了问题通常Link Trace是跟CCM结合在一起使用,当CCM检测到连接出了问题之后,立即运行Link Trace,就可以找出是哪一段出了问题LTM/LTR—报文格式LTM报文是multicast报文,它的目的Mac是01-80-C2-00-00-3y. y = MD level + 8. LTR报文是unicast报文,它的目的Mac是发起LTM消息的source MEP的mac地址In LTM, a individual target mac address is carried, which can be any MIP/MEP’s mac address.LTM/LTR 2The Linktrace Responder replies to the LTM if either:a) An ordinary data frame, with the same vlan_identifier as the LTM, a destination_address equal to the Target MAC Address field (21.8.6) of the LTM and received on the same Bridge Port as the LTM, would be forwarded through exactly one other Bridge Port (or to just the Management Port); orb) The UseFDBonly bit of the Flags field of the LTM is 0, the Target MAC Address field (21.8.6) of the LTM is found in the Bridge’s MIP CCM Database (19.3.10), and that entry in the MIP CCM Database identifies a Bridge Port (or the Management Port), other than the one on which the LTM was received; orc) The MAC address of the MP that received the LTM equals the Target MAC Address field of the LTM; and:d) LTM TTL field is non-0 when the LTM is received.LTM/LTR 3The Linktrace Responder forwards a copy of the LTM on the Egress Port, with a new source_address parameter and the LTM TTL field decremented by 1, only if all of the following conditions are met:e) An LTR was generated for the reasons specified in the preceding item a) or item b), but not item c);f) The LTM was received by an MHF, not a MEP;g) The Egress Port does not have a MEP at or above the LTM’s MD Level; andh) The received LTM TTL field was greater than 1.LTM/LTR(4)If one LTM is received on a down MEPA)If the Target MAC Address carried in the LTM is the MAC address of the receiving MEP, then the LTM has reached its target. ProcessLTM() calls enqueLTR() (20.42.4) to enqueue an LTR for the MEP Linktrace SAP of the receiving Down MEP.b) Otherwise, if the spanning tree state of the Bridge Port and vlan_identifier of the LTM is not Forwarding, the LTM is discarded and no further processing takes place.c) Otherwise, the Ingress and Egress Ports are determined according to 20.42.1.2. If a unique Egress Port cannot be determined, then the LTM is discarded, and no further processing takes place.d) Otherwise, i.e., a unique Egress Port was found, ProcessLTM() calls enqueLTR() (20.42.4) to enqueue an LTR for the Linktrace SAP through which the LTM was received. The LTM is discarded, and no further processing takes place.STP will influence LTM(?)LBM/LBR Used for fault verification and isolationIn 802.1ag, it’s unicast packet. But Y.1731 supports multicast LBM, so for the purpose of compatible with Y.1731, MP can reply multicast LBM.LBM/LBR (2)If the destination_address of one LBM contains a Group address and the MP Loopback Responder state machine resides in an MHF (rather than in a MEP), the LBM should be discarded.Timer (1)LTFwhileA timer variable used by the LTR Transmitter state machine to time out the expected transmission of LTRs.CCIwhileTimer counter for transmitting CCMs. CCIwhile has a granularity finer than or equal to 1/4 of the time represented by the CCMinterval variable.errorCCMwhileTimer counter for timing out invalid CCMs. errorCCMwhile has a granularity finer than or equal to 1 ms.xconCCMwhileTimer counter for timing out cross connect CCMs. xconCCMwhile has a granularity finer than or equal to 1 ms.Timer (2)LBIwhileA timer variable used by the MEP Loopback Initiator transmit state machine to time out the expected reception of LBRs.FNGwhileA timer variable used by the MEP Fault Notification Generator state machine to wait for defects to stabilize and disappear.rMEPwhileTimer counter for timing out CCMs. rMEPwhile has a granularity finer than or equal to 1/4 of the time represented by the CCMinterval variable. A Bridge shall not set rMEPCCMdefect within (3.25 ∗CCMtime(CCMinterval)) seconds of the receipt of a CCM, and shall set rMEPCCMdefect within (3.5 ∗ CCMtime(CCMinterval)) seconds after the receipt of the last CCM. CFM and STP/EAPSIn the 802.1ag MP architecture figure, all those CFM entities are located between port filtering entity and the LAN while STP/EAPS work on Filtering entity. So CFM will not be influenced by STP/EAPS configured on the same MP.Individual and shared MP addressa) Individual MP address modelThe Individual MAC address assigned to an MP associated with a particular MA, and hence that MA’s MD Level and set of VIDs, is unique over all service instances associated with that same set of VIDs, such that those service instances’ CFM PDUs can be distinguished only by their MD Levels that can pass through that MP’s Bridge Port.b) Shared MP address modelThe same as the Individual MP address model, except that Up MPs (but not Down) in the same MA and in the same Bridge can share a (i.e., can all have the same) MAC address.Down MPs in different Bridge Ports have different MAC addresses. If two Bridge Ports are connected to the same LAN, but have the same MAC address, then both would respond to an LBM sent to that MAC address. This is true, even though one of those two Bridge Ports would be Blocked (it would be either a Backup or an Alternate Port, see 13.12), because Down MEPs are between the LAN and the Port filtering entities (8.6.1, 8.6.2, 8.6.4) that enforce the blocking. This placement allows Down MEPs to test their service instances even when their Port is blocked, so that the system administrator knows that the failover links will be ready to carry data when a network event causes the Port to become Forwarding.A Bridge can use the Shared MP address model, or the Individual MP address model, on any given Bridge Port. This is an implementation decision; no managed objects are provided to select one or the other model of operation.A Bridge using either of these two models can also make use of a third scheme for configuring MPs:c) Management Port MEPsUp MEPs (not Up MHFs, not Down MPs) are configured on a Management Port, a Bridge Port that does not connect to any LAN exterior to the Bridge. (See 8.3 and Figure 8-7.) Typically, this would be the same MAC address, and the same Bridge Port, that used for the Bridge’s Management Port (see Figure 8-7).When CCM comes into the bridge ports which are not enabled any MEP, the CCM will be forwarded other ports which also are not enabled MEP.APSAPS OverviewAPS (Automatic Protection Switch) is a service protection technology, derived from the legacy technology SDH, even the detailed method is the same. It is always used together with some connection fault detection mechanism, like 802.1ag, Y.1731.Once the fault is detected, APS module will be notified. It will switch the traffic from the broken path to another backup path immediately. Generally, less than 50ms fault detection & protection switch time is required.G.8031&G.8032ITU G.8031 defines ethernet linear APSITU G.8032 defines ethernet ring APSG.8031 (1)1+1 protectionBoth Bidirectional and unidirectional Source: bridge, dual feedSink: selector, initiate the switch1:1 protectionOnly bidirectionalSource bridge, single feed, initiate the switchBoth Revertive and non-revertive switch are configurableGenerally, 1+1 will be non-revertive while 1:1 will be revertive since most of time, working path will be more optimized. UP/Down MEP一个vlan对应多个MA多个vlan对应一个MA什么时候untaggedLTM用individual mac address?Configuration recommendation in practiceFirstly, create a MD with MD level and nameSecondly, in the MD, create MA, with MA name and vlanIdThirdly, under port interface, create MEP, with down/up property and MA从实际组网的角度看CCM使用multicast的好处Compared with unicast CCM, using multicast CCM has the following benefits:Minimize bandwidth usageCan detect some cross connect fault(20.1)Don’t need to learn Rmep firstly。












