Abstract:
The disclosure provides a method for detecting a mismatch fault and a Maintenance Endpoint (MEP). The method includes: determining whether there is a Traffic Engineering Service Instance (TESI) configured in a segment, setting a Present Traffic in Segment (PTS) variable, and setting a value of a PTS field included in a Connectivity Check Message (CCM) sent from a Maintenance Endpoint (MEP); receiving the CCM by the MEP, when the value of the PTS field included in the CCM does not coincide with that of the PTS variable, setting, by the MEP, a first mismatch fault indication variable mmCCMreceived to be set; when the first mismatch fault indication variable mmCCMreceived remains set after a first preset time period expires, detecting that a mismatch fault occurs. The method finds timely the mismatch problem occurred in the segment protection of Provider Backbone Bridging-Traffic Engineering (PBB-TE), thereby preventing data loss and service interruption caused by the occurrence of mismatch.

Description:
TECHNICAL FIELD 
       [0001]    The disclosure relates to the Ethernet protection technology, and particularly to a method for detecting a mismatch fault and a Maintenance Endpoint (MEP) in the segment protection technology of Provider Backbone Bridging-Traffic Engineering (PBB-TE). 
       BACKGROUND 
       [0002]    With the introduction of carrier Ethernet concept, for making the Ethernet meet the telecommunication grade standard, higher demand of protection and switching of the Ethernet is proposed. In the existing protection switching technology of PBB-TE, protection to a Traffic Engineering Service Instance (TESI), namely an end-to-end tunnel protection, is supported currently. The end-to-end tunnel protection solution not only takes longer protection switching time, but also involves too many nodes, which cannot realize protection to its intermediate link and node. Once a certain intermediate link or node is failed, it is necessary to switch the whole TESI; besides, if there are multiple TESIs on the failed link or failed node, switching of multiple TESIs is caused. That is to say, the protected object of the end-to-end protection solution in the PBB-TE is the TESI; when it is detected that a certain working TESI is failed, it is needed to use another protection TESI to encapsulate user message entering the PBB-TE tunnel again, so that the traffic is forwarded through the protection PBB-TE tunnel. 
         [0003]    For the Ethernet, protection to link and node is one part of the Ethernet protection; most network faults occur on a certain link or node, so the segment protection of PBB-TE becomes more urgent; many operators have made requirements for the segment protection of PBB-TE, that is, specially configuring a protection segment on a working segment of the PBB-TE tunnel to protect the working segment, wherein the working segment and the protection segment compose an Infrastructure Protection Group (IPG). 
         [0004]      FIG. 1  shows a schematic diagram of the current segment protection of PBB-TE; as shown in  FIG. 1 , an IPG includes one working segment and one or more protection segments. When there is no fault detected on the working segment, all traffics protected by the IPG of PBB-TE are forwarded from the working segment normally; once there is fault occurring on the working segment or related management instruction is received, and a Segment Edge Bridge (SEB) of the IPG of PBB-TE can timely detect the fault, the SEB will switch traffic, namely triggering a Forwarding Database (FDB) to update, and modifying an egress port of the FDB to which the TESI protected by the IPG corresponds into an egress port to which the protection segment corresponds on the SEB (i.e. a TESI mapping process), thereby switching traffic to the protection segment, realizing protection to the working segment, ensuring normal forwarding of the network traffic and improving the reliability of network. 
         [0005]      FIG. 2  shows a schematic diagram of a current working segment and protection segment of PBB-TE; in  FIG. 2 , a grid with grid shades represents a Segment Endpoint Port (SEP), and a grid with oblique lines shade represents a Segment Intermediate Port is (SIP). In the existing segment protection of PBB-TE, a member segment means the working segment or the protection segment of an IPG. The working segment means the one by which the traffic passes in normal operation; as shown in  FIG. 2 , the protection segment means the one which includes the traffic after switching because of detecting a fault on the working segment or receiving a management instruction of switching; as shown in  FIG. 2 , the segment means a series of LAN and MAC relay composition between a PNP port and a PNP port; as shown in  FIG. 2 , the SEB is used for ending two ends of segment, and it may be either a BEB device or a BCB device in the PBB-TE network; as shown in  FIG. 2 , a bridge device in middle of segment is the SIB, and the SIB may be the BCB device; as shown in  FIG. 2 , the IPG traffic switching means redirecting a group of TESI protected by the IPG from the working segment to the protection segment, or from the protection segment to the working segment, wherein the redirection is usually implemented by modifying the egress port of corresponding item to which the TESI corresponds in the FDB. 
         [0006]      FIG. 3  shows a schematic diagram of the current segment connectivity detection of PBB-TE; in  FIG. 3 , a grid with snowflake shadows represents the PNP port, a blank grid represents the PNP or CBP port. As shown in  FIG. 3 , the connectivity detection of middle segment of PBB-TE includes: configuring a TESI, which is a channel for forwarding a Connectivity Check Message (CCM), on the segment. A point-to-point Maintenance Association (MA) is initiated on the TESI, and two endpoints SEP of the segment are down MEP of the MA. The connectivity of the segment is detected by sending the CCM to each other. 
         [0007]    Sometimes, when some devices are failed or configured wrongly, the problem of mismatch may occur when the SEBs at two ends map the TESI to the right segment. For maintaining the normal operation of network, it is needed to recognize the problem of mismatch and report the mismatch. There are usually two kinds of mismatch: one is caused by incomplete switching of segment protection, and the other is caused by working/protection configuration fault. 
         [0008]    For the mismatch caused by incomplete switching of segment protection, for example, fault of device, although the local device detects the fault, it has failed to realize is switching, and the local device sends the CCM including a Remote Defect Indication (RDI) field to the remote SEB, so the remote device maps the TESI to the protection segment, and the local device still transmits traffic on the working segment. Similarly, the mismatch will occur in the event that the local device has mapped the TESI to the protection segment, but the remote device has failed to map the TESI to the protection segment when receiving the CCM including the RDI field which is set as well. 
         [0009]    The working/protection configuration fault will occur in the event of mismatch. For example, one end is configured as transmitting the traffic on the working segment, and the other end is configured as transmitting the traffic on the protection segment. Or, when one end is configured as reversing mode and the other end is configured as non-reversing mode, when the fault disappears, the problem of mismatch will occur as well. 
         [0010]    For preventing data loss and service interruption caused by the occurrence of mismatch, it is necessary to be able to detect mismatch fault and report the fault. At present, there is no solution for implementing detection for mismatch fault. 
       SUMMARY 
       [0011]    In view of the above, the disclosure mainly aims to provide a method for detecting a mismatch fault and an MEP, which can find timely the mismatch problem occurred in the segment protection of PBB-TE, thereby preventing data loss and service interruption caused by the occurrence of mismatch. 
         [0012]    For achieving above aim, the following technical solutions are provided. 
         [0013]    A method for detecting a mismatch fault is provided includes: 
         [0014]    determining whether there is a Traffic Engineering Service Instance (TESI) configured in a segment, setting a Present Traffic in Segment (PTS) variable, and setting a value of a PTS field included in a Connectivity Check Message (CCM) sent from a Maintenance Endpoint (MEP); 
         [0015]    receiving the CCM by the MEP, when the value of the PTS field included in the CCM does not coincide with that of the PTS variable, setting, by the MEP, a first mismatch fault indication variable mmCCMreceived to be set; and 
         [0016]    when the first mismatch fault indication variable mmCCMreceived remains set after a first preset time period expires, detecting that a mismatch fault occurs. 
         [0017]    When determining whether there is a TESI configured in a segment, the setting a PTS variable may include: 
         [0018]    finding out egress port values of the TESI protected by an Infrastructure Protection Group (IPG) in a Forwarding Database (FDB); and setting the PTS variable of the MEP to which the egress port corresponds in the IPG as true or 1. 
         [0019]    The value of the PTS field included in the CCM may be: setting the value of the PTS field (traffic) in the CCM according to a value of the PTS variable of the MEP. 
         [0020]    The value of the PTS field of the CCM may be equal to the value of the PTS variable of the MEP. 
         [0021]    The method may further include: when the MEP detects that a fault occurs in the segment where the MEP itself is, 
         [0022]    sending, by the MEP, a CCM including a Remote Defect Indication (RDI) flag, and setting a value of an RDI variable presentRDI of the MEP as true; 
         [0023]    when both the value of the variable presentRDI and the value of the PTS variable are true, setting, by the MEP, a second mismatch fault indication variable presentmmloc to be set; and 
         [0024]    when the second mismatch fault indication variable presentmmloc remains set after a second preset time period expires, detecting that a mismatch fault occurs; otherwise, detecting that operation is normal and no mismatch fault occurs. 
         [0025]    The TESI may be a TESI traffic or a TESI tunnel protected by the IPG where the MEP is. 
         [0026]    A method for detecting a mismatch fault includes: 
         [0027]    determining whether there is a Traffic Engineering Service Instance (TESI) configured in a segment, setting a Present Traffic in Segment (PTS) variable; 
         [0028]    when a Maintenance Endpoint (MEP) detects that a fault occurs in the segment is where the MEP itself is, 
         [0029]    setting, by the MEP, a value of a Remote Defect Indication (RDI) variable presentRDI as true; 
         [0030]    when both the value of the variable presentRDI and a value of the PTS variable are true, setting, by the MEP, a second mismatch fault indication variable presentmmloc to be set; and 
         [0031]    when the second mismatch fault indication variable presentmmloc remains set after a second preset time period expires, detecting that a mismatch fault occurs. 
         [0032]    When determining whether there is a TESI configured in a segment, the setting a PTS variable may include: finding out egress port values of the TESI protected by an Infrastructure Protection Group (IPG) in a Forwarding Database (FDB); and setting the PTS variable of the MEP to which the egress port corresponds in the IPG as true or 1. 
         [0033]    The setting a value of an RDI variable presentRDI by the MEP may include: when detecting that a fault occurs in the segment, sending, by the MEP, a Connectivity Check Message (CCM) including an RDI flag which is set, and setting the value of the RDI variable presentRDI of the MEP as true. 
         [0034]    The TESI may be a TESI traffic or a TESI tunnel protected by the IPG where the MEP is. 
         [0035]    A Maintenance Endpoint (MEP) includes: the MEP is configured to determine that there is a Traffic Engineering Service Instance (TESI) configured in a segment to which itself corresponds, and set a value of a Present Traffic in Segment (PTS) variable of the MEP itself as true; to include a value of a PTS field in a Connectivity Check Message (CCM) sent from the MEP itself according to the value of the PTS variable; for the MEP which receives the CCM, when the value of the PTS field included in the received CCM does not coincide with that of the PTS variable set by itself, to set a first mismatch fault indication variable mmCCMreceived to be set; and 
         [0036]    when the first mismatch fault indication variable mmCCMreceived remains set after is a first preset time period expires, the MEP may be configured to detect that a mismatch fault occurs. 
         [0037]    The determining that there is a TESI configured in a segment to which the MEP itself corresponds and setting a PTS variable may include: 
         [0038]    an Infrastructure Protection Group (IPG) finds out egress port values of the TESI protected by itself in the a Forwarding Database (FDB); and setting the PTS variable of the MEP to which the egress port corresponds in the IPG as true or 1. 
         [0039]    The MEP may be further configured to, when detecting that a fault occurs in the segment where the MEP itself is, send a CCM including a Remote Defect Indication (RDI) flag, and set a value of a variable presentRDI of the current MEP as true. 
         [0040]    The MEP may be further configured to, when both the value of the variable presentRDI and the value of the PTS variable are true, set a second mismatch fault indication variable presentmmloc to be set; and 
         [0041]    when the second mismatch fault indication variable presentmmloc remains set after a second preset time period expires, it may be configured to detect that a mismatch fault occurs; otherwise, it may be configured to detect that operation is normal and no mismatch fault occurs. 
         [0042]    The TESI may be a TESI traffic or a TESI tunnel protected by the IPG where the MEP is. 
         [0043]    A Maintenance Endpoint (MEP) includes: the MEP is configured to determine that there is a Traffic Engineering Service Instance (TESI) mapped in a segment to which itself corresponds, and set a value of a Present Traffic in Segment (PTS) variable of the MEP itself as true; and to include a value of a PTS field in a Connectivity Check Message (CCM) sent from the MEP itself according to the value of the PTS variable; 
         [0044]    when detecting that a fault occurs in the segment where the MEP itself is, the MEP is configured to send a CCM including a Remote Defect Indication (RDI) flag, and set the value of a variable presentRDI of the current MEP as true, which means that a fault of working segment is detected currently; 
         [0045]    when both the value of its variable presentRDI and the value of the PTS variable set by itself are true, it is configured to set a second mismatch fault indication variable presentmmlo) to be set; and 
         [0046]    when the second mismatch fault indication variable presentmmloc remains set after a second preset time period expires, it is configured to detect that a mismatch fault occurs; otherwise, it is configured to detect that operation is normal and no mismatch fault occurs. 
         [0047]    It can be seen from above technical solutions provided by the disclosure that the MEP determines that there is a TESI mapped in a segment to which itself corresponds, sets a PTS variable, and includes the set value of a PTS field in the CCM sent from the MEP itself; the MEP receives the CCM, obtains that the value of the PTS field (traffic) included in the CCM does not coincide with that of the PTS variable set by itself through comparison, and detects that a mismatch fault occurs. When detecting that a fault occurs in the segment where the MEP itself is, the MEP sends the CCM including an RDI flag, and sets the value of an RDI variable presentRDI of the current MEP as true, for showing that the CCM sent from the MEP includes the RDI currently, and indicating the remote MEP that a fault is detected at this end; when both the value of its current presentRDI and the value of the PTS variable set by itself are true, the MEP detects that a mismatch fault occurs. The method of the disclosure finds timely the mismatch problem occurred in the segment protection of PBB-TE, thereby preventing data loss and service interruption caused by the occurrence of mismatch. 
     
    
     
       BRIEF DESCRIPTION OF THE DRAWINGS 
         [0048]      FIG. 1  shows a schematic diagram of the current segment protection of PBB-TE; 
           [0049]      FIG. 2  shows a schematic diagram of a current working segment and protection segment of PBB-TE; 
           [0050]      FIG. 3  shows a schematic diagram of the current segment connectivity detection of PBB-TE; 
           [0051]      FIG. 4  shows a flowchart of a method for detecting a mismatch fault according to the is disclosure; 
           [0052]      FIG. 5  shows a schematic diagram of an embodiment of PBB-TE segment composition according to the disclosure; 
           [0053]      FIG. 6  shows a flowchart of a first embodiment of detecting a mismatch fault according to the disclosure; 
           [0054]      FIG. 7  shows a flowchart of a second embodiment of detecting a mismatch fault according to the disclosure; 
           [0055]      FIG. 8  shows a schematic diagram of an embodiment that a fault occurs in the PBB-TE segment in  FIG. 5  according to the disclosure; 
           [0056]      FIG. 9  shows a flowchart of a third embodiment of detecting a mismatch fault according to the disclosure; and 
           [0057]      FIG. 10  shows a flowchart of a fourth embodiment of detecting a mismatch fault according to the disclosure. 
       
    
    
     DETAILED DESCRIPTION 
       [0058]      FIG. 4  shows a flowchart of a method for detecting a mismatch fault according to the disclosure; as shown in  FIG. 4 , the method includes the following steps. 
         [0059]    Step  400 : determining whether there is a TESI configured in a segment, setting a PTS variable of an MEP in the segment, and setting a value of a PTS field in a CCM sent from the MEP. 
         [0060]    In the step, when it is determined that there is a TESI configured in the segment to which the MEP itself corresponds, setting the PTS as true or 1. Determining that there is a TESI configured in the segment to which the MEP itself corresponds is that: an IPG finds out egress port values of the TESI protected by it in a FDB. The PTS variable of the MEP to which the egress port corresponds in the IPG is set as true or 1; otherwise, it is set as false or 0. At this point, 
         [0061]    the value of the PTS field (traffic) in the CCM sent from the MEP is set as the value is of the PTS variable of the MEP, that is, the MEP indicates the value of the PTS variable which is already set by it through the traffic field. 
         [0062]    The TESI is a TESI traffic or a TESI tunnel protected by the IPG where the MEP is. 
         [0063]    Step  401 : the MEP receives the CCM, when the value of the PTS field (traffic) included in the CCM does not coincide with that of the PTS variable set by itself, it is detected that a mismatch fault occurs. 
         [0064]    For improving the detecting accuracy of the disclosure, furthermore, in the step, after obtaining the inconsistency through comparison, setting a first mismatch fault indication variable (mmCCMreceived) to be set, namely setting it as true or 1. If the first mismatch fault indication variable (mmCCMreceived) remains set after a first preset time period expires, it is considered that the occurrence of mismatch fault is detected, and it is needed to inform the fault. 
         [0065]    The method further includes that: when the MEP receives the CCM and obtains that the value of the PTS field included in the CCM coincides with that of the PTS variable set by itself through comparison, operation is normal, and no mismatch fault occurs. 
         [0066]    The method further includes that: when detecting that a fault occurs in the segment where the MEP itself is, the MEP sends a CCM including an RDI flag, and sets the value of an RDI variable (presentRDI) of the MEP as true, which means that a fault of the segment which the MEP is in is detected currently, for showing that the CCM sent from the MEP includes a set RDI currently, and indicating the remote MEP that a fault is detected at this end by the local MEP. The variable presentRDI is used for showing whether a fault occurs in the segment where the MEP is currently; if the MEP obtains that both the value of the variable presentRDI and the value of the PTS variable set by itself are true, it is detected that a mismatch fault occurs; otherwise, it is detected that operation is normal, and no mismatch fault occurs. Furthermore, for improving the detecting accuracy of the disclosure, when both the value of the variable presentRDI and is the value of the PTS variable set by itself are true in the step, the following step is further included: setting a second mismatch fault indication variable (presentmmloc) to be set; if the second mismatch fault indication variable (presentmmloc) remains set after a second preset time period expires, it is considered that the occurrence of mismatch fault is detected. 
         [0067]    Aiming at the method of the disclosure, an MEP is further provided. The MEP is configured to, when determining that there is a TESI configured in a segment, set a PTS variable of the MEP in the segment, and to include the value of a PTS field in a CCM sent from the MEP itself; when receiving the CCM, if the MEP obtains that the value of the PTS field included in the CCM does not coincide with that of the PTS variable set by itself through comparison, it is further configured to detect that a mismatch fault occurs. Furthermore, for improving the detecting accuracy of the disclosure, after obtaining the inconsistency through comparison, the MEP is further configured to set a first mismatch fault indication variable (mmCCMreceived) to be set, namely set it as true or 1. If the first mismatch fault indication variable (mmCCMreceived) remains set after a first preset time period expires, it is considered that the occurrence of mismatch fault is detected. 
         [0068]    The MEP is further configured to, when receiving the CCM and obtaining that the value of the PTS field included in the CCM coincides with that of the PTS variable set by itself through comparison, detect that operation is normal, and no mismatch fault occurs. 
         [0069]    When determining that there is a TESI configured in a segment, setting the value of PTS of the MEP in the segment as true or 1, and using the traffic field in the CCM sent from the MEP to include the set value of PTS; 
         [0070]    determining that there is a TESI configured in the segment to which the MEP itself corresponds and setting the PTS of the MEP in the segment is that: an IPG finds out egress port values of the TESI protected by it in a FDB; setting the PTS variable of the MEP to which the egress port corresponds in the IPG as true or 1. 
         [0071]    The MEP is further configured to, when detecting that a fault occurs in the segment where the MEP itself is, send a CCM including an RDI flag, and set the value of a variable presentRDI of the current MEP as true, which means that a fault of working segment is detected currently; 
         [0072]    the MEP is further configured to receive the CCM including the RDI flag, obtain that both the value of its variable presentRDI and the value of the PTS variable set by itself are true through comparison, and detect that a mismatch fault occurs; otherwise, it is configured to detect that operation is normal, and no mismatch fault occurs. 
         [0073]    For improving the detecting accuracy of the disclosure, when both the value of the variable presentRDI of the MEP and the value of the PTS variable set by the MEP are true, the MEP is further configured to set a second mismatch fault indication variable (presentmmloc) to be set; if the second mismatch fault indication variable (presentmmloc) remains set after a second preset time period expires, it is considered that the occurrence of mismatch fault is detected. 
         [0074]    The method of the disclosure is described below with reference to embodiments in detail. 
         [0075]      FIG. 5  shows a schematic diagram of an embodiment of PBB-TE segment composition according to the disclosure; as shown in  FIG. 5 , A-B-C-D is a part of PBB-TE tunnel; supposing that there are two groups of TESI passing this common path, the TESI is composed of two Ethernet Switching Paths (ESPs) in opposite directions, and each ESP is determined by a 3-tuple &lt;ESP-DA, ESP-SA, ESP-VID&gt;, wherein ESP-DA represents destination MAC address of the ESP, ESP-SA represents source MAC address of the ESP, and ESP-VID represents a Virtual Local Area Network Identification (VLAN ID). 
         [0076]    The two groups of TESI are respectively expressed as: the 3-tuple to which the TESI 1  corresponds is ESP 1 &lt;MAC 1 , MAC 2 , VID 1 &gt; and ESP 2 &lt;MAC 2 , MAC 1 , VID 1 &gt;; the 3-tuple to which the TESI 2  corresponds is ESP 3 &lt;MAC 3 , MAC 4 , VID 2 &gt; and ESP 4 &lt;MAC 4 , MAC 3 , VID 2 &gt;. 
         [0077]    Supposing that A-E-D is used to protect the path A-B-C-D, then A-B-C-D and A-E-D compose the IPG of the PBB-TE, wherein A-B-C-D is a working segment of the IPG, and A-E-D is a protection segment of the IPG. The protected members of the IPG include the TESI 1  and the TESI 2 . In the normal state, a forwarding path of the TESI 1  and is TESI 2  is A-B-C-D. These TESIs protected by the IPG are respectively configured with a protected member list at endpoint of the IPG, as shown in  FIG. 5 . 
         [0078]    A transmission channel for the CCM is configured in A-B-C-D, and the transmission channel is composed of two 3-tuples, which are respectively &lt;MAC D1 , MAC A1 , VID 3 &gt; and &lt;MAC A1 , MAC D1 , VID 3 &gt;; a maintenance united area MA 1  of the segment is configured; another transmission channel for the CCM is configured in A-E-D, and the transmission channel is also composed of two 3-tuples, which are respectively &lt;MAC D2 ,MAC A2 ,VID 4 &gt; and &lt;MAC A2 ,MAC D2 ,VID 3 &gt;; a maintenance united area MA 2  of the segment is configured. 
         [0079]    In embodiments of the disclosure, supposing that Port A 1  on node A and Port D 1  on node D are two MEPs of the MA 1 ; and supposing that A 2  port on node A and D 2  port on node D are two MEPs of the MA 2 . Each MEP is set with a variable PTS. 
         [0080]      FIG. 6  shows a flowchart of a first embodiment of detecting a mismatch fault according to the disclosure; with reference to  FIG. 5 , in the first embodiment, supposing that determination of a PTS flag is performed only according to one of the protected members of an IPG, that is, the PTS flag of the MEP in a segment is set if it is detected that there is a member working in the segment, and supposing that an initial value of the PTS flag is 0. As shown in  FIG. 6 , the embodiment includes the following steps. 
         [0081]    Step  600 : searching a certain protected member list of an IPG, finding out an item to which either a first protected member or one of the protected members in the list corresponds in an FDB, and finding out an egress port to which it corresponds according to the item. 
         [0082]    For a device A, its FDB is shown in  FIG. 5 , the egress port of the item to which the first protected member &lt;MAC 1 , VID 1 &gt; in a certain protected member list of the IPG corresponds in the FDB on the device A is port A 1 . 
         [0083]    The specific implementation of the step belongs to the conventional technology of the skilled personnel in the field, so it will not be described here in detail. 
         [0084]    Step  601 : according to the found egress port, setting a PTS of an MEP to which the egress port corresponds in the IPG. Thus, corresponding to the port A 1  on the is device A, the PTS variable of the MEP at the port A 1  is equal to 1, which means that the traffic is transmitted through the port A 1  currently; similarly, the PTS variable of the MEP at the port D 1  is equal to 1. 
         [0085]    Step  602 : according to the setting condition of the PTS, a traffic field in the CCM sent from the MEP is correspondingly set. 
         [0086]    In the first embodiment, because the PTS variable of the MEP at the port A 1  on the device A is equal to 1, the traffic field in the CCM sent from the MEP at the port A 1  is equal to 1. The traffic field is at the second MSB in the flag field of the CCM. Similarly, the traffic field of the CCM sent from the device D is equal to 1. 
         [0087]    Step  603 : the MEP compares the traffic field in the received CCM with its own PTS variable. 
         [0088]    Step  604 : if the two are identical, it is considered that operation is normal, and ending the flow; otherwise, entering step  605 . 
         [0089]    Step  605 : setting a first mismatch fault indication variable (mmCCMreceived), namely, setting it as true or 1; at the same time, starting a timer expiring in a first time period. 
         [0090]    Step  606 : when the timer is in time out, determining whether the first mismatch fault indication variable (mmCCMreceived) remains set after the first time period expires, if so, entering step  607 ; otherwise, it is considered that operation is normal, and ending the flow. 
         [0091]    Step  607 : it is considered that a mismatch fault occurs, alarm information is generated to report the fault please be noted that, the specific implementation of generating alarm information to report the fault can be realized by using the existing method; it belongs to the conventional technology of the skilled personnel in the field and not intended to limit the scope of the claims of the disclosure. 
         [0092]    Similarly, after receiving the CCM including the traffic field which is equal to 1 from the port A 1 , the MEP at the port D 1  also compares the traffic field with its own PTS variable; if the two are identical, it is considered that traffic operates normally; if the two are different, then the device D considers that a mismatch fault occurs in the IPG, and generates alarm information to report the fault. 
         [0093]      FIG. 7  shows a flowchart of a second embodiment of detecting a mismatch fault according to the disclosure; with reference to  FIG. 5 , in the second embodiment, supposing that determination of a PTS flag is performed according to all the protected members of an IPG, that is, it is needed to determine all the protected members; if all the protected members work in a segment, the PTS flag of the MEP in the segment is set, and supposing that an initial value of the PTS flag is 0. As shown in  FIG. 7 , the embodiment includes the following steps. 
         [0094]    Step  700 : searching a certain protected member list of an IPG, traversing all the protected members in the list, searching items to which these protected members correspond in an FDB, and finding out egress ports to which they correspond according to the items. 
         [0095]    For the device A, its FDB is shown in  FIG. 5 ; there are two protected members &lt;MAC 1 , VID 1 &gt; and &lt;MAC 3 , VID 2 &gt; in a certain protected member list of the IPG; it is obtained that both the egress ports of the two protected members are the port A 1  by searching corresponding items in the FDB on the device A. 
         [0096]    The specific implementation of the step belongs to the conventional technology of the skilled personnel in the field, so it will not be described here in detail. 
         [0097]    Step  701 : determining whether the egress ports to which these protected members correspond are coincident; if so, entering step  702 ; otherwise, entering step  708 . 
         [0098]    Step  702 : setting the PTS of all the MEPs at these coincident egress ports. 
         [0099]    In the second embodiment, because both the egress ports of two protected members are the port A 1 , which means that they are coincident, respectively setting the PTS variable of the MEPs at the ports as 1, which means that the traffic is transmitted through the port A 1  currently; similarly, the PTS variable of the MEP at the port D 1  is equal to 1. 
         [0100]    According to the setting condition of the PTS, the traffic field in the CCM sent from the MEP is correspondingly set. In the second embodiment, because the PTS variable of the MEP at the port A 1  on the device A is equal to 1, the traffic field in the CCM sent from the MEP at the port A 1  is equal to 1. The traffic field is at the second MSB in the flag field of the CCM. Similarly, the traffic field of the CCM sent from the device D is equal to 1. 
         [0101]    Step  703  to step  704 : the MEP compares the traffic bit in the received CCM with its own PTS variable; if the two are identical, it is considered that operation is normal, and ending the flow; otherwise, entering step  705 . 
         [0102]    Step  705 : setting a first mismatch fault indication variable (mmCCMreceived), namely, setting it as true or 1; at the same time, starting a timer expiring in a first time period. 
         [0103]    Step  706 : when the timer is in time out, determining whether the first mismatch fault indication variable (mmCCMreceived) remains set after the first time period expires, if so, entering step  707 ; otherwise, it is considered that operation is normal, and ending the flow. 
         [0104]    Step  707 : it is considered that a mismatch fault occurs, alarm information is generated to report the fault, and the flow is ended. 
         [0105]    Step  708 : reporting related information, and exiting the flow of determining mismatch. 
         [0106]    Similarly, after receiving the CCM including the traffic which is equal to 1 from the port A 1 , the MEP at the port D 1  compares the traffic bit with its own PTS variable; if the two are identical, it is considered that traffic operates normally; if the two are different, then the device D considers that a mismatch fault occurs in the IPG, and generates alarm information to report the fault. 
         [0107]    The first embodiment and the second embodiment are mainly used for detecting a mismatch fault caused by working/protection configuration fault and other situations. 
         [0108]    The specific implementation of detecting a mismatch fault caused by incomplete switching is described below with reference to a third embodiment and a fourth embodiment in detail. Supposing that a fault occurs in the PBB-TE segment shown in  FIG. 5  for some reason, for example, part B-C, the IPG switches on the device A, but the device D does not switch;  FIG. 8  shows a schematic diagram of an embodiment that a fault occurs in the PBB-TE segment in  FIG. 5  according to the disclosure; as shown in  FIG. 8 , at this point, the egress port of the item to which the protected member of an IPG corresponds in an FDB on the device A is changed from A 1  to A 2 , and the egress port of the item, in the FDB, to which the protected member of the IPG corresponds on the device A is still A 2 ; however, because the device D does not switch successfully, the egress port of the item to which the protected member of the IPG corresponds in the FDB on the device D is still D 1 . 
         [0109]      FIG. 9  shows a flowchart of a third embodiment of detecting a mismatch fault according to the disclosure; with reference to  FIG. 8 , in the third embodiment, supposing that determination of a PTS flag is performed only according to one of the protected members of the IPG, that is, the PTS flag of the MEP in a segment is set if it is detected that there is a member working in the segment, and supposing that an initial value of the PTS flag is 0. As shown in  FIG. 9 , the embodiment includes the following steps. 
         [0110]    Step  900 : searching a certain protected member list of an IPG, finding out an item to which either a first protected member or one of the protected members in the list corresponds in an FDB, and finding out an egress port to which it corresponds according to the item. 
         [0111]    For the device A, its FDB is shown in  FIG. 8 , the egress port of the item to which the first protected member&lt;MAC 1 , VID 1 &gt; in a certain protected member list of the IPG corresponds in the FDB on the device A is port A 2 . 
         [0112]    Step  901 : according to the found egress port, setting the PTS of the MEP where the egress port is. 
         [0113]    In the third embodiment, corresponding to the port A 2  on the device A, the PTS variable of the MEP at the port A 2  is set equal to 1, which means that the traffic is transmitted through the port A 2  currently; for the device D, similarly, the PTS variable of the MEP at the port D 1  is equal to 1, which means that the traffic is transmitted through the port D 1  currently. 
         [0114]    Step  902 : comparing the value of the PTS variable with the value of a variable presentRDI of the MEP. If both of them are in a set state, or both of them are true, entering step  903 ; otherwise, operation is normal, and ending the flow; 
         [0115]    if the MEP detects that there is fault, it sends the CCM including the set RDI flag, and sets the variable presentRDI of the MEP. Because the MEP sends the CCM with the set RDI flag, it is considered that the opposite end has switched. 
         [0116]    In the third embodiment, because a fault occurs in the B-C segment, the device D as endpoint of the IPG can detect the fault; the port D 1  of the device D sends the CCM including the RDI flag to the port A 1  of the device A, and the variable presentRDI of the MEP at the port D 1  is set, that is, the variable presentRDI is equal to 1. 
         [0117]    Step  903 : setting a second mismatch fault indication variable (presentmmloc), namely, setting it as true or 1; at the same time, starting a timer expiring in a second time period. 
         [0118]    For the device D, both the PTS variable and the variable presentRDI of the MEP at its port D 1  are set, so the second mismatch fault indication variable (presentmmloc) of the MEP at the port D 1  is set. 
         [0119]    Step  904 : when the timer is in time out, determining whether the second mismatch fault indication variable (presentmmloc) remains set after the second time period expires, if so, entering step  905 ; otherwise, it is considered that operation is normal, and ending the flow. 
         [0120]    Step  905 : it is considered that a mismatch fault occurs, alarm information is generated to report the fault. 
         [0121]    After the second mismatch fault indication variable (presentmmloc) is set for a while, is it is considered that a mismatch fault occurs on the device D, and alarming to inform the fault. 
         [0122]      FIG. 10  shows a flowchart of a fourth embodiment of detecting a mismatch fault according to the disclosure; with reference to  FIG. 8 , in the fourth embodiment, supposing that determination of a PTS flag is performed according to all the protected members of an IPG, that is, it is needed to determine all the protected members; if all the protected members work in a segment, the PTS flag of the MEP in the segment is set, and supposing that an initial value of the PTS flag is 0. As shown in  FIG. 10 , the embodiment includes the following steps. 
         [0123]    Step  1000 : searching a certain protected member list of an IPG, traversing all the protected members in the list, searching items to which these protected members correspond in an FDB, and finding out egress ports to which they correspond according to the items. 
         [0124]    For the device A, its FDB is shown in  FIG. 8 ; there are two protected members &lt;MAC 1 , VID 1 &gt; and &lt;MAC 3 , VID 2 &gt; in a certain protected member list of the IPG; it is obtained that both the egress ports of the two protected members are the port A 2  by searching corresponding items in the FDB on the device A. 
         [0125]    Step  1001 : determining whether the egress ports to which these protected members correspond are coincident; if so, entering step  1002 ; otherwise, entering step  1007 . 
         [0126]    Step  1002 : setting the PTS variable of the MEP to which the egress port corresponds to be set. 
         [0127]    Because both the egress ports of two protected members of the IPG on the device A are the port A 2 , which means that they are coincident, setting the PTS variable of the MEP at the port A 2  as 1, which means that the traffic is transmitted through the port A 2  currently; similarly, the PTS variable of the MEP at the port D 1  on the device D in the fourth embodiment is equal to 1. 
         [0128]    Step  1003 : comparing the value of the PTS variable with the value of a variable is presentRDI of the MEP. If both of them are in a set state, or both of them are true, entering step  1004 ; otherwise, operation is normal, and ending the flow; 
         [0129]    if the MEP detects that there is fault, it sends the CCM including the RDI flag, and sets the variable presentRDI of the MEP. 
         [0130]    In the third embodiment, because a fault occurs in the B-C segment, the device D as endpoint of the IPG can detect the fault; the port D 1  of the device D sends the CCM including the RDI flag to the port A 1  of the device A, and the variable presentRDI of the MEP at the port D 1  is set, that is, the variable presentRDI is equal to 1. 
         [0131]    Step  1004 : setting a second mismatch fault indication variable (presentmmloc), namely, setting it as true or 1; at the same time, starting a timer expiring in a second time period. 
         [0132]    For the device D, both the PTS variable and the variable presentRDI of the MEP at its port D 1  are set, so its second mismatch fault indication variable (presentmmloc) is set. 
         [0133]    Step  1005 : when the timer is in time out, determining whether the second mismatch fault indication variable (presentmmloc) remains set after the second time period expires, if so, entering step  1006 ; otherwise, it is considered that operation is normal, and ending the flow. 
         [0134]    Step  1006 : it is considered that a mismatch fault occurs, alarm information is generated to report the fault. 
         [0135]    After the second mismatch fault indication variable (presentmmloc) is set for a while, it is considered that a mismatch fault occurs on the device D, and alarming to inform the fault. 
         [0136]    Step  1007 : reporting related information, and exiting the flow of determining mismatch. 
         [0137]    The above is only preferred embodiments of the disclosure and not intended to limit the scope of the claims of the disclosure; any modifications, equivalent replacements, improvements and the like within the spirit and principle of the disclosure shall fall within is the scope of the claims of the disclosure.