packet transmission

By adding a follow-flow detection option to service packets with replication tag information in the SRv6 network, the problem of SFF nodes being unable to resume follow-flow detection is solved, enabling accurate detection of the forwarding path and ensuring the accuracy of the detection results and the normal processing of service chain services.

CN117643019BActive Publication Date: 2026-05-26NEW H3C TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
NEW H3C TECH CO LTD
Filing Date
2022-06-28
Publication Date
2026-05-26

Smart Images

  • Figure CN117643019B_ABST
    Figure CN117643019B_ABST
Patent Text Reader

Abstract

This application provides a message transmission method relating to the field of communication technology. The solution includes: receiving a first service message, which includes a destination address, a first flow-following detection option, a segmented routing header (SRH), and an original service message. The SRH includes a list of SIDs indicating the forwarding path. If the destination address is a locally configured proxy SID, a second service message is sent along the forwarding path, and the original service message is sent to the service function node. The second service message includes a second flow-following detection option, which includes replication marker information indicating that the second service message is a copy of the first service message. This method enables flow-following detection of the forwarding path without affecting service chain services.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of communication technology, and in particular to message transmission. Background Technology

[0002] In a Segment Routing Internet Protocol Version 6 (SRv6) network, after receiving a service packet, the head node can encapsulate a Segment Routing Header (SRH) on the outer layer of the service packet. The SRH includes a segment list, which indicates the forwarding path of the service packet in the SRv6 network. Nodes in the SRv6 network can then forward the service packet based on this forwarding path.

[0003] To perform flow-based detection of service traffic, the header node can add a flow-based detection option to the service packet. Upon receiving the service packet, each node on the forwarding path can perform flow-based detection based on this option and periodically report the measurement information to the analyzer. The analyzer can then determine the network performance of the forwarding path based on the measurement information. Flow-based detection options can include coloring bits, such as delay coloring and packet loss coloring. The delay coloring indicates whether delay detection is required, and the packet loss coloring indicates whether packet loss detection is required.

[0004] Currently, SRv6 networks can be integrated with service chaining functions. Depending on actual service requirements, some endpoint nodes in the SRv6 network can be used as Service Function Forwarder (SFF) nodes, which connect to Service Function (SF) nodes. If the SFF node type is End.AD or End.AS, after receiving a service packet, the SFF node must remove the outer encapsulation of the IPv6 header, flow detection options, and SRH, and send the original service packet to the SF. After processing, the SF node forwards the processed original service packet back to the SFF node. The SFF node re-encapsulates the IPv6 header, flow detection options, and SRH for the original service packet based on its static configuration information or dynamic cache. The static configuration information includes pre-configured information for encapsulating the IPv6 header and SRH, while the dynamic cache contains information learned by the SFF node from the received packets.

[0005] However, the value of the coloring bit added by the head node for different service packets changes dynamically with the number of service packets received by the head node. That is, the value of the coloring bit added by the head node for each service packet cannot be determined in advance, which makes it impossible for the SFF node to recover the following detection option based on static configuration information or dynamic cache, and thus unable to detect the forwarding path based on the following detection technology. Summary of the Invention

[0006] The purpose of this application is to detect forwarding paths based on flow detection technology for message transmission. The specific technical solution is as follows:

[0007] In a first aspect, embodiments of this application provide a message sending method, the method being applied to a network device, the method comprising:

[0008] Receive a first service message, the first service message including a destination address, a first flow detection option, a segmented routing header (SRH) and an original service message, the SRH including a list of SIDs, the SID list indicating a forwarding path;

[0009] If the destination address is a locally configured proxy SID, then a second service message is sent on the forwarding path, and the original service message is sent to the service function node.

[0010] The second service message includes a second flow detection option, which includes replication marker information. The replication marker information is used to indicate that the second service message is a replication message of the first service message.

[0011] In one possible implementation, before sending the second service message on the forwarding path, the method further includes:

[0012] Determine whether the first flow detection option includes copy marker information;

[0013] If so, the first service message is sent on the forwarding path;

[0014] If not, then copy the first service message and add the copy marker information to the follow-up detection option of the copied first service message to obtain the second service message.

[0015] In one possible implementation, before sending the first service message on the forwarding path, the method further includes:

[0016] Determine whether the destination address is the last SID in the SID list;

[0017] If so, then discard the first service message;

[0018] If not, then send the first service message on the forwarding path.

[0019] In one possible implementation, before sending the second service message on the forwarding path, the method further includes:

[0020] Obtain the link status of the link between the network device and the service function node;

[0021] If the link status is unreachable, then the first service packet is discarded;

[0022] If the link status is reachable, then the first service packet is copied, and the copying tag information is added to the flow detection option of the copied first service packet to obtain the second service packet.

[0023] In one possible implementation, obtaining the link status between the network device and the service function node specifically includes:

[0024] Obtain the link status of the link between the network device and the service function node from the data plane;

[0025] If the service function node fails and / or the link between the network device and the service function node fails, the link status is unreachable.

[0026] If the service function node is not faulty and the link between the network device and the service function node is not faulty, then the link status is reachable.

[0027] In one possible implementation, the flow detection option of the second service message includes a reserved field that carries the replication marker information.

[0028] Secondly, embodiments of this application provide a message sending apparatus, which is applied to a network device, and the apparatus includes:

[0029] The receiving module is configured to receive a first service packet, the first service packet including a destination address, a first flow detection option, a segmented routing header (SRH), and an original service packet, wherein the SRH includes a list of SIDs, and the SID list indicates a forwarding path;

[0030] The sending module is configured to send a second service message on the forwarding path and send the original service message to the service function node if the destination address is a locally configured proxy SID.

[0031] The second service message includes a second flow detection option, which includes replication marker information. The replication marker information is used to indicate that the second service message is a replication message of the first service message.

[0032] In one possible implementation, the device further includes: a determination module and a copying module;

[0033] The judgment module is used to determine whether the first flow detection option includes copy marker information;

[0034] The sending module is specifically used to send the first service message on the forwarding path if the judgment result of the judgment module is yes.

[0035] The copying module is used to copy the first service message if the judgment result of the judgment module is negative, and add the copying mark information to the following detection option of the copied first service message to obtain the second service message.

[0036] In one possible implementation, the device further includes: a first discarding module;

[0037] The judgment module is also used to determine whether the destination address is the last SID in the SID list;

[0038] The first discarding module is used to discard the first service packet if the judgment result of the judgment module is yes;

[0039] The sending module is specifically used to send the first service message on the forwarding path if the judgment result of the judgment module is negative.

[0040] In one possible implementation, the apparatus further includes: an acquisition module, a second discard module, and a copy module;

[0041] The acquisition module is used to acquire the link status of the link between the network device and the service function node;

[0042] The second discarding module is used to discard the first service packet if the link status is unreachable;

[0043] The replication module is configured to replicate the first service packet if the link status is reachable, and add the replication marker information to the follow-up detection option of the replicated first service packet to obtain the second service packet.

[0044] In one possible implementation, the acquisition module is specifically used for:

[0045] Obtain the link status of the link between the network device and the service function node from the data plane;

[0046] If the service function node fails and / or the link between the network device and the service function node fails, the link status is unreachable.

[0047] If the service function node is not faulty and the link between the network device and the service function node is not faulty, then the link status is reachable.

[0048] In one possible implementation, the flow detection option of the second service message includes a reserved field that carries the replication marker information.

[0049] Thirdly, embodiments of this application provide a network device, the network device comprising:

[0050] processor;

[0051] transceiver;

[0052] A machine-readable storage medium storing machine-executable instructions that can be executed by the processor; the machine-executable instructions cause the processor to perform the following steps:

[0053] The transceiver receives a first service packet, which includes a destination address, a first flow detection option, a segmented routing header (SRH), and the original service packet. The SRH includes a list of SIDs, which indicates a forwarding path.

[0054] If the destination address is a locally configured proxy SID, then the transceiver sends a second service message on the forwarding path and sends the original service message to the service function node.

[0055] The second service message includes a second flow detection option, which includes replication marker information. The replication marker information is used to indicate that the second service message is a replication message of the first service message.

[0056] In one possible implementation, the machine-executable instructions further cause the processor to perform the following steps:

[0057] Determine whether the first flow detection option includes copy marker information;

[0058] If so, the first service message is sent via the transceiver on the forwarding path;

[0059] If not, then copy the first service message and add the copy marker information to the follow-up detection option of the copied first service message to obtain the second service message.

[0060] In one possible implementation, the machine-executable instructions further cause the processor to perform the following steps:

[0061] Determine whether the destination address is the last SID in the SID list;

[0062] If so, then discard the first service message;

[0063] If not, the first service message is sent via the transceiver on the forwarding path.

[0064] In one possible implementation, the machine-executable instructions further cause the processor to perform the following steps:

[0065] Obtain the link status of the link between the network device and the service function node;

[0066] If the link status is unreachable, then the first service packet is discarded;

[0067] If the link status is reachable, then the first service packet is copied, and the copying tag information is added to the flow detection option of the copied first service packet to obtain the second service packet.

[0068] In one possible implementation, the machine-executable instructions further cause the processor to perform the following steps:

[0069] Obtain the link status of the link between the network device and the service function node from the data plane;

[0070] If the service function node fails and / or the link between the network device and the service function node fails, the link status is unreachable.

[0071] If the service function node is not faulty and the link between the network device and the service function node is not faulty, then the link status is reachable.

[0072] In one possible implementation, the flow detection option of the second service message includes a reserved field that carries the replication marker information.

[0073] Fourthly, embodiments of this application provide a machine-readable storage medium storing machine-executable instructions, which, when invoked and executed by a processor, cause the processor to implement the steps of the method described in the first aspect above.

[0074] Fifthly, embodiments of this application provide a computer program product that causes the processor to implement the steps of the method described in the first aspect above.

[0075] By adopting the above technical solution, after receiving a first service packet carrying the first flow-following detection option, the network device can send a second service packet on the forwarding path. The second flow-following detection option of the second service packet includes replication marker information, ensuring that the second service packet is not forwarded to the service function node. Therefore, it is unnecessary to first delete the flow-following detection option of the second service packet and then re-encapsulate it. This allows each network device on the forwarding path to receive the second service packet carrying the flow-following detection option and perform flow-following detection. Furthermore, the network device can normally send the original packet to the service function node without affecting the service function node's service processing. Thus, this embodiment of the application achieves flow-following detection on the forwarding path without affecting the service chain services. Attached Figure Description

[0076] To more clearly illustrate the technical solutions of the embodiments of this application and the prior art, the drawings used in the embodiments and the prior art are briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other embodiments can be obtained based on these drawings without creative effort.

[0077] Figure 1a A schematic diagram of a flow detection network provided in an embodiment of this application;

[0078] Figure 1b A schematic diagram of another flow detection network provided in an embodiment of this application;

[0079] Figure 2 A schematic diagram illustrating a scenario combining an SRv6 network and a service chain, provided as an embodiment of this application;

[0080] Figure 3 A flowchart illustrating a message sending method provided in an embodiment of this application;

[0081] Figure 4 A schematic diagram illustrating a flow detection option provided in an embodiment of this application;

[0082] Figure 5 An exemplary schematic diagram of a message sending method provided in an embodiment of this application;

[0083] Figure 6 A schematic diagram of the structure of a message sending device provided in an embodiment of this application;

[0084] Figure 7This is a schematic diagram of the structure of a network device provided in an embodiment of this application. Detailed Implementation

[0085] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided with reference to the accompanying drawings and embodiments. Obviously, the described embodiments are merely some, not all, of the embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without creative effort are within the scope of protection of this application.

[0086] To facilitate understanding, the relevant concepts involved in the embodiments of this application will be explained first.

[0087] Flow-following detection utilizes normally forwarded service traffic, inserting flow-following detection options into specified service traffic. The forwarding device then detects the service traffic carrying the flow-following detection option and reports the collected measurement information to the analyzer. The analyzer then uses the received measurement information to detect and identify subtle anomalies in the network, accurately detecting performance information such as latency and packet loss for each service. This makes the network quality SLA visible in real time, enabling rapid fault delimitation and location.

[0088] like Figure 1a As shown, Figure 1a This is an exemplary schematic diagram of the structure of a flow-following detection network provided in an embodiment of this application. The flow-following detection network includes a head node, multiple intermediate nodes, and a tail node. Figure 1a The example shows two intermediate nodes, intermediate node 1 and intermediate node 2, wherein intermediate node 1 does not support flow detection, while intermediate node 2 supports flow detection.

[0089] The head node receives the actual service flow. If it determines that the service flow needs to be inspected, it sends the measurement data of the service flow to the analyzer, adds the inspection option to the service flow, and forwards the service flow carrying the inspection option to the intermediate node 1 connected to it.

[0090] Since intermediate node 1 does not support flow monitoring, the business flow is directly forwarded to intermediate node 2.

[0091] Intermediate node 2 receives the service flow. If it detects that the service flow includes a flow-following detection option, and the measurement type indicated by the flow-following detection option is point-to-point measurement, it sends the measurement data of the service flow to the analyzer based on the flow-following detection option and forwards the service flow to the tail node. Alternatively, if the measurement type indicated by the flow-following detection option is end-to-end measurement, it does not need to send measurement data to the analyzer and can forward the service flow to the tail node.

[0092] The tail node is used to receive service flows. If it detects that the service flow includes a flow detection option, it sends the measurement data of the service flow to the analyzer based on the flow detection option, deletes the flow detection option in the service flow, and then forwards the service flow.

[0093] The analyzer is used to receive measurement data sent by the head node, intermediate nodes and tail node, and to summarize and calculate the received measurement data, such as packet loss and latency calculation, to obtain the quality of the service flow path.

[0094] In SRv6 use cases, the SRv6 network head node is typically used as the head node for flow detection. Flow detection can be enabled on the head node via controller or command line, specifying the traffic characteristics, detection period, and type through ACLs. When the head node receives a service flow that meets the traffic characteristics, it inserts flow detection options into the service flow. Flow detection options can be carried by IPv6 extension headers, such as hop-by-hop option extension headers or destination option extension headers.

[0095] like Figure 1b As shown, Figure 1b This is a schematic diagram of a more specific flow detection network. PE1 is the head node of the SRv6 network. After receiving the original packet sent by CE1, if the original packet matches the traffic characteristics that need to be detected by flow detection, PE1 encapsulates the IPv6 header, flow detection options and SRH header on the outer layer of the original packet.

[0096] See Figure 1b The message sent by PE1 to P1 contains an IPv6 header with a source address (SA) of 8000::1 and a destination address (DA) of A:A:A:A:1:1::, which is the address of P1.

[0097] In-flow detection options include:

[0098] FlowMonID is the ID of the detected business flow.

[0099] FlowNodeID is the identifier of the head node through which the service flow passes. When the head node encapsulates the flow detection option for the service message, it can add its own node identifier to this field.

[0100] The Header Type Indication (HTI) is used to indicate the extended data type being carried.

[0101] P is the measurement period.

[0102] T is used to indicate the detection type, which includes end-to-end detection and hop-by-hop detection.

[0103] L is the packet loss flag.

[0104] D is the delay marker.

[0105] The above P, T, L and D are staining sites.

[0106] P1 does not support flow detection, so after receiving the message, P1 updates the destination address of the message to A:A:A:A:2:1::, which is the address of P2, and forwards the message to P2.

[0107] After receiving the message, P2 can identify the flow detection options included in the message and perform flow detection on the message. P2 will also update the destination address of the message to A:A:A:A:20:6::, which is the address of PE2, and forward the message to PE2.

[0108] After receiving the packet, PE2 can identify the flow detection options included in the packet and perform flow detection on the packet. Since PE2 is the tail node, PE2 will delete the IPv6 header, flow detection options and SRH of the packet before sending the original packet to CE2.

[0109] When PE1, P2, and PE2 receive and send packets carrying the flow detection option, they will statistically analyze the data of the packet (such as the timestamp of receiving the packet and the timestamp of sending the packet) according to the flow detection option, and periodically report the flow ID and measurement information to the analyzer. Figure 1b R1, R2, and R3 in the diagram represent the process of reporting measurement information to the analysis team.

[0110] In SRv6 networks, service chain paths can be inspected based on the aforementioned flow detection techniques, such as... Figure 2 As shown, Figure 2 This is a schematic diagram of a scenario combining an SRv6 network and a service chain.

[0111] in, Figure 2 The SRv6 network in the example can be an SRv6 header compressed (Generalized-SRv6, G-SRv6) network, where the SRH carries the compressed C-SID. Alternatively, it can be applied to a regular SRv6 network, where the SRH carries the uncompressed C-SID.

[0112] It should be noted that the service chain path in this application embodiment refers to the path between the SFF node and the SF node added to the forwarding path, and the forwarding path refers to the path indicated by the Segment ID (SID) list.

[0113] For example, Figure 2 In this context, the forwarding path refers to: head node - SFF1 - SFF2 - SFF3; the service chain path refers to: head node - SFF1 - SF1 - SFF1 - SFF2 - SF2 - SFF2 - SFF3.

[0114] Figure 2 In the process, after the head node (i.e., the classifier in the service chain function scenario) receives the original packet, it encapsulates the original packet with an IPv6 header, SRH, and flow detection options to obtain the encapsulated packet. Then, it sends the encapsulated packet to SFF1. After receiving the encapsulated packet, SFF1 removes the IPv6 header, SRH, and flow detection options to obtain the original packet, and then sends the original packet to SF1.

[0115] After receiving the original packet processed by SF1, SFF1 needs to re-encapsulate the processed packet with IPv6 headers, SRH, and flow detection options. However, since flow detection options are colored per flow or even per packet, the SFF1 node cannot recover the flow detection options based on static configuration information or dynamic caching. As a result, the SFF1 node can only encapsulate the processed original packet with IPv6 headers and SRH and send the packet with IPv6 headers and SRH to SFF2.

[0116] Similarly, SFF2 sends a message to SFF3 encapsulated with an IPv6 header and an SRH.

[0117] In other words, Figure 2 In the network shown, only the packets received by SFF1 contain flow detection data, which means that the analyzer can only detect the network performance of the path from the head node to SFF1, and cannot achieve end-to-end service chain path performance detection.

[0118] Furthermore, since the original packet needs to be forwarded to the SF node, and the SF node processes the original packet before forwarding it along the service chain path, the SF node may perform deep parsing of the original packet, which takes a considerable amount of time—potentially much longer than the time required to transmit directly along the forwarding path indicated by the SID list. Additionally, the SF node may discard the original packet. Therefore, flow detection based on the processed packet from the SF node cannot reflect the actual situation of the forwarding path indicated by the SID list, and cannot accurately detect latency and packet loss along the forwarding path.

[0119] To address the aforementioned problems, embodiments of this application provide a message transmission method, which is applied to network devices, such as... Figure 3 As shown, the method includes:

[0120] S301, Receive the first service message.

[0121] The first service message includes the destination address, the first flow detection option, the first SRH, and the original service message. The SRH includes a list of SIDs, which indicates the forwarding path.

[0122] The first service message includes an IPv6 header, which contains the destination address.

[0123] S302. If the destination address is the locally configured proxy SID, then send the second service message on the forwarding path and send the original service message to the service function node.

[0124] The second service message includes a second flow detection option, which includes replication marker information. The replication marker information is used to indicate that the second service message is a replication message of the first service message.

[0125] The network device can send a second service packet on the forwarding path based on the SID list. If the destination address is the locally configured proxy SID, it means that the network device is connected to the service function node. The network device can delete the first follow-up detection option, the first SRH and IPv6 header encapsulated in the outer layer of the first service packet to obtain the original service packet, and forward the original service packet to the service function node.

[0126] When the service function node sends the processed original service packet to the network device, the network device will re-encapsulate the received original service packet with SRH and IPv6 headers according to local static configuration information or dynamic cache information to obtain the third service packet. Then, the network device can forward the third service packet based on the forwarding path indicated by the SID list; that is, the third service packet will be forwarded by the network device to the next network device on the forwarding path indicated by the SID list in the SRH. The third service packet does not contain the flow detection option.

[0127] like Figure 2 As shown, with Figure 2 Taking the scenario as an example, network devices can provide Figure 2In the process, SFF1 receives the first service packet, determines the destination address to be the locally configured proxy SID (specifically, it can be End.AS SID or End.ADSID), then sends the second service packet to SFF2 and sends the original service packet included in the first service packet to SF1. After receiving the processed original service packet sent by SF1, SFF1 encapsulates the processed original service packet with an IPv6 header and an SRH header to obtain the third service packet, and then sends the third service packet to SFF2.

[0128] Understandably, SFF2 can receive both the second and third service packets. Once SFF2 recognizes the replication flag information included in the second flow detection option of the second service packet, it will not send the second service packet to SF2, but will instead continue forwarding the second packet to SFF3 along the forwarding path. Furthermore, since the third service packet does not include the flow detection option, SFF2 can process the third service packet normally.

[0129] In this embodiment, after receiving a first service packet, if the destination address of the first service packet is a locally configured proxy SID, the network device sends a second service packet on the forwarding path and sends the original service packet to the service function node. The following-flow detection option of the second service packet includes replication marker information, which indicates that the second service packet is a copy of the first service packet. Thus, by sending a second service packet with the second following-flow detection option on the forwarding path, the network device prevents the second service packet from being forwarded to the service function node. This eliminates the need to first remove the following-flow detection option and then re-encapsulate the second service packet, allowing each network device on the forwarding path to receive the second service packet carrying the following-flow detection option and perform following-flow detection. Furthermore, the network device can still send the original service packet to the service function node normally, without affecting the service function node's service processing. Therefore, this embodiment achieves following-flow detection on the forwarding path without affecting services.

[0130] Furthermore, since the aforementioned second service message does not need to be processed by the service function node, forwarding time is saved and it is avoided from being discarded by the service function node. Since the second service message is transmitted on the forwarding path and will not be forwarded to the service function node, each node on the forwarding path performs flow detection based on the second service message, which can accurately reflect the network performance of the forwarding path and can perform accurate latency detection and packet loss detection on the forwarding path.

[0131] Both the first follow-up detection option and the second follow-up detection in the first service message mentioned above include a reserved field. The reserved field of the second follow-up detection option carries the replication marker information.

[0132] like Figure 4 As shown, Figure 4 This is a schematic diagram of the flow detection options provided in the embodiments of this application.

[0133] Among them, the Optional Type, which occupies 8 bits, is the type of the flow detection option.

[0134] Optional Data Length (Opt Data Len), occupying 8 bits, is the length of the stream detection option.

[0135] FlowMonID, occupying 20 bits, is the ID of the detected business flow.

[0136] L, occupying 1 bit, is the packet loss flag.

[0137] D, occupying 1 bit, is the delay flag.

[0138] R, Rsv, and Reserved are all reserved fields.

[0139] The Header Type Indication (HTI) is used to indicate the extended data type carried. A value of 0 indicates no extended data, while a non-zero value indicates that extended data is carried.

[0140] NodeMonID, occupying 20 bits, is the device node identifier. When the header node encapsulates the flow detection option for the service message, it can add its own node identifier to this field.

[0141] F, occupying 1 bit, is the service flow direction identifier field, used to carry the second indication information. When the value is 1, it indicates that the head node of the reverse path automatically generates service flow identification rules; when the value is 0, it indicates that the head node of the first reverse path does not generate service flow identification rules. The head node of the reverse path is the tail node of the forwarding path. Figure 1b For example, the forward path is the path from PE1 to PE2, and the reverse path is the path from PE2 to PE1. Figure 1b PE2 in the diagram is the tail node of the forward path and the head node of the reverse path.

[0142] P is the measurement period.

[0143] T is used to indicate the detection type, which includes end-to-end detection and hop-by-hop detection.

[0144] Ext FM Type is an extended stream detection type field that can be identified using a bitmap.

[0145] In this embodiment of the application, the copy marker information can be provided by... Figure 4 The data can be carried by any of the reserved fields such as R, Rsv, and Reserved, but this application embodiment does not specifically limit this. For example, it can be... Figure 4 The R field in the D field carries the replication flag information. If the replication flag is set (i.e., the value is 1), it means that the message is a replicated message; if the replication flag is not set (i.e., the value is 0), it means that the message is not a replicated message.

[0146] It should be noted that the first packet received by the network device may also be a copy packet sent by the SFF node. Therefore, if the destination address of the first service packet is the locally configured proxy SID, the network device can determine whether the first follow-up detection option includes copy tag information before sending the second service packet on the forwarding path.

[0147] If so, that is, if the first follow-up detection option includes replication marker information, then the first service message is sent on the forwarding path.

[0148] If the first follow-flow detection option includes copy flag information, it means that the first service packet is copied. The network device does not need to copy the first service packet again, nor does it need to perform service chain related processing on the first service packet. It can perform follow-flow detection based on the first follow-flow detection option and send the first service packet on the forwarding path.

[0149] by Figure 2 Taking the scenario as an example, suppose SFF2 receives the first service packet sent by SFF1. If the first follow-up detection option of the first service packet includes replication flag information, it means that the first service packet is a service packet obtained by SFF1 after receiving the service packet with the follow-up detection option and replicating it. In this case, SFF2 does not need to replicate the service packet again, but can continue to forward the first service packet along the forwarding path.

[0150] If not, i.e., the first flow detection option does not include the copy mark information, then copy the first service message, add the copy mark information to the flow detection option of the copied first service message to obtain the second service message, and then execute the above S302.

[0151] Understandably, the network device copies the first service packet to obtain the second service packet. Compared to the first service packet, the second service packet adds a copy flag in the flow detection options. All other contents of the second service packet are identical to the first service packet. To forward the second service packet on the forwarding path, the network device can update the destination address in the IPv6 header of the second service packet to the next SID following the network device's SID in the forwarding path.

[0152] In addition, if the first follow-up detection option includes copy tag information, the network device can further determine whether the destination address is the last SID in the SID list. If so, the first service packet is discarded; otherwise, the first service packet is sent on the forwarding path in accordance with the above method.

[0153] Understandably, if the destination address is the last SID in the SID list, it means that the network device receiving the first service packet is the tail node of the forwarding path. Since the first service packet includes replication marker information, indicating that it is a replicated service packet used for flow detection on the forwarding path, once the tail node receives it, it means that the first service packet has completed its transmission on the forwarding path. The tail node does not need to continue sending the first service packet to the CE device to avoid affecting the service.

[0154] In this embodiment of the application, after receiving a first service packet, a network device can determine whether the first flow detection option of the first service packet includes replication marker information. If the first service packet includes replication marker information, forwarding the first service packet on the forwarding path does not require forwarding it to the service function node. Therefore, it is unnecessary to first delete the flow detection option of the first service packet and then re-encapsulate it. This allows each network device on the forwarding path to receive the first service packet carrying the flow detection option, and to perform flow detection on the forwarding path based on the first service packet. Consequently, the flow detection result can accurately reflect the quality of the forwarding path.

[0155] When the first service packet does not include replication marker information, the network device replicates the first service packet and adds replication marker information to the replicated service packet to obtain the second service packet. This allows subsequent network devices on the forwarding path to receive the second service packet without forwarding it to the service function node. Consequently, there is no need to first remove the flow detection option of the second service packet and then re-encapsulate it. This ensures that all network devices on the forwarding path can receive the second service packet carrying the flow detection option. Flow detection of the forwarding path is then performed based on the second service packet, solving the problem of the inability to perform flow detection on the forwarding path. This allows the flow detection results to accurately reflect the quality of the forwarding path.

[0156] In another embodiment of this application, in Figure 3 In a corresponding embodiment, before the network device sends the second service packet on the forwarding path, or when the network device determines that the first follow-up detection option does not include replication marker information, the network can also obtain the link status of the link between the network device and the service function node before sending the second service packet on the forwarding path.

[0157] If the link status is unreachable, the first service packet is discarded;

[0158] If the link status is reachable, the first service packet is copied, and a copy marker is added to the flow detection option of the copied first service packet to obtain the second service packet. Then, the steps of forwarding the second service packet in the above embodiment are executed.

[0159] In one implementation, the network device can monitor the link status between itself and the service function node in real time and record the link status in the data plane. In this way, the network device can obtain the link status between itself and the service function node from the data plane.

[0160] If a service function node fails and / or the link between the network device and the service function node fails, the link status is unreachable.

[0161] If the service function node is not faulty and the link between the network device and the service function node is not faulty, then the link status is reachable.

[0162] Network devices can determine whether there is a link failure between the network device and the service function node by checking the interface status of the interface connecting the network device and the service function node. When the interface status is abnormal, it is determined that the link between the network device and the service function node is faulty; when the interface status is normal, it is determined that the link between the network device and the service function node is not faulty. Network devices can also determine the link status with the service function node using other methods of related technologies, which are not limited in this embodiment.

[0163] In another implementation, if the network device determines that the service function node is faulty and / or the link between the network device and the service function node is faulty, then the forwarding switch between the network device and the service function node is set to off; if the service function node is not faulty and the link between the network device and the service function node is not faulty, then the forwarding switch between the network device and the service function node is set to on.

[0164] Furthermore, if the network device determines that the forwarding switch is open, it determines that the link is reachable; if it determines that the forwarding switch is closed, it determines that the link is unreachable.

[0165] Understandably, if the first service packet is dropped, the analyzer cannot receive the follow-up detection data reported by other network devices on the forwarding path based on the first service packet. Therefore, it can be determined that the service chain path of the first service packet is faulty. In other words, the analyzer's follow-up detection results can also reflect link failures between network devices and service function nodes. Consequently, the analyzer promptly triggers the head node to switch service chain paths to avoid prolonged impact on service chain functionality.

[0166] Optionally, the network device can be configured to decide whether to discard the first service packet when the link is determined to be unreachable, based on actual needs. For example, if it is not necessary to detect link failure between the network device and the service function node using flow-following detection technology, then even if the network device determines that the link with the service function node is unreachable, the network device does not need to discard the first packet. Instead, it can copy the first service packet, add a copy marker to the flow-following detection option of the copied first service packet, obtain a second service packet, and send the second service packet on the forwarding path. This enables flow-following detection of subsequent forwarding paths. In this case, the head node can detect whether the link between the network device and the service function node is reachable using other detection methods in related technologies, which is not limited in this embodiment.

[0167] In the embodiments of this application, the network device obtains the link status of the link with the service function node, and determines whether the first service packet needs to be discarded based on whether the link status is reachable. If it is not reachable, the first service packet is copied and a second service packet is generated and transmitted on the forwarding path, thereby enabling flow detection of the forwarding path. If it is still not reachable, the first service packet is discarded, so that the analyzer can detect service chain path failures in a timely manner, thereby triggering the head node to switch the service chain path in a timely manner and avoiding long-term impact on service chain functions.

[0168] The following describes the message sending method provided in the embodiments of this application in specific scenarios, such as... Figure 5 As shown, after receiving the original service message, the head node encapsulates the original service message with an IPv6 header, flow detection options, and SRH to obtain the first service message, and then sends the first service message to SFF1.

[0169] See Figure 5 The destination address of the IPv6 header of the first service packet is SFF1, and the Segment List included in the SRH is SFF1::SF1, SFF2::SF2, and SFF3.

[0170] Where SFF1::SF1 is the SID of SFF1, and its type can be End.AD or End.AS, which is used to instruct SFF1 to send the message to SF1;

[0171] SFF2::SF2 is the SID of SFF2, which can be of type End.AD or End.AS, and is used to instruct SFF2 to send the message to SF2;

[0172] SFF3 is the SID of SFF3, and its type can be a regular End type.

[0173] After receiving the first service message, SFF1 copies the first service message to obtain the second service message, adds copy marker information to the flow detection option of the second service message, and then sends the second service message on the forwarding path, and sends the original service message to SF1.

[0174] After receiving the processed original service message sent by SF1, SFF1 encapsulates the processed original service message with SRH and IPv6 headers to obtain the third service message, and sends the third service message to SFF2.

[0175] from Figure 5 As can be seen, SFF2 can receive the second and third service messages.

[0176] If SFF2 detects that the following detection option included replication marker information in the second service, it will perform following detection based on the following detection option and forward the second service packet to SFF3.

[0177] SFF2 can send the original service message from the third service message to SF2. After receiving the original service message processed by SF2, it encapsulates the processed original service message with an IPv6 header and an SRH header to obtain the fourth service message, and forwards the fourth service message to SFF3.

[0178] SFF3 can receive the second and fourth service messages. Since SFF3 is the tail node, it can send the original service message included in the fourth service message to subsequent devices (such as CE devices) and discard the second service message.

[0179] Optionally, the SIDs of SFF1 and SFF3 can also be of type End.AM. In this case, SFF1 and SFF2 still send the second service packet on the forwarding path as described above, and process the first service packet according to the processing method of nodes of type End.AM. SFF1 can update the destination address of the first service packet to the segment with SL=0, then remove the flow detection option from the first service packet, and send the processed first service packet to SF1. After receiving the service packet returned by SF1, SFF1 can continue to forward the packet according to the method specified in the protocol. In this way, the service node will not receive service packets with the flow detection option, and there will be no increase in the requirements for the service node.

[0180] Based on the same inventive concept, embodiments of this application also provide a message sending device, which is applied to network devices, such as... Figure 6 As shown, the device includes:

[0181] The receiving module 601 is used to receive a first service message, which includes a destination address, a first flow detection option, a segmented routing header (SRH), and the original service message. The SRH includes a list of SIDs, which indicates the forwarding path.

[0182] The sending module 602 is used to send a second service message on the forwarding path and send the original service message to the service function node if the destination address is the locally configured proxy SID.

[0183] The second service message includes a second flow detection option, which includes replication marker information. The replication marker information is used to indicate that the second service message is a replication message of the first service message.

[0184] Optionally, the device further includes: a determination module and a copying module;

[0185] The judgment module is used to determine whether the first follow-up detection option includes copy marker information;

[0186] The sending module 602 is also used to send the first service message on the forwarding path if the judgment result of the judgment module is yes;

[0187] The copy module is used to copy the first service message if the judgment result of the judgment module is negative, and add copy mark information to the follow-up detection option of the copied first service message to obtain the second service message.

[0188] Optionally, the device further includes: a first discard module;

[0189] The judgment module is also used to determine whether the destination address is the last SID in the SID list;

[0190] The first discard module is used to discard the first service message if the judgment result of the judgment module is yes.

[0191] The sending module 602 is used to send the first service message on the forwarding path if the judgment result of the judgment module is negative.

[0192] Optionally, the device further includes: an acquisition module, a second discard module, and a copy module;

[0193] The acquisition module is used to acquire the link status between network devices and service function nodes;

[0194] The second discard module is used to discard the first service packet if the link status is unreachable.

[0195] The replication module is used to replicate the first service packet if the link status is reachable, and add replication marker information to the follow-up detection option of the replicated first service packet to obtain the second service packet.

[0196] Optionally, the acquisition module is specifically used for:

[0197] Obtain the link status between network devices and service function nodes from the data plane;

[0198] If a service function node fails and / or the link between the network device and the service function node fails, the link status is unreachable.

[0199] If the service function node is not faulty and the link between the network device and the service function node is not faulty, then the link status is reachable.

[0200] Optionally, the follow-up detection option for the second service message includes a reserved field that carries replication marker information.

[0201] Another embodiment of this application also provides a network device, such as... Figure 7 As shown, the network device includes: a processor 701; a transceiver 704; and a machine-readable storage medium 702, which stores machine-executable instructions that can be executed by the processor 701. The machine-executable instructions cause the processor 701 to perform the following steps:

[0202] The transceiver 704 receives the first service message, which includes the destination address, the first flow detection option, the segmented routing header (SRH), and the original service message. The SRH includes a list of SIDs, which indicates the forwarding path.

[0203] If the destination address is the locally configured proxy SID, the second service message is sent on the forwarding path through transceiver 704, and the original service message is sent to the service function node.

[0204] The second service message includes a second flow detection option, which includes replication marker information. The replication marker information is used to indicate that the second service message is a replication message of the first service message.

[0205] Optionally, the machine-executable instructions also cause the processor 701 to perform the following steps:

[0206] Determine whether the first flow detection option includes copy marker information;

[0207] If so, the first service message is sent on the forwarding path via transceiver 704;

[0208] If not, then copy the first service message and add copy marker information to the follow-up detection option of the copied first service message to obtain the second service message.

[0209] Optionally, the machine-executable instructions also cause the processor 701 to perform the following steps:

[0210] Determine if the destination address is the last SID in the SID list;

[0211] If so, discard the first service message;

[0212] If not, the first service message is sent on the forwarding path via transceiver 704.

[0213] Optionally, the machine-executable instructions also cause the processor 701 to perform the following steps:

[0214] Obtain the link status between network devices and service function nodes;

[0215] If the link status is unreachable, the first service packet is discarded;

[0216] If the link status is reachable, the first service packet is copied, and a copy marker is added to the flow detection option of the copied first service packet to obtain the second service packet.

[0217] Optionally, the machine-executable instructions also cause the processor 701 to perform the following steps:

[0218] Obtain the link status between network devices and service function nodes from the data plane;

[0219] If a service function node fails and / or the link between the network device and the service function node fails, the link status is unreachable.

[0220] If the service function node is not faulty and the link between the network device and the service function node is not faulty, then the link status is reachable.

[0221] Optionally, the follow-up detection option for the second service message includes a reserved field that carries replication marker information.

[0222] like Figure 7 As shown, the network device may also include a communication bus 703. The processor 701, machine-readable storage medium 702, and transceiver 704 communicate with each other via the communication bus 703. The communication bus 703 can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. This communication bus 703 can be divided into an address bus, a data bus, a control bus, etc.

[0223] The transceiver 704 can be a wireless communication module. Under the control of the processor 701, the transceiver 704 interacts with other devices for data exchange.

[0224] Machine-readable storage medium 702 may include random access memory (RAM) or non-volatile memory (NVM), such as at least one disk storage device. Alternatively, machine-readable storage medium 702 may also be at least one storage device located remotely from the aforementioned processor.

[0225] The processor 701 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.

[0226] Based on the same inventive concept, and according to the message transmission method provided in the above embodiments of this application, this application also provides a machine-readable storage medium storing machine-executable instructions that can be executed by a processor. The processor is prompted by the machine-executable instructions to implement the steps of any of the above message transmission methods.

[0227] In another embodiment provided in this application, a computer program product containing instructions is also provided, which, when run on a computer, causes the computer to perform the steps of any of the message sending methods described above.

[0228] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0229] The above description is only a preferred embodiment of this application and is not intended to limit this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of protection of this application.

Claims

1. A message sending method, characterized in that, The method is applied to a network device, and the method includes: Receive a first service message, the first service message including a destination address, a first flow detection option, a segmented routing header (SRH) and an original service message, the SRH including a list of SIDs, the SID list indicating a forwarding path; If the destination address is a locally configured proxy SID, then a second service message is sent on the forwarding path, and the original service message is sent to the service function node. The second service message includes a second flow detection option, which includes replication marker information. The replication marker information is used to indicate that the second service message is a replication message of the first service message. Before sending the second service message on the forwarding path, the method further includes: Determine whether the first flow detection option includes copy marker information; If so, the first service message is sent on the forwarding path; If not, then copy the first service message and add the copy marker information to the follow-up detection option of the copied first service message to obtain the second service message.

2. The method according to claim 1, characterized in that, Before sending the first service message on the forwarding path, the method further includes: Determine whether the destination address is the last SID in the SID list; If so, then discard the first service message; If not, then send the first service message on the forwarding path.

3. The method according to claim 1, characterized in that, Before sending the second service message on the forwarding path, the method further includes: Obtain the link status of the link between the network device and the service function node; If the link status is unreachable, then the first service packet is discarded; If the link status is reachable, then the first service packet is copied, and the copying tag information is added to the flow detection option of the copied first service packet to obtain the second service packet.

4. The method according to claim 3, characterized in that, The step of obtaining the link status between the network device and the service function node specifically includes: Obtain the link status of the link between the network device and the service function node from the data plane; If the service function node fails and / or the link between the network device and the service function node fails, the link status is unreachable. If the service function node is not faulty and the link between the network device and the service function node is not faulty, then the link status is reachable.

5. The method according to claim 1, characterized in that, The following detection option for the second service message includes a reserved field, which carries the replication marker information.

6. A message sending device, characterized in that, The device is used in a network device, and the device includes: The receiving module is configured to receive a first service packet, the first service packet including a destination address, a first flow detection option, a segmented routing header (SRH), and an original service packet, wherein the SRH includes a list of SIDs, and the SID list indicates a forwarding path; The sending module is configured to send a second service message on the forwarding path and send the original service message to the service function node if the destination address is a locally configured proxy SID. The second service message includes a second flow detection option, which includes replication marker information. The replication marker information is used to indicate that the second service message is a replication message of the first service message. The device further includes: a judgment module and a copying module; The judgment module is used to determine whether the first flow detection option includes copy marker information; The sending module is specifically used to send the first service message on the forwarding path if the judgment result of the judgment module is yes. The copying module is used to copy the first service message if the judgment result of the judgment module is negative, and add the copying mark information to the following detection option of the copied first service message to obtain the second service message.

7. The apparatus according to claim 6, characterized in that, The device further includes: a first discarding module; The judgment module is also used to determine whether the destination address is the last SID in the SID list; The first discarding module is used to discard the first service packet if the judgment result of the judgment module is yes; The sending module is specifically used to send the first service message on the forwarding path if the judgment result of the judgment module is negative.

8. The apparatus according to claim 6, characterized in that, The device further includes: an acquisition module, a second discard module, and a copy module; The acquisition module is used to acquire the link status of the link between the network device and the service function node; The second discarding module is used to discard the first service packet if the link status is unreachable; The replication module is configured to replicate the first service packet if the link status is reachable, and add the replication marker information to the follow-up detection option of the replicated first service packet to obtain the second service packet.

9. The apparatus according to claim 8, characterized in that, The acquisition module is specifically used for: Obtain the link status of the link between the network device and the service function node from the data plane; If the service function node fails and / or the link between the network device and the service function node fails, the link status is unreachable. If the service function node is not faulty and the link between the network device and the service function node is not faulty, then the link status is reachable.

10. The apparatus according to claim 6, characterized in that, The following detection option for the second service message includes a reserved field, which carries the replication marker information.

11. A network device, characterized in that, The network device includes: processor; transceiver; A machine-readable storage medium storing machine-executable instructions that can be executed by the processor; the machine-executable instructions cause the processor to perform the following steps: The transceiver receives a first service packet, which includes a destination address, a first flow detection option, a segmented routing header (SRH), and the original service packet. The SRH includes a list of SIDs, which indicates a forwarding path. If the destination address is a locally configured proxy SID, then the transceiver sends a second service message on the forwarding path and sends the original service message to the service function node. The second service message includes a second flow detection option, which includes replication marker information. The replication marker information is used to indicate that the second service message is a replication message of the first service message. The machine-executable instructions also cause the processor to perform the following steps: Determine whether the first flow detection option includes copy marker information; If so, the first service message is sent via the transceiver on the forwarding path; If not, then copy the first service message and add the copy marker information to the follow-up detection option of the copied first service message to obtain the second service message.

12. The network device according to claim 11, characterized in that, The machine-executable instructions also cause the processor to perform the following steps: Determine whether the destination address is the last SID in the SID list; If so, then discard the first service message; If not, the first service message is sent via the transceiver on the forwarding path.

13. The network device according to claim 11, characterized in that, The machine-executable instructions also cause the processor to perform the following steps: Obtain the link status of the link between the network device and the service function node; If the link status is unreachable, then the first service packet is discarded; If the link status is reachable, then the first service packet is copied, and the copying tag information is added to the flow detection option of the copied first service packet to obtain the second service packet.

14. The network device according to claim 13, characterized in that, The machine-executable instructions also cause the processor to perform the following steps: Obtain the link status of the link between the network device and the service function node from the data plane; If the service function node fails and / or the link between the network device and the service function node fails, the link status is unreachable. If the service function node is not faulty and the link between the network device and the service function node is not faulty, then the link status is reachable.

15. The network device according to claim 11, characterized in that, The following detection option for the second service message includes a reserved field, which carries the replication marker information.

16. A machine-readable storage medium, characterized in that, The device stores machine-executable instructions that, when invoked and executed by a processor, cause the processor to: implement the method of any one of claims 1-5.

17. A computer program product, characterized in that, The computer program product includes a computer program or instructions that, when executed by a processor, implement the method described in any one of claims 1-5.