Ethernet OAM message identification method and system

By parsing and processing the VLAN tag field of Ethernet OAM messages, the intercommunication problem caused by the VLAN tag encapsulation method between different devices is solved, and the normal intercommunication and adaptive processing of OAM messages in different device forms are achieved.

CN116634045BActive Publication Date: 2025-09-16FIBERHOME TELECOMMUNICATION TECHNOLOGIES CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310684719.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-06-08
Publication Date
2025-09-16
Estimated Expiration
2043-06-08

AI Technical Summary

Technical Problem

Ethernet OAM messages cannot communicate between different devices due to different private VLAN tag encapsulation methods, which is particularly evident in operator centralized procurement tests.

Method used

By parsing the VLAN tag field of the forwarding application layer, stripping the matching VLAN tag and determining whether it carries a specific protocol field, the Ethernet OAM message is identified and processed, and a flexible VLAN processing mechanism is implemented to adapt to different encapsulation forms.

Benefits of technology

It realizes the identification of OAM messages with different private VLAN tag encapsulation forms under the same service topology, ensures the normal interoperability of OAM functions under different device forms, and adapts to various asymmetric VLAN action scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116634045B_ABST
    Figure CN116634045B_ABST
Patent Text Reader

Abstract

The present application discloses an Ethernet OAM message identification method and system, which relates to the field of communication technology. The identification method includes: parsing a received message at a forwarding application layer to obtain the virtual local area network (VLAN) tag field of the message; stripping the VLAN tag field when it is determined that the VLAN tag field of the message matches the VLAN attribute of the service interface bound to Ethernet OAM; if the message after stripping the VLAN tag field does not carry a private VLAN tag field and has a specific protocol field, or if the message after stripping the VLAN tag field carries at most two layers of private VLAN tag fields and the message after stripping all private VLAN tag fields has a specific protocol field, then the message is determined to be an Ethernet OAM message. The present application can ensure the normal interoperability of OAM functions under different device forms.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of communication technology, and in particular to an Ethernet OAM message identification method and system. Background Art

[0002] Currently, the forwarding process for Ethernet OAM (Operation Administration and Maintenance) messages in transport networks, including forwarding path selection and VLAN translation, is essentially the same as the forwarding process for service messages. The main difference is that, in addition to the forwarding process, OAM messages also require packet encapsulation and transmission, packet reception and matching, and message reply processing at the service end nodes or intermediate nodes.

[0003] When it comes to Ethernet OAM packet reception and matching, the order in which the driver chip handles Ethernet OAM packet reception and VLAN (Virtual Local Area Network) translation varies depending on the OAM mode. In outward OAM mode, after identifying the OAM message, the driver chip does not participate in the subsequent VLAN translation process and directly passes the packet to the forwarding application layer for reception matching. In inward OAM mode, after identifying the OAM message, the driver chip performs a complete VLAN translation along with the service before passing the packet to the forwarding application layer for reception matching.

[0004] In terms of Ethernet OAM message encapsulation, the 802.1ag and Y1731 protocols do not clearly specify or require how OAM should carry the private virtual LAN tag (VLAN) field in EPL (Ethernet Private Line) / EVPL (Ethernet Virtual Private Line) service scenarios. However, for service messages, taking EPL services as an example, messages carrying Layer 0, Layer 1, or Layer 2 client layer CVLAN tags are allowed to be forwarded normally. Therefore, for specific EPL service scenarios, communications vendors can carry private VLAN tags when encapsulating OAM messages and use the PRI priority bit in the private VLAN tag to differentiate the priorities of service messages and OAM messages, thereby applying QoS services and performing congestion management.

[0005] However, when a communications vendor chooses to encapsulate Ethernet OAM messages with or without private VLAN tags, the corresponding encapsulation method must be precisely matched to the received message. If two vendors use different encapsulation methods for Ethernet OAM messages with private VLAN tags, OAM interoperability may occur. This situation is demonstrated in the annual centralized procurement tests conducted by operators. Only when vendors that require interoperability reach a consensus on the message encapsulation method can OAM interoperability be achieved. Summary of the Invention

[0006] In view of one of the defects in the prior art, the purpose of this application is to provide an Ethernet OAM message identification method and system to solve the problem in the related art that different Ethernet OAM message private VLAN tag encapsulation methods lead to OAM intercommunication problems.

[0007] A first aspect of the present application provides an Ethernet OAM message identification method, comprising the steps of:

[0008] The forwarding application layer parses the received message and obtains the virtual local area network tag (vlan tag) field of the message;

[0009] When it is determined that the VLAN tag field of the above message matches the VLAN attribute of the service interface bound to Ethernet OAM, the VLAN tag field is stripped;

[0010] If the message after stripping the VLAN tag field does not carry a private VLAN tag field and has a specific protocol field, or if the message after stripping the VLAN tag field carries at most two layers of private VLAN tag fields and the message after stripping all private VLAN tag fields has a specific protocol field, then the above message is determined to be an Ethernet OAM message.

[0011] In some embodiments, each time the private VLAN tag field is stripped, the process further includes:

[0012] Save the private VLAN tag field and the corresponding private VLAN layer number.

[0013] In some embodiments, after stripping the vlan tag field, the following steps are further included:

[0014] Determine whether the packet after stripping the VLAN tag field carries the private VLAN tag field;

[0015] If the TPID is identified as the device default value or other user-set value, it is determined to carry the private VLAN tag field.

[0016] In some embodiments, if the message after stripping the VLAN tag field carries more than two layers of private VLAN tag fields, the message format is determined to be abnormal and is discarded.

[0017] In some embodiments, before determining whether the vlan tag field of the message matches the vlan attribute of the service interface bound to Ethernet OAM, the method further includes:

[0018] According to the type of the above service interface, the vlan attributes of the service interface are determined; the above vlan attributes include the vlan layer number that the service interface needs to accurately match and the vlan id of the service interface.

[0019] In some embodiments, when the service interface is a primary interface, the VLAN layer number n=0;

[0020] When the service interface is a Dot1q sub-interface, the VLAN layer number n is 1.

[0021] When the service interface is a QinQ sub-interface, the number of VLAN layers n=2.

[0022] In some embodiments, when it is determined that the vlan tag field of the message does not match the vlan attribute of the service interface bound to Ethernet OAM, or the message does not have a specific protocol field, the message is discarded.

[0023] In some embodiments, after determining that the message is an Ethernet OAM message, the method further includes:

[0024] When it is determined that the reply message needs to be encapsulated, the VLAN layer number n is used as the VLAN tag encapsulation layer number, and n layers of VLAN tag field encapsulation are performed;

[0025] If the Ethernet OAM message does not carry the private VLAN tag field, the specific protocol field and subsequent fields are directly encapsulated;

[0026] If the Ethernet OAM message carries a private VLAN tag field, the private VLAN tag field is encapsulated as the payload, and then the specific protocol field and subsequent fields are encapsulated;

[0027] When it is determined that the reply message does not need to be encapsulated, the value of some PDU fields is modified and the VLAN tag field is forwarded as is.

[0028] In some embodiments, each time a private VLAN tag field is stripped, the private VLAN tag field and the corresponding private VLAN layer number are saved as saved information;

[0029] After the above n-layer VLAN tag field encapsulation, the following is also included:

[0030] Whether the Ethernet OAM message carries the private VLAN tag field is determined based on whether the saved information exists.

[0031] A second aspect of the present application provides an Ethernet OAM message identification system, which is provided in a forwarding application layer. The system includes:

[0032] An acquisition module is used to parse the received message and obtain the virtual local area network tag (vlan tag) field of the message;

[0033] A first judgment module is configured to strip the vlan tag field of the message when it is determined that the vlan tag field matches the vlan attribute of the service interface bound to the Ethernet OAM;

[0034] The second judgment module is used to judge that the above message is an Ethernet OAM message if the message after stripping the vlan tag field does not carry a private vlan tag field and has a specific protocol field, or if the message after stripping the vlan tag field carries at most two layers of private vlan tag fields and the message after stripping all private vlan tag fields has a specific protocol field.

[0035] The beneficial effects of the technical solution provided by this application include:

[0036] The Ethernet OAM message identification method and system of the present application parses the received message through the forwarding application layer to obtain the virtual local area network tag (VLAN) field of the message; when it is determined that the VLAN tag field of the message matches the VLAN attribute of the service interface bound to Ethernet OAM, the VLAN tag field is stripped; if the message after stripping the VLAN tag field does not carry a private VLAN tag field and has a specific protocol field, or if the message after stripping the VLAN tag field carries at most two layers of private VLAN tag fields and the message after stripping all private VLAN tag fields has a specific protocol field, then the message is determined to be an Ethernet OAM message.

[0037] This application utilizes a flexible VLAN processing mechanism for Ethernet OAM message reception and matching. This mechanism can identify OAM messages encapsulated in different private VLAN tags within the same service topology, and adaptively forward and reply based on the identified message encapsulation format. This ensures the interoperability of OAM functions across different device configurations. Furthermore, Ethernet OAM message processing for VLAN tags is decoupled at the send packetization and receive matching levels, facilitating OAM applications in various asymmetric VLAN action scenarios. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0039] Figure 1 This is a block diagram of information exchange between network elements NE1 and NE2;

[0040] Figure 2 This is a first flow chart of the Ethernet OAM message identification method in an embodiment of the present application;

[0041] Figure 3 This is a second flow chart of the Ethernet OAM message identification method in an embodiment of the present application;

[0042] Figure 4 This is a flowchart of steps S4-S8 in the Ethernet OAM message identification method in an embodiment of the present application;

[0043] Figure 5 This is a flowchart of steps A10-A15 in the Ethernet OAM message identification method in an embodiment of the present application. DETAILED DESCRIPTION

[0044] In order to make the purpose, technical solutions and advantages of this application more clearly understood, the present invention is further described in detail below with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are only intended to illustrate the present invention and are not intended to limit the present invention. In addition, the technical features involved in the various embodiments of the present invention described below may be combined with each other as long as they do not conflict with each other.

[0045] In some implementations, QinQ service packets carry two layers of tags across the carrier network, leveraging VLAN space expansion technology. This allows carriers to effectively separate user VLANs from public network VLANs, thereby maximizing VLAN resource conservation. Therefore, Ethernet OAM private VLAN tagging can be considered to carry only two layers of tags in most scenarios.

[0046] The main feature of the asymmetric VLAN action business scenario is the flexible processing of the VLAN translation template. Take the asymmetric VLAN action scenario with the same service interface type as an example, Figure 1As shown in the figure, when devices at both ends communicate EPL services, both the Uni and NNI interfaces of NE1 and NE2 can be set to primary interfaces. NE1's Uni interface is in tagged mode, while its NNI interface is in raw mode. NE2's Uni interface is in raw mode, while its NNI interface is in raw mode. Service flows can be forwarded normally. VLAN tag encapsulation is as follows: When the Uni interface of NE1 is used as an ingress port, a VLAN layer is added to the packet; when it is used as an egress port, a VLAN layer is stripped off. NE2's Uni interface transparently transmits packets, regardless of whether it is used as an ingress or egress port.

[0047] When intercommunication OAM, since the VLAN translation configuration mode of the opposite network element device cannot be known, the OAM message can only be accurately matched based on the VLAN translation configuration of the network element device on the local side, resulting in the inability to achieve OAM intercommunication in the above-mentioned asymmetric VLAN action scenario with the same service interface type.

[0048] The present application provides an embodiment of an Ethernet OAM message identification method, which can solve the problem in the related art that different Ethernet OAM message private VLAN tag encapsulation methods lead to OAM intercommunication failure.

[0049] like Figure 2 As shown, the Ethernet OAM message identification method of this embodiment includes the following steps:

[0050] S1. The forwarding application layer parses the received message and obtains the virtual local area network tag (vlantag) field of the message.

[0051] S2. When it is determined that the vlan tag field of the above message matches the vlan attribute of the service interface bound to Ethernet OAM, the vlan tag field is stripped.

[0052] S3. If the message after stripping the vlan tag field does not carry a private vlan tag field and has a specific protocol field, or if the message after stripping the vlan tag field carries at most two layers of private vlan tag fields and the message after stripping all private vlan tag fields has a specific protocol field, then the above message is determined to be an Ethernet OAM message.

[0053] The Ethernet OAM message identification method of this embodiment parses the received message through the forwarding application layer to obtain the virtual local area network tag (VLAN) field of the message; when it is determined that the VLAN tag field of the message matches the VLAN attribute of the service interface bound to Ethernet OAM, the VLAN tag field is stripped; if the message after stripping the VLAN tag field does not carry a private VLAN tag field and a specific protocol field is present, the received message is determined to be an Ethernet OAM message; at the same time, if the message after stripping the VLAN tag field carries at most two layers of private VLAN tag fields and the message after stripping all private VLAN tag fields contains a specific protocol field, the received message is determined to be an Ethernet OAM message.

[0054] By adopting a flexible VLAN processing mechanism for Ethernet OAM message reception and matching, Ethernet OAM messages with different private VLAN tag encapsulation forms under the same service topology can be identified, thereby ensuring the normal interoperability of OAM functions under different device forms.

[0055] Based on the above embodiment, this embodiment further includes the following steps each time the private VLAN tag field is stripped:

[0056] Save the private VLAN tag field and the corresponding private VLAN layer number.

[0057] In this embodiment, in the above step S2, after stripping the above VLAN tag field, the following steps are further included:

[0058] Determine whether the packet carries a private VLAN tag after stripping the VLAN tag field. If the TPID is the device default value 0x8100 or a user-defined value, the packet is considered to carry a private VLAN tag field, without matching the VLAN ID. Otherwise, the packet is considered to not carry a private VLAN tag field. The presence of the specific protocol field can then be determined.

[0059] If it is determined that the message after stripping the VLAN tag field carries a private VLAN tag field, the private VLAN tag field is skipped and the private VLAN tag field and the corresponding private VLAN layer number are recorded. In this case, the private VLAN layer number is 1. The message is then checked to see if it still carries a private VLAN tag field. If it still carries a private VLAN tag field, the message is skipped again and the current private VLAN tag field and the private VLAN layer number are recorded. In this case, the corresponding private VLAN layer number is 2. The message is then checked to see if it still carries a private VLAN tag field. If the message still carries a private VLAN tag field after stripping two layers of private VLAN tags, the corresponding private VLAN layer number is 3, and the message format is determined to be abnormal.

[0060] Furthermore, if the message after stripping the VLAN tag field carries more than two layers of private VLAN tag fields, the message format is determined to be abnormal and is discarded.

[0061] Based on the above embodiment, this embodiment further includes the following steps before determining whether the vlan tag field of the message matches the vlan attribute of the service interface bound to Ethernet OAM:

[0062] According to the type of the above service interface, the vlan attributes of the service interface are determined; the above vlan attributes include the vlan layer number that the service interface needs to accurately match and the vlan id of the service interface.

[0063] In this embodiment, when the service interface is a main interface, the VLAN layer number n=0; when the service interface is a Dot1q sub-interface, the VLAN layer number n=1; when the service interface is a Qinq sub-interface, the VLAN layer number n=2.

[0064] Optionally, when the VLAN layer number corresponding to the VLAN tag field of the above message is 0, if the service interface bound to Ethernet OAM is the main interface and the VLAN ID of the main interface is consistent with the VLAN ID in the message, then the VLAN tag field of the message is judged to match the VLAN attribute of the service interface bound to Ethernet OAM; if the service interface bound to Ethernet OAM is a Dot1q sub-interface or a qinq sub-interface, then it is judged that there is no match.

[0065] Correspondingly, when the VLAN layer number corresponding to the VLAN tag field of the above message is 1, if the service interface bound to Ethernet OAM is a Dot1q sub-interface and the VLAN ID of the Dot1q sub-interface is consistent with the VLAN ID in the message, then the VLAN tag field of the message is judged to match the VLAN attribute of the service interface bound to Ethernet OAM; if the service interface bound to Ethernet OAM is a main interface or a Qinq sub-interface, then it is judged that there is no match.

[0066] Based on the above embodiment, in this embodiment, when it is determined that the vlan tag field of the message does not match the vlan attribute of the service interface bound to Ethernet OAM, or the message does not have a specific protocol field, the message is discarded.

[0067] In this embodiment, the specific protocol field is 0x8902.

[0068] like Figure 3 As shown, the Ethernet OAM message identification method of this embodiment specifically includes:

[0069] A1. The forwarding application layer parses the received message and obtains the VLAN tag field of the message;

[0070] A2. Determine the VLAN attributes of the service interface based on the type of service interface. The VLAN attributes of the service interface include the VLAN layer number that the service interface must accurately match and the VLAN ID of the service interface.

[0071] A3. Determine whether the VLAN tag field of the message matches the VLAN attribute of the service interface bound to Ethernet OAM. If so, proceed to A4; otherwise, proceed to A9.

[0072] A4. After stripping the VLAN tag field, check whether the packet carries a private VLAN tag field. If so, proceed to A6; otherwise, proceed to A5.

[0073] A5. Is there a specific protocol field? If so, go to A8; otherwise, go to A9.

[0074] A6. Strip the private VLAN tag field and determine whether the corresponding private VLAN layer number is greater than 2. If so, proceed to A9; otherwise, proceed to A7.

[0075] A7. Determine whether the packet still carries the private VLAN tag field after stripping the private VLAN tag field. If so, go to A6; otherwise, go to A5.

[0076] A8. Identify the message as an Ethernet OAM message.

[0077] A9. The message is discarded.

[0078] like Figure 4 As shown, in this embodiment, after determining that the message is an Ethernet OAM message, the following steps are also included:

[0079] S4. Determine whether a reply message needs to be encapsulated based on the Ethernet OAM message type.

[0080] S5. When it is determined that the reply message needs to be encapsulated, the VLAN layer number n that the service interface needs to accurately match is used as the VLAN tag encapsulation layer number, and n layers of VLAN tag field encapsulation are performed.

[0081] S6. If the Ethernet OAM message does not carry the private VLAN tag field, the specific protocol field and subsequent fields are directly encapsulated.

[0082] S7. If the Ethernet OAM message carries a private VLAN tag field, the private VLAN tag field is encapsulated as a payload, and then the specific protocol field and subsequent fields are encapsulated.

[0083] S8. If it is determined that the reply message does not need to be encapsulated, the value of the partial PDU field is modified and the VLAN tag field is forwarded as is. The subsequent field is the PDU field value.

[0084] The order of the above steps S6 and S7 can be changed, and the order of steps S5-S7 and S8 can be changed.

[0085] In this embodiment, the subsequent field is the field following the specific protocol field in the Ethernet OAM message.

[0086] The Ethernet OAM message identification method of this embodiment can perform adaptive OAM forwarding and reply processing according to the identified message encapsulation format after receiving the Ethernet OAM message, thereby ensuring normal intercommunication of OAM functions under different device forms.

[0087] Based on the above embodiment, in this embodiment, each time the private VLAN tag field is stripped, the private VLAN tag field and the corresponding private VLAN layer number are saved as saved information.

[0088] In this embodiment, after performing n-layer VLAN tag field encapsulation, the following steps are further included:

[0089] Whether the Ethernet OAM message carries the private VLAN tag field is determined based on whether the saved information exists. If the saved information exists, it indicates that the Ethernet OAM message carries the private VLAN tag field.

[0090] like Figure 5 As shown, after the message is identified as an Ethernet OAM message, the following steps are also included:

[0091] A10. Determine whether the reply message needs to be encapsulated. If so, go to A12; otherwise, go to A11.

[0092] A11. After modifying some PDU field values, forward the VLAN tag field as is.

[0093] A12. Based on the service interface type bound to Ethernet OAM, determine the VLAN layer number n required for the service interface to be accurately matched as the VLAN tag encapsulation layer number, and perform n-layer VLAN tag field encapsulation;

[0094] A13. Determine whether the Ethernet OAM message carries a private VLAN tag field. If so, go to A14; otherwise, go to A15.

[0095] A14. Encapsulate the private VLAN tag field as payload;

[0096] A15. Encapsulates the protocol-specific field and subsequent fields.

[0097] Assuming the specific protocol field is 0x8902, the Ethernet OAM message reception, matching, reply, and forwarding implementation process is as follows:

[0098] First, the driver chip forwards the message to the forwarding application layer. When the CPU or FPGA receives and parses the message, it needs to identify and match the Ethernet OAM message's VLAN field. Specifically, based on the type of service interface bound to Ethernet OAM, it determines the VLAN layer number (n) and the service interface's VLAN ID that require an exact match. If the service interface is a primary interface, n = 0; if it is a Dot1q subinterface, n = 1; and if it is a QinQ subinterface, n = 2.

[0099] Then, it determines whether the VLAN tag field of the message matches the VLAN attribute of the service interface. If the match fails, the message is discarded; if the match succeeds, it continues to analyze whether the subsequent message carries the private VLAN tag field.

[0100] If the private VLAN tag field is not carried, the 0x8902 field is identified. If it is, it is identified as an Ethernet OAM message and processed subsequently. If it is not, the message is discarded.

[0101] Among them, when continuing to parse subsequent messages, if the private VLAN tag field is carried, this field is skipped and the private VLAN layer number is recorded. If the private VLAN layer number is greater than 2, it is determined that the message format is abnormal and the message is discarded; if the private VLAN layer number is not greater than 2, this field is skipped and the message is continued to identify whether it carries the private VLAN tag field.

[0102] When an Ethernet OAM message is successfully received and matched, the Ethernet OAM message type determines whether a reply message needs to be encapsulated. If not, the message that is already forwarding does not need to be re-encapsulated; only some PDU field values ​​need to be modified, and the VLAN tag field is forwarded unchanged. If the reply message needs to be encapsulated, the number of VLAN tag encapsulation layers, n, is determined based on the service interface type bound to Ethernet OAM: if the service interface is a primary interface, n = 0; if the service interface is a Dot1q subinterface, n = 1; if the service interface is a QinQ subinterface, n = 2.

[0103] After encapsulating the n-layer VLAN tag field, the device determines whether the received Ethernet OAM message contains a private VLAN tag field based on whether the private VLAN layer number information is saved during the receiving and identification process. If not, the device directly encapsulates 0x8902 and subsequent fields. If so, the private VLAN tag field of the received message is encapsulated as the payload, and then encapsulates 0x8902 and subsequent fields.

[0104] The present application also provides an embodiment of an Ethernet OAM message identification system, which is arranged in a forwarding application layer. The system includes an acquisition module, a first judgment module, and a second judgment module.

[0105] The acquisition module is used to parse the received message and obtain the virtual local area network tag (vlan tag) field of the message;

[0106] The first judgment module is configured to strip the vlan tag field when it is determined that the vlan tag field of the message matches the vlan attribute of the service interface bound to the Ethernet OAM;

[0107] The above-mentioned second judgment module is used to judge that the message is an Ethernet OAM message if the message after stripping the vlan tag field does not carry a private vlan tag field and there is a specific protocol field, or if the message after stripping the vlan tag field carries at most two layers of private vlan tag fields and there is a specific protocol field in the message after stripping all private vlan tag fields.

[0108] The Ethernet OAM message identification system of this embodiment is applicable to the aforementioned Ethernet OAM message identification methods. By employing a flexible VLAN processing mechanism for Ethernet OAM message reception matching, it can identify OAM messages encapsulated in different private VLAN tags within the same service topology. It also performs adaptive OAM forwarding and reply processing based on the identified message encapsulation format, ensuring the proper interoperability of OAM functions across different device configurations. Furthermore, Ethernet OAM message VLAN tag processing is decoupled at the two levels of sending packet assembly and receiving matching, facilitating OAM applications in various asymmetric VLAN action scenarios.

[0109] In the description of this application, it should be noted that the terms "upper" and "lower" and the like indicate orientations or positional relationships based on the orientations or positional relationships shown in the accompanying drawings, and are only for the convenience of describing this application and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation on this application. Unless otherwise clearly specified and limited, the terms "installed", "connected", and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or an indirect connection through an intermediate medium, or it can be internal communication between two elements. For those of ordinary skill in the art, the specific meanings of the above terms in this application can be understood according to the specific circumstances.

[0110] It should be noted that, in this application, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "comprises", "includes" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the presence of other identical elements in the process, method, article or device comprising the element.

[0111] The above are merely specific embodiments of the present application to enable those skilled in the art to understand or implement the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but rather is intended to conform to the widest scope consistent with the principles and novel features of the present application.

Claims

1. A method for identifying Ethernet OAM messages, characterized in that: It includes the steps of: The forwarding application layer parses the received message and obtains the virtual local area network tag (vlan tag) field of the message; When it is determined that the vlan tag field of the message matches the vlan attribute of the service interface bound to Ethernet OAM, stripping the vlan tag field; If the message after stripping the vlan tag field does not carry a private vlan tag field and has a specific protocol field, or if the message after stripping the vlan tag field carries at most two layers of private vlan tag fields and the message after stripping all private vlantag fields has a specific protocol field, then the message is judged to be an Ethernet OAM message; the specific protocol field is the Ethernet type field used to identify the OAM message.

2. The Ethernet OAM message identification method according to claim 1, wherein: Each time the private VLAN tag field is stripped, the following fields are also included: Save the private VLAN tag field and the corresponding private VLAN layer number.

3. The Ethernet OAM message identification method according to claim 1, wherein: After stripping the VLAN tag field, the following is also included: Determine whether the packet after stripping the VLAN tag field carries the private VLAN tag field; If the TPID is identified as the device default value or other user-set value, it is determined to carry the private VLAN tag field.

4. The Ethernet OAM message identification method according to claim 1, wherein: If the packet after stripping the VLAN tag field carries more than two private VLAN tag fields, the packet format is considered abnormal and discarded.

5. The Ethernet OAM message identification method according to claim 1, wherein: Before determining whether the vlantag field of the message matches the vlan attribute of the service interface bound to Ethernet OAM, the method further includes: According to the type of the service interface, the vlan attribute of the service interface is determined; the vlan attribute includes the vlan layer number that the service interface needs to accurately match and the vlan id of the service interface.

6. The Ethernet OAM message identification method according to claim 5, wherein: When the service interface is a primary interface, the VLAN layer number n=0; When the service interface is a Dot1q sub-interface, the VLAN layer number n=1; When the service interface is a QinQ sub-interface, the number of VLAN layers n=2.

7. The Ethernet OAM message identification method according to claim 1, wherein: When it is determined that the vlantag field of the message does not match the vlan attribute of the service interface bound to Ethernet OAM, or the message does not have a specific protocol field, the message is discarded.

8. The Ethernet OAM message identification method according to claim 5, wherein: After determining that the message is an Ethernet OAM message, the method further includes: When it is determined that the reply message needs to be encapsulated, the VLAN layer number n is used as the VLAN tag encapsulation layer number, and n layers of VLAN tag field encapsulation are performed; If the Ethernet OAM message does not carry a private VLAN tag field, the specific protocol field and subsequent fields are directly encapsulated; If the Ethernet OAM message carries a private VLAN tag field, the private VLAN tag field is encapsulated as a payload, and then the specific protocol field and subsequent fields are encapsulated; When it is determined that the reply message does not need to be encapsulated, the value of some PDU fields is modified and the VLAN tag field is forwarded as is.

9. The Ethernet OAM message identification method according to claim 8, characterized in that: Each time a private VLAN tag field is stripped, the private VLAN tag field and the corresponding private VLAN layer number are saved as saved information; After performing n-layer vlan tag field encapsulation, the method further includes: Whether the Ethernet OAM message carries the private VLAN tag field is determined based on whether the saved information exists.

10. An Ethernet OAM message identification system, characterized in that: Set in the forwarding application layer, the system includes: An acquisition module, configured to parse a received message and obtain a virtual local area network tag (vlantag) field of the message; A first judgment module is configured to strip the vlan tag field when it is determined that the vlan tag field of the message matches the vlan attribute of the service interface bound to the Ethernet OAM; A second judgment module is configured to determine that the message is an Ethernet OAM message if the message after stripping the VLAN tag field does not carry a private VLAN tag field and has a specific protocol field, or if the message after stripping the VLAN tag field carries at most two layers of private VLAN tag fields and the message after stripping all private VLAN tag fields has a specific protocol field; The specific protocol field is an Ethernet type field used to identify an OAM message.

Citation Information

Patent Citations

  • Two-layer private line network system, configuration method and equipment

    CN110601881A

  • Packet processing method and device

    WO2016188201A1