CN109728972B - Network connection detection method and device - Google Patents

Network connection detection method and device Download PDF

Info

Publication number
CN109728972B
CN109728972B CN201811530340.XA CN201811530340A CN109728972B CN 109728972 B CN109728972 B CN 109728972B CN 201811530340 A CN201811530340 A CN 201811530340A CN 109728972 B CN109728972 B CN 109728972B
Authority
CN
China
Prior art keywords
arp
network connection
connection detection
message
sent
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
CN201811530340.XA
Other languages
Chinese (zh)
Other versions
CN109728972A (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 H3C Technologies Co Ltd
Original Assignee
Hangzhou H3C 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 H3C Technologies Co Ltd filed Critical Hangzhou H3C Technologies Co Ltd
Priority to CN201811530340.XA priority Critical patent/CN109728972B/en
Publication of CN109728972A publication Critical patent/CN109728972A/en
Application granted granted Critical
Publication of CN109728972B publication Critical patent/CN109728972B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The application provides a network connection detection method and device. In the application, when the member device of the DRS receives the network connection detection response message, if the network connection detection request message corresponding to the network connection detection response message is not sent before is found, the received network connection detection response message is transmitted to other member devices through the IPP, so that the member device that has sent the network connection detection request message before finally receives the corresponding network connection detection response message, thereby avoiding the problem that the member device that has sent the network connection detection request message before mistakenly considers that the network connection with the host is abnormal, cannot intercommunicate and the like because other member devices receive the corresponding network connection detection response messages, and realizing the network connection detection between the member device and the host.

Description

Network connection detection method and device
Technical Field
The present application relates to network communication technologies, and in particular, to a network connection detection method and apparatus.
Background
In Distributed aggregation (DR) networking, each member device in a DRs System as a gateway sends a network connection detection request message to a host to detect whether network connection with the host is normal. The member devices are used as gateways and have the same gateway configuration, wherein the gateway configuration comprises a gateway IP address, a three-layer port MAC address and the like.
After receiving the network connection detection request message, the host responds a network connection detection response message corresponding to the network connection detection request message to the gateway. When the access device accessed by the host receives the network connection detection response message, a target port is selected from the aggregation port group connected with the DRS, wherein the aggregation port group is formed by aggregating the ports of the access device connected with each member device in the DRS. And then, the access equipment forwards the network connection detection response message through the target port.
However, if the member device in the DRS connected to the target port does not send the network connection detection request message corresponding to the network connection detection response message before, or even does not send the network connection detection request message before, the member device in the DRS that sent the network connection detection request message before considers that the network connection with the host is abnormal, and the communication cannot be performed.
Disclosure of Invention
The application provides a network connection detection method and a network connection detection device, so as to realize network connection detection between member equipment and a host in DRS.
The technical scheme provided by the application comprises the following steps:
a network connection detection method is applied to member equipment in a distributed aggregation system (DRS), and comprises the following steps:
receiving a network connection detection response message from a host;
checking whether the device has sent the network connection detection request message corresponding to the network connection detection response message before,
if not, the network connection detection response message is sent through an internal control link port IPP connected with other member equipment on the equipment;
if so, determining that the network connection between the equipment and the host is normal.
A network connection detection device applied to member equipment in a distributed aggregation system (DRS) comprises:
a receiving unit, configured to receive a network connection detection response packet from a host;
a checking unit, configured to check whether the device has sent a network connection detection request packet corresponding to the network connection detection response packet before,
and the processing unit is used for sending the network connection detection response message through an internal control link port IPP connected with other member equipment on the equipment when the checking result of the checking unit is negative, and determining that the network connection between the equipment and the host is normal when the checking result of the checking unit is positive.
According to the technical scheme, when the member device of the DRS receives the network connection detection response message, if the network connection detection request message corresponding to the network connection detection response message is not sent before is found, the received network connection detection response message is transmitted to other member devices through the IPP, so that the member device which has sent the network connection detection request message before finally receives the corresponding network connection detection response message, the problems that the member device which has sent the network connection detection request message before mistakenly considers that the network connection with the host is abnormal, the network connection cannot be communicated and the like due to the fact that the other member devices receive the corresponding network connection detection response message are solved, and the network connection detection between the member device and the host is realized.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and together with the description, serve to explain the principles of the disclosure.
Fig. 1 is a schematic diagram of DR networking provided by the present application;
FIG. 2 is a flow chart of a method provided herein;
fig. 3 is a schematic diagram of DR networking provided in an embodiment of the present application;
FIG. 4 is a schematic diagram of the apparatus provided herein;
fig. 5 is a schematic hardware structure diagram of the apparatus shown in fig. 4 provided in the present application.
Detailed Description
In the DR networking shown in fig. 1, the DRs includes the following two member devices: leaf1 and Leaf 2. The Leaf1 and the Leaf2 are connected through an internal control link Port (IPP).
In fig. 1, the Server1 serves as a host access Leaf4 (access device of Server 1). Leaf4 connects with the DRS through the aggregation port group. Wherein the member ports in the aggregation port group include: leaf4 connects to the Port of Leaf1 (denoted as Port4_1), and Leaf4 connects to the Port of Leaf2 (denoted as Port4_ 2).
In fig. 1, if the DRS is used as a gateway, it means that member devices Leaf1 and Leaf2 in the DRS are used as gateways. The Leaf1 and Leaf2 as gateways are configured with the same gateway configuration information (including, for example, a gateway IP address and a triple-layer port MAC address). Since the gateway configuration information of Leaf1 and Leaf2 are the same, the ARP request messages sent by Leaf1 and Leaf2 to Server1 are the same, and the network connection detection request messages (hereinafter, taking an ICMP (Internet Control Message Protocol) request Message as an example) sent by Leaf1 and Leaf2 to Server1 are the same.
The following example describes the network connection detection between the Server1 and the Leaf 1:
as shown in fig. 1, when a Leaf1 initiates network connection detection to a Server1, the Leaf1 first sends an ARP request message (denoted as message 101) to the Leaf 4. The Sender (Sender) IP address of the message 101 is the above-mentioned gateway IP address, the Sender MAC address is the above-mentioned three-layer port MAC address, the destination (Target) IP address is the IP address of the Server1, and the destination MAC address is a preset MAC address, such as a MAC address of all 0.
The Leaf4 receives the message 101, and generates an ARP entry (denoted as entry a1) according to the message 101. The entry a1 includes the IP address of the sender of the message 101, the MAC address of the sender, and the port from which the message 101 is received. At this time, the port receiving the packet 101 is an aggregated port group.
Leaf4 broadcasts message 101 locally.
The Server1 receives the message 101, and generates an ARP entry (denoted as entry a2) according to the message 101. The entry a2 includes the IP address of the sender of the message 101, the MAC address of the sender, and the port from which the message 101 is received.
The Server1 finds that the target IP address of the message 101 is the IP address of the Server1, and sends an ARP response message (marked as the message 102) through the port of the table entry a 2. The IP address of the sending end of the message 102 is the IP address of the Server1, the MAC address of the sending end is the MAC address of the Server1, the IP address of the destination end is the gateway IP address, and the MAC address of the destination end is the three-layer port MAC address.
The Leaf4 receives the message 102 and generates an ARP entry (denoted as entry a3) according to the message 102. Entry a3 includes the sender IP address, sender MAC address, and port on which message 102 was received for message 102.
The Leaf4 finds the ARP entry (i.e., the entry a1) matching the packet 102 according to the MAC address of the destination of the packet 102, and selects one port from the aggregation port group according to a Hash algorithm if the port of the entry a1 is found to be the aggregation port group.
If the Port selected by Leaf4 is Port4_2, then Leaf4 sends the message 102 through Port4_ 2.
Leaf4 is connected to Leaf2 in DRS through Port4_2, and Leaf2 receives message 102 after Leaf4 sends message 102 through Port4_ 2. When the Leaf2 receives the message 102, it generates an ARP table entry (denoted as table entry a4) according to the message 102. Entry a4 includes the sender IP address, the sender MAC address, and the Port (denoted as Port2_4) from which the message 102 was received.
The Leaf2 synchronizes entry a4 to Leaf 1. It can be seen that although the message 101 to which the message 102 responds was not sent before by the Leaf2, when the message 102 is received by the Leaf2, the entry a4 learned from the message 102 is still synchronized to the Leaf 1.
Thus far, Leaf1 and Leaf2 both have entries a 4. When the Leaf1 and Leaf2 have the entry a4, the Leaf1 and Leaf2 construct the ICMP request message according to the entry a 4. Still taking the example of sending the ICMP request message by the Leaf1 as follows, since the Leaf1 and the Leaf2 have the same gateway configuration information, the ICMP request messages sent by the Leaf1 and the Leaf2 are completely the same.
The Leaf1 constructs the ICMP request message (denoted as message 103) to be sent to the Server1 according to the table entry a 4. The destination IP address of the message 103 is the IP address of the Server1, the destination MAC address is the MAC address of the Server1, the source IP address is the above-mentioned gateway IP address, and the source MAC address is the above-mentioned three-layer port MAC address.
Leaf1 sends message 103 to Leaf 4.
The Leaf4 receives the message 103, searches the matching ARP entry (i.e. the entry a3) locally according to the destination MAC address of the message 103, and forwards the message 103 through the port in the entry a 3.
The port in the entry a3 is the port where the Leaf4 is connected to the Server1, and then the Server1 receives the message 103 after the Leaf4 forwards the message 103 through the port in the entry a 3. After receiving message 103, Server1 returns an ICMP response message (denoted as message 104). The destination IP address of the message 104 is the above-mentioned gateway IP address, the destination MAC address is the above-mentioned three-layer port MAC address, the source IP address is the IP address of Server1, and the source MAC address is the MAC address of Server 1.
The Leaf4 receives the message 104, locally searches for a matching ARP entry (i.e. the entry a1) according to the destination MAC address of the message 104, finds that the port of the entry a1 is an aggregation port group, and selects one port from the aggregation port group according to a Hash (Hash) algorithm.
If the Port selected by Leaf4 is Port4_2, then Leaf4 sends message 104 through Port4_ 2.
Leaf4 is connected to Leaf2 in DRS through Port4_2, and Leaf2 receives message 104 after Leaf4 sends message 104 through Port4_ 2.
When the Leaf2 receives the message 104, it is found that the ICMP request message is not sent before the Leaf2, and meanwhile, the Leaf1 considers that the network connection between the Leaf1 and the Server1 is abnormal because the message 104 is not received, and the communication cannot be performed.
In the same situation, the Leaf2 may send an ICMP request message to the Server1, but the Leaf1 receives an ICMP response message from the Server1 in response to the ICMP request message, so that the Leaf2 considers that the network connection between the Leaf2 and the Server1 is abnormal because the ICMP response message for responding to the ICMP request message sent by the device is not received, and the interworking cannot be performed.
In order to solve the above technical problem, the present application provides a flowchart as shown in fig. 2:
referring to fig. 2, fig. 2 is a flow chart of a method provided by the present application. The method is applied to member devices in the DRS.
In one example, the DRS serves as a gateway, and each member device in the DRS configures the same gateway configuration information, where the gateway configuration information at least includes: gateway IP address, three-port MAC address. And configuring the same gateway configuration information for each member device in the DRS, wherein the network connection detection request messages sent to the same host by each member device in the DRS are the same, and the ARP request messages sent to the same host by each member device in the DRS are the same.
As shown in fig. 2, the process may include the following steps:
step 201, receiving a network connection detection response message from a host.
Step 202, checking whether the device has sent the network connection detection request message corresponding to the network connection detection response message before, if not, executing step 203, and if so, executing step 204.
In an example, the step 202 of checking whether the device has sent the network connection detection request packet corresponding to the network connection detection response packet before includes:
checking whether first sending information for sending a network connection detection request message is recorded locally or not, wherein the first sending information at least comprises sending time;
if so, determining that the equipment has sent the network connection detection request message corresponding to the network connection detection response message before, otherwise, determining that the equipment has not sent the network connection detection request message corresponding to the network connection detection response message before.
Step 203, sending a network connection detection response message through the IPP connected to other member devices on the device.
In step 203, the check result in step 202 is: and the network connection detection request message corresponding to the network connection detection response message is not sent before. It can be seen that, in the present application, when the member device of the DRS receives the network connection detection response message, if it is found that the network connection detection request message corresponding to the network connection detection response message has not been sent before, the received network connection detection response message is transmitted to other member devices through the IPP, so that the member device that has sent the network connection detection request message before finally receives the corresponding network connection detection response message, thereby avoiding that the member device that has sent the network connection detection request message before mistakenly considers that the network connection with the host is abnormal because other member devices receive the corresponding network connection detection response messages, and cannot communicate with each other, and avoiding the above technical problems.
Step 204, determining the network connection intercommunication between the device and the host.
In step 204, the check result in step 202 is: and the network connection detection request message corresponding to the network connection detection response message is sent before. When the member equipment receives a network connection detection response message returned by the host and used for responding to the network connection detection request message sent before, the network connection intercommunication between the equipment and the host is directly determined.
Thus, the flow shown in fig. 2 is completed.
As can be seen from the process shown in fig. 2, in the present application, when the member device of the DRS receives the network connection detection response message, if it is found that the network connection detection request message corresponding to the network connection detection response message is not sent before, the received network connection detection response message is transmitted to other member devices through the IPP, so that the member device that has sent the network connection detection request message before finally receives the corresponding network connection detection response message, thereby avoiding the problem that the member device that has sent the network connection detection request message before erroneously considers that the network connection with the host is abnormal, and the network connection cannot be intercommunicated because other member devices receive the corresponding network connection detection response messages, and realizing the network connection detection between the member device and the host, and avoiding the above technical problem.
In one example, the network connection detection response message may be an ICMP echo message. Based on the fact that the network connection detection response message is an ICMP response message, the network connection detection request message can be an ICMP request message correspondingly. The flow shown in fig. 2 is described below with reference to an embodiment:
referring to fig. 3, fig. 3 is a schematic diagram of DR networking provided in an embodiment of the present application. In the DR networking shown in fig. 3, the DRs includes the following two member devices: leaf301 and Leaf 302. Wherein, the Leaf301 and the Leaf302 are connected through IPP.
In fig. 3, the Server300 accesses a Leaf303 (access device of the Server 300) as a host. Leaf303 connects with DRS through aggregation port groups. Wherein the member ports in the aggregation port group include: the Port of Leaf301 (denoted as Port3_1) is connected to Leaf303, and the Port of Leaf302 (denoted as Port3_2) is connected to Leaf 303.
In fig. 3, if the DRS is used as a gateway, it means that member devices Leaf301 and Leaf302 in the DRS are used as gateways. The Leaf301 and the Leaf302 as gateways are configured with the same gateway configuration information (for example, including a gateway IP address and a three-layer port MAC address). Since the gateway configuration information of the Leaf301 and the Leaf302 is the same, the ARP request messages sent by the Leaf301 and the Leaf302 to the Server300 are the same, and the network connection detection response messages (hereinafter, ICMP messages are taken as an example) sent by the Leaf301 and the Leaf302 to the Server300 are the same.
The following example describes how the Leaf301 detects the network connection detection with the Server 300:
when the Leaf301 initiates network connection detection to the Server300, the Leaf301 first sends an ARP request message (denoted as message M1) to the Leaf303 to the Server 300. The sending end (Sender) IP address of the message M1 is the above gateway IP address, the sending end MAC address is the above three-layer port MAC address, the destination end (Target) IP address is the IP address of the Server300, and the destination end MAC address is a preset MAC address, such as a MAC address of all 0.
The Leaf303 receives the message M1, and generates an ARP entry (denoted as entry b1) according to the message M1. The entry b1 includes the sender IP address, the sender MAC address, and the port for receiving the message M1 of the message M1. At this time, the port receiving the message M1 recorded in the table entry b1 is an aggregation port group.
Leaf303 broadcasts message M1 locally.
The Server300 receives the message M1, and generates an ARP table entry (denoted as table entry b2) according to the message M1. The entry b2 includes the sender IP address, the sender MAC address, and the port for receiving the message M1 of the message M1.
The Server300 finds that the target IP address of the message M1 is the IP address of the Server300, and sends an ARP response message (recorded as the message M2) through the port of the table entry b 2. The IP address of the sending end of the message M2 is the IP address of the Server300, the MAC address of the sending end is the MAC address of the Server300, the IP address of the destination end is the above-mentioned gateway IP address, and the MAC address of the destination end is the above-mentioned three-layer port MAC address.
The Leaf303 receives the message M2, and generates an ARP entry (denoted as entry b3) according to the message M2. The entry b3 includes the sender IP address, the sender MAC address, and the port for receiving the message M2 of the message M2.
The Leaf303 finds the ARP entry (i.e. the entry b1) matching the message M2 according to the target MAC address of the message M2, and selects one port from the aggregate port group according to a Hash algorithm if the port of the entry b1 is found to be the aggregate port group.
If the Port selected by Leaf303 is Port3_2, then Leaf303 sends message M2 through Port3_ 2.
The Leaf303 is connected to the Leaf302 in DRS through Port3_2, so that the Leaf302 receives the message M2 after the Leaf303 sends the message M2 through Port3_ 2. When the Leaf302 receives the message M2, it generates an ARP entry (denoted as entry b4) according to the message M2. The entry b4 includes the sender IP address, the sender MAC address, and the Leaf302 local DR port of the message M2.
The Leaf302 checks whether the device has sent the ARP request message corresponding to the message M2 before. In one embodiment, the step of the Leaf302 checking whether the device has previously sent the ARP request message corresponding to the message M2 may include: whether second sending information for sending the ARP request message is recorded locally or not is checked, the second sending information at least comprises sending time, if yes, the ARP request message corresponding to the message M2 sent before is determined, and if not, the ARP request message corresponding to the message M2 is determined not to be sent before.
In this embodiment, when the Leaf302 checks that the ARP request message corresponding to the message M2 has not been sent before, the message M2 is sent through the local IPP.
The Leaf302 local IPP is connected to the Leaf301, and when the Leaf302 sends the message M2 through the local IPP, the Leaf301 receives the message M2.
When the Leaf301 receives the message M2, it generates an ARP entry (denoted as entry b5) according to the message M1. The entry b5 at least includes the sender IP address, the sender MAC address, and the Leaf301 local DR port of the message M2.
The Leaf301 checks whether the device has sent the ARP request message corresponding to the message M2 before. The way in which the Leaf301 checks is similar to the way in which the Leaf302 checks described above, and is not described in detail.
When the Leaf301 checks that the ARP request message corresponding to the message M2 has been sent before, the entry b5 is synchronized to the Leaf 301. It can be seen that, in the application, the member device in the DRS synchronizes the entry learned according to the received ARP reply message to other member members only when receiving the ARP reply message for responding to the ARP request message sent before.
After receiving entry b5, Leaf301 checks whether the ARP entry that satisfies the following conditions has been recorded locally: the IP address and the MAC address contained in the table entry b5 are the same as those in the table entry b5, respectively.
As described above, the IP address and the MAC address of the entry b4 recorded locally by the Leaf301 are the same as those in the entry b5, respectively, and then the Leaf301 can ignore the entry b 5.
To this end, both Leaf301 and Leaf302 have ARP entries associated with the Server300 (the IP address and MAC address in the ARP entry are the IP address and MAC address of the Server300, respectively).
When both Leaf301 and Leaf302 have ARP entries associated with Server300, Leaf301 and Leaf302 construct ICMP request messages according to the ARP entries associated with Server 300. Still taking the example that the Leaf301 sends the ICMP request message as follows, since the Leaf301 and the Leaf302 have the same gateway configuration information, the ICMP request messages sent by the Leaf301 and the Leaf302 are completely the same.
The Leaf301 constructs an ICMP request message (denoted as message M3) to be sent to the Server300 according to the entry b 4. The destination IP address of the message M3 is the IP address of the Server300, the destination MAC address is the MAC address of the Server300, the source IP address is the above-mentioned gateway IP address, and the source MAC address is the above-mentioned three-layer port MAC address.
Leaf301 sends message M3 to Leaf 303.
The Leaf303 receives the message M3, locally searches for a matching ARP entry (i.e., the entry b3) according to the destination MAC address of the message M3, and forwards the message M3 through the port in the entry b 3.
The port in the entry b3 is the port where the Leaf303 is connected to the Server300, and then the Server300 receives the message M3 after the Leaf303 forwards the message M3 through the port in the entry b 3. After receiving the message M3, the Server300 returns an ICMP response message (denoted as message M4). The destination IP address of the message M4 is the gateway IP address, the destination MAC address is the three-layer port MAC address, the source IP address is the IP address of the Server300, and the source MAC address is the MAC address of the Server 300.
The Leaf303 receives the message M4, locally searches for a matching ARP entry (i.e. the entry b1) according to the destination MAC address of the message M4, and selects one port from the aggregate port group according to a Hash algorithm if the port of the entry b1 is found to be the aggregate port group.
If the Port selected by Leaf303 is Port3_2, then Leaf303 sends message M4 through Port3_ 2.
The Leaf303 is connected to the Leaf302 in DRS through Port3_2, so that the Leaf302 receives the message M4 after the Leaf303 sends the message M4 through Port3_ 2.
After receiving the message M4, the Leaf302 finds that the message M4 does not send the ICMP request message corresponding to the message M4 before the Leaf 302. In an embodiment, the checking by the Leaf302 whether the ICMP request message corresponding to the message M4 has been sent before by the device may include: whether first sending information for sending the ICMP request message is recorded locally by the equipment is checked, the first sending information at least comprises sending time, if yes, the ICMP request message corresponding to the message M4 which is sent before the equipment is determined, and if not, the ICMP request message corresponding to the message M4 which is not sent before the equipment is determined.
In this embodiment, the Leaf302 checks that the ICMP request message corresponding to the message M4 has not been sent before by the device, and sends the message M4 through the local IPP.
The Leaf302 local IPP is connected to the Leaf301, and when the Leaf302 sends the message M4 through the local IPP, the Leaf301 receives the message M4.
When receiving the message M4, the Leaf301 checks whether the ICMP request message corresponding to the message M4 has been sent before. The way in which the Leaf301 checks is similar to the way in which the Leaf302 checks described above, and is not described in detail.
When the Leaf301 checks the ICMP request message corresponding to the message M4 sent by the device before, it is determined that the Leaf301 and the Server300 are intercommunicated and the network connection is normal.
Similarly, the principle of sending ARP request message and ICMP request message by Leaf2 is similar.
This completes the description of the present embodiment.
As can be seen from the description of the above embodiment, in the present application, when the member device of DRS receives an ARP response message and an ICMP response message, if it is found that an ARP request message and an ICMP request message are not sent before, the received ARP response message and ICMP response message are transmitted to other member devices through IPP, so that the member devices that have sent the ARP request message and the ICMP request message receive the corresponding ARP response message and ICMP response message, thereby avoiding the problem that the member devices that have sent the ARP request message and the ICMP request message mistakenly consider that the network connection with the host is abnormal and the network connection cannot be intercommunicated because other member devices receive the corresponding ARP response message and ICMP response message, and realizing the network connection detection between the member devices and the host.
The method provided by the present application is described above, and the device provided by the present application is described below:
referring to fig. 4, fig. 4 is a diagram illustrating the structure of the apparatus according to the present invention. The device is applied to member equipment in the DRS, and comprises the following components:
a receiving unit, configured to receive a network connection detection response packet from a host;
a checking unit, configured to check whether the device has sent a network connection detection request packet corresponding to the network connection detection response packet before,
and the processing unit is used for sending the network connection detection response message through an internal control link port IPP connected with other member equipment on the equipment when the checking result of the checking unit is negative, and determining that the network connection between the equipment and the host is normal when the checking result of the checking unit is positive.
In one example, the receiving unit further receives an ARP response packet, and generates an ARP entry according to the ARP response packet, where a port in the ARP entry is a local DR port;
the checking unit further checks whether the equipment has sent the ARP request message corresponding to the ARP response message before;
the processing unit further synchronizes the ARP table entry to other member devices in the DRS when the checking unit checks the ARP request packet corresponding to the ARP response packet sent before the device is checked by the checking unit, otherwise, sends the ARP response packet through the IPP.
In one example, the receiving unit further receives an ARP entry synchronized to the device by another member device;
the checking unit further checks whether an ARP entry has been locally recorded that satisfies the following condition: the IP address and the MAC address contained in the ARP table entry are respectively the same as the IP address and the MAC address in the received ARP table entry;
the processing unit further ignores the received ARP list item if the received ARP list item is not the same as the ARP list item which meets the condition when the checking unit checks the ARP list item which meets the condition, otherwise, locally records the received ARP list item, and sets a synchronous type mark for the recorded ARP list item.
In one example, the DRS serves as a gateway, and each member device in the DRS configures the same gateway configuration information, where the gateway configuration information at least includes: the network connection detection method comprises a gateway IP address and a three-layer port MAC address, wherein network connection detection request messages sent to the host by all member devices in the DRS are the same, and ARP request messages sent to the host by all the member devices in the DRS are the same.
In an example, the checking unit checks whether the network connection detection request packet corresponding to the network connection detection response packet has been sent by the device before includes: checking whether first sending information for sending a network connection detection request message is recorded locally or not, wherein the first sending information at least comprises sending time; if so, determining that the equipment has sent the network connection detection request message corresponding to the network connection detection response message before, otherwise, determining that the equipment has not sent the network connection detection request message corresponding to the network connection detection response message before.
And the checking unit deletes the first sending information when checking that the network connection detection request message corresponding to the network connection detection response message is sent before the device.
In one example, the checking unit checks whether the ARP request packet corresponding to the ARP response packet has been sent by the device before includes: whether second sending information for sending the ARP request message is recorded locally or not is checked, the second sending information at least comprises sending time, if yes, the ARP request message corresponding to the ARP response message is determined to be sent before the equipment, and if not, the ARP request message corresponding to the ARP response message is determined not to be sent before the equipment.
And the checking unit deletes the second sending information when checking that the ARP request message corresponding to the ARP response message is sent by the equipment before.
In one example, the network connection detection response message is an ICMP echo message; the network connection detection request message is an ICMP request message.
Thus, the apparatus structure diagram provided in the present application is completed.
Correspondingly, the application also provides a hardware structure diagram of the device shown in fig. 4. As shown in fig. 5, the hardware structure may include: a machine-readable storage medium and a processor, wherein:
a machine-readable storage medium: the instruction code is stored.
A processor: the network connection detection method is realized by communicating with a machine-readable storage medium, reading and executing instruction codes in the machine-readable storage medium.
Thus, the hardware configuration diagram of the apparatus shown in fig. 5 is completed.
In the present application, a machine-readable storage medium 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: a RAM (random Access Memory), a volatile Memory, a non-volatile Memory, a flash Memory, a storage drive (e.g., a hard drive), a solid state drive, any type of storage disk (e.g., an optical disk, a dvd, etc.), or similar storage medium, or a combination thereof.
The apparatuses, modules or units illustrated in the above embodiments may be implemented by a computer chip or an entity, or implemented by a product with certain functions. A typical implementation device is a computer, which may take the form of a personal computer, laptop computer, cellular telephone, camera phone, smart phone, personal digital assistant, media player, navigation device, email messaging device, game console, tablet computer, wearable device, or a combination of any of these devices.
For convenience of description, the above devices are described as being divided into various units by function, and are described separately. Of course, the functionality of the units may be implemented in one or more software and/or hardware when implementing the present application.
It will be apparent to those skilled in the art that embodiments of the present application may be provided as a method, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, embodiments of the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
Furthermore, these computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
The above description is only exemplary of the present application and should not be taken as limiting the present application, as any modification, equivalent replacement, or improvement made within the spirit and principle of the present application should be included in the scope of protection of the present application.

Claims (8)

1. A network connection detection method is characterized in that the method is applied to member devices in a DRS (distributed aggregation system), the DRS is used as a gateway, each member device in the DRS is configured with the same gateway configuration information, and the gateway configuration information at least comprises: the method comprises the following steps that a gateway IP address and a three-layer port MAC address are used, network connection detection request messages sent to a host by each member device in the DRS are the same, and ARP request messages sent to the host by each member device in the DRS are the same, and the method comprises the following steps:
receiving a network connection detection response message from a host;
checking whether the equipment locally records first sending information of a network connection detection request message corresponding to the network connection detection response message so as to check whether the equipment has sent the network connection detection request message before; the first sending information at least comprises the sending time of the network connection detection request message;
if not, the network connection detection response message is sent through an internal control link port IPP connected with other member equipment on the equipment;
if so, determining that the network connection between the equipment and the host is normal.
2. The method of claim 1, wherein the method is preceded by:
receiving an ARP response message, and generating an ARP table entry according to the ARP response message, wherein a port in the ARP table entry is a local DR port;
checking whether the equipment has sent the ARP request message corresponding to the ARP response message before, if so, synchronizing the ARP table entry to other member equipment in the DRS, and if not, sending the ARP response message through the IPP.
3. The method of claim 1 or 2, wherein the method is preceded by:
receiving ARP list items of other member equipment synchronized to the equipment;
checking whether ARP entries meeting the following conditions are recorded locally: the IP address and the MAC address contained in the ARP table entry are respectively the same as the IP address and the MAC address in the received ARP table entry;
if not, locally recording the received ARP table entry, and setting a synchronous type mark for the recorded ARP table entry;
if so, ignoring the received ARP entry.
4. The method according to claim 2, wherein the checking whether the device has previously sent the network connection detection request packet corresponding to the network connection detection response packet comprises:
checking whether the device has sent the ARP request message corresponding to the ARP response message before includes: whether second sending information for sending the ARP request message is recorded locally or not is checked, the second sending information at least comprises sending time, if yes, the ARP request message corresponding to the ARP response message is determined to be sent before the equipment, and if not, the ARP request message corresponding to the ARP response message is determined not to be sent before the equipment;
the method further comprises the following steps: when the network connection detection request message corresponding to the network connection detection response message is detected to be sent by the device before, deleting the first sending information; and deleting the second sending information when the ARP request message corresponding to the ARP response message is detected to be sent by the equipment before.
5. The method according to claim 1 or 4, wherein the network connection detection response message is a network control message protocol ICMP echo message;
the network connection detection request message is an ICMP request message.
6. The network connection detection apparatus is characterized in that the apparatus is applied to member devices in a DRS in a distributed aggregation system, the DRS serves as a gateway, each member device in the DRS configures the same gateway configuration information, and the gateway configuration information at least includes: the method comprises the following steps that a gateway IP address and a three-layer port MAC address are used, network connection detection request messages sent to a host by each member device in the DRS are the same, and ARP request messages sent to the host by each member device in the DRS are the same, and the method comprises the following steps:
a receiving unit, configured to receive a network connection detection response packet from a host;
a checking unit, configured to check whether a local device locally records first sending information of a network connection detection request packet corresponding to the network connection detection response packet, so as to check whether the local device has sent the network connection detection request packet before, where the first sending information at least includes sending time of the network connection detection request packet;
and the processing unit is used for sending the network connection detection response message through an internal control link port IPP connected with other member equipment on the equipment when the checking result of the checking unit is negative, and determining that the network connection between the equipment and the host is normal when the checking result of the checking unit is positive.
7. The apparatus according to claim 6, wherein the receiving unit further receives an ARP response message, and generates an ARP entry according to the ARP response message, wherein a port in the ARP entry is a local DR port;
the checking unit further checks whether the equipment has sent the ARP request message corresponding to the ARP response message before;
the processing unit further synchronizes the ARP table entry to other member devices in the DRS when the checking unit checks the ARP request packet corresponding to the ARP response packet sent before the device is checked by the checking unit, otherwise, sends the ARP response packet through the IPP.
8. The apparatus according to claim 6 or 7, wherein the receiving unit further receives an ARP entry synchronized to the device by other member devices;
the checking unit further checks whether an ARP entry has been locally recorded that satisfies the following condition: the IP address and the MAC address contained in the ARP table entry are respectively the same as the IP address and the MAC address in the received ARP table entry;
the processing unit further ignores the received ARP list item if the received ARP list item is not the same as the ARP list item which meets the condition when the checking unit checks the ARP list item which meets the condition, otherwise, locally records the received ARP list item, and sets a synchronous type mark for the recorded ARP list item.
CN201811530340.XA 2018-12-14 2018-12-14 Network connection detection method and device Active CN109728972B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811530340.XA CN109728972B (en) 2018-12-14 2018-12-14 Network connection detection method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811530340.XA CN109728972B (en) 2018-12-14 2018-12-14 Network connection detection method and device

Publications (2)

Publication Number Publication Date
CN109728972A CN109728972A (en) 2019-05-07
CN109728972B true CN109728972B (en) 2021-07-23

Family

ID=66295997

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811530340.XA Active CN109728972B (en) 2018-12-14 2018-12-14 Network connection detection method and device

Country Status (1)

Country Link
CN (1) CN109728972B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111697997B (en) * 2020-05-29 2021-08-17 国网河北省电力有限公司电力科学研究院 HPLC module rapid detection device and method based on copy controller
CN112422371A (en) * 2020-11-28 2021-02-26 焦作师范高等专科学校 Big data-based computer network test system
CN115022180B (en) * 2022-05-18 2024-05-28 浪潮思科网络科技有限公司 Topology management method, device, equipment and medium based on RoCE-SAN
CN115190044B (en) * 2022-06-28 2023-08-08 平安银行股份有限公司 Device connection state checking method, device and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102315975A (en) * 2011-10-17 2012-01-11 杭州华三通信技术有限公司 Fault processing method based on intelligent resilient framework (IRF) system and equipment thereof
CN103731286A (en) * 2012-10-12 2014-04-16 中兴通讯股份有限公司 Method and device for distributing aggregation port IDs
CN107547243A (en) * 2017-05-24 2018-01-05 新华三技术有限公司 A kind of message forwarding method and device
CN108616418A (en) * 2018-03-30 2018-10-02 新华三技术有限公司 Detect the method and device of failure
WO2018214652A1 (en) * 2017-05-24 2018-11-29 新华三技术有限公司 Method and apparatus for message transmission

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107612808B (en) * 2017-09-13 2020-09-08 新华三技术有限公司 Tunnel establishment method and device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102315975A (en) * 2011-10-17 2012-01-11 杭州华三通信技术有限公司 Fault processing method based on intelligent resilient framework (IRF) system and equipment thereof
CN103731286A (en) * 2012-10-12 2014-04-16 中兴通讯股份有限公司 Method and device for distributing aggregation port IDs
CN107547243A (en) * 2017-05-24 2018-01-05 新华三技术有限公司 A kind of message forwarding method and device
WO2018214652A1 (en) * 2017-05-24 2018-11-29 新华三技术有限公司 Method and apparatus for message transmission
CN108616418A (en) * 2018-03-30 2018-10-02 新华三技术有限公司 Detect the method and device of failure

Also Published As

Publication number Publication date
CN109728972A (en) 2019-05-07

Similar Documents

Publication Publication Date Title
CN109728972B (en) Network connection detection method and device
CN108259299B (en) Forwarding table item generating method and device and machine-readable storage medium
US8826381B2 (en) Node device and method to prevent overflow of pending interest table in name based network system
CN108718278B (en) Message transmission method and device
EP3451592B1 (en) Packet transmission between vxlan domains
CN108173691B (en) Cross-device aggregation method and device
CN110505621B (en) Terminal migration processing method and device
CN108600109B (en) Message forwarding method and device
CN108667575B (en) Backup method and device for BRAS transfer control separation
CN109104364B (en) Designated forwarder election method and device
CN112367254B (en) Cross-device link aggregation method and device and electronic device
US10652145B2 (en) Managing data frames in switched networks
US11516179B2 (en) Automatic recovery from duplicate network addresses
CN109379241B (en) Path information determination method and device
CN101635731A (en) Method and equipment for defending MAC address deception attack
CN103631652A (en) Method and system for achieving virtual machine migration
CN108259348B (en) Message transmission method and device
CN107547400B (en) Virtual machine migration method and device
CN101808097B (en) Method and equipment for preventing ARP attack
CN101588299A (en) The veneer of the message forwarding method of distributed apparatus and distributed apparatus and this equipment
CN110708275B (en) Protocol message processing method and device
CN108234358B (en) Multicast message transmission method, device and machine readable storage medium
CN109347746B (en) MAC address learning method and device
CN108632125B (en) Multicast table item management method, device, equipment and machine readable storage medium
CN103139067B (en) Based on the mthods, systems and devices of VRRP protocol extension virtual router quantity

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