Method, device and system for implementing service path discovery - Patents.com

By employing service-level path detection using detection packets with specific instructions in IPv6 headers, SRv6 networks can accurately identify and switch only faulty paths, addressing the inefficiencies of tunnel-level detection and optimizing resource utilization.

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

Patent Information

Application Number
JP2023518238
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Priority Date
2020-11-30
Filing Date
2021-09-14
Publication Date
2024-11-12
Estimated Expiration
2041-09-14

AI Technical Summary

Technical Problem

Current SRv6 networks rely on tunnel-level failure detection, which is coarse and inaccurate, leading to unnecessary switching of services that are still functioning, resulting in wasted network resources.

Method used

Implement service-level path detection by using detection packets with specific instructions and service identification information in IPv6 headers or extension headers, allowing network devices to accurately distinguish between detection and service packets, enabling finer granularity and accurate path failure detection.

Benefits of technology

This approach allows for precise service-level path switching, reducing resource wastage and ensuring the normal execution of services by accurately identifying and switching only faulty paths, thereby optimizing network resource utilization.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007581499000001
    Figure 0007581499000001
  • Figure 0007581499000002
    Figure 0007581499000002
  • Figure 0007581499000003
    Figure 0007581499000003
Patent Text Reader

Abstract

A method, device, and system for performing service path discovery are provided. The method is applicable to an SRv6 network, and includes: a first network device generating a first packet based on IPv6 and sending the first packet to a second network device, the first packet including a first instruction and service identification information, the first instruction indicating that the first packet is a discovery packet; and after receiving the first packet, the second network device discovering a path for carrying the service based on the first instruction and the service identification information. The sender adds the first instruction and the service identification information to the discovery packet, so that the receiver can determine that the received packet is a discovery packet, recognize the corresponding running service, and detect the connectivity, quality, etc. of the path for carrying the service based on the discovery packet. In this way, fine-grained service-level path discovery is performed, providing a decision basis for service-level path switching.
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] This application claims priority to Chinese Patent Application No. 202010992436.9, filed with the State Intellectual Property Office of the People's Republic of China on September 21, 2020, and entitled "METHOD AND DEVICE FOR IMPLEMENTING FAULT DETECTION IN SRV6 SCENARIO", and this application claims priority to Chinese Patent Application No. 202011375770.6, filed with the State Intellectual Property Office of the People's Republic of China on November 30, 2020, and entitled "METHOD, DEVICE, AND SYSTEM FOR IMPLEMENTING SERVICE PATH DETECTION", which are incorporated by reference in their entireties herein. [Technical field] The present application relates to the field of communication technologies, and in particular to a method, device and system for implementing service path discovery. [Background technology]

[0002] In segment routing over internet protocol version 6 (SRv6) networks, tunnel-level failure detection can currently be implemented. For example, when a customer provider edge (PE) device detects that a tunnel between the customer PE device and a network-side PE device has a failure, the customer PE device will implement a tunnel-level switchover to ensure the normal running of the service originally carried by this tunnel. However, the granularity of tunnel-level failure detection is coarse. Once a failure is caused by a service and another service carried by the tunnel can run normally, this failure detection method cannot accurately detect the service-level failure. As a result, the customer PE device will switch over all services carried by the tunnel, in other words, the services normally running on the tunnel will also be switched over incorrectly. As a result, network resources will be wasted.

[0003] Based on this, it is urgent to provide a service-level path detection method in this scenario to implement finer granularity and more accurate path detection and further ensure accurate service switching. Summary of the Invention

[0004] The embodiments of the present application provide a method, device and system for implementing service path detection, in which a network device sends a detection packet carrying an indication, so that a network device receiving the packet can accurately distinguish the detection packet from a service packet by using the indication, which ensures that the recipient network device can effectively implement service-level failure detection to ensure the normal running of the service in the network.

[0005] The following methods, apparatus, devices, and systems provided in this application can be applied to SRv6 networks.

[0006] According to a first aspect, an embodiment of the present application provides a method for implementing service path discovery. The method is applied to a first network device. For example, the method may include: the first network device generates a first packet based on Internet protocol version 6 (IPv6), and sends the first packet to a second network device, the first packet includes a first instruction and an identification information of a service, the first instruction indicating that the first packet is a discovery packet; and the first network device sends the first packet to the second network device to instruct the second network device receiving the first packet to discover at least one of a path between the first network device and the second network device and used to carry the service, and a path between the second network device and an access side network device and used to carry the service, based on the first instruction and the identification information of the service. The discovery performed by the second network device on the path for carrying the service may be a path status detection, for example, a path failure detection or a path quality detection. According to this method, a sender network device adds a first instruction and service identification information to a detection packet to be sent, so that a receiver network device can accurately determine that the received packet is a detection packet, recognize the corresponding service information, and perform connectivity detection, quality detection, etc. on a to-be-detected path for carrying the service based on the detection packet. This solves the problem that requirements cannot be met and network resources are wasted. These problems are caused because currently only coarse-grained tunnel-level detection between network devices can be completed. In this way, finer-grained and more accurate service level detection is implemented, providing an accurate basis for service-level path switching, and ensuring the normal and efficient running of services in the network.

[0007] The path to be detected may be at least one of a path between the first network device and the second network device and used to carry a service, and a path between the second network device and the access side network device and used to carry a service. The specific path to be detected and the specific content of the detection may be determined based on the detection information included in the detection packet. When the path to be detected includes both a path between the first network device and the second network device and used to carry a service, and a path between the second network device and the access side network device and used to carry a service, the path to be detected may alternatively be considered to be a path range between the first network device and the access side network device. The detection content for the path to be detected may include the state of an object such as an interface, link, or device on the path, such as a fault state, or may include statistics or analysis performed from aspects such as the quality state of data transmitted on the path, such as packet loss, delay, bit error, or jitter. The second network device can transmit the detection content to the first network device, so that the first network device can determine the detection result or obtain the detection result locally based on the detection content.

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

[0009] The first instruction may be carried in a first IPv6 header or a first IPv6 extension header of the first packet. In the following, various possible implementations in which the first packet carries the first instruction are described by using examples.

[0010] In one possible implementation, the first packet may include a first IPv6 header, and the first indication is carried in a next header field in the first IPv6 header. This implementation is applicable to an SRv6 best effort (BE) scenario. Alternatively, the first packet may include a 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. This implementation is applicable to an SRv6 policy scenario. For example, if the value of the next header field for carrying the first indication in the first packet is 137, it indicates that the first packet is a discovery packet.

[0011] In this implementation, the first IPv6 extension header of the first packet may further include an alert label and a control word, where the alert label and the control word indicate detection information in a payload of the first packet, and the detection information instructs the second network device to detect a path for carrying the service based on the detection information. The alert label and the control word indicating the detection information may be determining, based on the values ​​of the alert label and the control word, that the subsequently carried content is detection information, or determining, based on the values ​​of the alert label and the control word, that the subsequently carried content is detection information and determining a type of the detection information. For example, it may be determined, based on the alert label 13 and the control word, that the subsequently carried content is detection information and the type of the detection information is bidirectional forwarding detection (BFD) information.

[0012] In another possible implementation, the first packet may include a first IPv6 header, and the first instruction is carried in an arguments (args) field in a first destination address (DA) field in the first IPv6 header. This implementation is applicable to an SRv6 BE scenario. Alternatively, the first packet may include a first IPv6 extension header, and the first instruction is carried in an args field in a first DA field in a first SRH of the first IPv6 extension header. This implementation is applicable to an SRv6 policy scenario. For example, if the value of the args field in the DA field for carrying the first instruction in the first packet is not equal to 0 (e.g., the value of args is equal to 3), it indicates that the first packet is a detection packet.

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

[0014] In yet another possible implementation, the first packet may include a first IPv6 extension header, and the first indication may be carried in a type-length-value (TLV) field in a hop-by-hop (HBH) options header of the first IPv6 extension header, or may be carried in a TLV field in a destination options header (DOH) of the first IPv6 extension header. For example, if the HBH options header field in the first packet includes a TLV field for carrying the first indication, it indicates that the first packet is a discovery packet. As another example, if the DOH field in the first packet includes a TLV field for carrying the first indication, it indicates that the first packet is a discovery packet.

[0015] In some possible implementations, the method may further include: the first network device sending a second packet to the second network device, the second packet being a service packet used to carry a service, and the second packet not including the first instruction. In this way, after receiving the first packet and the second packet, the second network device can determine whether the packet is a discovery packet or a service packet based on the instruction carried in the packet, and perform corresponding processing based on the specific packet type.

[0016] In one example, the second packet not including the first instruction may mean that the second packet does not include a field used to carry the first instruction. For example, assuming that the HBH optional header field in the first packet includes a TLV field for carrying the first instruction, the HBH optional header in the second packet does not include a TLV field used to carry the first instruction. As another example, assuming that the DOH field in the first packet includes a TLV field for carrying the first instruction, the DOH field in the second packet does not include a TLV field used to carry the first instruction.

[0017] In another example, the second packet not including the first indication may alternatively mean that the second packet includes a field for carrying the first indication, but the value of the field in the first packet is different from the value of the field in the second packet, and these values ​​are used to carry the different indications. The value of the field in the first packet is used to carry the first indication, the first indication indicating that the first packet is a discovery packet. The value of the field in the second packet is used to carry the second indication, the second indication indicating 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 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, the second indication may be a second value of the next header field in the second IPv6 header (wherein the first value is not equal to the second value). Alternatively, assuming that 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, and the first indication is a first value of the next header field in the first SRH of the first IPv6 extension header, the second indication may be a second value of the next header field in the second SRH. For example, if the value of the next header field for carrying the first indication in the first packet is 137, it indicates that the first packet is a discovery packet. If the value of the next header field for carrying the second indication in the second packet is 143, it indicates that the second packet is a service packet. In another case, assuming that the second packet includes a second IPv6 header, the second instruction is carried in an args field in a second DA field in the second IPv6 header, and the first instruction is a third value of the args field in the first DA field in the first IPv6 header, the second instruction may be a fourth value of the args field in the second DA field (wherein the third value is not equal to the fourth value).Alternatively, assuming that the second packet includes a second IPv6 extension header, the second instruction is carried in an args field in a second DA field in a second SRH of the second IPv6 extension header, and the first instruction is a third value of the args field in a first DA field in a first SRH of the first IPv6 extension header, the second instruction may be a fourth value of the args field in a second DA field in a second SRH. For example, if the value of the args field in a DA field for carrying the first instruction in a first packet is 3, it indicates that the first packet is a discovery packet. If the value of the args field in a DA field for carrying the second instruction in a second packet is 0, it indicates that the second packet is a service packet. In yet another case, assuming that the second packet includes a second IPv6 extension header and the second indication is carried in a flags field in the SRH of the second IPv6 extension header and the first indication is a fifth value of the flags field in the SRH of the first IPv6 extension header, the second indication may be a sixth value of the flags field in the SRH of the second IPv6 extension header (wherein the fifth value is not equal to the sixth value).

[0018] The first packet transmitted by the first network device to the second network device carries the first instruction and the service identification information, and the purpose of the transmission phase of the first packet is to enable the second network device to detect a path for carrying the service based on the first instruction and the service identification information, but it is not limited whether the second network device actually receives the first packet.

[0019] In one example, when a link or device between a first network device and a second network device is faulty and the second network device is faulty, the second network device may fail to receive the first packet. Thus, the first network device may not receive a response packet sent by the second network device within a preset period of time and determine that the path for carrying the service is faulty. In this example, since the state of the forwarding path between the first network device and the second network device is unpredictable in the transmission phase of the first packet, the second network device may actually fail to receive the first packet successfully in some possible cases, including the failure scenarios enumerated in this example. However, this does not affect the purpose of the first network device in the transmission phase of the first packet, in which the purpose is to enable the second network device to detect the path for carrying the service based on the first instruction and the identification information of the service.

[0020] In another example, assuming that the second network device receives the first packet, the contents that the second network device can recognize and detect can include whether a link or interface used by the second network device to connect to an access side network device on the path is faulty. In another possible case, the second network device can further determine in some ways whether an access side network connected to the second network device is faulty, for example, whether an access side network device directly or indirectly connected to the second network device, or a link or port in the access side network is faulty. The access side referred to in this specification may also be referred to as a customer in some cases. In this example, in one case, the second network device may choose not to respond to the first packet when it determines that an interface or link used by the second network device to connect to the access side network device is faulty. In this case, the first network device may not receive a response packet sent by the second network device within a preset period of time and determine that the path between the first network device and the access side network device and for carrying the service is faulty. In another case, the second network device may choose to generate a response corresponding to the first packet and send the response to the first network device. In this case, upon receiving the response packet sent by the second network device, the first network device may determine whether the path carrying the service is faulty based on the link status information or interface status information carried in the response packet, for example, determine that the path between the second network device and the access side network device and used to carry the service is faulty.

[0021] In yet another example, assuming that the second network device receives the first packet, the second network device may further detect the path quality of the path used to carry the service, 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 corresponding quality feedback data is carried in the response packet sent by the second network device to the first network device. The quality feedback data may include the quality data fed back by the second network device and / or the quality feedback data added by multiple intermediate devices to the response packet on the path along which the second network device sends the response packet to the first network device, so that the first network device determines the one-way or two-way path quality detection result. In another case, the second network device may alternatively directly determine the one-way path quality detection result based on the quality data obtained through detection.

[0022] In some possible implementations, when the first network device determines that the path for carrying the service is faulty or the path quality does not meet the requirement, the method may further include: the first network device switches the path used for carrying the service to the path from the first network device to the third network device, and the third network device carries the service after the switching. In this way, through the service-level fault detection, the failed path for carrying any service can be accurately detected, so that the path for carrying the service is switched, and the switching of the forwarding paths of all the services carried in the tunnel performed by the tunnel-level switching does not need to be performed. In this way, the network resources are saved to a certain extent.

[0023] According to a second aspect, an embodiment of the present application further provides a method for implementing service path detection. The method is applied to a second network device. For example, the method may include: the second network device receives a first packet sent by a first network device, the first packet includes a first instruction and a service identification information, the first instruction indicates that the first packet is a detection packet, and the second network device can detect at least one of a path between the first network device and the second network device and used to carry the service, and a path between the second network device and the access side network device and used to carry the service based on the first instruction and the service identification information. According to the method, the sender network device adds the first instruction and the service identification information to the detection packet to be sent, so that the recipient network device can learn to accurately determine that the received packet is a detection packet, recognize the corresponding service, and perform connectivity detection, quality detection, etc. on the path for carrying the service based on the detection packet. This solves the problem that the coarse granularity cannot meet the requirements and network resources are wasted. These problems are caused by the fact that currently related technologies only support tunnel-level detection between network devices, thus implementing finer granularity and more accurate service level detection, providing a more accurate basis for service level switching, and ensuring the normal running of services in the network.

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

[0025] The first instruction may be carried in a first IPv6 header or a first IPv6 extension header of the first packet. In the following, various possible implementations in which the first packet carries the first instruction are described by using examples.

[0026] In one possible implementation, the first packet may include a first IPv6 header, and the first indication is carried in a Next Header field in the first IPv6 header. This implementation is applicable to an SRv6 BE scenario. Alternatively, the first packet may 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. This implementation is applicable to an SRv6 policy scenario.

[0027] In this implementation, the first IPv6 extension header of the first packet may further include an alert label and a control word, where the alert label and the control word indicate detection information in the payload of the first packet, and the detection information instructs the second network device to detect a path for carrying the service based on the detection information. The alert label and the control word indicating the detection information may be determining, based on the values ​​of the alert label and the control word, that the subsequently carried content is detection information, or determining, based on the values ​​of the alert label and the control word, that the subsequently carried content is detection information and determining the type of the detection information. For example, it may be determined, based on the alert label 13 and the control word, that the subsequently carried content is detection information and the type of the detection information is BFD information.

[0028] In another possible implementation, the first packet may include a first IPv6 header, and the first instruction is carried in an args field in a first DA field in the first IPv6 header. This implementation is applicable to SRv6 BE scenarios. Alternatively, the first packet may include a first IPv6 extension header, and the first instruction is carried in an args field in a first DA field in a first SRH of the first IPv6 extension header. This implementation is applicable to SRv6 policy scenarios.

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

[0030] In yet another possible implementation, the first packet may include a first IPv6 extension header, and the first indication may be carried in a TLV field in an HBH options header of the first IPv6 extension header, or may be carried in a TLV field in a DOH of the first IPv6 extension header.

[0031] In some possible implementations, the method may further include: the second network device receiving a second packet sent by the first network device, the second packet being a service packet used to carry a service, and the second packet not including the first instruction. In this way, after receiving the first packet and the second packet, the second network device can determine whether the packet is a detection packet or a service packet based on the instruction carried in the packet, and perform corresponding processing based on the specific packet type, thereby enabling service level detection.

[0032] The second packet not including the first indication may mean that the second packet does not include a field used to carry the first indication, or it may mean that the second packet includes a field used to carry the first indication, but the value of the field in the second packet is different from the value of the field in the first packet, and these values ​​are respectively used to carry different indications. The value of the field in the first packet is used to carry the first indication, the first indication indicating that the first packet is a discovery packet. The value of the field in the second packet is used to carry the second indication, and the second indication indicating 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 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, the second indication may be a second value of the next header field in the second IPv6 header (wherein the first value is not equal to the second value). Alternatively, assuming that 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, and the first indication is a first value of the next header field in the first SRH of the first IPv6 extension header, the second indication may be a second value of the next header field in the second SRH. In another case, assuming that the second packet includes a second IPv6 header, the second instruction is carried in an args field in a second DA field in the second IPv6 header, and the first instruction is a third value of the args field in the first DA field in the first IPv6 header, the second instruction may be a fourth value of the args field in the second DA field (wherein the third value is not equal to the fourth value).Alternatively, assuming that the second packet includes a second IPv6 extension header, the second instruction is carried in an args field in a second DA field in a second SRH of the second IPv6 extension header, and the first instruction is a third value of the args field in a first DA field in a first SRH of the first IPv6 extension header, the second instruction may be a fourth value of the args field in a second DA field in the second SRH. In yet another case, assuming that the second packet includes a second IPv6 extension header, the second instruction is carried in a flags field in a SRH of the second IPv6 extension header, and the first instruction is a fifth value of the flags field in the SRH of the first IPv6 extension header, the second instruction may be a sixth value of the flags field in the SRH of the second IPv6 extension header (wherein the fifth value is not equal to the sixth value).

[0033] In one possible implementation, the second network device can detect a path status of a path used to carry a service based on the received first packet, and the path status can be, for example, a path failure status or a path quality status. In one example, assuming that the second network device receives the first packet, the second network device can detect a path between the second network device and the access side network device and used to carry the service based on the first instruction and the identification information of the service, or detect a path in the access side network in a certain manner, for example, detect a link connected to or an interface included in the network device in the access side network. In this example, in one case, the second network device may choose not to respond to the first packet. In this case, the first network device can determine that the path for carrying the service is faulty when it does not receive a response packet sent by the second network device within a preset period. For example, the first network device determines that the path between the first network device and the access side network device and used to carry the service is faulty. In another case, the second network device may choose to generate a response corresponding to the first packet and send the response to the first network device. In this case, upon receiving the response packet sent by the second network device, the first network device may determine whether a path for carrying the service is faulty based on the link status information or interface status information carried in the response packet. For example, the first network device may determine that a path between the second network device and the access side network device and used to carry the service is faulty based on the response packet.

[0034] In another example, the second network device may further detect the path quality of the path used to carry the service based on the received first packet, 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 may include corresponding quality feedback data in the response packet sent to the first network device, so that the first network device determines the bidirectional path quality detection result. In another case, the second network device may alternatively directly determine the one-way path quality detection result based on the quality data obtained through detection.

[0035] In some possible implementations, in the method, for example, the second network device detecting a path for carrying the service based on the first instruction and the identification information of the service may further include the second network device detecting a path for carrying the service according to a local detection policy when the second network device determines that the first packet is a detection packet and determines that the detection performed based on the first instruction is supported locally. According to the local failure detection policy, the first packet may be sent to a corresponding detection process, and failure detection is performed in the corresponding detection process. For example, assuming that the first packet is a BFD detection packet, when it determines that the BFD detection packet is supported locally, the second network device sends the service-related content and detection information in the BFD detection packet to a local BFD process to perform the corresponding failure detection by using the BFD process. The detection performed based on the first instruction being supported locally may mean that the detection function indicated by the first instruction is enabled through a local configuration of the network device. It should be noted that sending the first packet to the corresponding detection process may, for example, be sending the remaining service-related content and detection information after tunnel information in the first packet (such as the SRH in the first packet) is removed to the corresponding detection process.

[0036] In the methods provided in the first and second aspects, the first network device may be an ingress PE device carrying a service and the second network device may be an egress PE device carrying a service. Alternatively, the first network device may be another type of network device capable of initiating the detection method described in the first and second aspects in a network, and the second network device may be another possible type of device capable of responding to received detection packets and performing corresponding path detection.

[0037] In the methods provided in the first and second aspects, the service carried between the first and second network devices may be a layer 2 virtual private network (L2VPN) service. The L2VPN service may include, for example, a service carried by a conventional VPN technology or an Ethernet virtual private network (EVPN) technology. Both conventional VPN services and EVPN services may be deployed in a network by using a virtual leased line (VLL) service model or a virtual private LAN service (VPLS) model.

[0038] In the methods provided in the first and second aspects, the first packet may be a BFD packet or an operation administration and maintenance (OAM) packet. Different service path detection functions can be implemented based on different types of the first packet, such as service path failure detection or service path quality detection. The service path quality detection may be performed based on metrics such as delay, packet loss, or jitter.

[0039] When the first packet is a BFD packet, according to the above method, not only can perform connectivity detection on the path between the first network device and the second network device and for carrying the service, but also can perform connectivity detection on the path between the second network device and the access-side network device and for carrying the service. In this way, the first network device can learn not only the connectivity of the tunnel path between the first network device and the second network device, but also the connectivity of the path used to carry the service from the first network device to the access-side network device, thereby achieving the effect of service-level connectivity detection.

[0040] When the first packet is an OAM packet, the path state detected according to the above method may include path connectivity and path quality. In one possible case, the OAM packet performing path quality detection may include the first network device sending an OAM packet to the second network device to inform statistical information of data transmitted by the first network device (e.g., the quantity and timestamp of transmitted data packets). The second network device may determine a service to be detected based on the service identification information carried in the OAM packet, obtain a reception statistical result corresponding to received data for the service to be detected, and process the statistical information to obtain a path quality detection result corresponding to a path for carrying the service to be detected. Optionally, the second network device may further generate an OAM packet carrying the detection result, and send the packet to the first network device to inform the first network device of the path quality of the service to be detected. Alternatively, in another possible case, the OAM packet performing path quality detection may include the first network device sending an OAM packet to the second network device to inform statistical information of data transmitted by the first network device. The second network device can determine the service to be detected according to the identification information of the service carried in the OAM packet, obtain a statistical result corresponding to the received data of the service to be detected, include the statistical result in a generated OAM packet, and send the packet to the first network device to instruct the first network device to process the statistical result in the received OAM packet, obtain a detection result of the path for carrying the service to be detected, and further determine the quality of the path for carrying the service to be detected. Furthermore, the OAM packet is used as a detection packet. In one aspect, the path quality of the path for carrying the service between the first network device and the second network device can be detected, and in another aspect, the connectivity of the path for carrying the service can be detected.

[0041] According to a third aspect, an embodiment of the present application further provides an apparatus for performing service path discovery. The apparatus is applied to a first network device, and the apparatus is applied to a network supporting SRv6. The apparatus may include a generating unit and a sending unit. The generating unit is configured to generate a first packet based on Internet Protocol version 6 IPv6, the first packet includes a first instruction and service identification information, and the first instruction indicates that the first packet is a discovery packet. The sending unit is configured to send the first packet to a second network device to instruct the second network device receiving the first packet to discover at least one of a path between the first network device and the second network device and for carrying a service, and a path between the second network device and the access side network device and for carrying a service, based on the first instruction and the service identification information.

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

[0043] The first instruction may be carried in a first IPv6 header or a first IPv6 extension header of the first packet.

[0044] In one example, the first packet includes a first IPv6 header and the first instruction is carried in a next header field in the first IPv6 header, or the first packet includes a first IPv6 extension header and the first instruction 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 an alert label and a control word, the alert label and the control word indicating detection information in the payload of the first packet, and the detection information instructs the second network device to detect a path for carrying the service based on the detection information.

[0045] In another example, the first packet includes a first IPv6 header and the first instruction is carried in an args field in a first destination address (DA) field in the first IPv6 header, or the first packet includes a first IPv6 extension header and the first instruction is carried in an args field in a first DA field in a first SRH of the first IPv6 extension header.

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

[0047] In yet another example, the first packet includes a first IPv6 extension header, and the first indication is carried in a Type-Length-Value TLV field in a Hop-by-Hop Options Header of the first IPv6 extension header, or is carried in a TLV field in a Destination Options Header of the first IPv6 extension header.

[0048] In some possible implementations, 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 a service, and the second packet not including the first instruction. The second packet may further include a second instruction, the second instruction indicating that the second packet is a service packet, and the second instruction is different from the first instruction.

[0049] The second indication differs from the first indication by: the second packet includes a second IPv6 header, the second indication is carried in a Next Header field within the second IPv6 header, the first indication being a first value of the Next Header field within the first IPv6 header, and the second indication being a second value of the Next Header field within the second IPv6 header; the second packet includes a second IPv6 extension header, the second indication is carried in a Next Header field within a second SRH of the second IPv6 extension header, the first indication being a first value of the Next Header field within the first SRH of the first IPv6 extension header, and the second indication being a second value of the Next Header field within the second SRH; the second packet includes a second IPv6 header, the second indication is carried in an args field within a second DA field within the second IPv6 header, and the first indication is carried in an args field within a first DA field within the first IPv6 header. the second packet includes a second IPv6 extension header, and the second instruction is carried in an args field in a second DA field in a second SRH of the second IPv6 extension header, and the first instruction is a third value of the args field in the first DA field in the first SRH of the first IPv6 extension header, and the second instruction 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, and the second instruction is carried in a flags field in the SRH of the second IPv6 extension header, and the first instruction is a fifth value of the flags field in the SRH of the first IPv6 extension header, and the second instruction is a sixth value of the flags field in the SRH of the second IPv6 extension header.

[0050] In some possible implementations, the apparatus may further include a determining unit, which is configured to determine that a path between the first network device and the access side network device and used to carry a service is faulty when a response packet of the second network device to the first packet is not received within a preset period.

[0051] In some possible implementations, the apparatus may further include a receiving unit and a determining unit, where the receiving unit is configured to receive a response packet of a second network device to the first packet, and the determining unit is configured to determine, based on the response packet, a path status of a path between the second network device and the access side network device and used to carry a service.

[0052] In some possible implementations, the apparatus may further include a switching unit, which is configured to switch the path used to carry the service from the first network device to a path to a third network device when determining that the path used to carry the service has a failure based on the response packet of the second network device to the first packet not being received within a preset period, or determining that the path used to carry the service has a failure or does not meet a path quality requirement based on a path state, and the third network device carries the service after the switching.

[0053] The apparatus for implementing service path detection provided in the third aspect is configured to perform the related operations mentioned in the first aspect. For specific implementation and effects of the apparatus, please refer to the related description in the first aspect. Details will not be described again here.

[0054] According to a fourth aspect, an embodiment of the present application further provides an apparatus for performing service path detection. The apparatus is applied to a second network device, and the apparatus is applied to a network supporting SRv6. The apparatus may include a receiving unit and a detecting unit. The receiving unit is configured to receive a first packet sent by a first network device, the first packet including a first indication and service identification information, and the first indication indicates that the first packet is a detection packet. The detecting unit is configured to detect at least one of a path between the first network device and the second network device and for carrying a service, and a path between the second network device and the access side network device and for carrying a service, based on the first indication and the service identification information.

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

[0056] The first instruction may be carried in a first IPv6 header or a first IPv6 extension header of the first packet.

[0057] In one example, the first packet includes a first IPv6 header and the first instruction is carried in a next header field in the first IPv6 header, or the first packet includes a first IPv6 extension header and the first instruction 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 an alert label and a control word, the alert label and the control word indicating detection information in the payload of the first packet, and the detection information instructs the second network device to detect a path for carrying the service based on the detection information.

[0058] In another example, the first packet includes a first IPv6 header and the first instruction is carried in an args field in a first destination address (DA) field in the first IPv6 header, or the first packet includes a first IPv6 extension header and the first instruction is carried in an args field in a first DA field in a first SRH of the first IPv6 extension header.

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

[0060] In yet another example, the first packet includes a first IPv6 extension header, and the first indication is carried in a Type-Length-Value TLV field in a Hop-by-Hop Options Header of the first IPv6 extension header, or is carried in a TLV field in a Destination Options Header of the first IPv6 extension header.

[0061] In some possible implementations, 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 a service, and the second packet not including the first instruction. The second packet may further include a second instruction, the second instruction indicating that the second packet is a service packet, and the second instruction is different from the first instruction.

[0062] The second indication differs from the first indication by: the second packet includes a second IPv6 header, the second indication is carried in a Next Header field within the second IPv6 header, the first indication being a first value of the Next Header field within the first IPv6 header, and the second indication being a second value of the Next Header field within the second IPv6 header; the second packet includes a second IPv6 extension header, the second indication is carried in a Next Header field within a second SRH of the second IPv6 extension header, the first indication being a first value of the Next Header field within the first SRH of the first IPv6 extension header, and the second indication being a second value of the Next Header field within the second SRH; the second packet includes a second IPv6 header, the second indication is carried in an args field within a second DA field within the second IPv6 header, and the first indication is carried in an args field within a first DA field within the first IPv6 header. the second packet includes a second IPv6 extension header, and the second instruction is carried in an args field in a second DA field in a second SRH of the second IPv6 extension header, and the first instruction is a third value of the args field in the first DA field in the first SRH of the first IPv6 extension header, and the second instruction 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, and the second instruction is carried in a flags field in the SRH of the second IPv6 extension header, and the first instruction is a fifth value of the flags field in the SRH of the first IPv6 extension header, and the second instruction is a sixth value of the flags field in the SRH of the second IPv6 extension header.

[0063] In some possible implementations, the apparatus may 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 based on the response packet that a path between the second network device and the access side network device and for carrying a service is faulty. The response packet sent by the second network device may include interface status information of the second network device, and the interface status information instructs the first network device to determine that a path between the second network device and the access side network device and for carrying a service is faulty.

[0064] In some possible implementations, the detection unit may be specifically configured to detect a path for carrying the service according to a local detection policy when the first packet is determined to be a detection packet and the detection performed based on the first instruction is determined to be locally supported.

[0065] The apparatus for implementing service path detection provided in the fourth aspect is configured to perform the related operations mentioned in the second aspect. For specific implementation and effects of the apparatus, please refer to the related description in the second aspect. Details will not be described again here.

[0066] In the devices provided in the third and fourth aspects, the device applied to the first network device that performs service path discovery may be an ingress PE device carrying the service, and the device applied to the second network device that performs service path discovery may be an egress PE device carrying the service.

[0067] In the devices provided in the third and fourth aspects, the service carried between the devices performing service path discovery may be an L2VPN service. The L2VPN service may include, for example, a service carried by a conventional VPN technology or an EVPN technology. Both the conventional VPN service and the EVPN service may be deployed in a network by using a VLL service model or a VPLS service model.

[0068] In the devices provided in the third and fourth aspects, the first packet may be a BFD packet or an OAM packet.

[0069] According to a fifth aspect, the present application further provides a network device. The network device includes a processor configured to enable the network device to perform the method provided in the first aspect or the second aspect. The network device may further include a memory. The memory is coupled to the processor. When the processor executes the instructions stored in the memory, the network device is enabled to perform the method provided in the first aspect or the second aspect. The network device may further include a communication interface. The communication interface is used by the network device to communicate with another device. For example, the communication interface may be a transceiver, a circuit, a bus, a module, or another type of communication interface. In the present application, the instructions in the memory may be pre-stored or may 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.

[0070] According to a sixth aspect, the present application further provides a network system, the network system including a first network device and a second network device, the first network device configured to perform the method provided in the first aspect, and the second network device configured to perform the method provided in the second aspect.

[0071] According to a seventh aspect, the present application provides a chip including a processor and an interface circuit configured to receive and send instructions to the processor, the processor being configured to execute instructions corresponding to a method provided in the first or second aspect.

[0072] According to an eighth aspect, the present application provides a computer readable storage medium, the computer readable storage medium storing program codes or instructions, the program codes or instructions being enabled to execute a method as provided in the first or second aspect when executed on a computer.

[0073] According to a ninth aspect, the present application provides a computer program product comprising a computer program which, when executed by a processor, performs a method as provided in the first or second aspect. [Brief description of the drawings]

[0074] [Figure 1] 1 is a schematic diagram of the structure of a network system 10 according to an embodiment of the present application. [Diagram 2] 1 is a flowchart of a method 100 for performing service path discovery according to an embodiment of the present application. [Figure 3a] FIG. 2 is a schematic diagram of a format of Packet 1 according to an embodiment of the present application. [Figure 3b] FIG. 13 is a schematic diagram of another packet 1 format according to an embodiment of the present application. [Figure 3c] FIG. 3b is a schematic diagram of the format of packet 2 corresponding to FIG. 3a according to an embodiment of the present application. [Figure 3d] FIG. 4 is a schematic diagram of the format of packet 2 corresponding to FIG. 3b according to an embodiment of the present application. [Figure 4a] FIG. 2 is a schematic diagram of a format of Packet 1 according to an embodiment of the present application. [Figure 4b] FIG. 13 is a schematic diagram of another packet 1 format according to an embodiment of the present application. [Figure 4c] FIG. 4b is a schematic diagram of the format of packet 2 corresponding to FIG. 4a according to an embodiment of the present application. [Figure 4d] FIG. 4B is a schematic diagram of the format of packet 2 corresponding to FIG. 4B according to an embodiment of the present application. [Figure 5a] FIG. 2 is a schematic diagram of a format of Packet 1 according to an embodiment of the present application. [Figure 5b] FIG. 5b is a schematic diagram of the format of packet 2 corresponding to FIG. 5a according to an embodiment of the present application. [Figure 6a] FIG. 2 is a schematic diagram of a format of Packet 1 according to an embodiment of the present application. [Figure 6b] FIG. 13 is a schematic diagram of another packet 1 format according to an embodiment of the present application. [Figure 6c] FIG. 6b is a schematic diagram of the format of packet 2 corresponding to FIG. 6a according to an embodiment of the present application. [Figure 6d] FIG. 6B is a schematic diagram of the format of packet 2 corresponding to FIG. 6B according to an embodiment of the present application. [Figure 7] 7 is a schematic diagram of the structure of an apparatus 700 for implementing service path discovery according to an embodiment of the present application. [Figure 8] 8 is a schematic diagram of the structure of an apparatus 800 for implementing service path discovery according to an embodiment of the present application. [Figure 9] 9 is a schematic diagram of the structure of a network device 900 according to an embodiment of the present application. [Figure 10] 1 is a schematic diagram of the structure of a network device 1000 according to an embodiment of the present application. [Figure 11] FIG. 11 is a schematic diagram of the structure of a network system 1100 according to an embodiment of the present application. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0075] Currently, in an SRv6 network, only tunnel-level failure detection can be performed, and therefore tunnel-level switching can only be performed when a failure is detected in a tunnel. For example, the network system 10 shown in Fig. 1 may 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. The PE device 11 is connected to the CE device 21, the PE device 11 is connected to the PE device 12 via the P device 31, the PE device 11 is connected to the PE device 13 via the P device 32 and the P device 33, and the PE device 12 and the PE device 13 are connected to the CE device 22. Assume 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. By using the tunnel discovery packet, PE device 11 can detect that Tunnel 1 has failed and switch both Service 1 and Service 2 carried in Tunnel 1 to Tunnel 2. In other words, after the switch, both the traffic of Service 1 and the traffic of Service 2 are sent by PE device 13 to CE device 22.

[0076] However, the granularity of tunnel-level failure detection is too coarse. Once a failure is caused by a service and another service carried by the tunnel can run normally, this failure detection method cannot accurately detect the service in the path where the failure occurs, cannot accurately switch the failed service forwarding path, and can only perform tunnel-level path switching. As a result, the customer PE device performs path switching for all services carried by the tunnel, in other words, the path for carrying the service that runs normally in the tunnel is also switched. As a result, network resources are wasted. Furthermore, in another path detection scenario, service level detection needs to be performed on the path quality to know the quality of the path for carrying the service and further provide better service.

[0077] Based on this, an embodiment of the present application provides a method for implementing service path discovery. A first network device can generate a first packet including a first instruction and a service identification information based on Internet Protocol version 6 (IPv6), and send the first packet to a second network device. The first instruction indicates that the first packet is a discovery packet, and the service identification information indicates a service. In this way, the second network device receiving the first packet can determine that the first packet is a discovery packet based on the first instruction in the first packet, and determine to discover a path for carrying a service based on the service identification information in the first packet, for example, to discover the failure and / or quality of the path for carrying the service. According to the method provided in the embodiment of the present application, the sender network device adds an instruction and a service identification information to the discovery packet to be sent, so that the recipient network device can learn to accurately determine that the received packet is a discovery packet, recognize the corresponding service, and discover a path for carrying the service based on the discovery packet. This solves the problem that the coarse granularity cannot meet the requirements and the network resources are wasted. These problems are caused because currently only tunnel-level detection between network devices can be implemented. In this way, the requirements for performing service level detection for path quality are also met, finer granularity and more accurate service level path detection is implemented, an accurate basis is provided for service level path switching, and the normal running of services in the network is ensured.

[0078] The network system 10 shown in FIG. 1 is still used as an example. The path discovery process provided in the embodiment of the present application may include, for example, the following steps: S11: The PE device 11 generates a packet 41 based on IPv6, where the packet 41 includes an instruction 51 and an identification information of a service 1, where the instruction 51 indicates that the packet 41 is a discovery packet, and the identification information of the service 1 is used to identify the service 1. In this case, the packet 41 instructs the recipient device to discover a path for carrying the service 1. S12: The PE device 11 sends the packet 41 to the PE device 12 via the P device 31. S13: After receiving the packet 41, the PE device 12 can determine that the received packet is a discovery packet based on the instruction 51, and discover a path for carrying the service 1 based on the identification information of the service 1 in the packet 41. In one case, the following S14a and S15a may be executed, and in another case, the following S14b and S15b may be executed. S14a: If the PE device 12 determines that the path for carrying the service 1 is faulty, the PE device 12 does not respond to the packet 41. S15a: If the PE device 11 does not receive a response packet for the packet 41 within a preset period (e.g., 1 second), the PE device 11 determines that the path between the PE device 11 and the CE device 22 and for carrying the service 1 is faulty. S14b: The PE device 12 determines the state of the path for carrying the service 1 and sends a response packet for the packet 41 to the PE device 11, where the response packet includes the determined state of the path for carrying the service 1. The path state may include the path quality and / or path connectivity of the path between the PE device 12 and the access side network device (e.g., the CE device 22) and for carrying the service 1. The path state may further include the path quality and / or path connectivity of the path between the PE device 11 and the PE device 12 and for carrying the service 1. S15b: The PE device 11 determines, based on the response packet, the path status of the path between the PE device 11 and the CE device 22 and for carrying the service 1.Then, the following S16 may be further executed. Specifically, when it is determined based on S15a that the path between the PE device 11 and the CE device 22 and for carrying the service 1 has a failure, or when it is determined based on S15b that the path state indicates that the path between the PE device 11 and the CE device 22 and for carrying the service 1 has a failure, or the path between the PE device 11 and the CE device 22 and for carrying the service 1 does not meet the path quality requirement, the PE device 11 switches the service 1 to a path including the PE device 13. After the switching, the service 1 is carried by the PE device 13, and the service 2 is still carried by the PE device 12. In this way, more sophisticated path detection and switching are implemented, and the resource utilization is more reasonable.

[0079] In one case, when the path between the PE device 11 and the PE device 12 and for carrying the service is reachable and the PE device 12 can receive the detection packet sent by the PE device 11, the PE device 12 can include the acquired path status of the path for carrying the service 1 in a response packet and send the response packet to the PE device 11. The path status carried in the response packet may include related information of the quality or connectivity of the path between the PE device 12 and the access side network device (e.g., the CE device 22) acquired by the PE device 12. In this way, the PE device 11 can recognize whether the path range for carrying the service 1 from the PE device 12 to the access side network device is faulty or whether the path quality meets the requirement based on the response packet. 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 may not receive the packet 41. Therefore, the PE device 11 may not receive the response packet sent by the PE device 12 within a preset period of time, and determine that the path between the PE device 11 and the CE device 22 and carrying the service 1 has a failure. In another case, when determining that the path between the PE device 11 and the PE device 12 and carrying the service 1 has a failure, the PE device 12 may alternatively actively send a packet to the PE device 11 by using a backup path to notify the PE device 11 that the path for carrying the service 1 has a failure, to notify the PE device 11 that the quality of the path for carrying the service 1 does not meet the requirement, or to notify the PE device 11 of the status of the relevant interface, device, or link on the path for carrying the service 1, so that the PE device 11 determines whether the path for carrying the service has a failure or does not meet the path quality requirement based on the status information received from the PE device 12.

[0080] In the network system 10 of Figure 1, the PE devices may be directly connected, or alternatively, indirectly connected via one or more forwarding devices, including but not limited to P devices.

[0081] It should be noted that the network device in the embodiment of the present application may be a device capable of carrying a service, such as a router, a switch, a forwarder, or a firewall.

[0082] It should be noted that the methods provided in the embodiments of the present application may be applied to an SRv6 network or another required application scenario, for example, another derived network supporting the implementation of the IPv6 protocol.

[0083] It should be noted that the services referred to in the embodiments of the present application may be layer 2 virtual private network (L2VPN) services. The L2VPN services may include services carried by, for example, conventional VPN technology or Ethernet virtual private network (EVPN) technology. In the L2VPN services, both conventional VPN services and EVPN services may be deployed in a network by using a virtual leased line (VLL) service model or a virtual private local area network service (VPLS) model. The VLL is used to support point-to-point services, and the VPLS is used to support point-to-multipoint services or multipoint-to-multipoint services. The network system 10 shown in FIG. 1 is used as an example. If the network system 10 shown in FIG. 1 is a conventional VPN network, regardless of the VLL service model or the VPLS 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 may each be called a pseudo wire (PW). 1 is an EVPN network, in a VLL service model, the connection between PE device 11 and PE device 12 and the connection between PE device 11 and PE device 13 may each be referred to as a virtual private wire service (VPWS) neighbor. A traditional VPN network and an EVPN network may carry the same service type.An EVPN network can be implemented by using the border gateway protocol (BGP), and a traditional VPN network can be implemented by using at least one of several protocols, such as the label distribution protocol (LDP) and BGP.

[0084] It should be noted that the detection packet mentioned in each embodiment of the present application may be used to detect the connectivity of a path for carrying a service or the quality of a path for carrying a service (e.g., indicators such as delay and packet loss on the path). The detection packet may be, for example, a bidirectional forwarding detection (BFD) packet or an operation administration and maintenance (OAM) packet, etc. When the detection packet is a BFD packet, the method provided in the embodiment of the present application may support, for example, static BFD detection, dynamic BFD detection, or seamless bidirectional forwarding detection (SBFD). The detected state of the path for carrying a service may refer to the connectivity or quality of the path. When the detection packet is an OAM packet, the method provided in the embodiment of the present application may support, for example, connectivity fault management (CFM) detection or Y.1731 detection. The specific type of the detection packet and the supported detection types do not affect the implementation of the embodiment of the present application.

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

[0086] FIG. 2 is a schematic flowchart of a method 100 for implementing service path discovery according to an embodiment of the present application. The method 100 can be applied to a network scenario including a first network device and a second network device. In an example, the first network device may be a tunnel ingress PE device carrying a target service to be discovered, and the second network device may be a tunnel egress PE device carrying the target service. For ease of understanding, the structure of the network system 10 shown in FIG. 1 is used as an example. The interaction between the PE device 11 and the PE device 12 is used for explanation. The target service to be discovered is a service 1 carried by the PE device 11 and the PE device 12. During a specific implementation, the method 100 may include, for example, the following S101 to S104.

[0087] S101: The PE device 11 generates a packet 41 based on IPv6, where the packet 41 includes an indication 51 and identification information of a service 1, where the indication 51 indicates that the packet 41 is a discovery packet.

[0088] During a specific implementation, in an SRv6 network, the PE device 11 may encapsulate a discovery packet based on IPv6 to obtain a packet 41. The packet 41 may also be referred to as an IPv6-encapsulated discovery packet. For example, assuming that the discovery packet is a BFD packet, the packet 41 in S101 may be referred to as an IPv6-encapsulated BFD packet, and the BFD packet before encapsulation corresponds to the discovery information in the packet 41 obtained through encapsulation.

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

[0090] The indication 51 may be carried in the IPv6 header 1 of the packet 41, or the indication 51 may be carried in an IPv6 extension header 1'. In the following, the location of the indication 51 carried in the packet 41 in various cases is explained by using examples.

[0091] In one example, in an SRv6 best effort (BE) scenario, the indication 51 may be carried in a next header field in an IPv6 header 1. For example, if the next header field in the IPv6 header 1 of the packet 41 is equal to 137, it indicates that the packet 41 is a detection packet. In this example, the packet 41 may further include an IPv6 extension header 1'. The IPv6 extension header 1' may include an alert label and a control word. The alert label and the control word indicate that the payload of the packet 41 carries detection information. The detection information instructs the PE device 12 to perform fault detection or quality detection on a path for carrying the service 1 based on the detection information. The indication of the detection information by the alert label and the control word may be determining that the content carried thereafter is detection information based on the values ​​of the alert label and the control word, or determining that the content carried thereafter is detection information and determining the type of the detection information based on the values ​​of the alert label and the control word. For example, based on the alert label 13 and the control word, it may be determined that the content carried thereafter is detection information, and the type of the detection information is BFD information. Furthermore, the indication 51 may alternatively be considered to be carried in the next header field in the IPv6 header 1 and the alert label and control word in the IPv6 extension header 1'. The next header field in the IPv6 header 1, the alert label in the IPv6 extension header 1', and the control word in the IPv6 extension header 1' jointly indicate that the packet 41 is a detection packet. FIG. 3a shows a schematic diagram of the format of the packet 41. The packet 41 may include an IPv6 header 1 and an IPv6 extension header 1'. The IPv6 header 1 may 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, and is, 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, e.g., equal to End.DX2 A3::1500:0 of ​​the PE device 12. The value of the next header field may be 137. The IPv6 extension header 1' may include an alert label and a control word. The payload of the packet 41 may include an internet protocol (IP), a user datagram protocol (UDP), and discovery information. When the alert label is equal to 13, the discovery information is BFD information.

[0092] In another example, in an SRv6 policy scenario, the instruction 51 may be carried in a next header field in a segment routing header (SRH) of the IPv6 extension header 1. For example, if the next header field in the IPv6 extension header 1' of the packet 41 is equal to 137, it indicates that the packet 41 is a detection packet. In this example, the IPv6 extension header 1' may further include an alert label, a control word, and detection information. The alert label and the control word indicate the detection information in the payload of the packet 41. The detection information instructs the PE device 12 to perform failure detection on the path for carrying the service 1 based on the detection information. Furthermore, the instruction 51 may alternatively be considered to be carried in a next header field in the SRH of the IPv6 extension header 1', an alert label, and a control word, which jointly indicate that the packet 41 is a detection packet. FIG. 3b shows a schematic diagram of the format of the packet 41. Packet 41 may include an IPv6 header 1 and an IPv6 extension header 1'. IPv6 header 1 may include an SA field and a DA field. IPv6 extension header 1' may include a next header field, an alert label, and a control word. The payload of packet 41 may include IP, UDP, and discovery information. If the next header field is equal to 137 and the alert label is equal to 13, it indicates that the discovery information is BFD information.

[0093] In yet another example, in an SRv6 BE scenario, the indication 51 may be carried in a DA field in an IPv6 header 1, for example, in an arguments (args) field in the DA field in the IPv6 header 1. For example, if the args field in the DA field in the IPv6 header 1 in the packet 41 is equal to 3, it indicates that the packet 41 is a discovery packet. In this example, the payload of the packet 41 may include discovery information. FIG. 4a shows a schematic diagram of the format of the packet 41. The packet 41 may include an IPv6 header 1 and a payload. The IPv6 header 1 may include an SA field and a DA field. The value of the SA field is an 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 a VPN SID of the PE device 12, for example, equal to End.DX2 A3::1500:3 (in other words, the args field in the DA field is equal to 3). The payload includes discovery information, which may be BFD information. In another possible approach, the args field in the VPN SID may alternatively be set to another value, for example another non-zero positive integer.

[0094] In another example, in an SRv6 policy scenario, the instruction 51 may be carried in a DA field in the SRH of the IPv6 extension header 1', for example, in an args field in the DA field in the IPv6 extension header 1'. For example, if the args field in the DA field in the IPv6 extension header 1' in the packet 41 is equal to 3, it indicates that the packet 41 is a discovery packet. In this example, the payload of the packet 41 may include discovery information. FIG. 4b shows a schematic diagram of the format of the packet 41. The packet 41 may include an IPv6 header 1, an IPv6 extension header 1', and a payload. The IPv6 header 1 may include an SA field and a DA 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 SID of the PE device 12, for example, equal to End.DX2 A3::1500:3 of the PE device 12. The IPv6 extension header 1' may include an SRH. The payload may include IP, UDP, and discovery information. If the args field in the DA field in the SRH is equal to 3, the discovery information may be BFD information.

[0095] In yet another example, the indication 51 may be carried in a flags field in the SRH of the IPv6 extension header 1'. For example, if the flag in the SRH of the IPv6 extension header 1' in the packet 41 is equal to 1, it indicates that the packet 41 is a detection packet. The flag carrying the indication 51 may be any bit in the undefined flags field, or may be represented by reusing an occupied O-flag flag bit in the flags. In this example, the payload of the packet 41 may include detection information. FIG. 5a shows a schematic diagram of the format of the packet 41. The packet 41 may include an IPv6 header 1, an IPv6 extension header 1', and a payload. The IPv6 header 1 may include an SA field and a DA field. The IPv6 extension header 1' may include an SRH. The payload may include IP, UDP, and detection information. The value of the bit in the flags in the SRH may be 1, and the detection information may be BFD information.

[0096] In yet another example, in one case, the indication 51 may be carried in a type-length-value (TLV) field in a hop-by-hop (HBH) options header of the IPv6 extension header 1'. The HBH options header of the IPv6 extension header 1' includes a TLV field indicating that the packet 41 is a discovery packet. The payload of the packet 41 may include discovery information. FIG. 6a shows a schematic diagram of the format of the packet 41. The packet 41 may include an IPv6 header 1, an IPv6 extension header 1', and a payload. The IPv6 header 1 may include an SA field and a DA field. The IPv6 extension header 1' may include an HBH options header. The payload may include IP, UDP, and discovery information. The HBH options header includes a TLV field, and the discovery information may be BFD information. In another case, the indication 51 may alternatively be carried in a TLV field in a destination option header (DOH) of an IPv6 extension header 1', where the DOH of the IPv6 extension header 1' includes a TLV field indicating that the packet 41 is a discovery packet. The payload of the packet 41 may include discovery information. Figure 6b shows a schematic diagram of the format of the packet 41. The packet 41 may include an IPv6 header 1, an IPv6 extension header 1', and a payload. The IPv6 header 1 may include an SA field and a DA field. The IPv6 extension header 1' may include a DOH. The payload may include IP, UDP, and discovery information. The DOH includes a TLV field, and the discovery information may be BFD information.

[0097] In the above example, an example is used in which the packet 41 is a BFD packet to provide an explanation. If the packet 41 is an OAM packet, refer to the implementation in the above example for how to carry the instruction 51 and the identification information of the service 1. In this case, the detection information in the payload of the packet 41 may be OAM information. The OAM information may include, for example, the quantity and timestamp of the data packets sent by the PE device 11 to the PE device 12.

[0098] It should be noted that all of the above-mentioned ways in which packets 41 may carry instructions 51 are examples, and packets 41 may carry instructions 51 in any other possible way.

[0099] S102: The PE device 11 transmits a packet 41 to the PE device 12.

[0100] In some possible implementations, if a link or device through which the PE device 11 transmits the packet 41 to the PE device 12 fails and the packet 41 cannot be successfully transmitted to the PE device 12, the PE device 12 cannot receive the packet 41 transmitted by the PE device 11. Thus, the PE device 11 does not receive the response packet transmitted by the PE device 12 within a preset period of time, and can determine that the path between the PE device 11 and the CE device 22 and for carrying the service 1 has a failure. The failure content corresponding to the PE device 12 being unable to successfully receive the packet 41 may include that the link between the PE device 11 and the P device 31 has a failure, that the link between the P device 31 and the PE device 12 has a failure, that the P device 31 has a failure, or that the PE device 12 has a failure.

[0101] In some other possible implementations, the PE device 12 can successfully receive the packet 41. In other words, after S102, S103 and S104 are further included in the method 100. In this case, the detection may be performed according to the method 100. For related implementations, please refer to the following description.

[0102] S103: The PE device 12 receives the packet 41 sent by the PE device 11.

[0103] During a specific implementation, when there is a requirement to detect a path for carrying service 1, S102 and S103 may be executed to perform corresponding detection. Alternatively, the path for carrying the service may be detected periodically, specifically, S102 and S103 may be executed in each period to perform corresponding detection, and the detection period may be flexibly set based on actual requirements.

[0104] S104: Based on the instruction 51 and the identification information of service 1, the PE device 12 detects at least one of a path between the PE device 11 and the PE device 12 for carrying service 1, and a path between the PE device 12 and the CE device 22 for carrying service 1.

[0105] During a particular implementation, after receiving the packet 41, the PE device 12 can detect a path for carrying the service 1 based on the indication 51 and the identification information of the service 1 in the packet 41. In one aspect, the PE device 12 can detect a path between the PE device 11 and the PE device 12 and used to carry the service 1, for example, detect whether a link between the PE device 12 and the P device 31 is faulty, and in another example, detect whether an interface used by the PE device 12 to connect to the P device 31 is faulty. In another aspect, the PE device 12 can alternatively detect a path between the PE device 12 and an access side network device (e.g., the CE device 22) and used to carry the service 1, for example, detect whether a link between the PE device 12 and the CE device 22 is faulty, and in another example, detect whether an interface used by the PE device 12 to connect to the CE device 22 is faulty.

[0106] If the PE device 12 detects that the path for carrying service 1 is free of failures or the path quality meets the requirements, the PE device 12 can return a response packet to the PE device 11, which is used to notify the PE device 11 that the path for carrying service 1 is normal.

[0107] If PE device 12 detects that the path carrying service 1 has a failure or that the path quality does not meet the requirements, PE device 12 may not respond to packet 41, or PE device 12 may send a response packet to PE device 11 used to notify it that a failure has occurred or that the path quality does not meet the requirements.

[0108] In one example, when the PE device 12 determines that the path for carrying service 1 is faulty or the path quality does not meet the requirement, for example, when the PE device 12 recognizes that the local interface used to connect to the CE device 22 is faulty, the link used by the PE device 12 to connect to the CE device 22 is faulty, or the quality of the path used by the PE device 12 to connect to the PE device 11 does not meet the requirement (e.g., if the delay exceeds a preset delay threshold), after S104, the method may further include: the PE device 12 sending a response packet to the PE device 11; and after receiving the response packet, the PE device 11 can determine, based on the response packet, a path status of at least one of the path between the PE device 11 and the PE device 12 and for carrying service 1, and the path between the PE device 12 and the CE device 22 and for carrying service 1. The path status includes the connectivity and / or quality of the corresponding path. The response packet may include, but is not limited to, local status information of the PE device 12, status information of the link between the PE device 12 and the access-side network device, and status information of the interface used by the PE device 12 to connect to the access-side network device. In addition, the response packet may further include status information of the path between the PE device 12 and the PE device 11, and status information of the interface used by the PE device 12 to connect to the network-side network device. The PE device 11 can determine the quality and connectivity of the path for carrying the service 1 based on the response packet. Alternatively, the PE device 11 may more accurately determine the status of each path segment on the path for carrying the service 1, such as link quality or a specific failure location, based on the response packet.For example, PE device 11 may determine the status of the link between PE device 12 and P device 31, the status of the link between PE device 12 and CE device 22, the status of the interface used by PE device 12 to connect to P device 31, or the status of the interface used by PE device 12 to connect to CE device 22.

[0109] Note that in one possible case, if the entire PE device 12 fails, the PE device 12 can no longer send a response packet to the PE device 11. In another possible case, even if the PE device 12 determines that there is a failure on a path associated with the PE device 12, the PE device 12 can still notify the PE device 11 of the existence of the failure by using a response packet. For example, assuming that there is a failure on a path between the PE device 11 and the PE device 12 and for carrying service 1, the PE device 12 can select another reachable path and send a response packet to the PE device 11 to notify the PE device 11 that the path used for carrying service 1 has failed.

[0110] In another example, when the PE device 12 determines that the path for carrying the service 1 is faulty or the path quality does not meet the requirement, the PE device 12 may not send a response packet, which may specifically include, but is not limited to, not sending a response packet when it is determined that there is a fault in the detection mechanism, or not being able to send a response packet due to a fault on the link between the PE device 12 and the P device 31, a fault on the interface used by the PE device 12 to connect to the P device 31, or another reason. A preset period (e.g., 1 second) may be set in the PE device 11, and the preset period may be preset by the PE device 11 and the maximum allowable time for waiting to receive a response packet after sending a detection packet. In this case, after the preset period starting from the sending of the packet 41, the PE device 11 still does not receive the response packet sent by the PE device 12 for the packet 41, and the PE device 11 can determine that the path between the PE device 11 and the CE device 22 and for carrying the service 1 is faulty or the path quality does not meet the requirement. Cases in which the path for carrying service 1 fails may include, but are not limited to, PE device 12 fails, P device 31 fails, CE device 22 fails, the link between PE device 11 and P device 31 fails, the link between P device 31 and PE device 12 fails, the link between PE device 12 and CE device 22 fails, the interface between PE device 11 and P device 31 fails, the interface between P device 31 and PE device 12 fails, the interface between PE device 12 and CE device 22 fails, or a device, link, or interface in the customer network connected to PE device 12 fails.

[0111] In one possible implementation, if the packet 41 is a BFD packet, the PE device 11 not only sends the BFD packet to the PE device 12 to recognize whether the path between the PE device 11 and the PE device 12 and carrying the service 1 has a failure, but also recognize whether the path between the PE device 12 and the access side network device (e.g., the CE device 22) and carrying the service 1 has a failure based on the identification information of the service 1 in the BFD packet. In this way, the PE device 11 can recognize the connectivity of the entire path for carrying the service 1 by using the BFD packet, thereby achieving the effect of service-level connectivity detection.

[0112] 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 to detect the connectivity and quality of the path for carrying the service 1. Take the path quality detection as an example. In one case, for example, the process of the OAM packet realizing the path quality detection may include the PE device 11 sending the OAM packet to the PE device 12 to inform the PE device 11 of the statistical information of the service data packet sent by the PE device 11 (for example, information such as the quantity and timestamp of the data packet sent). The PE device 12 can determine the service 1 corresponding to the VPN to be detected based on the VPN SID carried in the OAM packet, process the statistical result of the received data packet obtained by the PE device 12 in the device and corresponding to the service 1 to be detected and the statistical information in the received OAM packet, and obtain the quality detection result corresponding to the path for carrying the service 1 to be detected. Then, the PE device 12 can generate an OAM response packet carrying the detection result, and send the packet to the PE device 11 to instruct the PE device 11 to obtain a quality detection result of the path for carrying the service 1 to be detected from the received OAM response packet, and determine the quality of the path for carrying the service 1 to be detected. In another case, for example, the process of the OAM packet realizing the path quality detection may alternatively include the PE device 11 sending the OAM packet to the PE device 12 to inform the PE device 12 of the statistical information of the transmitted service data packets. The PE device 12 can determine the service 1 corresponding to the VPN to be detected based on the VPN SID carried in the OAM packet, include the statistical result of the received data packets obtained by the PE device 12 and corresponding to the service 1 to be detected in the OAM packet used for response, and send the packet to the PE device 11. In this way, the PE device 11 performs processing based on the received response OAM packet, obtains a quality detection result of the path for carrying the service 1 to be detected, and determines the quality of the path for carrying the service 1 to be detected. In the above two cases, one-way detection is used as an example.In another possible case, the PE device 11 and the PE device 12 can alternatively perform bidirectional detection on the path for carrying the service. For example, the PE device 11 sends an OAM packet to the PE device 12 to inform the PE device 12 of statistics of the service data packets sent by the PE device 11, and receives a response packet sent by the PE device 12. The response packet can instruct the PE device 11 to collect statistics for the bidirectional path data packets of the service, and the response packet can further carry statistics information regarding the collection of statistics for the service data packets on the return path. The PE device 11 can determine the bidirectional path quality detection result for the service data packets based on the response packet. In this way, the OAM packet is used as a detection packet. The response packet received by the PE device 11 includes the following three items: connectivity detection result of the path for carrying service 1 (specifically, whether or not at least one of the path between the PE device 11 and the PE device 12 and for carrying service 1, and the path between the PE device 12 and the CE device 22 and for carrying service 1 has a failure); path quality detection result of the path for carrying service 1 (specifically, whether or not at least one of the path between the PE device 11 and the PE device 12 and for carrying service 1, and the path between the PE device 12 and the CE device 22 and for carrying service 1 has a failure); The path quality detection result may include at least one of: whether the quality of at least one of the paths between the PE device 11 and the PE device 12 and the path for carrying the service 1 meets the requirement; and a statistical result of the path quality of the path for carrying the service 1 (specifically, a path quality parameter of at least one of the paths between the PE device 11 and the PE device 12 and the path for carrying the service 1 and the path between the PE device 12 and the CE device 22 and the path for carrying the service 1, and the PE device 11 can process the path quality parameter to obtain a path quality detection result indicating whether the path quality meets the requirement). The path quality detection may refer to performing quality detection on a unidirectional path, or may refer to performing quality detection on a bidirectional path.

[0113] In some possible implementations, for example, S104 may include that, when the PE device 12 determines that the packet 41 is a detection packet and determines that the detection performed based on the instruction 51 is supported locally, the PE device 12 performs failure detection on the path for carrying the service 1 according to a local failure detection policy. According to the local failure detection policy, the packet 41 may be sent to a corresponding detection process, and the failure detection is performed in the corresponding detection process. For example, assuming that the packet 41 is a BFD detection packet, when it determines that the BFD detection is supported locally, the PE device 12 sends the service-related content and detection information in the BFD detection packet to the local BFD process to perform the corresponding failure detection by using the BFD process. As another example, assuming that the packet 41 is an OAM detection packet, when it determines that the OAM detection is supported locally, the PE device 12 sends the service-related content and detection information in the OAM detection packet to the local OAM instance to perform the corresponding detection in the OAM instance.

[0114] The detection performed according to the instruction 51 being locally supported may mean that the corresponding detection function of the detection indicated by the instruction 51 is enabled through a local configuration of the PE device. The service 1 may be, for example, a conventional 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 may be the content of the detection packet with the SRH removed.

[0115] In one example, when packet 41 is shown in Fig. 5a, after determining that the DA field in packet 41 matches the local VPN SID, PE device 12 can determine, based on instruction 51 in packet 41, that packet 41 is a detection packet, that PE device 12 locally supports detection performed based on instruction 51, and that PE device 12 is a device that can recognize service 1 (e.g., PE device 12 is an egress PE device). In this case, the service-related content and detection information in packet 41 are sent to a corresponding detection process to perform failure detection in the corresponding detection process.

[0116] In another example, when packet 41 is shown in Fig. 6a, after determining that the HBH options header of the IPv6 extension header 1' in packet 41 includes a TLV field for carrying an instruction 51, PE device 12 can determine, based on the instruction 51 in packet 41, that packet 41 is a detection packet, and that the detection performed based on the instruction 51 is supported locally, and PE device 12 is a device that can recognize service 1. The service-related content and detection information in packet 41 are sent to a corresponding detection process to perform failure detection in the corresponding detection process.

[0117] In yet another example, when packet 41 is shown in Fig. 6b, after determining that the DA field in packet 41 matches the local VPN SID, PE device 12 determines that the DOH of IPv6 extension header 1' in packet 41 includes a TLV field for carrying instruction 51, and can determine that packet 41 is a detection packet based on the instruction 51, and that the detection performed based on the instruction 51 is supported locally and PE device 12 is a device that can recognize service 1. The service-related content and detection information in packet 41 are sent to a corresponding detection process to perform failure detection in the corresponding detection process.

[0118] In some possible implementations, the PE device 11 may further send a service packet corresponding to the service 1 to the PE device 12. For example, the method 100 may further include the following steps: S105: The PE device 11 sends a packet 42 to the PE device 12, where the packet 42 is a service packet used to carry the service 1, and the packet 42 does not include the instruction 51.

[0119] In one case, packet 2 does not include a field for carrying the indication 51. For example, packet 41 carries the indication 51 by using a TLV field in the HBH options header of IPv6 extension header 1'. In this case, the corresponding packet 42 is shown in Figure 6b, and the HBH options header does not include a corresponding TLV field. As another example, packet 41 carries the indication 51 by using a TLV field in the DOH of IPv6 extension header 1'. In this case, the corresponding packet 42 is shown in Figure 6d, and the DOH does not include a corresponding TLV field.

[0120] In another case, the packet 42 includes a field for carrying an indication 51. The field carries the indication 52 in the packet 42. The indication 52 indicates that the packet 42 is a service packet, and the indication 52 is different from the indication 51. In one example, the packet 42 includes an IPv6 header 2, the indication 52 is carried in a next header field in the IPv6 header 2, and the indication 51 is a first value of the next header field in the IPv6 header 1. In this case, the indication 52 is a second value of the next header field in the IPv6 header 2, and the first value is different from the second value. For example, if the next header field in the IPv6 header 1 in the packet 41 is equal to 137, the corresponding packet 42 is shown in FIG. 3c, and the next header field in the IPv6 header 2 in the packet 42 is equal to 143. In another example, packet 42 includes IPv6 extension header 2', indication 52 is carried in the next header field in the SRH of IPv6 extension header 2', and indication 51 is the first value of the next header field in the SRH of IPv6 extension header 1'. In this case, indication 52 is the second value of the next header field in the SRH of IPv6 extension header 2', and the first value is different from the second value. For example, if the next header field in the SRH of IPv6 extension header 1' in packet 41 is equal to 137, the corresponding packet 42 is shown in FIG. 3d, and the next header field in the SRH of IPv6 extension header 2' in packet 42 is equal to 143. In the above examples of FIG. 3c and FIG. 3d, the values ​​of the next header fields in packet 42 are all 143, which is taken as an example. During practical application, the values ​​of the next header fields in packet 42 in FIG. 3c and FIG. 3d may alternatively be different. In yet another example, packet 42 includes IPv6 header 2, instruction 52 is carried in the args field within the DA field in IPv6 header 2, and instruction 51 is a third value of the args field within the DA field in IPv6 header 1. In this case, instruction 52 is a fourth value of the args field within the DA field in IPv6 header 2, and the third value is different from the fourth value.For example, if the args field in the DA field in IPv6 header 1 in packet 41 is equal to 3, the corresponding packet 42 is shown in FIG. 4c, and the args field in the DA field in IPv6 header 2 in packet 42 is equal to 0. In yet another example, packet 42 includes IPv6 extension header 2', and instruction 52 is carried in the args field in the DA field in the SRH of IPv6 extension header 2', and instruction 51 is a third value of the args field in the DA field in the SRH of IPv6 extension header 1'. In this case, instruction 52 is a fourth value of the args field in the DA field in the SRH of IPv6 extension header 2', and the third value is different from the fourth value. For example, if the args field in the DA field in the SRH of IPv6 extension header 1' in packet 41 is equal to 3, the corresponding packet 42 is shown in FIG. 4d, and the args field in the DA field in the SRH of IPv6 extension header 2' in packet 42 is equal to 0. In the above examples of Figures 4c and 4d, the values ​​of the DA field in the packet 42 being all 0 are used as an example. During practical application, the values ​​of the args field in the packet 42 in Figures 4c and 4d may alternatively be different. In yet another example, the packet 42 includes an IPv6 extension header 2', an indication 52 is carried in the flag field in the SRH of the IPv6 extension header 2', and an indication 51 is the fifth value of the flag field in the SRH of the IPv6 extension header 1'. In this case, the indication 52 is the sixth value of the flag field in the SRH of the IPv6 extension header 2', and the fifth value is different from the sixth value. For example, when the flag field in the SRH of the IPv6 extension header 1' in the packet 41 is equal to 1, the corresponding packet 42 is shown in Figure 5b, and the flag field in the SRH of the IPv6 extension header 2' in the packet 42 is equal to 0.

[0121] In this way, the recipient PE device 12 can identify whether the received packet is a detection packet or a service packet by analyzing the received packet, and perform corresponding processing. For example, the PE device 12 obtains the instruction 51 by analyzing the received packet 41, and determines that the packet 41 is a detection packet based on the instruction 51, and performs S104. As another example, the PE device 12 determines that the packet 42 that does not include the instruction 51 is a service packet by analyzing the packet 42, and performs corresponding operations such as forwarding the service packet according to the processing rules for the service packet.

[0122] In some possible implementations, after the PE device 11 determines that at least one of the path between the PE device 11 and the PE device 12 and for carrying the service 1 and the path between the PE device 12 and the CE device 22 and for carrying the service 1 has a failure, in order to ensure the normal execution of the service, the PE device 11 can alternatively switch the path used for carrying the service 1 to the path from the PE device 11 to the PE device 13, and the PE device 13 carries the service 1 after the switching. Before the switching, the service packets corresponding to the service 1 reach the CE device 22 through the PE device 11, the P device 31, and the PE device 12 in succession. After the switching, the service packets corresponding to the service 1 reach the CE device 22 through the PE device 11, the P device 32, the P device 33, and the PE device 13 in succession. However, regardless of whether before the switching or after the switching, the service packets corresponding to the service 2 reach the CE device 22 through the PE device 11, the P device 31, and the PE device 12 in succession. This solves the problem that in tunnel-level failure detection, after a failure is detected, all services (including service 1 and service 2) on the tunnel are switched, and after the switching, both service 1 and service 2 reach CE device 22 through PE device 11, P device 31, and PE device 12, resulting in wasted network resources, and improves the accuracy of service control.

[0123] According to the method 100 provided in this embodiment of the present application, the sender network device adds an indication and service identification information to the detection packet to be sent, so that the recipient network device can learn to accurately distinguish whether the received packet is a detection packet or a service packet. When determining that the received packet is a detection packet, the recipient network device can determine the service to be detected according to the service identification information in the detection packet, and further detect the path for carrying the service to be detected, so as to implement finer granularity and more accurate service level fault detection, provide an accurate basis for service level switching, and ensure the normal running of the service in the network.

[0124] Based on the above method embodiment, an embodiment of the present application provides an apparatus for implementing service path discovery, which is hereinafter described with reference to the accompanying drawings.

[0125] 7 is a structural schematic diagram of an apparatus 700 for implementing service path discovery according to an embodiment of the present application. The apparatus 700 is applied to a first network device, and can, for example, perform the functions of the PE device 11 in the embodiment shown in FIG. 1. The apparatus 700 can include a generating unit 701 and a sending unit 702.

[0126] The generating unit 701 is configured to generate a first packet based on the Internet Protocol version 6 IPv6, where the first packet includes a first indication and service identification information, and the first indication indicates that the first packet is a discovery packet.

[0127] When the apparatus 700 is applied to the PE device 11 shown in FIG. 1, for a specific implementation of generating a first packet by the generating unit 701, please refer to S101 in the embodiment shown in FIG.

[0128] The sending unit 702 is configured to send the first packet to the second network device, so that the second network device receiving the first packet can detect, based on the first instruction and the identification information of the service, at least one of a path between the first network device and the second network device and used to carry the service, and a path between the second network device and the access side network device and used to carry the service.

[0129] When the apparatus 700 is applied to the PE device 11 shown in FIG. 1, for a specific implementation of sending the first packet by the sending unit 702, please refer to S102 in the embodiment shown in FIG.

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

[0131] The first instruction may be carried in a first IPv6 header or a first IPv6 extension header of the first packet.

[0132] In one example, the first packet includes a first IPv6 header and the first instruction is carried in a next header field in the first IPv6 header, or the first packet includes a first IPv6 extension header and the first instruction 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 an alert label and a control word, the alert label and the control word indicating detection information in the payload of the first packet, and the detection information instructs the second network device to detect a path carrying the service based on the detection information.

[0133] In another example, the first packet includes a first IPv6 header and the first instruction is carried in an args field in a first destination address (DA) field in the first IPv6 header, or the first packet includes a first IPv6 extension header and the first instruction is carried in an args field in a first DA field in a first SRH of the first IPv6 extension header.

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

[0135] In yet another example, the first packet includes a first IPv6 extension header, and the first indication is carried in a Type-Length-Value TLV field in a Hop-by-Hop Options Header of the first IPv6 extension header, or is carried in a TLV field in a Destination Options Header of the first IPv6 extension header.

[0136] In some possible implementations, the transmitting unit 702 is further configured to transmit a second packet to the second network device, where the second packet is a service packet used to carry a service, and where the second packet does not include the first instruction.

[0137] When the apparatus 700 is applied to the PE device 11 shown in FIG. 1, for a specific implementation of sending the second packet by the sending unit 702, please refer to S105 in the embodiment shown in FIG.

[0138] The second packet may further include a second indication, where the second indication indicates that the second packet is a service packet, and where the second indication is different from the first indication.

[0139] The second indication differs from the first indication by: the second packet includes a second IPv6 header, the second indication is carried in a Next Header field within the second IPv6 header, the first indication being a first value of the Next Header field within the first IPv6 header, and the second indication being a second value of the Next Header field within the second IPv6 header; the second packet includes a second IPv6 extension header, the second indication is carried in a Next Header field within a second SRH of the second IPv6 extension header, the first indication being a first value of the Next Header field within the first SRH of the first IPv6 extension header, and the second indication being a second value of the Next Header field within the second SRH; the second packet includes a second IPv6 header, the second indication is carried in an args field within a second DA field within the second IPv6 header, and the first indication is carried in an args field within a first DA field within the first IPv6 header. the second packet includes a second IPv6 extension header, and the second instruction is carried in an args field in a second DA field in a second SRH of the second IPv6 extension header, and the first instruction is a third value of the args field in the first DA field in the first SRH of the first IPv6 extension header, and the second instruction 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, and the second instruction is carried in a flags field in the SRH of the second IPv6 extension header, and the first instruction is a fifth value of the flags field in the SRH of the first IPv6 extension header, and the second instruction is a sixth value of the flags field in the SRH of the second IPv6 extension header.

[0140] In some possible implementations, the apparatus 700 may further include a determining unit, which is configured to determine that a path between the first network device and the access side network device and used to carry a service is faulty when a response packet of the second network device to the first packet is not received within a preset period.

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

[0142] In some possible implementations, the apparatus 700 may further include a switching unit, which is configured to switch the path used to carry the service from the first network device to a path to a third network device when determining that the path used to carry the service is faulty based on the response packet of the second network device to the first packet not being received within a preset period, or determining that the path used to carry the service is faulty or does not meet a path quality requirement based on a path state, and the third network device carries the service after the switching.

[0143] For specific executable functions and implementations of the apparatus 700 for performing service path discovery, please refer to the corresponding description of the PE device 11 in the embodiment shown in Figure 2. The details will not be described again here.

[0144] Moreover, an embodiment of the present application further provides an apparatus 800 for performing service path detection. As shown in Fig. 8, the apparatus 800 is applied in a second network device, and can, for example, perform the function of the PE device 12 in the embodiment shown in Fig. 1. The apparatus 800 can include a receiving unit 801 and a detecting unit 802.

[0145] The receiving unit 801 is configured to receive a first packet sent by a first network device, the first packet including a first instruction and service identification information, and the first instruction indicates that the first packet is a detection packet.

[0146] When the apparatus 800 is applied to the PE device 12 shown in FIG. 1, for a specific implementation of receiving the first packet by the receiving unit 801, please refer to S103 in the embodiment shown in FIG.

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

[0148] When the apparatus 800 is applied to the PE device 12 shown in FIG. 1, for a specific implementation of detecting a path for carrying a service by the detection unit 802, please refer to S104 in the embodiment shown in FIG.

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

[0150] The first instruction may be carried in a first IPv6 header or a first IPv6 extension header of the first packet.

[0151] In one example, the first packet includes a first IPv6 header and the first instruction is carried in a next header field in the first IPv6 header, or the first packet includes a first IPv6 extension header and the first instruction 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 an alert label and a control word, the alert label and the control word indicating detection information in the payload of the first packet, and the detection information instructs the second network device to detect a path carrying the service based on the detection information.

[0152] In another example, the first packet includes a first IPv6 header and the first instruction is carried in an args field in a first destination address (DA) field in the first IPv6 header, or the first packet includes a first IPv6 extension header and the first instruction is carried in an args field in a first DA field in a first SRH of the first IPv6 extension header.

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

[0154] In yet another example, the first packet includes a first IPv6 extension header, and the first indication is carried in a Type-Length-Value TLV field in a Hop-by-Hop Options Header of the first IPv6 extension header, or is carried in a TLV field in a Destination Options Header of the first IPv6 extension header.

[0155] In some possible implementations, the receiving unit 801 is further configured to receive a second packet sent by the first network device, where the second packet is a service packet used to carry a service, and the second packet does not include the first instruction. When the apparatus 800 is applied to the PE device 12 shown in Fig. 1, for a specific implementation of receiving the second packet by the receiving unit 801, refer to S105 in the embodiment shown in Fig. 2.

[0156] The second packet may further include a second indication, where the second indication indicates that the second packet is a service packet, and where the second indication is different from the first indication.

[0157] The second indication differs from the first indication by: the second packet includes a second IPv6 header, the second indication is carried in a Next Header field within the second IPv6 header, the first indication being a first value of the Next Header field within the first IPv6 header, and the second indication being a second value of the Next Header field within the second IPv6 header; the second packet includes a second IPv6 extension header, the second indication is carried in a Next Header field within a second SRH of the second IPv6 extension header, the first indication being a first value of the Next Header field within the first SRH of the first IPv6 extension header, and the second indication being a second value of the Next Header field within the second SRH; the second packet includes a second IPv6 header, the second indication is carried in an args field within a second DA field within the second IPv6 header, and the first indication is carried in an args field within a first DA field within the first IPv6 header. the second packet includes a second IPv6 extension header, and the second instruction is carried in an args field in a second DA field in a second SRH of the second IPv6 extension header, and the first instruction is a third value of the args field in the first DA field in the first SRH of the first IPv6 extension header, and the second instruction 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, and the second instruction is carried in a flags field in the SRH of the second IPv6 extension header, and the first instruction is a fifth value of the flags field in the SRH of the first IPv6 extension header, and the second instruction is a sixth value of the flags field in the SRH of the second IPv6 extension header.

[0158] In some possible implementations, the apparatus 800 may further include a sending unit. The sending unit is configured to send a response packet to the first network device to instruct the first network device to determine, based on the response packet, a path status of at least one of a path between the first network device and the second network device and for carrying a service and a path between the second network device and the accessing network device and for carrying a service, the path status including at least one of a path connectivity and a path quality. The response packet sent by the second network device includes interface status information of the second network device, and the interface status information instructs the first network device to determine whether the path between the second network device and the accessing network device and for carrying a service has a failure or has a good or bad path quality.

[0159] In some possible implementations, the detection unit 802 may be specifically configured to detect a path for carrying the service according to a local detection policy when the first packet is determined to be a detection packet and the detection performed based on the first instruction is determined to be locally supported.

[0160] For specific executable functions and implementations of the apparatus 800 for performing service path discovery, please refer to the corresponding description of the PE device 12 in the embodiment shown in Figure 2. The details will not be described again here.

[0161] The aforementioned apparatus 700 for performing service path discovery may be an ingress PE device carrying a service, and the apparatus 800 for performing service path discovery may be an egress PE device carrying a service.

[0162] The service carried between the apparatus 700 for performing service path discovery and the apparatus 800 for performing service path discovery may be an L2VPN service. The L2VPN service may include, for example, a service carried by a conventional VPN technology or an EVPN technology. Both the conventional VPN service and the EVPN service may use a VLL service model or a VPLS model.

[0163] In the apparatus 700 for performing service path discovery and the apparatus 800 for performing service path discovery, the first packet may be a BFD packet or an OAM packet.

[0164] 9 is a schematic diagram of the structure of a network device 900 according to an embodiment of the present application. The network device 900 may be, for example, any PE device in the embodiment shown in FIG. 1, or may be a device implementation of the apparatus that performs service path discovery in the embodiment shown in FIG. 7 or FIG. 8.

[0165] Please refer to Fig. 9. The network device 900 includes a processor 910, a communication interface 920, and a memory 930. There may be one or more processors 910 in the network device 900, and Fig. 9 uses one processor as an example. In this embodiment of the present application, the processor 910, the communication interface 920, and the memory 930 may be connected by using a bus system or in another manner. Fig. 9 uses an example in which the processor 910, the communication interface 920, and the memory 930 are connected by using a bus system 940.

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

[0167] When network device 900 includes a first network device, processor 910 may perform related functions in the aforementioned method embodiments, such as generating a first packet including the first instruction and an identification of the service, and transmitting the first packet to a second network device. When network device 900 is a second network device, processor 910 may perform related functions in the aforementioned method embodiments, such as receiving a first packet including the first instruction and an identification of the service from the first network device, and detecting a path for carrying the service based on the first instruction and the identification of the service.

[0168] The communication interface 920 is configured to receive and transmit packets. Specifically, the communication interface 920 may include a receiving interface and a transmitting interface. The receiving interface may be configured to receive packets, and the transmitting interface may be configured to transmit packets. There may be one or more communication interfaces 920. In one possible implementation, the communication interface 920 may be configured to implement the functionality of the transmitting unit 702 shown in FIG. 7 or the receiving unit 801 shown in FIG. 8.

[0169] The memory 930 may include a volatile memory, such as a random access memory (RAM). Alternatively, the memory 930 may include a non-volatile memory, such as a flash memory, a hard disk drive (HDD), a solid-state drive (SSD). The memory 930 may also include a combination of the aforementioned types of memory. For example, the memory 930 may store identification information of the services mentioned above.

[0170] Optionally, the memory 930 stores an operating system and programs, executable modules or data structures, a subset thereof, or an extended set thereof. The programs may include various operating instructions used to perform various operations. The operating system may include various system programs for performing various basic services and processing hardware-based tasks. The processor 910 may read the programs in the memory 930 for performing the method for performing service path detection provided in the embodiments of the present application. In one possible implementation, the memory 930 may store program code, such as program code used to implement the functionality of the generating unit 701 shown in FIG. 7 or the detecting unit 802 shown in FIG. 8.

[0171] The memory 930 may be a memory component within the network device 900 or may be a storage device separate from the network device 900 .

[0172] The bus system 940 may be a peripheral component interconnect (PCI) bus, an extended industry standard architecture (EISA) bus, etc. The bus system 940 may be classified as an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used to represent a bus in FIG. 9, but this does not mean that there is only one bus or only one type of bus.

[0173] 10 is a schematic diagram of the structure of another network device 1000 according to an embodiment of the present application. The network device 1000 may be configured as any PE device in the embodiment shown in FIG. 1, or may be a device implementation of the apparatus that performs service path discovery in the embodiment shown in FIG. 7 or FIG. 8.

[0174] The network device 1000 includes a main control board 1010 and an interface board 1030 .

[0175] The main control board 1010 is also called a main processing unit (MPU) or a route processor card. The main control board 1010 controls and manages each component in the network device 1000, including functions of route calculation, device management, device maintenance, and protocol processing. The main control board 1010 includes a central processing unit 1011 and a memory 1012.

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

[0177] A central processing unit 1031 on the interface board 1030 is configured to control and manage the interface board 1030 and to communicate with a central processing unit 1011 on the main control board 1010 .

[0178] The network processor 1032 is configured to perform packet forwarding processing. The network processor 832 may take the form of a forwarding chip. Specifically, the processing of an uplink packet includes processing the inbound interface of the packet and searching a forwarding table, and the processing of a downlink packet includes searching a forwarding table, etc.

[0179] The physical interface card 1033 is configured to implement a physical layer interconnect function, whereby original traffic enters the interface board 1030 and processed packets are sent out from the physical interface card 1033. The physical interface card 1033 includes at least one physical interface, which is also called a physical interface. The physical interface card 1033 may also be called a sub card and may be installed in the interface board 1030, and is responsible for converting optical / electrical signals into packets, performing validity checks on the packets, and forwarding the packets to the network processor 1032 for processing. In some embodiments, the central processing unit 831 of the interface board 1030 may alternatively perform the functions of the network processor 1032, for example, implementing software forwarding based on a general-purpose CPU, whereby the network processor 1032 is not required in the physical interface card 1033.

[0180] 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 processing unit 1041, a network processor 1042, a forwarding entry memory 1044, and a physical interface card 1043.

[0181] Optionally, the network device 1000 further includes a switching board 1020. The switching board 1020 may also be referred to as a switch fabric unit (SFU). When the network device has multiple interface boards 1030, the switching board 1020 is configured to complete data exchange between the interface boards. For example, the interface board 1030 and the interface board 1040 can communicate with each other by using the switching board 820.

[0182] The main control board 1010 and the interface board 1030 are coupled together. For example, the main control board 1010, the interface board 1030, the interface board 1040, and the switching board 1020 are connected to a system backplane by using a system bus to implement interworking. In one possible implementation, an inter-process communication (IPC) channel is established between the main control board 1010 and the interface board 1030, and communication is performed between the main control board 1010 and the interface board 1030 by using the IPC channel.

[0183] Logically, the network device 1000 includes a control plane and a forwarding plane. The control plane includes a main control board 1010 and a central processing unit 1031, and the forwarding plane includes components that perform forwarding, such as a forwarding entry memory 1034, a physical interface card 1033, and a network processor 1032. The control plane performs functions such as router, forwarding table generation, signaling and protocol packet processing, and device state configuration and maintenance. The control plane distributes the generated forwarding table to the forwarding plane. In the forwarding plane, the network processor 1032 searches the table and forwards packets received by the physical interface card 1033 based on the forwarding table distributed by the control plane. The forwarding table distributed by the control plane can be stored in the forwarding entry memory 1034. In some embodiments, the control plane and the forwarding plane may be completely separate and are not on the same device.

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

[0185] When the network device 1000 is configured as a second network device, the central processing unit 1011 can receive a first packet from the first network device, the first packet including a first instruction and an identification information of a service, and detect a path for carrying the service based on the first instruction 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.

[0186] It should be understood that the sending unit 702 etc. in the apparatus 700 performing service path discovery may be equivalent to the physical interface card 1033 or the physical interface card 1043 in the network device 1000. The generating unit 701 etc. in the apparatus 700 performing service path discovery may be equivalent to the central processing unit 1011 or the central processing unit 1031 in the network device 1000. The receiving unit 801 etc. in the apparatus 800 performing service path discovery may be equivalent to the physical interface card 1033 or the physical interface card 1043 in the network device 1000. The detecting unit 802 etc. in the apparatus 800 performing service path discovery may be equivalent to the central processing unit 1011 or the central processing unit 1031 in the network device 1000.

[0187] It should be understood that in this embodiment of the present application, the operations on the interface board 1040 are the same as those on the interface board 1030. For the sake of brevity, the details will not be described again. It should be understood that the network device 1000 in this embodiment may correspond to any node in the aforementioned method embodiments. The main control board 1010, the interface board 1030, and / or the interface board 1040 in the network device 1000 may perform the functions and / or various steps performed by any node in the aforementioned method embodiments. For the sake of brevity, the details will not be described again here.

[0188] It should be understood that there may be one or more main control boards, and when there are multiple main control boards, an active main control board and a standby main control board may be included. There may be one or more interface boards. The more powerful the data processing capability of the network device, the more interface boards are provided. Alternatively, there may be one or more physical interface cards in the interface board. There may be no switching board, or there may be one or more switching boards. When there are multiple switching boards, the switching boards can jointly implement load balancing and redundant backup. In a centralized forwarding architecture, a switching board may not be required in the network device, and the interface board handles the service data of the entire system. In a distributed forwarding architecture, the network device may have at least one switching board, and the switching board is used to implement data exchange between multiple interface boards to provide large-capacity data exchange and processing capabilities. Thus, the data access and processing capabilities of the network device in the distributed architecture are greater than those of the device in the centralized architecture. Optionally, the form of the network device may alternatively be one in which there is only one board, i.e., there is no switching board, and the functions of the interface board and the main control board are integrated on the board. In this case, the central processor on the interface board and the central processor on the main control board may be combined into one central processor on the board, with the overlapped functions performed by the two central processors. Devices of this type (e.g., network devices such as low-end switches or routers) have low data exchange and processing capabilities. The architecture used depends on the particular networking deployment scenario.

[0189] In some possible embodiments, the aforementioned nodes may be implemented as virtualization devices. For example, the virtualization device may be a virtual machine (English: Virtual Machine, VM) that executes a program used to send packet functions, and the virtual machine is deployed on a hardware device (e.g., a physical server). A virtual machine is a complete computer system that is simulated by software, has a complete hardware system function, and runs in a completely isolated environment. A virtual machine may be configured as each node. For example, each node may be implemented based on a general-purpose physical server combined with Network Functions Virtualization (NFV) technology. Each node is a virtual host, a virtual router, or a virtual switch. Those skilled in the art can virtualize nodes with the aforementioned functions on a general-purpose physical server by reading this application with reference to NFV technology. Details will not be described again here.

[0190] It should be understood that the network device in the form of the aforementioned product has any function of each node in the aforementioned method embodiments, and the details will not be described again here.

[0191] An embodiment of the present application further provides a network system 1100, as shown in Figure 11. The network system 1100 may include a first network device 1101 and a second network device 1102. The first network device 1101 may be the PE device 11 shown in Figure 1, the apparatus 700 for performing service path discovery shown in Figure 7, the network device 900 configured as the first network device shown in Figure 9, or the network device 1000 configured as the first network device shown in Figure 10. The second network device 1102 may be the PE device 12 shown in Figure 1, the apparatus 800 for performing service path discovery shown in Figure 8, the network device 900 configured as the second network device shown in Figure 9, or the network device 1000 configured as the second network device shown in Figure 10.

[0192] An embodiment of the present application further provides a chip including a processor and an interface circuit. The interface circuit is configured to receive an instruction and send the instruction to the processor. The processor may be, for example, a specific implementation of the device 700 for performing service path detection shown in FIG. 7 and configured to perform the aforementioned method. As another example, the processor may be a specific implementation of the device 800 for performing service path detection shown in FIG. 8 and configured to perform the aforementioned method. The processor is coupled to a memory. The memory is configured to store a program or instruction. When the program or instruction is executed by the processor, the chip system is enabled to perform the method in any one of the aforementioned method embodiments.

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

[0194] Optionally, alternatively, there may be one or more memories in the chip system. The memory may be integrated with the processor or may be located separately from the processor. This is not limited in this application. For example, the memory may be a non-transitory processor, such as a read-only memory ROM. The memory and the processor may be integrated in the same chip or may be located separately in different chips. The type of memory and the manner of arranging the memory and the processor are not specifically limited in this application.

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

[0196] An embodiment of the present application further provides a computer-readable storage medium including instructions or a computer program, which, when executed on a computer, enables the computer to execute the method for implementing service path discovery provided in the aforementioned embodiment.

[0197] An embodiment of the present application further provides a computer program product including instructions or a computer program, which, when executed on a computer, enables the computer to execute the method for implementing service path discovery provided in the aforementioned embodiment.

[0198] In the specification, claims, and accompanying drawings of this application, the terms "first," "second," "third," "fourth," etc. (when present) are intended to distinguish between similar objects and do not necessarily indicate a particular order or sequence. It is to be understood that data used in such manner may be paraphrased in appropriate circumstances, such that the embodiments described herein may be performed in an order other than that illustrated or described herein. Furthermore, terms such as "comprise," "have," and any variations thereof are intended to cover a non-exclusive inclusion. For example, a process, method, system, product, or device that includes a series of steps or units is not necessarily limited to the explicitly recited steps or units, and may include other steps or units that are not explicitly recited or that are inherent in such process, method, product, or device.

[0199] For the purpose of convenience and concise description, the detailed work processes of the above-mentioned systems, devices and units may be clearly understood by those skilled in the art by referring to the corresponding processes in the above-mentioned method embodiments, and the details will not be described again here.

[0200] In some embodiments provided in the present application, it should be understood that the disclosed system, device, and method may be implemented in other manners. For example, the described device embodiment is merely an example. For example, the division into units is merely a logical service division, and other divisions may be made during actual implementation. For example, multiple units or components may be combined or integrated into another system, or some functions may be ignored or not performed. Furthermore, the shown or discussed mutual couplings or direct couplings or communication connections may be implemented through some interfaces. Indirect couplings or communication connections between devices or units may be implemented in electronic, mechanical, or other forms.

[0201] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, and may be located in one location or distributed across multiple network units. Some or all of the units may be selected based on actual requirements to achieve the objectives of the solutions of the embodiments.

[0202] Furthermore, the service units in the embodiments of the present application may be integrated into one processing unit, each of the units may exist physically alone, or two or more units may be integrated into one unit. The integrated unit may be implemented in the form of hardware or in the form of a software service unit.

[0203] When the integrated unit is implemented in the form of a software service unit and sold or used as an independent product, the integrated unit may be stored in a computer-readable storage medium. Based on such understanding, the technical solution of the present application in essence, or the part contributing to the prior art, or all or part of the technical solution may be implemented in the form of a software product. The computer software product is stored in a storage medium and includes some instructions for instructing a computer device (which may be a personal computer, a server, a network device, etc.) to execute all or some of the steps of the method described in the embodiments of the present application. The aforementioned storage medium includes various media that can store program code, such as USB flash drives, removable hard disks, Read-Only Memory (ROM), Random Access Memory (RAM), magnetic disks, and optical disks.

[0204] Those skilled in the art should recognize that in one or more of the foregoing examples, the services described in the present invention may be implemented by using hardware, software, firmware, or any combination thereof. When the services are implemented by using software, the aforementioned services may be stored on or transmitted as one or more instructions or code on a computer-readable medium. Computer-readable media includes computer storage media and communication media, and communication media includes any medium that facilitates the transfer of a computer program from one place to another. Storage media may be any available medium accessible to a general purpose or special purpose computer.

[0205] The objectives, technical solutions and beneficial effects of the present invention are further described in detail in the above specific implementations. It should be understood that the above are only specific implementations of the present invention.

[0206] The above embodiments are merely intended 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 above embodiments, those skilled in the art can still easily understand the technical solutions of the embodiments of the present application. Example It should be understood that modifications can be made to the technical solutions described in the above embodiments, or equivalent substitutions can be made for some technical features thereof, without departing from the scope.

Claims

1. A method for performing service path discovery in a network system including a first network device, a second network device, and an access-side network device, the method being applied to a segment routing over Internet Protocol version 6 (SRv6) network, the second network device being connected to the first network device through a tunnel, the access-side network device being connected to the second network device, generating, by the first network device, a first packet based on Internet Protocol version 6 (IPv6), the first packet including a first indication and a service identification, the first indication indicating that the first packet is a discovery packet; transmitting, by the first network device, the first packet to the second network device, and instructing the second network device receiving the first packet to detect, based on the first instruction and the identification information of the service, at least one path failure or path quality of a path between the first network device and the second network device and used to carry the service, and a path between the second network device and the access side network device and used to carry the service; Including, the first packet includes a first IPv6 extension header, the first instruction is carried in the first IPv6 extension header of the first packet, the first IPv6 extension header of the first packet further includes an alert label and a control word, the alert label and the control word indicate discovery information in a payload of the first packet, and the discovery information instructs the second network device to discover the path for carrying the service based on the discovery information.

2. The first instruction is carried in a Next Header field in a first Segment Routing Header (SRH) of the first IPv6 extension header. The method of claim 1.

3. The method of claim 1, wherein the first instruction is carried in an args field within a first DA field within a first SRH of the first IPv6 extension header.

4. The method of claim 1, wherein the first instruction is carried in a flags field in an SRH of the first IPv6 extension header.

5. The method of claim 1, wherein the first instruction is carried in a Type-Length-Value (TLV) field in a Hop-by-Hop (HBH) Options Header of the first IPv6 extension header, or is carried in a TLV field in a Destination Options Header (DOH) of the first IPv6 extension header.

6. The method comprises:

6. The method according to claim 1, further comprising the step of determining, by the first network device, that a path between the first network device and the access side network device and used to carry the service has failed if the first network device does not receive a response packet of the second network device to the first packet within a preset period of time.

7. The method comprises: receiving, by the first network device, a response packet from the second network device to the first packet; determining, by the first network device, based on the response packet, a path status of the path between the second network device and the access side network device and used to carry the service; The method of claim 6 further comprising:

8. The method comprises: when the first network device determines that the path used to carry the service has a failure based on the first network device not receiving the response packet of the second network device to the first packet within the preset period, or determines that the path used to carry the service has a failure or does not meet a path quality requirement based on the path status, switching the path used to carry the service from the first network device to a path to a third network device, the third network device carrying the service after the switching; The method of claim 7 further comprising:

9. A method for performing service path discovery in a network system including a first network device, a second network device, and an access-side network device, the method being applied to a segment routing over Internet Protocol version 6 (SRv6) network, the second network device being connected to the first network device through a tunnel, the access-side network device being connected to the second network device, receiving, by the second network device, a first packet transmitted by the first network device, the first packet including a first indication and a service identification, the first indication indicating that the first packet is a detection packet; detecting, by the second network device, based on the first instruction and the identification information of the service, at least one path failure or path quality of a path between the first network device and the second network device and used to carry the service, and a path between the second network device and the access side network device and used to carry the service; Including, the first packet includes a first IPv6 extension header, the first instruction is carried in the first IPv6 extension header of the first packet, the first IPv6 extension header of the first packet further includes an alert label and a control word, the alert label and the control word indicate discovery information in a payload of the first packet, and the discovery information instructs the second network device to discover the path for carrying the service based on the discovery information.

10. The method of claim 1 , wherein the first packet is a Bidirectional Forwarding Detection (BFD) packet; or the first packet is an Operation, Administration and Maintenance (OAM) packet.

11. A network system, the network system being applied to a segment routing over Internet Protocol version 6 (SRv6) network, the network system including a first network device and a second network device; The first network device is configured to implement a method according to any one of claims 1 to 8 and 10, and the second network device is configured to implement a method according to any one of claims 9 to 10. Network system.

12. 1. A network device, comprising: a memory, the memory containing computer readable instructions; a processor in communication with the memory, the processor configured to execute the computer readable instructions to enable the network device to perform the method of any one of claims 1 to 10; Network devices, including:

13. A computer program product causing a processor to carry out a method according to any one of claims 1 to 10.

Citation Information

Patent Citations

  • System and method for detecting network virtualization (NVGRE) segment data path failures using generic routing encapsulation

    JP2016522646A

  • Operations, administration, and management fields for packet transport

    US20110222412A1

  • Label stack encoding and processing to enable OAM procedures for service segments in segment routed (SR) networks

    US20150263940A1