Message processing method and related equipment

By adding bypass information to the detection message, the problem that the service chain detection message in the existing technology cannot locate abnormal locations, and flexible detection of the service chain and accurate positioning of abnormal locations are achieved, and detection flexibility is improved and accuracy.

CN118945043APending Publication Date: 2024-11-12HUAWEI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310532026.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-05-11
Publication Date
2024-11-12

AI Technical Summary

Technical Problem

In the prior art, the detection packets of the service chain cannot be located along the way. Due to the different capabilities of the SF nodes, the detection packets may not be accurately transmitted or processed by errors, and the service chain cannot be realized. Flexible detection.

Method used

By adding bypass information to the detection message, the detection device can flexibly bypass some nodes on the service chain, build detection messages for the service chain, improve detection flexibility, and achieve accurate detection and abnormality of the service chain Position position.

Benefits of technology

It realizes flexible detection of the business chain and positioning of abnormal locations, improves the accuracy and flexibility of the business chain detection, and avoids detection failures due to different SF node capabilities.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118945043A_ABST
    Figure CN118945043A_ABST
Patent Text Reader

Abstract

The invention discloses a message processing method and related equipment, and the method comprises the steps that a detection device generates a first detection message comprising first bypass information, and the first bypass information is used for indicating first forwarding equipment on a service chain to bypass at least one SF node connected with the first forwarding equipment; and the detection device sends the first detection message to a second forwarding device through the first forwarding device, wherein the second forwarding device is a next hop device of the first forwarding device on the forwarding path of the service chain. Therefore, when the detection device constructs the detection message for the service chain, the detection device can flexibly add the corresponding bypass information in the detection message according to the detection requirement, strict channel associated detection according to the transmission path of the service message is not needed, the flexibility of service chain detection is improved, and the detection efficiency is improved. And obtaining of a detection result of the service chain and even positioning of an abnormal position of the service chain become possible.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data communication technology, and in particular to a message processing method and related equipment. Background Art

[0002] Service Function Chain (SFC) is a technology that provides orderly services to the application layer. It can connect the services connected on the forwarding device at the logical level to form an orderly service combination. The forwarding path of a service chain includes at least one forwarding device, and at least one service function (SF) node is connected to the forwarding device. The SF node on the service chain can be, for example, a firewall (FW), a load balancer (LB) device, or an intrusion prevention system (IPS).

[0003] At present, the detection message of the service chain is usually detected along the way, that is, when the detection message passes through each forwarding device on the forwarding path of the service chain, it needs to be transmitted on the service processing path of the forwarding device (which can be understood as the path from the forwarding device through the SF node and then back to the forwarding device) and then forwarded from the forwarding device to the next hop forwarding device on the forwarding path. In this way, the on-the-way detection method of the detection message of the service chain cannot locate the abnormal position of the service chain. Summary of the invention

[0004] The present application provides a message processing method and related equipment, wherein the detection message of a service chain can flexibly bypass some nodes on the service chain, thereby improving the flexibility of service chain detection and making it possible to locate the abnormal position of the service chain.

[0005] In the first aspect, the present application provides a message processing method, which is applied to a detection device. The method may include, for example: the detection device generates a first detection message including first bypass information, the first bypass information is used to indicate that the first forwarding device on the service chain bypasses at least one SF node connected to the first forwarding device; the detection device sends the first detection message to the second forwarding device through the first forwarding device, and the second forwarding device is the next hop device of the first forwarding device on the forwarding path of the service chain. In this way, when constructing a detection message for the service chain, the detection device can flexibly add corresponding bypass information to the detection message according to the detection requirements, without the need to perform strict on-path detection according to the transmission path of the service message, thereby improving the flexibility of service chain detection and making it possible to obtain the detection results of the service chain and even locate the abnormal position of the service chain.

[0006] In some implementations, the method may further include: the detection device receives a second detection message corresponding to the first detection message; then, the detection device can determine the detection result of the service chain according to the second detection message, and the detection result can at least indicate that there is no abnormality in the transmission path of the first detection message on the service chain according to the indication of the first bypass information. In this way, the detection device can determine the detection result of the service chain based on the feedback of the service chain to the first detection message.

[0007] In some implementations, the detection device may construct multiple detection messages carrying different bypass information as required, and determine the detection result of the service chain according to the feedback of the service chain to different detection messages. The detection result may include the located fault condition.

[0008] As an example, the method may further include: the detection device generates a third detection message including second bypass information, the second bypass information is used to indicate that multiple forwarding devices on the service chain all bypass at least one SF node connected thereto, the multiple forwarding devices include a first forwarding device and a second forwarding device; the detection device sends a third detection message to the second forwarding device via the first forwarding device; the detection device receives a fourth detection message corresponding to the third detection message. Then, the above detection device determines the detection result of the service chain according to the second detection message, for example, it may include: the detection device determines the detection result according to the second detection message and the fourth detection message. For example, if the second detection message indicates that there is a fault in the transmission path on the service chain, and the fourth detection message indicates that there is no fault in the transmission fault on the service chain, then the detection result can at least indicate that the fault occurs on the part of the path on the service chain where the first bypass information is not bypassed and the second bypass information is bypassed, which may include the service processing path connected from the second forwarding device in this example. In this way, the detection device can comprehensively determine the detection result of the service chain based on the feedback of the service chain to the first detection message and the third detection message, and even realize the location of the fault on the service chain.

[0009] As an example, the SF nodes connected to the first forwarding device on the service chain include a first SF node and a second SF node, and the first bypass information is used to instruct the first forwarding device on the service chain to bypass the first SF node. The method may also include: the detection device generates a fifth detection message, the fifth detection message includes third bypass information, and the third bypass information is used to instruct the first forwarding device on the service chain to bypass the second SF node connected to the first forwarding device; the detection device sends the fifth detection message to the second forwarding device via the first forwarding device; the detection device receives the sixth detection message corresponding to the fifth detection message. Then, the above-mentioned detection device determines the detection result of the service chain according to the second detection message, which may include: the detection device determines the detection result according to the second detection message and the sixth detection message. For example, if the second detection message indicates that there is a fault in the transmission path on the service chain, and the sixth detection message indicates that there is no fault in the transmission fault on the service chain, then the detection result can at least indicate that the fault occurs on the part of the path on the service chain where the first bypass information is not bypassed and the third bypass information is bypassed, which in this example can refer to the part of the path from the first forwarding device to the second SF node and then from the second SF node back to the first forwarding device. In this way, the detection device can comprehensively determine the detection result of the service chain based on the feedback of the service chain to the first detection message and the third detection message, and even locate the fault on the service chain.

[0010] In some implementations, the first forwarding device may be a first proxy device or a first service function forwarder (SFF), and the second forwarding device may be a second SFF or a second proxy device.

[0011] In some implementations, the first bypass information may be carried by a bypass flag (Bypass Flag) defined in the first detection message. As an example, if the first detection message is a segment routing (SR) message, then the first bypass information is carried by the Bypass Flag in the segment routing header flag (SRH Flags) of the first detection message; or, the first bypass information is carried by the Bypass Flag of the network service header (NSH) of the first detection message. Among them, the first detection message may be, for example, a segment routing (Segment RoutingInternet Protocol version 6, SRv6) message based on the sixth version of the Internet Protocol or a segment routing (Segment Routing Multi-Protocol Label Switching, SR MPLS) message based on multi-protocol label switching. As another example, even if the first detection message is not an SR message, the first bypass information may be carried by the Bypass Flag of the NSH of the first detection message.

[0012] In some other implementations, the first bypass information may be carried by a bypass segment identifier (Bypass Segment Identifier, Bypass SID) defined in the first detection message. In this implementation, if the detection message is an SRv6 message, the Bypass SID may be a 128-bit sixth version of the Internet Protocol (Internet Protocol version 6, IPv6) address, and if the detection message is an SRMPLS message, the Bypass SID may be a Multi-Protocol Label Switching (Multi-Protocol Label Switching, MPLS) label.

[0013] In some implementations, the first detection message may be of any one of the following types: an Operation Administration and Maintenance (OAM) message or an In-situ Flow Information Telemetry (IFIT) message.

[0014] In some implementations, if at least one SF device connected to the first forwarding device does not support SR, and the first detection message is an SR detection message, then the first forwarding device may be a first proxy device.

[0015] As an example, the method may also include: the detection device obtains first information, the first information includes multiple groups of correspondences between multiple service SIDs of the first forwarding device and service function path (Service Function Path, SFP) information, and the SFP information is used to indicate the forwarding path of the corresponding service chain; the detection device verifies the uniqueness of the multiple service SID configurations of the first forwarding device based on the first information. For example, each service SID of the first forwarding device corresponds to a cache, then the detection device obtains the first information, which may include: the detection device receives the first information, and the first information is obtained by the first forwarding device collecting multiple service SIDs and SFP information in the cache corresponding to each service SID in the multiple service SIDs. In this example, for the SR network, if the SF node connected to the first forwarding device is an SR-unaware node (also referred to as an SR-unaware SF node), then the first forwarding device needs to configure different caches for different service SIDs (which can be configured dynamically or statically). Each cache is used to maintain the SFP information corresponding to the SID. Before forwarding the message to the SR-unaware SF node and after receiving the message from the SR-unawareSF node, the first forwarding device needs to perform SRH encapsulation and decapsulation based on the corresponding cache. Therefore, the uniqueness of the cache configuration is very important. Once different SIDs of the first forwarding device correspond to the same cache, it may cause the message to enter other service chains, resulting in the inability to accurately provide the service. Therefore, the bypass information in the embodiment of the present application is also used to indicate the collection of information in the cache and send the collected information in the cache to the detection device, so that the detection device can perform uniqueness detection on the cache configuration (hereinafter also referred to as the service SID configuration).

[0016] In some implementations, the execution entity of the present application, namely the detection device, may be integrated into a service classifier (SC) or a controller.

[0017] In the second aspect, the present application also provides a message processing method, which is applied to a first forwarding device on a service chain. The method may include, for example: the first forwarding device obtains a first detection message including first bypass information, the first bypass information is used to indicate that the first forwarding device bypasses at least one SF node connected to the first forwarding device on the service chain; the first forwarding device obtains a second detection message based on the first detection message, the destination address of the second detection message indicates a second forwarding device, and the second forwarding device is the next hop device of the first forwarding device on the forwarding path corresponding to the service chain; the first forwarding device sends the second detection message to the second forwarding device. In this way, the first forwarding device can identify the detection message including the bypass information, and accurately process and transmit the detection message according to the bypass information. The detection message is no longer strictly transmitted along the transmission path of the service message, making it possible to flexibly detect the service chain, and providing a prerequisite for obtaining the detection results of the service chain and even locating the abnormal position of the service chain.

[0018] In some implementations, at least one SF node connected to the first forwarding device on the service chain includes a first SF node, and the method may also include: the first forwarding device obtains a first data message, and the first data message matches the service chain; the first forwarding device sends the first data message to the first SF node; the first forwarding device obtains a second data message corresponding to the first data message, and the second data message is a data message obtained after at least one SF node connected to the first forwarding device on the service chain processes the first data message; the first forwarding device sends the second data message to the second forwarding device. It can be seen that in the method provided by the present application, unlike the transmission path of the data message on the service chain, the transmission of the detection message on the service chain is guided by the bypass information, so it is possible to detect different parts of the service chain based on carrying different bypass information in the detection message.

[0019] In some implementations, the SF nodes connected to the first forwarding device on the service chain include a first SF node and a second SF node, and the first bypass information is used to instruct the first forwarding device to bypass the first SF node. Then, the first forwarding device obtains the first detection message, which may include, for example: the first forwarding device receives a third detection message; the first forwarding device sends the third detection message to the second SF node; the first forwarding device receives a fourth detection message sent by the second SF node, and the fourth detection message is obtained by the second SF node processing the third detection message; the first forwarding device obtains the first detection message according to the fourth detection message. It can be seen that the bypass information in the detection message can realize the bypass of a specified SF node connected to a forwarding device, which can meet the fine-grained detection requirements for the service chain.

[0020] In some other implementations, the first bypass information is also used to instruct the first forwarding device to bypass all SF nodes to which the first forwarding device is connected on the service chain. Then, the first forwarding device obtains the first detection message, which may include, for example: the first forwarding device receives the first detection message from a third forwarding device, the third forwarding device is an SC, or the first forwarding device is the next hop device of the third forwarding device on the forwarding path of the service chain.

[0021] In some implementations, at least one SF device connected to the first forwarding device may not support SR, and the first detection message is an SR detection message. The method may also include: the first forwarding device obtains first information based on the first bypass information, the first information including multiple groups of correspondences between multiple service SIDs and SFP information of the first forwarding device, and the SFP information is used to indicate the forwarding path of the corresponding service chain; the first forwarding device sends the first information to the detection device, and the first information is used by the detection device to verify the uniqueness of the service SID configuration of the first forwarding device. As an example, the first forwarding device obtains the first information based on the first bypass information, which may include: the first forwarding device collects each service SID and the SFP information in the cache corresponding to the service SID to obtain the first information. In this way, when there is an SF node that does not support SR in the SR network, the bypass information of the detection message is also used to instruct the forwarding device (i.e., the Proxy device) connected to the SF node that does not support SR in the forwarding device to collect the information in the cache, and send the collected information in the cache to the detection device, so as to realize the uniqueness detection of the service SID configuration on the Proxy device in the service chain, thereby improving the comprehensiveness of the service chain detection.

[0022] In some implementations, the first forwarding device obtaining the second detection message according to the first detection message may at least include: the first forwarding device updating the destination address of the first detection message to an address indicating the second forwarding device to obtain the second detection message.

[0023] In some implementations, the first forwarding device may be a first Proxy device or a first SFF, and the second forwarding device may also be a second SFF or a second Proxy device.

[0024] In some implementations, the first bypass information is carried by the BypassFlag in the segment routing header flag SRH Flags of the first detection message; or, the first bypass information is carried by the BypassFlag of the network service header NSH of the first detection message; or, the first bypass information is carried by the BypassSID of the first detection message.

[0025] In some implementations, the first detection message may be of any one of the following types: an OAM message or an IFIT message.

[0026] In a third aspect, the present application also provides a message processing device, which is applied to a detection device. The device may include at least: a processing unit and a transceiver unit. Among them, the processing unit is used to generate a first detection message, the first detection message includes first bypass information, and the first bypass information is used to indicate that a first forwarding device on the service chain bypasses at least one SF node connected to the first forwarding device; the transceiver unit is used to send the first detection message to a second forwarding device through the first forwarding device, and the second forwarding device is the next hop device of the first forwarding device on the forwarding path of the service chain.

[0027] In some implementations, the transceiver unit is further used to receive a second detection message corresponding to the first detection message; the processing unit is further used to determine the detection result of the service chain according to the second detection message.

[0028] As an example, the processing unit is further used to generate a third detection message, the third detection message includes second bypass information, the second bypass information is used to indicate that multiple forwarding devices on the service chain bypass at least one SF node connected thereto, and the multiple forwarding devices include the first forwarding device and the second forwarding device; the transceiver unit is further used to send the third detection message to the second forwarding device via the first forwarding device; the transceiver unit is further used to receive a fourth detection message corresponding to the third detection message. Then, the processing unit in this implementation is specifically used to: determine the detection result according to the second detection message and the fourth detection message.

[0029] As an example, the SF node connected to the first forwarding device on the service chain includes a first SF node and a second SF node, the first bypass information is used to instruct the first forwarding device on the service chain to bypass the first SF node, the processing unit is also used to generate a fifth detection message, the fifth detection message includes third bypass information, the third bypass information is used to instruct the first forwarding device on the service chain to bypass the second SF node connected to the first forwarding device; the transceiver unit is also used to send the fifth detection message to the second forwarding device through the first forwarding device; the transceiver unit is also used to receive a sixth detection message corresponding to the fifth detection message. Then, the processing unit in this implementation is specifically used to: determine the detection result according to the second detection message and the sixth detection message.

[0030] In some implementations, the first forwarding device is a first Proxy device or a first SFF, and the second forwarding device is a second SFF or a second Proxy device.

[0031] In some implementations, the first bypass information is carried by the BypassFlag in the SRHFlags of the first detection message; or, the first bypass information is carried by the BypassFlag of the NSH of the first detection message.

[0032] In some implementations, the first bypass information is carried by the BypassSID of the first detection message.

[0033] In some implementations, the first detection message belongs to any one of the following types: an OAM message or an IFIT message.

[0034] In some implementations, at least one SF device connected to the first forwarding device does not support SR, and the first detection message is an SR detection message.

[0035] As an example, the processing unit is also used to obtain first information, wherein the first information includes multiple groups of correspondences between multiple service SIDs of the first forwarding device and SFP information, and the SFP information is used to indicate the forwarding path of the corresponding service chain; the processing unit is also used to verify the uniqueness of the multiple service SID configurations of the first forwarding device based on the first information.

[0036] For example, each service SID of the first forwarding device corresponds to a cache, then the processing unit in this example is specifically used to: receive the first information, where the first information is obtained by the first forwarding device collecting multiple service SIDs and SFP information in the cache corresponding to each service SID in the multiple service SIDs.

[0037] In some implementations, the message processing device is integrated into the service classifier SC or the controller.

[0038] It should be noted that the specific implementation method and technical effect achieved by the device provided in this application can refer to the method provided in the first aspect.

[0039] In a fourth aspect, the present application also provides a message processing device, which is applied to a first forwarding device. The device may include at least: an acquisition unit, a processing unit, and a transceiver unit. Among them, the acquisition unit is used to obtain a first detection message, the first detection message includes first bypass information, and the first bypass information is used to indicate that the first forwarding device bypasses at least one SF node connected to the first forwarding device on the service chain; the processing unit is used to obtain a second detection message according to the first detection message, the destination address of the second detection message indicates a second forwarding device, and the second forwarding device is the next hop device of the first forwarding device on the forwarding path corresponding to the service chain; the transceiver unit is used to send the second detection message to the second forwarding device.

[0040] In some implementations, the at least one SF node connected to the first forwarding device on the service chain includes a first SF node, then the obtaining unit is further used to obtain a first data message, and the first data message matches the service chain; the transceiver unit is further used to send the first data message to the first SF node; the obtaining unit is further used to obtain a second data message corresponding to the first data message, and the second data message is a data message obtained after at least one SF node connected to the first forwarding device on the service chain processes the first data message; the transceiver unit is further used to send the second data message to the second forwarding device.

[0041] In some implementations, the SF nodes connected to the first forwarding device on the service chain include a first SF node and a second SF node, the first bypass information is used to instruct the first forwarding device to bypass the first SF node, and the obtaining unit may include a transceiver subunit and a processing subunit, wherein the transceiver subunit is used to receive a third detection message; the transceiver subunit is also used to send the third detection message to the second SF node; the transceiver subunit is also used to receive a fourth detection message sent by the second SF node, and the fourth detection message is obtained by the second SF node processing the third detection message; the processing subunit is used to obtain the first detection message according to the fourth detection message. In this implementation, the obtaining unit can be implemented by a unit with a transceiver function and a unit with a processing function.

[0042] In some implementations, the first bypass information is used to instruct the first forwarding device to bypass all SF nodes connected to the first forwarding device on the service chain, and the obtaining unit is specifically used to: receive the first detection message from a third forwarding device, the third forwarding device is an SC, or the first forwarding device is the next hop device of the third forwarding device on the forwarding path of the service chain. In this implementation, the obtaining unit can be implemented by a unit with a transceiver function.

[0043] In some implementations, at least one SF device connected to the first forwarding device does not support SR, the first detection message is an SR detection message, and the processing unit is further used to obtain first information based on the first bypass information, the first information including multiple groups of correspondences between multiple service SIDs of the first forwarding device and SFP information, the SFP information being used to indicate the forwarding path of the corresponding service chain; the transceiver unit is further used to send the first information to the detection device, and the first information is used by the detection device to verify the uniqueness of the service SID configuration of the first forwarding device.

[0044] As an example, the processing unit in this implementation is specifically used to: collect each service SID and the SFP information in the cache corresponding to the service SID to obtain the first information.

[0045] In some implementations, the processing unit is specifically configured to: update the destination address of the first detection message to an address indicating the second forwarding device, and obtain the second detection message.

[0046] In some implementations, the first forwarding device is a first Proxy device or a first SFF, and the second forwarding device is a second SFF or a second Proxy device.

[0047] In some implementations, the first bypass information is carried by the BypassFlag in the SRHFlags of the first detection message; or, the first bypass information is carried by the BypassFlag of the NSH of the first detection message; or, the first bypass information is carried by the BypassSID of the first detection message.

[0048] In some implementations, the first detection message belongs to any one of the following types: an OAM message or an IFIT message.

[0049] It should be noted that the specific implementation method and technical effect achieved by the device provided in this application can refer to the method provided in the second aspect.

[0050] In a fifth aspect, the present application provides a communication device, comprising a processor and a memory, the memory being used to store instructions or program codes, and the processor being used to call and run the instructions or program codes from the memory to execute the method in the first aspect, any possible implementation of the first aspect, the second aspect, or any possible implementation of the second aspect.

[0051] In a sixth aspect, the present application provides a communication system, comprising a detection device and a first forwarding device, the detection device being used to execute the method in the first aspect or any possible implementation of the first aspect; the first forwarding device being used to execute the method in the second aspect or any possible implementation of the second aspect.

[0052] In the seventh aspect, the present application provides a storage medium comprising instructions, programs or codes, which, when executed on a processor, enables the processor to execute the method in the first aspect, any possible implementation of the first aspect, the second aspect or any possible implementation of the second aspect.

[0053] In an eighth aspect, the present application provides a program product. When the program product runs on a processor, the processor executes the method in the first aspect, any possible implementation of the first aspect, the second aspect, or any possible implementation of the second aspect. BRIEF DESCRIPTION OF THE DRAWINGS

[0054] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the present application. For ordinary technicians in this field, other drawings can also be obtained based on these drawings.

[0055] Figure 1 This is a schematic diagram of an applicable scenario in an embodiment of the present application;

[0056] Figure 2 A flowchart of a message processing method 100 according to an embodiment of the present application;

[0057] Figure 3 A schematic diagram of a format of the SRH of the first detection message in an embodiment of the present application;

[0058] Figure 4 A schematic diagram of the format of an in-stack encapsulation method of the first detection message in an embodiment of the present application;

[0059] Figure 5 A schematic diagram of the format of a post-stack encapsulation method of the first detection message in an embodiment of the present application;

[0060] Figure 6 A schematic diagram of the format of the NSH of the first detection message in the embodiment of the present application;

[0061] Figure 7 This is another format diagram of the SRH of the first detection message in the embodiment of the present application;

[0062] Figure 8 This is a schematic diagram of another applicable scenario in an embodiment of the present application;

[0063] Fig. 9 A schematic diagram of a format of an echo reply in an embodiment of the present application;

[0064] Fig.10 1 is a schematic diagram of the structure of a message processing device 1000 in an embodiment of the present application;

[0065] Fig.11 1 is a structural diagram of another message processing device 1100 in an embodiment of the present application;

[0066] Fig.12 This is a schematic diagram of the structure of a communication device 1200 according to an embodiment of the present application;

[0067] Fig.13 This is a schematic diagram of the structure of another communication device 1300 in an embodiment of the present application;

[0068] Fig.14 14 is a schematic diagram of the structure of a communication system 1400 in an embodiment of the present application. DETAILED DESCRIPTION

[0069] In traditional networks, value-added service devices (such as FW, LB devices, IPS, etc.) are tightly coupled with the network topology. When the network is expanded or changed, the network topology needs to be replanned. Due to the complex deployment of dedicated value-added service devices, the cost of network deployment and maintenance is very high. With the development of Network Function Virtualization (NFV), network functions are decoupled from hardware, and forwarding and control are separated, achieving more flexible network control. In NFV networks, service chains are usually used to implement network services in a specified order. By updating the order of service chains without changing the network configuration, network services can be easily adjusted.

[0070] In order to ensure the normal operation of the service chain, it is necessary to detect the service chain. At present, the detection of the service chain is usually on-path detection, that is, the transmission path of the detection message on the service chain is consistent with the transmission path of the service message on the service chain. In this way, when the detection message passes through the forwarding device on the service chain, the detection message is first sent to the SF node connected to the forwarding device, and then the detection message is received from the SF node and sent to the next hop forwarding device on the forwarding path. However, due to the different capabilities of the SF nodes, after the SF node receives the detection message sent by the forwarding device, the detection message may not be forwarded to the forwarding device and continue to be transmitted on the forwarding path due to improper processing of the detection message by the SF node, thereby making it impossible to obtain accurate detection results of the service chain, and even more impossible to locate the abnormal position of the service chain. Among them, the capabilities of the SF nodes are different, for example, it can refer to that different SF nodes come from different manufacturers, and each manufacturer has different configurations of the SF nodes (such as the protocols supported by the SF nodes). Improper processing of detection messages by SF nodes may include but is not limited to: SF nodes do not support processing detection messages, then SF nodes are likely to discard detection messages; or SF nodes incorrectly process detection messages (such as processing Operation Administration and Maintenance (OAM) detection messages as non-OAM detection messages), then SF nodes are likely to discard detection messages or modify detection messages incorrectly. It can be seen that the current on-link detection solution cannot achieve the purpose of flexible detection of service chains.

[0071] Based on this, the embodiment of the present application provides a message processing method. When detecting a service chain, the detection device can construct a detection message including bypass information according to the detection requirements. For example, the bypass information is used to indicate that the first forwarding device on the service chain bypasses at least one SF node connected to the first forwarding device. After the detection message reaches the first forwarding device, the first forwarding device does not send the detection message to the at least one SF node connected to the first forwarding device according to the instruction of the bypass information in the detection message, but sends the detection message to the next hop device (i.e., the second forwarding device) of the first forwarding device on the forwarding path of the service chain. In this way, when constructing the detection message for the service chain, the detection device can flexibly add the corresponding bypass information to the detection message according to the detection requirements, without the need to perform strict on-path detection according to the transmission path of the service message, thereby improving the flexibility of the service chain detection and making it possible to obtain the detection results of the service chain and even locate the abnormal position of the service chain.

[0072] For example, the scenarios to which the embodiments of the present application are applicable may be as follows: Figure 1As shown, the scenario includes: a detection device 10, a service classifier node (Service Classifier, SC) 0, SFF1, SFF2, SF node 1 and SF node 2, wherein SC0 passes through SFF1 and SFF2 in sequence, SFF1 is connected to SF node 1, and SFF2 is connected to SF node 2. The nodes through which the service message of service chain 1 is transmitted in sequence may include: SC 0→SFF 1→SF node 1→SFF 1→SFF 2→SF node 2→SFF 2→…. The detection device 10 can implement the method provided in the embodiment of the present application to complete the detection of the service chain (for example, service chain 1). The detection device 10 can, for example, be integrated in the SC or the controller. Figure 1 In the figure, the detection device 10 is integrated into SC0 as an example.

[0073] Let's combine Figure 1 The corresponding meanings of some nouns in the embodiments of the present application are explained.

[0074] SC, located at the boundary entrance of the SFC domain, performs traffic classification, sets service identifiers, and encapsulates service message headers on messages entering the SFC domain. The SFC domain can include at least one SC, and one SC can correspond to at least one service chain. For example, SC can refer to Figure 1 SC0 on service chain 1.

[0075] SF nodes refer to devices that provide value-added service functions, such as but not limited to: firewalls, load balancing devices, etc. SF nodes can be seen, for example, Figure 1 SF node 1 or SF node 2 on service chain 1.

[0076] A forwarding device refers to a device connected to an SF node, which can identify the SF node to which the received service message needs to be forwarded, forward the service message to the corresponding SF node, and receive the service message processed by the SF node from the SF node. It should be noted that for a segment routing (SR) network, if the SF node to which the forwarding device is connected can identify the segment routing header (SRH), the SF node can be considered as an SR-aware SF node, and the forwarding device can be an SFF that only forwards service messages; if the SF node to which the forwarding device is connected cannot identify the SRH, the SF node can be considered as an SR-unaware SF node, then the forwarding device can also be a Proxy node that uses a proxy method. For messages sent to an SR-unaware SF node, the Proxy node first deletes the SRH before sending it to the SR-unawareSF node, and for messages received from an SR-unaware SF node, the Proxy node first encapsulates the SRH before continuing to forward it. For example, a forwarding device node can be found in Figure 1 In the SFF 1 or SFF 2 on the service chain 1, SFF 1 can be replaced by Proxy node 1, and SFF 2 can be replaced by Proxy node 2.

[0077] The transmission path of a service chain can refer to the path that the service message of the service chain passes through when it is transmitted on the service chain. Figure 1 Taking the service chain 1 in FIG. 1 as an example, the transmission path of the service chain 1 may include: SC 0→SFF 1→SF node 1→SFF 1→SFF 2→SF node 2→SFF 2→….

[0078] The forwarding path of a service chain can refer to the path formed by the forwarding devices on the service chain. Figure 1 Taking the service chain 1 in FIG. 1 as an example, the forwarding path of the service chain 1 may include: SFF 1→SFF 2→…

[0079] The service processing path of a service chain may refer to the path that a service message of a service chain takes to process services on a forwarding device, for example, the path from the forwarding path to the SF node and then from the SF node back to the forwarding device. Figure 1 Taking service chain 1 in the example, the service processing path corresponding to SFF1 on service chain 1 can be expressed as: SFF 1→SF node 1→SFF 1, and the service processing path corresponding to SFF 2 on service chain 1 can be expressed as: SFF 2→SF node 2→SFF 2.

[0080] For ease of understanding, Figure 1In the scenario shown, the current detection solution for the service chain and the method provided in the embodiment of the present application are exemplarily introduced.

[0081] In the current detection scheme for service chain 1, the detection device 10 in SC0 generates detection message 0, and the detection message 0 must be forwarded strictly according to the transmission path of service chain 1 (i.e., SC0→SFF1→SF node 1→SFF1→SFF2→SF node 2→SFF2→…), then, after SC0 sends detection message 0 to SFF1, SFF1 sends detection message 0 to SF node 1. Then, in one case, if SF node 1 does not have the ability to process detection messages of the type (such as OAM) to which detection message 0 belongs, detection message 0 may be discarded; in another case, if SF node 1 processes detection message 0 as a non-detection message (such as a service message), detection message 0 may be discarded, or detection message 0 may be incorrectly modified. If SF node 1 discards detection message 0, then the subsequent SFF1, SFF2 and SF node 2 will not be able to receive the detection message corresponding to the detection message 0, and the detection of service chain 1 will not be completed; if SF node 1 makes an incorrect modification to the detection message 0 to obtain the detection message 0', then SF node 1 will continue to forward the detection message 0' in the network and will not be able to complete the accurate detection of service chain 1.

[0082] In the method provided in the embodiment of the present application, the detection device 10 in SC0 generates a detection message 1, and the detection message 1 may include bypass information 1. The bypass information 1 may instruct SFF1 to bypass SF node 1. Then, after SC0 sends the detection message 1 to SFF1, SFF1 does not send the detection message 1 to SF node 1 according to the instruction of bypass information 1, but sends the detection message 1 directly to SFF2. In this way, by using the bypass information 1 in the detection message, the SF node 1 that cannot accurately process the detection message 1 is flexibly bypassed, avoiding the problem that the detection of the service chain 1 cannot be accurately completed due to the improper processing of the received detection message 1 by the SF node 1, and realizing flexible detection of the service chain 1.

[0083] The path that the above detection message 1 passes through when transmitted on the service chain 1 is recorded as path 1. Path 1 can be expressed as: SFF1→SFF2→SF node 2→SFF2→..., and the detection device 10 can determine the detection result 1 corresponding to the path 1 on the service chain 1 based on whether the detection message 2 corresponding to the detection message 1 is received, and the detection message 2 received when the detection message 2 is received, The detection result 1 may include, for example, whether a fault occurs on the path 1, wherein the detection message 2 may be generated by the tail node of the service chain 1 after receiving the detection message 1 and sent to the detection device 10. If the detection device 10 receives the detection message 2 and the detection message 2 indicates that the path 1 is normal, then the detection result 1 may include indication information 1 that the path 1 is normal; if the detection device 10 does not receive the detection message 2 or the received detection message 2 indicates that the path 1 is abnormal, then the detection result 1 may include indication information 2 that the path 1 is abnormal.

[0084] As an example, when it is determined that there is a fault in service chain 1, in order to further locate the location of the fault, the detection device 10 can also determine the location of the fault in service chain 1 according to the method provided in the embodiment of the present application by constructing multiple detection messages with different bypass information.

[0085] For example, in addition to the above-mentioned detection message 1, the detection device 10 also generates a detection message 3, which may include bypass information 2. The bypass information 2 may indicate that all SFFs on the service chain 1 bypass the SF nodes to which they are connected, and at least indicate that SFF1 bypasses SF node 1 and SFF2 bypasses SF node 2. Then, after SC0 sends the detection message 3 to SFF1, SFF1 does not send the detection message 3 to SF node 1 according to the instruction of the bypass information 2, but sends the detection message 3 directly to SFF2; similarly, SFF2 does not send the detection message 3 to SF node 2 according to the instruction of the bypass information 2 in the received detection message 3, but sends the detection message 3 directly to the next SFF. The path that the detection message 3 is transmitted through on the service chain 1 is the forwarding path of the service chain 1, which can be recorded as path 2. Path 2 can be expressed as: SFF1→SFF2... In this way, if the detection device 10 receives the detection message 4 corresponding to the detection message 3, then the detection result 2 corresponding to the path 2 on the service chain 2 can include the indication information 3 that the path 2 is normal; if the detection device 10 does not receive the detection message 4 corresponding to the detection message 3, then the detection result 2 corresponding to the path 2 on the service chain 2 can include the indication information 4 that the path 2 is abnormal. In this way, the detection device 10 can locate the location where the abnormality of the service chain 1 occurs based on the detection results 1 and 2. In one case, if the detection result 1 indicates that path 1 is abnormal, and the detection result 2 indicates that path 2 is normal, then the detection device 10 can determine that the location where the abnormality occurs is located on the service processing path corresponding to other SFFs except SFF1. Taking the fault occurring on the service processing path corresponding to SFF2 (i.e., SFF2→SF node 2→SFF2) as an example, the fault can specifically occur in: SF node 2, link 1 from SFF2 to SF node 2, or link 2 from SF node 2 to SFF2. In another case, if the detection result 1 indicates that path 1 is abnormal, and the detection result 2 indicates that path 2 is abnormal, then the detection device 10 can determine that the abnormality occurs includes a fault on the forwarding path (i.e., path 2) of service chain 1.

[0086] For another example, in addition to the above-mentioned detection message 1, the detection device 10 also generates a detection message 5, which may include bypass information 3, and the bypass information 3 may indicate that SFF2 bypasses SF node 2. Then, after SC0 sends the detection message 5 to SFF1, the path through which the detection message 5 is transmitted on the service chain 1 is recorded as path 3, and path 3 may be expressed as: SFF1→SF node 1→SFF1→SFF2→... In this way, the detection device 10 may determine the detection result 3 corresponding to the path 3 on the service chain 1 based on whether the detection message 6 corresponding to the detection message 5 is received, and the detection message 6 received when the detection message 6 is received, and the detection result 3 may include, for example, whether a fault occurs on the path 3. If the detection device 10 receives the detection message 6 and the detection message 6 indicates that the path 3 is normal, then the detection result 3 may include the indication information 5 that the path 3 is normal; if the detection device 10 does not receive the detection message 6 or the received detection message 6 indicates that the path 3 is abnormal, then the detection result 3 may include the indication information 6 that the path 3 is abnormal. In one case, if the detection result 1 indicates that path 1 is abnormal, and the detection result 3 indicates that path 3 is normal, then the detection device 10 can determine that the location where the abnormality occurs is located on the service processing path corresponding to other SFFs except SFF1. In another case, if the detection result 1 indicates that path 1 is normal, and the detection result 3 indicates that path 3 is abnormal, then the detection device 10 can determine that the abnormality occurs on the service forwarding path corresponding to SFF1.

[0087] By using multiple detection messages carrying different bypass information, the detection device can locate the location where the abnormality occurs on the service chain, thereby achieving flexible detection and fault location for the service chain.

[0088] From the description of the above scenario embodiments, it can be seen that the method provided by the embodiment of the present application not only makes it possible to accurately detect the business chain compared to the current business chain detection method, but also improves the flexibility of business chain detection, which is of great significance for the promotion and deployment of the business chain.

[0089] It should be noted that, depending on the different services to be arranged by the service chain, each SFF can be connected to at least one SF node. If one SFF is connected to multiple SF nodes, the connection relationship between multiple SF nodes and the connected SFFs is as follows: Figure 1Taking the example that SFF2 on the service chain 1 also includes SFF3, and SFF3 is connected to SF node 31 and SF node 32, in one case, the transmission path of the service chain 1 may include: SFF3→SF node 31→SF node 32→SFF3→…, that is, relative to the SFF node, multiple SF nodes may be connected in a “series” relationship; in another case, the transmission path of the service chain 1 may include: SFF3→SF node 31→SFF3→SF node 32→SFF3→…, that is, relative to the SFF node, multiple SF nodes may be connected in a “parallel” relationship. Figure 1 In the figure, SF node 31 and SF node 32 are “connected in series” on SFF3 as an example.

[0090] For a service chain that connects multiple SF nodes on an SFF, in the method provided in the embodiment of the present application, the detection message may carry bypass information indicating all SF nodes connected by the SFF bypass, or may carry bypass information indicating some SF nodes connected by the SFF bypass. Similarly, for multiple SFFs on a service chain, in the method provided in the embodiment of the present application, the detection message may carry information indicating that all SFFs on the service chain are bypassed and connected to the SF nodes, or may carry information indicating that some SFFs on the service chain are bypassed and connected to the SF nodes. When the detection device constructs the detection message, it can determine the bypass information carried in the detection message according to actual needs to meet various detection needs in various scenarios.

[0091] It should be noted that the embodiments of the present application are applicable to the detection of service chains in various network scenarios, for example, applicable to SR networks. Since in the SR network, the Segment Routing Header (SRH) of the SR message can carry one or more segment identifiers (Segment Identifier, SID) that identify the service, the SRH in the SR message can guide the SR message to pass through each SF node in the specified order, so the SR network has advantages for the service chain. The SR message can, for example, be a Segment Routing Internet Protocol version 6 (SRv6) message based on the sixth version of the Internet Protocol or a Segment Routing Multi-Protocol Label Switching (SR MPLS) message based on multi-protocol label switching.

[0092] In the embodiment of the present application, the bypass information may reflect the newly defined bypass flag (BypassFlag) or bypass segment identifier (Bypass SID) in the detection message. In the case where the bypass information is a Bypass SID, if the detection message is an SRv6 message, the Bypass SID may be a 128-bit sixth version of the Internet Protocol (Internet Protocol version 6, IPv6) address, and if the detection message is an SR MPLS message, the Bypass SID may be a Multi-Protocol Label Switching (MPLS) label.

[0093] It should be noted that the devices and nodes in the embodiments of the present application have the same meaning and can be understood and used interchangeably. SC, SF node, SFF and Proxy node can refer to communication devices such as switches, routers, virtual routing devices or virtual forwarding devices that have message forwarding functions and can implement corresponding functions in the service chain.

[0094] It should be noted that the detection device in the embodiments of the present application may, in one case, be an independently arranged controller, analysis device, network manager or other network device having the function of the detection device in the embodiments of the present application; in another case, it may be a functional module integrated in other devices and having the function of the detection device in the embodiments of the present application; for example, the detection device may be an integrated functional module in the SC; and for another example, the detection device may also be an integrated functional module in the controller.

[0095] In the embodiments of the present application, data messages and service messages of a service chain have the same meaning and can be understood and used interchangeably.

[0096] In the embodiments of the present application, a failure or anomaly may refer to a situation where transmission is not possible, or a situation where transmission quality is reduced due to congestion or the like.

[0097] In the embodiment of the present application, the type of the corresponding detection message is not limited. The detection message may be, for example, any one of the following types: an OAM message or an In-situ Flow Information Telemetry (IFIT) message.

[0098] Figure 2 The flowchart of a message processing method 100 provided in an embodiment of the present application is shown in FIG. In the method 100, the present application embodiment is introduced by the interaction between the detection device and the first forwarding device. For example, Figure 2 The embodiment shown corresponds to Figure 1In the scenario shown, the detection device may correspond to the detection device 10. If the first forwarding device corresponds to SFF 1, then the second forwarding device corresponds to SFF 2. Alternatively, if the first forwarding device corresponds to SFF 2, then the second forwarding device may correspond to SFF 3.

[0099] like Figure 2 As shown, the method 100 may include, for example, the following S101 to S105:

[0100] S101: A detection apparatus generates a first detection message, where the first detection message includes first bypass information, where the first bypass information is used to instruct a first forwarding device on a service chain to bypass at least one SF node to which the first forwarding device is connected.

[0101] The first forwarding device on the service chain may be an SFF or a proxy node using a proxy method.

[0102] In the service chain, in one case, the first forwarding device is connected to one SF node, the first SF node, then the first bypass information is used to instruct the first forwarding device to bypass the first SF node. In another case, the first forwarding device is connected to multiple SF nodes. Taking the first forwarding device connected to the first SF node and the second SF node as an example, the first bypass information can be used to instruct the first forwarding device to bypass the first SF node and the second SF node, or the first bypass information can also be used to instruct the first forwarding device to bypass the first SF node, or the first bypass information can also be used to instruct the first forwarding device to bypass the second SF node.

[0103] The first bypass information may be carried by the Bypass Flag defined in the first detection message.

[0104] As an example, if the first detection message is an SR message, a Bypass Flag for carrying the first bypass information can be defined in the first detection message, for example, at least one bit is selected in the SRH Flags of the first detection message and defined as the Bypass Flag. The value of the Bypass Flag is used to indicate whether the forwarding device of the service chain executes the local processing policy corresponding to the SID of the forwarding device. In addition, the value of the Bypass Flag can also be used to indicate whether to execute the detection corresponding to the SID of the forwarding device (such as OAM, IFIT or forwarding only). Taking the first forwarding device as a Proxy node and the first bypass information indicating the bypass of the first SF node as an example, if Bypass Flag = 1, it can be considered that the bypass is effective, and there is no need to perform Proxy-related processing on the first detection message (that is, there is no need to forward it to the first SF node), and only relevant processing is performed on the next hop device of the forwarding path (for example, the SL (Segment Left) in the SRH is changed to update the active SID in the SRH). In addition, corresponding detection can be performed based on the detection type of the first detection message (for example, if the first detection message is an OAM message, then OAM-related detection can also be performed); if Bypass Flag = 0, it can be considered that no bypass is required, and Proxy-related processing is performed on the first detection message. In addition, corresponding detection can be performed based on the detection type of the first detection message.

[0105] In the case where the first detection message is an SRv6 message, in the embodiment of the present application, any undefined bit in the SRH Flags can be defined as a Bypass Flag. Figure 3 The format of SRH in SRv6 message is shown. Figure 3 In the example, the third bit in the SRH Flags is used as the Bypass Flag. Figure 3As shown, the SRH of the first detection message may include: a Next Header field, an Extended Header Length (Hdr Ext Len) field, a Routing Type field, an SL field, a Last Entry field, some Flags, a Tag, and a Segment List, wherein the Segment List includes at least one SID. Among them, the value of the Next Header field is used to indicate the type of the message header immediately following the SRH, the value of the Hdr Ext Len field is used to indicate the length of the SRH, the value of the RoutingType field is used to indicate the type of the routing header, for example, the Routing Type field = 4 indicates that the routing header is an SRH, the value of the SL field is used to indicate the number of intermediate nodes that should still be visited before reaching the destination node, the value of the Last Entry field indicates the index of the last element in the Segment List contained in the Segment List, Flags are some identifiers, and the value of the Tag is used to indicate the grouping of the message.

[0106] For the case where the first detection message is an SR MPLS message, the SR MPLS message can define a new extended label structure based on draft-ietf-mpls-mna-fwk to indicate a new network action (Network Action). In an embodiment of the present application, a Bypass Flag (also referred to as Bypass-flag) can be defined to carry the first bypass information. Since the extended header of the current SR MPLS message can be divided into a sub-stack (also referred to as in-stack) and a post-stack. For in-stack, Bypass-flag has a variety of possible implementations, and you can refer to draft-jags-mpls-mna-hdr-05 (ietf.org) for details. Figure 4For an example of a possible in-stack encapsulation method, you can refer to draft-song-mpls-flag-based-opt-00-Flag-based MPLS On PathTelemetry Network Actions (ietf.org) to define Bypass-flag. It should be noted that for in-stack encapsulation methods, you can also refer to draft-song-ippm-postcard-based-telemetry-15-Postcard-BasedOn-Path Telemetry using Packet Marking (ietf.org). For post-stack, Bypass-flag has multiple possible implementations, for details, please refer to draft-song-mpls-extension-header-11, Figure 5 For an exemplary introduction of a possible post-stack encapsulation method, refer to draft-gandhi-mpls-ioam-09 (ietf.org), in which the Bypass-flag is defined in the Flag-Based Network Action Indicators (Flag-Based NAIs) field.

[0107] As another example, the first detection message can also implement the function of the service chain through the Network Service Header (NSH) encapsulation, then the first detection message can also carry the first bypass information through the Bypass Flag defined in the NSH. The value of the Bypass Flag is used to indicate whether the forwarding device of the service chain executes the local processing policy corresponding to the SID of the forwarding device. In addition, the value of the Bypass Flag can also be used to indicate whether to execute the detection corresponding to the SID of the forwarding device (such as OAM, IFIT message or forwarding only). Taking the first forwarding device as a Proxy node and the first bypass information indicating the bypass of the first SF node as an example, if Bypass Flag=1, it can be considered that the bypass is effective, and there is no need to perform Proxy-related processing on the first detection message (that is, there is no need to forward it to the first SF node), and only relevant processing is performed on the next hop device of the forwarding path (for example, the SI (service index, service index) in the NSH can be determined according to the SPI (service path id, service path identifier) ​​and SI). In addition, corresponding detection can be performed based on the detection type of the first detection message (for example, if the first detection message is an OAM message, then OAM-related detection can also be performed); if Bypass Flag=0, it can be considered that no bypass is required, and Proxy-related processing is performed on the first detection message. In addition, corresponding detection can be performed based on the detection type of the first detection message.

[0108] In the case where the first detection message implements the service chain function through NSH encapsulation, the first detection message can define any undefined bit in NSH as Bypass Flag. Figure 6 The format of NSH in the first detection message is shown. Figure 6 In the example, the second bit of the four undefined bits between the length field and the metadata domain type (MDType) field is used as the Bypass Flag. Figure 6As shown, the NSH of the first detection message may include: a version number (Ver) field, an O flag, a time to live (TTL) field, a Length field, an MD Type field, and a next protocol (Next Protocol) field, wherein the value of the Ver field is used to indicate the NSH version number, the value of the O flag is used to indicate the message type of the first detection message, the value of the TTL field is used to indicate the maximum number of network segments allowed to pass before the Internet Protocol (IP) message is discarded, the value of the Length field is used to indicate the total length of the first detection message, the value of the MDType field is used to indicate the format of the metadata domain, and the value of the NextProtocol field is used to indicate the message type of the first detection message before NSH encapsulation. There is a one-bit undefined field between the O flag and the TTL field, and there are 4 bits of undefined fields between the Length field and the MD Type field. Any bit in the undefined field can be used as a Bypass Flag to carry the first bypass information.

[0109] It should be noted that if the first detection message is an SR message and the service chain is implemented through NSH encapsulation, then the first detection message includes SRH and NSH, NSH can be encapsulated in SRH, and the first bypass information can be carried by BypassFlag defined in SRH and / or NSH.

[0110] The first bypass information may also be carried by the BypassSID defined in the first detection message.

[0111] If the first detection message is an SR message, a BypassSID for carrying the first bypass information may be defined, and the BypassSID is carried in the first detection message. As an example, the BypassSID may be inserted before or after the SID of the first forwarding device in the SRH of the first detection message to instruct the first forwarding device to perform a corresponding bypass. For example, the Bypass SID is inserted before the SID of the first forwarding device in the SRH of the first detection message, such as Figure 7 As shown, a possible format of the SRH in the first detection message is shown, with the first forwarding device as Figure 1 SFF1 in SRH includes:<BypassSID0,SFFSID1,SFFSID2,……> , where SFFSID1 is the SID corresponding to SFF1 on service chain 1, SFFSID2 is the SID corresponding to SFF2 on service chain 1, and BypassSID0 is the SID used to indicate that SFF1 bypasses SF node 1. Then, when SFF1 receives Figure 7After receiving the first detection message shown in the figure, the processing process may include: when SFF1 finds that the current active SID in the first detection message is the local BypassSID0, SL offset is performed to update the active SID in SRH, and the updated active SID may be SFFSID2; when SFF1 finds that the current active SID in the first detection message is the local service SID (i.e., SFFSID1), it is determined whether the previous SID of SFFSID1 in SRH is the local BypassSID0. If so, it can be considered that the bypass is effective, and there is no need to perform proxy-related processing on the first detection message (i.e., there is no need to forward it to the first SF node). point), only forwarding to the next-hop device for related processing (for example, changing SL-- in SRH to update the active SID in SRH), the updated active SID is SFFSID2. In addition, corresponding detection can be performed based on the detection type of the first detection message (for example, if the first detection message is an OAM message, then OAM-related detection can also be performed); if it is determined that the previous SID of SFFSID1 in SRH is not the local BypassSID, it can be considered that no bypass is required, and the first detection message is processed related to service chain 1 on SFF1. In addition, corresponding detection can be performed based on the detection type of the first detection message. Figure 7 The transmission path of the first detection message shown in FIG. 1 on service chain 1 can be found in FIG. Figure 7 The dotted part in .

[0112] For the scenario where the first detection message is an SR message, when the first detection message is an SRv6 message, then the BypassSID can be a 128-bit SRv6SID (which can be understood as an IPv6 address); when the first detection message is an SRMPLS message, then the BypassSID can be an SRMPLSSID (which can be understood as an MPLS label).

[0113] S102: The detection device transmits a first detection message on the service chain.

[0114] S103: The first forwarding device obtains a second detection message.

[0115] When the detection device generates and transmits the first detection message on the service chain, when the first detection message arrives at a forwarding device related to the bypass information carried by the first detection message, the forwarding device will perform relevant processing and forwarding of the first detection message based on the corresponding bypass information. In the embodiment of the present application, the processing and forwarding of the first detection message by the first forwarding device after the first detection message arrives at the first forwarding device related to the first bypass information is taken as an example to introduce the embodiment of the present application. After the first detection message arrives at other forwarding devices related to the bypass information, the forwarding device processes and forwards the first detection message in a similar manner, which will not be repeated.

[0116] As an example, if the first bypass information is used to instruct the first forwarding device to bypass all SF nodes connected to the first forwarding device on the service chain, then S103 may include, for example: the first forwarding device receives a second detection message from a third forwarding device, the third forwarding device may be an SC, the first forwarding device is the next hop device of the SC on the service chain, or the third forwarding device may be an SFF or a Proxy node, then the first forwarding device is the next hop device of the third forwarding device on the forwarding path of the service chain. Figure 1 Taking the scenario shown as an example, if the first forwarding device corresponds to SFF 1 and the third forwarding device corresponds to SC0, then S102~S103 may include: the detection device 10 in SC0 sends a first detection message to SFF1, and SFF1 receives the first detection message (that is, the second detection message in S103), that is, the second detection message in S103 is the same as the first detection message in S102; if the first forwarding device corresponds to SFF2 and the third forwarding device corresponds to SFF1, then S102~S103 may include: the detection device 10 in SC0 sends a first detection message to SFF1, after SFF1 receives the first detection message, SFF1 obtains a second detection message according to the first detection message, SFF 1 sends a second detection message to SFF2, and SFF2 receives the second detection message, wherein SFF1 obtains the second detection message according to the first detection message, which at least includes: SFF1 modifies the destination address in the first detection message to an address indicating SFF2.

[0117] As another example, if the first forwarding device is connected to multiple SF nodes on the service chain, and the first bypass information is used to instruct the first forwarding device to bypass some of the SF nodes connected to the first forwarding device on the service chain, then the second detection message may be a detection message received by the first forwarding device from the SF node that has not been bypassed after the detection message received from the detection device is forwarded to the SF node that has not been bypassed. Taking the example that the SF nodes connected to the first forwarding device on the service chain include the first SF node and the second SF node, and the first bypass information is used to instruct the first forwarding device to bypass the first SF node, S103 may include: S1031, the first forwarding device receives the fourth detection message; S1032, the first forwarding device sends the fourth detection message to the second SF node; S1033, the first forwarding device receives the second detection message sent by the second SF node, and the second detection message is obtained by the second SF node processing the fourth detection message.

[0118] For S1031, if the first forwarding device is the next-hop device of the SC on the forwarding path of the service chain, and the detection device is integrated in the SC, then the fourth detection message is the same as the first detection message; if the first forwarding device is the next-hop device of the SFF or Proxy node on the forwarding path of the service chain, then the fourth detection message can be the first detection message that is processed by the forwarding device between the SC and the first forwarding device on the forwarding path of the service chain and then transmitted to the first forwarding device.

[0119] In order to avoid problems such as the detection message being discarded or the detection message being incorrectly modified due to improper processing of the detection message by the SF node, the bypass information in the detection message can also instruct the SF node to bypass the service processing logic, and the SF node only forwards the received detection message including the bypass information without performing the SF processing corresponding to the SF node. Then, for S1032, after the second SF node receives the fourth detection message, the second SF node's processing of the fourth detection message at least includes: the second SF node modifies the destination address of the fourth detection message to indicate the address of the first forwarding device, and obtains the second detection message. For S1033, after the second SF node obtains the second detection message, it sends the second detection message to the first forwarding device, and the first forwarding device receives the second detection message from the second SF node.

[0120] S104: The first forwarding device obtains a third detection message according to the second detection message, where the destination address of the third detection message indicates a second forwarding device, and the second forwarding device is a next-hop device of the first forwarding device on the forwarding path corresponding to the service chain.

[0121] S105: The first forwarding device sends the third detection message to the second forwarding device.

[0122] As an example, S104 may at least include: the first forwarding device updates the destination address of the second detection message to an address indicating the second forwarding device, and obtains a third detection message.

[0123] In order to illustrate the difference in processing by the first forwarding device for the detection message in the embodiment of the present application and the data message carried on the service chain, taking the example that at least one SF node connected to the first forwarding device on the service chain includes a first SF node, and the first bypass information indicates that the first forwarding device bypasses the first SF node. In S104 to S105 of the method 100, the first forwarding device processes the second detection message to obtain a third detection message for the purpose of forwarding to the second forwarding device, and directly sends the third detection message to the second forwarding device; this is different from the transmission of data messages by the first forwarding device: after the data message carried on the service chain arrives at the first forwarding device, it needs to be sent to the first SF node for service processing first, and the first forwarding device will send the data message received from the first SF node to the second forwarding device. That is, the method 100 may also include a process of processing a data message by the first forwarding device, for example, it may include: S11, the first forwarding device obtains a first data message, and the first data message matches the service chain; S12, the first forwarding device sends the first data message to the first SF node; S13, the first forwarding device obtains a second data message corresponding to the first data message, and the second data message is a data message obtained after at least one SF node connected to the first forwarding device on the service chain processes the first data message; S14, the first forwarding device sends the second data message to the second forwarding device. Among them, the first data message matches the service chain, which can be understood as the first data message needs to be transmitted using the service chain.

[0124] As an example, if the first data packet is an SR packet and the first SF node is an SR-unaware SF node, then the first forwarding device may be a Proxy node (which can also be understood as an SFF using a Proxy method), and the above S11 may include, for example: the first forwarding device obtains a third data packet, and the third data packet includes a first service function path (Service Function Path, SFP) information, and the first SFP information corresponds to the first SID in the service SID of the first forwarding device; the first forwarding device determines the first cache, the first interface, and the second interface corresponding to the first SID based on the first SID; the first forwarding device strips the first SFP information from the third data packet to obtain the first data packet. In addition, the first forwarding device may store the first SFP information in the first cache. The first SFP information may refer to information that can indicate the forwarding path of the service chain, so that Figure 1Taking the scenario shown in the figure as an example, the first SFP information can be expressed as<SFF SID 1,SFF SID 2,……> , SFF SID 1 is the first SID corresponding to the first forwarding device; the first forwarding device configures the corresponding cache and a pair of interfaces for each service SID, for example, the configuration information on the first forwarding device may include: <first SID, first cache, first interface and second interface>. The above S12 may include, for example: the first forwarding device sends a first data message to the first SF node through the first interface. The above S13 may include, for example: the first SF node obtains a fourth data message after performing service processing on the first data message, and sends the fourth data message to the first forwarding device, so that the first forwarding device receives the fourth data message from the second interface, and the first forwarding device determines that the second interface for receiving the fourth data message corresponds to the first cache, so that the first SFP information stored in the first cache is encapsulated on the fourth data message, and the destination address of the fourth data message is modified to indicate the address of the second forwarding device, and the second data message is obtained. The above description of S13 is introduced by taking the example that the SF nodes connected to the first forwarding device only include the first SF node. If multiple SF nodes are connected to the first forwarding device, then S13 may include, for example: after all SF nodes connected to the first forwarding device perform service processing on the data packet, the first forwarding device receives the fifth data packet from the second interface, and the first forwarding device determines that the second interface for receiving the fifth data packet corresponds to the first cache, thereby encapsulating the first SFP information stored in the first cache on the fifth data packet, and modifying the destination address of the fifth data packet to indicate the address of the second forwarding device, to obtain the second data packet.

[0125] In some implementations, the detection device may determine the detection result of the service chain based on whether feedback about the first detection message is received, and the detection result at least includes: whether there is an abnormality in other parts of the transmission path of the service chain except the bypass content indicated by the first bypass information. If the detection device receives feedback about the first detection message, that is, the fifth detection message, then the detection device may determine the detection result of the service chain according to the fifth detection message, and the detection result at least includes: other parts of the transmission path of the service chain except the bypass content indicated by the first bypass information are normal; if the detection device does not receive feedback about the first detection message within a preset time, then the detection device may determine the detection result of the service chain, and the detection result at least includes: there is an abnormality in the transmission path of the service chain, and the abnormality occurs in other parts of the transmission path of the service chain except the bypass content indicated by the first bypass information.

[0126] As an example, in order to determine the location of the fault on the service chain through investigation, the method 100 can construct multiple detection messages to bypass the SF node connected to a forwarding device and bypass the SF nodes connected to multiple forwarding devices respectively, so as to locate the location of the fault on the service chain. For example, the method 100 may also include: the detection device generates a sixth detection message, the sixth detection message includes second bypass information, the second bypass information is used to indicate that multiple forwarding devices on the service chain all bypass at least one SF node connected thereto, and the multiple forwarding devices include the first forwarding device and the second forwarding device; then, the detection device sends the sixth detection message to the first forwarding device, and the first forwarding device modifies the destination address of the sixth detection message to an address indicating the second forwarding device based on the second bypass information to obtain a seventh detection message, and the first forwarding device sends the seventh detection message to the second forwarding device; after receiving the seventh detection message, the second forwarding device modifies the destination address of the seventh detection message to an address indicating the third forwarding device based on the second bypass information to obtain an eighth detection message, and the second forwarding device continues to forward the eighth detection message along the service chain, wherein the third forwarding device is the next-hop device of the second forwarding device on the forwarding path of the service chain. Then, the detection device can determine the detection result of the service chain based on whether the feedback of the first detection message and the feedback of the sixth detection message are received, and the detection result includes at least: the SF node connected to the second forwarding device on the transmission path of the service chain, and whether there is an abnormality in the link between the second forwarding device and the SF node connected to the second forwarding device.If the detection device receives feedback about the first detection message and receives feedback about the sixth detection message, then the detection device can determine the detection result of the service chain based on the received feedback, and the detection result at least includes: other parts of the transmission path of the service chain except the bypass content indicated by the first bypass information are normal; if the detection device does not receive feedback about the first detection message within a preset time period but receives feedback about the sixth detection message, then the detection device can determine the detection result of the service chain, and the detection result at least includes: there is an abnormality on the transmission path of the service chain, and the abnormality occurs in: the SF node connected to the second forwarding device on the transmission path of the service chain, or the link between the second forwarding device and the SF node connected to the second forwarding device; if the detection device does not receive feedback about the first detection message within a preset time period If feedback about the sixth detection message is received but feedback about the first detection message is received, then the detection device can determine the detection result of the service chain, and the detection result at least includes: there is an abnormality on the transmission path of the service chain, and the abnormality occurs in: other parts of the transmission path of the service chain except the bypass content indicated by the second bypass information; if the detection device does not receive feedback about the first detection message within a preset period of time and does not receive feedback about the sixth detection message, then the detection device can determine the detection result of the service chain, and the detection result at least includes: there is an abnormality on the transmission path of the service chain, and the abnormality is most likely not in these locations: the SF node to which the second forwarding device is connected on the transmission path of the service chain, and the link between the second forwarding device and the SF node to which the second forwarding device is connected.

[0127] As another example, if the service chain is connected to multiple SF nodes in a "parallel" manner on the first forwarding device, then in order to determine the location of the fault in the multiple SF nodes connected to the first forwarding device through investigation, the method 100 can construct multiple detection messages to bypass different SF nodes connected to the first forwarding device respectively, so as to locate the location of the fault in the SF node connected to the first forwarding device on the service chain. For example, assuming that the SF node connected to the first forwarding device on the service chain includes a first SF node and a second SF node, and the first bypass information is used to instruct the first forwarding device on the service chain to bypass the first SF node, then the method 100 may also include: the detection device generates a ninth detection message, the ninth detection message includes third bypass information, and the third bypass information is used to instruct the first forwarding device on the service chain to bypass the second SF node connected to the first forwarding device; then, the detection device sends the ninth detection message to the first forwarding device, and the first forwarding device, based on the third bypass information, first sends the ninth detection message to the second forwarding device through the service processing path where the first SF node is located. The first forwarding device sends the detection message including the first bypass information to the second forwarding device through the service processing path where the second SF node is located. Then, the detection device can determine the detection result of the service chain in combination with whether the feedback of the first detection message and the feedback of the ninth detection message are received, and the detection result at least includes: each SF node connected to the first forwarding device on the transmission path of the service chain, and whether there is an abnormality in the link between the first forwarding device and the SF node connected to the first forwarding device.If the detection device receives feedback about the first detection message and receives feedback about the ninth detection message, then the detection device can determine the detection result of the service chain based on the received feedback, and the detection result at least includes: the service processing path connected to the first forwarding device on the transmission path of the service chain is normal; if the detection device does not receive feedback about the first detection message within a preset time period but receives feedback about the ninth detection message, then the detection device can determine the detection result of the service chain, and the detection result at least includes: there is an abnormality on the transmission path of the service chain, and the abnormality occurs in: the second SF node, or the link between the first forwarding device and the second SF node to which the first forwarding device is connected; if the detection device does not receive feedback about the first detection message within a preset time period, but receives feedback about the ninth detection message, then the detection device can determine the detection result of the service chain, and the detection result at least includes: there is an abnormality on the transmission path of the service chain, and the abnormality occurs in: the second SF node, or the link between the first forwarding device and the second SF node to which the first forwarding device is connected; If feedback about the ninth detection message is received but feedback about the first detection message is received, then the detection device can determine the detection result of the service chain, and the detection result at least includes: there is an abnormality on the transmission path of the service chain, and the abnormality occurs in: the first SF node, or the link between the first forwarding device and the first SF node connected to the first forwarding device; if the detection device does not receive feedback about the first detection message within a preset time and does not receive feedback about the ninth detection message, then the detection device can determine the detection result of the service chain, and the detection result at least includes: there is an abnormality on the transmission path of the service chain, and the abnormality is most likely not in these positions: the service processing path where the first forwarding device is located on the transmission path of the service chain.

[0128] In some implementations, for an SR network, if the SF node to which the first forwarding device is connected is an SR-unawareSF node, then the first forwarding device needs to configure different caches for different service SIDs, and each cache is used to maintain the SFP information corresponding to the SID. Before forwarding the message to the SR-unawareSF node and after receiving the message from the SR-unawareSF node, the first forwarding device needs to encapsulate and decapsulate based on the corresponding cache. Therefore, the uniqueness of the cache configuration is very important. Once different SIDs of the first forwarding device correspond to the same cache, it may cause the message to enter other service chains, resulting in the inability to accurately provide the service. Based on this, the bypass information in the embodiment of the present application is also used to indicate the collection of information in the cache, and to send the collected information in the cache to the detection device, so that the detection device performs uniqueness detection on the cache configuration (hereinafter also referred to as the service SID configuration).

[0129] The cache on the first forwarding device may be configured dynamically or statically.

[0130] The method of dynamically configuring the cache may refer to that the first forwarding device first obtains the SFP information from the message to be forwarded to the SR-unawareSF node, determines the SID corresponding to the first forwarding device in the SFP information, and determines the cache corresponding to the SID in the first forwarding device, so that the first forwarding device strips the SFP information from the above message to be forwarded to the SR-unawareSF node, and saves the SFP information to the corresponding cache. In this method, the first forwarding device will also be configured with a pair of interfaces (the following output interface and input interface) corresponding to the SID (or cache). For the message obtained after stripping the SFP information from the above message to be forwarded to the SR-unawareSF node, it is sent to the SR-unawareSF node from the output interface corresponding to the SID. When the first forwarding device receives the message from the SR-unawareSF node, it can determine the corresponding cache based on the input interface of the message, and encapsulate the SFP information in the cache in the received message to obtain the message to be forwarded to the second forwarding device.

[0131] The method of statically configuring the cache may refer to that the first forwarding device configures corresponding caches for different SIDs, and saves the SFP information of the service chain indicated by the SID in the corresponding cache. In this method, a pair of interfaces (the following outgoing interface and incoming interface) corresponding to the SID (or cache) will also be configured in the first forwarding device. For the message obtained after stripping the SFP information from the message to be forwarded to the SR-unawareSF node, it is sent to the SR-unawareSF node from the outgoing interface corresponding to the SID. When the first forwarding device receives the message from the SR-unawareSF node, it can determine the corresponding cache based on the incoming interface of the message, and encapsulate the SFP information in the cache in the received message to obtain the message to be forwarded to the second forwarding device. Different from the method of dynamically configuring the cache, in the static method of configuring the cache, there is no need to save the SFP information stripped from the message to be forwarded to the SR-unawareSF node in the cache, and the SFP information in the cache is pre-configured. Optionally, in the static configuration of the cache, for greater security, verification of the SFP information in the cache may also be included. For example, the first forwarding device will compare the SFP information stripped from the message to be forwarded to the SR-unaware SF node with the SFP information statically stored in the cache. If they are the same, the message obtained after stripping the SFP information will continue to be sent to the SR-unawareSF node. If they are different, an error may be reported or the message may be discarded.

[0132] As an example, the method 100 may also include: the first forwarding device obtains first information based on the first bypass information in the received detection message, the first information including multiple groups of correspondences between multiple service SIDs of the first forwarding device and service function path SFP information, the SFP information being used to indicate the forwarding path of the corresponding service chain; then, the first forwarding device sends the first information to the detection device, and the first information is used by the detection device to verify the uniqueness of the service SID configuration of the first forwarding device; the detection device obtains the first information and verifies the uniqueness of the multiple SID configurations of the first forwarding device based on the first information.

[0133] Among them, each service SID of the first forwarding device can correspond to a cache, then the first forwarding device obtains the first information based on the first bypass information, for example, it can include: the first forwarding device collects multiple service SIDs and SFP information in the cache corresponding to each service SID in the multiple service SIDs to obtain the first information.

[0134] Regarding the first forwarding device sending the first information to the detection device, in one case, the first forwarding device may send the first information to the detection device after collecting the first information, and the first information may be carried in any message sent by the first forwarding device to the detection device; in another case, the first forwarding device may carry the collected first information in the third detection message, and continue to forward it on the service chain until it reaches the designated node (a forwarding device or SF node), and the designated node sends the collected second information to the detection device, and the second information at least includes the first information, and the second information is used to verify the uniqueness of the service SID configuration of each forwarding device. The designated node may be, for example, the tail node of the service chain, and the second information may be, for example, carried in the fifth detection message received by the detection device.

[0135] For the detection device to verify the uniqueness of multiple service SID configurations of the first forwarding device based on the first information, for example, it may include: the detection device determines whether the service SID and the SFP information in the first information are in a one-to-one correspondence. If multiple service SIDs correspond to the same SFP information, then the detection result of the service chain may include: the uniqueness verification of the service SID configuration fails; if the SFP information corresponding to each service SID is different, then the detection result of the service chain may include: the uniqueness verification of the service SID configuration passes.

[0136] For example, suppose Figure 8The shown scenario includes service chain 1 and service chain 2. Among them, both service chain 1 and service chain 2 include SFF 1 and SFF 2. SFF 1 includes SFF SID 1 and SFF SID 2, and SFF 2 includes SFF SID 3 and SFF SID 4. Among them, SFF SID 1 corresponds to cache 1, and cache 1 includes SFP information 1. SFF SID 2 corresponds to cache 2, and cache 2 includes SFP information 2. SFF SID 3 corresponds to cache 3, and cache 3 includes SFP information 3. SFF SID 4 corresponds to cache 4, and cache 4 includes SFP information 4. Assume that the service SID corresponding to service chain 1 on SFF 1 is SFF SID 1, the service SID corresponding to service chain 1 on SFF 2 is SFF SID 4, the service SID corresponding to service chain 2 on SFF 1 is SFF SID 2, and the service SID corresponding to service chain 2 on SFF 2 is SFF SID 3. Then, SFF 1 can collect the correspondence between each service SID and the corresponding SFP information as information 1, and send information 1 to the detection device. Information 1 can include: <SFF SID1, SFP information 1> and <SFF SID 2, SFP information 2>. The detection device determines that the uniqueness verification of the service SID configuration of SFF1 passes based on the difference between SFP information 1 and SFP information 2 in information 1. Similarly, SFF2 can collect the correspondence between each service SID and the corresponding SFP information as information 2, and send information 2 to the detection device. Information 2 can include: <SFF SID3, SFP information 3> and <SFF SID 4, SFP information 4>. The detection device determines that the uniqueness verification of the service SID configuration of SFF2 passes based on the difference between SFP information 3 and SFP information 4 in information 2. Based on this, whether it is the data packets carried on service chain 1 and service chain 2 or the detection packets for service chain 1 and service chain 2, on SFF 1 and SFF 2, the packets carried on the service chain will not be wrongly imported into other service chains due to the non-uniqueness of the service SID configuration.

[0137] As an example, after the first forwarding device collects the first information including the correspondence between the service SID and the SFP information, the ping method can be used, and the Internet Control Message Protocol (ICMP) message can be extended to achieve the purpose of transmitting the first information to the detection device. For example, the ping initiator can add a request indication for cache configuration (such as bypass information) in the echo request; the ping responder determines that the echo request has a request for cache configuration based on the type and other information in the echo request, and then carries the cache configuration (i.e., the first information) in the echo reply, and sends the cache configuration to the detection device through an Internet Control Message Protocol for the IPv6 (ICMPv6) message based on the sixth version of the Internet Protocol, so as to provide a basis for the detection device to perform cache configuration uniqueness detection. ICMPv6 messages can use the extended header of the ICMMP Extended Echo Request / Reply (ICMP Extended Echo Request / Reply) defined in RFC 4884 or RFC 8335 to carry SFP information, such as Fig. 9 As shown, the echo reply may include: an ICMP general header and an extended header. A new data object (Data Object) may be defined in the extended header. The newly defined Data Object may include an Object header and a Date. The Object header may indicate the type of the Data Object, that is, indicate that the Date part in the Data Object carries the first information and the Data carries the first information.

[0138] In this way, through the indication of bypass information in method 100, the collection of cache configuration and verification of cache configuration uniqueness can be achieved, which provides the possibility for the deployment and promotion of service chains when SR-unaware SF nodes exist in the SR network, and also makes the promotion and application of SR easier.

[0139] In the embodiment of the present application, the bypass information instructs the forwarding device to bypass the SF node connected to the forwarding device as an example. In other possible implementations, the bypass information may also instruct the SF node to bypass the corresponding SF processing flow and only forward the received message including the bypass information. Figure 1Taking the scenario shown in the figure as an example, it is assumed that the SFP information 1 in the detection message 1 received by SFF 1 can be expressed as:<BypassSID1,SFFSID1,SFFSID2,……> , where BypassSID1 is used to indicate that SFF1 bypasses SF node 1. Then, after the detection message 1 reaches SFF1, it is directly forwarded by SFF 1 to SFF2 indicated by SFFSID2 without passing through SF node 1. In another case, the SFP information 2 in the detection message 2 received by SFF1 can be expressed as:<BypassSID2,SFFSID1,SFFSID2,……> , where BypassSID2 is used to instruct SF node 1 to bypass the SF processing flow. Then, after detection message 2 arrives at SFF 1, detection message 2 can be forwarded to SF node 1. SF node 1 does not perform corresponding SF processing on detection message 2, but directly forwards detection message 2 from SF node 1 to SFF1. Thus, SFF1 then forwards detection message 2 to SFF2 indicated by SFF SID2. In this way, even if detection message 2 passes through SF node 1, SF node 1 can identify bypass information and directly forward detection message 2 instead of performing SF processing that may be erroneous according to the instruction of the bypass information, so that detection of service chain 1 can be successfully implemented.

[0140] In other implementations, the bypass information may also instruct the forwarding device of the sub-chain extending the service chain through the BSID to bypass the sub-chain extended by the forwarding device. Figure 1 Taking the scenario shown in the figure as an example, assuming that SF node 31 and SF node 32 are "connected in series" on SFF3, the SFP information in detection message 3 can be expressed as:<SFFSID1,SFFSID2,BypassSID 3,SFFBSID1,……> , where SFFBSID1 indicates subchain 11 of service chain 1, and subchain 11 passes through SFF 3, SF node 31, SF node 32 and SFF3 in sequence. BypassSID3 is used to indicate that SFF3 bypasses subchain 11. Then, detection message 3 passes through SFF1, SF node 1, SFF1, SFF2, SF node 2 and SFF2 in sequence on service chain 1 to reach SFF3, and then is directly forwarded from SFF3 to the next-hop device of SFF3 on the forwarding path of service chain 1, without expanding SFFBSID1 to<SFSID31,SFSID32> , so that the detection message 3 does not pass through the sub-chain 11.

[0141] It can be seen that, through method 100, when detecting a service chain, the detection device can construct a detection message including bypass information according to the detection requirements. For example, the bypass information is used to instruct the first forwarding device on the service chain to bypass at least one SF node connected to the first forwarding device. After the detection message reaches the first forwarding device, the first forwarding device does not send the detection message to the at least one SF node connected to the first forwarding device according to the instruction of the bypass information in the detection message, but sends the detection message to the next hop device (i.e., the second forwarding device) of the first forwarding device on the forwarding path of the service chain. In this way, when constructing the detection message for the service chain, the detection device can flexibly add the corresponding bypass information to the detection message according to the detection requirements, without the need to perform strict on-path detection according to the transmission path of the service message, thereby improving the flexibility of the service chain detection and making it possible to obtain the detection results of the service chain and even locate the abnormal position of the service chain.

[0142] Accordingly, the embodiment of the present application further provides a message processing device 1000, which is applied to a detection device, such as Fig.10 The device 1000 may include: a processing unit 1001 and a transceiver unit 1002.

[0143] The processing unit 1001 is configured to generate a first detection message, wherein the first detection message includes first bypass information, and the first bypass information is used to instruct a first forwarding device on a service chain to bypass at least one SF node connected to the first forwarding device. The processing unit 1001 may execute Figure 2 S101 shown.

[0144] The transceiver unit 1002 is configured to send the first detection message to a second forwarding device via the first forwarding device, where the second forwarding device is a next-hop device of the first forwarding device on the forwarding path of the service chain. The transceiver unit 1002 may execute Figure 2 S102 shown.

[0145] In some implementations, the transceiver unit 1002 is further configured to receive a second detection message corresponding to the first detection message; and the processing unit 1001 is further configured to determine a detection result of the service chain according to the second detection message.

[0146] As an example, the processing unit 1001 is also used to generate a third detection message, the third detection message includes second bypass information, the second bypass information is used to indicate that multiple forwarding devices on the service chain bypass at least one SF node connected thereto, and the multiple forwarding devices include the first forwarding device and the second forwarding device; the transceiver unit 1002 is also used to send the third detection message to the second forwarding device via the first forwarding device; the transceiver unit 1002 is also used to receive a fourth detection message corresponding to the third detection message. Then, the processing unit 1001 in this implementation is specifically used to: determine the detection result according to the second detection message and the fourth detection message.

[0147] As an example, the SF node connected to the first forwarding device on the service chain includes a first SF node and a second SF node, the first bypass information is used to indicate that the first forwarding device on the service chain bypasses the first SF node, the processing unit 1001 is also used to generate a fifth detection message, the fifth detection message includes third bypass information, and the third bypass information is used to indicate that the first forwarding device on the service chain bypasses the second SF node connected to the first forwarding device; the transceiver unit 1002 is also used to send the fifth detection message to the second forwarding device through the first forwarding device; the transceiver unit 1002 is also used to receive a sixth detection message corresponding to the fifth detection message. Then, the processing unit 1001 in this implementation is specifically used to: determine the detection result according to the second detection message and the sixth detection message.

[0148] In some implementations, the first forwarding device is a first Proxy device or a first SFF, and the second forwarding device is a second SFF or a second Proxy device.

[0149] In some implementations, the first bypass information is carried by the BypassFlag in the SRHFlags of the first detection message; or, the first bypass information is carried by the BypassFlag of the NSH of the first detection message.

[0150] In some implementations, the first bypass information is carried by the BypassSID of the first detection message.

[0151] In some implementations, the first detection message belongs to any one of the following types: an OAM message or an IFIT message.

[0152] In some implementations, at least one SF device connected to the first forwarding device does not support SR, and the first detection message is an SR detection message.

[0153] As an example, the processing unit 1001 is also used to obtain first information, wherein the first information includes multiple groups of correspondences between multiple service SIDs of the first forwarding device and SFP information, and the SFP information is used to indicate the forwarding path of the corresponding service chain; the processing unit 1001 is also used to verify the uniqueness of the multiple service SID configurations of the first forwarding device based on the first information.

[0154] For example, each service SID of the first forwarding device corresponds to a cache, then, in this example, the processing unit 1001 is specifically used to: receive the first information, where the first information is obtained by the first forwarding device collecting multiple service SIDs and SFP information in the cache corresponding to each service SID in the multiple service SIDs.

[0155] In some implementations, the message processing apparatus 1000 is integrated into a service classifier SC or a controller.

[0156] It should be noted that the specific implementation method and technical effects of the device 1000 provided in this application can be found in Figure 2 Relevant descriptions of the implementation steps of the detection device in the method 100 are shown.

[0157] Accordingly, the embodiment of the present application further provides a message processing device 1100, which is applied to a first forwarding device, such as Fig.11 The device 1100 may include: an obtaining unit 1101, a processing unit 1102 and a transceiver unit 1103. Among them:

[0158] The obtaining unit 1101 is configured to obtain a first detection message, wherein the first detection message includes first bypass information, and the first bypass information is used to instruct the first forwarding device to bypass at least one SF node connected to the first forwarding device on the service chain. The obtaining unit 1101 may be executed Figure 2 S103 shown.

[0159] Processing unit 1102 is configured to obtain a second detection message according to the first detection message, wherein the destination address of the second detection message indicates a second forwarding device, and the second forwarding device is a next-hop device of the first forwarding device on the forwarding path corresponding to the service link. The processing unit 1102 may execute Figure 2 S104 shown.

[0160] The transceiver unit 1103 is configured to send the second detection message to the second forwarding device. The transceiver unit 1103 may execute Figure 2 S105 shown.

[0161] In some implementations, the at least one SF node connected to the first forwarding device on the service chain includes a first SF node, then the obtaining unit 1101 is also used to obtain a first data message, and the first data message matches the service chain; the transceiver unit 1103 is also used to send the first data message to the first SF node; the obtaining unit 1101 is also used to obtain a second data message corresponding to the first data message, and the second data message is a data message obtained after processing the first data message by at least one SF node connected to the first forwarding device on the service chain; the transceiver unit 1103 is also used to send the second data message to the second forwarding device.

[0162] In some implementations, the SF nodes connected to the first forwarding device on the service chain include a first SF node and a second SF node, the first bypass information is used to instruct the first forwarding device to bypass the first SF node, and the obtaining unit 1101 may include a transceiver subunit and a processing subunit, wherein the transceiver subunit is used to receive a third detection message; the transceiver subunit is also used to send the third detection message to the second SF node; the transceiver subunit is also used to receive a fourth detection message sent by the second SF node, and the fourth detection message is obtained by the second SF node processing the third detection message; the processing subunit is used to obtain the first detection message according to the fourth detection message. In this implementation, the obtaining unit 1101 can be implemented by a transceiver function unit and a processing function unit.

[0163] In some implementations, the first bypass information is used to instruct the first forwarding device to bypass all SF nodes connected to the first forwarding device on the service chain, and the obtaining unit 1101 is specifically used to: receive the first detection message from a third forwarding device, the third forwarding device is an SC, or the first forwarding device is the next hop device of the third forwarding device on the forwarding path of the service chain. In this implementation, the obtaining unit 1101 can be implemented by a unit with a transceiver function.

[0164] In some implementations, at least one SF device connected to the first forwarding device does not support SR, the first detection message is an SR detection message, and the processing unit 1102 is further used to obtain first information based on the first bypass information, the first information including multiple groups of correspondences between multiple service SIDs of the first forwarding device and SFP information, the SFP information being used to indicate the forwarding path of the corresponding service chain; the transceiver unit 1103 is further used to send the first information to the detection device, and the first information is used by the detection device to verify the uniqueness of the service SID configuration of the first forwarding device.

[0165] As an example, the processing unit 1102 in this implementation is specifically configured to collect each service SID and SFP information in the cache corresponding to the service SID to obtain the first information.

[0166] In some implementations, the processing unit 1102 is specifically configured to: update the destination address of the first detection message to an address indicating the second forwarding device, and obtain the second detection message.

[0167] In some implementations, the first forwarding device is a first Proxy device or a first SFF, and the second forwarding device is a second SFF or a second Proxy device.

[0168] In some implementations, the first bypass information is carried by a Bypass Flag in SRH Flags of the first detection message; or, the first bypass information is carried by a Bypass Flag of an NSH of the first detection message; or, the first bypass information is carried by a Bypass SID of the first detection message.

[0169] In some implementations, the first detection message belongs to any one of the following types: an OAM message or an IFIT message.

[0170] It should be noted that the specific implementation method and technical effects of the device 1100 provided in this application can be found in Figure 2 Relevant description of the steps implemented by the first forwarding device in the method 100 shown.

[0171] See also Fig.12 , an embodiment of the present application provides a communication device 1200. The communication device 1200 may be any of the communication devices in any of the above embodiments, for example, Figure 1 Each SFF, SC 0 or detection device 10 in; for example, it can also be Figure 2 The detection device, the first forwarding device or the second forwarding device in the embodiment. The communication device 1200 can implement the functions of various communication devices in the above embodiments. The communication device 1200 includes at least one processor 1201, a bus system 1202, a memory 1203 and at least one communication interface 1204.

[0172] The communication device 1200 is a hardware structure device that can be used to implement Fig.10 The functional modules in the message processing device 1000 are shown. For example, those skilled in the art may think of Fig.10The processing unit 1001 in the message processing device 1000 shown in the figure can be implemented by the at least one processor 1201 calling the code in the memory 1203. Alternatively, the communication device 1200 is a hardware structure device that can be used to implement Fig.11 The functional modules in the message processing device 1100 shown in FIG. Fig.11 The processing unit 1102 in the message processing device 1100 shown can be implemented by the at least one processor 1201 calling the code in the memory 1203.

[0173] Optionally, the communication device 1200 may also be used to implement the functions of the network device in any of the above embodiments.

[0174] Optionally, the processor 1201 may be a general-purpose central processing unit (CPU), a network processor (NP), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits for controlling the execution of the program of the present application.

[0175] The bus system 1202 may include a path for transmitting information between the components.

[0176] The communication interface 1204 is used to communicate with other devices or communication networks.

[0177] The memory 1203 may be a read-only memory (ROM) or other types of static storage devices that can store static information and instructions, a random access memory (RAM) or other types of dynamic storage devices that can store information and instructions, or an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage (including compressed optical disc, laser disc, optical disc, digital versatile disc, Blu-ray disc, etc.), a magnetic disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto. The memory may exist independently and be connected to the processor via a bus. The memory may also be integrated with the processor.

[0178] The memory 1203 is used to store the application code for executing the solution of the present application, and the execution is controlled by the processor 1201. The processor 1201 is used to execute the application code stored in the memory 1203, so as to realize the functions in the method of the present application.

[0179] In a specific implementation, as an embodiment, the processor 1201 may include one or more CPUs, such as Fig.12 CPU0 and CPU1 in.

[0180] In a specific implementation, as an embodiment, the communication device 1200 may include multiple processors, such as Fig.12 1 and 1207. Each of these processors may be a single-CPU processor or a multi-CPU processor. A processor herein may refer to one or more devices, circuits, and / or processing cores for processing data (e.g., computer program instructions).

[0181] Fig.13 1 is a schematic diagram of the structure of another communication device 1300 provided in an embodiment of the present application. The communication device 1300 may be any of the communication devices in any of the above embodiments, for example, Figure 1 Each SFF, SC0 or detection device 10 in; for example, it can also be Figure 2 The communication device 1300 can implement the functions of each communication device in the above embodiments.

[0182] The communication device 1300 includes a main control board 1310 and an interface board 1330 .

[0183] The main control board 1310 is also called a main processing unit (MPU) or a route processor card. The main control board 1310 controls and manages various components in the communication device 1300, including route calculation, device management, device maintenance, and protocol processing functions. The main control board 1310 includes: a central processing unit 1311 and a memory 1312.

[0184] The interface board 1330 is also called a line processing unit (LPU), a line card or a service board. The interface board 1330 is used to provide various service interfaces and realize the forwarding of data packets. The service interface includes but is not limited to an Ethernet interface, a POS (Packet over SONET / SDH) interface, etc., and the Ethernet interface is, for example, a Flexible Ethernet Service Interface (Flexible Ethernet Clients, FlexE Clients). The interface board 1330 includes: a central processing unit 1331, a network processor 1332, a forwarding table entry memory 1334 and a physical interface card (Ph13sical interface card, PIC) 1333.

[0185] The central processor 1331 on the interface board 1330 is used to control and manage the interface board 1330 and communicate with the central processor 1311 on the main control board 1310 .

[0186] The network processor 1332 is used to implement message forwarding processing. The network processor 1332 may be in the form of a forwarding chip. Specifically, the processing of uplink messages includes: message inbound interface processing, forwarding table search; the processing of downlink messages: forwarding table search, etc.

[0187] The physical interface card 1333 is used to implement the docking function of the physical layer, from which the original traffic enters the interface board 1330, and the processed message is sent from the physical interface card 1333. The physical interface card 1333 includes at least one physical interface, which is also called a physical port. The physical interface card 1333 corresponds to the FlexE physical interface in the system architecture. The physical interface card 1333 is also called a daughter card, which can be installed on the interface board 1330 and is responsible for converting the optical signal into a message and forwarding the message to the network processor 1332 for processing after checking the legitimacy of the message. In some embodiments, the central processor 1331 of the interface board 1330 can also perform the functions of the network processor 1332, such as implementing software forwarding based on a general-purpose CPU, so that the network processor 1332 is not required in the physical interface card 1333.

[0188] Optionally, the communication device 1300 includes a plurality of interface boards. For example, the communication device 1300 further includes an interface board 1340 . The interface board 1340 includes a central processor 1341 , a network processor 1342 , a forwarding table entry memory 1344 , and a physical interface card 1343 .

[0189] Optionally, the communication device 1300 further includes a switching fabric board 1320. The switching fabric board 1320 may also be referred to as a switch fabric unit (SFU). When the network device has multiple interface boards 1330, the switching fabric board 1320 is used to complete data exchange between the interface boards. For example, the interface board 1330 and the interface board 1340 may communicate through the switching fabric board 1320.

[0190] The main control board 1310 is coupled to the interface board 1330. For example, the main control board 1310, the interface board 1330, the interface board 1340, and the switching network board 1320 are connected to the system backplane through a system bus to achieve intercommunication. In a possible implementation, an inter-process communication (IPC) channel is established between the main control board 1310 and the interface board 1330, and the main control board 1310 and the interface board 1330 communicate through the IPC channel.

[0191] Logically, the communication device 1300 includes a control plane and a forwarding plane. The control plane includes a main control board 1310 and a central processing unit 1331. The forwarding plane includes various components for performing forwarding, such as a forwarding table entry memory 1334, a physical interface card 1333, and a network processor 1332. The control plane performs functions such as a router, generating a forwarding table, processing signaling and protocol messages, and configuring and maintaining the status of the device. The control plane sends the generated forwarding table to the forwarding plane. On the forwarding plane, the network processor 1332 forwards the message received by the physical interface card 1333 based on the forwarding table sent by the control plane. The forwarding table sent by the control plane can be stored in the forwarding table entry memory 1334. In some embodiments, the control plane and the forwarding plane can be completely separated and not on the same device.

[0192] If the communication device 1300 is configured as a detection device, the central processor 1311 may generate a first detection message; the network processor 1332 may trigger the physical interface card 1333 to send the first detection message to the second forwarding device via the first forwarding device.

[0193] It should be understood that the transceiver unit 1002 in the message processing device 1000 and the communication interface 1204 in the communication device 1200 can be equivalent to the physical interface card 1333 or the physical interface card 1343 in the communication device 1300; the processing unit 1001 in the message processing device 1000 and the processor 1201 in the communication device 1200 can be equivalent to the central processing unit 1311 or the central processing unit 1331 in the communication device 1300.

[0194] It should be understood that the operation on the interface board 1340 in the embodiment of the present application is consistent with the operation of the interface board 1330, and for the sake of brevity, it will not be repeated. The communication device 1300 of this embodiment can correspond to the message processing device 1000 or the communication device 1200 in the above-mentioned embodiments. The main control board 1310, the interface board 1330 and / or the interface board 1340 in the communication device 1300 can implement the functions and / or various steps implemented in the message processing device 1000 or the communication device 1200 in the above-mentioned embodiments, and for the sake of brevity, it will not be repeated here.

[0195] If the communication device 1300 is configured as a first forwarding device, the central processor 1311 can obtain a first detection message, and obtain a second detection message according to the first detection message; the network processor 1332 can trigger the physical interface card 1333 to send the second detection message to the second forwarding device.

[0196] It should be understood that the transceiver unit 1103 in the message processing device 1100 and the communication interface 1204 in the communication device 1200 can be equivalent to the physical interface card 1333 or the physical interface card 1343 in the communication device 1300; the processing unit 1102 in the message processing device 1100 and the processor 1201 in the communication device 1200 can be equivalent to the central processing unit 1311 or the central processing unit 1331 in the communication device 1300.

[0197] It should be understood that the operation on the interface board 1340 in the embodiment of the present application is consistent with the operation of the interface board 1330, and for the sake of brevity, it will not be repeated. The communication device 1300 of this embodiment can correspond to the message processing device 1100 or the communication device 1200 in the above-mentioned embodiments. The main control board 1310, the interface board 1330 and / or the interface board 1340 in the communication device 1300 can implement the functions and / or various steps implemented in the message processing device 1100 or the communication device 1200 in the above-mentioned embodiments, and for the sake of brevity, it will not be repeated here.

[0198] It should be understood that there may be one or more main control boards, and when there are multiple boards, they may include a primary main control board and a backup main control board. There may be one or more interface boards. The stronger the data processing capability of the network device, the more interface boards are provided. There may also be one or more physical interface cards on the interface board. There may be no switching network board, or there may be one or more switching network boards. When there are multiple switching network boards, they can jointly realize load sharing and redundant backup. Under a centralized forwarding architecture, the network device may not need a switching network board, and the interface board is responsible for the processing function of the business data of the entire system. Under a distributed forwarding architecture, the network device may have at least one switching network board, and the switching network board is used to realize data exchange between multiple interface boards, providing large-capacity data exchange and processing capabilities. Therefore, the data access and processing capabilities of network devices with a distributed architecture are greater than those of devices with a centralized architecture. Optionally, the network device may have only one board, that is, no switching board, and the functions of the interface board and the main control board are integrated on the board. In this case, the central processor on the interface board and the central processor on the main control board can be combined into one central processor on the board to perform the functions of the two. This type of device has low data exchange and processing capabilities (for example, low-end switches or routers and other network devices). The specific architecture to be adopted depends on the specific networking deployment scenario.

[0199] In some possible embodiments, each of the above-mentioned network devices or network devices can be implemented as a virtualized device. For example, a virtualized device can be a virtual machine (English: Virtual Machine, VM) running a program for sending message functions, and the virtual machine is deployed on a hardware device (for example, a physical server). A virtual machine refers to a complete computer system with complete hardware system functions simulated by software and running in a completely isolated environment. The virtual machine can be configured as each network device in the embodiments of the present application. For example, each network device or network device can be implemented based on a general physical server in combination with network function virtualization (NFV) technology. Each network device or network device is a virtual host, a virtual router or a virtual switch. Those skilled in the art can virtualize each network device or network device with the above-mentioned functions on a general physical server in combination with NFV technology by reading this application, which will not be repeated here.

[0200] It should be understood that the network devices in the above-mentioned various product forms have any functions of the network devices or communication devices in the above-mentioned method embodiments, which will not be repeated here.

[0201] The embodiment of the present application also provides a chip, including a processor and an interface circuit, the interface circuit is used to receive instructions and transmit them to the processor; the processor, for example, can be a specific implementation form of the message processing device in the embodiment of the present application, and can be used to execute the above-mentioned routing method. Wherein, the processor is coupled with a memory, and the memory is used to store programs or instructions. When the program or instruction is executed by the processor, the chip system implements the method in any of the above-mentioned method embodiments.

[0202] Optionally, the processor in the chip system may be one or more. The processor may be implemented by hardware or by software. When implemented by hardware, the processor may be a logic circuit, an integrated circuit, etc. When implemented by software, the processor may be a general-purpose processor implemented by reading software code stored in a memory.

[0203] Optionally, the memory in the chip system may be one or more. The memory may be integrated with the processor or may be separately provided with the processor, which is not limited in the present application. Exemplarily, the memory may be a non-transient processor, such as a read-only memory ROM, which may be integrated with the processor on the same chip or may be provided on different chips. The present application does not specifically limit the type of memory and the arrangement of the memory and the processor.

[0204] Exemplarily, the chip system can be a field programmable gate array (FPGA), an application specific integrated circuit (ASIC), a system on chip (SoC), a central processor unit (CPU), a network processor (NP), a digital signal processor (DSP), a microcontroller unit (MCU), a programmable logic device (PLD) or other integrated chips.

[0205] In addition, the embodiment of the present application also provides a communication system 1400, such as Fig.14 As shown, the communication system 1400 may include a detection device 1401 and a first forwarding device 1402. The detection device 1401 is used to perform the above Figure 2The method performed by the detection device in the embodiment shown; the first forwarding device 1402 is used to perform the above Figure 2 The method performed by the first forwarding device in the embodiment shown. The detection device 1401 may correspond to the above Fig.10 The message processing apparatus 1000 shown in FIG. 1 , then the first forwarding device 1402 corresponds to the above Fig.11 The message processing device 1100 is shown.

[0206] In addition, the embodiment of the present application also provides a readable storage medium, in which a program code or instruction is stored, and when the program code or instruction is executed on the processor, the processor executes the above Figure 2 A method under any one of the implementation modes in the illustrated embodiments.

[0207] In addition, an embodiment of the present application also provides a program product, which, when executed on a processor, enables the processor to execute any one of the implementation methods of the aforementioned method 100.

[0208] It should be understood that "based on determining B according to A" mentioned in the embodiments of the present application does not mean that B is determined only according to A, but B can also be determined according to A and / or other information.

[0209] The "first" in the names of "first detection message", "first bypass information" and the like mentioned in this application is only used as a name identifier and does not mean the first in order. The same rule applies to "second" and the like.

[0210] Through the description of the above implementation methods, it can be known that those skilled in the art can clearly understand that all or part of the steps in the above-mentioned embodiment method can be implemented by means of software plus a general hardware platform. Based on such an understanding, the technical solution of the present application can be embodied in the form of a software product, which can be stored in a storage medium, such as a read-only memory (ROM) / RAM, a magnetic disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network communication device such as a router) to execute the methods described in each embodiment of the present application or some parts of the embodiments.

[0211] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for system embodiments and device embodiments, since they are basically similar to method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment. The device and system embodiments described above are merely schematic, in which the modules described as separate components may or may not be physically separated, and the components displayed as modules may or may not be physical modules, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.

[0212] The above is only a preferred embodiment of the present application and is not intended to limit the protection scope of the present application. It should be noted that, for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the present application, and these improvements and modifications should also be regarded as the protection scope of the present application.

Claims

1. A message processing method, characterized in that: include: The detection device generates a first detection message, wherein the first detection message includes first bypass information, and the first bypass information is used to instruct a first forwarding device on a service chain to bypass at least one service service SF node connected to the first forwarding device; The detection device sends the first detection message to a second forwarding device through the first forwarding device, and the second forwarding device is a next-hop device of the first forwarding device on a forwarding path of the service chain.

2. The method according to claim 1, characterized in that The method further comprises: The detection device receives a second detection message corresponding to the first detection message; The detection device determines a detection result of the service chain according to the second detection message.

3. The method according to claim 2, characterized in that The method further comprises: The detection device generates a third detection message, wherein the third detection message includes second bypass information, and the second bypass information is used to indicate that multiple forwarding devices on the service chain all bypass at least one SF node connected thereto, and the multiple forwarding devices include the first forwarding device and the second forwarding device; The detection device sends the third detection message to the second forwarding device through the first forwarding device; The detection device receives a fourth detection message corresponding to the third detection message; The detection device determines the detection result of the service chain according to the second detection message, including: The detection device determines the detection result according to the second detection message and the fourth detection message.

4. The method according to claim 2, characterized in that: The SF node connected to the first forwarding device on the service chain includes a first SF node and a second SF node, the first bypass information is used to instruct the first forwarding device on the service chain to bypass the first SF node, and the method further includes: The detection device generates a fifth detection message, wherein the fifth detection message includes third bypass information, and the third bypass information is used to instruct the first forwarding device on the service chain to bypass the second SF node connected to the first forwarding device; The detection device sends the fifth detection message to the second forwarding device through the first forwarding device; The detection device receives a sixth detection message corresponding to the fifth detection message; The detection device determines the detection result of the service chain according to the second detection message, including: The detection device determines the detection result according to the second detection message and the sixth detection message.

5. The method according to any one of claims 1 to 4, characterized in that: The first forwarding device is a first proxy device or a first service function forwarder SFF, and the second forwarding device is a second SFF or a second proxy device.

6. The method according to any one of claims 1 to 5, characterized in that: The first bypass information is carried by BypassFlag in the segment routing header flag SRHFlags of the first detection message; Alternatively, the first bypass information is carried by the BypassFlag of the network service header NSH of the first detection message.

7. The method according to any one of claims 1 to 5, characterized in that: The first bypass information is carried by the BypassSID of the first detection message.

8. The method according to any one of claims 1 to 7, characterized in that: The first detection message belongs to any one of the following types: an operations administration and maintenance OAM message or an in-band flow information telemetry IFIT.

9. The method according to any one of claims 1 to 8, characterized in that: At least one SF device connected to the first forwarding device does not support segment routing SR, and the first detection message is an SR detection message.

10. The method according to claim 9, characterized in that The method further comprises: The detection device obtains first information, where the first information includes multiple groups of correspondences between multiple service SIDs of the first forwarding device and service function path SFP information, where the SFP information is used to indicate a forwarding path of a corresponding service chain; The detection device verifies the uniqueness of multiple service SID configurations of the first forwarding device based on the first information.

11. The method according to claim 10, characterized in that Each service SID of the first forwarding device corresponds to a cache, and the detection device obtains the first information, including: The detection device receives the first information, where the first information is obtained by the first forwarding device collecting multiple service SIDs and SFP information in a cache corresponding to each of the multiple service SIDs.

12. The method according to any one of claims 1 to 11, characterized in that: The detection device is integrated in the service classifier SC or the controller.

13. A message processing method, characterized in that: include: The first forwarding device obtains a first detection message, where the first detection message includes first bypass information, where the first bypass information is used to instruct the first forwarding device to bypass at least one service SF node connected to the first forwarding device on the service chain; The first forwarding device obtains a second detection message according to the first detection message, where the destination address of the second detection message indicates a second forwarding device, and the second forwarding device is a next-hop device of the first forwarding device on a forwarding path corresponding to the service chain; The first forwarding device sends the second detection message to the second forwarding device.

14. The method according to claim 13, characterized in that The at least one SF node connected to the first forwarding device on the service chain includes a first SF node, and the method further includes: The first forwarding device obtains a first data packet, where the first data packet matches the service chain; The first forwarding device sends the first data message to the first SF node; The first forwarding device obtains a second data packet corresponding to the first data packet, where the second data packet is a data packet obtained after at least one SF node connected to the first forwarding device on the service chain processes the first data packet; The first forwarding device sends the second data packet to the second forwarding device.

15. The method according to claim 13 or 14, characterized in that The SF nodes connected to the first forwarding device on the service chain include a first SF node and a second SF node, the first bypass information is used to instruct the first forwarding device to bypass the first SF node, and the first forwarding device obtains a first detection message, including: The first forwarding device receives a third detection message; The first forwarding device sends the third detection message to the second SF node; The first forwarding device receives a fourth detection message sent by the second SF node, where the fourth detection message is obtained by the second SF node processing the third detection message; The first forwarding device obtains the first detection message according to the fourth detection message.

16. The method according to claim 13 or 14, characterized in that The first bypass information is used to instruct the first forwarding device to bypass all SF nodes connected to the first forwarding device on the service chain, and the first forwarding device obtains a first detection message, including: The first forwarding device receives the first detection message from a third forwarding device, where the third forwarding device is a service classifier SC, or the first forwarding device is a next-hop device of the third forwarding device on a forwarding path of the service chain.

17. The method according to any one of claims 13 to 16, characterized in that: At least one SF device connected to the first forwarding device does not support segment routing SR, the first detection message is an SR detection message, and the method further includes: The first forwarding device obtains first information based on the first bypass information, where the first information includes multiple groups of correspondences between multiple service SIDs of the first forwarding device and service function path SFP information, where the SFP information is used to indicate a forwarding path of a corresponding service chain; The first forwarding device sends the first information to the detection device, and the first information is used by the detection device to verify the uniqueness of the service SID configuration of the first forwarding device.

18. The method according to claim 17, characterized in that The first forwarding device obtains first information based on the first bypass information, including: The first forwarding device collects each service SID and SFP information in a cache corresponding to the service SID to obtain the first information.

19. The method according to any one of claims 13 to 18, characterized in that: The first forwarding device obtains a second detection message according to the first detection message, including: The first forwarding device updates the destination address of the first detection message to an address indicating the second forwarding device, and obtains the second detection message.

20. The method according to any one of claims 13 to 19, characterized in that: The first forwarding device is a first proxy device or a first service function forwarder SFF, and the second forwarding device is a second SFF or a second proxy device.

21. The method according to any one of claims 13 to 20, characterized in that: The first bypass information is carried by BypassFlag in the segment routing header flag SRHFlags of the first detection message; Alternatively, the first bypass information is carried by the BypassFlag of the network service header NSH of the first detection message; Alternatively, the first bypass information is carried by the BypassSID of the first detection message.

22. The method according to any one of claims 13 to 21, characterized in that: The first detection message belongs to any one of the following types: an operations administration and maintenance OAM message or an in-band flow information telemetry IFIT.

23. A communication device, characterized in that: include: A processing unit, configured to perform other operations except the receiving operation and the sending operation in the method according to any one of claims 1 to 12; A transceiver unit, used to perform the receiving operation and the sending operation in the method described in any one of claims 1-12.

24. A communication device, characterized in that: include: A processing unit, configured to perform other operations except the receiving operation and the sending operation in the method according to any one of claims 13 to 22; A transceiver unit, used to perform the receiving operation and the sending operation in the method described in any one of claims 13-22.

25. A communication device, characterized in that: The communication device includes a memory and a processor; The memory is used to store instructions; The processor is used to execute the instructions in the memory and perform the method according to any one of claims 1 to 22.

26. A communication system, characterized in that: The communication system comprises a detection device and a first forwarding device; The detection device is used to execute the instructions in the memory and execute the method according to any one of claims 1 to 12; The first forwarding device is used to execute the instructions in the memory and execute the method according to any one of claims 13-22.

27. A storage medium, characterized in that: The storage medium includes instructions, and when the instructions are executed on a processor, the processor is caused to execute the method according to any one of claims 1 to 22.