A method, apparatus, and system for implementing service path detection

By carrying messages with indications and service identifiers in the SRv6 network, service-level path detection is achieved, which solves the shortcomings of tunnel-level detection, ensures accurate detection and handover at the service level, and saves network resources.

CN119996161BActive Publication Date: 2025-12-09HUAWEI TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510167589.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Priority Date
2020-09-21
Filing Date
2020-11-30
Publication Date
2025-12-09
Estimated Expiration
2040-11-30

AI Technical Summary

Technical Problem

In SRv6 networks, existing tunnel-level fault detection cannot accurately detect service-level faults, resulting in normally operating services being mistakenly switched over, wasting network resources.

Method used

By carrying indication and service identification information in the message, service-level path detection is achieved, ensuring that the receiving network device can distinguish between detection messages and service messages, and perform more granular path detection and switching.

Benefits of technology

It achieves more accurate business-level path detection, avoids unnecessary business switching, saves network resources, and ensures the normal operation of services.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119996161B_ABST
    Figure CN119996161B_ABST
Patent Text Reader

Abstract

A method, device and system for realizing service path detection, the method is applied to an SRv6 network, comprising: a first network device generates and sends a first message to a second network device based on IPv6, the first message comprising a first indication and identification information of a service, the first indication being used to indicate that the first message is a detection message; the second network device detects a path carrying the service according to the first indication and the identification information of the service after receiving the first message. The sender adds the first indication and the identification information of the service in the detection message, so that the receiver can determine that the received is the detection message and perceive the corresponding operating service, thereby detecting the connectivity or quality of the path carrying the service based on the detection message, to realize fine-grained service-level path detection, and provide a judgment basis for service-level path switching.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] This application is a divisional application of the original application with the application number 202011375770.6 and the original filing date of November 30, 2020, the entire contents of the original application are incorporated herein by reference; and claims priority to the Chinese patent application with the application number 202010992436.9 and the application title of "A method and device for realizing fault detection in the SRv6 scenario", which was filed with the China National Intellectual Property Office on September 21, 2020, the entire contents of which are incorporated herein by reference. TECHNICAL FIELD

[0002] The present application relates to the field of communication technology, in particular to a method, device and system for realizing service path detection. BACKGROUND

[0003] In the network based on segment routing over internet protocol version 6 (SRv6), the tunnel level fault detection can be realized at present, for example, the user side PE device detects the tunnel fault between the user side provider edge (PE) device and the network side PE device, then the tunnel level switching is realized by the user side PE device to ensure the normal operation of the service originally carried through the tunnel. However, the fault detection granularity of the tunnel level is relatively coarse, once the fault is caused by a certain service, and other services carried on the tunnel can operate normally, then the service level fault cannot be accurately detected by the fault detection method, which leads to that the user side PE device will switch all services carried on the tunnel, that is, the normally operating service on the tunnel will also be mis-switched, thereby wasting network resources.

[0004] Therefore, it is urgent to provide a service level path detection method in this scenario to realize more fine-grained and more accurate path detection, so as to ensure accurate switching of the service. SUMMARY

[0005] The embodiments of the present application provide a method, device and system for realizing service path detection, the network device sends a detection packet carrying an indication, so that the receiving network device can accurately distinguish the detection packet and the service packet through the indication, and ensure that the receiving network device can effectively realize service level fault detection, thereby providing protection for the normal operation of the service in the network.

[0006] The following methods, devices, equipment and systems provided in the present application can be applied in the SRv6 network.

[0007] In a first aspect, an embodiment of the present application provides a method for implementing service path detection, which is applied to a first network device. The method may, for example, include: generating, by the first network device, a first packet based on an Internet Protocol version 6 (IPv6) and sending the first packet to a second network device, the first packet including a first indication and identification information of a service, wherein the first indication is used to indicate that the first packet is a detection packet; and sending, by the first network device, the first packet to the second network device, so as to instruct the second network device to detect at least one path between the first network device and the second network device for carrying the service and a path between the second network device and an access-side network device for carrying the service according to the first indication and the identification information of the service. The detection of the path for carrying the service by the second network device may be detection of a path state, such as path fault detection or path quality detection. It can be seen that, by adding the first indication and the identification information of the service in the detection packet sent by the sending-side network device, the receiving-side network device can accurately determine that the received packet is a detection packet and perceive the corresponding service information, so as to detect the to-be-detected path for carrying the service in terms of connectivity or quality based on the detection packet, thereby overcoming the problem that only a relatively coarse-grained tunnel-level detection can be performed between network devices at present, which leads to the inability to meet the demand and the waste of network resources, and implementing more fine-grained and more accurate service-level detection, thereby providing an accurate basis for service-level path switching and providing a guarantee for the normal and efficient operation of services in the network.

[0008] The to-be-detected path may be at least one of a path between the first network device and the second network device for carrying the service and a path between the second network device and the access-side network device for carrying the service. The specific path to be detected and the specific content of the detection can be determined according to the detection information carried in the detection packet. When the to-be-detected path includes both the path between the first network device and the second network device for carrying the service and the path between the second network device and the access-side network device for carrying the service, the to-be-detected path can also be considered as a path range between the first network device and the access-side network device. The detection content for the to-be-detected path may include a state of an object on the path, such as an interface, a link or a device, or a quality state of data transmitted on the path, such as statistics or analysis from aspects such as packet loss, delay, error code or jitter. The second network device can send the detection content to the first network device to enable the first network device to determine the detection result, or can obtain the detection result locally according to the detection content.

[0009] The identification information of the service can be carried in the first IPv6 header or the first IPv6 extension header of the first packet. The identification information of the service can be, for example, a virtual private network segment identifier (VPN SID) corresponding to the second network device.

[0010] The first indication can be carried in the first IPv6 header or the first IPv6 extension header of the first packet. Various possible implementation manners of carrying the first indication in the first packet are exemplarily described below.

[0011] In a possible implementation manner, the first packet can include the first IPv6 header, and the first indication is carried in a next header field in the first IPv6 header. This implementation manner can be applicable to a best effort (BE) scenario of SRv6. Alternatively, the first packet can include the first IPv6 extension header, and the first indication is carried in a next header field in a segment routing header (SRH) in the first IPv6 extension header. This implementation manner can be applicable to a policy scenario of SRv6. For example, the next header field carrying the first indication in the first packet has a value of 137, indicating that the first packet is a detection packet.

[0012] In this implementation manner, the first IPv6 extension header in the first packet can further include an alert label and a control word. The alert label and the control word are used to indicate detection information in a payload of the first packet. The detection information is used to indicate that the second network device detects a path of the service according to the detection information. The alert label and the control word used to indicate the detection information can be that the value of the alert label and the control word determines that the content carried subsequently is the detection information, or the value of the alert label and the control word determines that the content carried subsequently is the detection information and the type of the detection information can be determined. For example, the alert label=13 and the control word can determine that the content carried subsequently is the detection information and the type of the detection information is bidirectional forwarding detection (BFD) information.

[0013] In another possible implementation, the first packet can include a first IPv6 header, and the first indication is carried in an argument (args) field in a first destination address (DA) field of the first IPv6 header. This implementation can be applicable to an SRv6 BE scenario. Alternatively, the first packet can include a first IPv6 extension header, and the first indication is carried in an args field in a first DA field of a first Segment Routing Header (SRH) of the first IPv6 extension header. This implementation can be applicable to an SRv6 policy scenario. For example, the value of the args of the DA field carrying the first indication in the first packet is not equal to 0 (e.g., the value of the args is equal to 3), indicating that the first packet is a detection packet.

[0014] In yet another possible implementation, the first packet can include a first IPv6 extension header, and the first indication is carried in a flags field in a SRH of the first IPv6 extension header. For example, the value of the flags field carrying the first indication in the first packet is not equal to 0 (e.g., the value of the flags is equal to 1), indicating that the first packet is a detection packet.

[0015] In still another possible implementation, the first packet can include a first IPv6 extension header, and the first indication is carried in a type length Value (TLV) field in a hop by hop (HBH) option header of the first IPv6 extension header, or in a TLV field in a destination option header (DOH) of the first IPv6 extension header. For example, the first indication is carried in a TLV field in a HBH option header field in the first packet, indicating that the first packet is a detection packet. For another example, the first indication is carried in a TLV field in a DOH field in the first packet, indicating that the first packet is a detection packet.

[0016] In some possible implementations, the method can further include: sending, by the first network device, a second packet to the second network device, the second packet being a service packet used to carry the service, the second packet not including the first indication. In this way, after receiving the first packet and the second packet, the second network device can determine whether the packets are detection packets or service packets based on the indications carried in the packets, and perform corresponding processing based on the specific types of the packets.

[0017] As an example, the second packet does not include the first indication, which can mean that the second packet does not include a field for carrying the first indication, for example, assuming that the first packet includes a TLV field in the HBH option header field for carrying the first indication, then the second packet does not include the TLV field for carrying the first indication in the HBH option header; for another example, assuming that the first packet includes a TLV field in the DOH field for carrying the first indication, then the second packet does not include the TLV field for carrying the first indication in the DOH field.

[0018] As another example, the second packet does not include the first indication, and can also mean that the second packet includes a field carrying the first indication, but the value of the field in the first packet and the value of the field in the second packet are different, and are used to carry different indications, the value of the field in the first packet is used to carry the first indication, and the first indication is used to indicate that the first packet is a detection packet, and the value of the field in the second packet is used to carry the second indication, and the second indication is used to indicate that the second packet is a service packet. In one case, assuming that the second packet includes a second IPv6 header, the second indication is carried in the next header field in the second IPv6 header, and the first indication is a first value of the next header field in the first IPv6 header, then the second indication can be a second value of the next header field in the second IPv6 header (the first value is not equal to the second value). Or, assuming that the second packet includes a second IPv6 extension header, the second indication is carried in the next header field in the second SRH of the second IPv6 extension header, and the first indication is a first value of the next header field in the first SRH of the first IPv6 extension header, then the second indication can be a second value of the next header field in the second SRH. For example, the value of the next header field carrying the first indication in the first packet is 137, indicating that the first packet is a detection packet; the value of the next header field carrying the second indication in the second packet is 143, indicating that the second packet is a service packet. In another case, assuming that the second packet includes a second IPv6 header, the second indication is carried in the args field in the second DA field of the second IPv6 header, and the first indication is a third value of the args field in the first DA field of the first IPv6 header, then the second indication can be a fourth value of the args field in the second DA field (the third value is not equal to the fourth value). Or, assuming that the second packet includes a second IPv6 extension header, the second indication is carried in the args field of the second DA field in the second SRH of the second IPv6 extension header, and the first indication is a third value of the args field of the first DA field in the first SRH of the first IPv6 extension header, then the second indication can be a fourth value of the args field of the second DA field in the second SRH. For example, the value of the args field in the DA field carrying the first indication in the first packet is 3, indicating that the first packet is a detection packet; the value of the args field in the DA field carrying the second indication in the second packet is 0, indicating that the second packet is a service packet.In another case, assuming that the second packet comprises a second IPv6 extension header, the second indication is carried in a flags field in a SRH of the second IPv6 extension header, and the first indication is a fifth value of a flags field in a SRH of the first IPv6 extension header, then the second indication can be a sixth value of the flags field in the SRH of the second IPv6 extension header (the fifth value is not equal to the sixth value).

[0019] The first indication carried in the first packet sent by the first network device to the second network device and the identification information of the service are for the purpose of enabling the second network device to detect the path carrying the service according to the first indication and the identification information of the service in the first packet sending stage, but without limiting whether the second network device actually receives the first packet.

[0020] As an example, when there is a fault in a link or a device between the first network device and the second network device and the second network device is faulty, the second network device can not receive the first packet, so that the first network device does not receive a response packet sent by the second network device within a preset time length, and it can be determined that the path carrying the service is faulty. In this example, due to the unpredictability of the forwarding path state between the first network device and the second network device in the first packet sending stage, in some possible situations including the fault scenario listed in this example, the second network device actually cannot normally receive the first packet, but this does not affect the purpose of the first network device in the first packet sending stage, that is, enabling the second network device to detect the path carrying the service according to the first indication and the identification information of the service.

[0021] As another example, assuming the second network device receives the first packet, the second network device can perceive and detect the content can include whether the link or interface of the access side network device on the connection path of the second network device exists a fault. In other possible cases, the second network device can also determine whether the access side network connected thereto exists a fault in some manners, for example, whether the access side network device directly or indirectly connected thereto, the link or port in the access side network exists a fault. The access side mentioned herein can also be referred to as the user side in some cases. In the example, in one case, the second network device can select not to respond to the first packet in the case of determining that the interface or link of the access side network device connected by the second network device exists a fault, and then the first network device can not receive the response packet sent by the second network device within a preset time length, and can determine that the path between the first network device and the access side network device carrying the service exists a fault. In another case, the second network device can select to generate and send the response corresponding to the first packet to the first network device, and then when the first network device receives the response packet sent by the second network device, the first network device can determine whether the path carrying the service exists a fault based on the link state information or interface state information carried in the response packet, for example, determine that the path between the second network device and the access side network device for carrying the service exists a fault.

[0022] As another example, assuming the second network device receives the first packet, the second network device can also detect the path quality of the path carrying the service, for example, detect the quality data such as packet loss, delay, etc. on the path between the first network device and the second network device. In one case, the second network device carries the corresponding quality feedback data in the response packet sent to the first network device, and the quality feedback data can include the quality data fed back by the second network device and / or the quality feedback data added in the response packet by multiple intermediate devices on the path from the second network device to the first network device sending the response packet, so that the first network device determines the one-way or two-way path quality detection result. In another case, the second network device can also directly determine the one-way path quality detection result according to the quality data obtained by detection.

[0023] In some possible implementation manners, if the first network device determines that the path carrying the service has a fault or the path quality does not meet the requirement, the method can further include: switching, by the first network device, the path carrying the service to a path including the first network device to the third network device, and the third network device carries the service after the switching. In this way, through service-level fault detection, it can be determined which path carrying which service has a fault, and the path carrying the service is switched, without switching the forwarding path of all services carried on the tunnel due to performing tunnel-level switching, which saves network resources to a certain extent.

[0024] In a second aspect, an embodiment of the present application further provides a method for implementing service path detection, which is applied to a second network device, and the method can include, for example: receiving, by the second network device, a first packet sent by a first network device, the first packet including a first indication and identification information of a service, the first indication being used to indicate that the first packet is a detection packet; and then, detecting, by the second network device, at least one of a path between the first network device and the second network device carrying the service and a path between the second network device and an access-side network device carrying the service according to the first indication and the identification information of the service. It can be seen that, through the method, the sender network device adds the first indication and the identification information of the service in the sent detection packet, so that the receiver network device can accurately determine that the received packet is a detection packet and perceive the corresponding service, and then detect the connectivity or quality of the path carrying the service based on the detection packet, which overcomes the problem in the prior art that only tunnel-level detection between network devices is supported, the granularity is coarse and cannot meet the requirement, and network resources are wasted, and more fine-grained and more accurate service-level detection is implemented, which provides an accurate basis for service-level switching, and thus guarantees the normal operation of services in the network.

[0025] The identification information of the service can be carried in a first IPv6 header or a first IPv6 extension header of the first packet. The identification information of the service can be, for example, a VPN SID corresponding to the second network device.

[0026] The first indication can be carried in the first IPv6 header or the first IPv6 extension header of the first packet. Various possible implementation manners of carrying the first indication in the first packet are exemplarily described below.

[0027] In a possible implementation, the first message can include a first IPv6 header, and the first indication is carried in a next header field in the first IPv6 header, and the implementation can be applicable to an SRv6 BE scenario. Alternatively, the first message can include a first IPv6 extension header, and the first indication is carried in a next header field in a first SRH of the first IPv6 extension header, and the implementation can be applicable to an SRv6 policy scenario.

[0028] In the implementation, the first IPv6 extension header in the first message can further include an alert label and a control word, and the alert label and the control word are used to indicate detection information in a payload of the first message, and the detection information is used to indicate that the second network device detects a path of the service according to the detection information. The alert label and the control word can be used to indicate the detection information, and the content carried after the alert label and the control word can be determined to be the detection information based on a value of the alert label and the control word, or the content carried after the alert label and the control word can be determined to be the detection information and a type of the detection information can be determined based on the value of the alert label and the control word, for example, the alert label is 13 and the control word, the content carried after the alert label and the control word can be determined to be the detection information and the type of the detection information is BFD information.

[0029] In another possible implementation, the first message can include a first IPv6 header, and the first indication is carried in an args field in a first DA field of the first IPv6 header, and the implementation can be applicable to an SRv6 BE scenario. Alternatively, the first message can include a first IPv6 extension header, and the first indication is carried in an args field in a first DA field of a first SRH of the first IPv6 extension header, and the implementation can be applicable to an SRv6 policy scenario.

[0030] In yet another possible implementation, the first message can include a first IPv6 extension header, and the first indication can be carried in a flags field in an SRH of the first IPv6 extension header.

[0031] In still another possible implementation, the first message can include a first IPv6 extension header, and the first indication can be carried in a TLV field in an HBH option header of the first IPv6 extension header, or can be carried in a TLV field in a DOH of the first IPv6 extension header.

[0032] In some possible implementation manners, the method can further include: receiving, by the second network device, a second packet sent by the first network device, the second packet being a service packet for carrying the service, and the second packet not including the first indication. In this way, after receiving the first packet and the second packet, the second network device can determine whether the packets are detection packets or service packets based on the indications carried in the packets, so as to perform corresponding processing based on the specific packet type, and thus it is possible to implement service-level detection.

[0033] The second message does not include the first indication. In one case, the second message includes a second IPv6 header, the second indication is carried in a next header field in the second IPv6 header, and the first indication is a first value of the next header field in the first IPv6 header. In this case, the second indication can be a second value of the next header field in the second IPv6 header (the first value is different from the second value). In another case, the second message includes a second IPv6 extension header, the second indication is carried in a next header field in a second SRH of the second IPv6 extension header, and the first indication is a first value of the next header field in a first SRH of the first IPv6 extension header. In this case, the second indication can be a second value of the next header field in the second SRH. In yet another case, the second message includes a second IPv6 header, the second indication is carried in an args field in a second DA field of the second IPv6 header, and the first indication is a third value of the args field in a first DA field of the first IPv6 header. In this case, the second indication can be a fourth value of the args field in the second DA field (the third value is different from the fourth value). In yet another case, the second message includes a second IPv6 extension header, the second indication is carried in an args field in a second DA field in a second SRH of the second IPv6 extension header, and the first indication is a third value of the args field in a first DA field in a first SRH of the first IPv6 extension header. In this case, the second indication can be a fourth value of the args field in the second DA field in the second SRH. In yet another case, the second message includes a second IPv6 extension header, the second indication is carried in a flags field in a SRH of the second IPv6 extension header, and the first indication is a fifth value of the flags field in a SRH of the first IPv6 extension header. In this case, the second indication can be a sixth value of the flags field in the SRH of the second IPv6 extension header (the fifth value is different from the sixth value).

[0034] In a possible implementation, the second network device can detect a path state of a path carrying the service according to the received first message. The path state can be a path failure state or a path quality state, for example. As an example, assuming that the second network device receives the first message, the second network device can detect the path between the second network device and the access-side network device carrying the service according to the first indication and the identification information of the service, or detect the path in the access-side network in some way, such as detecting a link connected by a network device in the access-side network or an interface included in the access-side network. In this example, in one case, the second network device can choose not to respond to the first message, and the first network device can determine that the path carrying the service is faulty when the first network device does not receive a response message sent by the second network device within a preset time length, for example, the first network device determines that the path between the first network device and the access-side network device carrying the service is faulty. In another case, the second network device can choose to generate and send a response corresponding to the first message to the first network device, and the first network device can determine whether the path carrying the service is faulty based on link state information or interface state information carried in the response message when the first network device receives the response message sent by the second network device. For example, the first network device can determine that the path between the second network device and the access-side network device carrying the service is faulty according to the response message.

[0035] As another example, the second network device can also detect a path quality of a path carrying the service according to the received first message, for example, detect quality data such as packet loss and delay on the path between the first network device and the second network device. In one case, the second network device can carry corresponding quality feedback data in a response message sent to the first network device, so that the first network device determines a bidirectional path quality detection result. In another case, the second network device can also directly determine a unidirectional path quality detection result according to the detected quality data.

[0036] In some possible implementation manners, the second network device detects the path carrying the service according to the first indication and the identification information of the service in the method, for example, can include: the second network device determines that the first packet is a detection packet, and determines that the local supports detection according to the first indication, and then detects the path carrying the service according to the local detection strategy. Wherein, according to the local fault detection strategy, the first packet can be sent to the corresponding detection process, and the fault detection is performed in the corresponding detection process. For example, assuming that the first packet is a BFD detection packet, when the second network device determines that the local supports the BFD detection packet, the service related content and the detection information in the BFD detection packet are sent to the local BFD process, so that the corresponding fault detection is performed by using the BFD process. Wherein, the local supports detection according to the first indication can mean that the network device is locally configured to enable the detection function indicated by the first indication. It should be noted that the first packet is sent to the corresponding detection process, for example, the service related content and the detection information remaining after the tunnel information (such as SRH in the first packet) in the first packet is removed can be sent to the corresponding detection process.

[0037] In the method provided in the above first aspect and second aspect, the first network device can be an ingress PE device carrying the service, and the second network device can be an egress PE device carrying the service. Alternatively, the first network device can also be other types of network devices capable of initiating the detection method described in the above first aspect and second aspect in the network, and the second network device can be other possible types of devices capable of responding to the received detection packet and performing corresponding path detection.

[0038] In the method provided in the above first aspect and second aspect, the service carried between the first network device and the second network device can be a layer 2 virtual private network (L2VPN) service, which can include a traditional VPN technology or an Ethernet virtual private network (EVPN) technology. Whether it is a traditional VPN service or an EVPN service, a virtual leased line (VLL) service model or a virtual private LAN service (VPLS) service model can be used for network deployment.

[0039] In the method provided in the first aspect and the second aspect, the first packet can be a BFD packet, or can also be an operation administration and maintenance (OAM) packet. Different service path detection functions can be implemented according to different types of the first packet, for example, service path fault detection or service path quality detection, wherein the service path quality detection can be detection on indexes such as time delay, packet loss or jitter.

[0040] For the case that the first packet is a BFD packet, according to the method, not only the connectivity of the path carrying the service between the first network device and the second network device can be detected, but also the connectivity of the path carrying the service between the second network device and the access side network device can be detected, so that the first network device can know the connectivity of the path from the first network device to the access side network device for carrying the service, rather than only the tunnel path connectivity between the first network device and the second network device, thereby achieving the effect of service level connectivity detection.

[0041] For the case that the first message is an OAM message, the path state detected according to the above method can include the connectivity of the path and the quality of the path. In one possible scenario, the OAM message implements path quality detection, which can include that the first network device sends an OAM message to the second network device to inform the first network device of statistical information (such as the number of sent data packets, a timestamp, etc.) of the data that has been sent by the first network device. The second network device can determine the to-be-detected service according to the service identification information carried in the OAM message, and obtain statistical results of the received corresponding reception data for the to-be-detected service, and obtain the path quality detection result corresponding to the path carrying the to-be-detected service by processing the statistical information. Optionally, the second network device can also generate and send an OAM message carrying the detection result to the first network device to inform the first network device of the path quality of the to-be-detected service. Alternatively, in another possible scenario, the OAM message implements path quality detection, which can include that the first network device sends an OAM message to the second network device to inform the first network device of statistical information of the data that has been sent by the first network device. The second network device can determine the to-be-detected service according to the service identification information carried in the OAM message, and obtain statistical results of the received corresponding reception data for the to-be-detected service, and send the statistical results in the generated OAM message to the first network device to instruct the first network device to process the statistical results in the received OAM message and obtain the detection result of the path carrying the to-be-detected service, so as to determine the path quality of the path carrying the to-be-detected service. In addition, as a detection message, the OAM message can implement the detection of the path quality of the path carrying the service between the first network device and the second network device, and also implement the connectivity detection of the path carrying the service.

[0042] In a third aspect, the embodiments of the present application further provide a device for implementing service path detection, which is applied to a first network device and applied to a network supporting SRv6. The device can include a generating unit and a sending unit. The generating unit is configured to generate a first message based on the sixth version of the Internet Protocol (IPv6), the first message including a first indication and identification information of a service, the first indication being used to indicate that the first message is a detection message. The sending unit is configured to send the first message to a second network device to instruct the second network device receiving the first message to detect at least one of a path carrying the service between the first network device and the second network device and a path carrying the service between the second network device and an access-side network device according to the first indication and the identification information of the service.

[0043] The identification information of the service can be carried in the first IPv6 header or the first IPv6 extension header of the first packet.

[0044] As an example, the first packet includes the first IPv6 header, and the first indication is carried in a next header field in the first IPv6 header; or the first packet includes the first IPv6 extension header, and the first indication is carried in a next header field in a first Segment Routing Header (SRH) of the first IPv6 extension header. The first IPv6 extension header of the first packet further includes a reserved label and a control word, and the reserved label and the control word are used to indicate detection information in a payload of the first packet. The detection information is used to indicate that the second network device detects a path of the service according to the detection information.

[0045] As another example, the first packet includes the first IPv6 header, and the first indication is carried in a variable args field in a first Destination Address (DA) field of the first IPv6 header; or the first packet includes the first IPv6 extension header, and the first indication is carried in an args field in a first DA field of a first SRH of the first IPv6 extension header.

[0046] As yet another example, the first packet includes the first IPv6 extension header, and the first indication is carried in a flags field in an SRH of the first IPv6 extension header.

[0047] As still another example, the first packet includes the first IPv6 extension header, and the first indication is carried in a Type Length Value (TLV) field in a Hop-by-Hop (HBH) option header of the first IPv6 extension header, or is carried in a TLV field in a Destination Address (DOH) option header of the first IPv6 extension header.

[0048] In some possible implementation ways, the sending unit is further configured to send a second packet to the second network device, the second packet being a service packet used to carry the service, and the second packet not including the first indication. The second packet can further include a second indication, and the second indication is used to indicate that the second packet is a service packet, and the second indication is different from the first indication.

[0049] The second indication is different from the first indication, which can include that the second packet includes a second IPv6 header, the second indication is carried in a next header field in the second IPv6 header, the first indication is a first value of the next header field in the first IPv6 header, and the second indication is a second value of the next header field in the second IPv6 header; or the second packet includes a second IPv6 extension header, the second indication is carried in a next header field in a second SRH of the second IPv6 extension header, the first indication is a first value of the next header field in a first SRH of the first IPv6 extension header, and the second indication is a second value of the next header field in the second SRH; or the second packet includes a second IPv6 header, the second indication is carried in an args field in a second DA field of the second IPv6 header, the first indication is a third value of the args field in a first DA field of the first IPv6 header, and the second indication is a fourth value of the args field in the second DA field; or the second packet includes a second IPv6 extension header, the second indication is carried in an args field in a second DA field in a second SRH of the second IPv6 extension header, the first indication is a third value of the args field in a first DA field in a first SRH of the first IPv6 extension header, and the second indication is a fourth value of the args field in the second DA field in the second SRH; or the second packet includes a second IPv6 extension header, the second indication is carried in a flags field in an SRH of the second IPv6 extension header, the first indication is a fifth value of the flags field in an SRH of the first IPv6 extension header, and the second indication is a sixth value of the flags field in the SRH of the second IPv6 extension header.

[0050] In some possible implementation manners, the apparatus can further include a determining unit. The determining unit is configured to determine that a path between the first network device and the access-side network device for carrying the service is faulty, if the response packet of the first network device is not received by the second network device within a preset time length.

[0051] In some possible implementation manners, the apparatus can further include a receiving unit and a determining unit. The receiving unit is configured to receive the response packet of the first network device by the second network device. The determining unit is configured to determine a path state of a path between the second network device and the access-side network device for carrying the service according to the response packet.

[0052] In some possible implementation manners, the apparatus can further include a switching unit. The switching unit is configured to switch the path for carrying the service to a path including the first network device to a third network device when it is determined that the path for carrying the service is faulty according to that no response message of the first network device to the first message is received within a preset time length, or when it is determined that the path for carrying the service is faulty or does not meet the path quality requirement according to the path state, and the third network device carries the service after the switching.

[0053] The third aspect provides an apparatus for implementing service path detection, which is configured to perform the related operations mentioned in the first aspect. The specific implementation manners and the effects achieved by the apparatus can be referred to the related description of the first aspect, which will not be repeated here.

[0054] In the fourth aspect, the embodiments of the present application further provide an apparatus for implementing service path detection. The apparatus is applied to a second network device and is applied to a network supporting SRv6. The apparatus can include a receiving unit and a detecting unit. The receiving unit is configured to receive a first message sent by a first network device. The first message includes a first indication and identification information of a service. The first indication is used to indicate that the first message is a detection message. The detecting unit is configured to detect at least one of a path between the first network device and the second network device carrying the service and a path between the second network device and an access-side network device carrying the service according to the first indication and the identification information of the service.

[0055] The identification information of the service can be carried in a first IPv6 header or a first IPv6 extension header of the first message. The first indication can be carried in the first IPv6 header or the first IPv6 extension header of the first message.

[0056] As an example, the first message includes a first IPv6 header, and the first indication is carried in a next header field in the first IPv6 header. Alternatively, the first message includes a first IPv6 extension header, and the first indication is carried in a next header field in a first segment routing extension header (SRH) of the first IPv6 extension header. The first IPv6 extension header of the first message further includes a reserved label and a control word. The reserved label and the control word are used to indicate detection information in a payload of the first message. The detection information is used to instruct the second network device to detect the path carrying the service according to the detection information.

[0057] As another example, the first packet includes the first IPv6 header, and the first indication is carried in a variable args field in a first destination address (DA) field of the first IPv6 header; or, the first packet includes the first IPv6 extension header, and the first indication is carried in an args field in a first DA field of a first Segment Routing Header (SRH) of the first IPv6 extension header.

[0058] As yet another example, the first packet includes the first IPv6 extension header, and the first indication is carried in a flags field in a Segment Routing Header (SRH) of the first IPv6 extension header.

[0059] As still another example, the first packet includes the first IPv6 extension header, and the first indication is carried in a Type Length Value (TLV) field in a Hop-by-Hop (HBH) option header of the first IPv6 extension header, or in a TLV field in a Destination Address (DA) option header of the first IPv6 extension header.

[0060] In some possible implementation ways, the receiving unit is further configured to receive a second packet sent by the first network device, the second packet being a service packet used to carry the service, and the second packet not including the first indication. The second packet can further include a second indication, the second indication being used to indicate that the second packet is a service packet, and the second indication being different from the first indication.

[0061] The second indication is different from the first indication, which can include that the second packet includes a second IPv6 header, the second indication is carried in a next header field in the second IPv6 header, the first indication is a first value of the next header field in the first IPv6 header, and the second indication is a second value of the next header field in the second IPv6 header; or the second packet includes a second IPv6 extension header, the second indication is carried in a next header field in a second SRH of the second IPv6 extension header, the first indication is a first value of the next header field in a first SRH of the first IPv6 extension header, and the second indication is a second value of the next header field in the second SRH; or the second packet includes a second IPv6 header, the second indication is carried in an args field in a second DA field of the second IPv6 header, the first indication is a third value of the args field in a first DA field of the first IPv6 header, and the second indication is a fourth value of the args field in the second DA field; or the second packet includes a second IPv6 extension header, the second indication is carried in an args field in a second DA field in a second SRH of the second IPv6 extension header, the first indication is a third value of the args field in a first DA field in a first SRH of the first IPv6 extension header, and the second indication is a fourth value of the args field in the second DA field in the second SRH; or the second packet includes a second IPv6 extension header, the second indication is carried in a flags field in an SRH of the second IPv6 extension header, the first indication is a fifth value of the flags field in an SRH of the first IPv6 extension header, and the second indication is a sixth value of the flags field in the SRH of the second IPv6 extension header.

[0062] In some possible implementation manners, the apparatus can further include a sending unit. The sending unit is configured to send a response packet to the first network device, so that the first network device determines, according to the response packet, that the path between the second network device and the access-side network device carrying the service is faulty. The response packet sent by the second network device can include interface state information of the second network device, and the interface state information is used to instruct the first network device to determine that the path between the second network device and the access-side network device carrying the service is faulty.

[0063] In some possible implementation manners, the detection unit can be specifically configured to determine that the first packet is a detection packet, and determine that local detection is supported according to the first indication, and then perform detection on a path carrying the service according to a local detection strategy.

[0064] The apparatus for implementing service path detection provided in the fourth aspect is used to perform the related operations mentioned in the second aspect, and the specific implementation manners and the effects achieved can be referred to the related description of the second aspect, which will not be repeated here.

[0065] In the apparatuses provided in the third aspect and the fourth aspect, the apparatus for implementing service path detection applied to the first network device can be an ingress PE device carrying the service, and the apparatus for implementing service path detection applied to the second network device can be an egress PE device carrying the service.

[0066] In the apparatuses provided in the third aspect and the fourth aspect, the service carried between the apparatuses for implementing service path detection can be an L2VPN service, and the L2VPN can include a service carried by a traditional VPN technology or an EVPN technology. Whether it is a traditional VPN service or an EVPN service, a VLL service model or a VPLS service model can be used for network deployment.

[0067] In the apparatuses provided in the third aspect and the fourth aspect, the first packet can be a BFD packet, or can also be an OAM packet.

[0068] In the fifth aspect, the present application further provides a network device, which includes a processor configured to enable the network device to implement the method provided in the first aspect or the second aspect. The network device can further include a memory coupled to the processor, and the processor can enable the network device to implement the method provided in the first aspect or the second aspect when executing instructions stored in the memory. The network device can further include a communication interface configured to enable the network device to communicate with other devices, for example, the communication interface can be a transceiver, a circuit, a bus, a module or other types of communication interfaces. The instructions in the memory can be pre-stored, or can be downloaded from the Internet and stored when the network device is used. The source of the instructions in the memory is not specifically limited in the present application.

[0069] In the sixth aspect, the present application further provides a network system, which includes a first network device and a second network device, wherein: the first network device is configured to implement the method provided in the first aspect; and the second network device is configured to implement the method provided in the second aspect.

[0070] In a seventh aspect, this application 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 is used to execute instructions corresponding to the methods provided in the first or second aspect.

[0071] Eighthly, this application provides a computer-readable storage medium storing program code or instructions that, when run on a computer, cause the computer to perform the methods provided in the first or second aspect above.

[0072] Ninthly, this application provides a computer program product, including a computer program that, when executed by a processor, implements the methods provided in the first or second aspect above. Attached Figure Description

[0073] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments recorded in this application. For those skilled in the art, other drawings can be obtained based on these drawings.

[0074] Figure 1 This is a schematic diagram of the structure of a network system 10 in an embodiment of this application;

[0075] Figure 2 This is a flowchart of a method 100 for implementing business path detection in an embodiment of this application;

[0076] Figure 3a This is a schematic diagram of the format of message 1 in an embodiment of this application;

[0077] Figure 3b This is a schematic diagram illustrating the format of another message 1 in an embodiment of this application;

[0078] Figure 3c In the embodiments of this application, and Figure 3a The format diagram of the corresponding message 2;

[0079] Figure 3d In the embodiments of this application, and Figure 3b The format diagram of the corresponding message 2;

[0080] Figure 4a This is a schematic diagram of the format of message 1 in an embodiment of this application;

[0081] Figure 4b This is a schematic diagram illustrating the format of another message 1 in an embodiment of this application;

[0082] Figure 4c In the embodiments of this application, andFigure 4a a corresponding message 2;

[0083] Figure 4d for a message 1 in an embodiment of the present application; Figure 4b a corresponding message 2;

[0084] Figure 5a for a message 1 in an embodiment of the present application;

[0085] Figure 5b for a message 1 in an embodiment of the present application; Figure 5a a corresponding message 2;

[0086] Figure 6a for a message 1 in an embodiment of the present application;

[0087] Figure 6b for a message 1 in an embodiment of the present application;

[0088] Figure 6c for a message 1 in an embodiment of the present application; Figure 6a a corresponding message 2;

[0089] Figure 6d for a message 1 in an embodiment of the present application; Figure 6b a corresponding message 2;

[0090] Figure 7 for a device 700 for implementing service path detection in an embodiment of the present application;

[0091] Figure 8 for a device 800 for implementing service path detection in an embodiment of the present application;

[0092] Figure 9 for a network device 900 in an embodiment of the present application;

[0093] Figure 10 for a network device 1000 in an embodiment of the present application;

[0094] Figure 11 for a network system 1100 in an embodiment of the present application. DETAILED DESCRIPTION

[0095] Currently, in the SRv6 network, only tunnel-level fault detection can be performed, and thus, only tunnel-level switching can be performed when it is detected that the tunnel has a fault. For example, in the SRv6 network, when a fault occurs in a tunnel, the network device at the fault location can only perform tunnel-level switching, and the network device at the fault location cannot perform service path-level switching. Figure 1The network system 10 shown can include a PE device 11, a PE device 12, a PE device 13, a customer edge (CE) device 21, a CE device 22, a provider (P) device 31, a P device 32, and a P device 33, wherein the PE device 11 is connected to the CE device 21, the PE device 11 is connected to the PE device 12 through the P device 31, the PE device 11 is connected to the PE device 13 through the P device 32 and the P device 33 respectively, and the PE device 12 and the PE device 13 are connected to the CE device 22. It is assumed that there is a tunnel 1 between the PE device 11 and the PE device 12, and a tunnel 2 between the PE device 11 and the PE device 13, and the tunnel 1 carries a service 1 and a service 2, the PE device 11 can detect the tunnel 1 failure through a tunnel detection packet, and thus the service 1 and the service 2 carried on the tunnel 1 are switched to the tunnel 2, that is, the traffic of the service 1 and the service 2 after switching is sent to the CE device 22 through the PE device 13.

[0096] However, the fault detection granularity of the tunnel level is too coarse, and once the fault is caused by a certain service, and other services carried on the tunnel can run normally, the fault detection method cannot accurately detect the service causing the path fault, and cannot accurately switch the forwarding path of the service causing the fault, but can only perform path switching at the tunnel level, thereby causing the user-side PE device to perform path switching on all services carried on the tunnel, that is, the path of the normally running service on the tunnel is also switched, wasting network resources. Moreover, in other path detection scenarios, service-level detection of path quality is also needed to understand the path quality of the path carrying the service, so as to provide better service.

[0097] Based on this, the embodiment of the present application provides a method for realizing service path detection. A first network device can generate and send a first packet including a first indication and identification information of a service to a second network device based on the sixth version of the Internet Protocol (IPv6), wherein the first indication is used to indicate that the first packet is a detection packet, and the identification information of the service is used to indicate the service. In this way, the second network device receiving the first packet can determine that the first packet is a detection packet according to the first indication in the first packet, and determine to detect a path carrying the service according to the identification information of the service in the first packet, for example, to detect a fault and / or quality of the path carrying the service. It can be seen that, by the method provided by the embodiment of the present application, the sender network device adds an indication and identification information of a service in the sent detection packet, so that the receiver network device can accurately determine that the received packet is a detection packet and perceive the corresponding service, thereby detecting the path carrying the service based on the detection packet, overcoming the problem that the current detection can only be implemented at the tunnel level between network devices, the granularity is relatively coarse and cannot meet the demand, and network resources are wasted, and meeting the demand for service-level path quality detection, realizing more fine-grained and more accurate service-level path detection, providing an accurate basis for service-level path switching, thereby providing a guarantee for the normal operation of services in the network.

[0098] Still taking Figure 1As shown in the network system 10, the path detection process provided by the embodiments of the present application may, for example, include the following steps. S11, the PE device 11 generates a message 41 based on IPv6, the message 41 includes an indication 51 and identification information of service 1, the indication 51 is used to indicate that the message 41 is a detection message, and the identification information of service 1 can be used to identify service 1, and then the message 41 is used to instruct the receiving device to detect the path carrying service 1; S12, the PE device 11 sends the message 41 to the PE device 12 through the P device 31; S13, after receiving the message 41, the PE device 12 can determine that the received message is a detection message based on the indication 51, and detect the path carrying service 1 according to the identification information of service 1 in the message 41; at this time, one case can execute the following S14a-S15a, and another case can execute the following S14b-S15b. S14a, the PE device 12 determines that the path carrying service 1 has a fault, and then does not respond to the message 41; S15a, the PE device 11 does not receive a response message of the message 41 within a preset time length (such as 1 second), and then determines that the path between the PE device 11 and the CE device 22 carrying service 1 has a fault. S14b, the PE device 12 determines the path state of service 1, and sends a response message of the message 41 to the PE device 11, the response message can include the determined path state of service 1, wherein the path state can include the path quality and / or path connectivity of the path between the PE device 12 and the access side network device (such as the CE device 22) carrying service 1, and the path state can also include the path quality and / or path connectivity of the path between the PE device 11 and the PE device 12 carrying service 1; S15b, the PE device 11 determines the path state of the path between the PE device 11 and the CE device 22 carrying service 1 according to the response message. Then, the following S16 can also be executed, that is, when it is determined according to S15a that the path between the PE device 11 and the CE device 22 carrying service 1 has a fault, or when it is determined according to S51b that the path state indicates that the path between the PE device 11 and the CE device 22 carrying service 1 has a fault or does not meet the path quality requirement, service 1 is switched to the path including the PE device 13, and after switching, service 1 is carried through the PE device 13, and service 2 is still carried through the PE device 12. In this way, more refined path detection and switching are realized, and the utilization of resources is more reasonable.

[0099] In one case, if the path carrying the service between the PE device 11 and the PE device 12 is reachable, the PE device 12 can receive the detection message sent by the PE device 11, and then the PE device 12 can send the path state of the path carrying the service 1 to the PE device 11 in a response message. The path state carried in the response message can include the path quality or path connectivity related information between the PE device 12 and the access side network device (such as the CE device 22) obtained by the PE device 12. In this way, the PE device 11 can perceive whether there is a fault in the path range carrying the service 1 between the PE device 12 and the access side network device or whether the path quality meets the requirement based on the response message. In another case, when the link or device between the PE device 11 and the PE device 12 is faulty and the PE device 12 is faulty, the PE device 12 can not receive the message 41. Therefore, the PE device 11 can determine that the path carrying the service 1 between the PE device 11 and the CE device 22 is faulty according to the fact that the response message sent by the PE device 12 is not received within a preset time length. In another case, when the PE device 12 determines that the path carrying the service 1 between the PE device 11 and the PE device 12 is faulty, the PE device 12 can also actively send a message to the PE device 11 through a certain backup path to inform the PE device 11 that the path carrying the service 1 is faulty, or to inform the PE device 11 that the path quality of the path carrying the service 1 does not meet the requirement, or to inform the PE device 11 of the state of the relevant interface, device or link on the path carrying the service 1, so that the PE device 11 determines whether the path carrying the service is faulty or does not meet the path quality requirement according to the state information received from the PE device 12.

[0100] In Figure 1 In the network system 10 shown in the figure, the PE devices can be directly connected; the PE devices can also be indirectly connected through one or more forwarding devices, wherein the forwarding devices include but are not limited to P devices.

[0101] It should be noted that the network device in the embodiments of the present application can refer to a router, a switch, a forwarder, a firewall and the like which can carry a service.

[0102] It should be noted that the method provided by the embodiments of the present application can be applied in an SRv6 network or other application scenarios as required, such as other derivative networks supporting IPv6 protocol operation.

[0103] It should be noted that the service mentioned in each embodiment in the present application can be a layer 2 virtual private network (L2VPN) service, and the L2VPN may, for example, include a service carried by a traditional VPN technology or an ethernet virtual private network (EVPN) technology. In the L2VPN, whether it is a traditional VPN service or an EVPN service, a virtual leased line (VLL) service model or a virtual private LAN service (VPLS) service model can be used for network deployment. The VLL is used to support a point-to-point service, and the VPLS is used to support a point-to-multipoint service or a multipoint-to-multipoint service. For example, the VLL service model is used to support a service between the PE device 11 and the PE device 12 and a service between the PE device 11 and the PE device 13, and the VPLS service model is used to support a service between the PE device 11 and the PE device 12 and a service between the PE device 11 and the PE device 13. Figure 1 As shown in the network system 10, if Figure 1 The network system 10 is a traditional VPN network, and no matter whether the VLL service model or the VPLS service model is used, the connection between the PE device 11 and the PE device 12 and the connection between the PE device 11 and the PE device 13 can be referred to as a pseudo wire (PW). Figure 1 As shown in the network system 10, if Figure 1 The network system 10 is an EVPN network, and for the VLL service model, the connection between the PE device 11 and the PE device 12 and the connection between the PE device 11 and the PE device 13 can be referred to as a virtual private wire service (VPWS) neighbor. The service type carried by the traditional VPN and the EVPN network can be the same, and the EVPN network can be implemented by a border gateway protocol (BGP), and the traditional VPN network can be implemented by at least one of a label distribution protocol (LDP), a BGP, and the like.

[0104] It should be noted that the detection packet mentioned in each embodiment of the present application can be used to detect the connectivity of the path carrying the service or the quality of the path carrying the service (such as the delay, packet loss and the like on the path). The detection packet may, for example, be a bidirectional forwarding detection (BFD) packet or an operation administration and maintenance (OAM) packet. For the case where the detection packet is a BFD packet, the method provided in the embodiments of the present application may, for example, support static BFD detection, dynamic BFD detection or seamless bidirectional forwarding detection (SBFD) detection. Detecting the path state of the service carrying the service may mean the connectivity of the path or the quality of the path. For the case where the detection packet is an OAM packet, the method provided in the embodiments of the present application may, for example, support connectivity fault management (CFM) detection, Y.1731 detection. The specific type of the detection packet and the supported detection type do not affect the implementation of the embodiments of the present application.

[0105] To facilitate understanding of the network fault detection method provided in the embodiments of the present application, the method will be described below in combination with the accompanying drawings.

[0106] Figure 2 A flowchart of a method 100 for implementing service path detection provided in the embodiments of the present application is shown. The method 100 can be applied to a network scenario including a first network device and a second network device. As an example, the first network device can be a tunnel ingress PE device carrying a target service to be detected, and the second network device can be a tunnel egress PE device carrying the target service. For the convenience of understanding, the structure of the network system 10 shown in the figure is taken as an example, and the interaction between the PE device 11 and the PE device 12 is described, and the target service to be detected is service 1 carried on the PE device 11 and the PE device 12. In specific implementation, the method 100 may, for example, include the following S101-S104: Figure 1

[0107] S101, the PE device 11 generates a packet 41 based on IPv6, the packet 41 including an indication 51 and identification information of the service 1, the indication 51 being used to indicate that the packet 41 is a detection packet.

[0108] ​In an implementation, in the SRv6 network, the PE device 11 can detect the packet by IPv6 encapsulation to obtain the packet 41, which can also be referred to as an IPv6 encapsulation-based detection packet. For example, assuming that the detection packet is a BFD packet, the packet 41 in S101 can be referred to as an IPv6 encapsulation-based BFD packet, and the BFD packet before encapsulation corresponds to the detection information in the packet 41 after encapsulation.

[0109] The identification information of the service 1 can be carried in the IPv6 header 1 of the packet 41 or in the IPv6 extension header 1', and is used to identify the service 1. For example, the identification information of the service 1 can be a VPN SID allocated by the PE device 12 to identify the service.

[0110] The indication 51 can be carried in the IPv6 header 1 of the packet 41 or in the IPv6 extension header 1'. The following exemplary describes the location of the indication 51 in the packet 41 in various cases.

[0111] As an example, for the best effort (BE) scenario of SRv6, the indication 51 can be carried in the next header field of the IPv6 header 1, for example, the next header field of the IPv6 header 1 in the packet 41 = 137, which is used to indicate that the packet 41 is a detection packet. In this example, the packet 41 can further include the IPv6 extension header 1', which can include an alert label and a control word. The alert label and the control word are used to indicate that the payload part of the packet 41 carries detection information, which is used to indicate that the PE device 12 performs fault detection or quality detection on the path carrying the service 1 according to the detection information. The alert label and the control word used to indicate the detection information can be that the values of the alert label and the control word determine that the content carried behind is the detection information, or that the values of the alert label and the control word determine that the content carried behind is the detection information and the type of the detection information can be determined, for example, the alert label = 13 and the control word can determine that the content carried behind is the detection information and the type of the detection information is BFD information. In addition, the indication 51 can also be considered to be carried in the next header field of the IPv6 header 1, the alert label in the IPv6 extension header 1', and the control word in the IPv6 extension header 1', that is, the next header field of the IPv6 header 1, the alert label in the IPv6 extension header 1', and the control word in the IPv6 extension header 1' collectively indicate that the packet 41 is a detection packet. For the format of the packet 41, refer to FIG. 2.Figure 3a As shown, the packet 41 can include an IPv6 header 1 and an IPv6 extension header 1', wherein the IPv6 header 1 can include a source address (SA) field, a destination address (DA) field and a next header field, the value of the SA field is the address of the PE device 11, for example, equal to the loopback address 1::1 of the PE device 11, the value of the DA field is the VPN segment identifier (SID) of the PE device 12, for example, equal to End.DX2 A3::1500:0 of the PE device 12, and the value of the next header field can be 137; the IPv6 extension header 1' can include an alert label and a control word, and the payload of the packet 41 can include an internet protocol (IP), a user datagram protocol (UDP) and detection information, wherein the alert label = 13 and the detection information is BFD information.

[0112] As another example, for the policy scenario of SRv6, the indication 51 can be carried in the next header field in the segment routing header (SRH) of the IPv6 extension header 1, for example, the next header field of the IPv6 extension header 1' in the packet 41 = 137, indicating that the packet 41 is a detection packet. In this example, the IPv6 extension header 1' can also include an alert label and a control word and detection information, wherein the alert label and the control word are used to indicate the detection information in the payload of the packet 41, and the detection information is used to indicate that the PE device 12 performs fault detection on the path carrying the service 1 according to the detection information. In addition, the indication 51 can also be considered to be carried in the next header field, the alert label and the control word in the SRH of the IPv6 extension header 1', which collectively indicate that the packet 41 is a detection packet. For the format of the packet 41, refer to Figure 3b As shown, the packet 41 can include an IPv6 header 1 and an IPv6 extension header 1', wherein the IPv6 header 1 can include a source address (SA) field, a destination address (DA) field and a next header field, the value of the SA field is the address of the PE device 11, for example, equal to the loopback address 1::1 of the PE device 11, the value of the DA field is the VPN segment identifier (SID) of the PE device 12, for example, equal to End.DX2 A3::1500:0 of the PE device 12, and the value of the next header field can be 137; the IPv6 extension header 1' can include an alert label and a control word, and the payload of the packet 41 can include an internet protocol (IP), a user datagram protocol (UDP) and detection information, wherein the alert label = 13 and the detection information is BFD information.

[0113] As another example, for the SRv6 BE scenario, the indication 51 can be carried in the DA field of the IPv6 header 1, e.g., in the args of the DA field of the IPv6 header 1, e.g., args = 3 in the DA field of the IPv6 header 1 in the packet 41, to indicate that the packet 41 is a detection packet. In this example, the detection information can be included in the payload of the packet 41. The format of the packet 41 is shown in FIG. 4B. Figure 4a As shown, the packet 41 can include the IPv6 header 1 and the payload, where the IPv6 header 1 can include the SA field and the DA field, the value of the SA field is the address of the PE device 11, e.g., equal to the loopback address 1 :: 1 of the PE device 11, and the value of the DA field is the VPN SID of the PE device 12, e.g., End.DX2 A3 :: 1500:3 (i.e., args = 3 in the DA field). The payload includes the detection information, which can be the BFD information. In other possible manners, the args in the VPN SID can also be set to other values, e.g., other positive integers other than 0.

[0114] As another example, for the SRv6 policy scenario, the indication 51 can be carried in the DA field of the SRH of the IPv6 extension header 1’, e.g., in the args of the DA field of the IPv6 extension header 1’, e.g., args = 3 in the DA field of the IPv6 extension header 1’ in the packet 41, to indicate that the packet 41 is a detection packet. In this example, the detection information can be included in the payload of the packet 41. The format of the packet 41 is shown in FIG. 4C. Figure 4b As shown, the packet 41 can include the IPv6 header 1, the IPv6 extension header 1’, and the payload, where the IPv6 header 1 can include the SA field and the DA field, the value of the SA field is the address of the PE device 11, e.g., equal to the loopback address 1 :: 1 of the PE device 11, and the value of the DA field is the VPN SID of the PE device 12, e.g., equal to End.DX2 A3 :: 1500:3 of the PE device 12; the IPv6 extension header 1’ can include the SRH, and the payload can include the IP, the UDP, and the detection information, where the args of the DA field of the SRH is 3, and the detection information can be the BFD information.

[0115] As another example, the indication 51 can be carried in a flags field in the SRH of the IPv6 extension header 1', for example, a certain flag = 1 in the SRH of the IPv6 extension header 1' in the packet 41, for indicating that the packet 41 is a detection packet, the flag carrying the indication 51 can be any bit in the undefined flags field, or the O-flag in the occupied flags can also be reused. In this example, the detection information can be included in the payload of the packet 41. The format of the packet 41 is shown in FIG. 4. Figure 5a As shown, the packet 41 can include an IPv6 header 1, an IPv6 extension header 1', and a payload, wherein the IPv6 header 1 can include an SA field and a DA field; the IPv6 extension header 1' can include an SRH, and the payload can include an IP, a UDP, and detection information, wherein a certain bit in the flags of the SRH can have a value of 1, and the detection information can be BFD information.

[0116] As another example, in one case, the indication 51 can be carried in a type length value (TLV) field in a hop by hop (HBH) option header of the IPv6 extension header 1', the TLV field being included in the HBH option header in the IPv6 extension header 1' for indicating that the packet 41 is a detection packet. The detection information can be included in the payload of the packet 41. The format of the packet 41 is shown in FIG. 5. Figure 6a As shown, the packet 41 can include an IPv6 header 1, an IPv6 extension header 1', and a payload, wherein the IPv6 header 1 can include an SA field and a DA field; the IPv6 extension header 1' can include an HBH option header, and the payload can include an IP, a UDP, and detection information, wherein the HBH option header includes a TLV field, and the detection information can be BFD information. In another case, the indication 51 can also be carried in a TLV field in a destination option header (DOH) of the IPv6 extension header 1', the TLV field being included in the DOH in the IPv6 extension header 1' for indicating that the packet 41 is a detection packet. The detection information can be included in the payload of the packet 41. The format of the packet 41 is shown in FIG. 6. Figure 6b As shown, the packet 41 can include an IPv6 header 1, an IPv6 extension header 1', and a payload, wherein the IPv6 header 1 can include an SA field and a DA field; the IPv6 extension header 1' can include an HBH option header, and the payload can include an IP, a UDP, and detection information, wherein the HBH option header includes a TLV field, and the detection information can be BFD information. In another case, the indication 51 can also be carried in a TLV field in a destination option header (DOH) of the IPv6 extension header 1', the TLV field being included in the DOH in the IPv6 extension header 1' for indicating that the packet 41 is a detection packet. The detection information can be included in the payload of the packet 41. The format of the packet 41 is shown in FIG. 6.

[0117] In the above examples, the message 41 is taken as an example of a BFD message for illustration. If the message 41 is an OAM message, the manner of carrying the indication 51 and the identification information of the service 1 can refer to the implementation of the above examples. In this case, the detection information in the payload of the message 41 can be OAM information, which can include, for example, the number of data packets sent by the PE device 11 to the PE device 12, a timestamp, and the like.

[0118] It should be noted that the above various messages 41 carrying the indication 51 are exemplary, and any other possible manner can be used to carry the indication 51 in the message 41.

[0119] S102, the PE device 11 sends the message 41 to the PE device 12.

[0120] In some possible implementation manners, if the link or the device passed through between the PE device 11 and the PE device 12 fails to successfully send the message 41 to the PE device 12, the PE device 12 cannot receive the message 41 sent by the PE device 11, and thus the PE device 11 cannot receive a response message sent by the PE device 12 within a preset time length, it can be determined that the path carrying the service 1 between the PE device 11 and the CE device 22 fails. The failure of the PE device 12 to successfully receive the message 41 can include a link failure between the PE device 11 and the P device 31, a link failure between the P device 31 and the PE device 12, a failure of the P device 31, or a failure of the PE device 12.

[0121] In other possible implementation manners, the PE device 12 can successfully receive the message 41, that is, the method 100 further includes S103-S104 after S102, and the detection can be implemented based on the method 100. For related implementation manners, refer to the following description.

[0122] S103, the PE device 12 receives the message 41 sent by the PE device 11.

[0123] In a specific implementation, when there is a demand for detecting the path carrying the service 1, S102 and S103 can be executed to implement corresponding detection; or, the path carrying the service 1 can be periodically detected, that is, S102-S103 are executed every period to implement corresponding detection, wherein the detection period can be flexibly set according to actual needs.

[0124] S104, the PE device 12 detects at least one of the path carrying the service 1 between the PE device 11 and the PE device 12 and the path carrying the service 1 between the PE device 12 and the CE device 22 according to the indication 51 and the identification information of the service 1.

[0125] In a specific implementation, after receiving the packet 41, the PE device 12 can detect the path carrying the service 1 according to the indication 51 in the packet 41 and the identification information of the service 1. On one hand, the PE device 12 can detect the path between the PE device 11 and the PE device 12 carrying the service 1, for example, detect whether the link between the PE device 12 and the P device 31 is faulty, or detect whether the interface of the PE device 12 connecting the P device 31 is faulty. On the other hand, the PE device 12 can also detect the path between the PE device 12 and the access side network device (such as the CE device 22) carrying the service 1, for example, detect whether the link between the PE device 12 and the CE device 22 is faulty, or detect whether the interface of the PE device 12 connecting the CE device 22 is faulty.

[0126] If the PE device 12 detects that the path carrying the service 1 has no fault or the quality of the path meets the requirement, the PE device 12 can reply a response packet to the PE device 11, and the response packet is used to inform the PE device 11 that the path carrying the service 1 is normal.

[0127] If the PE device 12 detects that the path carrying the service 1 has a fault or the quality of the path does not meet the requirement, the PE device 12 can not respond to the packet 41, or the PE device 12 can also send a response packet to the PE device 11 to announce the fault or the quality of the path not meeting the requirement.

[0128] As an example, after S104, when the PE device 12 determines that the path carrying the service 1 has a failure or the path quality does not meet the requirement, for example, the PE device 12 senses a failure of a local interface used to connect the CE device 22, a failure of a link connecting the PE device 12 and the CE device 22, or the path quality between the PE device 12 and the PE device 11 does not meet the requirement (e.g., the delay exceeds a preset delay threshold), the method can further include: the PE device 12 sends a response message to the PE device 11; and the PE device 11 receives the response message and determines, according to the response message, a path state of at least one of the path between the PE device 11 and the PE device 12 and the path between the PE device 12 and the CE device 22, the path state including connectivity and / or path quality of the corresponding path. The response message can include, but is not limited to, local state information of the PE device 12, state information of a link between the PE device 12 and an access-side network device, and state information of an interface of the PE device 12 connecting the access-side network device. In addition, the response message can further include state information of the path between the PE device 12 and the PE device 11 and state information of an interface of the PE device 12 connecting a network-side network device. The PE device 11 can determine, based on the response message, the path quality and the path connectivity of the path carrying the service 1. In addition, the PE device 11 can determine, according to the response message, the state of each path segment on the path carrying the service 1, such as the link quality or the specific failure location, for example, the PE device 12 and the PE device 31, the PE device 12 and the CE device 22, the interface of the PE device 12 connecting the PE device 31, or the interface of the PE device 12 connecting the CE device 22.

[0129] It should be noted that in a possible case, if the PE device 12 fails as a whole, the PE device 11 cannot receive the response message. In other possible cases, even if the PE device 12 determines that there is a failure associated with the path, the PE device 11 can still be informed of the existence of the failure through the response message. For example, assuming that the failure exists in the path between the PE device 11 and the PE device 12 carrying the service 1, the PE device 12 can select another reachable path to send the response message to the PE device 11 to inform the PE device 11 of the failure of the path carrying the service 1.

[0130] As another example, when the PE device 12 determines that the path carrying the service 1 has a fault or the path quality does not meet the requirement, the PE device 12 can not send a response message, which can include but is not limited to that the detection mechanism does not send a response message when it determines that there is a fault, or the PE device 12 cannot send a response message due to a link fault between the PE device 12 and the P device 31 or an interface fault of the PE device 12 used to connect the P device 31. The PE device 11 can be configured with a preset time length (e.g., 1 second), which can be the maximum allowed time for the PE device 11 to wait for receiving a response message after sending a detection message. Then, when the PE device 11 has elapsed the preset time length since sending the message 41, and still has not received a response message sent by the PE device 12 for the message 41, the PE device 11 can determine that the path carrying the service 1 between the PE device 11 and the CE device 22 has a fault or the path quality does not meet the requirement. The case that the path carrying the service 1 has a fault can include but is not limited to that the PE device 12 has a fault, the P device 31 has a fault, the CE device 22 has a fault, a link between the PE device 11 and the P device 31 has a fault, a link between the P device 31 and the PE device 12 has a fault, a link between the PE device 12 and the CE device 22 has a fault, an interface between the PE device 11 and the P device 31 has a fault, an interface between the P device 31 and the PE device 12 has a fault, an interface between the PE device 12 and the CE device 22 has a fault, or a device, a link or an interface in a user-side network connected to the PE device 12 has a fault.

[0131] In a possible implementation, if the message 41 is a BFD message, the PE device 11 sends the BFD message to the PE device 12, which can not only perceive whether the path carrying the service 1 between the PE device 11 and the PE device 12 has a fault, but also perceive whether the path carrying the service 1 between the PE device 12 and an access-side network device (e.g., the CE device 22) has a fault based on the identification information of the service 1 in the BFD message. In this way, the PE device 11 can perceive the connectivity of the entire path carrying the service 1 through the BFD message, and achieve the effect of service-level connectivity detection.

[0132] In another possible implementation, if the packet 41 is an OAM packet, the PE device 11 sends the OAM packet to the PE device 12, and the connectivity and quality of the path carrying the service 1 can be detected. Taking the detection of the quality of the path as an example, in one case, the process of the OAM packet for detecting the quality of the path may, for example, include that the PE device 11 sends the OAM packet to the PE device 12, and informs the PE device 11 of the statistical information (such as the number of sent data packets, a timestamp, and the like) of the service data packet sent by the PE device 11, the PE device 12 can determine the service 1 corresponding to the VPN to be detected according to the VPN SID carried in the OAM packet, and process the statistical result of the received data packet corresponding to the service 1 to be detected in the device obtained by the PE device 12 and the statistical information in the received OAM packet, to obtain the quality detection result of the path carrying the service 1 to be detected; then, the PE device 12 can generate and send an OAM response packet carrying the detection result to the PE device 11, to instruct the PE device 11 to obtain the quality detection result of the path carrying the service 1 to be detected from the received OAM response packet, and determine the quality of the path carrying the service to be detected. In another case, the process of the OAM packet for detecting the quality of the path may, for example, also include that the PE device 11 sends the OAM packet to the PE device 12, and informs the PE device 12 of the statistical information of the service data packet sent by the PE device 11, the PE device 12 can determine the service 1 corresponding to the VPN to be detected according to the VPN SID carried in the OAM packet, and send the statistical result of the received data packet corresponding to the service 1 to be detected obtained by the PE device 12 in the OAM packet for response to the PE device 11, so that the PE device 11 processes the received response OAM packet, obtains the quality detection result of the path carrying the service 1 to be detected, and determines the quality of the path carrying the service 1 to be detected. The above two cases take the one-way detection as an example, in other possible cases, the PE device 11 and the PE device 12 can also perform two-way detection on the path carrying the service, such as that the PE device 11 sends the OAM packet to the PE device 12, informs the PE device 11 of the statistical information of the service data packet sent by the PE device 11, and receives the response packet sent by the PE device 12, the response packet can be used to instruct the PE device 11 to perform statistics on the two-way path data packet of the service, and the response packet can also carry the statistical information of the data packet on the return path for the service. The PE device 11 can determine the two-way path quality detection result of the data packet for the service according to the response packet.Thus, as the detection packet, the response packet received by the PE device 11 can include at least one of the following three: a connectivity detection result of the path carrying the service 1 (i.e., whether at least one of the path between the PE device 11 and the PE device 12 carrying the service 1 and the path between the PE device 12 and the CE device 22 carrying the service 1 is faulty), a path quality detection result of the path carrying the service 1 (i.e., whether the path quality of at least one of the path between the PE device 11 and the PE device 12 carrying the service 1 and the path between the PE device 12 and the CE device 22 carrying the service 1 meets the requirement), and a statistical result of the path quality of the path carrying the service 1 (i.e., the path quality parameter of at least one of the path between the PE device 11 and the PE device 12 carrying the service 1 and the path between the PE device 12 and the CE device 22 carrying the service 1, which can be processed by the PE device 11 to obtain the path quality detection result of whether the path quality meets the requirement), where the path quality detection can refer to quality detection on a unidirectional path or quality detection on a bidirectional path.

[0133] In some possible implementation, S104 can include, for example, that the PE device 12 determines that the packet 41 is a detection packet and determines that the local supports detection according to the indication 51, and then performs fault detection on the path carrying the service 1 according to the local fault detection strategy. Wherein according to the local fault detection strategy, the packet 41 can be sent to the corresponding detection process for fault detection. For example, assuming that the packet 41 is a BFD detection packet, when the PE device 12 determines that the local supports BFD detection, the service-related content and detection information in the BFD detection packet are sent to the local BFD process for corresponding fault detection in the BFD process. For another example, assuming that the packet 41 is an OAM detection packet, when the PE device 12 determines that the local supports OAM detection, the service-related content and detection information in the OAM detection packet are sent to the local OAM instance for corresponding detection in the OAM instance.

[0134] Wherein, the local supports detection according to the indication 51 can refer to that the PE device is locally configured to enable the corresponding detection function indicated by the indication 51. Wherein, the service 1 can be a traditional VPN service 1 or an EVPN service 1. In one possible case, if the detection packet includes an SRH indicating tunnel information, the content sent to the detection process can be the content after the SRH is stripped from the detection packet.

[0135] As an example, if the packet 41 is as above Figure 5aAs shown, the PE device 12 can determine, after determining that the DA field of the packet 41 matches the local VPN SID, that the packet 41 is a detection packet according to the indication 51 of the packet 41, determine that the PE device 12 locally supports detection according to the indication 51, and that the PE device 12 is a device capable of perceiving the service 1 (for example, the PE device 12 is an egress PE device), and then send the service-related content and detection information in the packet 41 to the corresponding detection process for fault detection in the corresponding detection process.

[0136] As another example, if the packet 41 carries the indication 51 in the TLV field in the HBH option header of the IPv6 extension header 1' as shown above Figure 6a As shown, the PE device 12 can determine, after determining that the DA field of the packet 41 matches the local VPN SID, that the packet 41 is a detection packet according to the indication 51 of the packet 41, determine that the PE device 12 locally supports detection according to the indication 51, and that the PE device 12 is a device capable of perceiving the service 1 (for example, the PE device 12 is an egress PE device), and then send the service-related content and detection information in the packet 41 to the corresponding detection process for fault detection in the corresponding detection process.

[0137] As another example, if the packet 41 carries the indication 51 in the TLV field in the HBH option header of the IPv6 extension header 1' as shown above Figure 6b As shown, the PE device 12 can determine, after determining that the DA field of the packet 41 matches the local VPN SID, that the packet 41 is a detection packet according to the indication 51 of the packet 41, determine that the PE device 12 locally supports detection according to the indication 51, and that the PE device 12 is a device capable of perceiving the service 1 (for example, the PE device 12 is an egress PE device), and then send the service-related content and detection information in the packet 41 to the corresponding detection process for fault detection in the corresponding detection process.

[0138] In some possible implementations, the PE device 11 can also send the service packet corresponding to the service 1 to the PE device 12, for example, the method 100 can further include: S105, the PE device 11 sends a packet 42 to the PE device 12, the packet 42 is a service packet for carrying the service 1, and the packet 42 does not include the indication 51.

[0139] In one case, the packet 2 does not include the field carrying the indication 51, for example, the packet 41 carries the indication 51 through the TLV field in the HBH option header of the IPv6 extension header 1', and then, as shown in Figure 6b the corresponding TLV field is not included in the HBH option header. For another example, the packet 41 carries the indication 51 through the TLV field in the DOH of the IPv6 extension header 1', and then, as shown in Figure 6d the corresponding TLV field is not included in the DOH.

[0140] In another case, the message 42 includes a field carrying the indication 51, and the message 42 carries an indication 52 in the field carrying the indication 51, the indication 52 is used to indicate that the message 42 is a service message, and the indication 52 is different from the indication 51. As an example, the message 42 includes an IPv6 header 2, the indication 52 is carried in a next header field in the IPv6 header 2, the indication 51 is a first value of the next header field in the IPv6 header 1, and the indication 52 is a second value of the next header field in the IPv6 header 2, and the first value and the second value are different. For example, the next header field in the IPv6 header 1 in the message 41 = 137, and the corresponding message 42 is as shown in FIG. 2B, the next header field in the IPv6 header 2 in the message 42 = 143. Figure 3c As another example, the message 42 includes an IPv6 extension header 2', the indication 52 is carried in a next header field in an SRH of the IPv6 extension header 2', the indication 51 is a first value of the next header field in the SRH of the IPv6 extension header 1', and the indication 52 is a second value of the next header field in the SRH of the IPv6 extension header 2', and the first value and the second value are different. For example, the next header field in the SRH of the IPv6 extension header 1' in the message 41 = 137, and the corresponding message 42 is as shown in FIG. 2C, the next header field in the SRH of the IPv6 extension header 2' in the message 42 = 143. Figure 3d As another example, the message 42 includes an IPv6 extension header 2', the indication 52 is carried in a next header field in an SRH of the IPv6 extension header 2', the indication 51 is a first value of the next header field in the SRH of the IPv6 extension header 1', and the indication 52 is a second value of the next header field in the SRH of the IPv6 extension header 2', and the first value and the second value are different. For example, the next header field in the SRH of the IPv6 extension header 1' in the message 41 = 137, and the corresponding message 42 is as shown in FIG. 2C, the next header field in the SRH of the IPv6 extension header 2' in the message 42 = 143. Figure 3c Figure 3d In the above examples, the value of the next header field in the message 42 is taken as 143 as an example, and in actual application, the value of the next header field in the message 42 can also be different. Figure 3c Figure 3d As another example, the message 42 includes an IPv6 extension header 2', the indication 52 is carried in a next header field in an SRH of the IPv6 extension header 2', the indication 51 is a first value of the next header field in the SRH of the IPv6 extension header 1', and the indication 52 is a second value of the next header field in the SRH of the IPv6 extension header 2', and the first value and the second value are different. For example, the next header field in the SRH of the IPv6 extension header 1' in the message 41 = 137, and the corresponding message 42 is as shown in FIG. 2C, the next header field in the SRH of the IPv6 extension header 2' in the message 42 = 143. Figure 4c ​​As shown, the args field of the DA field in the SRH of the IPv6 extension header 2' in the packet 42 = 0. As another example, the packet 42 includes the IPv6 extension header 2', the indication 52 carries the args field of the DA field in the SRH of the IPv6 extension header 2', the indication 51 is a third value of the args field of the DA field in the SRH of the IPv6 extension header 1', and the indication 52 is a fourth value of the args field of the DA field in the SRH of the IPv6 extension header 2', the third value and the fourth value are different. For example, the args field of the DA field in the SRH of the IPv6 extension header 1' in the packet 41 = 3, and the packet 42 is as shown in FIG. 4B. Figure 4d As shown, the args field of the DA field in the SRH of the IPv6 extension header 2' in the packet 42 = 0. In the above Figure 4c and Figure 4d examples, the value of the DA field in the packet 42 is taken as 0 as an example, in actual application, the value of the DA field in the packet 42 can also be different. Figure 4c and Figure 4d As another example, the packet 42 includes the IPv6 extension header 2', the indication 52 carries the flag field in the SRH of the IPv6 extension header 2', the indication 51 is a fifth value of the flag field in the SRH of the IPv6 extension header 1', and the indication 52 is a sixth value of the flag field in the SRH of the IPv6 extension header 2', the fifth value and the sixth value are different. For example, the flag field of the SRH of the IPv6 extension header 1' in the packet 41 = 1, and the packet 42 is as shown in FIG. 4B. Figure 5b As shown, the flag field of the SRH of the IPv6 extension header 2' in the packet 42 = 0.

[0141] Thus, for the receiving PE device 12, the received packet can be identified as a detection packet or a service packet through analysis of the received packet, so as to perform corresponding processing. For example, the PE device 12 obtains the indication 51 through analysis of the received packet 41, determines that the packet 41 is a detection packet based on the indication 51, and performs the above S104; as another example, the PE device 12 determines that the packet 42 without the indication 51 is a service packet through analysis of the packet 42, and performs corresponding operations such as forwarding the service packet according to the processing rule of the service packet.

[0142] In some possible implementation manners, after the PE device 11 determines that at least one of the path carrying the service 1 between the PE device 11 and the PE device 12 and the path carrying the service 1 between the PE device 12 and the CE device 22 is faulty, to ensure normal operation of the service, the PE device 11 can further switch the path carrying the service 1 to a path including the PE device 11 and the PE device 13, and the PE device 13 carries the service 1 after the switching. Before the switching, the service message corresponding to the service 1 reaches the CE device 22 according to the PE device 11, the PE device 31, and the PE device 12, and after the switching, the service message corresponding to the service 1 reaches the CE device 22 according to the PE device 11, the PE device 32, the PE device 33, and the PE device 13, but no matter before or after the switching, the service message corresponding to the service 2 reaches the CE device 22 according to the PE device 11, the PE device 31, and the PE device 12, which overcomes the problem that in tunnel-level fault detection, all services (including the service 1 and the service 2) on the tunnel are switched after the fault is found, and the service 1 and the service 2 reach the CE device 22 according to the PE device 11, the PE device 31, and the PE device 12 after the switching, which wastes network resources, and improves the precision of service control.

[0143] It can be seen that, by means of the method 100 provided in the embodiments of the present application, the sender network device adds the indication and the identification information of the service in the sent detection message, so that the receiver network device can accurately distinguish whether the received message is a detection message or a service message, and when the receiver network device determines that the received message is a detection message, the receiver network device can determine the to-be-detected service based on the identification information of the service in the detection message, and then detect the path carrying the to-be-detected service, to realize more fine-grained and more accurate service-level fault detection, and provide an accurate basis for service-level switching, thereby providing a guarantee for normal operation of services in the network.

[0144] Based on the above method embodiments, the embodiments of the present application provide a device for implementing service path detection, which will be described below with reference to the accompanying drawings.

[0145] Figure 7 FIG. 7 shows a structure diagram of a device 700 for implementing service path detection provided in the embodiments of the present application, and the device 700 is applied to a first network device, for example, can perform the functions of the PE device 11 in the embodiments shown in FIG. 1. Figure 1 The device 700 can include a generating unit 701 and a sending unit 702.

[0146] The generating unit 701 is configured to generate a first message based on the sixth version of the Internet Protocol (IPv6), and the first message includes a first indication and identification information of a service, and the first indication is used to indicate that the first message is a detection message.

[0147] When the apparatus 700 is applied to the PE device 11 shown in Figure 1 The specific implementation of the generating unit 701 generating the first packet can refer to S101 in the embodiment. Figure 2

[0148] The sending unit 702 is configured to send the first packet to a second network device, so that the second network device receiving the first packet detects at least one of a path between the first network device and the second network device carrying the service and a path between the second network device and an access-side network device carrying the service according to the first indication and the identification information of the service.

[0149] When the apparatus 700 is applied to the PE device 11 shown in Figure 1 The specific implementation of the sending unit 702 sending the first packet can refer to S102 in the embodiment. Figure 2

[0150] The identification information of the service can be carried in a first IPv6 header or a first IPv6 extension header of the first packet.The first indication can be carried in the first IPv6 header or the first IPv6 extension header of the first packet.

[0151] As an example, the first packet includes the first IPv6 header, and the first indication is carried in a next header field in the first IPv6 header; or the first packet includes the first IPv6 extension header, and the first indication is carried in a next header field in a first Segment Routing Header (SRH) of the first IPv6 extension header. The first IPv6 extension header of the first packet further includes a reserved label and a control word, and the reserved label and the control word are used to indicate detection information in a payload of the first packet. The detection information is used to indicate that the second network device detects the path of the service according to the detection information.

[0152] As another example, the first packet includes the first IPv6 header, and the first indication is carried in a variable args field in a first Destination Address (DA) field of the first IPv6 header; or the first packet includes the first IPv6 extension header, and the first indication is carried in an args field in a first DA field of a first SRH of the first IPv6 extension header.

[0153] As yet another example, the first packet includes the first IPv6 extension header, and the first indication is carried in a flags field in the SRH of the first IPv6 extension header.

[0154] ​As a further example, the first packet includes the first IPv6 extension header, the first indication is carried in a Type Length Value, TLV, field in a Hop-by-Hop, HBH, option header of the first IPv6 extension header, or is carried in a TLV field in a Destination Address Option Header, DOH, of the first IPv6 extension header.

[0155] In some possible implementation, the sending unit 702 is further configured to send a second packet to the second network device, the second packet being a service packet used to carry the service, and the second packet not including the first indication.

[0156] When the apparatus 700 is applied to the PE device 11 as shown in Figure 1 the specific implementation of the sending unit 702 sending the second packet can refer to S105 in the embodiments. Figure 2

[0157] The second packet can further include a second indication, the second indication being used to indicate that the second packet is a service packet, and the second indication being different from the first indication.

[0158] ​The second indication is different from the first indication, which can include that the second packet includes a second IPv6 header, the second indication is carried in a next header field in the second IPv6 header, the first indication is a first value of the next header field in the first IPv6 header, and the second indication is a second value of the next header field in the second IPv6 header; or the second packet includes a second IPv6 extension header, the second indication is carried in a next header field in a second SRH of the second IPv6 extension header, the first indication is a first value of the next header field in a first SRH of the first IPv6 extension header, and the second indication is a second value of the next header field in the second SRH; or the second packet includes a second IPv6 header, the second indication is carried in an args field in a second DA field of the second IPv6 header, the first indication is a third value of the args field in a first DA field of the first IPv6 header, and the second indication is a fourth value of the args field in the second DA field; or the second packet includes a second IPv6 extension header, the second indication is carried in an args field in a second DA field in a second SRH of the second IPv6 extension header, the first indication is a third value of the args field in a first DA field in a first SRH of the first IPv6 extension header, and the second indication is a fourth value of the args field in the second DA field in the second SRH; or the second packet includes a second IPv6 extension header, the second indication is carried in a flags field in an SRH of the second IPv6 extension header, the first indication is a fifth value of the flags field in an SRH of the first IPv6 extension header, and the second indication is a sixth value of the flags field in the SRH of the second IPv6 extension header.

[0159] In some possible implementation manners, the apparatus 700 can further include a determining unit. The determining unit is configured to determine that a path between the first network device and the access-side network device for carrying the service is faulty, when a response packet of the first network device to the first packet is not received within a preset time length.

[0160] In some possible implementations, the device 700 may further include a receiving unit and a determining unit. The receiving unit is configured to receive a response message from the second network device to the first message; the determining unit is configured to determine, based on the response message, the path status of at least one of the paths used to carry the service between the first network device and the second network device, and the path used to carry the service between the second network device and the access-side network device. The path status includes at least one of path connectivity and path quality.

[0161] In some possible implementations, the device 700 may further include a switching unit. This switching unit is configured to, based on whether a response message from the second network device to the first message is received within a preset time period, indicate that the path used to carry the service is faulty; or, based on the path status, indicate that the path used to carry the service is faulty or does not meet path quality requirements, switch the path used to carry the service to a path including the first network device to the third network device, after which the third network device carries the service.

[0162] For details regarding the specific executable functions and implementation of the device 700 for business path detection, please refer to [link / reference needed]. Figure 2 The corresponding description of the PE device 11 in the illustrated embodiment will not be repeated here.

[0163] Furthermore, embodiments of this application also provide an apparatus 800 for implementing business path detection, such as... Figure 8 As shown, the device 800 is applied to a second network device, for example, it can perform... Figure 1 The PE device 12 in the illustrated embodiment has the following functions. The device 800 may include a receiving unit 801 and a detection unit 802.

[0164] The receiving unit 801 is used to receive a first message sent by the first network device. The first message includes a first indication and service identification information. The first indication is used to indicate that the first message is a detection message.

[0165] When device 800 is applied Figure 1 When the PE device 12 is shown, the specific implementation of the receiving unit 801 receiving the first message can be found in [reference needed]. Figure 2 S103 in the embodiment described above.

[0166] The detection unit 802 is configured to detect at least one of the paths carrying the service between the first network device and the second network device, and the paths carrying the service between the second network device and the access-side network device, based on the first instruction and the service identification information.

[0167] When device 800 is appliedFigure 1 The specific implementation of the detection of the path carrying the service by the detection unit 802 when the PE device 12 is shown in FIG. 8 can refer to Figure 2 S104 in the embodiment.

[0168] The identification information of the service can be carried in the first IPv6 header or the first IPv6 extension header of the first packet. The first indication can be carried in the first IPv6 header or the first IPv6 extension header of the first packet.

[0169] As an example, the first packet includes the first IPv6 header, and the first indication is carried in a next header field in the first IPv6 header; or the first packet includes the first IPv6 extension header, and the first indication is carried in a next header field in a first segment routing header (SRH) of the first IPv6 extension header. The first IPv6 extension header of the first packet further includes a reserved label and a control word, and the reserved label and the control word are used to indicate detection information in a payload of the first packet. The detection information is used to indicate that the second network device detects a path carrying the service according to the detection information.

[0170] As another example, the first packet includes the first IPv6 header, and the first indication is carried in a variable args field in a first destination address (DA) field of the first IPv6 header; or the first packet includes the first IPv6 extension header, and the first indication is carried in an args field in a first DA field of a first SRH of the first IPv6 extension header.

[0171] As yet another example, the first packet includes the first IPv6 extension header, and the first indication is carried in a flags field in the SRH of the first IPv6 extension header.

[0172] As still another example, the first packet includes the first IPv6 extension header, and the first indication is carried in a type-length-value (TLV) field in a hop-by-hop (HBH) option header of the first IPv6 extension header, or carried in a TLV field in a destination address option header (DOH) of the first IPv6 extension header.

[0173] In some possible implementation ways, the receiving unit 801 is further configured to receive a second packet sent by the first network device, the second packet being a service packet used to carry the service, and the second packet not including the first indication. When the apparatus 800 is applied to Figure 1 The specific implementation of the receiving unit 801 receiving the second packet when the PE device 12 is shown in FIG. 8 can refer to Figure 2S105 in the embodiment.

[0174] The second message can further include a second indication, the second indication being used to indicate that the second message is a service message, and the second indication being different from the first indication.

[0175] The second indication being different from the first indication can include that: the second message includes a second IPv6 header, the second indication being carried in a next header field in the second IPv6 header, the first indication being a first value of the next header field in the first IPv6 header, and the second indication being a second value of the next header field in the second IPv6 header; or the second message includes a second IPv6 extension header, the second indication being carried in a next header field in a second SRH of the second IPv6 extension header, the first indication being a first value of the next header field in a first SRH of the first IPv6 extension header, and the second indication being a second value of the next header field in the second SRH; or the second message includes a second IPv6 header, the second indication being carried in an args field in a second DA field of the second IPv6 header, the first indication being a third value of the args field in a first DA field of the first IPv6 header, and the second indication being a fourth value of the args field in the second DA field; or the second message includes a second IPv6 extension header, the second indication being carried in an args field in a second DA field in a second SRH of the second IPv6 extension header, the first indication being a third value of the args field in a first DA field in a first SRH of the first IPv6 extension header, and the second indication being a fourth value of the args field in the second DA field in the second SRH; or the second message includes a second IPv6 extension header, the second indication being carried in a flags field in an SRH of the second IPv6 extension header, the first indication being a fifth value of the flags field in an SRH of the first IPv6 extension header, and the second indication being a sixth value of the flags field in the SRH of the second IPv6 extension header.

[0176] In some possible implementation manners, the apparatus 800 can further include a sending unit. The sending unit is configured to send a response message to the first network device, so as to instruct the first network device to determine at least one path state in a path between the first network device and the second network device and a path between the second network device and an access-side network device that carries the service according to the response message, wherein the path state includes at least one of path connectivity and path quality. The response message sent by the second network device includes interface state information of the second network device, and the interface state information is used to instruct the first network device to determine whether the path between the second network device and the access-side network device that carries the service is faulty or has good or bad path quality.

[0177] In some possible implementation manners, the detecting unit 802 can be specifically configured to determine that the first message is a detection message, and determine that local detection is supported according to the first indication, and then perform detection on the path carrying the service according to a local detection strategy.

[0178] For the functions and implementation of the apparatus 800 for implementing service path detection, reference can be made to the corresponding description of the PE device 12 in the embodiments shown in Figure 2 The apparatus 800 for implementing service path detection can be any one of the PE devices in the embodiments shown in

[0179] The apparatus 700 for implementing service path detection can be an ingress PE device carrying the service, and the apparatus 800 for implementing service path detection can be an egress PE device carrying the service.

[0180] The service carried between the apparatus 700 for implementing service path detection and the apparatus 800 for implementing service path detection can be an L2VPN service, which can include a service carried by a traditional VPN technology or an EVPN technology. Whether the service is a traditional VPN service or an EVPN service, a VLL service model or a VPLS service model can be used.

[0181] In the apparatus 700 for implementing service path detection and the apparatus 800 for implementing service path detection, the first message can be a BFD message, or can also be an OAM message.

[0182] Figure 9 FIG. 9 is a structural schematic diagram of a network device 900 provided by an embodiment of the present application, which can be any one of the PE devices in the embodiments shown in Figure 1 or can be the apparatus for implementing service path detection in the embodiments shown in Figure 7 or Figure 8 The apparatus for implementing service path detection in the embodiments shown in

[0183] Please refer toFigure 9 As shown in FIG. 9, the network device 900 includes a processor 910, a communication interface 920, and a memory 930. The number of processors 910 in the network device 900 can be one or more. Figure 9 In an embodiment, the processor 910, the communication interface 920, and the memory 930 are connected through a bus system or other means. In an embodiment, the processor 910, the communication interface 920, and the memory 930 are connected through the bus system 940. Figure 9 In an embodiment, the processor 910, the communication interface 920, and the memory 930 are connected through the bus system 940.

[0184] The processor 910 can be a CPU, an NP, or a combination of the CPU and the NP. The processor 910 can further include a hardware chip. The hardware chip can be an application-specific integrated circuit (ASIC), a programmable logic device (PLD), or a combination thereof. The PLD can be a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), or any combination thereof.

[0185] When the network device 900 includes a first network device, the processor 910 can perform the functions of generating a first packet including a first indication and identification information of a service, sending the first packet to a second network device, and the like in the above method embodiments. When the network device 900 is a second network device, the processor 910 can perform the functions of receiving a first packet including a first indication and identification information of a service from a first network device, detecting a path carrying the service according to the first indication and the identification information of the service, and the like in the above method embodiments.

[0186] The communication interface 920 is configured to receive and send packets. Specifically, the communication interface 920 can include a receiving interface and a sending interface. The receiving interface can be configured to receive packets, and the sending interface can be configured to send packets. The number of communication interfaces 920 can be one or more. As a possible implementation, the communication interface 920 can be configured to implement the functions of the sending unit 702 or the receiving unit 801 shown in FIG. 7. Figure 7 The communication interface 920 is configured to receive and send packets. Specifically, the communication interface 920 can include a receiving interface and a sending interface. The receiving interface can be configured to receive packets, and the sending interface can be configured to send packets. The number of communication interfaces 920 can be one or more. As a possible implementation, the communication interface 920 can be configured to implement the functions of the sending unit 702 or the receiving unit 801 shown in FIG. 7. Figure 8 The communication interface 920 is configured to receive and send packets. Specifically, the communication interface 920 can include a receiving interface and a sending interface. The receiving interface can be configured to receive packets, and the sending interface can be configured to send packets. The number of communication interfaces 920 can be one or more. As a possible implementation, the communication interface 920 can be configured to implement the functions of the sending unit 702 or the receiving unit 801 shown in FIG. 7.

[0187] The memory 930 can include a volatile memory (e.g., a random-access memory (RAM)) and / or can include a non-volatile memory (e.g., a flash memory, a hard disk drive (HDD), or a solid-state drive (SSD)). The memory 930 can also include a combination of the above-mentioned types of memories. The memory 930 can store, for example, the identification information of the service mentioned above.

[0188] Optionally, the memory 930 stores an operating system and programs, executable modules or data structures, or a subset thereof, or an extended set thereof, where the programs can include various operation instructions for implementing various operations. The operating system can include various system programs for implementing various basic services and processing hardware-based tasks. The processor 910 can read the programs in the memory 930 to implement the method for detecting a service path provided by the embodiments of the present application. As a possible implementation, the memory 930 can store program codes for implementing the functions of the generating unit 701 or the detecting unit 802 shown in the embodiments. Figure 7 Figure 8 The program codes for implementing the functions of the generating unit 701 or the detecting unit 802 shown in the embodiments.

[0189] The memory 930 can be a storage device in the network device 900, or can be a storage device independent of the network device 900.

[0190] The bus system 940 can be a peripheral component interconnect (PCI) bus, an extended industry standard architecture (EISA) bus, or the like. The bus system 940 can be divided into an address bus, a data bus, a control bus, and the like. For ease of representation, Figure 9 Only one thick line is used to represent the bus system 940 in the drawings, but it does not mean that there is only one bus or only one type of bus.

[0191] Figure 10 FIG. 10 is a structural schematic diagram of another network device 1000 provided by the embodiments of the present application. The network device 1000 can be configured as any one of the PE devices in the embodiments shown in the foregoing Figure 1 or can be a device implementation of the apparatus for detecting a service path in the embodiments shown in Figure 7 or Figure 8 the embodiments.

[0192] ​The network device 1000 comprises a main board 1010 and an interface board 1030.

[0193] The main board 1010 is also called a main processing unit (MPU) or a route processor card. The main board 1010 controls and manages various components in the network device 1000, including route calculation, device management, device maintenance, and protocol processing functions. The main board 1010 comprises a central processor 1011 and a memory 1012.

[0194] The interface board 1030 is also called a line processing unit (LPU), a line card, or a service board. The interface board 1030 is used to provide various service interfaces and implement data packet forwarding. The service interfaces include, but are not limited to, Ethernet interfaces, POS (Packet over SONET / SDH) interfaces, and the like. The Ethernet interface is, for example, a Flexible Ethernet Client (FlexE Client). The interface board 1030 comprises a central processor 1031, a network processor 1032, a forwarding table item memory 1034, and a physical interface card (PIC) 1033.

[0195] The central processor 1031 on the interface board 1030 is used to control and manage the interface board 1030 and communicate with the central processor 1011 on the main board 1010.

[0196] The network processor 1032 is used to implement message forwarding processing. The network processor 832 can be in the form of a forwarding chip. Specifically, the processing of uplink messages includes message entry interface processing and forwarding table lookup. The processing of downlink messages includes forwarding table lookup and the like.

[0197] The physical interface card 1033 is used to implement physical layer interfacing functions. Raw traffic enters the interface board 1030 through the physical interface card 1033, and processed messages are sent from the physical interface card 1033. The physical interface card 1033 comprises at least one physical interface, also called a physical port. The physical interface card 1033 can also be called a daughter card and can be installed on the interface board 1030. The physical interface card 1033 is responsible for converting optical and electrical signals into messages and forwarding the messages to the network processor 1032 for processing after performing legality checks. In some embodiments, the central processor 1031 of the interface board 1030 can also perform the functions of the network processor 1032, such as implementing software forwarding based on a general-purpose CPU, so that the network processor 1032 is not needed in the physical interface card 1033.

[0198] Optionally, the network device 1000 includes multiple interface boards, for example, the network device 1000 further includes an interface board 1040, the interface board 1040 includes: a central processor 1041, a network processor 1042, a forwarding table item storage 1044 and a physical interface card 1043.

[0199] Optionally, the network device 1000 further includes a switch fabric board 1020. The switch fabric board 1020 can also be referred to as a switch fabric unit (SFU). In the case that the network device has multiple interface boards 1030, the switch fabric board 1020 is used to complete data exchange between the interface boards. For example, the interface board 1030 and the interface board 1040 can communicate through the switch fabric board 1020.

[0200] The main control board 1010 and the interface board 1030 are coupled. For example, the main control board 1010, the interface board 1030 and the interface board 1040, and the switch fabric board 1020 are connected through a system bus and a system backboard to realize intercommunication. In a possible implementation manner, an inter-process communication (IPC) channel is established between the main control board 1010 and the interface board 1030, and the main control board 1010 and the interface board 1030 communicate through the IPC channel.

[0201] In logic, the network device 1000 includes a control plane and a forwarding plane, the control plane includes the main control board 1010 and the central processor 1031, and the forwarding plane includes components performing forwarding, such as the forwarding table item storage 1034, the physical interface card 1033 and the network processor 1032. The control plane performs functions such as generating a forwarding table, processing signaling and protocol packets, configuring and maintaining a state of the device, and the like, and the control plane delivers the generated forwarding table to the forwarding plane, in the forwarding plane, the network processor 1032 performs table lookup and forwarding on a packet received by the physical interface card 1033 based on the forwarding table delivered by the control plane. The forwarding table delivered by the control plane can be stored in the forwarding table item storage 1034. In some embodiments, the control plane and the forwarding plane can be completely separated and not on the same device.

[0202] If the network device 1000 is configured as a first network device, the central processor 1011 can generate a first packet including a first indication and identification information of the service. The network processor 1032 can trigger the physical interface card 1033 to send the first packet to a second network device.

[0203] If the network device 1000 is configured as the second network device, the central processor 1011 can receive a first packet including a first indication and identification information of the service from the first network device, and detect a path carrying the service according to the first indication and the identification information of the service. The network processor 1032 can trigger the physical interface card 1033 to send a response packet to the first network device.

[0204] It should be understood that the sending unit 702 and the like in the apparatus 700 for detecting a service path can be equivalent to the physical interface card 1033 or the physical interface card 1043 in the network device 1000; the generating unit 701 and the like in the apparatus 700 for detecting a service path can be equivalent to the central processor 1011 or the central processor 1031 in the network device 1000. The receiving unit 801 and the like in the apparatus 800 for detecting a service path can be equivalent to the physical interface card 1033 or the physical interface card 1043 in the network device 1000; the detecting unit 802 and the like in the apparatus 800 for detecting a service path can be equivalent to the central processor 1011 or the central processor 1031 in the network device 1000.

[0205] It should be understood that the operations on the interface board 1040 in the embodiments of the present application are consistent with the operations of the interface board 1030, and for the sake of brevity, will not be described herein. It should be understood that the network device 1000 in the embodiments of the present application can correspond to any one of the nodes in the various method embodiments described above, and the main control board 1010, the interface board 1030 and / or the interface board 1040 in the network device 1000 can implement the functions and / or various steps implemented by any one of the nodes in the various method embodiments described above. For the sake of brevity, the details will not be described herein.

[0206] It should be understood that the master board can have one or more, and when there are multiple, it can include a master master board and a standby master board. The interface board can have one or more, and the stronger the data processing capability of the network device, the more interface boards it provides. The physical interface card on the interface board can also have one or more. The switching network board can have none or one or more, and when there are multiple, they can jointly implement load sharing and redundancy. Under the centralized forwarding architecture, the network device can not need a switching network board, and the interface board undertakes the processing function of the entire system of service data. Under the distributed forwarding architecture, the network device can have at least one switching network board, and the data exchange between multiple interface boards is realized through the switching network board, and a large-capacity data exchange and processing capability is provided. Therefore, the data access and processing capability of the network device of the distributed architecture is greater than that of the device of the centralized architecture. Alternatively, the form of the network device can also be only one board card, that is, the functions of the interface board and the master control board are integrated on the one board card, at this time the central processor on the interface board and the central processor on the master control board can be combined into one central processor on the one board card, and execute the functions of the two superpositions. The data exchange and processing capability of such a form of device is relatively low (for example, low-end switches or routers and other network devices). Which architecture to use depends on the specific networking deployment scenario.

[0207] In some possible embodiments, each node described above can be implemented as a virtualized device. For example, the virtualized device can be a virtual machine (VM) running a program for sending a packet, and the virtual machine is deployed on a hardware device (for example, a physical server). The virtual machine refers to a complete computer system running in a completely isolated environment by software simulation and having complete hardware system functions. The virtual machine can be configured as each node. For example, each node can be implemented based on a general-purpose physical server combined with network function virtualization (NFV) technology. Each node is a virtual host, a virtual router, or a virtual switch. Those skilled in the art can virtualize each node having the above functions on a general-purpose physical server by reading this application in combination with the NFV technology, and details are not described here.

[0208] It should be understood that the network devices in the above various product forms each have any function of each node in the method embodiments described above, and details are not described here.

[0209] Embodiments of the present application also provide a network system 1100, as shown in Figure 11 The network system 1100 can include a first network device 1101 and a second network device 1102. The first network device 1101 can be a PE device 11, Figure 1 as shown in Figure 7The apparatus 700 for implementing service path detection shown, Figure 9 The network device 900 configured as the first network device shown, Figure 10 The network device 1000 configured as the first network device shown; the second network device 1102 can be Figure 1 The PE device 12 shown, Figure 8 The apparatus 800 for implementing service path detection shown, Figure 9 The network device 900 configured as the second network device shown, Figure 10 The network device 1000 configured as the second network device shown.

[0210] The chip provided by the embodiment of the present application comprises a processor and an interface circuit, the interface circuit is used for receiving an instruction and transmitting the instruction to the processor; the processor can be, for example, Figure 7 The apparatus 700 for implementing service path detection shown can be used to execute the above method; and the apparatus can also be, for example, Figure 8 The apparatus 800 for implementing service path detection shown can be used to execute the above method. The processor is coupled with the memory, and the memory is used for storing a program or an instruction, when the program or the instruction is executed by the processor, the chip system implements the method in any method embodiment.

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

[0212] Optionally, the memory in the chip system can also be one or more. The memory can be integrated with the processor or arranged separately from the processor, which is not limited in the present application. For example, the memory can be a non-transient processor, for example, a read-only memory (ROM), which can be integrated on the same chip as the processor or arranged on different chips respectively, and the type of the memory and the arrangement manner of the memory and the processor are not limited in the present application.

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

[0214] The embodiment of the present application further provides a computer readable storage medium, including instructions or a computer program, when the instructions or the computer program are executed on a computer, the computer is caused to execute the method for detecting a service path provided in the above embodiment.

[0215] The embodiment of the present application further provides a computer program product including instructions or a computer program, when the instructions or the computer program are executed on a computer, the computer is caused to execute the method for detecting a service path provided in the above embodiment.

[0216] The terms "first", "second", "third", "fourth" and the like in the description and claims of the present application and above-mentioned drawings (if any) are used to distinguish similar objects, and do not necessarily have to be used to describe a particular order or sequence. It should be understood that the data used in this way can be interchanged under appropriate circumstances, so that the embodiments described herein can be implemented in an order other than that illustrated or described herein. In addition, the terms "comprise" and "have" and any variations thereof are intended to cover non-exclusive inclusion, for example, a process, method, system, product or device comprising a series of steps or units does not have to be limited to those steps or units clearly listed, but can include other steps or units not clearly listed or inherent to these processes, methods, products or devices.

[0217] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the above-described system, device and unit can refer to the corresponding process in the foregoing method embodiment, which will not be described here.

[0218] In several embodiments provided in the present application, it should be understood that the disclosed system, device and method can be implemented in other manners. For example, the division of the above-described device embodiments is merely a logical division, and there can be other division manners in actual implementation. For example, a plurality of units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the displayed or discussed coupling or direct coupling or communication connection between units can be indirect coupling or communication connection through some interface, device or unit, and can be electrical, mechanical or in other forms.

[0219] The units described as separated components can or can not be physically separated, and the components displayed as units can or can not be physical units, i.e., can be located in one place, or can be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purposes of the embodiments.

[0220] In addition, each service unit in each embodiment of the present application can be integrated in one processing unit, or each unit can be physically present alone, or two or more units can be integrated in one unit. The integrated unit can be realized in the form of hardware or in the form of a software service unit.

[0221] If the integrated unit is realized in the form of a software service unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solutions of the present application or the essential part or all or part of the technical solutions that make contributions to the prior art can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes a plurality of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the embodiments of the present application. The aforementioned storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and various program code storage media.

[0222] Those skilled in the art should understand that, in one or more examples described above, the described services of the present application can be implemented in hardware, software, firmware, or any combination thereof. When implemented in software, the services can be stored in or transmitted as one or more instructions or code on a computer-readable medium. Computer-readable media include both computer storage media and communication media including any medium that facilitates transfer of a computer program from one place to another.

[0223] The above detailed description sets forth the purposes, technical solutions, and beneficial effects of the present application. It should be understood that the above is merely a specific implementation of the present application.

[0224] The above examples are merely used to illustrate the technical solutions of the present application, and are not intended to limit the present application; although the present application has been described in detail with reference to the foregoing examples, those skilled in the art should understand that the technical solutions recorded in the foregoing examples can still be modified, or some technical features can be replaced by equivalents; and these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.

Claims

1. A method of implementing service path detection, the method comprising: The method is applied to a network supporting segment routing based on the sixth version of the Internet Protocol (SRv6), and the method comprises: The first network device sends a first message to the second network device through a path between the first network device and the second network device, the first message being a BFD message, the first message comprising a first indication and identification information of a service, the first indication being used to indicate that the first message is a detection message, and the path between the first network device and the second network device being used to carry the service, the service being a service carried by an EVPN technology. The first network device determines that the path between the first network device and the second network device has a fault according to that no BFD message sent by the second network device is received within a preset time length.

2. The method of claim 1, wherein, The EVPN service is implemented through a VPLS service or a VPWS.

3. The method according to claim 1 or 2, characterized in that, The path between the first network device and the second network device is a pseudo-wire (PW).

4. The method according to claim 1 or 2, characterized in that, The identification information of the service is a virtual private network segment identifier (VPN SID).

5. The method according to claim 1 or 2, characterized in that, The identification information of the service is End.DX2.

6. The method of claim 1 or 2, wherein, The first indication is carried in a first IPv6 header or a first IPv6 extension header of the first message.

7. The method of claim 6, wherein The first message comprises the first IPv6 header, and the first indication is carried in a next header field in the first IPv6 header; or The first message comprises the first IPv6 extension header, and the first indication is carried in a next header field in a first segment routing extension header (SRH) of the first IPv6 extension header.

8. The method of claim 6, wherein, The first message comprises the first IPv6 header, and the first indication is carried in a variable args field in a first destination address (DA) field of the first IPv6 header; or The first message comprises the first IPv6 extension header, and the first indication is carried in an args field in a first DA field of a first SRH of the first IPv6 extension header.

9. The method of claim 6, wherein, The first message comprises the first IPv6 extension header, and the first indication is carried in a flag field in an SRH of the first IPv6 extension header.

10. The method of claim 6, wherein, The first message comprises the first IPv6 extension header, and the first indication is carried in a type-length-value (TLV) field in a hop-by-hop (HBH) option header of the first IPv6 extension header or in a TLV field in a destination address (DOH) option header of the first IPv6 extension header.

11. The method of claim 1 or 2, wherein, The method further comprises: The first network device sends a second packet to the second network device, the second packet being a service packet for carrying the service, and the second packet not including the first indication.

12. The method of claim 11, wherein, The second packet further includes a second indication, the second indication being used to indicate that the second packet is a service packet, and the second indication being different from the first indication.

13. A method of implementing service path detection, the method comprising: The method is applied to a network supporting Segment Routing over IPv6 (SRv6), and the method comprises: The second network device receives a first packet sent by a first network device through a path between the first network device and the second network device, the first packet being a Bidirectional Forwarding Detection (BFD) packet, the first packet including a first indication and identification information of a service, the first indication being used to indicate that the first packet is a detection packet, and the path between the first network device and the second network device being used to carry the service, the service being a service carried by an Ethernet Virtual Private Network (EVPN) technology. The second network device sends a BFD packet to the first network device, so that the first network device determines whether the path between the first network device and the second network device has a fault.

14. The method of claim 13, wherein, The EVPN service is implemented through a Virtual Private LAN Service (VPLS) service or a Virtual Private Wire Service (VPWS).

15. The method according to claim 13 or 14, characterized in that, The path between the first network device and the second network device is a pseudo-wire (PW).

16. The method according to claim 13 or 14, characterized in that The identification information of the service is a Virtual Private Network Segment Identifier (VPN SID).

17. The method of claim 13 or 14, wherein, The identification information of the service is End.DX2.

18. The method of claim 13 or 14, wherein, The method further comprises: The second network device receives a second packet sent by the first network device, the second packet being a service packet for carrying the service, and the second packet not including the first indication.

19. The method of claim 18, wherein, The second packet further includes a second indication, the second indication being used to indicate that the second packet is a service packet, and the second indication being different from the first indication.

20. A network system, characterized by The network system is applied to a network supporting Segment Routing over IPv6 (SRv6), and the network system comprises a first network device and a second network device, the first network device being configured to perform the method of any one of claims 1-12, and the second network device being configured to perform the method of any one of claims 13-19. 21.A network device, comprising a processor and a memory, the memory being coupled to the processor, and the processor executing instructions stored in the memory to cause the network device to perform the method of any one of claims 1-19.

22. A computer program product, characterised in that, A computer program is included, and the computer program is executed by a processor to implement the method of any one of claims 1-19.

Citation Information

Patent Citations

  • Tunnel connectivity detection method and device and network edge equipment

    CN110224886A

  • Method, device and system for obtaining SRv6 tunnel information

    CN110971433A