How to prevent ARP attacks on the terminal side

By verifying the original MAC address status and the delay of the new MAC address of the terminal device, and combining the judgment order, the problem of network data leakage caused by spoofed MAC addresses in ARP attacks is solved, and the timely identification and prevention of ARP attacks are achieved.

CN114980113BActive Publication Date: 2024-11-22XIAN UNISOC TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210695831.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-06-17
Publication Date
2024-11-22
Estimated Expiration
2042-06-17

AI Technical Summary

Technical Problem

In existing technologies, terminal devices cannot effectively identify and prevent attackers from forging MAC addresses when facing ARP attacks, leading to network data leakage.

Method used

By verifying the status of the original MAC address and the latency of the new MAC address, and combining this with a predetermined judgment order, the system determines whether the MAC address in the ARP reply packet is normal, thus promptly detecting ARP attacks.

Benefits of technology

Effectively identify ARP attacks, prevent network data leaks, promptly issue risk warnings to users, and ensure network security.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114980113B_ABST
    Figure CN114980113B_ABST
Patent Text Reader

Abstract

The present invention provides a method for preventing ARP attacks on a terminal side, comprising: when determining that an ARP response packet for updating a MAC address is received, judging whether a first MAC address in an ARP cache table can successfully access a network and judging whether a first delay for a second MAC address in the ARP response packet to access a target network is greater than a target delay according to a predetermined judgment order; when the first MAC address cannot successfully access the network and the first delay is greater than the target delay, issuing a risk prompt to a user. The method for preventing ARP attacks on a terminal side provided by the present invention can timely detect ARP attacks by verifying the status of the original MAC address and the delay of the new MAC address.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of communication security technology, and in particular to a method for preventing ARP attacks on a terminal side. Background Art

[0002] In the network, the terminal will maintain an ARP cache table locally. When the terminal wants to perform network operations, it needs to package the data packet into an Ethernet frame first, and then send the Ethernet frame to the router. The Ethernet frame needs to know the MAC address of the router. If it is connected for the first time, since there is no MAC address corresponding to the router IP in the local ARP cache table, terminal A will broadcast an ARP request packet for request, and the router will return the ARP reply packet containing its MAC address to the terminal. After receiving the ARP reply packet, the terminal will update the local ARP cache table and then use this MAC address to send data. Based on the above ARP mechanism, when the attacker sends a spoofed ARP data packet to the terminal, the source IP is a forged gateway IP, and the MAC is the attacker's MAC, then the MAC address of the gateway IP in the terminal's ARP cache table will become the attacker's MAC. Similarly, to ensure that the terminal can access the Internet, the attacker also pretends to be the terminal to forward data to the gateway. In this way, the attacker becomes a middleman to forward data from the terminal to the gateway, thereby stealing network data. Summary of the invention

[0003] The method for preventing ARP attacks on the terminal side provided by the present invention can timely discover ARP attacks through status verification of the original MAC address and time delay verification of the new MAC address.

[0004] The present invention provides a method for preventing ARP attacks on a terminal side, comprising:

[0005] When it is determined that an ARP reply packet for updating the MAC address is received, judging, according to a predetermined judgment order, whether the first MAC address in the ARP cache table can successfully access the network and whether a first delay for the second MAC address in the ARP reply packet to access the target network is greater than a target delay;

[0006] When the first MAC address cannot successfully access the network and the first delay is greater than the target delay, a risk warning is issued to the user.

[0007] Optionally, determining that an ARP reply packet for updating a MAC address is received includes:

[0008] When an ARP reply packet is received, determining whether the current ARP cache table has a first MAC address corresponding to the IP address of the sender of the ARP reply packet;

[0009] When there is a first MAC address corresponding to the IP address of the sender of the ARP reply packet, it is determined that the ARP reply packet for updating the MAC address is received.

[0010] Optionally, when there is no first MAC address corresponding to the IP address of the sender of the ARP reply packet, the MAC address carried by the ARP reply packet is saved in the ARP cache table as the first MAC address.

[0011] Optionally, after the MAC address carried in the ARP reply packet is saved as the first MAC address in the ARP cache table, the method further includes:

[0012] An Internet packet explorer is used to check a second delay for the first MAC address to access the target network, and the second delay is saved.

[0013] Optionally, determining whether a first delay for the second MAC address in the ARP reply packet to access the target network is greater than a target delay includes:

[0014] Read the saved second delay and obtain the first delay;

[0015] determining whether a difference between the first time delay and the second time delay exceeds a predetermined range;

[0016] When the predetermined range is exceeded, determining that the first time delay is greater than the target time delay;

[0017] When it does not exceed the predetermined range, it is determined that the first delay is not greater than the target delay.

[0018] Optionally, obtaining the first delay includes:

[0019] Maintaining the storage state of the first MAC address;

[0020] The second MAC address is enabled, and an Internet packet explorer is used to check a first delay for the second MAC address to access the target network.

[0021] Optionally, when the first MAC address can successfully access the network, continue to use the first MAC address to access the network.

[0022] Optionally, when the first delay is not greater than the target delay, the second MAC address carried in the ARP reply packet is updated into the ARP cache table as a new first MAC address.

[0023] Optionally, the predetermined judgment order includes:

[0024] First determine whether the first MAC address in the ARP cache table can successfully access the network;

[0025] When the first MAC address cannot successfully access the network, it is determined whether the first delay for the second MAC address in the ARP response packet to access the target network is greater than the target delay.

[0026] Optionally, the predetermined judgment order includes:

[0027] First, determine whether the first delay of the second MAC address in the ARP reply packet accessing the target network is greater than the target delay;

[0028] When the first delay is greater than the target delay, it is determined whether the first MAC address in the ARP cache table can successfully access the network.

[0029] In the technical solution provided by the present invention, when receiving an ARP reply packet of an updated MAC address, two methods are used for verification. When the original MAC address cannot successfully access the network, it may be that the gateway is attacked, or the gateway has changed the MAC address. When the delay of the new MAC address exceeds the target delay, it indicates that the new MAC address is forwarded by the attacker. When both verification methods cannot be verified, it indicates that the attacker has attacked the terminal and the gateway at the same time. At this time, a prompt is issued to the user, so that the user can discover the ARP attack as soon as possible. BRIEF DESCRIPTION OF THE DRAWINGS

[0030] Figure 1 A flowchart of a method for preventing ARP attacks on a terminal side according to an embodiment of the present invention;

[0031] Figure 2 A flowchart of a method for preventing ARP attacks on a terminal side according to another embodiment of the present invention for determining receipt of a MAC address update response packet;

[0032] Figure 3 A flowchart of a method for preventing ARP attacks on a terminal side according to another embodiment of the present invention for determining when a MAC address update response packet has been received;

[0033] Figure 4 A flowchart of a method for preventing ARP attacks on a terminal side according to another embodiment of the present invention for first accessing a gateway to store a second delay;

[0034] Figure 5 A flowchart of a method for preventing ARP attacks on a terminal side according to another embodiment of the present invention for determining whether a first delay exceeds a target delay;

[0035] Figure 6 A flowchart of a method for preventing ARP attacks on a terminal side according to another embodiment of the present invention for determining to enable a second MAC address and determining a first delay;

[0036] Figure 7This is a flow chart of a method for preventing ARP attacks on a terminal side according to another embodiment of the present invention, in which a first MAC address can successfully access a network;

[0037] Figure 8 A flowchart of a method for preventing ARP attacks on a terminal side according to another embodiment of the present invention, in which the first delay does not exceed the target delay;

[0038] Fig. 9 A flowchart of determining a judgment order for a method for preventing ARP attacks on a terminal side according to another embodiment of the present invention;

[0039] Fig.10 An exemplary flow chart of determining a judgment order for a method for preventing ARP attacks on a terminal side according to another embodiment of the present invention;

[0040] Fig.11 A flowchart of determining a judgment order for a method for preventing ARP attacks on a terminal side according to another embodiment of the present invention;

[0041] Fig.12 The present invention is another exemplary flowchart of a method for preventing ARP attacks on a terminal side according to an embodiment of the present invention. DETAILED DESCRIPTION

[0042] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0043] The embodiment of the present invention provides a method for preventing ARP attacks on a terminal side, such as Figure 1 As shown, including:

[0044] Step 100, when it is determined that an ARP reply packet for updating a MAC address is received, judging, according to a predetermined judgment order, whether the first MAC address in the ARP cache table can successfully access the network and judging whether the first delay for the second MAC address in the ARP reply packet to access the target network is greater than the target delay;

[0045] In some embodiments, in the ARP mechanism, the terminal will maintain an ARP cache table locally. When the terminal wants to perform network operations, it needs to first package the data packet into an Ethernet frame, and then send the Ethernet frame to the router, and the MAC address of the router needs to be known in the Ethernet frame. According to the above description of the ARP mechanism, when the terminal sends data, it depends on the MAC address of the gateway. Therefore, when the gateway updates the MAC address, it needs to send an ARP reply packet of the updated MAC address to the terminal. The ARP reply packet sent by the gateway usually carries the current MAC address of the gateway. However, if the ARP reply packet of the new MAC address is not verified, when it is attacked by ARP, the attacker's MAC address will be applied, resulting in network data leakage. In this step, the first MAC address can access the network to verify that the network is normal; at the same time, the delay of the second MAC address is also verified, and the verification method can verify whether the received MAC address is the real address changed by the gateway. In the two verification methods, one is the judgment on the state of the gateway side, and the other is the judgment on the second MAC address received on the terminal side. The combination of the two can timely discover ARP attacks. The predetermined judgment order refers to a predetermined execution order for two verification methods.

[0046] Step 200: When the first MAC address cannot successfully access the network and the first delay is greater than the target delay, a risk warning is issued to the user.

[0047] In some embodiments, when the first MAC address cannot successfully access the network, there are two possibilities. One is that the ARP spoofing attack simultaneously attacks the gateway, so that the gateway cannot process the data of the terminal and the network is blocked; the other is that the gateway MAC address is actually changed. There are also two possibilities for the second MAC address in the ARP reply packet. One is that the router actually changes the MAC, and the network delay changes little at this time; the other is that the ARP spoofing attack and forwards data packets as an intermediary, and the network delay will be relatively lengthened at this time. When the first MAC address cannot successfully access the network, and the first delay is greater than the target delay, it can be determined that the MAC address cannot successfully access the network due to the ARP spoofing attack that simultaneously attacks the gateway, and the received second MAC address is sent by the ARP spoofing attack. The combination of the two judgment methods and the comprehensive judgment from the terminal side and the network side can quickly detect ARP attacks.

[0048] In the technical solution provided by the embodiment of the present invention, when receiving the ARP reply packet of the updated MAC address, two methods are used for verification. When the original MAC address cannot successfully access the network, it may be that the gateway is attacked, or the gateway has changed the MAC address. When the delay of the new MAC address exceeds the target delay, it indicates that the new MAC address is forwarded by the attacker. When both verification methods cannot be verified, it indicates that the attacker has attacked the terminal and the gateway at the same time. At this time, a prompt is issued to the user, so that the user can discover the ARP attack as soon as possible.

[0049] As an optional implementation, Figure 2 As shown, in step 100, it is determined that an ARP reply packet for updating the MAC address is received:

[0050] Step 110, when an ARP reply packet is received, determining whether the current ARP cache table has a first MAC address corresponding to the IP address of the sender of the ARP reply packet;

[0051] In some embodiments, when the terminal connects to the gateway for the first time, the first MAC address is not saved in the APR cache table of the terminal, and when the terminal receives an ARP response packet for updating the MAC address, the first MAC address is already saved in the APR cache table of the terminal; the two situations should be handled differently, and therefore, it is necessary to first determine whether the currently received response packet is an ARP response packet for updating the MAC address.

[0052] Step 111: When there is a first MAC address corresponding to the IP address of the sender of the ARP reply packet, it is determined that an ARP reply packet for updating the MAC address is received.

[0053] In some embodiments, by searching the IP address of the sender of the ARP reply packet, it is determined whether the MAC address corresponding to the IP address has been saved in the current ARP cache table. When the MAC address has been saved, it is obvious that the reply packet is a reply packet for updating the MAC address. At this time, since the security of the second MAC address has not yet been determined, the MAC address carried by the reply packet can be first saved as the second MAC address in the ARP cache table.

[0054] As an optional implementation, Figure 3 As shown, step 112 is also included, when there is no first MAC address corresponding to the IP address of the sender of the ARP reply packet, the MAC address carried by the ARP reply packet is saved as the first MAC address in the ARP cache table.

[0055] In some embodiments, when the ARP cache table does not contain the first MAC address corresponding to the IP address, it indicates that this is the first time to connect to the gateway. At this time, the obtained MAC address needs to be saved to provide conditions for the terminal to send data.

[0056] As an optional implementation, Figure 4 As shown, in step 112, after the MAC address carried by the ARP reply packet is saved as the first MAC address in the ARP cache table, the following further includes:

[0057] Step 113: Use an Internet packet explorer to check a second delay for the first MAC address to access the target network, and save the second delay.

[0058] In some embodiments, when the terminal connects to the gateway for the first time, after applying the acquired first MAC address, a target IP address is pinged to obtain the second delay of accessing the target IP address when applying the first MAC address and save it, providing a comparison benchmark for the subsequent delay verification process of the second MAC address.

[0059] As an optional implementation, Figure 5 As shown, in step 100, determining whether the first delay for the second MAC address in the ARP response packet to access the target network is greater than the target delay includes:

[0060] Step 120, read the saved second delay and obtain the first delay;

[0061] In some embodiments, the second delay is saved when first connecting to the gateway, and the first delay is determined by accessing the target network using the second MAC address.

[0062] Step 121, determining whether a difference between the first delay and the second delay exceeds a predetermined range;

[0063] In some embodiments, since the delay in accessing the network is usually affected by factors such as the network operator and the target website server, when the gateway changes the MAC address, or even when the gateway uses the same MAC address, the delay in accessing the target website usually fluctuates. Therefore, in this step, a predetermined range is set, and the MAC address is considered abnormal only after the difference exceeds the predetermined range. The predetermined range is a range value pre-set according to the network fluctuation situation.

[0064] Step 122, when the predetermined range is exceeded, determining that the first delay is greater than the target delay;

[0065] In some embodiments, when an attacker hijacks and forwards network data, the data transmission path is extended, which will increase the delay in accessing the target network. Therefore, when the difference exceeds a predetermined range, it can be determined that the current Ethernet frame is not sent directly to the gateway, but is forwarded to the gateway by the attacker.

[0066] Step 123: When the delay does not exceed the predetermined range, determine that the first delay is not greater than the target delay.

[0067] In some embodiments, when the Ethernet frame is sent directly to the gateway, the delay is usually within a normal fluctuation range, that is, does not exceed a predetermined range. When it is detected that the difference does not exceed the predetermined range, it can be determined that the current Ethernet frame is sent directly to the gateway.

[0068] As an optional implementation, Figure 6 As shown, in step 120, obtaining the first delay includes:

[0069] Step 124, maintaining the storage state of the first MAC address;

[0070] In some embodiments, when it is not determined whether the second MAC address is safe, it is first necessary to keep the storage state of the first MAC address unchanged, that is, do not update the ARP cache table to avoid the loss of the first MAC address.

[0071] Step 125: Enable the second MAC address and use an Internet packet explorer to check a first delay for the second MAC address to access the target network.

[0072] In some embodiments, after the second MAC address is enabled, the second MAC address can be used to send data. At this time, the security of the second MAC address has not yet been determined. In order to subsequently verify the security of the second MAC address, the first delay is obtained by pinging the target IP address for subsequent comparison with the target delay.

[0073] As an optional implementation, Figure 7 As shown, after step 100, step 300 is further included, when the first MAC address can successfully access the network, continue to use the first MAC address to access the network.

[0074] In some embodiments, when the first MAC address can successfully access the network, it indicates that the gateway has not modified the MAC address and has not been attacked by the attacker. That is, only the terminal has received the attacker's spoofed information. At this time, when the first MAC address is used to access the network, the data will not pass through the gateway of the second MAC address, and there will be no network data leakage.

[0075] As an optional implementation, Figure 8As shown, after step 100, step 400 is also included, when the first delay is not greater than the target delay, the second MAC address carried in the ARP reply packet is updated into the ARP cache table as a new first MAC address.

[0076] In some embodiments, when the first delay is not greater than the target delay, it indicates that the current second MAC address is the MAC address actually modified by the gateway. At this time, the second MAC address can be used to send data.

[0077] As an optional implementation, Fig. 9 As shown, in step 100, the predetermined judgment sequence includes:

[0078] First determine whether the first MAC address in the ARP cache table can successfully access the network;

[0079] When the first MAC address cannot successfully access the network, it is determined whether the first delay for the second MAC address in the ARP response packet to access the target network is greater than the target delay.

[0080] like Fig.10 As shown, an exemplary Fig. 9 The specific implementation method corresponding to the judgment order in:

[0081] When the terminal receives the ARP reply packet, it checks whether the current ARP cache table contains the sender's MAC address corresponding to the sender's IP address in the reply packet:

[0082] If the ARP cache table does not have the corresponding sender MAC address, that is, the first MAC address, the MAC address carried by the response packet, that is, the second MAC address, is saved in the terminal's ARP cache table as the first MAC address, and the second delay is recorded at the same time. The second delay can be obtained by pinging a stable IP and taking the result as its network delay; its purpose is to serve as the input for delay comparison after determining the MAC address change.

[0083] If the ARP cache table has the corresponding sender MAC address, that is, the first MAC address, the subsequent steps are executed;

[0084] The MAC address carried in this ARP reply packet is set as the second MAC address of this IP address and saved in the ARP cache table. At the same time, the MAC address in the original ARP cache table continues to be used as the destination address for data interaction. At this time, monitor whether the network is unobstructed:

[0085] If the network is normal, the original first MAC address will continue to be used. During the ARP spoofing attack, if the criminals do not attack the gateway, the original first MAC address can continue to be used. If the terminal side does not enable the second address, its data will not pass through the gateway of the second address. User network data will not be leaked.

[0086] If the network is abnormal, enable the second MAC address, but do not modify the relationship between the IP and the first MAC address in the ARP cache table, and record the first network delay. There are two possibilities for abnormal network: one is that the ARP spoofing attack attacks the gateway at the same time, so that the gateway cannot process the terminal data and the network is not connected; the other is that the gateway MAC address has been truly changed. In order to determine which situation is currently, you need to continue to perform the subsequent delay comparison steps.

[0087] Compare the difference between the second network delay and the first network delay. If the delay is less than the fixed threshold, use the second MAC address as the target MAC address and update the ARP cache table. Otherwise, remind the user that the current user network is abnormal and may be attacked by ARP. Please check the router status and choose whether to continue using this wireless network. There are two possibilities for the terminal to receive a MAC address change. One is that the router really changes the MAC, and the network delay changes little at this time. The other is an ARP spoofing attack and forwards data packets as an intermediary, then the delay will be relatively long. At this time, it is necessary to remind the user to pay attention to the router status, such as: check the router settings, whether there are other abnormal terminals connected, etc., so as to prevent private data leakage caused by ARP spoofing attacks.

[0088] In this embodiment, in the case where the attacker only sends a false MAC address but does not attack the gateway, the response is faster and the network can be accessed faster.

[0089] As an optional implementation, Fig.11 As shown, in step 100, the predetermined judgment sequence includes:

[0090] First, determine whether the first delay of the second MAC address in the ARP reply packet accessing the target network is greater than the target delay;

[0091] When the first delay is greater than the target delay, it is determined whether the first MAC address in the ARP cache table can successfully access the network.

[0092] like Fig.12 As shown, an exemplary Fig.11 The specific implementation method corresponding to the judgment order in:

[0093] When the terminal receives the ARP reply packet, it checks whether the current ARP cache table contains the sender's MAC address corresponding to the sender's IP address in the reply packet:

[0094] If the ARP cache table does not have the corresponding sender MAC address, that is, the first MAC address, the MAC address carried by the response packet, that is, the second MAC address, is saved in the terminal's ARP cache table as the first MAC address, and the second delay is recorded at the same time. The second delay can be obtained by pinging a stable IP and taking the result as its network delay; its purpose is to serve as the input for delay comparison after determining the MAC address change.

[0095] If the ARP cache table has the corresponding sender MAC address, that is, the first MAC address, the subsequent steps are executed;

[0096] The MAC address carried in this ARP reply packet is set as the second MAC address of this IP address and saved in the ARP cache table, the second MAC address is enabled, but the relationship between the IP and the first MAC address in the ARP cache table is not modified for the time being, and the first network delay is recorded at the same time.

[0097] Compare the difference between the second network delay and the first network delay. If the delay is less than the fixed threshold, use the second MAC address as the target MAC address and update the ARP cache table. Otherwise, remind the user that the current user network is abnormal and may be attacked by ARP. Please check the router status and choose whether to continue to use this wireless network. There are two possibilities for the terminal to receive a MAC address change. One is that the router really changes the MAC, and the network delay changes little at this time. The other is an ARP spoofing attack and forwards data packets as an intermediary, and the delay will be relatively longer. At this time, it can be determined that the currently received ARP reply packet is spoofed information, but it cannot be determined whether the first MAC address is available. In order to access the network normally, it is necessary to continue to perform subsequent verification of the gateway status.

[0098] Continue to use the MAC address in the original ARP cache table as the destination address for data exchange. At this time, monitor whether the network is unobstructed:

[0099] If the network is normal, the original first MAC address will continue to be used. During the ARP spoofing attack, if the criminals do not attack the gateway, the original first MAC address can continue to be used. If the terminal side does not enable the second address, its data will not pass through the gateway of the second address. User network data will not be leaked.

[0100] If the network is abnormal, there are two possibilities: one is that the ARP spoofing attack attacks the gateway at the same time, so that the gateway cannot process the terminal data and the network is not connected; the other is that the gateway MAC address is actually changed. Since it has been determined in advance that the terminal has been attacked by ARP, combined with the gateway status, it is necessary to remind the user to pay attention to the router status, such as: check the router settings, whether there are other abnormal terminals connected, etc., so as to prevent the leakage of private data caused by ARP spoofing attacks.

[0101] In this implementation, when the MAC address of the gateway is changed normally, the response is faster and the network can be accessed faster.

[0102] Those skilled in the art can understand that all or part of the processes in the above method embodiments can be implemented by instructing related hardware through a computer program, and the program can be stored in a computer-readable storage medium, and when the program is executed, it can include the processes in the above method embodiments. The storage medium can be a disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM), etc.

[0103] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed by the present invention should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.

Claims

1. A method for preventing ARP attacks on a terminal side, characterized in that: include: When it is determined that an ARP reply packet of the gateway updating the MAC address is received, judging, according to a predetermined judgment order, whether a first MAC address in the ARP cache table corresponding to the IP address of the sender of the ARP reply packet can successfully access the network and judging whether a first delay for the second MAC address in the ARP reply packet to access the target network is greater than a target delay; When the first MAC address cannot successfully access the network and the first delay is greater than the target delay, a risk warning is issued to the user.

2. The method according to claim 1, characterized in that The ARP reply packet received to confirm the updated MAC address includes: When an ARP reply packet is received, determining whether the current ARP cache table has a first MAC address corresponding to the IP address of the sender of the ARP reply packet; When there is a first MAC address corresponding to the IP address of the sender of the ARP reply packet, it is determined that the ARP reply packet for updating the MAC address is received.

3. The method according to claim 2, characterized in that When there is no first MAC address corresponding to the IP address of the sender of the ARP reply packet, the MAC address carried by the ARP reply packet is saved in the ARP cache table as the first MAC address.

4. The method according to claim 3, characterized in that After the MAC address carried in the ARP reply packet is saved as the first MAC address in the ARP cache table, the method further includes: An Internet packet explorer is used to check a second delay for the first MAC address to access the target network, and the second delay is saved.

5. The method according to claim 4, characterized in that Determining whether a first delay for a second MAC address in the ARP response packet to access a target network is greater than a target delay includes: Read the saved second delay and obtain the first delay; determining whether a difference between the first time delay and the second time delay exceeds a predetermined range; When the predetermined range is exceeded, determining that the first time delay is greater than the target time delay; When it does not exceed the predetermined range, it is determined that the first delay is not greater than the target delay.

6. The method according to claim 5, characterized in that Obtaining the first delay includes: Maintaining the storage state of the first MAC address; The second MAC address is enabled, and an Internet packet explorer is used to check a first delay for the second MAC address to access the target network.

7. The method according to claim 1, characterized in that When the first MAC address can successfully access the network, continue to use the first MAC address to access the network.

8. The method according to claim 1, characterized in that When the first delay is not greater than the target delay, the second MAC address carried in the ARP reply packet is updated into the ARP cache table as a new first MAC address.

9. The method according to claim 1, characterized in that: The predetermined judgment sequence includes: First determine whether the first MAC address in the ARP cache table can successfully access the network; When the first MAC address cannot successfully access the network, it is determined whether the first delay for the second MAC address in the ARP response packet to access the target network is greater than the target delay.

10. The method according to claim 1, characterized in that The predetermined judgment sequence includes: First, determine whether the first delay of the second MAC address in the ARP reply packet accessing the target network is greater than the target delay; When the first delay is greater than the target delay, it is determined whether the first MAC address in the ARP cache table can successfully access the network.