Detection methods and devices

By receiving path attribute values ​​from reflected messages and combining them with local configuration, the session state is dynamically updated, solving the problem of inflexible path fault detection in SRv6 TE Policy and enabling network devices to accurately determine paths and be more flexible.

CN116389548BActive Publication Date: 2026-03-10NEW H3C TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-01-31
Publication Date
2026-03-10

AI Technical Summary

Technical Problem

The existing segment routing traffic engineering policy (SRv6 TE Policy) cannot maintain its own state through messages between network devices, resulting in inflexible path failure detection, which may lead to incorrect path disconnection or unidentified path failure.

Method used

By receiving and analyzing the path attribute values ​​in the reflected messages, combined with the locally configured link expectation attribute values ​​and the probe mode, the session state is dynamically updated to keep the session in an up or down state, thereby increasing the network's flexibility and accuracy using a loose mode.

Benefits of technology

It improves the accuracy and flexibility of network devices in determining paths without increasing the number of packets or the burden on the link. It has strong compatibility and is suitable for network devices that do not support reflected packets.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116389548B_ABST
    Figure CN116389548B_ABST
Patent Text Reader

Abstract

This application provides a detection method and apparatus. The method is applied to a first node, and the first node and a second node have established a session. The method includes: receiving a reflection message sent by the second node, the reflection message including a first path attribute value, the first path attribute value being used to indicate a first path from the second node to the first node; obtaining a configured link expectation attribute value and a detection mode from a local source; if the link expectation attribute value is different from the first path attribute value and the detection mode is a loose mode, then keeping the session in an up state.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of communication technology, and in particular to a detection method and apparatus. Background Technology

[0002] Currently, the Segment Routing Traffic Engineering Policy (SRv6 TE Policy) provides a flexible forwarding path selection method to meet different user forwarding needs. However, it cannot maintain its own state through messages sent between network devices. Therefore, path failure detection of SRv6 TE Policy needs to rely on Seamless BFD (SBFD). SBFD detects the connectivity of SRv6 TE Policy and provides millisecond-level failure detection speed, enabling rapid failover.

[0003] The sending end generates and redirects probe packets to be forwarded within the SRv6 TE Policy, and determines the connectivity of the path between the sending end and the reflecting end based on whether a reflection packet is received.

[0004] In the first implementation, to ensure consistency between the outbound and return paths of packets, static paths or customized features (such as the "keep last hop" feature, a product-customized feature for Equal Cost Multipath (ECMP) scenarios where network devices record the packet's exit location, allowing packets to return from the same point, thus providing a means of sensing where packets leave the network) can be configured to force the return path to be consistent with the outbound path. When the configured return path is unavailable, the reflected packet cannot be forwarded normally, triggering the sending end to determine a path failure between itself and the reflecting end, and updating the established session between the two ends to "down".

[0005] In the second implementation, when the reflecting end sends the reflected message, it uses the route optimization method for forwarding. That is, as long as there is a path to perform forwarding, the reflected message can reach the transmitting end. The transmitting end determines that the path between itself and the reflecting end is normal and keeps the session established between the two ends up.

[0006] Both of the above methods allow the sender to determine path connectivity; however, neither method is flexible enough for the following reasons: 1) The first implementation method may lead to some services that are highly tolerant of reverse traffic (for example, users do not care whether certain reverse traffic flows are consistent with the forward traffic path, as long as the path is normal), in scenarios where the backhaul path fails but other paths can reach the sender, the sender may mistakenly disconnect the service; 2) The second implementation method will prevent the sender from perceiving the source of the reflected message, focusing only on whether a backhaul message has been received. Some services that are more sensitive to the backhaul path may mistakenly assume that the path meets expectations, when in fact the path has failed. Summary of the Invention

[0007] In view of this, this application provides a detection method and apparatus to enable the sending end to obtain path information through reflected messages and update the session state, so that the upper layer application can also perform flexible session state switching or forwarding path adjustment based on the session state update information.

[0008] In a first aspect, this application provides a detection method, which is applied to a first node, wherein the first node and a second node have established a session, and the method includes:

[0009] The second node receives a reflected message, which includes a first path attribute value, which indicates a first path from the second node to the first node.

[0010] Obtain the configured link expected attribute values ​​and probe mode locally;

[0011] If the expected link attribute value is different from the first path attribute value and the detection mode is loose mode, then the session remains in the up state.

[0012] Secondly, this application provides a detection method, which is applied to a second node, the second node having established a session with a first node, the method comprising:

[0013] The system receives probe messages sent by the first node through the first interface. The probe messages include link attribute identifiers and probe mode identifiers.

[0014] If the link attribute identifier value is a first value, then the first path attribute value is obtained from the local machine. The first path attribute value is used to indicate the first path from the second node to the first node.

[0015] A reflection message is sent to the first node through the second interface. The reflection message includes the link attribute identifier, the probe mode identifier, and the first path attribute value, so that the first node keeps the session in the up state after determining that the expected link attribute value is different from the first path attribute value and the probe mode indicated by the probe mode identifier is the loose mode.

[0016] Thirdly, this application provides a detection device, which is applied to a first node, wherein the first node and a second node have established a session, and the device includes:

[0017] A receiving unit is configured to receive a reflected message sent by a second node, the reflected message including a first path attribute value, the first path attribute value being used to indicate a first path from the second node to the first node;

[0018] The acquisition unit is used to obtain the configured link expected attribute values ​​and detection mode from the local machine;

[0019] The processing unit is configured to keep the session in an up state if the expected link attribute value is different from the first path attribute value and the detection mode is a loose mode.

[0020] Fourthly, this application provides a detection device applied to a second node, the second node having established a session with a first node, the device comprising;

[0021] The receiving unit is configured to receive a probe message sent by the first node through a first interface, wherein the probe message includes a link attribute identifier and a probe mode identifier;

[0022] The acquisition unit is configured to acquire a first path attribute value from the local machine if the link attribute identifier value is a first value, wherein the first path attribute value is used to indicate a first path from the second node to the first node;

[0023] The sending unit is configured to send a reflection message to the first node through the second interface. The reflection message includes the link attribute identifier, the probe mode identifier, and the first path attribute value, so that after the first node determines that the expected link attribute value is different from the first path attribute value and the probe mode indicated by the probe mode identifier is a loose mode, the session remains in the up state.

[0024] Fifthly, this application provides a network device including a processor and a machine-readable storage medium storing machine-executable instructions that can be executed by the processor, which in turn cause the processor to perform the method provided in the first aspect of this application.

[0025] In a sixth aspect, this application provides a network device including a processor and a machine-readable storage medium storing machine-executable instructions that can be executed by the processor, which in turn cause the processor to perform the method provided in the second aspect of this application.

[0026] Therefore, by applying the detection method and apparatus provided in this application, the first node receives a reflection message sent by the second node, the reflection message including a first path attribute value, the first path attribute value being used to indicate the first path from the second node to the first node; the first node obtains the configured link expected attribute value and detection mode from its local machine; if the link expected attribute value is different from the first path attribute value and the detection mode is loose mode, the first node keeps the session in the up state.

[0027] Thus, updating the session state using the first path attribute value included in the reflected message does not increase the number of messages within the link, nor does it add any extra burden to the link; the communication process is simple and feasible, with minimal impact on network device performance; it has strong compatibility, and can still maintain normal session establishment even for network devices that do not support carrying the first path attribute value in the reflected message; network devices can make more accurate judgments about the link, and upper-layer applications can make corresponding adjustments to the session and path based on richer link information, increasing the flexibility of the network. Attached Figure Description

[0028] Figure 1 A flowchart illustrating a detection method provided in an embodiment of this application;

[0029] Figure 2 A flowchart of another detection method provided in the embodiments of this application;

[0030] Figure 3 This is a schematic diagram of the SBFD session detection network provided in an embodiment of this application;

[0031] Figure 4 A structural diagram of a detection device provided in an embodiment of this application;

[0032] Figure 5 Another structural diagram of a detection device provided in the embodiments of this application;

[0033] Figure 6 The network device hardware structure provided in the embodiments of this application. Detailed Implementation

[0034] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numerals in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.

[0035] The terminology used in this application is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. The singular forms “a,” “the,” and “the” used in this application and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used herein refers to and includes any or all possible combinations of one or more of the corresponding listed items.

[0036] It should be understood that although the terms first, second, third, etc., may be used in this application to describe various information, such information should not be limited to these terms. These terms are only used to distinguish information of the same type from one another. For example, without departing from the scope of this application, first information may also be referred to as second information, and similarly, second information may also be referred to as first information. Depending on the context, the word "if" as used herein may be interpreted as "when," "when," or "in response to determination."

[0037] The detection method provided in the embodiments of this application will be described in detail below. See also Figure 1 , Figure 1 This is a flowchart illustrating a detection method provided in an embodiment of this application. The method is applied to a first node and may include the following steps.

[0038] Step 110: Receive a reflection message sent by the second node, the reflection message including a first path attribute value, the first path attribute value being used to indicate the first path from the second node to the first node;

[0039] Specifically, a session has been established between the first node and the second node, and there are multiple communication paths between the first node and the second node.

[0040] Optionally, an SRv6 TE Policy is configured within the first node, which indicates a second path from the first node to the second node.

[0041] Both the first and second nodes are configured with and enabled for SBFD session probing. The first node, wanting to probe the connectivity of the second path, generates a probe packet. This probe packet includes a link attribute identifier and a probe mode identifier. The first node redirects the probe packet to the SRv6 TE Policy and then sends probe packets to the second node via the second path.

[0042] It is understandable that each node along the probe message path can forward the probe message according to the existing SRv6 protocol, which will not be repeated here.

[0043] After receiving the probe message, the second node retrieves the link attribute identifier and probe mode identifier from it. The second node identifies the link attribute identifier value; if the link attribute identifier value is a first value (e.g., the first value is 1), the second node determines that the probe message involves a link attribute. The second node retrieves a first path attribute value from its local machine (e.g., the first path attribute value is 3), which is used to indicate the first path from the second node to the first node.

[0044] The second node generates a reflected message, which includes the first path attribute value. The second node sends the reflected message to the first node via the first path. Upon receiving the reflected message, the first node retrieves the first path attribute value from it.

[0045] It should be noted that the process of the second node obtaining the first path attribute value from the local machine will be explained in subsequent embodiments and will not be repeated here.

[0046] Optionally, the aforementioned probe message includes a flow label, which includes a link attribute field and a probe mode field; the flow label field includes 20 bits, with the link attribute field and the probe mode field each occupying 1 bit, and the remaining bits set to 0.

[0047] The aforementioned reflected message includes a flow label, which includes a link attribute field, a probe mode field, and a path attribute value field. The flow label field includes 20 bits, with the link attribute field and probe mode field each occupying 1 bit, the path attribute value field occupying 4 bits and carrying the first path attribute value, and the remaining bits being 0.

[0048] In practical applications, if the flow label is not used, it is normally set to all zeros. The link attribute field, probe mode field, and path attribute value field can occupy any number of bits. If some bits of the flow label have been used, the link attribute field, probe mode field, and path attribute value field can occupy the unused bits.

[0049] Step 120: Obtain the configured link expected attribute values ​​and probe mode from the local machine;

[0050] Specifically, according to the description of step 110, after the first node obtains the first path attribute value from the reflected message, it obtains the configured link expected attribute value and the detection mode from the local machine.

[0051] Furthermore, the reflected message also includes the source address and the destination address. The first node also obtains the source address or destination address from the reflected message, and determines the session to which the reflected message belongs based on the source address or destination address.

[0052] After the first node determines the session, it obtains the expected link attribute value configured for that session from the local machine (e.g., the expected link attribute value is 1) and the configured probe mode (e.g., the probe mode is loose mode).

[0053] The above-described configuration of the expected link attribute values ​​and detection mode locally will be explained in subsequent embodiments and will not be repeated here.

[0054] Step 130: If the expected link attribute value is different from the first path attribute value and the detection mode is loose mode, then keep the session in the up state.

[0055] Specifically, according to the description of step 120, after the first node obtains the expected link attribute value and the detection mode, it compares whether the expected link attribute value is the same as the first path attribute value.

[0056] If the expected link attribute value is different from the first path attribute value, the first node determines that the first path is not the pre-configured packet return path, meaning the packet outbound path and packet return path are different. Meanwhile, if the probe mode is loose mode, the first node determines that the packet outbound path can be different from the packet return path. In this case, the first node keeps the session in the up state.

[0057] Optionally, if the expected link attribute value is different from the first path attribute value, the first node determines that the first path is not the pre-configured packet return path, that is, the packet outbound path and the packet return path are different. Simultaneously, if the probe mode is strict mode, the first node determines that the packet outbound path and the packet return path should be the same. In this case, the first node sets the session to the down state.

[0058] If the expected attribute value of the link is the same as the attribute value of the first path, then the first node determines that the first path is the pre-configured packet return path, that is, the packet outbound path and the packet return path are the same. At this time, the first node keeps the session in the up state.

[0059] Therefore, by applying the detection method and apparatus provided in the embodiments of this application, the first node receives a reflection message sent by the second node. The reflection message includes a first path attribute value, which is used to indicate the first path from the second node to the first node. The first node obtains the configured link expected attribute value and the detection mode from its local machine. If the link expected attribute value is different from the first path attribute value and the detection mode is loose mode, the first node keeps the session in the up state.

[0060] Thus, updating the session state using the first path attribute value included in the reflected message does not increase the number of messages within the link, nor does it add any extra burden to the link; the communication process is simple and feasible, with minimal impact on network device performance; it has strong compatibility, and can still maintain normal session establishment even for network devices that do not support carrying the first path attribute value in the reflected message; network devices can make more accurate judgments about the link, and upper-layer applications can make corresponding adjustments to the session and path based on richer link information, increasing the flexibility of the network.

[0061] Optionally, before executing step 110, the first node also performs the process of receiving configuration instructions and configuring locally according to the configuration instructions.

[0062] Specifically, the user inputs configuration commands to the first node via command line. These configuration commands include expected link attribute values, session identifiers, and probe mode identifiers.

[0063] After receiving the configuration command, the first node obtains the expected link attribute value, session identifier, and probe mode identifier from it. The first node binds the expected link attribute value with the session indicated by the session identifier and stores the probe mode identifier locally.

[0064] The expected link attribute value is used to indicate the path that the user expects the second node to reach the first node.

[0065] Optionally, in this embodiment of the application, the process of the first node generating and sending a notification message to the upper-layer application is also included.

[0066] Specifically, after executing step 130, the first node generates a notification message, which includes a path differentiation identifier. The first node then sends the notification message to the upper-layer application.

[0067] After receiving the notification message, the upper-layer application retrieves the path differentiation identifier. Based on this identifier, the upper-layer application determines that the outbound path (i.e., the second path) and the return path (i.e., the first path) are different. Depending on its own functional attributes, the upper-layer application either keeps the session in an up state, sets the session to a down state, or switches the path.

[0068] For example, when the upper-layer application uses the IGP protocol, the outbound and return paths of a message can be different. In this case, if the IGP protocol determines that the paths are different, the session can continue to be in the up state. When the upper-layer application uses the LDP protocol, the outbound and return paths of a message should be the same. In this case, if the IGP protocol determines that the paths are different, the session can be set to the down state, or a path switch can be performed to ensure that the paths are the same.

[0069] The above applications can also include ISIS protocol, OFPS protocol, L3VPN, L2VPN, etc.

[0070] The detection method provided in the embodiments of this application will be described in detail below. See also Figure 2 , Figure 2 A flowchart of another detection method provided in an embodiment of this application. This method is applied to a second node, and the detection method provided in this application embodiment may include the following steps.

[0071] Step 210: Receive the probe message sent by the first node through the first interface. The probe message includes a link attribute identifier and a probe mode identifier.

[0072] Specifically, a session has been established between the first node and the second node, and there are multiple communication paths between the first node and the second node.

[0073] Optionally, an SRv6 TE Policy is configured within the first node, which indicates a second path from the first node to the second node.

[0074] Both the first and second nodes are configured with and enabled for SBFD session probing. The first node, wanting to probe the connectivity of the second path, generates a probe packet. This probe packet includes a link attribute identifier and a probe mode identifier. The first node redirects the probe packet to the SRv6 TE Policy and then sends probe packets to the second node via the second path.

[0075] It is understandable that each node along the probe message path can forward the probe message according to the existing SRv6 protocol, which will not be repeated here.

[0076] After receiving the probe message through the first interface, the second node obtains the link attribute identifier and probe mode identifier from it.

[0077] Optionally, the aforementioned probe message includes a flow label, which includes a link attribute field and a probe mode field; the flow label field includes 20 bits, with the link attribute field and the probe mode field each occupying 1 bit, and the remaining bits set to 0.

[0078] In practical applications, if the flow label is not used, it is normally set to all 0s. The link attribute field and probe mode field mentioned above can occupy any number of bits. If some bits of the flow label have been used, the link attribute field and probe mode field can occupy the unused bits.

[0079] Step 220: If the link attribute identifier value is a first value, then obtain the first path attribute value from the local machine. The first path attribute value is used to indicate the first path from the second node to the first node.

[0080] Specifically, according to the description of step 210, after the second node obtains the link attribute identifier and the probe mode identifier, the second node identifies the link attribute identifier value. If the link attribute identifier value is the first value (for example, the first value is 1), the second node determines that the probe message involves a link attribute.

[0081] The second node obtains the first path attribute value from its local machine (for example, the first path attribute value is 3), which is used to indicate the first path from the second node to the first node.

[0082] Optionally, the aforementioned probe message also includes the source address; the process by which the second node obtains the first path attribute value from its local machine is as follows:

[0083] Based on the source address, the second node searches its local routing table for a routing table entry that matches the source address (i.e., the first node indicated by the source address). If a matching routing table entry is found, the second node obtains the outgoing interface identifier (e.g., the interface identifier of the second interface) from the matching routing table entry. Under the outgoing interface indicated by the outgoing interface identifier (e.g., the second interface), the second node obtains the first path attribute value.

[0084] It is understandable that when the second node determines the interface by looking up the table, the second interface may be the same as or different from the first interface.

[0085] Step 230: Send a reflection message to the first node through the second interface. The reflection message includes the link attribute identifier, the probe mode identifier, and the first path attribute value, so that after the first node determines that the expected link attribute value is different from the first path attribute value and the probe mode indicated by the probe mode identifier is loose mode, it keeps the session in the up state.

[0086] Specifically, according to the description in step 220, after the second node obtains the first path attribute value, it generates a reflection message. This reflection message includes a link attribute identifier, a probe mode identifier, and the first path attribute value. It can be understood that the link attribute identifier and probe mode identifier included in the reflection message inherit from those included in the probe message. The second node sends the reflection message to the first node through the second interface.

[0087] Optionally, the aforementioned reflected message includes a flow label, which includes a link attribute field, a probe mode field, and a path attribute value field. The flow label field includes 20 bits, with the link attribute field and probe mode field each occupying 1 bit, the path attribute value field occupying 4 bits and carrying the first path attribute value, and the remaining bits being set to 0.

[0088] In practical applications, if the flow label is not used, it is normally set to all zeros. The link attribute field, probe mode field, and path attribute value field can occupy any number of bits. If some bits of the flow label have been used, the link attribute field, probe mode field, and path attribute value field can occupy the unused bits.

[0089] After receiving the reflected message, the first node retrieves the first path attribute value from it. The first node then retrieves the configured link expectation attribute value and the probe mode from its local storage. Finally, the first node compares the link expectation attribute value with the first path attribute value to determine if they are the same.

[0090] If the expected link attribute value is different from the first path attribute value, the first node determines that the first path is not the pre-configured packet return path, meaning the packet outbound path and packet return path are different. Meanwhile, if the probe mode is loose mode, the first node determines that the packet outbound path can be different from the packet return path. In this case, the first node keeps the session in the up state.

[0091] Optionally, if the expected link attribute value is different from the first path attribute value, the first node determines that the first path is not the pre-configured packet return path, that is, the packet outbound path and the packet return path are different. Simultaneously, if the probe mode is strict mode, the first node determines that the packet outbound path and the packet return path should be the same. In this case, the first node sets the session to the down state.

[0092] If the expected attribute value of the link is the same as the attribute value of the first path, then the first node determines that the first path is the pre-configured packet return path, that is, the packet outbound path and the packet return path are the same. At this time, the first node keeps the session in the up state.

[0093] Therefore, by applying the detection method provided in this application embodiment, the second node receives a detection message sent by the first node through the first interface. The detection message includes a link attribute identifier and a detection mode identifier. If the link attribute identifier is a first value, the second node obtains a first path attribute value from its local machine. The first path attribute value is used to indicate the first path from which the second node reaches the first node. The second node sends a reflection message to the first node through the second interface. The reflection message includes a link attribute identifier, a detection mode identifier, and a first path attribute value, so that after the first node determines that the expected link attribute value is different from the first path attribute value and the detection mode indicated by the detection mode identifier is a loose mode, it keeps the session in the up state.

[0094] Thus, updating the session state using the first path attribute value included in the reflected message does not increase the number of messages within the link, nor does it add any extra burden to the link; the communication process is simple and feasible, with minimal impact on network device performance; it has strong compatibility, and can still maintain normal session establishment even for network devices that do not support carrying the first path attribute value in the reflected message; network devices can make more accurate judgments about the link, and upper-layer applications can make corresponding adjustments to the session and path based on richer link information, increasing the flexibility of the network.

[0095] Optionally, before performing step 210, the second node also performs the process of receiving configuration instructions and configuring locally according to the configuration instructions.

[0096] Specifically, the user inputs configuration instructions to the second node via command line. These configuration instructions include at least one path attribute value and an interface identifier corresponding to each path attribute value.

[0097] After receiving the configuration command input by the user, the second node obtains at least one path attribute value and the interface identifier corresponding to each path attribute value; the second node configures the corresponding path attribute value under the interface indicated by the interface identifier.

[0098] The detection method provided in the embodiments of this application will be described in detail below. See also Figure 3 , Figure 3 This is a schematic diagram of the SBFD session detection network provided in an embodiment of this application. Figure 3 The network consists of five nodes: a transmitter, P1, P2, P3, and a reflector. The transmitter establishes connections with P1, P2, and P3 respectively; the reflector also establishes connections with P1, P2, and P3 respectively.

[0099] The sending end includes interfaces 1, 2, and 3; the reflecting end includes interfaces 4, 5, and 6. An SBFD session has been established between the sending and reflecting ends. The forward path of this SBFD session can be path A, and the reverse path can be path A, path B, or path C. An SRv6 TE Policy is configured within the sending end, indicating path A between the sending and reflecting ends.

[0100] Users input configuration commands to the sender via command line. These configuration commands include expected link attribute values ​​(e.g., expected link attribute value is 1), session identifier (SBFD session 1), and probe mode identifier (loose mode).

[0101] After receiving the configuration command, the sending end obtains the expected link attribute value, session identifier, and probe mode identifier from it; the sending end binds the expected link attribute value with SBFD session 1 and stores the probe mode identifier locally.

[0102] The expected link attribute value is used to indicate the path between the reflector and the sender that the user expects in advance.

[0103] The configuration commands entered by the user can be specifically shown below:

[0104] segment-routing IPv6

[0105] encapsulation source-address 10:1::

[0106] locator a1 ipv6-prefix 10:1::84static 12args 16

[0107] traffic-engineering

[0108] srv6-policy locator a1

[0109] policy 1

[0110] color 1end-point ipv6 30:1:1::1

[0111] `sbfd enable remote 1000002link-value 1strict / loose` (This can be set to strict or loose mode; the default is loose mode).

[0112] Users input configuration commands to the reflection endpoint via command line. These commands include at least one path attribute value and an interface identifier corresponding to each path attribute value. For example, a path attribute value of 1 corresponds to interface 4; a path attribute value of 2 corresponds to interface 5; and a path attribute value of 3 corresponds to interface 6.

[0113] After receiving the configuration command input by the user, the reflection endpoint retrieves at least one path attribute value and the interface identifier corresponding to each path attribute value. The reflection endpoint then configures the corresponding path attribute value under the interface indicated by the interface identifier. For example, path attribute value 1 is configured under interface 4; path attribute value 2 is configured under interface 5; and path attribute value 3 is configured under interface 6.

[0114] The configuration commands entered by the user can be specifically shown below:

[0115] Interface xge2 / 0 / 0 (Interface 4)

[0116] sbfd link-value 1

[0117] Interface xge2 / 0 / 1 (Interface 5)

[0118] sbfd link-value 2

[0119] Interface xge2 / 0 / 2 (Interface 6)

[0120] sbfd link-value 3

[0121] It should be noted that the above path attribute values ​​are not session-specific and are enabled on the interface. They are used as a basis for encapsulating reflected messages, and the flow label of the reflected message carries the path attribute values.

[0122] As mentioned above, the expected link attribute value is 1. This expected link attribute value is the same as the path attribute value configured under interface 4. That is, the user expects the reflected message to be forwarded through interface 4 and reach the sending end along path A, so that the reflected message and the probe message have the same path.

[0123] Both the sending and reflecting ends are configured and enabled with SBFD session probing functionality. The sending end, wishing to probe the connectivity of the SRv6 TEPolicy (i.e., path A), generates a probe message. This probe message includes a link attribute identifier and a probe mode identifier. The sending end redirects the probe message to the SRv6 TE Policy and then sends the probe message to the reflecting end along path A via interface 1.

[0124] It is understandable that each node along the probe message path can forward the probe message according to the existing SRv6 protocol, which will not be repeated here.

[0125] In this embodiment of the application, the probe message includes a flow label, which includes a link attribute field and a probe mode field; the flow label field includes 20 bits, the link attribute field and the probe mode field each occupy 1 bit, and the remaining bits are set to 0.

[0126] For example, if the link attribute field occupies the highest bit and the probe mode field occupies the second highest bit, and both bits are set to 0, then the flow tag is: 1000 0000 0000 0000 0000.

[0127] Among them, a link attribute field set to 1 indicates that the probe message involves link attributes; a link attribute field set to 0 indicates that the probe message does not involve link attributes; a probe mode field set to 1 indicates strict mode; a probe mode field set to 0 indicates loose mode.

[0128] Understandably, according to existing IP protocol specifications, probe packets also include necessary fields such as source / destination address and source / destination port number, which will not be repeated here.

[0129] After receiving the probe packet from interface 4, the reflecting end obtains the link attribute identifier and probe mode identifier from it. The reflecting end identifies the link attribute identifier value. If the link attribute identifier value is 1, the reflecting end determines that the probe packet involves a link attribute.

[0130] The reflecting endpoint obtains the source address from the probe packet. Based on the source address, the reflecting endpoint searches its local routing table for a routing entry that matches the source address (i.e., the destination senter indicated by the source address). If a matching routing entry is found, the reflecting endpoint obtains the outgoing interface identifier from it. In this case, the outgoing interface identifier is interface 6. Under interface 6, the reflecting endpoint obtains a path attribute value of 3.

[0131] After obtaining the path attribute values, the reflecting end generates a reflection message, which includes a link attribute identifier, a probe mode identifier, and path attribute values. The link attribute identifier and probe mode identifier are inherited from those included in the probe message.

[0132] It is understandable that when selecting an outgoing interface, the reflecting end will choose the outgoing interface according to the routing optimization strategy (i.e., finding the optimal forwarding path) to achieve the forwarding processing of the reflected packet. In this embodiment, the outgoing interface is interface 6, that is, the reflecting end forwards the reflected packet from interface 6 and reaches the sending end along path C.

[0133] The aforementioned reflected message includes a flow label, which includes a link attribute field, a probe mode field, and a path attribute value field. The flow label field includes 20 bits, with the link attribute field and probe mode field each occupying 1 bit, the path attribute value field occupying 4 bits and carrying the first path attribute value, and the remaining bits being 0.

[0134] For example, if the link attribute field occupies the highest bit, the probe mode field occupies the second highest bit, and the path attribute value occupies bits 5-8, and these bits are set to 0, then the flow tag is: 1000 0011 0000 0000 0000.

[0135] The reflecting end sends the reflected message to the sending end via interface 6 along path C.

[0136] After receiving the reflected message, the sending end retrieves the path attribute value, source address, and destination address. Based on the source or destination address, the sending end determines the SBFD session to which the reflected message belongs, for example, SBFD session 1. After determining SBFD session 1, the sending end retrieves the link expectation attribute value configured for SBFD session 1 locally. At this time, the link expectation attribute value is 1. Simultaneously, the sending end also retrieves the configured probe mode as loose mode.

[0137] After obtaining the expected link attribute value and the probe mode, the sending end compares whether the expected link attribute value and the path attribute value are the same.

[0138] At this point, the expected link attribute value of 1 is different from the path attribute value of 3. Therefore, the sender determines that path C is not the pre-configured packet return path, meaning the packet outbound path and the packet return path are different. Simultaneously, since the probe mode is loose, the sender determines that the packet outbound path can be different from the packet return path. At this time, the first node of the sender maintains SBFD session 1 in the up state.

[0139] Once the sending end determines that the paths are different, it generates a notification message, which includes an identifier indicating that the paths are different. The sending end then sends this notification message to the upper-layer application.

[0140] After receiving the notification message, the upper-layer application retrieves the path differentiation identifier. Based on this identifier, the upper-layer application determines that the outbound path (path A) and the return path (path C) of the packet are different. Depending on its own functional attributes, the upper-layer application either keeps SBFD session 1 in the up state, sets it to the down state, or performs a path switch.

[0141] For example, when the upper layer application uses the IGP protocol, the outbound path and the return path of the message can be different. In this case, if the IGP protocol determines that the paths are different, SBFD session 1 can continue to be in the up state. When the upper layer application uses the LDP protocol, the outbound path and the return path of the message should be the same. In this case, if the IGP protocol determines that the paths are different, SBFD session 1 can be set to the down state, or a path switch can be performed to ensure that the paths are the same.

[0142] The above applications can also include ISIS protocol, OFPS protocol, L3VPN, L2VPN, etc.

[0143] Based on the same inventive concept, embodiments of this application also provide a detection device corresponding to the detection method. See also Figure 4 , Figure 4 A detection device is provided in an embodiment of this application. The device is applied to a first node, and the first node and a second node have established a session. The device includes:

[0144] The receiving unit 410 is configured to receive a reflection message sent by the second node, the reflection message including a first path attribute value, the first path attribute value being used to indicate a first path from the second node to the first node;

[0145] Acquisition unit 420 is used to acquire the configured expected link attribute values ​​and detection mode from the local machine;

[0146] The processing unit 430 is configured to keep the session in an up state if the expected link attribute value is different from the first path attribute value and the detection mode is a loose mode.

[0147] Optionally, an SRv6 TE Policy has been configured in the first node, which indicates a second path from the first node to the second node;

[0148] The device further includes: a sending unit (not shown in the figure), configured to send a probe message to the second node through the second path, the probe message including a link attribute identifier and a probe mode identifier, so that the second node can identify the link attribute identifier value. If the link attribute identifier value is a first value, the first path attribute value is obtained, and the link attribute identifier value and the probe mode identifier value are filled into the link attribute field and the probe mode field included in the reflection message.

[0149] Optionally, the processing unit 430 is further configured to set the session to a down state if the expected link attribute value is different from the first path attribute value and the detection mode is strict mode;

[0150] If the expected attribute value of the link is the same as the attribute value of the first path, then the session remains in the up state.

[0151] Optionally, the sending unit (not shown in the figure) is further configured to send a notification message to the upper-layer application, the notification message including a path difference identifier, so that the upper-layer application determines that the first path is different from the second path based on the path difference identifier, and keeps the session in an up state, sets the session to a down state, or performs a path switch based on the functional attributes of the upper-layer application.

[0152] Optionally, the receiving unit 410 is further configured to receive configuration instructions input by the user, the configuration instructions including the expected link attribute value, session identifier, and probe mode identifier;

[0153] The device further includes: a binding unit (not shown in the figure), used to bind the expected link attribute value to the session indicated by the session identifier;

[0154] A storage unit (not shown in the figure) is used to store the detection mode identifier.

[0155] Optionally, the reflected message includes a flow label, which includes a link attribute field, a probe mode field, and a path attribute value field;

[0156] The flow tag includes 20 bits, the link attribute field and the probe mode field each occupy 1 bit, the path attribute value field occupies 4 bits and carries the first path attribute value, and the remaining bits are set to 0;

[0157] The probe message includes a flow label, and the flow label includes a link attribute field and a probe mode field;

[0158] The flow tag includes 20 bits, with the link attribute field and the probe mode field each occupying 1 bit, and the remaining bits set to 0.

[0159] Therefore, by applying the detection device provided in the embodiments of this application, the first node receives a reflection message sent by the second node. The reflection message includes a first path attribute value, which is used to indicate the first path from the second node to the first node. The first node obtains the configured link expected attribute value and the detection mode from its local machine. If the link expected attribute value is different from the first path attribute value and the detection mode is loose mode, the first node keeps the session in the up state.

[0160] Thus, updating the session state using the first path attribute value included in the reflected message does not increase the number of messages within the link, nor does it add any extra burden to the link; the communication process is simple and feasible, with minimal impact on network device performance; it has strong compatibility, and can still maintain normal session establishment even for network devices that do not support carrying the first path attribute value in the reflected message; network devices can make more accurate judgments about the link, and upper-layer applications can make corresponding adjustments to the session and path based on richer link information, increasing the flexibility of the network.

[0161] Based on the same inventive concept, embodiments of this application also provide a detection device corresponding to the detection method. See also Figure 5 , Figure 5 Another detection device provided in this application embodiment, the device is applied to a second node, the second node has established a session with the first node, the device includes;

[0162] The receiving unit 510 is configured to receive a probe message sent by the first node through a first interface, wherein the probe message includes a link attribute identifier and a probe mode identifier.

[0163] The acquisition unit 520 is configured to acquire a first path attribute value from the local machine if the link attribute identifier value is a first value. The first path attribute value is used to indicate the first path from the second node to the first node.

[0164] The sending unit 530 is configured to send a reflection message to the first node through the second interface. The reflection message includes the link attribute identifier, the probe mode identifier, and the first path attribute value, so that after the first node determines that the expected link attribute value is different from the first path attribute value and the probe mode indicated by the probe mode identifier is a loose mode, it keeps the session in the up state.

[0165] Optionally, the probe message further includes a source address; the acquisition unit 520 is specifically used to search for a routing table entry in the local routing table that matches the source address based on the source address;

[0166] Retrieve the outgoing interface identifier from the matching routing table entry;

[0167] Under the outgoing interface indicated by the outgoing interface identifier, obtain the first path attribute value.

[0168] Optionally, the reflected message includes a flow label, which includes a link attribute field, a probe mode field, and a path attribute value field;

[0169] The flow tag includes 20 bits, the link attribute field and the probe mode field each occupy 1 bit, the path attribute value field occupies 4 bits and carries the first path attribute value, and the remaining bits are set to 0;

[0170] The probe message includes a flow label, and the flow label includes a link attribute field and a probe mode field;

[0171] The flow tag includes 20 bits, with the link attribute field and the probe mode field each occupying 1 bit, and the remaining bits set to 0.

[0172] Optionally, the receiving unit 510 is further configured to receive a configuration instruction input by a user, the configuration instruction including at least one path attribute value and an interface identifier corresponding to each path attribute value;

[0173] The device further includes a configuration unit (not shown in the figure), used to configure the corresponding path attribute value under the interface indicated by the interface identifier.

[0174] Therefore, by applying the detection device provided in the embodiments of this application, the second node receives a detection message sent by the first node, the detection message including a link attribute identifier and a detection mode identifier; if the link attribute identifier is a first value, the second node obtains a first path attribute value from its local machine, the first path attribute value being used to indicate the first path from which the second node reaches the first node; the second node sends a reflection message to the first node, the reflection message including a link attribute identifier, a detection mode identifier, and a first path attribute value, so that after the first node determines that the expected link attribute value is different from the first path attribute value and that the detection mode indicated by the detection mode identifier is a loose mode, it keeps the session in the up state.

[0175] Thus, updating the session state using the first path attribute value included in the reflected message does not increase the number of messages within the link, nor does it add any extra burden to the link; the communication process is simple and feasible, with minimal impact on network device performance; it has strong compatibility, and can still maintain normal session establishment even for network devices that do not support carrying the first path attribute value in the reflected message; network devices can make more accurate judgments about the link, and upper-layer applications can make corresponding adjustments to the session and path based on richer link information, increasing the flexibility of the network.

[0176] Based on the same inventive concept, embodiments of this application also provide a network device, such as... Figure 6 As shown, the system includes a processor 610, a transceiver 620, and a machine-readable storage medium 630. The machine-readable storage medium 630 stores machine-executable instructions that can be executed by the processor 610. The processor 610 is prompted by the machine-executable instructions to execute the detection method provided in the embodiments of this application. (The foregoing...) Figure 4 , Figure 5 The detection device shown can be used as follows: Figure 6 The hardware structure of the network device shown is implemented.

[0177] The aforementioned computer-readable storage medium 630 may include random access memory (RAM) or non-volatile memory (NVM), such as at least one disk storage device. Optionally, the computer-readable storage medium 630 may also be at least one storage device located remotely from the aforementioned processor 610.

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

[0179] In this embodiment of the application, the processor 610 reads the machine-executable instructions stored in the machine-readable storage medium 630, and is prompted by the machine-executable instructions to enable the processor 610 itself and to call the transceiver 620 to execute the detection method described in the foregoing embodiment of the application.

[0180] In addition, this application provides a machine-readable storage medium 630 that stores machine-executable instructions. When called and executed by the processor 610, the machine-executable instructions cause the processor 610 itself and the transceiver 620 to execute the detection method described in the aforementioned application.

[0181] The specific implementation process of the functions and roles of each unit in the above device can be found in the implementation process of the corresponding steps in the above method, and will not be repeated here.

[0182] For the device embodiments, since they basically correspond to the method embodiments, the relevant parts can be referred to in the description of the method embodiments. The device embodiments described above are merely illustrative. 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, that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this application according to actual needs. Those skilled in the art can understand and implement this without creative effort.

[0183] For the embodiments of the detection and testing device and the machine-readable storage medium, since the methods involved are basically similar to those of the aforementioned method embodiments, the description is relatively simple, and relevant details can be found in the descriptions of the method embodiments.

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

Claims

1. A method of detecting, characterized by, The method is applied to a first node which has established a session with a second node, and the method comprises: receiving a reflection message sent by the second node, the reflection message comprising a first path attribute value used to indicate a first path of the second node to the first node; locally obtaining a configured link expected attribute value and a probe mode; if the link expected attribute value is different from the first path attribute value and the probe mode is a loose mode, maintaining the session as an up state; wherein an SRv6 TE Policy is configured in the first node, and the SRv6 TE Policy indicates a second path of the first node to the second node; before the receiving of the reflection message sent by the second node, the method further comprises: sending a probe message to the second node through the second path, the probe message comprising a link attribute identifier and a probe mode identifier, so that the second node identifies a link attribute identifier value, and if the link attribute identifier value is a first value, the second node obtains the first path attribute value and fills the link attribute identifier value and the probe mode identifier value into a link attribute field and a probe mode field in the reflection message; the reflection message comprises a flow label, and the flow label comprises a link attribute field, a probe mode field and a path attribute value field; the flow label comprises 20 bits, the link attribute field and the probe mode field each occupy 1 bit, and the path attribute value field occupies 4 bits and carries the first path attribute value, and the remaining bits are 0; the probe message comprises a flow label, and the flow label comprises a link attribute field and a probe mode field; the flow label comprises 20 bits, the link attribute field and the probe mode field each occupy 1 bit, and the remaining bits are 0; the loose mode is that a message outgoing path can be different from a message return path.

2. The method of claim 1, wherein, The method further comprises: if the link expected attribute value is different from the first path attribute value and the probe mode is a strict mode, setting the session as a down state; if the link expected attribute value is the same as the first path attribute value, maintaining the session as an up state; the strict mode is that a message outgoing path is the same as a message return path.

3. The method of claim 1, wherein, The method further comprises: sending a notification message to an upper layer application, the notification message comprising a path difference identifier, so that the upper layer application determines that the first path is different from the second path according to the path difference identifier, and maintains the session as an up state or sets the session as a down state or performs path switching according to a functional attribute of the upper layer application.

4. The method of claim 1, wherein, Before the sending of the probe message to the second node through the second path, the method further comprises: receiving a configuration instruction input by a user, the configuration instruction comprising the link expected attribute value, a session identifier and a probe mode identifier; binding the link expected attribute value with the session indicated by the session identifier; storing the probe mode identifier.

5. A method of detecting, characterized by, The method is applied to a second node which has established a session with a first node, and the method comprises: receiving, through a first interface, a probe packet sent by the first node, the probe packet comprising a link attribute identifier and a probe mode identifier; if the link attribute identifier value is a first value, obtaining a first path attribute value from the local, the first path attribute value being used to indicate a first path of the second node to the first node; sending, through a second interface, a reflection packet to the first node, the reflection packet comprising the link attribute identifier, the probe mode identifier, and the first path attribute value, so that the first node determines that the link expected attribute value is different from the first path attribute value and the probe mode indicated by the probe mode identifier is a loose mode, and then keeps the session in an up state; wherein the reflection packet comprises a flow label, and the flow label comprises a link attribute field, a probe mode field, and a path attribute value field; the flow label comprises 20 bits, the link attribute field and the probe mode field each occupy 1 bit, and the path attribute value field occupies 4 bits and carries the first path attribute value, and the remaining bits are 0; the probe packet comprises a flow label, and the flow label comprises a link attribute field and a probe mode field; the flow label comprises 20 bits, the link attribute field and the probe mode field each occupy 1 bit, and the remaining bits are 0; the loose mode is that the packet upstream path can be different from the packet downstream path.

6. The method of claim 5, wherein, The probe packet further comprises a source address; and the obtaining the first path attribute value from the local specifically comprises: looking up a routing table entry in a local routing table that matches the source address according to the source address; obtaining an out-interface identifier from the matched routing table entry; obtaining the first path attribute value at an out-interface indicated by the out-interface identifier.

7. The method of claim 5, wherein, Before the receiving the probe packet sent by the first node, the method further comprises: receiving a configuration instruction input by a user, the configuration instruction comprising at least one path attribute value and an interface identifier corresponding to each path attribute value; configuring the corresponding path attribute value at an interface indicated by the interface identifier.

8. A detection device, characterized in that The device is applied to a first node which has established a session with a second node, and the device comprises: a receiving unit configured to receive a reflection packet sent by the second node, the reflection packet comprising a first path attribute value, the first path attribute value being used to indicate a first path of the second node to the first node; an obtaining unit configured to obtain a configured link expected attribute value and a probe mode from the local; a processing unit configured to keep the session in an up state if the link expected attribute value is different from the first path attribute value and the probe mode is a loose mode; wherein an SRv6 TE Policy has been configured in the first node, and the SRv6 TE Policy indicates a second path of the first node to the second node. The device further comprises a sending unit configured to send a probe packet to the second node through the second path, wherein the probe packet comprises a link attribute identifier and a probe mode identifier, so that the second node identifies the link attribute identifier value, and if the link attribute identifier value is a first value, the second node acquires the first path attribute value and fills the link attribute identifier value and the probe mode identifier value into a link attribute field and a probe mode field in the reflection packet; The reflection packet comprises a flow label, and the flow label comprises a link attribute field, a probe mode field and a path attribute value field; The flow label comprises 20 bits, the link attribute field and the probe mode field each occupy 1 bit, and the path attribute value field occupies 4 bits and carries the first path attribute value, and the remaining bits are 0; The probe packet comprises a flow label, and the flow label comprises a link attribute field and a probe mode field; The flow label comprises 20 bits, the link attribute field and the probe mode field each occupy 1 bit, and the remaining bits are 0; The loose mode is that a packet upstream path can be different from a packet downstream path.

9. A detection device, characterized in that The device is applied to a second node, and the second node has established a session with a first node, and the device comprises: a receiving unit configured to receive a probe packet sent by the first node through a first interface, wherein the probe packet comprises a link attribute identifier and a probe mode identifier; an acquiring unit configured to acquire a first path attribute value from the second node if the link attribute identifier value is a first value, wherein the first path attribute value is used to indicate a first path from the second node to the first node; a sending unit configured to send a reflection packet to the first node through a second interface, wherein the reflection packet comprises the link attribute identifier, the probe mode identifier and the first path attribute value, so that the first node determines that a link expected attribute value is different from the first path attribute value and a probe mode indicated by the probe mode identifier is a loose mode, and then maintains the session in an up state; The reflection packet comprises a flow label, and the flow label comprises a link attribute field, a probe mode field and a path attribute value field; The flow label comprises 20 bits, the link attribute field and the probe mode field each occupy 1 bit, the path attribute value field occupies 4 bits and carries the first path attribute value, and the remaining bits are 0; The probe packet comprises a flow label, and the flow label comprises a link attribute field and a probe mode field; The flow label comprises 20 bits, the link attribute field and the probe mode field each occupy 1 bit, and the remaining bits are 0; The loose mode is that a packet upstream path can be different from a packet downstream path.

Citation Information

Patent Citations

  • Path consistency detection method and device

    CN113472653A