A method for transmitting and receiving a CCM packet and a transmitting and receiving apparatus thereof
By configuring service information on both the local and remote ends, dynamically allocating VLANs, and processing CCM messages, the problem of VLAN conflicts in complex service environments is solved, and the isolated transmission and accurate reception of CCM messages and service messages are achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- BEIJING GEMOTECH INTELLIGENT TECH
- Filing Date
- 2026-02-26
- Publication Date
- 2026-04-28
AI Technical Summary
In complex business environments, VLAN conflicts between CCM messages and business messages can lead to incorrect reception, and existing technologies lack effective isolation transmission mechanisms.
By pre-configuring service information at both the local and remote ends, extracting the message characteristics of CCM messages, and dynamically allocating VLANs based on VLAN actions, the CCM messages are processed and re-encapsulated to achieve dynamic VLAN matching and conversion, ensuring isolated transmission of CCM messages and service messages.
It achieves accurate sending and receiving of CCM messages and service messages, solves the transmission problems caused by VLAN conflicts, and ensures the accuracy of CCM messages and the rationality of service messages.
Smart Images

Figure CN121727933B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of network communication technology, and in particular to a method and apparatus for sending and receiving CCM messages. Background Technology
[0002] The connectivity fault detection function of CFM (Connectivity Fault Management) is used to detect the connectivity status between maintenance endpoints. The local maintenance endpoint (MEP, Maintenance Associations End Point) periodically sends CCM (Continuity Check Message) multicast messages, which are received by the remote maintenance endpoint (RMEP, Remote Maintenance Association End Point) within the same maintenance association. If the local maintenance endpoint does not receive a CCM message from the remote maintenance endpoint within a specified period, or if the remote maintenance endpoint does not receive a CCM message from the local maintenance endpoint within a specified period, the link is considered to have a problem.
[0003] However, with the diversification and increase of network services, the number of CFM link configurations also increases. This not only consumes hardware resources excessively but also leads to conflicts in the transmission of service packets and CFM packets, resulting in the inability to correctly receive CCM packets. Because current technology lacks isolation transmission for CCM packets and service packets, the received packets become chaotic. Especially when different services and different CFM configurations are simultaneously using the same channel, it is crucial to ensure the rational sending and receiving of service packets and CCM packets. Summary of the Invention
[0004] In view of this, this disclosure proposes a method and apparatus for sending and receiving CCM messages. By utilizing the dynamic allocation and conversion mechanism of VLANs (Virtual Local Area Networks), CCM messages are cleverly processed, effectively solving the CCM message transmission problem caused by VLAN conflicts in complex business environments, thereby ensuring the reasonable sending and receiving of business messages and CCM messages.
[0005] According to one aspect of this disclosure, a method for sending CCM messages is provided, wherein the local end processes the CCM message and then sends it to the remote end, wherein the local end is pre-configured with service information, including:
[0006] Obtain the CCM message currently sent by the local CPU;
[0007] Extract the message features of the CCM message and match the message features with the corresponding alloc vlan;
[0008] Obtain the service information pre-configured on the local end, and determine the VLAN action of the service from the service information;
[0009] Based on the VLAN action of the service, the VLAN carried in the CCM message is processed using the alloc VLAN matched by the message characteristics, and then re-encapsulated to obtain the current message to be sent.
[0010] In one possible implementation, when extracting the message features of the CCM message, the message features include the VLAN tag type and the service VLAN ID.
[0011] In one possible implementation, when obtaining the pre-configured service information on the local end, the service information is obtained by synchronously sending the starting CFM port number corresponding to the service information when the local CPU sends the CCM message, and obtaining the service information based on the received starting CFM port number.
[0012] In one possible implementation, the service information includes at least one of the following: service port number, VLAN ID, VLAN action, and channel index.
[0013] In one possible implementation, when processing the VLAN carried in the CCM packet based on the VLAN action of the service and using the alloc VLAN matched by the packet characteristics, the process includes:
[0014] Determine whether the VLAN action is a preset action;
[0015] When the VLAN action is the preset action, the VLAN in the CCM message is directly replaced with the alloc VLAN;
[0016] When the VLAN action is not the preset action, the VLAN in the CCM message is used as the inner VLAN, and the alloc VLAN is added as the outer VLAN.
[0017] In one possible implementation, after processing the VLAN carried by the CCM message and re-encapsulating it to obtain the current message to be sent, the method further includes: processing the current message according to the VLAN carried by the current message using a predefined first VLAN processing rule, and then sending the current message to the peer.
[0018] According to a second aspect of this disclosure, a CCM message receiving method is provided, comprising: receiving a current message sent by a local end according to the message sending method by a peer end, wherein the peer end also has pre-configured service information, including:
[0019] Receive the current message and extract the message characteristics of the current message;
[0020] Obtain the service information pre-configured by the peer, and determine the VLAN action of the service from the service information;
[0021] Based on the VLAN action of the service, the VLAN carried in the current packet is converted to obtain a CCM packet.
[0022] In one possible implementation, after the peer receives the current message and before extracting the message features of the current message, the method further includes: processing the current message according to the VLAN carried by the current message using a predefined second VLAN processing rule to obtain the processed current message.
[0023] According to a third aspect of this disclosure, a CCM message sending apparatus is provided, specifically comprising:
[0024] The message acquisition module is used to acquire the CCM messages currently being sent by the local CPU.
[0025] The message processing module is used to extract the message features of the CCM message and match the message features with the corresponding alloc VLAN; obtain the pre-configured service information of the local end, and determine the VLAN action of the service from the service information;
[0026] The message conversion module is used to process the VLAN carried in the CCM message based on the VLAN action of the service, using the alloc VLAN matched by the message characteristics, and then re-encapsulate it to obtain the current message to be sent.
[0027] According to a fourth aspect of this disclosure, a CCM message receiving device is provided, specifically comprising:
[0028] The message receiving module is used to receive the current message and extract the message characteristics of the current message;
[0029] The service information confirmation module is used to obtain the service information pre-configured by the peer and determine the VLAN action of the service from the service information.
[0030] The message restoration module converts the VLAN carried in the current message based on the VLAN action of the service to obtain a CCM message.
[0031] The CCM message sending method of this disclosure involves processing CCM messages at the local end and then sending them to the peer end, wherein the local end is pre-configured with service information. First, the CCM message currently sent by the local CPU is obtained; then, message features are extracted and matched with the corresponding alloc VLAN; the pre-configured service information at the local end is obtained, and the VLAN action of the service is determined from the service information; based on the VLAN action of the service, the VLAN carried in the CCM message is processed using the alloc VLAN matched by the message features, and then re-encapsulated to obtain the current message to be sent. After receiving a CCM message, this disclosure processes the VLAN carried in the CCM message in conjunction with the VLAN action configured in the service information, thereby achieving dynamic matching of the VLAN between the service and the CCM message. This avoids VLAN conflicts caused by multiple CFM configurations under multiple services, ultimately achieving the goal of isolated transmission of CCM messages and service messages. It solves the CCM message transmission problem caused by VLAN conflicts under multiple services in complex service environments, thus ensuring accurate sending and receiving of CCM messages.
[0032] Other features and aspects of this disclosure will become clear from the following detailed description of exemplary embodiments with reference to the accompanying drawings. Attached Figure Description
[0033] The accompanying drawings, which are included in and form part of this specification, illustrate exemplary embodiments, features, and aspects of this disclosure together with the specification and serve to explain the principles of this disclosure.
[0034] Figure 1 This diagram illustrates a CCM message transmission flowchart according to an embodiment of the present disclosure;
[0035] Figure 2 A flowchart illustrating a CCM message transmission process according to an embodiment of the present disclosure is shown.
[0036] Figure 3 A flowchart illustrating the CCM message reception and processing according to an embodiment of the present disclosure is shown. Detailed Implementation
[0037] Various exemplary embodiments, features, and aspects of this disclosure will now be described in detail with reference to the accompanying drawings. The same reference numerals in the drawings denote elements that have the same or similar functions. Although various aspects of the embodiments are shown in the drawings, they are not necessarily drawn to scale unless specifically indicated otherwise.
[0038] The term “exemplary” as used herein means “serving as an example, embodiment, or illustration.” Any embodiment illustrated herein as “exemplary” is not necessarily to be construed as superior to or better than other embodiments.
[0039] Furthermore, to better illustrate this disclosure, numerous specific details are set forth in the following detailed description. Those skilled in the art will understand that this disclosure can be practiced without certain specific details. In some instances, methods, means, components, and circuits well known to those skilled in the art have not been described in detail in order to highlight the main points of this disclosure.
[0040] <Method Implementation>
[0041] First, it should be noted that the CCM message sending method proposed in this application refers to a technique that processes CCM messages before sending them from the local end to the remote end. In the solution of this application, both the local and remote ends need to be pre-configured. That is, in step S001, the user configures services and CFM on both ends of the device. It should be noted that the CFM function belongs to the system platform side, while the service belongs to the system product side. This invention, based on the platform-side CFM function configuration and the product-side service type configuration, completes the mutual sending and receiving of CCM messages between the local and remote ends.
[0042] First, both the local and remote ends are pre-configured with service information. Service information refers to the relevant information when configuring services on the local and remote ends, including different services and corresponding attribute characteristic values configured for different services.
[0043] Specifically, the services referred to in this solution include port-based pass-through, single-layer VLAN-based pass-through, single-layer VLAN-based transformation, single-layer VLAN-based stripping, adding outer VLANs to inner VLANs, double-layer VLAN-based pass-through, outer layer transformation based on double VLANs, and stripping based on double VLANs, and more. The attribute characteristics of the services include at least one of the following: port number, VLAN ID, VLAN action, and channel index.
[0044] In other words, users select appropriate services based on their current business needs and configure the corresponding services on both the local and remote devices using command line or web interface. Each service configuration is unique. Configuring services via command line or web interface involves configuring the service's attribute characteristics to the device and saving the configuration. Ultimately, the service's attribute characteristics are configured in the relevant registers of the underlying FPGA processing unit, forming VLAN processing rules. Furthermore, the underlying FPGA allocates a channel resource for each service based on the channel index for packet transmission.
[0045] Furthermore, it should be noted that when configuring service information on both the local and remote ends, a CFM (Customer Functionality) is also configured simultaneously for each service. That is, services are configured on both ends, and each service corresponds one-to-one with its CFM. It's important to note that configuring CFM requires configuring the starting CFM port number and service VLAN (Service Virtual LAN), and the starting CFM port number and service VLAN configured for CFM must match the port number and VLAN ID configured for the corresponding service. Therefore, when a user configures different services, the main difference lies in the service port number used by the user and the differences in the inner and outer VLAN IDs. In other words, any difference in the service port number or the inner and outer VLAN IDs indicates a different service. For example, multiple services can be configured with the same port number but different VLANs; that is, multiple services configured by the user use the same port number but belong to different VLANs. Besides the basic configuration being the same, the maintenance domain name, maintenance domain level, starting CFM port number, and service VLAN are all different for different services to ensure that each service has an independent CFM instance.
[0046] In one possible implementation, after the service and CFM configuration are completed, step S100 is executed, CFM is enabled, and the MEP (Maintenance Associations End Point) maintenance node sends CCM messages. Then, in step S200, the adaptation layer processes the CCM messages in the TX sending direction, and after processing, sends the re-encapsulated CCM messages to the peer.
[0047] The adaptation layer processes CCM messages in the TX transmission direction, which is the CCM message transmission method proposed in this application. Specifically, it includes: Step S210, obtaining the CCM message currently sent by the local CPU and extracting the message characteristics of the CCM message. Then, Step S220, matching the message characteristics with the corresponding alloc VLAN, simultaneously obtaining the pre-configured service information of the local end, and determining the VLAN action of the service from the service information. Based on the VLAN action of the service, using the alloc VLAN matched by the message characteristics, the VLAN carried in the CCM message is processed and re-encapsulated to obtain the current message to be sent.
[0048] Therefore, by extracting packet features from CCM packets sent by the local CPU and matching the packet features with the corresponding allocated VLAN, and then using the service VLAN actions in the pre-configured service information, the VLAN carried in the CCM packet is processed using the allocated VLAN matched with the packet features. It should be noted that in this technical solution, matching the packet features with the corresponding allocated VLAN means matching all packet features in a single packet with one allocated VLAN. Furthermore, each service corresponds to a CFM (Confirmation Management Module), and different services may have the same port but different VLANs and the same VLAN actions; or different ports but the same VLAN and different VLAN actions. Therefore, different services will always have one or more different features, representing the uniqueness of the service and the uniqueness of the CFM, thus ensuring the uniqueness of the allocated allocated VLAN, i.e., matching all packet features with one allocated VLAN. By using a unique, dynamically allocated alloc VLAN to process the VLAN carried by the CCM message, the processed CCM message and the service message are accurately distinguished, realizing the isolated transmission of CCM message and service message. This solves the problem of CCM message transmission caused by VLAN conflicts in complex service environments, thereby ensuring the accurate sending and receiving of CCM message.
[0049] It should be noted that in step S210, when the adaptation layer receives the CCM message and extracts the message features of the CCM message, the extracted message features include the VLAN tag type and the service VLAN ID. Specifically, based on the specific meaning represented by each byte in the message content, the VLAN tag type and service VLAN ID features carried in the message are extracted using the offset.
[0050] The specific meaning of each byte is as follows, according to the IEEE 802.1Q protocol: a 4-byte VLAN tag (also known as a VLAN tag, or simply tag) is added after the destination MAC address and source MAC address fields and before the protocol type field in the Ethernet data frame. This tag identifies the VLAN to which the data frame belongs. The TPID (Tag Protocol Identifier) indicates the data frame type (i.e., VLAN tag type), occupying the first two bytes of the VLAN tag. It can be used to determine whether the packet carries a Layer 1 VLAN or a Layer 2 VLAN. For example, if the packet only has a TPID of 0x8100, it represents a Layer 1 VLAN with a single tag. If the packet has one layer of TPIDs (0x9100) and another layer of TPIDs (0x8100), it represents a Layer 2 VLAN with two tags. The single tag and double tag here refer to the VLAN tag type. The last two bytes of the VLAN tag contain the service VLAN ID carried by the CCM message.
[0051] Therefore, the message characteristics of the CCM message can be extracted from the CCM message, including whether the VLAN tag type of the CCM message is single tag or double tag, and whether the Layer 1 service VLAN ID is single tag type or Layer 2 service VLAN ID is double tag type.
[0052] In one possible implementation, when obtaining pre-configured service information on the local end, the starting CFM port number corresponding to the service information is simultaneously sent when the local CPU sends a CCM message. The service information is then obtained based on the received starting CFM port number. That is, as described above, when configuring services on both the local and remote ends, a CFM is also configured for each service. Configuring a CFM requires configuring the starting CFM port number and the service VLAN (Service Virtual Local Area Network), and the starting CFM port number and service VLAN configured for the CFM must match the port number and VLAN ID configured for the corresponding service. Therefore, when the local CPU sends a CCM message, it simultaneously sends the starting CFM port number to the local adaptation layer. After receiving the starting CFM port information, the adaptation layer performs a matching query between the corresponding CFM and service information based on this starting CFM port information to obtain the service information configured on the local end.
[0053] In one possible implementation, step S220, extracting the packet features of the CCM and matching the packet features with the corresponding alloc VLAN, can be achieved in the following way.
[0054] See Figure 2First, step S221 is executed to create a memory pool for VLAN allocation. Based on the CFM port number and the extracted inner and outer VLAN packet characteristics, an alloc VLAN is requested from the memory pool. Specifically, step S222 involves matching the packet characteristics of the CCM packet with alloc VLANs to determine if an alloc VLAN has already been requested. If it has, step S223 is executed to return the alloc VLAN according to the allocated VLAN ID. If it has not been requested, step S224 involves allocating a new alloc VLAN from the resource pool (i.e., the memory pool) and updating the record that corresponds one-to-one between packet characteristics and alloc VLANs.
[0055] Specifically, based on the port number of the CFM and the service VLAN ID packet characteristics carried in the extracted CCM packet, alloc VLANs are requested sequentially from the resource pool. The principle of alloc VLAN request is that for every CFM configured by the user, one alloc VLAN is requested. The request process can be implemented as follows:
[0056] First, a resource pool with VLAN ID 2-1001 is established. Then, based on the port number and service VLAN ID attributes of the CFM (Customer Function Manager), VLANs are requested from the resource pool. For example, the first requested VLAN is allocated = 2, the second allocated = 3, and so on, requesting VLANs sequentially, and a one-to-one correspondence is recorded between CFM packet characteristics and allocated VLANs. Before each allocated VLAN request, the record of the one-to-one correspondence between CFM packet characteristics and allocated VLANs is checked to see if an allocated VLAN has already been requested for the CFM packet characteristics. If it has, the requested allocated VLAN is returned; otherwise, a new allocated VLAN is requested from the resource pool, and the record of the one-to-one correspondence between packet characteristics and allocated VLANs is updated. It should be noted that when a user deletes the CFM configuration, the allocated VLANs requested for that CFM are released to prevent VLAN resource occupation and waste.
[0057] In one possible implementation, after successfully allocating a VLAN, the steps of obtaining pre-configured service information on the local end and determining the VLAN action of the service from this information can be performed. Specifically, based on the service attribute characteristics recorded during service configuration and the packet characteristics extracted from CCM packets, the service VLAN ID is matched against the service VLAN ID, service configuration port number, and CFM initiation port number in the CCM packet. If the match is successful, the VLAN action of the service can be obtained through the recorded service attribute characteristics.
[0058] After obtaining the VLAN action of the service, based on the VLAN action of the service, the VLAN carried by the CCM message is processed using the allocvlan matched by the message characteristics, and then re-encapsulated to obtain the current message to be sent.
[0059] It should be noted that, see Figure 2 When processing the VLAN carried in a CCM packet based on service-specific VLAN actions using the allocvlan matched by packet characteristics, the VLAN tag type is first determined based on the extracted packet characteristics. That is, the packet type is determined first. If the VLAN tag type is determined to be a double-tag type, the outer VLAN of the CCM packet is directly replaced with the matching allocvlan. If the VLAN tag type is determined to be a single-tag type, further processing of the VLAN carried in the CCM packet needs to be performed in conjunction with the service's VLAN actions.
[0060] Specifically, such as Figure 2 As shown, when the VLAN tag type is single-tag, and the VLAN carried in the CCM message is processed in conjunction with the VLAN action of the service, firstly, step S225 determines whether the VLAN action of the service corresponding to the CFM is a preset action, such as keep; if the preset action is keep, then step S226 is executed to directly replace the VLAN in the CCM message with alloc; if the VLAN action is not a preset action, then step S227 is executed to add the CCM message VLAN as the inner VLAN and the alloc VLAN as the outer VLAN. Then step S228 is executed to record the correspondence between the alloc VLAN and the replaced VLAN.
[0061] Further, see Figure 1 After processing the VLAN carried in the CCM message using the alloc VLAN matched by the message characteristics in the above manner, step S300 can be executed to re-encapsulate the processed CCM message to obtain the current message to be sent, and send the re-encapsulated CCM message to the local processing layer (i.e., FPGA (Field-Programmable Gate Array) processing unit). Then, in step S400, the local processing layer processes the current message according to the CFM configuration and uses the predefined first VLAN processing rules before sending the current message to the other end.
[0062] In step S400, when the local FPGA selects to send CCM packets to the peer based on VLAN processing rules (i.e., the predefined first VLAN processing rule), the predefined first VLAN processing rule depends on the user's configuration of the FPGA processing unit registers. Specifically, during service configuration, the VLAN matching processing rules and channel index of the underlying FPGA processing unit are configured, so that packets are transmitted through the specified channel after satisfying the VLAN matching rules at the underlying layer. CFM configuration is similar; CFM configuration completes the configuration from the application layer to the underlying layer. When configuring CFM, relevant CFM configurations such as the port for starting CFM and service VLAN configuration are saved. Based on the port for starting CFM and service VLAN, the saved service element characteristics can be obtained. Then, based on the port number for starting CFM and service VLAN, the corresponding alloc_vlan can be obtained. Finally, based on the obtained service type element characteristics and alloc_valn, the VLAN processing rules for CCM packets are adapted, and the same channel resources are used with the service type, configured in the FPGA registers.
[0063] That is, the predefined first VLAN processing rule is the VLAN processing rule configured in the TX transmission direction of the FPGA logical processing unit. After the FPGA logical processing unit receives the CCM message carrying the VLAN, it processes the CCM message according to the VLAN value and VLAN action configured in the FPGA register, and then transmits it according to the channel allocated by the hardware (that is, according to the channel index configured by the software, which is allocated synchronously during the service configuration and CFM configuration in the early stage and recorded in the CCM message).
[0064] It's important to note that the VLAN values and actions configured in the FPGA registers are set during CFM configuration. Services are configured first, then CFM is configured. Each service has its own set of VLAN values and actions, and the CFM also has its own set of VLAN values and actions, but they share the same channel. That is, after receiving a CCM message, the FPGA logic processing unit selects the corresponding VLAN value and action to process the CCM message based on its type.
[0065] In other words, in the technical solution of this application, the predefined first VLAN processing rule is: obtain the corresponding VLAN value and VLAN action according to the packet type, and then process the VLAN value in the CCM packet according to the obtained VLAN action, so as to realize the processing of the CCM packet at the local processing layer before sending it.
[0066] As mentioned above, the FGPA register is configured with VLAN values and VLAN actions. After the FPGA logic processing unit obtains the corresponding VLAN value and VLAN action from the FGPA register, it further processes the CCM message according to the first VLAN processing rule.
[0067] For example, if the current CCM packet has a VLAN ID of 100, the FPGA register is configured with a VLAN value of 100 (i.e., the inner VLAN ID is 100), and the VLAN action is to add a VLAN ID of 200, then if the FPGA logic processing unit receives a CCM packet with a VLAN ID of 100, it will identify that the inner VLAN ID of the packet is 100, perform the operation of adding a VLAN ID of 200 to the CCM packet, and then transmit the processed packet to the other end through the channel resources allocated by the hardware. If the FPGA logic processing unit receives a CCM packet with a VLAN ID other than 100, the packet will be discarded and will not be allowed to pass through the channel resources allocated by the hardware.
[0068] In the TX transmission direction example, if the device is currently empty, the user-configured service type is for port 1, the VLAN ID is 100, the VLAN action is keep, and the channel index is 1, then these elements will be configured in the registers of the underlying FPGA processing unit. After the service packet carrying VLAN 100 is transmitted from the client port of port 1 to the underlying layer, it will continue to keep VLAN 100 transmitted from channel 1 to the line port, thus completing the transmission of the service packet VLAN 100. The CFM configuration corresponding to the service, after service-vlan id 100 is converted into the requested alloc vlan id 2, will allocate vlan id 2 for port 1, the VLAN action is converted to 100, and the channel index is also 1. When the CCM packet is converted into alloc vlan id 2 after passing through the adaptation layer, the CCM packet carrying alloc vlan id 2 arrives at the underlying FPGA processing unit, where it will be converted into vlan id 100 and transmitted from channel 1. The CCM packet is then sent out from the line port.
[0069] Correspondingly, see Figure 1Based on the CCM message sending method described above, this disclosure also provides a CCM message receiving method. Specifically, in step S500, the peer processing layer (i.e., the peer FPGA processing unit) receives the CCM message (i.e., the current message) sent from the local end. Then, according to the VLAN carried by the current message, it processes the current message using a predefined second VLAN processing rule to obtain the processed current message. Next, in step S600, the peer adaptation layer performs adaptation processing on the processed current message (i.e., the peer adaptation layer processes the RX direction CCM message), thereby completing the peer's reception processing of the CCM message sent from the local end.
[0070] It should be noted that the peer end also has pre-configured service information and CFM, and its configuration method is consistent with that of the local end. Therefore, when the peer end's adaptation layer processes CCM packets in the RX direction, it performs the following steps: receiving the current packet and extracting its packet characteristics; obtaining the pre-configured service information from the peer end and determining the VLAN action of the service from the service information; and converting the VLAN carried in the current packet based on the VLAN action of the service to obtain the CCM packet.
[0071] In step S500, after the peer processing layer (i.e., the peer FPGA processing unit) receives the CCM message (i.e., the current message) sent from the local end, it processes the current message according to the VLAN carried by the current message using a predefined second VLAN processing rule. This second VLAN processing rule is configured in the RX receiving direction of the FPGA logic processing unit. The CFM not only configures the registers for the VLAN processing rules in the TX direction of the FPGA underlying processing unit, but also the registers for the VLAN processing rules in the RX direction of the FPGA underlying processing unit. Furthermore, the second VLAN processing rule is the opposite of the first VLAN processing rule. Moreover, the second VLAN processing rule includes actions beyond just deleting, changing, and adding VLANs.
[0072] For example, in the above example, the TX sending direction adaptation layer converts the CCM message service VLAN 100 into allocvlan id 2, processes it, and sends it to the FPGA processing unit. The FPGA processing unit converts allocvlan id 2 into VLAN id 100 and forwards it from the line port. The RX receiving direction device receives it from the line port, and the FPGA processing unit converts the CCM message VLAN id 100 into allocvlan id 2. Then, the RX receiving direction adaptation layer converts allocvlan id 2 back into service VLAN 100, ensuring consistency of service VLAN id between CCM message transmission and reception. The above is just an example illustrating one service based on VLAN transparent transmission, the corresponding CFM configuration, and the service-VLAN processing mechanism of CCM messages throughout the transmission process. For other services and corresponding CFM configurations, the service-VLAN transmission processing mechanism of CCM messages will certainly be different. Therefore, the VLAN processing of the FPGA logical processing unit includes, but is not limited to, deleting, changing, and adding VLANs.
[0073] It should be noted that after the message is processed by the above-mentioned RX receiving direction fgpa logic processing unit, the message will be forwarded to the RX receiving direction adaptation layer and step S600 will be executed. The adaptation layer processes the RX receiving direction CCM message.
[0074] See Figure 3 As shown, step S600, when the adaptation layer processes the CCM message in the RX receive direction, specifically includes:
[0075] In step S610, the adaptation layer receives the CCM message and extracts the message features; wherein, the method for extracting message features is the same as that used in the CCM message sending method described above.
[0076] Step S620: Determine if the CCM message is a single-tag type. Specifically, based on the extracted message characteristics, determine the VLAN layer number carried by the CCM message to further determine the tag type of the message; that is, VLAN layer 1 represents a single tag, and VLAN layer 2 represents a dual-tag. Then, based on the service information pre-configured by the peer, determine the VLAN action of the service. The specific method is the same as that used in the CCM message sending method described above, and will not be elaborated further.
[0077] Next, based on the mapping between the alloc VLAN and the VLAN of the replaced CCM packet, the original VLAN will be used to process the alloc VLAN carried in the CCM packet. The mapping between the alloc VLAN and the VLAN of the replaced CCM packet is created in the CCM sending method described above. Specifically, this includes:
[0078] When the VLAN tag type is double-tag, then in step S640, the outer alloc VLAN of the CCM message is replaced with the original VLAN;
[0079] When the VLAN tag type is single tag and the VLAN action is keep, the original VLAN is used to replace the alloc VLAN in the CCM message.
[0080] When the VLAN tag type is single tag type and the VLAN action is not keep, the outer layer alloc VLAN of the packet is directly stripped in step S630, and the remaining layer is the original VLAN of the CCM packet.
[0081] After the RX receiving direction adaptation layer completes the processing of the CCM message, that is, after the adaptation is completed in step S700, the CCM message is sent to the RMEP maintenance node (Remote Maintenance association End Point).
[0082] If the RMEP peer successfully receives the CCM message sent by the MEP local end, the RMEP peer will also send its own CCM message to the MEP local end using the same processing method. If the MEP local end and the RMEP peer exchange CCM messages and both ends can receive and process the sent CCM messages normally, the link is considered to be normal; otherwise, there is a fault.
[0083] Therefore, this disclosure provides a method for sending CCM messages. During the transmission of CCM messages sent by the MEP-side CPU, the characteristics of the initial CCM message are extracted and analyzed. Then, VLANs are dynamically requested from the resource pool, and VLAN conversion or addition is performed on the CCM message according to different service types and configuration attributes. The CCM message is then re-encapsulated and sent to the FPGA processing unit for low-level processing. After the REMP end receives the CCM message on the FPGA, it processes the CCM message according to the CCM message processing rules configured by the user in the FPGA. Before the CPU receives the CCM message, it performs VLAN conversion and stripping on the CCM message again according to different service types and configuration attributes, so that the REMP-side CPU can obtain the original initialization CCM message of the MEP and complete a fault detection interaction. This technology utilizes a dynamic VLAN allocation and conversion mechanism to handle VLAN actions on CCM messages. This effectively enables the FGPA processing unit to distinguish CCM messages from different maintenance domains corresponding to different services, thus solving the CCM message transmission problem caused by VLAN conflicts in complex service environments and ensuring the rational sending and receiving of service messages and CCM messages.
[0084] <Device Embodiment>
[0085] This disclosure discloses a CCM message sending apparatus according to an embodiment. The apparatus includes: a message acquisition module, configured to acquire a CCM message currently sent by the local CPU; a message processing module, configured to extract message features of the CCM message and match the message features with a corresponding alloc VLAN; acquire the service information pre-configured by the local end and determine the VLAN action of the service from the service information; and a message conversion module, configured to process the VLAN carried in the CCM message based on the VLAN action of the service and the alloc VLAN matched by the message features, and then re-encapsulate it to obtain a current message to be sent.
[0086] A CCM message receiving apparatus according to an embodiment of the present disclosure includes: a message receiving module for receiving a current message and extracting message features of the current message; a service information confirmation module for obtaining service information pre-configured by the peer and determining the VLAN action of the service from the service information; and a message restoration module for converting the VLAN carried in the current message based on the VLAN action of the service to obtain a CCM message.
[0087] The various embodiments of this disclosure have been described above. These descriptions are exemplary and not exhaustive, and are not limited to the disclosed embodiments. Many modifications and variations will be apparent to those skilled in the art without departing from the scope and spirit of the described embodiments. The terminology used herein is chosen to best explain the principles, practical applications, or technical improvements to the technology in the market, or to enable others skilled in the art to understand the embodiments disclosed herein.
Claims
1. A CCM message sending method, characterized in that, The local end processes the CCM message and then sends it to the peer end. The local end is pre-configured with service information, including: The local adapter layer obtains the CCM message currently sent by the local CPU; The adapter layer extracts the packet features of the CCM packet and matches the packet features with the corresponding allocvlan id; The adaptation layer obtains the service information pre-configured on the local end, and determines the VLAN action of the service from the service information; The adaptation layer processes the VLAN ID carried in the CCM message based on the VLAN action of the service and uses the alloc VLAN ID matched by the message characteristics. The processed message is then sent to the FPGA layer at the local end. After receiving the message sent by the adaptation layer, the FPGA layer processes the message to obtain the current message to be sent and sends the current message to the peer end. The VLAN ID carried in the current message is the same as the VLAN ID carried in the CCM message currently sent by the CPU.
2. The method according to claim 1, characterized in that, When extracting the message features of the CCM message, the message features include the VLAN tag type and the service VLAN ID.
3. The method according to claim 1, characterized in that, When obtaining the service information pre-configured on the local end, the service information is obtained by synchronously sending the starting CFM port number corresponding to the service information when the local CPU sends the CCM message, and obtaining the service information based on the received starting CFM port number.
4. The method according to claim 1, wherein the business information includes: The service uses at least one of the following: port number, VLAN ID, VLAN action, and channel index.
5. The method according to claim 2, characterized in that, When processing the VLAN ID carried in the CCM packet based on the VLAN action of the service, using the alloc VLAN ID matched by the packet characteristics, the process includes: When the VLAN tag type is a single tag type, determine whether the VLAN action is a preset action; When the VLAN action is the preset action, the VLAN ID in the CCM message is directly replaced with the alloc VLAN ID; When the VLAN action is not the preset action, the VLAN ID of the CCM message is used as the inner VLAN ID, and the alloc VLAN ID is added as the outer VLAN ID.
6. A message receiving method, characterized in that, The peer receives the current message sent by this end according to the message sending method according to any one of claims 1 to 5, wherein the peer also has pre-configured service information, including: The FPGA layer at the other end uses the alloc vlan id to process the vlan id carried in the current message to obtain the current received message, and then sends the current received message to the adaptation layer at the other end. The adapter layer at the other end receives the currently received message and extracts the message features of the currently received message; The adaptation layer obtains the service information pre-configured by the peer, and determines the VLAN action of the service from the service information; The adaptation layer processes the VLAN ID carried in the currently received packet based on the VLAN action of the service to obtain the CCM packet.
7. A CCM message sending device, characterized in that, Configured on the local end for sending CCM messages to the remote end, including the local adaptation unit and the local FPGA unit: The local adaptation unit is used to obtain the CCM message currently sent by the local CPU; The local adaptation unit is also used to extract the packet features of the CCM packet and match the packet features with the corresponding alloc vlan id; The local adaptation unit is also used to obtain pre-configured service information on the local end, and to determine the VLAN action of the service from the service information; The local adaptation unit is further configured to process the VLAN ID carried in the CCM message using the alloc VLAN ID matched by the message characteristics based on the VLAN action of the service, and send the processed message to the local FPGA unit. The local FPGA unit is used to receive the message sent by the local adapter unit, process the message sent by the local adapter unit to obtain the current message to be sent, and send the current message to the peer end. The VLAN ID carried in the current message is the same as the VLAN ID carried in the CCM message currently sent by the CPU.
8. A CCM message receiving device, characterized in that, Configured on the other end, including the other end adapter unit and the other end FPGA unit: The peer FPGA unit is used to receive the current message sent by the CCM message sending device according to claim 7, process the vlan id carried in the current message using the alloc vlan id to obtain the current received message, and send the current received message to the peer adaptation unit. The peer adaptation unit is used to receive the currently received message and extract the message features of the currently received message; The peer adaptation unit is further configured to obtain the service information pre-configured by the peer and determine the VLAN action of the service from the service information. The peer adaptation unit is further configured to process the VLAN ID carried in the currently received packet based on the VLAN action of the service to obtain a CCM packet.
Citation Information
Patent Citations
Delivery method of connectivity fault detection protocol messages and forwarding equipment
CN103036793A
Ethernet OAM message identification method and system
CN116634045A