Communication connection detection method and device
By sending detection request packets between network nodes and deleting the NHRP table, the problem of data traffic recovery after link interruption between Spoke nodes is solved, and resource conservation and data transmission reliability is achieved.
Patent Information
- Application Number
- CN202110289005.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2017-09-22
- Publication Date
- 2024-11-26
- Estimated Expiration
- 2037-09-22
AI Technical Summary
In the prior art, after the link between the Spoke node and the Spoke node is interrupted, the data traffic between the Spoke node and the Spoke node cannot be effectively restored.
By sending a detection request message to the second network node at the first network node, if no response message is received, the NHRP table is deleted to avoid data traffic continuing to be sent, and instead forward data traffic through the central node, thereby restoring data transmission.
In the event of link failure, avoid data traffic from occupying transmission resources, ensure the reliability of data transmission and resource conservation, and improve the reliability of link failure detection.
Smart Images

Figure CN113114528B_ABST
Abstract
Description
[0001] This application is a divisional application of the application filed with the China Intellectual Property Office on September 22, 2017, with application number 201710866379.8 and invention name “A communication connection detection method and device”. Technical Field
[0002] The present application relates to the field of information technology, and in particular to a communication connection detection method and device. Background Art
[0003] Auto discovery virtual private network (ADVPN) allows the hub node as the central node to use a static Internet Protocol (IP) address, and the router (spoke) node as the branch node can use a dynamic IP address. The hub node establishes a static tunnel with all spoke nodes through the multipoint generic routing encapsulation (MGRE) interface, and the data traffic between spokes can be transmitted through the dynamic tunnel established between spokes without passing through the hub, which can reduce the overhead of the hub node.
[0004] The establishment of dynamic tunnels between Spoke nodes can be achieved through the next hop resolution protocol (NHRP), where the NHRP protocol is used to solve the problem of how the source spoke node obtains the dynamic public network address of the destination spoke node.
[0005] The existing solution only solves the problem of keeping the spoke nodes and hub nodes alive. However, in the prior art, there is no effective way to solve the problem of how to restore the data traffic between spoke nodes after the link between the spoke nodes is interrupted. Summary of the invention
[0006] The present application provides a communication connection detection method and device, providing an effective way to restore the transmission of data traffic between spoke nodes.
[0007] In a first aspect, an embodiment of the present application provides a communication connection detection method, including: a first network node sends a detection request message to a second network node, the detection request message being used to detect whether the first network node and the second network node are in a connected state; when the first network node determines that the first network node has not received a detection response message sent by the second network node, the first network node deletes an NHRP table, the detection response message being a response message in response to the detection request message, and the NHRP table being used to forward data traffic between the first network node and the second network node.
[0008] When a link failure occurs between two nodes, the NHRP table between the first network node and the second network node does not disappear automatically until the NHRP table ages. Before the NHRP table ages, the data traffic between the first network node and the second network node will still be sent by the first network node based on the NHRP table, thereby occupying the transmission resources of the first network node. Through the method provided in the embodiment of the present application, the first network node acts as a detection initiating device. After determining that the first network node has not received the detection response message sent by the second network node, the NHRP table used for forwarding data traffic between the first network node and the second network node is deleted. Therefore, when a link failure occurs between the two nodes, it can be ensured that the data traffic is no longer sent and no longer occupies transmission resources.
[0009] In an embodiment of the present application, when the first network node and the second network node are both branch nodes, after the first network node deletes the NHRP table between the first network node and the second network node, the NHRP table is used by the first network node to forward data traffic to the second network node through a tunnel established between the first network node and the second network node, and the data traffic transmitted between the first network node and the second network node no longer queries the NHRP table, but is forwarded through the central node, thereby restoring the transmission of data traffic between the first network node and the second network node after a failure of the tunnel established between the first network node and the second network node.
[0010] The above method can be but is not limited to the application of multi-point general routing encapsulation protocol GRE tunnel networking. Of course, other networking methods that can apply NHRP are applicable to the embodiments of the present application.
[0011] In a possible design, when the first network node does not receive the data traffic sent by the second network node, the first network node sends a detection request message to the second network node. Since the first network node can determine that the link between the first network node and the second network node is normal when it can receive the data traffic transmitted by the second network node, therefore, when the first network node cannot receive the data traffic sent by the second network node, that is, when the data traffic reception stops, the first network node can send a detection request message to the second network node. In this way, it can be determined in advance whether the traffic stop between the two nodes is due to a link failure, which can improve the reliability of discovering link failures.
[0012] In a possible implementation, when the first network node does not receive the data traffic sent by the second network node within a first preset duration, the first network node sends a detection request message to the second network node. Since the first network node does not receive the data traffic sent by the second network node, it may be that the data traffic sent by the second network node to the first network node has been transmitted. Therefore, when the duration of not receiving the data traffic sent by the second network node reaches the first preset duration, that is, when the duration of data traffic reception stops reaches the first preset duration, the first network node sends a detection request message to the second network node. In this way, it can be determined in advance whether the traffic stop between the two nodes is due to a link failure, which can improve the reliability of discovering link failures.
[0013] In a possible design, when the first network node does not receive the data traffic sent by the second network node and the first network node stops sending data traffic to the second network node, the first network node sends a detection request message to the second network node. When the first network node does not receive the data traffic sent by the second network node, if the first network node is sending data traffic to the second network node, the first network node will not trigger the sending of the detection request message, and only when the first network node stops sending data traffic to the second network node, will the detection request message be sent to the second network node, that is, when the first network node does not send data traffic to the second network node and does not receive the data traffic sent by the second network node, the first network node will send data traffic to the second network node.
[0014] In one possible design, when the first network node does not receive the data traffic sent by the second network node and the first network node stops sending data traffic to the second network node for a period exceeding a second preset period of time, a detection request message is sent to the second network node.
[0015] In one possible design, the first network node determining that the first network node has not received a detection response message sent by the second network node includes:
[0016] The first network node determines that the detection response message sent by the second network node is not received within a third preset time period; or, the first network node determines that the detection response message sent by the second network node is not received within the third preset time period, and after repeatedly sending the detection request message to the second network node N times, the detection response message sent by the second network node is not received, and N is an integer greater than 1.
[0017] The above design provides two simple and effective ways to determine that the first network node has not received the detection response message sent by the second network node.
[0018] In one possible design, the detection request message is an NHRP message, and the NHRP message includes a first field, where the first field is used to indicate that the NHRP message is a message used to detect whether the first network node and the second network node are in a connected state.
[0019] The above design uses the protocol message existing in the multi-point GRE tunnel network, that is, the NHRP protocol message, and does not require each node in the network to configure other detection messages, such as BFD, thereby saving node resources.
[0020] In a possible design, the NHRP message further includes a second field, and the second field is used by the second network node to detect whether the detection request message is safe, thereby improving the security of the detection request message and the security of the link.
[0021] In a possible design, the NHRP message further includes a third field, the third field is used to identify a sequence number of the NHRP message, and the sequence number is used to indicate whether the NHRP message is a replay message, thereby preventing network nodes from being attacked to a certain extent.
[0022] In one possible design, the detection request message is a failed peer detection DPD message. The IP security alliance technology is applied in the multi-point GRE tunnel networking, thereby using the DPD message of the IP security alliance technology itself, and there is no need to configure other detection messages, such as BFD, on each node in the networking, thereby saving node resources.
[0023] In one possible design, when the first network node determines that the first network node has not received the detection response message sent by the second network node, the method also includes: the first network node deletes IP security alliance information, and the IP security alliance information is used by the first network node to encrypt data traffic transmitted between the first network node and the second network node.
[0024] The above design can save node storage resources by timely deleting the IP security alliance information when a transmission link failure occurs between the first network node and the second network node.
[0025] In one possible design, the first network node and the second network node are both branch nodes. When the first network node determines that the first network node has not received the detection response message sent by the second network node, the first network node deletes the NHRP table between the first network node and the second network node, and the first network node restores the aggregation routing function between the first network node and the central node, and the aggregation routing function is used to forward the data traffic transmitted between the first network node and the second network node through the central node.
[0026] Through the above design, when a link failure occurs between two branch nodes, forwarding by the central node can be restored, so that data traffic transmission between the branch nodes can be restored.
[0027] In one possible design, when the first network node determines that the first network node has not received the detection response message sent by the second network node, the method also includes: the first network node sends an alarm signal, and the alarm signal is used to indicate that a transmission link between the first network node and the second network node has a fault.
[0028] Through the above design, when a transmission link between the first network node and the second network node fails, the user can be reminded so that the user can repair the link failure in time.
[0029] In a second aspect, based on the same inventive concept as the embodiment described in the first aspect above, an embodiment of the present application provides a communication connection detection device, which is applied to a first network node, including:
[0030] A first sending module, configured to send a detection request message to a second network node, wherein the detection request message is used to detect whether the first network node and the second network node are in a connection state;
[0031] A first receiving module, configured to receive a detection response message sent by the second network node;
[0032] A processing module, used for, when it is determined that the first receiving module has not received the detection response message sent by the second network node, the first network node deletes the NHRP table so that the data traffic transmitted between the first network node and the second network node is forwarded through the central node; the NHRP table is used for the first network node to forward data traffic to the second network node through the tunnel established between the first network node and the second network node.
[0033] Through the above method, the first network node acts as a detection initiating device. After determining that the second network node has not received the detection request message, it deletes the NHRP table used for forwarding data traffic between the first network node and the second network node, thereby ensuring that data traffic is no longer sent and no longer occupies transmission resources when a link failure occurs between the two nodes.
[0034] In one possible design, the device further includes:
[0035] A second receiving module, used to receive data traffic sent by the second network node;
[0036] A second sending module, used to send data traffic to the second network node;
[0037] The first sending module is specifically configured to send a detection request message to the second network node when it is determined that any one of the following conditions is met:
[0038] The second receiving module does not receive the data traffic sent by the second network node;
[0039] The second receiving module does not receive the data traffic sent by the second network node within a first preset time period;
[0040] The second receiving module does not receive the data traffic sent by the second network node and the second sending module does not send data traffic to the second network node; and,
[0041] The second receiving module does not receive the data traffic sent by the second network node and the second sending module does not send the data traffic to the second network node for a period of time exceeding a second preset period of time.
[0042] Through the above design, the reliability of detecting link failures can be improved.
[0043] In a possible design, the processing module, when determining that the first receiving module has not received the detection response message sent by the second network node, is specifically configured to:
[0044] determining that the first receiving module has not received the detection response message sent by the second network node within a third preset time period; or,
[0045] Determine that the first receiving module has not received the detection response message sent by the second network node within the third preset time length, and after the first sending module repeatedly sends the detection request message to the second network node N times, the first receiving module has not received the detection response message sent by the second network node, where N is an integer greater than 1.
[0046] The above design provides two simple and effective ways to determine that the first receiving module has not received the detection response message sent by the second network node.
[0047] In one possible design, the detection request message is an NHRP message, and the NHRP message includes a first field, and the first field is used to indicate that the NHRP message is a message used to detect whether the first network node and the second network node are in a connected state. The above design uses the protocol message that exists in the multi-point GRE tunnel networking, that is, the NHRP protocol message, and there is no need to configure other detection messages, such as BFD, on each node in the networking, thereby saving node resources.
[0048] In a possible design, the NHRP message further includes a second field, and the second field is used by the network node to detect whether the detection request message is safe, thereby improving the security of the detection request message and the security of the link.
[0049] In a possible design, the NHRP message further includes a third field, the third field is used to identify a sequence number of the NHRP message, and the sequence number is used to indicate whether the NHRP message is a replay message, thereby preventing network nodes from being attacked to a certain extent.
[0050] In one possible design, the detection request message is a failed peer detection DPD message. The IP security alliance technology is applied in the multi-point GRE tunnel networking, thereby using the DPD message of the IP security alliance technology itself, and there is no need to configure other detection messages, such as BFD, on each node in the networking, thereby saving node resources.
[0051] In a possible design, the processing module is also used to delete IP security alliance information when it is determined that the first receiving module has not received the detection response message sent by the second network node, and the IP security alliance information is used to encrypt the data traffic transmitted between the first network node and the second network node. The above design can save node storage resources by timely deleting the IP security alliance information when a transmission link between the first network node and the second network node fails.
[0052] In a possible design, the first network node and the second network node are both branch nodes, and the processing module is further used to restore the aggregation routing function between the first network node and the central node when it is determined that the first receiving module has not received the detection response message sent by the second network node, and the aggregation routing function is used for the processing module to forward the data traffic transmitted between the first network node and the second network node through the central node. Through the above design, when a link failure occurs between two branch nodes, forwarding by the central node can be restored, so that the data traffic transmission between the branch nodes can be restored.
[0053] In a possible design, the processing module is further configured to send an alarm signal when determining that the first receiving module has not received the detection response message sent by the second network node, and the alarm signal is used to indicate that a transmission link between the first network node and the second network node has a fault. Through the above design, when a transmission link between the first network node and the second network node has a fault, a user can be reminded so that the user can repair the link fault in a timely manner.
[0054] In a third aspect, an embodiment of the present application provides a communication connection detection network node, including a communication interface, a memory, and a processor;
[0055] The communication interface is used to send and receive data;
[0056] The memory is used to store the program executed by the processor;
[0057] The processor is used to execute the program stored in the memory, and to send and receive data through the communication interface to implement the method described in any one of the designs of the first aspect above.
[0058] In a fourth aspect, an embodiment of the present application provides a computer storage medium, wherein the computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are used to enable the computer to execute any one of the methods described in the first aspect.
[0059] In a fifth aspect, an embodiment of the present application provides a chip, which is connected to a memory and is used to read and execute a software program stored in the memory to implement the method described in any one of the designs of the first aspect above. BRIEF DESCRIPTION OF THE DRAWINGS
[0060] Figure 1 A multi-point GRE tunnel networking architecture diagram provided for an embodiment of the present application;
[0061] Figure 2 A flow chart of a communication connection detection method provided in an embodiment of the present application;
[0062] Figure 3A A flow chart of a communication connection detection method provided in an embodiment of the present application;
[0063] Figure 3B A schematic diagram of another communication connection detection method provided in an embodiment of the present application;
[0064] Figure 4 The NHRP provided in the embodiment of the present application is intended to represent;
[0065] Figure 5 NHRP message schematic diagram provided for the embodiment of the present application;
[0066] Figure 6 A schematic diagram of the structure of a communication connection detection device provided in an embodiment of the present application;
[0067] Figure 7 A schematic diagram of a first network node structure provided in an embodiment of the present application;
[0068] Figure 8 Another schematic diagram of the first network node structure provided in an embodiment of the present application. DETAILED DESCRIPTION
[0069] The embodiment of the present application proposes a communication connection detection method and device, which deletes the NHRP table when the tunnel established between the first network node and the second network node fails, so that when a link failure occurs between the two nodes, it can ensure that the data traffic is no longer sent and no longer occupies transmission resources. It can also trigger the data traffic transmitted between the first network node and the second network node to be forwarded through the central node, thereby restoring the transmission of the data traffic between the first network node and the second network node. Among them, the method and the device are based on the same inventive concept. Since the principles of solving the problem by the method and the device are similar, the implementation of the device and the method can refer to each other, and the repeated parts will not be repeated.
[0070] The communication connection detection method and device proposed in the embodiment of the present application can be applied to multi-point GRE tunnel networking, but is not limited to other networking methods that can be applied to the NHRP protocol. This application is applicable to the present application. The embodiment of the present application is described by taking the application to multi-point GRE tunnel networking as an example. The multi-point GRE tunnel networking includes a central node and multiple branch nodes. Figure 1 As shown, the multi-point GRE tunnel network includes a central node. Figure 1 Taking the hub node as an example, it also includes two branch nodes. Figure 1Take spoke1 and spoke2 as an example. A hub-spoke tunnel is established between the hub node and the two spoke nodes, and a spoke-spoke tunnel is established between spoke1 and spoke2 based on the NHRP protocol. The data traffic between spoke1 and spoke2 can be transmitted through the spoke-spoke tunnel.
[0071] The network nodes involved in the embodiments of the present application may be central nodes or branch nodes. The multiple involved in the embodiments of the present application refers to two or more.
[0072] In addition, it should be understood that, in the description of this application, words such as "first" and "second" are only used for the purpose of distinguishing the description, and cannot be understood as indicating or implying relative importance, nor can they be understood as indicating or implying an order.
[0073] In order to make the objectives, technical solutions and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings.
[0074] See also Figure 2 FIG. 1 is a flow chart of a communication connection detection method provided in an embodiment of the present application. The method includes:
[0075] S201, a first network node sends a detection request message to a second network node, wherein the detection request message is used to detect whether the first network node and the second network node are in a connected state. After the first network node sends the detection request message to the second network node, the second network node will send a detection response message to the first network node when receiving the detection request message sent by the first network node. The detection response message is a response message in response to the detection request message.
[0076] S202, when the first network node determines that the first network node has not received the detection response message sent by the second network node, the first network node deletes the NHRP table between the first network node and the second network node, and the NHRP table is used to forward data traffic between the first network node and the second network node.
[0077] When a link failure occurs between two nodes, the NHRP table between the first network node and the second network node does not disappear automatically until the NHRP table ages. Before the NHRP table ages, the first network node will still send the data traffic between the first network node and the second network node based on the NHRP table, thereby occupying the transmission resources of the first network node. Through the method provided in the embodiment of the present application, the first network node acts as a detection initiating device. After determining that the second network node has not received the detection request message, it deletes the NHRP table used for forwarding data traffic between the first network node and the second network node. Therefore, when a link failure occurs between the two nodes, it can be ensured that the data traffic is no longer sent and the transmission resources of the first network node are no longer occupied.
[0078] In the embodiment of the present application, when the first network node and the second network node are both branch nodes, the NHRP table between the first network node and the second network node is used by the first network node to forward data traffic to the second network node through the tunnel established between the first network node and the second network node. Based on this, the first network node deletes the NHRP table between the first network node and the second network node, that is, when the first network node determines the data traffic that needs to be sent to the second network node, it no longer queries the NHRP table between the first network node and the second network node, so that the data traffic transmitted between the first network node and the second network node needs to bypass the central node, thereby ensuring that when the tunnel established between the first network node and the second network node fails, the transmission of data traffic between the first network node and the second network node is restored.
[0079] In an embodiment of the present application, when both the first network node and the second network node are branch nodes, after the first network node deletes the NHRP table used for forwarding data traffic between the first network node and the second network node when determining that the first network node has not received the detection response message sent by the second network node, the first method is to delete the NHRP table, that is, the aggregation routing function is restored by default, and the aggregation routing function is used to forward the data traffic transmitted between the first network node and the second network node through the central node. The second method is to delete the NHRP, but not to restore the aggregation routing function by default. In the second method, after deleting the NHRP table used for forwarding data traffic between the first network node and the second network node, the first network node restores the aggregation routing function between the first network node and the central node, so that when a link failure occurs between the two branch nodes, forwarding by the central node can be restored, so that the data traffic transmission between the branch nodes can be restored.
[0080] In the embodiment of the present application, the first network node determines that the first network node has not received the detection response message sent by the second network node, which can be implemented in the following manner:
[0081] The first implementation method:
[0082] The first network node determines that the detection response message sent by the second network node has not been received within a third preset time period. Specifically, when the first network node does not receive the detection response message sent by the second network node within a third preset time period after sending the detection request message to the second network node, the NHRP table between the first network node and the second network node is deleted.
[0083] The second implementation method:
[0084] The first network node determines that it has not received a detection response message sent by the second network node within a third preset time period, and after repeatedly sending the detection request message to the second network node N times, it has not received a detection response message sent by the second network node. Specifically, after the first network node sends a detection request message to the second network node, if it has not received a detection response message sent by the second network node within a third preset time period, it sends it again, and after repeating N times, if it has not received a detection response message sent by the second network node, then the first network node deletes the NHRP table between the first network node and the second network node.
[0085] For details, see Figure 3A or Figure 3B S201, after the first network node sends a detection request message to the second network node, S301 or S303 may also be included.
[0086] S301: When the second network node receives the detection request message, it sends a detection response message to the first network node.
[0087] S302: The first network node receives a detection response message sent by the second network node within a third preset time period, and determines that the link between the first network node and the second network node is normal.
[0088] S303: The first network node does not receive a detection response message sent by the second network node within a third preset time period.
[0089] S304: The first network node determines that the maximum number of retransmission times N has not been reached, and sends a detection request message to the second network node again.
[0090] S305: The first network node does not receive a detection response message sent by the second network node within a third preset time period.
[0091] S306: The first network node determines that a maximum number of retransmission times N has been reached.
[0092] S307: The first network node deletes the NHRP table between the first network node and the second network node.
[0093] The first network node may be a hub node or a spoke node. When the first network node is a hub node, the second network node is a spoke node; when the first network node is a spoke node, the second network node may be a hub node or a hub node.
[0094] For example, Figure 4 As shown in the figure, when a multi-point GRE tunnel network is established, the two spokes and the hub learn the NHRP table and the routing table through the NHRP protocol.
[0095] The IP address of the subnet where the hub is located is 192.168.1.0 / 24, the public IP address of the hub (GE1 / 0 / 0) is 202.1.1.10 / 24, and the tunnel interface address of the hub (tunnel0 / 0 / 0) is 172.10.1.1 / 24. The IP address of the subnet where spoke1 is located is 192.168.2.0 / 24, the public IP address of spoke1 is 202.1.2.10 / 24, and the tunnel interface address of spoke1 is 172.10.1.2 / 24. The IP address of the subnet where spoke2 is located is 192.168.3.0 / 24, the public IP address of spoke2 is 202.1.3.10 / 24, and the tunnel interface address of spoke2 is 172.10.1.3 / 24.
[0096] The public IP address of each node can be regarded as a non-broadcast multiple access network (NBMA) address. The tunnel interface address is the same as the IP address on other physical interfaces and is used for communication between nodes (such as obtaining routing information, etc.). The IP address of the node in the subnet is the IP address in the local area network.
[0097] The routing table is used to represent the correspondence between the public IP addresses of different nodes and the tunnel interface addresses. The NHRP table is used to represent the next-hop IP address corresponding to the destination IP address of the data flow. Figure 4As shown in the box. The destination IP address of the data traffic is the IP address of the subnet where the target node is located, and the corresponding next-hop IP address is the tunnel interface address on the source node of the tunnel established between the source node and the target node. For example, for data traffic sent from spoke1 to spoke2, the destination IP address of the data traffic is 192.168.3.0, and the corresponding next-hop IP address is 172.10.1.2. Currently, if a link failure occurs between spoke1 and spoke2, the NHRP table between spoke1 and spoke2 does not automatically disappear until the NHRP table ages. Before the NHRP table ages, the traffic sent from spoke1 to spoke2 will still be sent after querying the NHRP table, thereby occupying the transmission resources of spoke1.
[0098] Therefore, through the solution provided in the embodiment of the present application, the first network node acts as a detection initiating device. After determining that the detection response message sent by the second network node has not been received, the first network node deletes the NHRP table used to forward data traffic between the first network node and the second network node. This ensures that when a link failure occurs between the two nodes, data traffic is no longer sent and no longer occupies transmission resources.
[0099] In the prior art, the keep-alive between spoke nodes and hub nodes is achieved through bidirectional forwarding detection (BFD) messages. BFD is a conventional link detection method, and BFD messages can be applied to link detection between spoke nodes. BFD detection first requires that all spoke nodes in the entire network support and configure the BFD protocol. However, in the asynchronous mode of the BFD protocol, BFD messages are always in a periodic sending state, which will put pressure on the spoke nodes in the entire network and waste resources.
[0100] In a possible implementation, when the first network node does not receive the data traffic sent by the second network node, the first network node sends a detection request message to the second network node. Since the first network node can determine that the link between the first network node and the second network node is normal when it can receive the data traffic transmitted by the second network node, therefore, when the first network node cannot receive the data traffic sent by the second network node, that is, when the data traffic reception stops, the first network node can send a detection request message to the second network node. Among them, the first network node can repeatedly send the detection request message at a preset time interval until it receives the detection response message sent by the second network node or stops sending after reaching a preset number of retransmissions (such as N times). Thereby, it can be determined in advance whether the traffic stop between the two nodes is due to a link failure, which can improve the reliability of discovering link failures and save resources compared to the prior art.
[0101] In another possible implementation, when the first network node does not receive the data traffic sent by the second network node within a first preset duration, the first network node sends a detection request message to the second network node. Since the first network node does not receive the data traffic sent by the second network node, it may be that the data traffic sent by the second network node to the first network node has been transmitted. Therefore, the first network node can send a detection request message to the second network node when the duration of not receiving the data traffic sent by the second network node reaches the first preset duration, that is, when the duration of data traffic reception stops reaches the first preset duration. Among them, the first network node can repeatedly send the detection request message at a preset time interval until it receives the detection response message sent by the second network node or stops sending when the preset number of retransmissions (such as N times) is reached. In this way, it can be determined in advance whether the traffic stop between the two nodes is due to a link failure, which can improve the reliability of discovering link failures.
[0102] In another possible implementation, when the first network node does not receive the data traffic sent by the second network node and the first network node stops sending data traffic to the second network node, the first network node sends a detection request message to the second network node. When the first network node does not receive the data traffic sent by the second network node, if the first network node is sending data traffic to the second network node, the first network node will not trigger the sending of the detection request message, and will only send the detection request message to the second network node when the first network node stops sending data traffic to the second network node, that is, when the first network node does not send data traffic to the second network node and does not receive the data traffic sent by the second network node, the first network node will send data traffic to the second network node. Compared with the first two possible implementations, it saves processing resources.
[0103] In another possible implementation, when the first network node does not receive the data traffic sent by the second network node and the first network node stops sending data traffic to the second network node for a period exceeding a second preset period of time, a detection request message is sent to the second network node.
[0104] In the embodiment of the present application, the detection request message may be an NHRP message. Specifically, in the embodiment of the present application, a new message type may be defined based on the NHRP standard message to detect whether the first network node and the second network node are in a connected state.
[0105] The NHRP message defined in the embodiment of the present application may include a first field, and the first field is used to indicate that the NHRP message is a message used to detect whether the first network node and the second network node are in a connection state. Figure 5 The field of type=10 shown, when the extended type type=10, indicates that the message is a message for detecting whether the first network node and the second network node are in a connection state.
[0106] The NHRP message defined in the embodiment of the present application may also include a second field, and the second field is used for the second network node to detect whether the detection request message is safe. The second field can be an authentication field in the NHRP message. The first network node obtains the configured password and generates the content of the authentication field by the configured password, so that when the second network node receives the NHRP message, it determines whether the NHRP message is safe according to the configured password. The authentication field can be located between the message header and the data field in the NHRP message.
[0107] The NHRP message defined in the embodiment of the present application may also include a third field, and the third field is used to identify the sequence number of the NHRP message, and the sequence number is used to indicate whether the NHRP message is a replay message. Among them, the sequence number can be a sequence number that increases from 1, and no duplication is allowed, which uniquely identifies each sent data flow packet. The second network node defends against attacks of replay messages based on the sequence number combined with the anti-replay window and message verification. For example, if the sequence number of the message falls within the anti-replay window, if not, it is considered to be a normal message. If it falls within the anti-replay window, and the sequence number of the message falls on the right side of the anti-replay window, it is verified to be a normal message, and the right boundary of the anti-replay window is slid to the sequence number. If the sequence number of the message falls on the left side of the anti-replay window, it is determined to be a replay message.
[0108] See also Figure 5 The NHRP message defined in the embodiment of the present application is shown in FIG. 1 , where the Sequence number field is the third field. The authentication field can be located at Figure 5 After the Sequence number field as shown.
[0109] in, Figure 5In the SNAP, SNAP indicates that the NHRP message can use the subnetwork access protocol (SNAP) to encode the data traffic transmitted. protocol_type indicates the protocol type used in the external network layer. hop_count indicates the number of entries, which is used to indicate the maximum value allowed for the NHRP data traffic packet to cross. packet_size indicates the size of the NHRP data traffic packet. checksum indicates the checksum, which is used to correct errors in the NHRP message header. The source NBMA address is the public network address of the source node. The source NBMA subnet address is the subnet address where the source node is located. The source protocol address is the tunnel interface address of the source node. The destination protocol address is the next hop address, which is the tunnel interface address of the destination node to be detected. C is used to specify the function of the NHRP message. U is an unused bit.
[0110] The multi-point GRE tunnel networking in the embodiment of the present application can also apply IPsec SA (security association) technology. In the case where the multi-point GRE tunnel networking applies IPsec SA (security association) technology, the detection request message can be the above-mentioned NHRP message, and the dead peer detection (DPD) message of the IPsec SA (security association) technology itself can also be used.
[0111] In the case where the multi-point GRE tunnel networking in the embodiment of the present application applies the IPsec SA (security association) technology, in step S202, when the first network node determines that the first network node has not received the detection response message sent by the second network node, the first network node can also delete the IP security alliance information, and jointly delete the NHRP table used for forwarding data traffic between the first network node and the second network node. The IP security alliance information is used to encrypt the data traffic transmitted between the first network node and the second network node. When a transmission link between the first network node and the second network node fails, timely deleting the IP security alliance information can save the storage resources of the network node. In addition, it can prevent the network node from encrypting the quantity traffic based on the IP security alliance information, thereby reducing the processing resources of the network node.
[0112] Optionally, in the case where both the first network node and the second network node are branch nodes, when the first network node determines that the first network node has not received the detection response message sent by the second network node, after deleting the IP security alliance information and the NHRP table used for forwarding data traffic between the first network node and the second network node, one way is to delete the IP security alliance information and delete the NHRP table, that is, the aggregation routing function is restored by default, and another way is to delete the IP security alliance information and delete the NHRP table, but the aggregation routing function is not restored by default. In this way, after deleting the IP security alliance information and the NHRP table, the first network node restores the aggregation routing function between the first network node and the central node, so that the data traffic transmission between the first network node and the second network node can be forwarded by the central node. After the link between the two branch nodes fails, forwarding by the central node can be restored, and the data traffic transmission between the branch nodes can be restored.
[0113] Optionally, in the embodiment of the present application, when the first network node determines that the first network node has not received the detection response message sent by the second network node, it determines that the transmission link between the first network node and the second network node is faulty, so that the first network node can send an alarm signal to the user, and the alarm signal is used to indicate that the transmission link between the first network node and the second network node is faulty.
[0114] In addition, the alarm signal can be a warning sound that can be heard by the user (for example, a beep, siren, etc.), or a warning that can be seen by the user (for example, lighting, flashing lights, images on the display, prompt text on the display, etc.), or it can be an alarm that can be felt by the user (for example, vibration), and the present application does not make any specific limitations on this.
[0115] In the embodiment of the present application, if the first network node receives a detection request message sent by the second network node, it sends a detection response message to the second network node so that the second network node can determine that the link between the first network node and the second network node is normal.
[0116] Based on the same inventive concept as the above method embodiment, the embodiment of the present application provides a communication connection detection device, which can be applied to the first network node in the multi-point general routing encapsulation protocol GRE tunnel networking, and the device is specifically used to implement Figures 2 to 5 The method performed by the first network node in the embodiment shown. Figure 6 As shown, the device may include:
[0117] The first sending module 61 is configured to send a detection request message to a second network node, where the detection request message is used to detect whether the first network node and the second network node are in a connection state.
[0118] A first receiving module 65, configured to receive a detection response message sent by the second network node;
[0119] The processing module 62 is used for, when it is determined that the first receiving module 65 has not received the detection response message sent by the second network node, the first network node deletes the NHRP table between the first network node and the second network node, so that the data traffic transmitted between the first network node and the second network node is forwarded through the central node; the NHRP table is used for the first network node to send data traffic to the second network node through the tunnel established between the first network node and the second network node.
[0120] Optionally, the device may further include:
[0121] A second receiving module 63, configured to receive data traffic sent by the second network node;
[0122] A second sending module 64, configured to send data traffic to the second network node;
[0123] The first sending module 61 is specifically used to send a detection request message to the second network node when it is determined that the data traffic sent by the second network node has not been received: or, when it is determined that the data traffic sent by the second network node has not been received within a first preset time period, send a detection request message to the second network node; or, when it is determined that the data traffic sent by the second network node has not been received and the second sending module 64 has not sent data traffic to the second network node, send a detection request message to the second network node; or, when it is determined that the data traffic sent by the second network node has not been received and the second sending module 64 has not sent data traffic to the second network node for a period exceeding a second preset time period, send a detection request message to the second network node.
[0124] Optionally, the device may further include:
[0125] The processing module 62, when determining that the first receiving module 65 has not received the detection response message sent by the second network node, is specifically configured to:
[0126] Determine that the first receiving module 65 does not receive the detection response message sent by the second network node within a third preset time period; or,
[0127] Determine that the first receiving module 65 has not received the detection response message sent by the second network node within the third preset time length, and after the first sending module 61 repeatedly sends the detection request message to the second network node N times, the first receiving module 65 has not received the detection response message sent by the second network node, where N is an integer greater than 1.
[0128] Optionally, the detection request message is an NHRP message, and the NHRP message includes a first field, where the first field is used to indicate that the NHRP message is a message used to detect whether the first network node and the second network node are in a connection state.
[0129] Optionally, the NHRP message further includes a second field, and the second field is used by the second network node to detect whether the detection request message is safe.
[0130] Optionally, the NHRP message further includes a third field, where the third field is used to identify a sequence number of the NHRP message, and the sequence number is used to indicate whether the NHRP message is a replay message.
[0131] Optionally, the detection request message is a DPD message.
[0132] Optionally, the processing module 62 is also used to delete IP security alliance information when it is determined that the first receiving module 65 has not received the detection response message sent by the second network node, and the IP security alliance information is used to encrypt the data traffic transmitted between the first network node and the second network node.
[0133] Optionally, the first network node and the second network node are both branch nodes, and the processing module 62 is also used to restore the aggregation routing function between the first network node and the central node when it is determined that the first receiving module 65 has not received the detection response message sent by the second network node. The aggregation routing function is used for the processing module 62 to forward the data traffic transmitted between the first network node and the second network node through the central node.
[0134] Optionally, the processing module 62 is further used to send an alarm signal when it is determined that the first receiving module 65 has not received the detection response message sent by the second network node, and the alarm signal is used to indicate that a transmission link between the first network node and the second network node has a fault.
[0135] The division of modules in the embodiments of the present application is schematic and is only a logical function division. There may be other division methods in actual implementation. In addition, each functional module in each embodiment of the present application may be integrated in one or more processors, or may exist physically separately, or two or more modules may be integrated in one module. The above-mentioned integrated modules can be implemented in the form of hardware or in the form of software functional modules. Therefore, the method described in any of the above embodiments of the present application can be implemented by one or more processors in the first network node. The first network node described here can be a branch node or a central node. In the embodiment of the present application, the structure of the first network node is the same as that of the second network node. The structure of the second network node refers to the first network node and will not be repeated.
[0136] When the first network node is implemented by hardware, Figure 7 The structure shown can also be implemented by Figure 8 The structure shown is implemented.
[0137] See also Figure 7 As shown, it is a schematic diagram of the structure of a first network node provided in an embodiment of the present application, and the first network node may include a main control board 510, a switching network board 520, an interface board 530, and an interface board 540. The main control board 510 includes a central processor 511, the interface board 530 includes a memory 534, a network processor 532, and a physical interface card 533; the interface board 540 includes a memory 544, a network processor 542, and a physical interface card 543.
[0138] The switching network board 520 is mainly used to forward data traffic packets between the interface board 530 and the interface board 540 .
[0139] The interface board 530 is used as a receiving board, and the interface board 540 is used as a sending board.
[0140] The network processor 532 checks according to the detection interval (first preset duration) configured by the operation manager (OM) and finds that no data traffic is received from the second network node within the configured time interval, considers the traffic to be abnormal, and sends a detection request message to the central processor 511.
[0141] After receiving the detection request message, the central processor 511 constructs a detection request message, searches the local routing table according to the destination address of the detection request message, finds the interface board 530 where the outgoing interface is located, and then sends the detection request message to the network processor 532 .
[0142] The network processor 532 sends the detection request message from the physical interface card 533 after completing the link layer encapsulation according to the information such as the outgoing interface, that is, sends it to the second network node.
[0143] After receiving the detection response message sent by the second network node from the network, the physical interface card 543 sends the message to the network processor 542 .
[0144] Physical interface card 543: receives the detection response message from the network, and after completing relevant verification, submits it to the network processor 542 for processing.
[0145] The network processor 542 uses the destination address of the detection response message to query the NHRP table stored in the memory 544, determines that it is a local message, and sends it to the central processor 511 for processing.
[0146] The central processor 511 matches the detection request message according to the detection address, sequence number and other information carried in the received detection response message. If the match is successful, the link state is considered normal. If the central processor 511 does not receive the detection response message sent by the second network node within the third preset time, the detection request message will be retransmitted a limited number of times. After retransmitting N times without receiving the detection response message sent by the second network node, it is determined that the link between the first network node and the second network node is faulty, and the link can be set to DOWN, and the NHRP table for forwarding data traffic between the first network node and the second network node stored in the memory 544 and the memory 533 is deleted.
[0147] Optionally, the physical interface card 543 receives a detection request message sent by the second network node from the network, and submits it to the network processor 542 for processing.
[0148] The network processor 542 uses the destination address of the detection request message to query the local route, determines that it is a local message, and sends it to the central processor 511 for processing.
[0149] The central processor 511: after verifying the message characteristic information of the received detection request message, determines that the detection request message is a message for detecting whether the first network node and the second network node are in a connection state, and constructs a detection response message. According to the destination address of the detection response message, the NHRP table stored in the memory 534 is queried to find the interface board 530 where the outgoing interface is located, and then sends the detection response message to the network processor 532.
[0150] The network processor 532 sends the detection response message from the physical interface card 533 after completing the link layer encapsulation according to the information such as the outgoing interface, that is, sends it to the second network node.
[0151] See also Figure 86 is a schematic diagram of another structure of a first network node provided in an embodiment of the present application. The first network node includes a communication interface 610, a processor 620 and a memory 630. The processor 620 sends and receives data traffic and detection request messages and detection response messages through the transceiver 610, and is used to implement Figures 2 to 4 The method performed by the first network node described in the embodiment of the present application. In the implementation process, each step of the processing flow can be completed by an integrated logic circuit of hardware or software instructions in the processor 620. The processor 620 includes one or more of a general-purpose processor, a network processor, a digital signal processor, an application-specific integrated circuit, a field programmable gate array or other programmable logic device, a discrete gate or transistor logic device, a discrete hardware component, etc., and can implement or execute the various methods, steps and logic block diagrams disclosed in the embodiments of the present application. The general-purpose processor can be a microprocessor or any conventional processor, etc. The steps of the method disclosed in the embodiment of the present application can be directly embodied as a hardware processor to be executed, or a combination of hardware and software units in the processor to be executed. The program code executed by the processor 620 to implement the above method can be stored in the memory 630. The memory 630 can be a non-volatile memory, such as a hard disk (English: hard disk drive, abbreviated: HDD) or a solid-state drive (English: solid-state drive, abbreviated: SSD), etc., and can also be a volatile memory (English: volatile memory), such as a random access memory (English: random-access memory, abbreviated: RAM). Memory 630 is, but is not limited to, any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer.
[0152] The specific connection medium between the transceiver 610, the processor 620 and the memory 630 is not limited in the embodiment of the present application. Figure 8 The memory 630, the processor 620 and the transceiver 610 are connected via a bus 640. Figure 8 The connections between the other components are shown in bold lines, which are only for illustration and are not intended to be limiting. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 8 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.
[0153] Based on the above embodiments, the embodiments of the present application further provide a computer storage medium, in which a software program is stored, and when the software program is read and executed by one or more processors, the method provided in the above embodiments can be implemented. The computer storage medium may include: a USB flash drive, a mobile hard disk, a read-only memory, a random access memory, a magnetic disk or an optical disk, and other media that can store program codes.
[0154] Based on the above embodiments, the embodiments of the present application also provide a chip system, which includes a processor for supporting distributed units, centralized units and base stations to implement the functions involved in the above embodiments, for example, generating or processing the data and / or information involved in the above methods. Optionally, the chip system also includes a memory, which is used to store necessary program instructions and data for distributed units, centralized units and network nodes. The chip system can be composed of chips, or it can include chips and other discrete devices.
[0155] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.
[0156] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0157] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0158] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0159] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.
Claims
1. A communication connection detection method, characterized in that: include: The first network node sends a detection request message to the second network node, where the detection request message is a dead peer detection DPD message, and the detection request message is used to detect whether the first network node and the second network node are in a connected state; When the first network node determines that the first network node has not received the detection response message sent by the second network node, the first network node deletes the next hop resolution protocol NHRP table and the Internet Protocol IP security association information, so that the data traffic transmitted between the first network node and the second network node is forwarded through the central node, and the detection response message is a response message in response to the detection request message; the NHRP table is used for the first network node to forward data traffic to the second network node through the tunnel established between the first network node and the second network node; The IP security association information is used to encrypt data traffic transmitted between the first network node and the second network node.
2. The method according to claim 1, characterized in that When any one of the following conditions is met, the first network node sends a detection request message to the second network node: The first network node does not receive the data traffic sent by the second network node; The first network node does not receive the data traffic sent by the second network node within a first preset time period; The first network node does not receive data traffic sent by the second network node and the first network node does not send data traffic to the second network node; and, The first network node does not receive the data traffic sent by the second network node and the first network node does not send the data traffic to the second network node for a period of time exceeding a second preset period of time.
3. The method according to claim 1 or 2, characterized in that: The first network node fails to receive a detection response message sent by the second network node, including: The first network node determines that the detection response message sent by the second network node is not received within a third preset time period; or, The first network node determines that the detection response message sent by the second network node has not been received within the third preset time length, and after repeatedly sending the detection request message to the second network node N times, the detection response message sent by the second network node has not been received, where N is an integer greater than 1.
4. The method according to claim 1 or 2, characterized in that: When the first network node does not receive the detection response message sent by the second network node, the method further includes: The first network node restores an aggregation routing function between the first network node and the central node, where the aggregation routing function is used to forward data traffic transmitted between the first network node and the second network node through the central node.
5. A communication connection detection device, characterized in that: The device is applied to a first network node, and includes: A first sending module, configured to send a detection request message to a second network node, wherein the detection request message is a dead peer detection DPD message, and the detection request message is used to detect whether the first network node and the second network node are in a connected state; A first receiving module, configured to receive a detection response message sent by the second network node; A processing module, used for, when it is determined that the first receiving module has not received the detection response message sent by the second network node, the first network node deletes the next hop resolution protocol NHRP table and the Internet Protocol IP security association information, so that the data traffic transmitted between the first network node and the second network node is forwarded through the central node, and the detection response message is a response message in response to the detection request message; the NHRP table is used for the first network node to send data traffic to the second network node through the tunnel established between the first network node and the second network node, and the IP security association information is used for encrypting the data traffic transmitted between the first network node and the second network node.
6. The device according to claim 5, characterized in that The device also includes: A second receiving module, used to receive data traffic sent by the second network node; A second sending module, used to send data traffic to the second network node; The second sending module is specifically configured to send a detection request message to the second network node when it is determined that any one of the following conditions is met: The second receiving module does not receive the data traffic sent by the second network node; The second receiving module does not receive the data traffic sent by the second network node within a first preset time period; The second receiving module does not receive the data traffic sent by the second network node and the second sending module does not send data traffic to the second network node; and, The second receiving module does not receive the data traffic sent by the second network node and the second sending module does not send the data traffic to the second network node for a period of time exceeding a second preset period of time.
7. The device according to claim 5 or 6, characterized in that The processing module, when determining that the first receiving module has not received the detection response message sent by the second network node, is specifically configured to: determining that the first receiving module has not received the detection response message sent by the second network node within a third preset time period; or, Determine that the first receiving module has not received the detection response message sent by the second network node within the third preset time length, and after the first sending module repeatedly sends the detection request message to the second network node N times, the first receiving module has not received the detection response message sent by the second network node, where N is an integer greater than 1.
8. The device according to claim 5 or 6, characterized in that The processing module is also used to restore the aggregation routing function between the first network node and the central node when it is determined that the first receiving module has not received the detection response message sent by the second network node. The aggregation routing function is used by the processing module to forward the data traffic transmitted between the first network node and the second network node through the central node.
9. A communication connection detection network node, characterized in that: include: Communication interface, memory and processor; The communication interface is used to send and receive data; The memory is used to store the program executed by the processor; The processor is used to execute the program stored in the memory, and to send and receive data through the communication interface to implement the method according to any one of claims 1 to 4.
10. A computer storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are used to enable the computer to execute the method according to any one of claims 1 to 4.
Citation Information
Patent Citations
Method for establishing route by linking routing information protocol with bidirectional forwarding detection and equipment
CN102355416A
Method for establishing tunnel forwarding table entries, central node and branch nodes
CN102868586A
Dynamic virtual private network (DVPN)-based route generation method and equipment
CN103209108A
Communication system and network relay device
CN103812795A
Method and apparatus for detecting abnormality of IPSec SA based on DPD protocol
CN106487802A
