A method, device, equipment and readable medium for managing ARP information

By CRC32 Hash encoding of IP addresses and matching them in cache, the problem of delay and conflict between querying ARP information in the prior art is solved, and more efficient ARP information query is achieved, and system performance is improved.

CN115580595BActive Publication Date: 2025-01-03SHANDONG YUNHAI GUOCHUANG CLOUD COMPUTING EQUIP IND INNOVATION CENT CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202211270312.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-10-18
Publication Date
2025-01-03
Estimated Expiration
2042-10-18

AI Technical Summary

Technical Problem

The prior art has a large delay when querying ARP information, resulting in poor system performance and conflicts in storage space or delays.

Method used

By CRC32 Hash encoding of the IP address, the encoded low 8 bits are used as the read and write address of RAM, matching in the cache, setting multiple caches to reduce the probability of conflict, query in parallel, and improving the efficiency of query hits.

Benefits of technology

It reduces the output delay when querying ARP information hits, improves system performance, and optimizes storage space utilization and query efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115580595B_ABST
    Figure CN115580595B_ABST
Patent Text Reader

Abstract

The present invention provides a method, device, equipment and readable medium for managing ARP information, the method comprising: using the preset bit of the IP address as the read-write address of the RAM to store the IP address and the corresponding MAC address in the cache; in response to receiving a request to query the ARP information, obtaining the IP address in the ARP information to be queried, and matching it in the cache according to the IP address; in response to the IP address successfully matching in the cache, returning the corresponding MAC address in the cache. By using the solution of the present invention, the output delay when querying the ARP information hit can be reduced, and the system performance is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computers, and more particularly to a method, apparatus, device and readable medium for managing ARP information. Background Art

[0002] ARP (Address Resolution Protocol) is a TCP / IP protocol that obtains a physical address based on an IP address. When a host sends information, it broadcasts an ARP request containing the target IP address to all hosts on the local network and receives a return message to determine the target's physical address. After receiving the return message, the IP address and physical address are stored in the local ARP cache and retained for a certain period of time. The next request directly queries the ARP cache to save resources.

[0003] When the ARP cache is implemented in hardware, the ARP information is usually searched by traversing the storage space, or by using CAM and RAM together. There will be some delay when querying ARP information in these two ways. The method of traversing the storage space requires searching all locations at most, which has a large delay, so the storage space will be set smaller. Using the CAM method, it takes 6 cycles to output a hit, but it consumes a large storage space. Summary of the invention

[0004] In view of this, the purpose of the embodiments of the present invention is to propose a method, device, equipment and readable medium for managing ARP information. By using the technical solution of the present invention, the output delay when querying ARP information hits can be reduced, thereby improving system performance.

[0005] Based on the above purpose, an aspect of an embodiment of the present invention provides a method for managing ARP information, comprising the following steps:

[0006] The IP address and the corresponding MAC address are stored in the cache using the preset bits of the IP address as the read and write addresses of the RAM;

[0007] In response to receiving a request to query ARP information, obtaining an IP address in the ARP information to be queried, and matching in a cache according to the IP address;

[0008] In response to a successful match of the IP address in the cache, the corresponding MAC address in the cache is returned.

[0009] According to one embodiment of the present invention, using the preset bits of the IP address as the read / write address of the RAM to store the IP address and the corresponding MAC address in the cache includes:

[0010] Encode the IP address using CRC32 Hash;

[0011] The lower 8 bits of the encoded IP address are used as the read and write address of the RAM;

[0012] Match the lower 8 bits of the encoded IP address in each cache in the cache;

[0013] The IP address and the corresponding MAC address are stored in a cache where the match fails.

[0014] According to an embodiment of the present invention, in response to receiving a request to query ARP information, obtaining an IP address in the ARP information to be queried, and matching in a cache according to the IP address includes:

[0015] Obtain the IP address in the ARP information to be queried, and perform CRC32 Hash encoding on the obtained IP address;

[0016] The IP address is searched in each cache in the cache using the lower 8 bits of the encoded IP address as the search address;

[0017] Match the obtained IP address with the found IP address.

[0018] According to one embodiment of the present invention, in response to the IP address being successfully matched in the cache, returning the corresponding MAC address in the cache includes:

[0019] In response to the acquired IP address successfully matching the found IP address, the MAC address corresponding to the found IP address is returned.

[0020] Another aspect of the embodiments of the present invention further provides a device for managing ARP information, the device comprising:

[0021] A storage module, the storage module is configured to store the IP address and the corresponding MAC address in a cache using a preset bit of the IP address as a read / write address of the RAM;

[0022] A matching module, the matching module is configured to obtain an IP address in the ARP information to be queried in response to receiving a request to query the ARP information, and to match the IP address in the cache;

[0023] The return module is configured to return the corresponding MAC address in the cache in response to a successful match of the IP address in the cache.

[0024] According to one embodiment of the present invention, the storage module is further configured as:

[0025] Encode the IP address using CRC32 Hash;

[0026] The lower 8 bits of the encoded IP address are used as the read and write address of the RAM;

[0027] Match the lower 8 bits of the encoded IP address in each cache in the cache;

[0028] The IP address and the corresponding MAC address are stored in a cache where the match fails.

[0029] According to one embodiment of the present invention, the matching module is further configured as follows:

[0030] Obtain the IP address in the ARP information to be queried, and perform CRC32 Hash encoding on the obtained IP address;

[0031] The IP address is searched in each cache in the cache using the lower 8 bits of the encoded IP address as the search address;

[0032] Match the obtained IP address with the found IP address.

[0033] According to one embodiment of the present invention, the return module is further configured as:

[0034] In response to the acquired IP address successfully matching the found IP address, the MAC address corresponding to the found IP address is returned.

[0035] Another aspect of the embodiments of the present invention further provides a computer device, the computer device comprising:

[0036] at least one processor; and

[0037] The memory stores computer instructions executable on the processor, and the instructions implement the steps of any one of the above methods when executed by the processor.

[0038] According to another aspect of the embodiments of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of any one of the above methods are implemented.

[0039] The present invention has the following beneficial technical effects: the method for managing ARP information provided by the embodiment of the present invention stores the IP address and the corresponding MAC address in the cache by using the preset bits of the IP address as the read and write addresses of the RAM; in response to receiving a request to query the ARP information, the IP address in the ARP information to be queried is obtained, and matching is performed in the cache according to the IP address; in response to the IP address being successfully matched in the cache, the technical solution of returning the corresponding MAC address in the cache can reduce the output delay when the ARP information is queried and hits, thereby improving the system performance. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present invention. For ordinary technicians in this field, other embodiments can be obtained based on these drawings without paying creative work.

[0041] Figure 1 A schematic flow chart of a method for managing ARP information according to an embodiment of the present invention;

[0042] Figure 2 is a schematic diagram of a network controller according to an embodiment of the present invention;

[0043] Figure 3 A schematic diagram of an ARP module according to an embodiment of the present invention;

[0044] Figure 4 A schematic diagram of an ARP cache controller module according to an embodiment of the present invention;

[0045] Figure 5 A schematic diagram of an apparatus for managing ARP information according to an embodiment of the present invention;

[0046] Figure 6 is a schematic diagram of a computer device according to an embodiment of the present invention;

[0047] Figure 7 FIG. 1 is a schematic diagram of a computer-readable storage medium according to an embodiment of the present invention. DETAILED DESCRIPTION

[0048] In order to make the objectives, technical solutions and advantages of the present invention more clearly understood, the embodiments of the present invention are further described in detail below in combination with specific embodiments and with reference to the accompanying drawings.

[0049] Based on the above purpose, a first aspect of an embodiment of the present invention provides an embodiment of a method for managing ARP information. Figure 1 Shown is a schematic flow chart of the method.

[0050] like Figure 1 As shown in , the method may include the following steps:

[0051] S1 uses the preset bit of the IP address as the read-write address of the RAM to store the IP address and the corresponding MAC address in the cache. The IP address is 32-bit data, and it is still 32 bits after CRC32 Hash encoding. The present invention uses the lower 8 bits of the encoded IP address as the read-write address of the RAM. At this time, the RAM depth is 256, that is, a maximum of 256 ARP information can be stored simultaneously. The lower 8 bits of the encoded IP address are matched in each cache in the cache, and the IP address and the corresponding MAC address are stored in a cache where the match is unsuccessful. The IP address and the MAC address are stored in the corresponding read-write address in the cache. Since different IP addresses will be converted to the same storage address, it is necessary to set a multi-way cache in the cache, such as 2-way, 4-way, 8-way, preferably 8-way cache, and reduce the storage size of a single channel when the total storage space remains unchanged. Therefore, when storing the IP address and MAC address, it is necessary to match in each cache. If the same storage address is matched, it cannot be stored. The IP address and MAC address are stored in the cache that does not match the same storage address. This reduces the probability of conflict. When the storage content needs to be updated, multiple channels are updated in sequence and cyclically, replacing the ARP information that has existed the longest.

[0052] In response to receiving the request to query the ARP information, S2 obtains the IP address in the ARP information to be queried, and matches it in the cache according to the IP address. The IP address in the ARP information to be queried is obtained, the obtained IP address is CRC32 Hash encoded, and the lower 8 bits of the encoded obtained IP address are used as the search address to search for the IP address in each cache in the cache, and the obtained IP address is matched with the found IP address. After the IP address in the ARP information to be queried is encoded, the lower 8 bits will get an address, and the IP address is searched in each cache in the cache according to this address. If an IP address is found, the corresponding MAC address is returned. If multiple IP addresses are found, the IP addresses need to be matched.

[0053] In response to the IP address successfully matching in the cache, S3 returns the corresponding MAC address in the cache. If the IP address matches successfully, the MAC address corresponding to the found IP address is returned.

[0054] By using the technical solution of the present invention, the output delay when querying ARP information hits can be reduced, thereby improving system performance.

[0055] Can be used Figure 2-Figure 4 The method of the present invention is implemented by a system such as Figure 2 The network controller of the hardware system of the present invention is shown, which is composed of UDP, TCP, ARP, IP, and MAC modules. Figure 3The figure shows the ARP module of the network controller. The ARP module consists of an access interface, an ARP cache controller module, an ARP transceiver module, and an ARP timeout module. Figure 4 The figure shows the ARP cache controller module. The ARP cache controller consists of five parts, including access interface, Hash module, IP / MAC cache module, timing module, and comparison module. The access interface is used for the ARP module to query ARP information, the Hash module implements the encoding of the IP address, the IP / MAC cache module is used to store ARP information, the timing module is used to implement the ARP information aging time, and the comparison module is used to compare whether the cache output data matches the input IP. The system workflow is that the user sends information through the network controller, and the network controller generates a UDP frame according to the user configuration information (taking this as an example). The UDP frame is sent to the IP module. The IP module queries the ARP module for ARP information based on the IP address. The ARP cache controller module receives the query instruction and inputs the IP information into the hash module. The Hash module is implemented using combinational logic and can immediately obtain the encoded information. The encoded information is sent to the IP / MAC cache module, which reads the data. The cache module outputs the query data and sends it to the comparison module. The comparison module compares the queried IP address and the cache output IP address to see if they are the same. If they are the same, it is a hit and the MAC information is output to the IP module. If they are not the same, the query fails and the ARP acquisition instruction is sent to the ARP transceiver module, and the ARP frame is sent to obtain the ARP information. The ARP transceiver module attempts to obtain the ARP information multiple times. If the acquisition is successful, the ARP information is returned to the IP module and the ARP information is written into the ARP cache. If the ARP information acquisition fails, an error message is returned.

[0056] In a preferred embodiment of the present invention, using the preset bits of the IP address as the read / write address of the RAM to store the IP address and the corresponding MAC address in the cache includes:

[0057] Encode the IP address using CRC32 Hash;

[0058] The lower 8 bits of the encoded IP address are used as the read and write address of the RAM;

[0059] Match the lower 8 bits of the encoded IP address in each cache in the cache;

[0060] The IP address and the corresponding MAC address are stored in a cache where the match fails.

[0061] In a preferred embodiment of the present invention, in response to receiving a request to query ARP information, obtaining an IP address in the ARP information to be queried, and matching in a cache according to the IP address includes:

[0062] Obtain the IP address in the ARP information to be queried, and perform CRC32 Hash encoding on the obtained IP address;

[0063] The IP address is searched in each cache in the cache using the lower 8 bits of the encoded IP address as the search address;

[0064] Match the obtained IP address with the found IP address.

[0065] In a preferred embodiment of the present invention, in response to the IP address being successfully matched in the cache, returning the corresponding MAC address in the cache includes:

[0066] In response to the acquired IP address successfully matching the found IP address, the MAC address corresponding to the found IP address is returned.

[0067] The present invention converts the IP address into the address of the storage space through encoding, and sets multiple storage channels to reduce the probability of conflict, and performs multi-channel parallel query and comparison. When querying ARP information, this method has a low output delay when the query hits, thereby improving system performance.

[0068] It should be noted that a person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment method can be implemented by instructing the relevant hardware through a computer program, and the above-mentioned program can be stored in a computer-readable storage medium, and when the program is executed, it can include the processes of the embodiments of the above-mentioned methods. The storage medium can be a disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM), etc. The above-mentioned computer program embodiment can achieve the same or similar effect as any of the above-mentioned method embodiments corresponding thereto.

[0069] In addition, the method disclosed in the embodiment of the present invention can also be implemented as a computer program executed by a CPU, and the computer program can be stored in a computer-readable storage medium. When the computer program is executed by the CPU, the above functions defined in the method disclosed in the embodiment of the present invention are performed.

[0070] Based on the above purpose, a second aspect of the embodiment of the present invention provides a device for managing ARP information, such as Figure 5 As shown, the device 200 includes:

[0071] A storage module, the storage module is configured to store the IP address and the corresponding MAC address in a cache using a preset bit of the IP address as a read / write address of the RAM;

[0072] A matching module, the matching module is configured to obtain an IP address in the ARP information to be queried in response to receiving a request to query the ARP information, and to match the IP address in the cache;

[0073] The return module is configured to return the corresponding MAC address in the cache in response to a successful match of the IP address in the cache.

[0074] In a preferred embodiment of the present invention, the storage module is further configured as:

[0075] Encode the IP address using CRC32 Hash;

[0076] The lower 8 bits of the encoded IP address are used as the read and write address of the RAM;

[0077] Match the lower 8 bits of the encoded IP address in each cache in the cache;

[0078] The IP address and the corresponding MAC address are stored in a cache where the match fails.

[0079] In a preferred embodiment of the present invention, the matching module is further configured as follows:

[0080] Obtain the IP address in the ARP information to be queried, and perform CRC32 Hash encoding on the obtained IP address;

[0081] The IP address is searched in each cache in the cache using the lower 8 bits of the encoded IP address as the search address;

[0082] Match the obtained IP address with the found IP address.

[0083] In a preferred embodiment of the present invention, the return module is further configured as:

[0084] In response to the acquired IP address successfully matching the found IP address, the MAC address corresponding to the found IP address is returned.

[0085] Based on the above purpose, a third aspect of an embodiment of the present invention provides a computer device. Figure 6 FIG. 2 is a schematic diagram of an embodiment of a computer device provided by the present invention. Figure 6 As shown, the embodiment of the present invention includes the following apparatus: at least one processor 21; and a memory 22, the memory 22 stores computer instructions 23 that can be run on the processor, and when the instructions are executed by the processor, the following method is implemented:

[0086] The IP address and the corresponding MAC address are stored in the cache using the preset bits of the IP address as the read and write addresses of the RAM;

[0087] In response to receiving a request to query ARP information, obtaining an IP address in the ARP information to be queried, and matching in a cache according to the IP address;

[0088] In response to a successful match of the IP address in the cache, the corresponding MAC address in the cache is returned.

[0089] In a preferred embodiment of the present invention, using the preset bits of the IP address as the read / write address of the RAM to store the IP address and the corresponding MAC address in the cache includes:

[0090] Encode the IP address using CRC32 Hash;

[0091] The lower 8 bits of the encoded IP address are used as the read and write address of the RAM;

[0092] Match the lower 8 bits of the encoded IP address in each cache in the cache;

[0093] The IP address and the corresponding MAC address are stored in a cache where the match fails.

[0094] In a preferred embodiment of the present invention, in response to receiving a request to query ARP information, obtaining an IP address in the ARP information to be queried, and matching in a cache according to the IP address includes:

[0095] Obtain the IP address in the ARP information to be queried, and perform CRC32 Hash encoding on the obtained IP address;

[0096] The IP address is searched in each cache in the cache using the lower 8 bits of the encoded IP address as the search address;

[0097] Match the obtained IP address with the found IP address.

[0098] In a preferred embodiment of the present invention, in response to the IP address being successfully matched in the cache, returning the corresponding MAC address in the cache includes:

[0099] In response to the acquired IP address successfully matching the found IP address, the MAC address corresponding to the found IP address is returned.

[0100] Based on the above purpose, a fourth aspect of an embodiment of the present invention provides a computer-readable storage medium. Figure 7 FIG. 2 is a schematic diagram of an embodiment of a computer-readable storage medium provided by the present invention. Figure 7 As shown, the computer readable storage medium 31 stores a computer program 32 that performs the following method when executed by a processor:

[0101] The IP address and the corresponding MAC address are stored in the cache using the preset bits of the IP address as the read and write addresses of the RAM;

[0102] In response to receiving a request to query ARP information, obtaining an IP address in the ARP information to be queried, and matching in a cache according to the IP address;

[0103] In response to a successful match of the IP address in the cache, the corresponding MAC address in the cache is returned.

[0104] In a preferred embodiment of the present invention, using the preset bits of the IP address as the read / write address of the RAM to store the IP address and the corresponding MAC address in the cache includes:

[0105] Encode the IP address using CRC32 Hash;

[0106] The lower 8 bits of the encoded IP address are used as the read and write address of the RAM;

[0107] Match the lower 8 bits of the encoded IP address in each cache in the cache;

[0108] The IP address and the corresponding MAC address are stored in a cache where the match fails.

[0109] In a preferred embodiment of the present invention, in response to receiving a request to query ARP information, obtaining an IP address in the ARP information to be queried, and matching in a cache according to the IP address includes:

[0110] Obtain the IP address in the ARP information to be queried, and perform CRC32 Hash encoding on the obtained IP address;

[0111] The IP address is searched in each cache in the cache using the lower 8 bits of the encoded IP address as the search address;

[0112] Match the obtained IP address with the found IP address.

[0113] In a preferred embodiment of the present invention, in response to the IP address being successfully matched in the cache, returning the corresponding MAC address in the cache includes:

[0114] In response to the acquired IP address successfully matching the found IP address, the MAC address corresponding to the found IP address is returned.

[0115] In addition, the method disclosed in the embodiment of the present invention can also be implemented as a computer program executed by a processor, and the computer program can be stored in a computer-readable storage medium. When the computer program is executed by the processor, the above functions defined in the method disclosed in the embodiment of the present invention are performed.

[0116] In addition, the above method steps and system units may also be implemented using a controller and a computer-readable storage medium for storing a computer program that enables the controller to implement the above steps or unit functions.

[0117] It will also be appreciated by those skilled in the art that various exemplary logic blocks, modules, circuits and algorithm steps described in conjunction with the disclosure herein can be implemented as electronic hardware, computer software or a combination of the two. In order to clearly illustrate this interchangeability of hardware and software, a general description has been given to the functions of various schematic components, blocks, modules, circuits and steps. Whether this function is implemented as software or hardware depends on specific applications and the design constraints imposed on the entire system. Those skilled in the art can implement the function in various ways for each specific application, but this implementation decision should not be interpreted as causing a departure from the disclosed scope of the embodiments of the present invention.

[0118] In one or more exemplary designs, the function can be implemented in hardware, software, firmware or any combination thereof. If implemented in software, the function can be stored on a computer-readable medium or transmitted by a computer-readable medium as one or more instructions or codes. Computer-readable media include computer storage media and communication media, and the communication media include any media that helps to transfer a computer program from one location to another. The storage medium can be any available medium that can be accessed by a general or special computer. As an example and not limiting, the computer-readable medium may include RAM, ROM, EEPROM, CD-ROM or other optical disk storage devices, disk storage devices or other magnetic storage devices, or any other medium that can be used to carry or store the required program code in the form of an instruction or data structure and can be accessed by a general or special computer or a general or special processor. In addition, any connection can be appropriately referred to as a computer-readable medium. For example, if a coaxial cable, optical fiber cable, twisted pair, digital subscriber line (DSL) or wireless technologies such as infrared, radio and microwaves are used to send software from a website, server or other remote source, the above-mentioned coaxial cable, optical fiber cable, twisted pair, DSL or wireless technologies such as infrared, radio and microwaves are all included in the definition of the medium. As used herein, disk and disc include compact disc (CD), laser disc, optical disc, digital versatile disc (DVD), floppy disk, Blu-ray disc, wherein disks usually reproduce data magnetically, while optical discs reproduce data optically with lasers. Combinations of the above should also be included within the scope of computer-readable media.

[0119] The above are exemplary embodiments disclosed in the present invention, but it should be noted that various changes and modifications may be made without departing from the scope disclosed in the embodiments of the present invention as defined in the claims. The functions, steps and / or actions of the method claims according to the disclosed embodiments described herein do not need to be performed in any particular order. In addition, although the elements disclosed in the embodiments of the present invention may be described or required in individual form, they may also be understood as multiple unless explicitly limited to the singular.

[0120] It should be understood that, as used herein, the singular forms "a", "an" are intended to include the plural forms as well, unless the context clearly supports an exception. It should also be understood that, as used herein, "and / or" refers to any and all possible combinations including one or more of the associated listed items.

[0121] The serial numbers of the embodiments disclosed in the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.

[0122] A person skilled in the art will understand that all or part of the steps to implement the above embodiments may be accomplished by hardware or by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a disk or an optical disk, etc.

[0123] A person skilled in the art should understand that the discussion of any of the above embodiments is only exemplary and is not intended to imply that the scope of the disclosure of the embodiments of the present invention (including the claims) is limited to these examples; under the concept of the embodiments of the present invention, the technical features in the above embodiments or different embodiments can also be combined, and there are many other changes in different aspects of the embodiments of the present invention as above, which are not provided in detail for the sake of simplicity. Therefore, any omissions, modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the embodiments of the present invention should be included in the protection scope of the embodiments of the present invention.

Claims

1. A method for managing ARP information, characterized in that: The following steps are involved: The IP address and the corresponding MAC address are stored in a cache corresponding to the read-write address using the preset bits of the IP address as the read-write address of the RAM, wherein the IP address and the corresponding MAC address are stored in the cache using the preset bits of the IP address as the read-write address of the RAM, including: CRC32 Hash encoding the IP address; using the lower 8 bits of the encoded IP address as the read-write address of the RAM; matching the lower 8 bits of the encoded IP address in each cache in the cache; storing the IP address and the corresponding MAC address in a cache where the match is unsuccessful; In response to receiving a request to query ARP information, obtain the IP address in the ARP information to be queried, and match it in the cache according to the lower 8 bits of the IP address after the IP address is encoded; In response to the lower 8 bits of the IP address after the IP address encoding being successfully matched in the cache, the corresponding MAC address in the cache is returned.

2. The method according to claim 1, characterized in that In response to receiving a request to query ARP information, obtaining an IP address in the ARP information to be queried, and matching in a cache according to the lower 8 bits of the IP address encoded by the IP address includes: Obtain the IP address in the ARP information to be queried, and perform CRC32 Hash encoding on the obtained IP address; Using the lower 8 bits of the obtained IP address after the IP address encoding as the search address, the IP address is searched in each cache in the cache; Match the IP address in the obtained ARP information with the found IP address.

3. The method according to claim 2, characterized in that In response to the lower 8 bits of the IP address after the IP address encoding being successfully matched in the cache, the corresponding MAC address in the cache is returned, including: In response to the IP address in the acquired ARP information successfully matching the found IP address, the MAC address corresponding to the found IP address is returned.

4. A device for managing ARP information, characterized in that: The device comprises: A storage module, wherein the storage module is configured to use the preset bits of the IP address as the read-write address of the RAM to store the IP address and the corresponding MAC address in a cache corresponding to the read-write address, wherein the storage module is further configured to: perform CRC32 Hash encoding on the IP address; use the lower 8 bits of the encoded IP address as the read-write address of the RAM; match the lower 8 bits of the encoded IP address in each cache in the cache; store the IP address and the corresponding MAC address in a cache where the match is unsuccessful; A matching module, wherein the matching module is configured to obtain an IP address in the ARP information to be queried in response to receiving a request for querying ARP information, and to match the IP address in the cache according to the lower 8 bits of the IP address after the IP address is encoded; The return module is configured to return the corresponding MAC address in the cache in response to the lower 8 bits of the IP address after the IP address encoding being successfully matched in the cache.

5. The device according to claim 4, characterized in that The matching module is further configured as: Obtain the IP address in the ARP information to be queried, and perform CRC32 Hash encoding on the obtained IP address; Using the lower 8 bits of the obtained IP address after the IP address encoding as the search address, the IP address is searched in each cache in the cache; Match the IP address in the obtained ARP information with the found IP address.

6. The device according to claim 5, characterized in that The return module is also configured as: In response to the IP address in the acquired ARP information successfully matching the found IP address, the MAC address corresponding to the found IP address is returned.

7. A computer device, characterized in that: include: at least one processor; as well as A memory, wherein the memory stores computer instructions executable on the processor, wherein the instructions, when executed by the processor, implement the steps of the method according to any one of claims 1 to 3.

8. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 3 are implemented.