CN110912997B - Method and device for checking Loopback interface of triangular networking - Google Patents

Method and device for checking Loopback interface of triangular networking Download PDF

Info

Publication number
CN110912997B
CN110912997B CN201911171028.0A CN201911171028A CN110912997B CN 110912997 B CN110912997 B CN 110912997B CN 201911171028 A CN201911171028 A CN 201911171028A CN 110912997 B CN110912997 B CN 110912997B
Authority
CN
China
Prior art keywords
address
target electronic
message
loopback interface
load balancing
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201911171028.0A
Other languages
Chinese (zh)
Other versions
CN110912997A (en
Inventor
高振江
孙艳杰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hangzhou DPTech Technologies Co Ltd
Original Assignee
Hangzhou DPTech Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hangzhou DPTech Technologies Co Ltd filed Critical Hangzhou DPTech Technologies Co Ltd
Priority to CN201911171028.0A priority Critical patent/CN110912997B/en
Publication of CN110912997A publication Critical patent/CN110912997A/en
Application granted granted Critical
Publication of CN110912997B publication Critical patent/CN110912997B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1001Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/54Presence management, e.g. monitoring or registration for receipt of user log-on information, or the connection status of the users
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/30Definitions, standards or architectural aspects of layered protocol stacks
    • H04L69/32Architecture of open systems interconnection [OSI] 7-layer type protocol stacks, e.g. the interfaces between the data link level and the physical level

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer And Data Communications (AREA)

Abstract

The application provides a method and a device for checking a triangular networking Loopback interface. In the application, the load balancing device constructs a check message for a Loopback interface of a target electronic device to be checked, a destination IP of the check message is a virtual IP address of the load balancing device itself, and a destination MAC of the check message is an MAC address of the target electronic device, so that the check message is sent to the target electronic device through the destination MAC, and the target electronic device determines whether to return a response message to the device according to the destination IP address of the check message and the Loopback interface address of the target electronic device. After receiving the check message, the target electronic device determines whether to return a response message to the device according to the destination IP address of the check message and the Loopback interface address of the target electronic device, so that the load balancing device can check the Loopback interface of the target electronic device according to whether to receive the response message.

Description

Method and device for checking Loopback interface of triangular networking
Technical Field
The application relates to the technical field of internet, in particular to a method and a device for checking a triangular networking Loopback interface.
Background
The load balancing system comprises a load balancing device and an electronic device cluster. The external traffic is dispatched to the electronic device cluster by the load balancing device, specifically, the load balancing device receives a request message of the external user host through the virtual IP address, and forwards the request message to the electronic device available in the electronic device cluster, and the electronic device receiving the request message replies a response message.
The triangulation network refers to that in a load balancing system, a request message received by electronic equipment is sent by a user host and forwarded by load balancing equipment, and a response message replied by the electronic equipment is directly sent to the user host without passing through the load balancing equipment. Since the destination IP address of the request packet sent by the user host is the virtual IP address of the load balancing device, the source IP address of the response packet returned by the electronic device needs to be consistent with the destination IP address of the request packet (i.e., the virtual IP address of the load balancing device). Therefore, the electronic device needs to configure a Loopback interface IP address as a virtual IP address with balanced load, so that the source IP address of the sent response packet is the virtual IP address.
Therefore, how to check the validity of the Loopback interface has important significance for message forwarding under the triangular networking.
Disclosure of Invention
In view of the above technical problems, the present application provides a method and an apparatus for checking a Loopback interface of a triangulation network, which can realize checking of the Loopback interface of an electronic device under the triangulation network.
According to a first aspect of the present application, there is provided a method for checking a triangular networking Loopback interface, the method including:
constructing a check message for checking a Loopback interface of target electronic equipment in a triangular network, wherein a target IP address of the check message is a virtual IP address of the equipment, and a target MAC address is an MAC address of the target electronic equipment;
sending the check message to the target electronic equipment according to the destination MAC address so that the target electronic equipment determines whether to return a response message to the equipment or not according to the destination IP address of the check message and the Loopback interface address of the target electronic equipment;
if the response message returned by the target electronic equipment is received, determining that the Loopback interface is valid;
and if the response message returned by the target electronic equipment is not received, determining that the Loopback interface is invalid.
According to a second aspect of the present application, there is provided another method for checking a triangular networking Loopback interface, including:
Receiving a check message sent by the load balancing equipment;
determining whether to return a response message of the check message to the load balancing equipment according to a destination IP address of the check message and an IP address of a Loopback interface of the equipment, so that the load balancing equipment determines that the Loopback interface is valid if receiving the response message returned by the target electronic equipment; and if the response message returned by the target electronic equipment is not received, determining that the Loopback interface is invalid.
According to a third aspect of the present application, there is provided an apparatus for checking a triangular networking Loopback interface, the apparatus including:
a constructing unit, configured to construct an inspection message for inspecting a Loopback interface of a target electronic device in a triangulation network, where a destination IP address of the inspection message is a virtual IP address of the device, and a destination MAC address is an MAC address of the target electronic device;
a sending unit, configured to send the check message to the target electronic device according to the destination MAC address, so that the target electronic device determines whether to return a response message to the device according to a destination IP address of the check message and a Loopback interface address of the target electronic device;
The first judging unit is used for determining that the Loopback interface is valid if the response message returned by the target electronic equipment is received;
and if the response message returned by the target electronic equipment is not received, determining that the Loopback interface is invalid.
According to a fourth aspect of the present application, there is provided another apparatus for checking a triangular network Loopback interface, the apparatus including:
a receiving unit, configured to receive an inspection packet sent by the load balancing device;
a response unit, configured to determine whether to return a response packet of the check packet to the load balancing device according to a destination IP address of the check packet and an IP address of a Loopback interface of the device, so that the load balancing device determines that the Loopback interface is valid if receiving the response packet returned by the target electronic device; and if the response message returned by the target electronic equipment is not received, determining that the Loopback interface is invalid.
In the application, the load balancing device constructs a check message for a Loopback interface of a target electronic device to be checked, a destination IP of the check message is a virtual IP address of the load balancing device itself, and a destination MAC of the check message is an MAC address of the target electronic device, so that the check message is sent to the target electronic device through the destination MAC, and the target electronic device determines whether to return a response message to the device according to the destination IP address of the check message and the Loopback interface address of the target electronic device.
After receiving the check message, the target electronic device determines whether to return a response message to the device according to the destination IP address of the check message and the Loopback interface address of the target electronic device, so that the load balancing device can check the Loopback interface of the target electronic device according to whether to receive the response message.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments described in the present application, and other drawings can be obtained by those skilled in the art according to the drawings.
FIG. 1 is a schematic diagram of an application scenario illustrated in an exemplary embodiment of the present application;
fig. 2 is a flowchart illustrating a method for checking a triangular networking Loopback interface according to an exemplary embodiment of the present application;
fig. 3 is a flowchart illustrating another checking method for a triangular network Loopback interface according to an exemplary embodiment of the present application;
fig. 4 is a flowchart illustrating another checking method for a triangulation Loopback interface according to an exemplary embodiment of the present application;
Fig. 5 is a hardware structure diagram of a load balancing apparatus according to an exemplary embodiment of the present application;
FIG. 6 is a diagram illustrating a hardware configuration of an electronic device according to an exemplary embodiment of the present application;
fig. 7 is a block diagram of an inspection apparatus of a triangular networking Loopback interface according to an exemplary embodiment of the present application;
fig. 8 is a block diagram of another checking apparatus of a triangulation Loopback interface according to an exemplary embodiment of the present application.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present application, as detailed in the appended claims.
Referring to fig. 1, fig. 1 is a schematic diagram of an application scenario shown in an exemplary embodiment of the present application, where the application scenario includes a user host and a load balancing system, where the load balancing system includes a load balancing device and an electronic device cluster. The electronic device cluster includes a plurality of electronic devices providing the same or similar functions, and only an electronic device 1 and an electronic device 2 are shown in fig. 1 as an example.
It should be noted that the above-mentioned subscriber host and the device in the load balancing system communicate with each other through a switch, a router, and other forwarding devices, and all the devices in the load balancing system are located in the same broadcast domain.
In the operation process of the load balancing system, the load balancing device schedules the external traffic of the user host to the electronic devices in the electronic device cluster. Specifically, the load balancing device receives a request message of an external user host through a virtual IP address, forwards the request message to an available electronic device in the electronic device cluster, and the electronic device that receives the request message replies a response message.
When the load balancing system is used as a server in a scene with a large reply flow, such as a video server or a cache server, a triangulation network is generally required to relieve the pressure of the load balancing device. Specifically, triangulation refers to that in a load balancing system, a request message received by an electronic device is sent by a user host and forwarded by load balancing equipment, and a response message replied by the electronic device is directly sent to the user host without passing through the load balancing equipment.
Generally, since the destination IP address of the request message sent by the user host is the virtual IP address of the load balancing device, the source IP address of the response message returned by the electronic device needs to be consistent with the destination IP address of the request message, that is, the virtual IP address of the load balancing device.
The Loopback interface is a pure software virtual interface on the electronic device, and in order to make the reply message meet the above requirements, the electronic device needs to configure the Loopback interface IP address as a load-balanced virtual IP address, so that the source IP address of the sent reply message is the virtual IP address.
The following specifically describes an operation manner of a load balancing system in a triangular networking by taking an application scenario shown in fig. 1 as an example.
It is understood that the load balancing device may forward the request message to the electronic devices available in the electronic device cluster according to a preset load balancing policy (e.g., polling, minimum number of connections, etc.), so that the electronic device replies to the response message. Here, the electronic device 1 is described as an example, and is not particularly limited.
Assuming that the virtual IP address of the load balancing device is 192.168.2.8 and the real IP address of the electronic device 1 is 192.168.2.11, the Loopback interface address of the electronic device 1 is configured to be 192.168.2.8.
Step 101: the user host sends a request message to the virtual IP address of the load balancing equipment, and the destination IP address of the request message is 192.168.2.11;
step 102: the load balancing device forwards the request message to the electronic device 1, and the source IP address of the request message is still the IP address of the user host;
Step 103: after receiving the request message, the electronic device 1 directly returns a response message to the user host according to the source IP address of the request message, and modifies the source IP address of the response message into its own Loopback interface address.
Therefore, the user host completes one interaction with the electronic device, and the subsequent user host can continue to send the request message to the virtual IP address of the load balancing device based on the response message.
In the triangulation network, since the electronic device directly returns a response message to the user host without passing through the load balancing device after receiving an external request, the load balancing device cannot receive the response message, and thus cannot determine the operating state of the electronic device according to the response message.
Therefore, the load balancing device needs to periodically send a check message to the electronic device, and determine the state of the electronic device according to a response message returned by the electronic device for the check message.
In general, a load balancing device sends a check message to a real IP address of an electronic device to check the availability of the electronic device according to a response message returned by the electronic device.
Taking fig. 1 as an example, the load balancing device sends a check message to the real network card IP address 192.168.2.11 of the electronic device 1, and if the electronic device 1 does not return a response message within a preset duration, it is determined that the electronic device 1 is unavailable; if the electronic device 1 returns a response message within a preset time length, the availability of the electronic device is checked according to the response message.
However, if the Loopback interface is abnormally tampered, the interface fails, so that the source IP address of the response message returned to the user host by the electronic device is the tampered IP address, and the user host discards the response message because the source IP address of the response message is not consistent with the destination address of the request message sent by the user host. However, the existing checking method for the load balancing device cannot detect the status of the Loopback interface of the electronic device, and if the Loopback interface fails, the load balancing device still forwards the request message of the user host to the electronic device, which may cause the user host to discard the response message returned by the electronic device, thereby causing interaction failure between the user host and the electronic device.
In view of this, the present application provides a method for checking a Loopback interface in a triangulation network. In the application, the load balancing device constructs a check message for a Loopback interface of a target electronic device to be checked, where a destination IP of the check message is a virtual IP address of the load balancing device itself, and a destination MAC is an MAC address of the target electronic device, so that the check message is sent to the target electronic device through the destination MAC. The target electronic equipment detects the received check message, and if the destination IP address of the check message is consistent with the IP address of the local Loopback interface, a response message is returned; and if the destination IP address of the check message is inconsistent with the IP address of the local Loopback interface, discarding the check message. By the method, the load balancing equipment can check the Loopback interface of the target electronic equipment according to whether the response message is received or not, so that the situation that the load balancing equipment only checks the real IP of the electronic equipment and judges the state of the electronic equipment by mistake is avoided.
Referring to fig. 2, fig. 2 is a diagram illustrating an inspection method for a Loopback interface in a triangulation network according to an exemplary embodiment of the present application, where the inspection method is applied to a load balancing device in the triangulation network.
Step S201, the load balancing device constructs a check message for checking a Loopback interface of a target electronic device in the triangular network, wherein a target IP address of the check message is a virtual IP address of the device, and a target MAC address is an MAC address of the target electronic device.
In this application, the load balancing device records a MAC address table including MAC addresses of all electronic devices in the electronic device cluster.
When the load balancing device determines the Loopback interface of the target electronic device to be checked, the MAC address of the target electronic device is obtained in the MAC address table, then the target IP address of the check message is set as the virtual IP address of the device, and the target MAC address of the check message is set as the obtained MAC address.
Alternatively, the check message may be a message only used for detecting network connectivity, such as an ICMP protocol message; alternatively, the check message may also be a message carrying specific query data, such as an HTTP protocol message, a RADIUS protocol message, and the like.
And S202, the load balancing equipment sends the check message to the target electronic equipment according to the destination MAC address, so that the target electronic equipment determines whether to return a response message to the equipment or not according to the destination IP address of the check message and the Loopback interface address of the target electronic equipment.
Step S203, if the load balancing equipment receives the response message returned by the target electronic equipment, determining that the Loopback interface is effective; and if the load balancing equipment does not receive the response message returned by the target electronic equipment, determining that the Loopback interface fails.
First, the load balancing device sends the check message constructed in step S201 to the target electronic device. Because the load balancing device and the electronic device are both in the same broadcast domain, the load balancing device can send the check message to the target electronic device through a two-layer network by using the destination MAC address in the check message.
Then, after receiving the check message, the target electronic device obtains message header information of the check message and detects whether the destination IP address of the check message is consistent with the Loopback interface address of the device.
And if the detection messages are inconsistent, the target electronic equipment discards the detection messages and does not respond.
And if the source IP address is consistent with the local IP address, the target electronic equipment returns a response message which takes the Loopback interface address of the equipment as the source IP address to the load balancing equipment.
Finally, the load balancing device determines whether the Loopback interface of the target electronic device is valid according to whether a response message returned by the target electronic device is received within a preset time, and the specific method is as follows:
if the load balancing device receives the response message returned by the target electronic device in step S202, which indicates that the IP address of the Loopback interface of the target electronic device is consistent with the virtual IP address of the load balancing device, the load balancing device determines that the Loopback interface of the target electronic device is valid;
and if the load balancing equipment does not receive the response message returned by the target electronic equipment, the fact that the IP address of the Loopback interface of the target electronic equipment is inconsistent with the virtual IP address of the load balancing equipment is indicated, and the Loopback interface of the target electronic equipment is determined to be invalid.
In addition, it should be further noted that if the target electronic device is in the DOWN state due to a power failure, a network disconnection, or the like, a response message will not be returned for the check message, so that the load balancing device determines that the Loopback interface of the target electronic device is invalid.
It can be understood that, in a general case, after receiving the check message, the target electronic device detects whether the check message is a check message addressed to the device. And if the check message is sent to the equipment, responding to the check message. If not, the check message is discarded.
When detecting whether the check message is a check message sent to the device, the target electronic device may detect whether a destination IP address of the check message is consistent with a Loopback interface address of the device, and if so, respond to the content of the check message, and if not, discard the check message and do not respond.
Therefore, when the IP address of the Loopback interface is tampered and fails, if the target electronic device receives the check message, the target electronic device will mistakenly determine that the check message is not the check message sent to the device because the destination IP address of the check message is inconsistent with the address of the Loopback interface of the device, so that the check message is discarded, and no response message is sent to the load balancing device; and when the Loopback interface is effective, the target electronic equipment responds according to the content of the check message.
Thus, the load balancing device may determine the validity of the interface based on whether a reply message is received.
Thus, the flow shown in fig. 2 is completed.
As can be seen from the flow shown in fig. 2, in the application, the load balancing device constructs a check message for the Loopback interface of the target electronic device to be checked, where a destination IP of the check message is a virtual IP address of the load balancing device itself, and a destination MAC of the check message is an MAC address of the target electronic device, and sends the check message to the target electronic device through the destination MAC, so that the target electronic device determines whether to return a response message to the device according to the destination IP address of the check message and the Loopback interface address of the target electronic device. After receiving the check message, the target electronic device determines whether to return a response message to the device according to the destination IP address of the check message and the Loopback interface address of the target electronic device, so that the load balancing device can check the Loopback interface of the target electronic device according to whether to receive the response message.
In order for the load balancing device to reasonably schedule external traffic to the electronic devices in the electronic device cluster, the load balancing device needs to determine not only the status of the target electronic device Loopback interface, but also whether the target electronic device is available.
As an optional embodiment, in a case that the load balancing device does not receive the reply message within a preset time period, determining that the Loopback interface of the target electronic device is invalid, thereby determining that the target electronic device is unavailable; and under the condition that the load balancing equipment receives a response message returned by the target electronic equipment, determining that a Loopback interface of the target electronic equipment is effective, thereby determining that the target electronic equipment is available.
As another optional embodiment, when the load balancing device receives a response message returned by the target electronic device, it is determined whether the target electronic device is available according to whether the data content in the response message satisfies a preset condition. The following illustrates a method of determining whether a target electronic device is available:
assuming that the request data of the check message carries query conditions for operating parameters (such as CPU utilization, network card utilization, and memory utilization) of the electronic device, the target electronic device queries its own operating parameters according to the query conditions, and carries the queried operating parameters in the returned response message. And the load balancing equipment analyzes the response message, obtains the operation parameters of the target electronic equipment and compares the operation parameters with preset conditions.
If the operation parameters of the target electronic equipment meet preset conditions, determining that the target electronic equipment is available;
and if the operation parameters of the target electronic equipment do not meet the preset conditions, determining that the target electronic equipment is unavailable.
The load balancing equipment periodically sends a check message to the electronic equipment in the electronic equipment cluster, and determines the availability of the electronic equipment based on the method. Based on the judgment result, the load balancing equipment forwards the received external traffic sent by the user host to the available electronic equipment according to a preset load balancing strategy.
Referring to fig. 3, fig. 3 is a schematic diagram illustrating another checking method for a triangulation loop Loopback interface according to an exemplary embodiment of the present application, where the checking method is applied to an electronic device in a triangulation loop Loopback.
Step S301: and the electronic equipment receives the check message sent by the load balancing equipment.
The electronic equipment receives a check message sent by the load balancing equipment, and the destination IP address of the check message is the virtual IP address of the load balancing equipment.
Step S302: determining whether to return a response message of the check message to the load balancing equipment according to a destination IP address of the check message and an IP address of a Loopback interface of the equipment, so that the load balancing equipment determines that the Loopback interface is valid if receiving the response message returned by the target electronic equipment; and if the response message returned by the target electronic equipment is not received, determining that the Loopback interface is invalid.
The electronic equipment analyzes the received check message to obtain message header information of the check message, and determines whether to return a response message corresponding to the check message to the load balancing equipment or not based on a destination IP address of the check message and an IP address of a Loopback interface of the electronic equipment.
As an alternative embodiment, the electronic device may detect whether a destination IP address of the check message (i.e., the virtual IP address of the load balancing device) is consistent with a Loopback interface address of the device.
And if the detection messages are inconsistent, the target electronic equipment discards the detection messages and does not respond.
And if the source IP address is consistent with the local IP address, the target electronic equipment returns a response message which takes the Loopback interface address of the equipment as the source IP address to the load balancing equipment.
Based on the above steps, the load balancing device may determine whether the Loopback interface of the target electronic device is valid according to whether the reply message returned by the target electronic device is received within the preset time period. Specifically, if the load balancing device receives a response message returned by the target electronic device, which indicates that the IP address of the target electronic device is consistent with the virtual IP address of the load balancing device, it is determined that the Loopback interface of the target electronic device is valid;
And if the load balancing equipment does not receive the response message returned by the target electronic equipment, and the IP address of the target electronic equipment is not consistent with the virtual IP address of the load balancing equipment, determining that the Loopback interface of the target electronic equipment fails due to abnormal tampering.
The flow shown in fig. 3 is completed.
A specific embodiment for implementing the method of the present application is described below with reference to the interactive diagram shown in fig. 4.
Assume that the virtual IP address of the load balancing device is 192.168.2.8, the real network card IP address of the electronic device is 192.168.2.11, and the MAC address is 10-00-00-00-00-11.
Step 401: the load balancing device determines that the real IP address of the target electronic device to be checked is 192.168.2.11, and obtains the MAC address of the target electronic device by querying the ARP table. The load balancing constructs a check message with destination IP address of 192.168.2.8 and destination MAC address of 10-00-00-00-00-11, and sends the check message to the electronic device through the destination MAC address.
Step 402: the electronic device checks whether the destination IP address (i.e., 192.168.2.8) of the check message is consistent with the IP address of the local Loopback interface. If yes, go to step 403. a; if not, step 403.b is performed (not shown).
Step 403. a: the electronic device constructs a response message according to the request content of the check message, and returns the response message to the load balancing device, so that the load balancing device executes step 404. a.
Step 403. b: the electronic device discards the check message, and the load balancing device executes step 404.b (not shown in the figure).
Step 404. a: after receiving the response message, the load balancing device confirms that the Loopback interface of the electronic device is valid, and performs step 405.
Step 404. b: and if the load balancing equipment does not receive the response message within the preset time length, confirming that the Loopback interface of the electronic equipment is invalid, and further confirming that the electronic equipment is unavailable.
Step 405: the load balancing equipment determines whether the data content in the response message meets a preset condition, and if the data content meets the preset condition, the electronic equipment is considered to be available; and if the preset condition is not met, the electronic equipment is considered to be unavailable.
The flow shown in fig. 4 ends up so far. The load balancing device may periodically execute the process shown in fig. 4 to check the status of the Loopback interface of the electronic device, and further check the status of the electronic device based on the reply message of the electronic device.
Referring to fig. 5, fig. 5 is a hardware structure diagram of a load balancing apparatus according to an exemplary embodiment of the present application.
The load balancing device comprises a communication interface 501, a processor 502, a machine-readable storage medium 503, and a bus 504; wherein the communication interface 501, the processor 502 and the machine-readable storage medium 503 are in communication with each other via a bus 504. The processor 502 may perform the traffic scheduling method described above by reading and executing machine-executable instructions in the machine-readable storage medium 503 corresponding to the traffic scheduling control logic.
The machine-readable storage medium 503 referred to herein may be any electronic, magnetic, optical, or other physical storage device that can contain or store information such as executable instructions, data, and the like. For example, the machine-readable storage medium may be: volatile memory, non-volatile memory, or similar storage media. In particular, the machine-readable storage medium 503 may be a RAM (random Access Memory), a flash Memory, a storage drive (e.g., a hard disk drive), a solid state disk, any type of storage disk (e.g., a compact disk, a DVD, etc.), or similar storage medium, or a combination thereof.
Referring to fig. 6, fig. 6 is a hardware structure diagram of an electronic device according to an exemplary embodiment of the present application.
The load balancing device comprises a communication interface 601, a processor 602, a machine-readable storage medium 603 and a bus 604; wherein the communication interface 601, the processor 602, and the machine-readable storage medium 603 communicate with each other via a bus 604. The processor 602 may perform the traffic scheduling method described above by reading and executing machine executable instructions corresponding to traffic scheduling control logic in the machine readable storage medium 603.
The machine-readable storage medium 603 referred to herein may be any electronic, magnetic, optical, or other physical storage device that can contain or store information such as executable instructions, data, and the like. For example, the machine-readable storage medium may be: volatile memory, non-volatile memory, or similar storage media. In particular, the machine-readable storage medium 603 may be a RAM (random Access Memory), a flash Memory, a storage drive (e.g., a hard drive), a solid state drive, any type of storage disk (e.g., a compact disk, a DVD, etc.), or similar storage medium, or a combination thereof.
The methods provided herein are described above. The following describes the apparatus provided in the present application:
referring to fig. 7, fig. 7 is a block diagram of an inspection apparatus of a triangulation Loopback interface according to an exemplary embodiment of the present application. The apparatus may be applied to the load balancing device shown in fig. 5, and the apparatus may include:
a constructing unit 701, configured to construct an inspection packet for inspecting a Loopback interface of a target electronic device in a triangulation network, where a destination IP address of the inspection packet is a virtual IP address of the device, and a destination MAC address is an MAC address of the target electronic device;
a sending unit 702, configured to send the check message to the target electronic device according to the destination MAC address, so that the target electronic device determines whether to return a response message to the device according to a destination IP address of the check message and a Loopback interface address of the target electronic device;
a first determining unit 703, configured to determine that the Loopback interface is valid if the response packet returned by the target electronic device is received;
and if the response message returned by the target electronic equipment is not received, determining that the Loopback interface is invalid.
Optionally, the apparatus further comprises:
a second determining unit 704 (not shown in the figure), configured to determine whether data content in the response message meets a preset condition if the response message is received;
if yes, determining that the target electronic equipment is available;
if not, determining that the target electronic equipment is unavailable.
Referring to fig. 8, fig. 8 is a block diagram of an inspection apparatus of a triangle networking Loopback interface according to an exemplary embodiment of the present application. The apparatus can be applied to the electronic device shown in fig. 6. The apparatus may include:
a receiving unit 801, configured to receive an inspection packet sent by the load balancing device;
a response unit 802, configured to determine whether to return a response packet of the check packet to the load balancing device according to a destination IP address of the check packet and an IP address of a Loopback interface of the device, so that the load balancing device determines that the Loopback interface is valid if receiving the response packet returned by the target electronic device; and if the response message returned by the target electronic equipment is not received, determining that the Loopback interface is invalid.
Optionally, the determining whether to return the response packet of the check packet to the load balancing device according to the destination IP address of the check packet and the IP address of the Loopback interface of the device includes:
Detecting whether the destination IP address of the check message is consistent with the IP address of the local Loopback interface;
if yes, returning a response message of the check message to the load balancing equipment;
if not, discarding the check message.

Claims (8)

1. A method for checking a Loopback interface of a triangular networking is characterized in that the method is applied to load balancing equipment in the triangular networking, and comprises the following steps:
constructing a check message for checking a Loopback interface of target electronic equipment in a triangular network, wherein a target IP address of the check message is a virtual IP address of the equipment, and a target MAC address is an MAC address of the target electronic equipment;
sending the check message to the target electronic device according to the destination MAC address, so that the target electronic device determines whether to return a response message to the device according to the destination IP address of the check message and the Loopback interface address of the target electronic device, including: detecting whether the destination IP address of the check message is consistent with the IP address of the local Loopback interface; if yes, returning a response message of the check message to the load balancing equipment; if not, discarding the check message;
If the response message returned by the target electronic equipment is received, determining that the Loopback interface is valid;
and if the response message returned by the target electronic equipment is not received, determining that the Loopback interface is invalid.
2. The method of claim 1, further comprising:
if the response message is received, determining whether the data content in the response message meets a preset condition;
if yes, determining that the target electronic equipment is available;
if not, determining that the target electronic equipment is unavailable.
3. A method for checking a Loopback interface of a triangular network is characterized in that the method is applied to electronic equipment in the triangular network, and comprises the following steps:
receiving a check message sent by the load balancing equipment;
determining whether to return a response message of the check message to the load balancing equipment according to the destination IP address of the check message and the IP address of the Loopback interface of the equipment, so that if the load balancing equipment receives the response message returned by the target electronic equipment, the Loopback interface is determined to be valid; if the reply message returned by the target electronic equipment is not received, determining that the Loopback interface is invalid,
Determining whether to return a response message of the check message to the load balancing device according to the destination IP address of the check message and the IP address of the Loopback interface of the device, including: detecting whether the destination IP address of the check message is consistent with the IP address of the local Loopback interface; if yes, returning a response message of the check message to the load balancing equipment; if not, discarding the check message, wherein the destination IP address of the check message is the virtual IP address of the device.
4. The utility model provides an inspection device of triangle network deployment loop interface which characterized in that, is applied to the load balancing equipment in the triangle network deployment, the device includes:
a constructing unit, configured to construct an inspection message for inspecting a Loopback interface of a target electronic device in a triangulation network, where a destination IP address of the inspection message is a virtual IP address of the device, and a destination MAC address is an MAC address of the target electronic device;
a sending unit, configured to send the check packet to the target electronic device according to the destination MAC address, so that the target electronic device determines whether to return a response packet to the device according to a destination IP address of the check packet and a Loopback interface address of the target electronic device, and specifically configured to: detecting whether the destination IP address of the check message is consistent with the IP address of the local Loopback interface; if yes, returning a response message of the check message to the load balancing equipment; if not, discarding the check message;
The first judging unit is used for determining that the Loopback interface is valid if the response message returned by the target electronic equipment is received;
and if the response message returned by the target electronic equipment is not received, determining that the Loopback interface is invalid.
5. The apparatus of claim 4, further comprising:
a second determining unit, configured to determine whether data content in the response message meets a preset condition if the response message is received;
if yes, determining that the target electronic equipment is available;
if not, determining that the target electronic equipment is unavailable.
6. The utility model provides an inspection device of triangle network deployment loop interface which characterized in that is applied to the electronic equipment in the triangle network deployment, the device includes:
a receiving unit, configured to receive an inspection packet sent by the load balancing device;
a response unit, configured to determine whether to return a response packet of the inspection packet to the load balancing device according to a destination IP address of the inspection packet and an IP address of a Loopback interface of the device, so that if the load balancing device receives the response packet returned by the target electronic device, the Loopback interface is determined to be valid; if the response message returned by the target electronic equipment is not received, determining that the Loopback interface is invalid,
Wherein the response unit is specifically configured to: detecting whether the destination IP address of the check message is consistent with the IP address of the local Loopback interface; if yes, returning a response message of the check message to the load balancing equipment; if not, discarding the check message, wherein the destination IP address of the check message is the virtual IP address of the device.
7. A load balancing device comprising a processor and a machine-readable storage medium storing machine-executable instructions executable by the processor, the processor being caused by the machine-executable instructions to perform the method of any one of claims 1 to 2.
8. A machine-readable storage medium having stored thereon machine-executable instructions which, when invoked and executed by a processor, cause the processor to perform the method of any of claims 1 to 2.
CN201911171028.0A 2019-11-26 2019-11-26 Method and device for checking Loopback interface of triangular networking Active CN110912997B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911171028.0A CN110912997B (en) 2019-11-26 2019-11-26 Method and device for checking Loopback interface of triangular networking

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911171028.0A CN110912997B (en) 2019-11-26 2019-11-26 Method and device for checking Loopback interface of triangular networking

Publications (2)

Publication Number Publication Date
CN110912997A CN110912997A (en) 2020-03-24
CN110912997B true CN110912997B (en) 2022-07-29

Family

ID=69819492

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911171028.0A Active CN110912997B (en) 2019-11-26 2019-11-26 Method and device for checking Loopback interface of triangular networking

Country Status (1)

Country Link
CN (1) CN110912997B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101442471A (en) * 2008-12-31 2009-05-27 杭州华三通信技术有限公司 Method for implementing backup and switch of IPSec tunnel, system and node equipment, networking architecture
CN106330605A (en) * 2016-08-23 2017-01-11 杭州华三通信技术有限公司 Message processing method and device
CN106936944A (en) * 2017-03-31 2017-07-07 苏州科达科技股份有限公司 A kind of method and device for detecting and processing network address collision
CN107547404A (en) * 2017-07-31 2018-01-05 新华三技术有限公司 Flow table generation method and device and message forwarding method and device
CN108243262A (en) * 2016-12-26 2018-07-03 大唐移动通信设备有限公司 Learning method, device and the network three-layer equipment of ARP table
CN109818912A (en) * 2017-11-22 2019-05-28 北京金山云网络技术有限公司 Take precautions against method, apparatus, load-balancing device and the storage medium of extensive aggression

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10212071B2 (en) * 2016-12-21 2019-02-19 Nicira, Inc. Bypassing a load balancer in a return path of network traffic

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101442471A (en) * 2008-12-31 2009-05-27 杭州华三通信技术有限公司 Method for implementing backup and switch of IPSec tunnel, system and node equipment, networking architecture
CN106330605A (en) * 2016-08-23 2017-01-11 杭州华三通信技术有限公司 Message processing method and device
CN108243262A (en) * 2016-12-26 2018-07-03 大唐移动通信设备有限公司 Learning method, device and the network three-layer equipment of ARP table
CN106936944A (en) * 2017-03-31 2017-07-07 苏州科达科技股份有限公司 A kind of method and device for detecting and processing network address collision
CN107547404A (en) * 2017-07-31 2018-01-05 新华三技术有限公司 Flow table generation method and device and message forwarding method and device
CN109818912A (en) * 2017-11-22 2019-05-28 北京金山云网络技术有限公司 Take precautions against method, apparatus, load-balancing device and the storage medium of extensive aggression

Also Published As

Publication number Publication date
CN110912997A (en) 2020-03-24

Similar Documents

Publication Publication Date Title
US9219641B2 (en) Performing failover in a redundancy group
CN107332726B (en) Communication link detection method and device
CN109379291B (en) Method and device for processing service request in networking
US10917289B2 (en) Handling network failures in networks with redundant servers
EP2493127A1 (en) Method for virtual link discovery control and system for fibre channel over ethernet protocol
EP2234332A1 (en) Method, device and system for diagnosing whether nodes are abnormal or not in p2p network
CN110011941B (en) Message forwarding method and device
CN112367257B (en) Route notification method and device
WO2020173424A1 (en) Message processing method, and gateway device
CN102801825B (en) Terminal multiple IP (Internet Protocol) address validity detection method
CN104484219B (en) The method and apparatus of distributing policy in virtual platform
US10680930B2 (en) Method and apparatus for communication in virtual network
CN104125309B (en) Bus connection method and management servomechanism
CN103795581A (en) Address processing method and address processing device
JP2009518883A (en) Distributed service site registration method and registration system
CN110912997B (en) Method and device for checking Loopback interface of triangular networking
CN110661836B (en) Message routing method, device and system, and storage medium
CN115334066A (en) Distributed cluster system and method for processing synchronous request response
CN111130941B (en) Network error detection method and device and computer readable storage medium
US10623422B2 (en) Protocol to detect a foreign device connected between network modules
CN110098982B (en) Link state providing method, device, router and computer readable storage medium
CN109921948B (en) Fault detection method and device for data plane and gateway equipment
CN113992583B (en) Table item maintenance method and device
CN115134271B (en) Fault detection method and device for IP transparent transmission ad hoc network and computer equipment
CN109286569B (en) Route control method and access device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant