A method, apparatus, device, and medium for periodically polling DHCP snooping and binding table reclamation.

The DHCP snooping binding table management method, which uses periodic polling and dual threshold filtering, solves the problem of inaccurate binding table resource management in the campus access network, and achieves efficient resource reclamation and service stability.

CN122496490APending Publication Date: 2026-07-31SHEN ZHOU SHU MA WANG LUO BEI JING YOU XIAN GONG SI +1
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
SHEN ZHOU SHU MA WANG LUO BEI JING YOU XIAN GONG SI
Filing Date
2026-04-29
Publication Date
2026-07-31

AI Technical Summary

Technical Problem

In the park's access network, the rapid growth of DHCP listening and binding table entries leads to inaccurate resource management, new users' inability to learn binding, service jitter, and abnormal security linkage.

Method used

A periodic polling method is adopted, and resource pools are filtered and verified through dual thresholds. The DHCP snooping binding table is managed hierarchically. By combining traffic statistics and DHCP update messages, inactive entries are accurately identified and prioritized for reclamation.

Benefits of technology

It improves the accuracy of resource reclamation in bound tables, reduces the false deletion rate, lowers hardware resource consumption, avoids business fluctuations and the risk of bound tables overflowing, and improves resource utilization.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122496490A_ABST
    Figure CN122496490A_ABST
Patent Text Reader

Abstract

This application discloses a method, apparatus, device, and medium for periodically polling DHCP snooping binding table reclamation, relating to the field of data communication technology. The method includes: storing DHCP snooping binding entries in a stable binding table; when the device resource occupancy status reaches an idle resource threshold and the DHCP update idle time of the DHCP snooping binding entry reaches an idle status threshold for the binding table entry, moving the DHCP snooping binding entry into a pending verification binding table; selecting a first binding entry from the pending verification binding table; allocating statistical resources to the first binding entry; collecting traffic statistics information of the first binding entry based on the statistical resources; if the traffic statistics information of the first binding entry does not meet a first requirement, accumulating the miss count of the first binding entry; when the miss count reaches a preset deletion count, deleting the first binding entry and reclamating the resources occupied by the first binding entry. This method improves the accuracy of resource reclamation and reduces service jitter caused by accidental deletion.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of data communication technology, and in particular to a method, apparatus, device and medium for periodically polling DHCP listening and binding table recycling. Background Technology

[0002] In campus access networks, switches typically enable DHCP snooping to monitor DHCP interactions and generate binding table entries to verify the security and legitimacy of access users. As the number of terminals increases, lease terms lengthen, or abnormal traffic occurs, the number of binding table entries may grow rapidly, approaching the device's capacity limit. This can lead to problems such as new users being unable to learn binding, service jitter, or security linkage anomalies.

[0003] Traditional solutions for managing DHCP snooping binding tables primarily rely on unified aging mechanisms or ARP active probing. Unified aging cleans up timed-out entries at fixed intervals, regardless of whether the entries are still being used. ARP probing verifies the online status of a target IP by periodically sending ARP requests and judges activity based on whether a response is received. However, terminals may not respond to ARP requests due to reasons such as being silent, in sleep mode, security policies, or momentary packet loss, leading to active users being mistakenly identified as offline. Therefore, traditional solutions suffer from poor accuracy in resource reclamation. Summary of the Invention

[0004] This application provides a method, apparatus, device, and medium for periodically polling DHCP listening binding table reclamation, which can obtain reliable evidence of activity through periodic polling verification, prioritize the reclamation of inactive entries, thereby improving the accuracy of binding table resource reclamation and reducing service jitter caused by accidental deletion.

[0005] To achieve the above objectives, this application adopts the following technical solution: Firstly, this application provides a method for periodically polling DHCP snooping and binding table recycling, the method comprising: Create a DHCP listener binding entry and store it in the stable binding table; When the device resource occupancy status reaches the idle resource threshold, and the DHCP update idle time of the DHCP listening binding entry reaches the idle status threshold of the binding table entry, the DHCP listening binding entry is moved into the binding table to be verified. Select the first binding entry from the binding list to be verified; Based on the verification resource pool, allocate statistical resources to the first binding entry; Based on statistical resources, collect traffic statistics information for the first bound entry; If the traffic statistics information of the first bound entry does not meet the first requirement, then the miss count of the first bound entry is accumulated. When the miss count reaches the preset deletion count, the first binding entry is deleted and the resources occupied by the first binding entry are reclaimed.

[0006] In some possible implementations, the step of moving the DHCP listening binding entry into the pending verification binding table when the device resource occupancy status reaches the idle resource threshold and the DHCP update idle duration of the DHCP listening binding entry reaches the idle status threshold of the binding table entry includes: Determine whether the device resource occupancy status has reached the idle resource threshold to obtain a first determination result; if the first determination result indicates that the device resource occupancy status has reached the idle resource threshold, then determine whether the DHCP update idle time of the DHCP listening binding entry has reached the idle status threshold of the binding table to obtain a second determination result; if the second determination result indicates that the DHCP update idle time of the DHCP listening binding entry has reached the idle status threshold of the binding table, then move the DHCP listening binding entry into the pending verification table.

[0007] In some possible implementations, the method further includes: If the first judgment result indicates that the device resource occupancy status has not reached the idle resource threshold, then periodic detection will continue, and the DHCP snooping binding entry will be retained in the stable binding table.

[0008] In some possible implementations, the method further includes: If the second judgment result indicates that the DHCP update idle time of the DHCP listening binding entry has not reached the idle state threshold of the binding table entry, then the DHCP listening binding entry will be retained in the stable binding table, and the periodic detection will continue to be performed.

[0009] In some possible implementations, the method further includes: If the traffic statistics information of the first binding entry meets the first requirement, the first binding entry is determined to be in an active state, and the first binding entry is migrated back to the stable binding table; wherein, the active state means that the traffic corresponding to the first binding entry hits the statistics resource, or the switch receives a DHCP update message that matches the first binding entry.

[0010] In some possible implementations, the method further includes: When the miss count has not reached the preset deletion count, release the statistical resources currently allocated to the first binding entry, and select a second binding entry from the binding to be verified table to allocate statistical resources for continued detection.

[0011] In some possible implementations, the verification resource pool is configured with resource limits, port quotas, and VLAN quotas, and statistical resources are allocated to entries in the binding table to be verified according to a round-robin grouping strategy.

[0012] Secondly, this application provides a DHCP snooping binding table recycling device that periodically polls, the device comprising: A creation module is used to create DHCP listener binding entries and store the DHCP listener binding entries in a stable binding table; The detection module is used to move the DHCP listening binding entry into the binding table to be verified when the device resource occupancy status reaches the idle resource threshold and the DHCP update idle time of the DHCP listening binding entry reaches the idle status threshold of the binding table entry. The statistics module is used to select a first binding entry from the binding to be verified table; allocate statistical resources to the first binding entry according to the verification resource pool; and collect traffic statistics information of the first binding entry based on the statistical resources. The recycling module is used to accumulate the miss count of the first bound entry if the traffic statistics information of the first bound entry does not meet the first requirement; when the miss count reaches the preset number of deletions, the first bound entry is deleted and the resources occupied by the first bound entry are recycled.

[0013] Thirdly, this application provides a computing device, including a memory and a processor; The memory stores one or more computer programs, the one or more computer programs including instructions; when the instructions are executed by the processor, the computing device performs the method as described in any one of the first aspects.

[0014] Fourthly, this application provides a computer-readable storage medium for storing a computer program for performing the method as described in any one of the first aspects.

[0015] Fifthly, this application provides a computer program product comprising one or more computer instructions, wherein when the computer instructions are executed by a computer, the computer performs the method as described in any one of the first aspects.

[0016] As can be seen from the above technical solution, this application has at least the following beneficial effects: In this application, a DHCP listener binding entry is created and stored in a stable binding table. When the device resource occupancy status reaches the idle resource threshold, and the DHCP update idle time of the DHCP listener binding entry reaches the idle status threshold of the binding table entry, the DHCP listener binding entry is moved to a binding table to be verified. A first binding entry is selected from the binding table to be verified. According to the verification resource pool, statistical resources are allocated to the first binding entry. Based on the statistical resources, traffic statistics of the first binding entry are collected. If the traffic statistics of the first binding entry does not meet the first requirement, the miss count of the first binding entry is accumulated. When the miss count reaches the preset deletion count, the first binding entry is deleted and the resources occupied by the first binding entry are reclaimed.

[0017] In existing technical solutions, DHCP snooping binding table recycling only uses fixed-period aging or ARP probing, without combining device resource status and entry activity for hierarchical management. This results in inefficient reuse of hardware statistical resources, leading to low recycling accuracy, high false deletion rates, and high resource overhead. Therefore, this application accurately determines entry activity by periodically polling for verification, using dual thresholds to filter inactive entries, and verifying resource pool quota reuse. It prioritizes the recycling of invalid binding table entries, improving resource recycling efficiency and accuracy while reducing hardware resource consumption. This effectively avoids service fluctuations caused by false deletions and mitigates the risk of binding table overflow at its source.

[0018] It should be understood that the descriptions of technical features, technical solutions, beneficial effects, or similar language in this application do not imply that all features and advantages can be achieved in any single embodiment. Rather, it is understood that the description of a feature or beneficial effect means that a specific technical feature, technical solution, or beneficial effect is included in at least one embodiment. Therefore, the descriptions of technical features, technical solutions, or beneficial effects in this specification do not necessarily refer to the same embodiment. Furthermore, the technical features, technical solutions, and beneficial effects described in this embodiment can be combined in any suitable manner. Those skilled in the art will understand that embodiments can be implemented without one or more specific technical features, technical solutions, or beneficial effects of a particular embodiment. In other embodiments, additional technical features and beneficial effects may be identified in specific embodiments that do not embody all embodiments. Attached Figure Description

[0019] Figure 1 A flowchart illustrating a method for periodically polling DHCP snooping and binding table reclamation, as provided in this application embodiment; Figure 2 A schematic diagram of a periodically polling DHCP snooping binding table recycling device provided in an embodiment of this application; Figure 3 This is a schematic diagram of a computing device provided in an embodiment of this application. Detailed Implementation

[0020] The terms "first," "second," and "third," etc., used in this application specification and accompanying drawings are used to distinguish different objects, not to limit a specific order.

[0021] In the embodiments of this application, the terms "exemplary" or "for example" are used to indicate that something is an example, illustration, or description. Any embodiment or design that is described as "exemplary" or "for example" in the embodiments of this application should not be construed as being more preferred or advantageous than other embodiments or design. Specifically, the use of the terms "exemplary" or "for example" is intended to present the relevant concepts in a specific manner.

[0022] To ensure clarity and conciseness in the description of the following embodiments, a brief introduction to the related technologies is given first: Currently, DHCP snooping binding tables in the campus access network are prone to rapid overflow of entries due to the expansion of terminal scale and excessively long IP leases. Traditional solutions rely on unified aging or ARP probing to reclaim binding table resources. However, unified aging does not distinguish whether entries are actually used, ARP probing has broadcast overhead, address exposure, and false positive risks, and the limited hardware statistical resources of switches cannot fully verify entries, resulting in poor accuracy of binding table resource reclamation, problems such as new users being unable to go online, and service jitter.

[0023] In view of this, this application provides a method for periodically polling DHCP snooping binding table reclamation. This method can be applied to a processing device, which can be a terminal or a server. Terminals include, but are not limited to, smartphones, tablets, laptops, personal digital assistants, or smart wearable devices. Servers can be cloud servers, such as central servers in a central cloud computing cluster or edge servers in an edge cloud computing cluster. Of course, servers can also be servers in a local data center. A local data center refers to a data center directly controlled by the user. Compared with existing technologies, this application solves the problems of inaccurate reclamation, resource waste, and easy service interruption in traditional solutions through a design of dual binding table layering, dual threshold gating, and verification resource pool polling.

[0024] To make the technical solution of this application clearer and easier to understand, the following describes a method for periodically polling DHCP snooping and binding table reclamation provided by an embodiment of this application, in conjunction with the accompanying drawings. Figure 1 As shown in the figure, this is a flowchart of a DHCP snooping binding table recycling method provided in an embodiment of this application.

[0025] The method includes: S201. The processing device creates a DHCP listener binding entry and stores the DHCP listener binding entry in the stable binding table.

[0026] DHCP (Dynamic Host Configuration Protocol) listener binding entries are terminal access authorization information learned by the processing device through the DHCP listener function. They include at least the IP (Internet Protocol) address, MAC (Media Access Control) address, VLAN (Virtual Local Area Network) identifier, access port, and IP lease duration, and are used to verify the security and legitimacy of terminal access. DHCP is a protocol used in local area networks (LANs) to automatically assign IP addresses and other network parameters.

[0027] The stable binding table is the core data table for DHCP snooping binding management. It is specifically used to store normal active binding entries that do not require immediate activity verification and does not occupy hardware statistics resources by default.

[0028] The processing device monitors the DHCP interaction process of terminals within the campus network through the DHCP snooping function, captures terminal address request and lease renewal messages, extracts legal binding information such as IP, MAC, VLAN, access port, and lease of the terminal, and creates a complete DHCP snooping binding entry based on this information. After the entry is created, the processing device directly writes it to and permanently stores it in the stable binding table, completing the initialization management of the binding entry of the new access terminal.

[0029] The newly created DHCP snooping binding entry corresponds to a terminal in a normal and legitimate access state. It is a high-activity entry and does not require an immediate start to the activity verification process. It should first be included in the stable binding table for routine management, following the core design logic of a dual-table hierarchical structure.

[0030] To clearly explain the execution logic of this step, specific implementation parameters are used for illustration. In some embodiments, the processing device is a campus access switch with a maximum binding table capacity of 2000 entries. The switch learns the legitimate access information of office terminals through DHCP snooping, generates a DHCP snooping binding entry containing IP address, MAC address, VLAN identifier, access port, and IP lease duration, and directly stores the entry into the stable binding table, completing the initialization management of the new access terminal binding entry.

[0031] S202. The processing device determines whether the device resource occupancy status has reached the idle resource threshold and obtains the first judgment result.

[0032] Device resource occupancy status refers to the overall status of the DHCP listening binding table entries occupancy rate, remaining slots for creating entries, and available balance in the verification resource pool of the processing device, which represents the degree of tension in device binding resources.

[0033] The idle resource threshold refers to a pre-configured critical value that can be set based on single or combined indicators such as the binding table occupancy rate and the number of remaining available entries. It is used to determine whether the device's bound resources are under pressure.

[0034] The processing device performs resource polling detection at a fixed cycle, and collects resource data in real time, such as the occupancy rate of DHCP listening and binding table entries, the remaining slots for creating entries, and the remaining amount of verification resource pool. The collected resource data is compared with the preset idle resource threshold, and a first judgment result is generated to determine whether the device resource occupancy status has reached the idle resource threshold or has not reached the idle resource threshold.

[0035] If the first judgment result indicates that the device resource occupancy status has reached the idle resource threshold, then execute S203; if the first judgment result indicates that the device resource occupancy status has not reached the idle resource threshold, then execute S209. This solution adopts a dual threshold gating mechanism, which first determines whether the equipment resources are tight, and only initiates the verification process when resources are tight, so as to avoid ineffective occupation of hardware statistics resources when equipment resources are sufficient.

[0036] This application uses the status of equipment resources as the first gate in the verification process to trigger the verification mechanism; it avoids executing invalid entry migration and verification operations when resources are sufficient, thus saving equipment computing power and hardware resources; it ensures that equipment resources are allocated on demand and improves the overall resource utilization rate.

[0037] Based on the threshold configuration of this embodiment, the determination process of this step is explained. In some embodiments, the idle resource threshold is configured such that when the DHCP listening binding table entry occupancy rate reaches 85%, the processing device performs a resource polling detection every 60 seconds. When the number of used entries in the binding table reaches 1700, the device resource occupancy status is determined to have reached the idle resource threshold, and the corresponding first determination result is obtained.

[0038] S203. The processing device determines whether the DHCP update idle time of the DHCP listening binding entry has reached the idle state threshold of the binding table entry, and obtains the second judgment result.

[0039] If the first judgment result indicates that the device resource occupancy status has reached the idle resource threshold, then it is determined whether the DHCP update idle time of the DHCP listening binding entry has reached the idle status threshold of the binding table entry, and the second judgment result is obtained. Specifically, when the first judgment result is that the device resource occupancy status has reached the idle resource threshold, the processing device retrieves the DHCP update time record of the target entry in the stable binding table, calculates the difference between the current time and the most recent DHCP update time, and obtains the DHCP update idle time of the entry; then, it compares the time with the preset idle status threshold of the binding table entry to generate the second judgment result.

[0040] Among them, DHCP update idle time refers to the time interval between the terminal corresponding to the DHCP listening binding entry and the most recent DHCP lease renewal / update message, which is the core indicator for determining whether the entry has been unused for a long time. The binding entry idle state threshold is a pre-configured time threshold. If the DHCP update idle time exceeds this threshold, the binding entry is considered to be in a low-activity idle state.

[0041] If the second judgment result indicates that the DHCP update idle time of the DHCP listening binding entry has reached the idle state threshold of the binding table entry, then execute S204; If the second judgment result indicates that the DHCP update idle time of the DHCP listening binding entry has not reached the idle state threshold of the binding table entry, then execute S210; The second step of the dual-threshold gating system filters out only low-activity entries with scarce resources and no DHCP updates for a long time, avoiding false triggering of verification for high-activity entries that frequently renew leases, thus ensuring the accuracy of the verification targets.

[0042] This application prevents highly active entries from being mistakenly verified by filtering inactive and idle entries; it also reduces invalid verification operations and lowers the risk of business misjudgment and interruption; this step strictly follows the logic of first judging resources and then judging the idleness of table entries, which fits the actual operating scenario of the equipment.

[0043] Using the same implementation parameters as described above, the duration determination process for this step will be explained. In some embodiments, the idle state threshold of the binding entry is configured to 30 minutes. The processing device retrieves the most recent DHCP update time of the target entry in the stable binding table and calculates that the DHCP update idle time of the entry is 32 minutes. This duration exceeds the preset idle state threshold of the binding entry, and the corresponding second determination result is obtained.

[0044] S204. The processing device moves the DHCP snooping binding entry into the verification checklist.

[0045] The pending verification binding table is a secondary data table for DHCP snooping binding management. It is specifically used to store low-activity binding entries whose activity needs to be confirmed through traffic statistics and DHCP message detection. Only entries in this table can occupy hardware statistics resources in the verification resource pool.

[0046] When the second judgment result is that the DHCP update idle time reaches the idle state threshold of the binding table entry, the processing device will completely migrate the DHCP snooping binding entries that meet the dual threshold conditions in the stable binding table from the stable binding table to the binding table to be verified; at the same time, the miss count of the entry will be initialized to 0, and the initialization settings before the entry verification will be completed.

[0047] Low-activity entries selected by the dual threshold are separately categorized into a binding table to be verified, which facilitates the subsequent centralized allocation of statistical resources to the verification resource pool, enabling hierarchical management of the binding table and reuse of hardware resources.

[0048] This step physically separates high-activity and low-activity entries, allocating statistical resources only to entries in the verification table; maximizing the reuse of limited hardware verification resources to improve the efficiency of activity verification; and ensuring business continuity without affecting the normal use of active entries in the stable binding table.

[0049] Based on the aforementioned dual-threshold determination results, the execution process of this step is explained. The processing device migrates DHCP snooping binding entries that meet both the resource threshold and the idle duration threshold from the stable binding table to the binding table to be verified, while simultaneously initializing the miss count of these entries to 0. The reason for initializing the miss count of these entries to 0 is that the miss count is used to record the number of consecutive unresponsive probes. Initializing it to 0 eliminates any old counts that may have accumulated in the stable table, ensuring that the verification process starts from a completely new state, thereby accurately determining the current true activity of the entry.

[0050] S205. The processing device selects the first binding entry from the binding list to be verified; and allocates statistical resources to the first binding entry according to the verification resource pool.

[0051] The first binding entry refers to the target DHCP snooping binding entry in the binding table to be verified that is preferentially selected according to the polling grouping strategy for activity verification.

[0052] The verification resource pool refers to a collection used to store the hardware statistics resources of the device. The resource unit is a dynamic ACL (Access Control List) rule with counting capabilities, which is configured with resource limits, port quotas and VLAN quotas.

[0053] Statistical resources refer to the available traffic counting and traffic matching hardware resources within the verification resource pool, used to collect traffic data corresponding to the bound entries.

[0054] The processing device selects the first binding entry from the binding list to be verified as the verification object according to the preset polling grouping strategy. Then, based on the resource limit, port quota and VLAN quota set by the verification resource pool, it allocates the corresponding hardware statistical resources such as traffic statistics ACL to the first binding entry to complete the targeted allocation of verification resources.

[0055] Since the total amount of hardware statistical resources is limited, it is impossible to allocate resources to all items to be verified at the same time. By selecting in batches and allocating in a targeted manner, the verification resources can be reused in a cyclical manner, ensuring that the verification process proceeds in an orderly manner.

[0056] This application allocates statistical resources to target items according to quotas, which can make full use of limited hardware verification resources and avoid resource waste and over-occupation. At the same time, selecting verification items according to the round-robin strategy can ensure that all items in the binding table to be verified can be verified fairly, thereby improving the stability and rationality of the overall verification process.

[0057] The resource allocation process in this step is explained in conjunction with the resource pool configuration of this embodiment. In some embodiments, the upper limit of the verification resource pool is configured to 256, the port quota is configured to 8, the processing device selects the first binding entry from the binding to be verified table according to the round-robin grouping strategy, allocates the traffic statistics ACL hardware statistics resources within the corresponding port quota to the entry, and completes the targeted allocation of verification resources.

[0058] S206. The processing device collects traffic statistics information of the first bound entry based on statistical resources, and determines whether the traffic statistics information of the first bound entry meets the first requirement.

[0059] Traffic statistics information refers to data such as traffic count increment and traffic matching status of the terminal corresponding to the first bound entry, collected through allocated statistical resources.

[0060] The first requirement refers to the standard for determining whether a binding entry is active. Specifically, the traffic corresponding to the first binding entry hits the statistics resource, or the device receives a DHCP update message that matches the first binding entry.

[0061] Within a preset observation window, the processing device continuously collects traffic data corresponding to the first bound entry using the allocated statistical resources to form complete traffic statistics. Then, it compares the traffic statistics with the first requirement to determine whether the entry meets the criteria for an active state.

[0062] If the traffic statistics information of the first bound entry meets the first requirement, then execute S211; If the traffic statistics information of the first bound entry does not meet the first requirement, then execute S207.

[0063] This application determines entry activity based on both traffic statistics and DHCP update messages, which can replace the traditional ARP (Address Resolution Protocol) probing method, obtain real and reliable evidence of activity, and avoid misjudgment problems caused by a single determination criterion.

[0064] Using dual activity determination criteria can significantly improve the accuracy of activity determination, avoid broadcast overhead caused by ARP probes, and prevent the exposure of user address information. It protects network user privacy while ensuring accuracy and is suitable for verification scenarios in large-scale VLAN networks.

[0065] Based on preset observation parameters, the activity determination process in this step is explained. In some embodiments, the observation window duration is set to 60 seconds. Within the observation window, the processing device collects traffic data corresponding to the first bound entry using the allocated statistical resources, compares the collected traffic statistics with the activity determination criteria, and determines whether the entry meets the activity status requirements.

[0066] S207. The processing device accumulates the miss count of the first bound entry and determines whether the miss count of the first bound entry has reached the preset deletion count.

[0067] The preset deletion count refers to a pre-configured threshold for the miss count. Once the miss count reaches this threshold, the bound entry is determined to be an invalid entry. In this application, the preset deletion count is set to M times, where M is a positive integer.

[0068] If the traffic statistics of the first bound entry do not meet the first requirement, the processing device will accumulate the miss count of the entry. After the accumulation is completed, the updated miss count will be compared with the preset number of deletions to determine whether the critical condition for deletion has been met.

[0069] If the count of missing values ​​reaches the preset number of deletions, then execute S208; If the miss count has not reached the preset number of deletions, then execute S212.

[0070] Since a single miss cannot determine whether an entry is permanently invalid, accumulating multiple misses before making a determination can avoid accidental deletion due to temporary terminal offlineness or momentary network interruption, thus ensuring business stability.

[0071] By accumulating multiple miss counts, the probability of accidental deletion of bound entries can be effectively reduced, minimizing business interruptions caused by momentary network fluctuations or temporary terminal offline, and making resource recycling operations more reliable.

[0072] The counting and determination process of this step is explained according to the number of times configured in this embodiment. In some embodiments, the preset number of deletions is set to 3. If the first binding entry does not have a traffic hit statistical resource and does not receive a matching DHCP update message in the current observation window, the processing device increments the miss count of the entry from 1 to 2, and then compares the updated miss count with the preset number of deletions.

[0073] S208, The processing device deletes the first binding entry and reclaims the resources occupied by the first binding entry.

[0074] Resource reclamation refers to releasing the binding table storage space occupied by DHCP listener binding entries, as well as the verification resource pool statistics resources occupied by those entries, while simultaneously revoking related security linkage references.

[0075] When the miss count of the first binding entry reaches the preset deletion count, the processing device confirms that the entry is an invalid binding entry, performs a deletion operation to remove the first binding entry from the binding table to be verified, and releases the DHCP listening binding table space and verification resource pool statistics resources occupied by the entry, thus completing resource reclamation.

[0076] Deleting inactive and invalid entries can alleviate the risk of DHCP snooping and binding table overflow, free up hardware statistics resources for other entries to be verified, and ensure normal device operation and new terminal access.

[0077] By promptly reclaiming the device resources occupied by invalid entries, the capacity pressure on the DHCP snooping binding table can be effectively alleviated, avoiding problems such as new users being unable to learn binding and service jitter. At the same time, the freed hardware statistics resources can be reused for the verification of other entries, improving the overall resource utilization efficiency of the device.

[0078] Based on the aforementioned miss count results, the resource reclamation process in this step is described. In some embodiments, if the first binding entry miss count has accumulated to 3 times, the processing device deletes the entry from the binding table to be verified, and simultaneously releases the DHCP listening binding table storage space occupied by the entry and the statistical resources in the verification resource pool, thus completing the invalid entry resource reclamation.

[0079] S209. The processing device continues to perform periodic checks and does not move DHCP snooping binding entries into the pending verification binding table.

[0080] Periodic detection refers to the operation of processing equipment to check the status of equipment resource occupancy and the status of bound items at preset fixed time intervals. It is the basic way to maintain the continuous operation of the dual threshold gating mechanism.

[0081] When the first judgment result indicates that the device resource occupancy status has not reached the idle resource threshold, the processing device maintains the current binding table management status unchanged, does not perform any entry migration operation, and continues to carry out the next round of periodic detection at the predetermined time interval to continuously monitor the changes in device resources and binding entry status.

[0082] When equipment resources are sufficient, there is no need to initiate the verification and migration process for inactive entries, thus avoiding invalid operations that consume equipment processing performance and ensuring the processing priority of core network services.

[0083] Continuous periodic monitoring can monitor device resource usage in real time. During periods of sufficient resources, additional verification and migration actions are not triggered, which reduces unnecessary computational overhead and allows the device's computing power to be concentrated on core services such as terminal access management and data forwarding. At the same time, it ensures a rapid response when resource shortages occur, thereby improving the stability and smoothness of device operation.

[0084] The continuous detection process in this step will be described in conjunction with the detection configuration of this embodiment. In some embodiments, if the processing device detects that the DHCP listening binding table entry occupancy rate is only 60%, which does not reach the preset idle resource threshold, the device will maintain the current binding table management state and continue to perform resource and entry status detection at a cycle of 60 seconds.

[0085] S210, The processing device retains the DHCP snooping binding entry in the stable binding table and returns to continue performing periodic checks.

[0086] When the second judgment result indicates that the DHCP update idle time of the DHCP listening binding entry has not reached the idle state threshold of the binding table entry, the processing device continues to keep the entry in the stable binding table without performing a migration operation, and returns to the periodic detection stage to re-perform the verification of device resources and entry status.

[0087] The terminal corresponding to the entry still exhibits frequent DHCP update behavior, which indicates that it is a highly active and valid entry. It does not need to enter the verification process and can be retained in the stable binding table to maintain normal management logic.

[0088] Retaining actively used binding entries in the stable binding table can prevent highly active entries from being mistakenly included in the verification scope, ensuring the continuous and stable operation of terminal services. At the same time, returning periodic checks can form a closed-loop management, continuously filtering out low-activity entries that meet the conditions, so that the management of binding table resources is always under control.

[0089] Based on the duration determination result, the entry retention operation in this step is explained. In some embodiments, the DHCP update idle time of a DHCP listening binding entry is 15 minutes. If the 30-minute idle state threshold of the binding table entry is not reached, the processing device retains the entry in the stable binding table and returns to the periodic detection step to continue filtering low-activity entries.

[0090] S211. The processing device determines that the first binding entry is in an active state and moves the first binding entry back to the stable binding table.

[0091] An active status means that the binding entry meets the preset active determination conditions, specifically, the traffic corresponding to the first binding entry hits the statistical resource, or the device receives a DHCP update message that matches the first binding entry.

[0092] If the traffic statistics of the first binding entry meet the first requirement, the processing device determines that the first binding entry is active, then migrates the entry from the binding table to be verified back to the stable binding table, and clears the miss count of the entry, thus completing the hierarchical migration and status reset of the active entry.

[0093] If the terminal corresponding to the entry is still in normal use after verification, it needs to be restored to the normal management level, stop occupying the statistical resources of the verification resource pool, cancel the miss count record, and restore the entry to its normal management status.

[0094] Moving active entries back to the stable binding table after verification can release the hardware statistics resources occupied by those entries in a timely manner, improve the reuse efficiency of the verification resource pool, and allow active entries to return to the normal management mode, avoiding the waste of resources caused by repeated verification and ensuring the continuity and stability of terminal network services.

[0095] Based on the active status determination results, the entry migration process in this step is explained. When the first bound entry shows a traffic hit statistics resource in the observation window, the processing device determines that the entry is active, migrates the entry from the pending binding table back to the stable binding table, clears the miss count of the entry, and restores the entry to its normal management status.

[0096] S212. The processing device releases the statistical resources currently allocated to the first binding entry and selects the second binding entry from the binding list to be verified to allocate statistical resources for continued detection.

[0097] The second binding entry refers to the next DHCP snooping binding entry to be verified in the binding list after the first binding entry has been verified, selected according to the polling grouping strategy.

[0098] Release of statistical resources refers to reclaiming hardware resources such as traffic statistics ACLs allocated to the first binding entry, so that these resources are returned to the verification resource pool and can be reassigned for use.

[0099] When the miss count of the first binding entry has not reached the preset deletion count, the processing device first reclaims all statistical resources allocated to that entry, returns the resources to the verification resource pool, and then selects the second binding entry from the binding list to be verified according to the round-robin grouping strategy, reallocates the statistical resources in the verification resource pool for it, and continues to carry out activity verification and detection.

[0100] If a single verification fails, the entry cannot be deleted directly. Instead, the currently occupied resources must be released and the verification object switched to achieve the recycling of verification resources and ensure that all entries in the bound table to be verified can complete multiple rounds of verification.

[0101] This application, through the above steps, promptly releases statistical resources and switches verification entries, maximizing the utilization of limited hardware verification resources, achieving resource reuse, avoiding resource idleness and waste, and verifying entries in the binding table in sequence, ensuring that all low-activity entries can undergo complete activity testing, thus improving the comprehensiveness and accuracy of binding table resource reclamation.

[0102] Based on the miss count determination results, the resource rotation process in this step is described. In some embodiments, if the first binding entry misses 2 times, which does not reach the preset deletion count of 3 times, the processing device releases the statistical resources occupied by the entry and returns them to the verification resource pool. Then, according to the polling strategy, a second binding entry is selected from the binding list to be verified, and statistical resources are reallocated to it to continue the verification.

[0103] The above text combined Figure 1 The method for periodically polling the DHCP snooping and binding table recycling provided in the embodiments of this application has been described in detail. The apparatus and device provided in the embodiments of this application will be described below with reference to the accompanying drawings.

[0104] This application also provides a DHCP listener binding table recycling device that performs periodic polling, such as... Figure 2 As shown in the figure, this is a schematic diagram of a periodically polling DHCP snooping binding table recycling device provided in an embodiment of this application. The device includes: Module 301 is used to create DHCP listener binding entries and store the DHCP listener binding entries in a stable binding table. The detection module 302 is used to move the DHCP listening binding entry into the binding table to be verified when the device resource occupancy status reaches the idle resource threshold and the DHCP update idle time of the DHCP listening binding entry reaches the idle status threshold of the binding table entry. The statistics module 303 is used to select a first binding entry from the binding to be verified table; allocate statistical resources to the first binding entry according to the verification resource pool; and collect traffic statistics information of the first binding entry based on the statistical resources. The recycling module 304 is used to accumulate the miss count of the first binding entry if the traffic statistics information of the first binding entry does not meet the first requirement; when the miss count reaches the preset number of deletions, the first binding entry is deleted and the resources occupied by the first binding entry are reclaimed.

[0105] In some possible implementations, the detection module 302 is specifically used to determine whether the device resource occupancy status has reached the idle resource threshold, and obtain a first determination result; if the first determination result indicates that the device resource occupancy status has reached the idle resource threshold, then determine whether the DHCP update idle time of the DHCP listening binding entry has reached the idle state threshold of the binding table, and obtain a second determination result; if the second determination result indicates that the DHCP update idle time of the DHCP listening binding entry has reached the idle state threshold of the binding table, then move the DHCP listening binding entry into the verification table.

[0106] In some possible implementations, the detection module 302 is further configured to continue periodic detection if the first judgment result indicates that the device resource occupancy status has not reached the idle resource threshold, and retain the DHCP listening binding entry in the stable binding table.

[0107] In some possible implementations, the detection module 302 is further configured to retain the DHCP listening binding entry in the stable binding table and return to continue performing periodic detection if the second judgment result indicates that the DHCP update idle time of the DHCP listening binding entry has not reached the idle state threshold of the binding table entry.

[0108] In some possible implementations, the recycling module 304 is further configured to determine that the first binding entry is in an active state if the traffic statistics information of the first binding entry meets the first requirement, and to migrate the first binding entry back to the stable binding table; wherein, the active state means that the traffic corresponding to the first binding entry hits the statistics resource, or the switch receives a DHCP update message that matches the first binding entry.

[0109] In some possible implementations, the recycling module 304 is further configured to release the statistical resources currently allocated to the first binding entry and select a second binding entry from the binding to be verified table to allocate statistical resources for continued detection when the miss count has not reached the preset deletion count.

[0110] In some possible implementations, the verification resource pool is configured with resource limits, port quotas, and VLAN quotas, and statistical resources are allocated to entries in the binding table to be verified according to a round-robin grouping strategy.

[0111] The periodically polling DHCP listener-binding table recycling device according to the embodiments of this application can correspond to the execution of the method described in the embodiments of this application, and the other operations and / or functions of each module / unit of the periodically polling DHCP listener-binding table recycling device are respectively for implementing Figure 1 For the sake of brevity, the corresponding processes of each method in the illustrated embodiments will not be described in detail here.

[0112] This application also provides a computing device. For example... Figure 3 As shown in the figure, this is a schematic diagram of a computing device provided in an embodiment of this application. The computing device 400 includes a bus 401, a processor 402, a communication interface 403, and a memory 404. The processor 402, the memory 404, and the communication interface 403 communicate with each other via the bus 401.

[0113] Bus 401 can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. Buses can be categorized as address buses, data buses, control buses, etc. For ease of representation, Figure 3 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.

[0114] Processor 402 can be any one or more of the following processors: central processing unit (CPU), graphics processing unit (GPU), microprocessor (MP), or digital signal processor (DSP).

[0115] The communication interface 403 is used for communication with external devices. For example, if the computing device is a first switch, the communication interface 403 can be used for communication between the first switch and a first user terminal, or for communication between the first switch and a second switch.

[0116] Memory 404 may include volatile memory, such as random access memory (RAM). Memory 404 may also include non-volatile memory, such as read-only memory (ROM), flash memory, hard disk drive (HDD), or solid state drive (SSD).

[0117] The memory 404 stores executable code, which the processor 402 executes to perform the aforementioned periodic polling DHCP snooping and binding table reclamation method.

[0118] Specifically, in achieving Figure 2 In the case of the illustrated embodiment, and Figure 2 When the modules or units of the periodically polling DHCP snooping and binding table reclamation device described in the embodiments are implemented in software, the execution... Figure 2 The software or program code required for the functions of each module / unit can be partially or entirely stored in memory 404. Processor 402 executes the program code corresponding to each unit stored in memory 404, and executes the aforementioned periodic polling DHCP listening and binding table reclamation method.

[0119] This application also provides a computer-readable storage medium. The computer-readable storage medium can be any available medium that a computing device can store, or a data storage device such as a data center containing one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid-state drive). The computer-readable storage medium includes instructions that instruct the computing device to perform the aforementioned periodic polling DHCP listener-bind table reclamation method.

[0120] This application also provides a computer program product comprising one or more computer instructions. When the computer instructions are loaded and executed on a computing device, all or part of the processes or functions described in this application are generated.

[0121] The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions may be transmitted from one website, computer, or data center to another website, computer, or data center via wired (e.g., coaxial cable, fiber optic) or wireless (e.g., infrared, wireless, microwave, etc.) means.

[0122] When the computer program product is executed by a computer, the computer performs any of the aforementioned periodic polling DHCP listener-bind table reclamation methods. The computer program product can be a software installation package; when any of the aforementioned periodic polling DHCP listener-bind table reclamation methods is required, the computer program product can be downloaded and executed on the computer.

[0123] The descriptions of the processes or structures corresponding to the above figures each have their own emphasis. For parts of a process or structure that are not described in detail, please refer to the relevant descriptions of other processes or structures.

[0124] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any changes or substitutions within the technical scope disclosed in this application should be covered within the scope of protection of this application.

Claims

1. A method for periodically polling and recycling a DHCP listener binding table, characterized in that, The method includes: Create a DHCP listener binding entry and store it in the stable binding table; When the device resource occupancy status reaches the idle resource threshold, and the DHCP update idle time of the DHCP listening binding entry reaches the idle status threshold of the binding table entry, the DHCP listening binding entry is moved into the binding table to be verified. Select the first binding entry from the binding list to be verified; Based on the verification resource pool, allocate statistical resources to the first binding entry; Based on statistical resources, collect traffic statistics information for the first bound entry; If the traffic statistics information of the first bound entry does not meet the first requirement, then the miss count of the first bound entry is accumulated. When the miss count reaches the preset deletion count, the first binding entry is deleted and the resources occupied by the first binding entry are reclaimed.

2. The method according to claim 1, characterized in that, When the device resource occupancy status reaches the idle resource threshold, and the DHCP update idle time of the DHCP listening binding entry reaches the idle status threshold of the binding table entry, the DHCP listening binding entry is moved to the binding table to be verified, including: Determine whether the device resource occupancy status has reached the idle resource threshold, and obtain the first judgment result; If the first judgment result indicates that the device resource occupancy status has reached the idle resource threshold, then it is determined whether the DHCP update idle time of the DHCP listening binding entry has reached the idle status threshold of the binding table entry, and a second judgment result is obtained. If the second judgment result indicates that the DHCP update idle time of the DHCP listening binding entry reaches the idle state threshold of the binding table entry, then the DHCP listening binding entry will be moved to the verification table.

3. The method according to claim 2, characterized in that, The method further includes: If the first judgment result indicates that the device resource occupancy status has not reached the idle resource threshold, then periodic detection will continue, and the DHCP snooping binding entry will be retained in the stable binding table.

4. The method according to claim 2, characterized in that, The method further includes: If the second judgment result indicates that the DHCP update idle time of the DHCP listening binding entry has not reached the idle state threshold of the binding table entry, then the DHCP listening binding entry will be retained in the stable binding table, and the periodic detection will continue to be performed.

5. The method according to claim 1, characterized in that, The method further includes: If the traffic statistics information of the first binding entry meets the first requirement, the first binding entry is determined to be in an active state, and the first binding entry is migrated back to the stable binding table; wherein, the active state means that the traffic corresponding to the first binding entry hits the statistics resource, or the switch receives a DHCP update message that matches the first binding entry.

6. The method according to claim 1, characterized in that, The method further includes: When the miss count has not reached the preset deletion count, release the statistical resources currently allocated to the first binding entry, and select a second binding entry from the binding to be verified table to allocate statistical resources for continued detection.

7. The method according to claim 1, characterized in that, The verification resource pool is configured with a resource limit, port quota, and VLAN quota, and statistical resources are allocated to the entries in the binding table to be verified according to a round-robin grouping strategy.

8. A DHCP listening and binding table recycling device that periodically polls, characterized in that, The device includes: A creation module is used to create DHCP listener binding entries and store the DHCP listener binding entries in a stable binding table; The detection module is used to move the DHCP listening binding entry into the binding table to be verified when the device resource occupancy status reaches the idle resource threshold and the DHCP update idle time of the DHCP listening binding entry reaches the idle status threshold of the binding table entry. The statistics module is used to select a first binding entry from the binding to be verified table; allocate statistical resources to the first binding entry according to the verification resource pool; and collect traffic statistics information of the first binding entry based on the statistical resources. The recycling module is used to accumulate the miss count of the first bound entry if the traffic statistics information of the first bound entry does not meet the first requirement; when the miss count reaches the preset deletion number, the first bound entry is deleted and the resources occupied by the first bound entry are recycled.

9. A computing device, characterized in that, Including memory and processor; The memory stores one or more computer programs, the one or more computer programs including instructions; when the instructions are executed by the processor, the computing device performs the method as described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium is used to store a computer program for performing the method as described in any one of claims 1 to 7.