OSPF External Route Aggregation Cancellation and Reactivation Methods, Equipment, Devices, and Storage Media

By introducing a delay timer and a reference counting mechanism, the generation and revocation of OSPF external route aggregation LSAs are dynamically adjusted, which solves the problem of frequent link state announcements caused by static configuration and improves the automation of network management and the efficiency of resource utilization.

CN123074976APending Publication Date: 2026-11-10SHENZHEN FENGRUNDA TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611403998.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-10
Publication Date
2026-11-10

AI Technical Summary

Technical Problem

In OSPF external route aggregation management, the existing technology uses static configuration, which prevents the aggregated LSA from automatically adjusting according to the actual existence status of external routes, resulting in frequent link state announcement updates and resource waste.

Method used

By introducing a delay timer and reference counting mechanism, and by monitoring changes in the number of external routes and merging multiple triggering events, the generation and revocation of aggregated LSAs are dynamically adjusted, ensuring that the management of aggregated LSAs changes from static configuration-driven to dynamic state-driven.

Benefits of technology

It reduces the number of link-state announcement floods, improves the automation level of network operation and maintenance, reduces resource consumption, and ensures the accuracy and consistency of route announcements.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123074976A_ABST
    Figure CN123074976A_ABST
Patent Text Reader

Abstract

This application discloses a method, device, apparatus, and storage medium for canceling and activating OSPF external route aggregation, relating to the field of network communication technology. The method includes: responding to a first triggering event, recording an action to be executed in the aggregation entry, and starting or resetting a delay timer; if a second triggering event is received before the delay timer expires, resetting the delay timer and merging the action to be executed in the second triggering event with the already recorded actions to be executed, thereby recording the actions to be executed in the current aggregation entry; monitoring the current number of detailed external routes matched by each aggregation entry and determining changes in the number; updating the actions to be executed in the aggregation entry based on the changes; and after the delay timer expires, executing the corresponding link state advertisement cancellation or activation operation according to the currently recorded actions to be executed in each aggregation entry. This application enables dynamic state-driven OSPF external route aggregation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of network communication technology, and in particular to methods, devices, apparatuses and storage media for canceling and activating OSPF external route aggregation. Background Technology

[0002] In the OSPF (Open Shortest Path First) protocol, the Autonomous System Boundary Router (ASBR) can inject external routes learned from other routing protocols into the OSPF domain in the form of Type-5 LSAs (Link State Advertisements). When the number of external routes is large, the ASBR uses route aggregation to summarize multiple external routes with the same prefix range into a single aggregated route for advertising, thereby reducing the size of the LSDB (Link State Database).

[0003] Currently, external route aggregation uses a static configuration method. After the administrator configures the aggregated route, the ASBR immediately generates the corresponding Type-5 LSA and floods it throughout the entire OSPF domain. When the aggregation configuration is deleted, the LSA is immediately revoked. When multiple aggregation configuration changes occur within a short period, each change triggers an independent LSA update; even after all external routes matching the aggregation prefix are revoked, the aggregated LSA continues to be advertised. This management method, entirely driven by administrator configuration, prevents the aggregated LSA from automatically adjusting based on the actual existence status of the matching external routes.

[0004] Therefore, how to transform the management of aggregated LSAs from static configuration-driven to dynamic state-driven is a technical problem that urgently needs to be solved.

[0005] The above content is only used to help understand the technical solution of this application and does not represent an admission that the above content is prior art. Summary of the Invention

[0006] The main purpose of this application is to provide a method, device, apparatus and storage medium for revoking and activating OSPF external route aggregation, aiming to solve the technical problem of how to transform the management of aggregated LSAs from static configuration-driven to dynamic state-driven.

[0007] To achieve the above objectives, this application proposes a method for revoking and activating OSPF external route aggregation, the method comprising: In response to the first triggering event, the action to be performed is recorded in the aggregate entry, and the delay timer is started or reset; If a second triggering event is received before the delay timer expires, the delay timer is reset, and the pending action of the second triggering event is merged with the recorded pending action to record the pending action in the current aggregate entry; Monitor the current number of detailed external routes matched by each of the aforementioned aggregation entries, and determine how the number changes; Based on the changes, update the actions to be executed in the aggregated entries; After the delay timer expires, the corresponding link status announcement cancellation or activation operation is performed according to the pending action currently recorded in each of the aggregate entries.

[0008] In one embodiment, recording the action to be performed in the aggregated entry in response to the first triggering event includes: If the first triggering event is adding an aggregation configuration, create an aggregation entry and record the pending action of the aggregation entry as adding it.

[0009] In one embodiment, recording the action to be performed in the aggregated entry in response to the first triggering event includes: If the first triggering event is a new detailed external route, and if there is an aggregation prefix in the aggregation entry that matches the new detailed external route, then the new detailed external route is associated with the aggregation entry. Increase the number of detailed external routes that match the aggregated entry, and record the pending actions of the aggregated entry as modifications.

[0010] In one embodiment, the step of executing the corresponding link state announcement cancellation or activation operation based on the currently recorded pending action in each of the aggregate entries includes: If the action to be performed is a modification, and the notification permission status of the aggregation entry changes from permitted to prohibited, then the current link state notification of the aggregation entry is revoked. If the action to be performed is modified, and the announcement permission status of the aggregation entry changes from prohibited to permitted, and the number of detailed external routes matching the aggregation entry is greater than zero, then a link state announcement for the aggregation entry is generated.

[0011] In one embodiment, the step of executing the corresponding link state announcement cancellation or activation operation based on the currently recorded pending action in each of the aggregate entries includes: If the pending action currently recorded in the aggregate entry is deletion, then the current link status announcement for the aggregate entry is revoked and the aggregate entry is removed. For each detailed external route that belonged to the aggregation entry before removal, re-determine whether each detailed external route matches other aggregation entries, or whether a separate link-state advertisement needs to be generated.

[0012] In one embodiment, the step of re-determining whether each detailed external route belonging to the aggregation entry before removal matches other aggregation entries, or whether a separate link-state advertisement needs to be generated, includes: Traverse the hash table of the aggregated entries to obtain the detailed external routes that belonged to the aggregated entries before removal; If each of the detailed external routes matches other aggregation entries, then each detailed external route is associated with the matching aggregation entry; If the detailed external routes do not match other aggregation entries, a separate link-state advertisement is generated.

[0013] In one embodiment, the method further includes: After the delay timer expires, iterate through the aggregate entries in each aggregate entry where the action to be executed is not empty; Perform the corresponding link status announcement cancellation or activation operation, and set the pending actions of the aggregated entry to an empty state.

[0014] Furthermore, to achieve the above objectives, this application also proposes an OSPF external route aggregation cancellation and activation device, which includes: The recording module is used to record the action to be executed in the aggregated entry in response to the first triggering event, and to start or reset the delay timer; The merging module is used to reset the delay timer when a second triggering event is received before the delay timer expires, and to merge the pending action of the second triggering event with the recorded pending action to record the pending action in the current aggregate entry; The monitoring module is used to monitor the current number of detailed external routes matched by each of the aggregated entries and determine the changes in the number; The update module is used to update the actions to be executed in the aggregated entries based on the changes. The execution module is used to perform the corresponding link status announcement cancellation or activation operation according to the pending action currently recorded in each of the aggregate entries after the delay timer expires.

[0015] In addition, to achieve the above objectives, this application also proposes an OSPF external route aggregation revocation and activation device, the device comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, the computer program being configured to implement the steps of the OSPF external route aggregation revocation and activation method as described above.

[0016] In addition, to achieve the above objectives, this application also proposes a storage medium, which is a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, it implements the steps of the OSPF external route aggregation revocation and activation method described above.

[0017] In addition, to achieve the above objectives, this application also provides a computer program product, which includes a computer program that, when executed by a processor, implements the steps of the OSPF external route aggregation revocation and activation method described above.

[0018] This application provides a method for revoking and activating OSPF external route aggregations. Firstly, in response to a first triggering event, a pending action is recorded in the aggregation entry, and a delay timer is started to convert aggregation configuration changes or external route changes into operation flags that can be merged. If a second triggering event is received before the delay timer expires, the delay timer is reset, and the pending action of the second triggering event is merged with the recorded pending action. This merges multiple triggering events occurring before the delay timer expires into a single process, avoiding independent LSA updates for each configuration change and thus suppressing the impact of frequent configuration changes. This further leads to LSA oscillations. During the delay timer's operation, the current number of detailed external routes matched by each aggregation entry is monitored to determine the changes in the number. Based on these changes, the pending actions in the aggregation entries are updated to automatically adjust the cancellation or activation of aggregated LSAs according to the existence status of the detailed external routes. After the delay timer expires, the corresponding LSA cancellation or activation operation is executed according to the pending actions currently recorded in each aggregation entry. This ensures that LSA operations are executed uniformly based on the merging of multiple triggering events, and that the generation and cancellation of aggregated LSAs can be automatically adjusted to follow the actual existence status of the detailed external routes.

[0019] In summary, this application combines multiple triggered events into a single process by introducing a delay timer and automatically adjusts the revocation or activation of aggregated LSAs based on the existence status of detailed external routes using a reference counting mechanism. This overcomes the technical deficiency in existing technologies where aggregated LSAs are entirely driven by administrator configuration and cannot be automatically adjusted based on the actual existence status of the matched external routes. It transforms the management paradigm of OSPF external route aggregation from static configuration-driven to dynamic state-driven, thereby improving the automation level of network operation and maintenance. Attached Figure Description

[0020] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.

[0021] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0022] Figure 1 This is a flowchart illustrating the first embodiment of the OSPF external route aggregation revocation and activation method in this application. Figure 2 This is a flowchart illustrating the second embodiment of the OSPF external route aggregation revocation and activation method in this application. Figure 3 This is a schematic diagram illustrating the overall process of revoking and activating OSPF external route aggregation in this application; Figure 4 This is a schematic diagram of the module structure of the OSPF external route aggregation cancellation and activation device according to an embodiment of this application; Figure 5 This is a schematic diagram of the device structure of the hardware operating environment involved in the OSPF external route aggregation cancellation and activation method in the embodiments of this application.

[0023] The purpose, features, and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation

[0024] It should be understood that the specific embodiments described herein are merely illustrative of the technical solutions of this application and are not intended to limit this application.

[0025] To better understand the technical solution of this application, a detailed description will be provided below in conjunction with the accompanying drawings and specific implementation methods.

[0026] The main solution of this application embodiment is as follows: In response to a first triggering event, an action to be executed is recorded in the aggregation entry, and a delay timer is started or reset; if a second triggering event is received before the delay timer expires, the delay timer is reset, and the action to be executed in the second triggering event is merged with the recorded action to be executed to record the action to be executed in the current aggregation entry; the current number of detailed external routes matched by each aggregation entry is monitored, and the change in the number is determined; based on the change, the action to be executed in the aggregation entry is updated; after the delay timer expires, the corresponding link state announcement cancellation operation or activation operation is performed according to the action to be executed currently recorded in each aggregation entry.

[0027] Currently, external route aggregation uses a static configuration method. After the administrator configures the aggregated route, the ASBR immediately generates the corresponding Type-5 LSA and floods it throughout the entire OSPF domain. When the aggregation configuration is deleted, the LSA is immediately revoked. When multiple aggregation configuration changes occur within a short period, each change independently triggers an LSA update; even after all external routes matching the aggregation prefix are revoked, the aggregated LSA continues to be advertised. This management method, entirely driven by administrator configuration, prevents the aggregated LSA from automatically adjusting based on the actual status of the matching external routes. Therefore, how to transform the management of aggregated LSAs from static configuration-driven to dynamic state-driven is a pressing technical problem that needs to be solved.

[0028] This application introduces a delay timer to merge multiple triggered events into a single process, and combines a reference counting mechanism to automatically adjust the revocation or activation of aggregated LSAs based on the existence status of detailed external routes. This overcomes the technical deficiency in existing technologies where aggregated LSAs are entirely driven by administrator configuration and cannot be automatically adjusted according to the actual existence status of the matched external routes. It transforms the management paradigm of OSPF external route aggregation from static configuration-driven to dynamic state-driven, thereby improving the automation level of network operation and maintenance.

[0029] It should be noted that the execution entity in this embodiment can be an OSPF external route aggregation cancellation and activation system, or a computing service device with data processing, network communication, and program execution functions, such as a tablet computer, personal computer, or mobile phone, or a hot management device capable of implementing the above-mentioned functions of an OSPF external route aggregation cancellation and activation system. This embodiment does not specifically limit it in this way. The following uses an OSPF external route aggregation cancellation and activation system as the execution entity as an example to describe this embodiment and the following embodiments.

[0030] Based on this, embodiments of this application provide a method for revoking and activating OSPF external route aggregation, referring to... Figure 1 , Figure 1 This is a flowchart illustrating the first embodiment of the OSPF external route aggregation cancellation and activation method of this application.

[0031] In this embodiment, the method for revoking and activating OSPF external route aggregation includes steps S10 to S40: It should be noted that this embodiment applies to the OSPF external route aggregation management scenario. Currently, OSPF external route aggregation management typically adopts a static configuration-driven mode, where administrators generate corresponding link-state advertisements (LSOs) immediately after configuring aggregated routes via command line, and immediately revoke the LSO after deleting the aggregate configuration. This static configuration-driven mode often results in the persistence and revocation of aggregated LSOs relying entirely on manual operations by the administrator. Even after all detailed external routes matching the aggregation prefix have been revoked, the aggregated LSO may still continue to be advertised; when the administrator changes the aggregation configuration multiple times in a short period, each change independently triggers the generation or revocation of LSOs. Therefore, this embodiment introduces a merging mechanism based on a delay timer and a reference counting linkage mechanism based on the monitoring of the number of detailed external routes, transforming the OSPF external route aggregation management paradigm from static configuration-driven to dynamic state-driven.

[0032] Step S10: In response to the first triggering event, record the action to be executed in the aggregate entry, and start or reset the delay timer; It should be noted that the first triggering event can refer to the initial event that triggers the execution of the solution in this embodiment. The first triggering event can include the administrator's addition, modification, or deletion operation on the aggregation configuration, or it can include the addition or deletion operation of external routes. An aggregation entry can refer to a data structure used to record the configuration information of the aggregation route. The action to be executed can refer to the type of operation to be performed on the aggregation entry, which can include addition, modification, deletion, or no operation. The delay timer can refer to a timer with a preset timeout duration, which can be used to merge multiple triggering events that occur within a short period of time into a single processing step.

[0033] Additionally, it should be noted that the occurrence of the first triggering event signifies that the system has detected a change in the aggregation configuration or external routing. In related technologies, after each triggering event occurs, the system immediately executes the corresponding link-state advertisement operation, resulting in multiple triggering events independently triggering multiple link-state advertisement updates within a short period. However, in this embodiment, when the first triggering event occurs, the system first records the action to be executed in the aggregation entry and starts or resets a delay timer. This delay timer can be used to reserve a time window for merging and processing other possible subsequent triggering events.

[0034] Understandably, because this application records the action to be executed in the aggregate entry and starts or resets the delay timer when the triggering event occurs, instead of immediately executing the corresponding link state announcement operation, the execution time of the triggering event can be postponed until after the delay timer expires. This provides a basis for merging and processing multiple triggering events that may occur in the future, thereby avoiding frequent updates of link state announcements caused by each triggering event executing the link state announcement operation independently, and reducing the number of link state announcement floodings.

[0035] In one feasible implementation, step S10 may include the steps of: creating an aggregation entry when the first triggering event is a new aggregation configuration, and recording the pending action of the aggregation entry as a new addition.

[0036] It should be noted that adding a new aggregation configuration refers to the administrator configuring a new aggregation route via the command line. The pending action record for an aggregation entry is "Add," indicating that the aggregation entry is currently in a pending state, meaning that a corresponding link-state advertisement needs to be generated after the delay timer expires when certain conditions are met.

[0037] Additionally, it should be noted that in related technologies, after adding an aggregation configuration, the system immediately generates a corresponding link-state advertisement and floods it throughout the entire OSPF domain, regardless of whether a matching detailed external route exists. In this embodiment, however, after adding an aggregation configuration, the action to be executed is first recorded as "added" in the aggregation entry, and the system waits for the delay timer to expire before deciding whether to generate a link-state advertisement based on the actual situation. When the first triggering event is adding an aggregation configuration, regardless of whether a matching detailed external route exists, an aggregation entry is created and the action to be executed is recorded as "added." Once created, the aggregation entry can be used for association during subsequent detailed external route matching. When a newly added detailed external route matches the aggregation entry, the aggregation entry already exists, and the association can be directly established without additional creation, thus improving processing efficiency.

[0038] In another feasible implementation, step S10 may include steps A11-A12: Step A11: If the first triggering event is a new detailed external route, and if there is an aggregation prefix in the aggregation entry that matches the new detailed external route, then the new detailed external route is associated with the aggregation entry. It should be noted that newly added detailed external routes can refer to external routes learned from other routing protocols and newly injected into an OSPF domain. Detailed external routes can also refer to external routes that are not aggregated and are injected into an OSPF domain independently. Each detailed external route can correspond to a specific route prefix. The aggregation prefix can refer to the network segment address and mask length configured in the aggregation entry, and can be used to determine which detailed external routes belong to that aggregation entry.

[0039] Additionally, it should be noted that in related technologies, after a new external route is added, the system independently generates the corresponding link-state advertisement for that external route, lacking a connection with the aggregation entry. However, in this embodiment, after a new detailed external route matches an aggregation entry, an association is established between the detailed external route and the aggregation entry, allowing the detailed external route to be represented by the aggregation entry and uniformly advertised by the aggregation link-state advertisement. Establishing an association can refer to establishing a bidirectional mapping relationship between the aggregation entry and the detailed external route; that is, recording the pointer to the detailed external route in the hash table of the aggregation entry, and simultaneously recording the pointer to the aggregation entry to which the detailed external route belongs in the detailed external route.

[0040] Step A12: Increase the number of detailed external routes matching the aggregated entry, and record the pending action of the aggregated entry as modified; It should be noted that the number of detailed external routes matching an aggregation entry can refer to the total number of detailed external routes currently belonging to that aggregation entry, which can be obtained by counting using the hash table of the aggregation entry. A pending action record of "modified" indicates that the set of detailed external routes represented by that aggregation entry has changed, and the corresponding link-state advertisement needs to be refreshed after the delay timer expires.

[0041] Additionally, it should be noted that after a new detailed external route is added and matches an aggregation entry, that detailed external route becomes part of the route set represented by the aggregation entry, and the aggregation link-state advertisement needs to reflect this change. Recording the action to be executed as a modification allows the system to refresh the link-state advertisement based on the set of detailed external routes included in the current aggregation entry after the delay timer expires, ensuring that the content of the link-state advertisement is consistent with the actual set of detailed external routes.

[0042] In one feasible implementation, if a newly added detailed external route has already generated a separate link-state advertisement, then that separately generated link-state advertisement is revoked. It should be noted that once the detailed external route matches an aggregation entry and is represented by that aggregation entry, there is no longer a need to separately advertise the detailed external route. Revoking the separately generated link-state advertisement avoids routing information conflicts and link-state database redundancy caused by the simultaneous existence of aggregated link-state advertisements and detailed external route link-state advertisements.

[0043] Step S20: If a second trigger event is received before the delay timer expires, the delay timer is reset, and the action to be executed for the second trigger event is merged with the recorded action to be executed to record the action to be executed in the current aggregate entry. It should be noted that the second triggering event can refer to another triggering event, different from the first triggering event, that occurs before the delay timer expires. The second triggering event can include administrator modifications or deletions of aggregate configurations, or additions or deletions of external routes. Resetting the delay timer means restarting the delay timer, i.e., clearing the current timing state of the delay timer and starting the countdown from zero. Merging processing means merging the pending action corresponding to the second triggering event with the already recorded pending actions; the merged pending action can be used to indicate the final operation to be performed after the delay timer expires.

[0044] Additionally, it should be noted that the second triggering event can include administrator modifications to the aggregation configuration. Modifying the aggregation configuration can refer to changing the tag value or notification permission status of an aggregation entry. When the second triggering event is a modification of the aggregation configuration, the corresponding field in the aggregation entry is updated, and the pending action is recorded as a modification. The second triggering event can also include administrator deletion of the aggregation configuration. When the second triggering event is a deletion of the aggregation configuration, the pending action for the aggregation entry is recorded as deletion. In related technologies, subsequent triggering events occurring before the delay timer expires cannot be merged with the first triggering event; each triggering event is processed independently. For example, if an administrator adds an aggregation configuration, deletes it, and then reconfigures the same aggregation but modifies the tag value within a short period, each of these three operations independently triggers the generation, cancellation, and regeneration of the link status announcement, resulting in a flood of three link status announcements. In this embodiment, when the second triggering event is received before the delay timer expires, the delay timer is reset, which extends the processing window and allows more time for merging subsequent triggering events. Simultaneously, the pending action of the second triggering event is merged with the recorded pending actions. For example, if the recorded pending action is "add" and the second triggering event is "delete aggregate configuration," the merged pending action is "delete." Similarly, if the recorded pending action is "modify" and the second triggering event is "add detailed external route," the merged pending action remains "modify." This merging process ensures that the pending action executed after the delay timer expires reflects the final state after the last change, rather than the intermediate state of each change.

[0045] It is understandable that, since this embodiment resets the delay timer and merges the pending actions when the second trigger event is received before the delay timer expires, it can merge multiple trigger events that occur before the delay timer expires into one processing, avoiding the generation or cancellation of the link state announcement independently for each trigger event, thereby further reducing the number of link state announcement floodings, suppressing link state announcement oscillations caused by frequent configuration changes, and reducing network resource consumption.

[0046] Step S30: Monitor the current number of detailed external routes matched by each of the aggregated entries and determine the changes in the number; It should be noted that monitoring the current number of detailed external routes matching each aggregation entry can refer to checking the number of detailed external routes recorded in the hash table of the aggregation entry in real time or periodically. Detailed external routes can refer to external routes that are not aggregated and are injected into the OSPF domain independently; each detailed external route can correspond to a specific route prefix. The hash table of the aggregation entry can be used to store pointers to all detailed external routes matching that aggregation entry, and the hash table count can be used to determine the total number of detailed external routes currently matching that aggregation entry. Changes in the number can refer to the direction and magnitude of the change in the number of matches; for example, a change from 3 to 2 indicates that one detailed external route has been removed, and a change from 1 to 0 indicates that all matching detailed external routes have been deleted.

[0047] Furthermore, it should be noted that in related technologies, there is a lack of dynamic association mechanism between aggregated routes and detailed external routes. The system cannot proactively detect changes in the number of detailed external routes matching an aggregated entry, resulting in the continued broadcasting of aggregated link status announcements even after all detailed external routes are deleted, until the administrator manually deletes the aggregated configuration. In this embodiment, however, by continuously monitoring the current number of detailed external routes matching an aggregated entry and determining changes in that number, the system can perceive changes in the existence status of detailed external routes in real time, providing a basis for automatically adjusting aggregated link status announcements. It should be further explained that the deletion of a detailed external route can trigger changes in the number of matches. When a detailed external route belonging to an aggregated entry is deleted, the association between that detailed external route and the aggregated entry is severed, and the number of matches decreases accordingly. For example, if an aggregated entry currently matches 3 detailed external routes, and one of them is deleted, the number of matches decreases from 3 to 2, a reduction of 1 route; when the last route is deleted, the number of matches decreases from 1 to 0, a return to zero. By monitoring changes in the number of matches, the system can promptly perceive changes in the set of routes represented by the aggregated entry.

[0048] It is understandable that, since this embodiment monitors the current number of detailed external routes matched by each aggregation entry and determines the changes in the number, it can promptly detect whether the existence status of detailed external routes has changed. Thus, when the number of matches reaches zero, the subsequent aggregation link status announcement cancellation process is triggered, avoiding the problem that aggregation link status announcements continue to be announced after all detailed external routes have been deleted, thereby improving the automation level of network operation and maintenance.

[0049] Step S40: Based on the changes, update the actions to be executed in the aggregated entries; It should be noted that the change can refer to the direction and magnitude of the change in the number of matches determined in step S30. Updating the pending actions in the aggregated entries can refer to setting the pending actions of the aggregated entries to the corresponding operation types based on the changes in the number of matches. The operation types can include adding, modifying, and deleting.

[0050] Additionally, it should be noted that in related technologies, the system cannot automatically detect and trigger the revocation of aggregate link status announcements after the deletion of detailed external routes; the revocation of aggregate link status announcements relies entirely on the administrator manually deleting the aggregate configuration. However, in this embodiment, when the number of matches changes, the system automatically updates the pending actions in the aggregate entry based on the changed number. For example, when the number of matches changes from greater than zero to zero, i.e., all detailed external routes matching the aggregate entry are deleted, the pending action is updated to delete; when the number of matches changes from zero to greater than zero, i.e., when the aggregate entry has its first detailed external route match, the pending action is updated to modify; when the number of matches changes but does not return to zero, i.e., the aggregate entry still has detailed external route matches but the route set has changed, the pending action is updated to modify.

[0051] Additionally, it should be noted that the second triggering event can include administrator modifications to the aggregation configuration. Modifying the aggregation configuration can refer to changing the tag value or notification permission status of an aggregation entry. When the second triggering event is modifying the aggregation configuration, the corresponding fields in the aggregation entry are updated, and the pending action is recorded as "modified." The second triggering event can also include administrator deletion of the aggregation configuration. When the second triggering event is deleting the aggregation configuration, the pending action for the aggregation entry is recorded as "deleted."

[0052] It is understandable that, since this embodiment can automatically update the pending actions of the aggregation entries based on the changes in the existence status of detailed external routes, the aggregation link status announcement can be automatically revoked or generated without manual intervention by the administrator. This avoids the problem that the aggregation link status announcement continues to be announced after all detailed external routes have been deleted, thus improving the automation level of network operation and maintenance and the accuracy of route announcements.

[0053] Step S50: After the delay timer expires, perform the corresponding link status announcement cancellation or activation operation according to the currently recorded pending action in each of the aggregate entries; It should be noted that "delay timer timeout" can refer to the delay timer reaching its preset timeout duration. "Link-State Advertisement Cancellation" can refer to canceling the current link-state advertisement corresponding to an aggregation entry, i.e., flooding a link-state advertisement with the maximum age within the OSPF domain to notify other routers to delete the advertisement. "Link-State Advertisement Enabling" can refer to generating or refreshing the link-state advertisement corresponding to an aggregation entry, i.e., flooding a new link-state advertisement within the OSPF domain to notify other routers to update their link-state database.

[0054] Additionally, it should be noted that in related technologies, the corresponding link status announcement operation is executed immediately after each triggered event, resulting in frequent updates to the link status announcement. In this embodiment, however, all pending actions are executed uniformly after the delay timer expires, allowing multiple triggered events to be merged into a single link status announcement operation. Furthermore, when executing the corresponding link status announcement cancellation or activation operation, it is based on the pending actions currently recorded in each aggregate entry, ensuring that the executed pending actions reflect the final state after the last change.

[0055] It is understandable that, since this embodiment performs the corresponding link status announcement cancellation or activation operation uniformly according to the pending action currently recorded in each aggregated entry after the delay timer expires, the link status announcement operation can be uniformly executed on the basis of merging multiple triggering events, while ensuring that the generation and cancellation of aggregated link status announcements can be automatically adjusted according to the actual existence status of detailed external routes.

[0056] In one feasible implementation, step S50 may include steps A51-A52: Step A51: If the notification permission status of the aggregation entry changes from permitted to prohibited when the action to be performed is modified, then the current link state notification of the aggregation entry is revoked. It should be noted that the "advertisement allowed" status refers to whether an aggregated route is allowed to advertise its corresponding link-state announcements. This status can be configured by the administrator using the `no-advertise` flag. Changing from allowed to prohibited indicates that the administrator has configured the `no-advertise` flag, instructing the aggregated route not to advertise.

[0057] Additionally, it should be noted that in related technologies, the system immediately executes the corresponding link-state advertisement cancellation operation after the no-advertise flag changes. However, in this embodiment, the cancellation operation after the no-advertise flag change is also subject to delayed merging processing, which can avoid link-state advertisement oscillations caused by independent triggering with other configuration changes or routing changes.

[0058] Furthermore, it should be noted that step A51 may include: if the tag value of the aggregated entry changes when the action to be performed is modified, then the current link status announcement of the aggregated entry is refreshed according to the changed tag value.

[0059] It should be noted that the label value can refer to the label configured by the administrator for the aggregated route, and the label value can be used for routing policy matching. Refreshing the link-state advertisement can refer to regenerating the link-state advertisement corresponding to the aggregated entry and flooding it within the OSPF domain to update the label value field in the link-state advertisement.

[0060] Additionally, it should be noted that in related technologies, modifying the tag value requires the system to delete the original aggregation configuration and recreate it, resulting in two operations: canceling and regenerating the link status announcement. In this embodiment, however, modifying the tag value only requires refreshing the link status announcement corresponding to the aggregation entry, without deleting and recreating the aggregation entry. This reduces the number of link status announcement floods, improves processing efficiency, and does not affect other aggregation entries.

[0061] Step A52: If the action to be performed is modified, and the announcement permission status of the aggregation entry changes from prohibited to permitted, and the number of detailed external routes matching the aggregation entry is greater than zero, then a link state announcement for the aggregation entry is generated. It should be noted that changing from prohibited to permitted may mean that the administrator has removed the no-advertise flag, instructing the aggregated route to resume advertising. A greater than zero number of detailed external routes matching the aggregated entry indicates that at least one detailed external route currently belongs to that aggregated entry.

[0062] Additionally, it should be noted that in related technologies, when the no-advertise flag is canceled, the system immediately generates a corresponding link-state advertisement, even if no matching detailed external routes exist. This results in a link-state advertisement that does not carry any valid routing information. However, in this embodiment, a link-state advertisement is only generated when the number of detailed external routes matching the aggregation entry is greater than zero. This avoids generating invalid link-state advertisements and reduces redundant information in the link-state database.

[0063] In another feasible implementation, step S50 may include steps B21-B22: Step B21: If the pending action currently recorded in the aggregate entry is deletion, revoke the current link status announcement of the aggregate entry and remove the aggregate entry. It should be noted that "delete" for the pending action can mean that the aggregation entry no longer needs to exist, such as when an administrator deletes the aggregation configuration, or when all detailed external routes matching the aggregation entry are deleted. "Remove aggregation entry" can mean deleting the aggregation entry from the global routing table and releasing the memory resources occupied by the aggregation entry.

[0064] Additionally, it should be noted that in related technologies, the system immediately revokes the aggregated link status announcement after the aggregated configuration is deleted. However, once the aggregated entry itself is deleted, the announcement method of the detailed external routes originally belonging to that aggregate cannot be automatically restored. In this embodiment, however, after the aggregated entry is removed, the detailed external routes originally belonging to that aggregated entry are re-evaluated through subsequent step B22. This ensures that the detailed external routes can resume individual announcements or match other aggregated entries after the aggregated entry is deleted.

[0065] Step B22: For each detailed external route that belonged to the aggregation entry before removal, re-determine whether each detailed external route matches other aggregation entries, or whether a separate link state advertisement needs to be generated. It should be noted that the detailed external routes belonging to the aggregation entry before removal can refer to all detailed external routes recorded in the hash table of the aggregation entry before it was deleted. Reassessment can refer to re-evaluating whether there is a matching aggregation prefix for each detailed external route based on all aggregation entries in the current aggregation route table.

[0066] Additionally, it should be noted that in related technologies, after an aggregation entry is deleted, the detailed external routes that originally belonged to that aggregation will not automatically resume advertising, resulting in route loss. However, in this embodiment, by re-evaluating each detailed external route that belonged to the aggregation entry before removal, the detailed external routes can automatically resume generating separate link-state advertisements or match other aggregation entries after the aggregation entry is deleted, thus avoiding route loss caused by the deletion of the aggregation entry and ensuring the correctness and completeness of route advertisements.

[0067] Furthermore, step B22 may include steps B221 to B223: Step B221: Traverse the hash table of the aggregated entries to obtain the detailed external routes belonging to the aggregated entries before removal; It should be noted that the hash table of an aggregated entry can be used to store pointers to all detailed external routes that match that aggregated entry. Traversing the hash table can retrieve a complete list of all detailed external routes belonging to that aggregated entry. Retrieving the detailed external routes belonging to the aggregated entry before removal means extracting information about all detailed external routes from the hash table before the aggregated entry is removed, so that it can be re-evaluated later.

[0068] Additionally, it should be noted that in related technologies, after an aggregated entry is deleted, the detailed external routing information stored in the hash table of the aggregated entry is released along with the aggregated entry, making it impossible to know which detailed external routes originally belonged to that aggregated entry. However, in this embodiment, by traversing the hash table of the aggregated entry, all detailed external routes originally belonging to that aggregated entry can be obtained before the aggregated entry is removed, ensuring a complete data source for subsequent re-evaluation.

[0069] Step B222: If each of the detailed external routes matches other aggregation entries, then each of the detailed external routes is associated with the matching aggregation entry. It should be noted that matching other aggregation entries can indicate that the destination network prefix of the detailed external route falls within the range of aggregation prefixes configured in other aggregation entries. Establishing an association can refer to establishing a bidirectional mapping relationship between aggregation entries and detailed external routes.

[0070] Additionally, it should be noted that when a detailed external route matches another aggregation entry, that detailed external route can be represented by the other aggregation entry and uniformly announced by the link-state advertisements of the other aggregation entries. There is no need to generate a separate link-state advertisement, which can maintain the advantages of aggregation and reduce the size of the link-state database.

[0071] Step B223: If each of the detailed external routes does not match other aggregation entries, a link state advertisement is generated separately. It should be noted that "not matching other aggregation entries" indicates that the destination network prefix of the detailed external route does not fall within the range of aggregation prefixes configured in any aggregation entry. "Generate a separate link-state advertisement" means that a corresponding Type-5 LSA is generated separately for this detailed external route and flooded within the OSPF domain.

[0072] Additionally, it's important to note that when a detailed external route does not match any aggregation entry, that detailed external route is no longer represented by any aggregation entry. A separate link-state advertisement (LSI) needs to be generated to ensure that this external route information can be properly advertised within the OSPF domain, preventing route loss. By generating separate LSIs, it can be ensured that all external routes can still be learned by other routers within the OSPF domain even after the aggregation entry is deleted.

[0073] This embodiment provides a method for revoking and activating OSPF external route aggregations. Firstly, in response to a first triggering event, a pending action is recorded in the aggregation entry, and a delay timer is started to convert aggregation configuration changes or external route changes into operation flags that can be merged. If a second triggering event is received before the delay timer expires, the delay timer is reset, and the pending action of the second triggering event is merged with the already recorded pending action. This merges multiple triggering events occurring before the delay timer expires into a single process, avoiding independent LSA updates for each configuration change and thus suppressing errors caused by frequent configuration changes. LSA oscillations caused by changes; during the delay timer operation, the current number of detailed external routes matched by each aggregation entry is monitored to determine the changes in the number, and the pending actions in the aggregation entries are updated according to the changes, so as to automatically adjust the cancellation or activation of the aggregation LSA according to the existence status of the detailed external routes; after the delay timer expires, the corresponding LSA cancellation or activation operation is executed according to the pending actions currently recorded in each aggregation entry, so as to uniformly execute LSA operations based on merging multiple triggering events, and ensure that the generation and cancellation of aggregation LSAs can be automatically adjusted according to the actual existence status of the detailed external routes.

[0074] In summary, this embodiment combines multiple triggered events into a single process by introducing a delay timer, and automatically adjusts the revocation or activation of aggregated LSAs based on the existence status of detailed external routes using a reference counting mechanism. This overcomes the technical deficiency in existing technologies where aggregated LSAs are entirely driven by administrator configuration and cannot be automatically adjusted based on the actual existence status of the matched external routes. It transforms the management paradigm of OSPF external route aggregation from static configuration-driven to dynamic state-driven, thereby improving the automation level of network operation and maintenance.

[0075] Based on the first embodiment of this application, in the second embodiment of this application, the content that is the same as or similar to that in the first embodiment described above can be referred to the above description, and will not be repeated hereafter. Based on this, please refer to... Figure 2 After step S50, steps S61-S62 are also included: It should be noted that this embodiment is applied to an OSPF external route aggregation management scenario. In the first embodiment above, after the delay timer expires, the system executes the corresponding link-state advertisement operation based on the currently recorded pending actions in each aggregation entry. In practical applications, there may be multiple aggregation entries with pending actions that need to be processed simultaneously. This embodiment provides a batch execution method. By traversing all aggregation entries with non-empty pending actions and executing the corresponding link-state advertisement operation one by one, it can ensure that all pending aggregation entries are executed with the corresponding link-state advertisement operation, avoiding omissions and improving processing efficiency.

[0076] Step S61: After the delay timer expires, traverse the aggregate entries in each aggregate entry for which the action to be executed is not empty; It's important to note that "pending action not empty" can mean that the pending action for an aggregation entry is any one of add, modify, or delete, not that there is no operation. Aggregate entries with "pending action not empty" can originate from various triggering scenarios: adding an aggregation configuration with the pending action being add; modifying an aggregation configuration or adding a detailed external route with the pending action being modify; deleting an aggregation configuration or when the match count reaches zero with the pending action being delete. Traversing all aggregation entries with "pending action not empty" can refer to checking all aggregation entries in the global routing table after the delay timer expires, filtering out those with "pending action not empty," and processing them one by one.

[0077] Additionally, it should be noted that in related technologies, the corresponding link-state advertisement operation is executed immediately after each triggered event, without the need to traverse the aggregate routing table for batch processing. However, in this embodiment, by traversing all aggregate entries with non-empty actions to be executed and processing them one by one, it can be ensured that all aggregate entries that need to be processed have their corresponding link-state advertisement operations executed, avoiding omissions and ensuring the completeness of the processing.

[0078] Step S62: Execute the corresponding link status announcement cancellation or activation operation, and set the pending action of the aggregation entry to an empty state; It should be noted that executing the corresponding link status announcement cancellation or activation operation can refer to each traversed aggregate entry, and performing the corresponding operation based on the specific type of the pending action currently recorded for that aggregate entry. Setting it to an empty state means setting the pending action of the aggregate entry to no operation, indicating that the aggregate entry currently has no pending operation.

[0079] Furthermore, it should be noted that in related technologies, there is no explicit state reset mechanism after the operation of an aggregation entry is completed. This may result in processed aggregation entries retaining old pending actions, affecting subsequent processing. In this embodiment, by setting the pending actions of an aggregation entry to an empty state, it can be clearly stated that each aggregation entry currently has no pending operations, preparing for the next round of processing and ensuring the consistency of the system state and the sustainability of the processing flow. After the pending actions are set to an empty state, the aggregation entry can wait for the arrival of the next round of triggering events and re-enter the processing flow of steps S10 to S50 when a new triggering event occurs, thereby realizing the continuous loop of aggregation route lifecycle management.

[0080] It is understandable that this embodiment, by traversing all aggregate entries whose pending actions are not empty and executing the corresponding link status notification operation one by one, ensures that all aggregate entries requiring processing have their corresponding link status notification operations executed, avoiding omissions and guaranteeing the integrity of processing. Furthermore, by setting the pending actions of aggregate entries to an empty state, the current processing state of each aggregate entry can be clearly defined, preparing for the next round of processing and ensuring the consistency of system state and the sustainability of the processing flow. Thus, batch centralized processing of all pending actions after the delay timer expires is achieved, improving processing efficiency and ensuring the integrity of processing logic and the accuracy of state management.

[0081] For example, to help understand the overall implementation process of the OSPF external route aggregation revocation and activation methods provided in the above embodiments, please refer to... Figure 3 , Figure 3 This is a schematic diagram illustrating the overall process of revoking and activating OSPF external route aggregation in this application. Specifically: First, a first triggering event occurs. This first triggering event can include adding, modifying, or deleting aggregate configurations by the administrator, or adding or deleting external routes. When the first triggering event occurs, the action to be performed is recorded in the aggregate entry, and a delay timer is started or reset. This delay timer can be used to reserve a time window for merging and processing other possible subsequent triggering events.

[0082] In one scenario, if the first triggering event is adding an aggregation configuration, an aggregation entry is created, and the pending action for the aggregation entry is recorded as "add". In another scenario, if the first triggering event is adding a detailed external route, and the aggregation entry contains an aggregation prefix that matches the newly added detailed external route, the newly added detailed external route is associated with the aggregation entry, the number of detailed external routes matching the aggregation entry is increased, and the pending action for the aggregation entry is recorded as "modify". In yet another scenario, if the first triggering event is deleting a detailed external route, and the detailed external route belongs to an aggregation entry, the association between the detailed external route and the aggregation entry is removed, and the number of detailed external routes matching the aggregation entry is reduced.

[0083] After the processing corresponding to the first trigger event is completed, monitor the current number of detailed external routes matching each aggregation entry and determine the changes in the number. When the number of detailed external routes matching an aggregation entry changes from greater than zero to zero, i.e., all detailed external routes matching that aggregation entry are deleted, update the pending action of the aggregation entry to delete. When the number of detailed external routes matching an aggregation entry changes from zero to greater than zero, i.e., when that aggregation entry has its first detailed external route match, update the pending action of the aggregation entry to modify. When the number of detailed external routes matching an aggregation entry changes but does not return to zero, i.e., when that aggregation entry still has detailed external routes matching but the route set has changed, update the pending action of the aggregation entry to modify.

[0084] If a second triggering event is received before the delay timer expires, the delay timer is reset, and the pending action of the second triggering event is merged with the already recorded pending actions to record the pending actions in the current aggregation entry. The second triggering event can include administrator modifications or deletions of aggregation configurations, as well as additions or deletions of external routes. Resetting the delay timer extends the processing window, allowing more time for merging subsequent triggering events. Merging multiple pending actions corresponding to triggering events into a single action, ensuring that the pending action executed after the delay timer expires reflects the final state after the last change, rather than intermediate states of each change. For example, if the recorded pending action is "add," and the second triggering event is "delete aggregation configuration," the merged pending action will be "delete." Similarly, if the recorded pending action is "modify," and the second triggering event is "add detailed external route," the merged pending action will still be "modify."

[0085] It should be noted that if no second triggering event occurs, the operations of resetting the delay timer and merging processing in step S20 will not be executed. That is, the actions recorded when the first triggering event arrives are retained until the delay timer expires and the actions are executed directly. In this case, the timeout triggering of the delay timer in subsequent steps follows the same triggering logic as resetting the timer and then triggering a timeout after the second triggering event occurs.

[0086] After the delay timer expires, the corresponding link status announcement cancellation or activation operation is executed based on the pending action currently recorded in each aggregate entry.

[0087] Specifically, if the pending action for the current record is "add," a link-state advertisement (LSO) corresponding to the aggregate entry is generated. If the pending action for the current record is "modify," the corresponding operation is performed based on the attribute changes of the aggregate entry: if the advertised permission status of the aggregate entry changes from "allowed" to "prohibited," the current LSO of the aggregate entry is revoked; if the advertised permission status of the aggregate entry changes from "prohibited" to "allowed," and the number of detailed external routes matching the aggregate entry is greater than zero, a LSO of the aggregate entry is generated; if the label value of the aggregate entry changes, the current LSO of the aggregate entry is refreshed based on the changed label value. If the pending action for the current record is "delete," the current LSO of the aggregate entry is revoked, and the aggregate entry is removed. After the aggregate entry is removed, the detailed external routes originally belonging to that aggregate entry can be re-evaluated.

[0088] Finally, after executing the corresponding link state announcement cancellation or activation operation, the pending actions of the aggregate entry are set to empty to complete the processing loop of the aggregate entry and prepare for the next round of processing.

[0089] It should be noted that the above steps are not strictly limited in order; some steps can be executed in parallel or over time. After setting the pending actions to an empty state, when the next trigger event occurs, the pending actions of the aggregated entry have already started recording new pending actions from the empty state, and so on in a loop. Figure 3 In the illustrated process, if the operation corresponding to the pending action fails after the delay timer expires, the aggregated entry can re-enter the delay timer timeout processing flow after recovery to re-execute the pending action, thereby ensuring the success rate of the pending action's execution. It should also be noted that... Figure 3 After the illustrated process is completed, the pending action for the aggregation entry is set to an empty state, but the aggregation entry itself still exists, and the hash table of detailed external routes it maintains is not released. For example, if the pending action is deletion, the link-state advertisement is first revoked and the aggregation entry is removed, releasing the memory resources occupied by the aggregation entry. The step of setting the pending action to an empty state is then skipped. If the pending action is addition or modification, the aggregation entry still exists, and the hash table of the aggregation entry retains the associated detailed external routes. After the pending action is set to an empty state, it waits for the next trigger event. This embodiment does not impose specific limitations on this.

[0090] It should be noted that the above examples are only for understanding this application and do not constitute a limitation on the OSPF external route aggregation cancellation and activation method of this application. Any simple modifications based on this technical concept are within the protection scope of this application.

[0091] This application also provides a device for revoking and activating OSPF external route aggregation; please refer to [reference needed]. Figure 4The OSPF external route aggregation cancellation and activation device includes: The recording module 10 is used to record the action to be executed in the aggregated entry in response to the first triggering event, and to start or reset the delay timer; The merging module 20 is used to reset the delay timer when a second triggering event is received before the delay timer expires, and to merge the pending action of the second triggering event with the recorded pending action to record the pending action in the current aggregation entry; Monitoring module 30 is used to monitor the current number of detailed external routes matched by each of the aggregated entries and determine the changes in the number; Update module 40 is used to update the actions to be executed in the aggregated entries based on the changes. The execution module 50 is used to perform the corresponding link status announcement cancellation operation or activation operation according to the currently recorded pending action in each of the aggregate entries after the delay timer expires.

[0092] In one embodiment, the recording module 10 is further configured to create an aggregation entry and record the pending action of the aggregation entry as a new addition when the first triggering event is a new aggregation configuration.

[0093] In one embodiment, the recording module 10 is further configured to, when the first triggering event is a new detailed external route, associate the new detailed external route with the aggregation entry if there is an aggregation prefix in the aggregation entry that matches the new detailed external route; Increase the number of detailed external routes that match the aggregated entry, and record the pending actions of the aggregated entry as modifications.

[0094] In one embodiment, the execution module 50 is further configured to generate a link state advertisement for the aggregate entry if, when the action to be executed is modified, the advertisement permission status of the aggregate entry changes from prohibited to permitted, and the number of detailed external routes matching the aggregate entry is greater than zero.

[0095] In one embodiment, the execution module 50 is further configured to, when the currently recorded pending action in the aggregate entry is deletion, revoke the current link status announcement of the aggregate entry and remove the aggregate entry; For each detailed external route that belonged to the aggregation entry before removal, re-determine whether each detailed external route matches other aggregation entries, or whether a separate link-state advertisement needs to be generated.

[0096] In one embodiment, the execution module 50 is further configured to traverse the hash table of the aggregated entries to obtain each of the detailed external routes belonging to the aggregated entries before removal; If each of the detailed external routes matches other aggregation entries, then each detailed external route is associated with the matching aggregation entry; If the detailed external routes do not match other aggregation entries, a separate link-state advertisement is generated.

[0097] In one embodiment, the OSPF external route aggregation cancellation and activation device is further configured to, after the delay timer expires, traverse the aggregation entries in each aggregation entry for which the action to be executed is not empty; Perform the corresponding link status announcement cancellation or activation operation, and set the pending actions of the aggregated entry to an empty state.

[0098] The OSPF external route aggregation revocation and activation apparatus provided in this application, employing the OSPF external route aggregation revocation and activation method described in the above embodiments, can solve the technical problem of how to transform the management of aggregated LSAs from static configuration-driven to dynamic state-driven. Compared with the prior art, the beneficial effects of the OSPF external route aggregation revocation and activation apparatus provided in this application are the same as those of the OSPF external route aggregation revocation and activation method provided in the above embodiments, and other technical features in the OSPF external route aggregation revocation and activation apparatus are the same as those disclosed in the methods of the above embodiments, and will not be repeated here.

[0099] This application provides an OSPF external route aggregation revocation and activation device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the OSPF external route aggregation revocation and activation method in the above embodiment 1.

[0100] The following is for reference. Figure 5 This document illustrates a structural diagram of a suitable device for implementing OSPF external route aggregation revocation and activation in the embodiments of this application. The OSPF external route aggregation revocation and activation device in the embodiments of this application may include, but is not limited to, mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (Personal Digital Assistants), tablets, PMPs (Portable Media Players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and fixed terminals such as digital TVs and desktop computers. Figure 5The OSPF external route aggregation revocation and activation device shown is merely an example and should not impose any limitations on the functionality and scope of use of the embodiments of this application.

[0101] like Figure 5 As shown, the OSPF external route aggregation cancellation and activation device may include a processing unit 1001 (e.g., a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes according to a program stored in read-only memory (ROM) 1002 or a program loaded from storage device 1003 into random access memory (RAM) 1004. RAM 1004 also stores various programs and data required for the operation of the OSPF external route aggregation cancellation and activation device. The processing unit 1001, ROM 1002, and RAM 1004 are interconnected via bus 1005. Input / output (I / O) interface 1006 is also connected to the bus. Typically, the following systems can be connected to I / O interface 1006: input devices 1007 including, for example, touchscreens, touchpads, keyboards, mice, image sensors, microphones, accelerometers, gyroscopes, etc.; output devices 1008 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 1003 including, for example, magnetic tapes, hard disks, etc.; and communication devices 1009. Communication device 1009 allows the OSPF external route aggregation revocation and activation device to communicate wirelessly or wiredly with other devices to exchange data. Although OSPF external route aggregation revocation and activation devices with various systems are shown in the figure, it should be understood that it is not required to implement or have all of the systems shown. More or fewer systems may be implemented alternatively.

[0102] Specifically, according to the embodiments disclosed in this application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments disclosed in this application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device, or installed from storage device 1003, or installed from ROM 1002. When the computer program is executed by processing device 1001, it performs the functions defined in the methods of the embodiments disclosed in this application.

[0103] The OSPF external route aggregation revocation and activation device provided in this application, employing the OSPF external route aggregation revocation and activation method in the above embodiments, can solve the technical problem of how to transform the management of aggregated LSAs from static configuration-driven to dynamic state-driven. Compared with the prior art, the beneficial effects of the OSPF external route aggregation revocation and activation device provided in this application are the same as those of the OSPF external route aggregation revocation and activation method provided in the above embodiments, and other technical features in this OSPF external route aggregation revocation and activation device are the same as those disclosed in the previous embodiment method, and will not be repeated here.

[0104] It should be understood that the various parts disclosed in this application can be implemented using hardware, software, firmware, or a combination thereof. In the description of the above embodiments, specific features, structures, materials, or characteristics can be combined in any suitable manner in one or more embodiments or examples.

[0105] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

[0106] This application provides a computer-readable storage medium having computer-readable program instructions (i.e., a computer program) stored thereon, which are used to execute the OSPF external route aggregation revocation and activation method in the above embodiments.

[0107] The computer-readable storage medium provided in this application may be, for example, a USB flash drive, but is not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to: electrical connections having one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, system, or device. The program code contained on the computer-readable storage medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination thereof.

[0108] The aforementioned computer-readable storage medium may be included in the OSPF external route aggregation revocation and activation device; or it may exist independently and not be assembled into the OSPF external route aggregation revocation and activation device.

[0109] The aforementioned computer-readable storage medium carries one or more programs that, when executed by the OSPF external route aggregation revocation and activation device, cause the OSPF external route aggregation revocation and activation device to: respond to a first triggering event, record an action to be performed in the aggregation entry, and start or reset a delay timer; if a second triggering event is received before the delay timer expires, reset the delay timer, and merge the action to be performed in the second triggering event with the already recorded action to be performed to record the action to be performed in the current aggregation entry; monitor the current number of detailed external routes matched by each aggregation entry, and determine the change in the number; update the action to be performed in the aggregation entry based on the change; and after the delay timer expires, execute the corresponding link state advertisement revocation or activation operation according to the action to be performed currently recorded in each aggregation entry.

[0110] Computer program code for performing the operations of this application can be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, and C++, and conventional procedural programming languages ​​such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a Local Area Network (LAN) or a Wide Area Network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0111] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0112] The modules described in the embodiments of this application can be implemented in software or hardware. The names of the modules do not necessarily limit the functionality of the unit itself.

[0113] The readable storage medium provided in this application is a computer-readable storage medium that stores computer-readable program instructions (i.e., a computer program) for executing the above-described OSPF external route aggregation revocation and activation method. This solves the technical problem of how to transform the management of aggregated LSAs from static configuration-driven to dynamic state-driven. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in this application are the same as those of the OSPF external route aggregation revocation and activation method provided in the above embodiments, and will not be repeated here.

[0114] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the OSPF external route aggregation revocation and activation method as described above.

[0115] The computer program product provided in this application solves the technical problem of how to transform the management of aggregated LSAs from static configuration-driven to dynamic state-driven. Compared with the prior art, the beneficial effects of the computer program product provided in this application are the same as those of the OSPF external route aggregation cancellation and activation method provided in the above embodiments, and will not be repeated here.

[0116] The above description is only a part of the embodiments of this application and does not limit the patent scope of this application. All equivalent structural transformations made under the technical concept of this application and using the contents of the specification and drawings of this application, or direct / indirect applications in other related technical fields, are included in the patent protection scope of this application.

Claims

1. A method for revoking and activating OSPF external route aggregation, characterized in that, The method includes: In response to the first triggering event, the action to be performed is recorded in the aggregate entry, and the delay timer is started or reset; If a second triggering event is received before the delay timer expires, the delay timer is reset, and the pending action of the second triggering event is merged with the recorded pending action to record the pending action in the current aggregate entry; Monitor the current number of detailed external routes matched by each of the aforementioned aggregation entries, and determine how the number changes; Based on the changes, update the actions to be executed in the aggregated entries; After the delay timer expires, the corresponding link status announcement cancellation or activation operation is performed according to the pending action currently recorded in each of the aggregate entries.

2. The method as described in claim 1, characterized in that, In response to the first triggering event, the action to be executed is recorded in the aggregate entry, including: If the first triggering event is adding an aggregation configuration, create an aggregation entry and record the pending action of the aggregation entry as adding it.

3. The method as described in claim 1, characterized in that, In response to the first triggering event, the action to be executed is recorded in the aggregate entry, including: If the first triggering event is a new detailed external route, and if there is an aggregation prefix in the aggregation entry that matches the new detailed external route, then the new detailed external route is associated with the aggregation entry. Increase the number of detailed external routes that match the aggregated entry, and record the pending actions of the aggregated entry as modifications.

4. The method as described in claim 1, characterized in that, The step of executing the corresponding link status announcement cancellation or activation operation based on the currently recorded pending action in each of the aggregate entries includes: If the action to be performed is a modification, and the notification permission status of the aggregation entry changes from permitted to prohibited, then the current link state notification of the aggregation entry is revoked. If the action to be performed is modified, and the announcement permission status of the aggregation entry changes from prohibited to permitted, and the number of detailed external routes matching the aggregation entry is greater than zero, then a link state announcement for the aggregation entry is generated.

5. The method as described in claim 1, characterized in that, The step of executing the corresponding link status announcement cancellation or activation operation based on the currently recorded pending action in each of the aggregate entries includes: If the pending action currently recorded in the aggregate entry is deletion, then the current link status announcement for the aggregate entry is revoked and the aggregate entry is removed. For each detailed external route that belonged to the aggregation entry before removal, re-determine whether each detailed external route matches other aggregation entries, or whether a separate link-state advertisement needs to be generated.

6. The method as described in claim 5, characterized in that, The step of re-determining whether each detailed external route, which belonged to the aggregation entry before removal, matches other aggregation entries or whether a separate link-state advertisement needs to be generated includes: Traverse the hash table of the aggregated entries to obtain the detailed external routes that belonged to the aggregated entries before removal; If each of the detailed external routes matches other aggregation entries, then each detailed external route is associated with the matching aggregation entry; If the detailed external routes do not match other aggregation entries, a separate link-state advertisement is generated.

7. The method as described in claim 1, characterized in that, The method further includes: After the delay timer expires, iterate through the aggregate entries in each aggregate entry where the action to be executed is not empty; Perform the corresponding link status announcement cancellation or activation operation, and set the pending actions of the aggregated entry to an empty state.

8. An OSPF external route aggregation cancellation and activation device, characterized in that, The device includes: The recording module is used to record the action to be executed in the aggregated entry in response to the first triggering event, and to start or reset the delay timer; The merging module is used to reset the delay timer when a second triggering event is received before the delay timer expires, and to merge the pending action of the second triggering event with the recorded pending action to record the pending action in the current aggregate entry; The monitoring module is used to monitor the current number of detailed external routes matched by each of the aggregated entries and determine the changes in the number; The update module is used to update the actions to be executed in the aggregated entries based on the changes. The execution module is used to perform the corresponding link status announcement cancellation or activation operation according to the pending action currently recorded in each of the aggregate entries after the delay timer expires.

9. An OSPF external route aggregation cancellation and activation device, characterized in that, The device includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, the computer program being configured to implement the steps of the OSPF external route aggregation revocation and activation method as described in any one of claims 1 to 7.

10. A storage medium, characterized in that, The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, it implements the steps of the OSPF external route aggregation revocation and activation method as described in any one of claims 1 to 7.