Method and device for checking health of link
First Claim
1. A method for checking health of a link, comprising:
- receiving and saving control information generated by a keep-alive program, wherein the control information comprises a source Internet Protocol IP address, a source port, a destination IP address, a destination port, an IP address of a server to be checked, and mode information, wherein the mode information comprises a Direct Routing DR mode or a Tunnel TUN mode;
performing a matching on a message received according to the control information, processing the message if the matching is successful, and sending a processed message to the server to be checked; and
determining that the link is healthy if a response message is received from the server to be checked, and determining that the link is unhealthy if no response message is received from the server to be checked;
wherein processing the message comprises;
if the mode information is determined as the DR mode, amending a destination MAC address of the message to a MAC address of the server to be checked; and
if the mode information is determined as the TUN mode, adding a TUNNEL head before the destination IP address of the message.
1 Assignment
0 Petitions
Accused Products
Abstract
A method and a device for checking health of a link are disclosed in the present disclosure. The method includes: receiving and saving control information generated by a keep-alive program; performing a matching on a message received according to the control information, processing the message if the matching is successful, and sending a processed message to the server to be checked; and determining that the link is healthy if a response message is received from the server to be checked, and determining that the link is unhealthy if no response message r is received from the server to be checked. With embodiments of the present disclosure, control information generated by the keep-alive program is received and saved, a matching is performed on a received message according to the control information, and the message is processed if the matching is successful, and then the processed message is sent to a server to be checked, such that whether a link corresponding to the server to be checked is healthy is checked. The above procedure is in accordance with the procedure of accessing the LVS, and thus the problem of traffic loss or mistakenly rejecting the server may be solved and the accuracy of checking health may be improved.
8 Citations
6 Claims
-
1. A method for checking health of a link, comprising:
-
receiving and saving control information generated by a keep-alive program, wherein the control information comprises a source Internet Protocol IP address, a source port, a destination IP address, a destination port, an IP address of a server to be checked, and mode information, wherein the mode information comprises a Direct Routing DR mode or a Tunnel TUN mode; performing a matching on a message received according to the control information, processing the message if the matching is successful, and sending a processed message to the server to be checked; and determining that the link is healthy if a response message is received from the server to be checked, and determining that the link is unhealthy if no response message is received from the server to be checked; wherein processing the message comprises; if the mode information is determined as the DR mode, amending a destination MAC address of the message to a MAC address of the server to be checked; and if the mode information is determined as the TUN mode, adding a TUNNEL head before the destination IP address of the message. - View Dependent Claims (2, 3)
-
-
4. A device for checking health of a link, comprising:
one or more processors configured to execute one or more software modules stored in a non-transitory storage medium, the one or more software modules including; a receiving module, configured to receive and save control information generated by a keepalive program, wherein the control information comprises a source Internet Protocol IP address, a source port, a destination IP address, a destination port, an IP address of a server to be checked, and mode information, wherein the mode information comprises a Direct Routing DR mode or a Tunnel TUN mode; a processing module, configured to perform a matching on a message received according to the control information, process the message if the matching is successful, and send a processed message to the server to be checked; and a determining module, configured to determine that the link is healthy if a response message is received from the server to be checked, and to determine that the link is unhealthy if no response message is received from the server to be checked; wherein the processing module is configured to; amend a destination MAC address of the message to a MAC address of the server to be checked, if the mode information is determined as the DR mode; and add a TUNNEL head before the destination IP address of the message matched successfully, if the mode information is determined as the TUN mode. - View Dependent Claims (5, 6)
Specification