Router Identification Conflict Detection Method, Device, Storage Medium and Electronic Device
The method addresses router identity conflicts in OSPF protocols by dynamically adjusting detection intervals and generating new identities, ensuring network stability and preventing oscillation.
Patent Information
- Application Number
- CN202111539829.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-15
- Publication Date
- 2025-07-15
- Estimated Expiration
- 2041-12-15
AI Technical Summary
In the OSPF routing protocol, router identification conflicts lead to problems such as network routing shock and equipment busyness.
The receiving end routing device receives link status notifications, determines whether the source router identifier is the same as the own identifier, and counts the number of conflicts based on the conflict detection interval and link status notification threshold. If the threshold exceeds the threshold, a new router identifier will be generated and the link status notification will be updated to establish a neighbor relationship.
Automatically detect and handle router identification conflicts, avoid network routing oscillations, and maintain network topology stability and neighbor relationships.
Smart Images

Figure CN116264561B_ABST
Abstract
Description
Background Art
[0002] The OSPF (Open Shortest Path First) routing protocol is a typical link-state routing protocol, generally used within the same routing domain; in the OSPF routing protocol, router identifiers are used to uniquely distinguish each router, and within the same routing domain, it is necessary to ensure that the router identifiers of each router must be different; when the router identifiers of non-adjacent routers are configured to be the same, if a routing device receives a link-state advertisement generated by another routing device with the same router identifier, it will mistake it for its own generated advertisement, resulting in continuous refreshing, and ultimately leading to network routing oscillation and device busyness.
[0003] It should be noted that the information disclosed in the above background art section is only used to enhance the understanding of the background of the present disclosure, and thus may include information that does not constitute the prior art known to those of ordinary skill in the art. Summary of the Invention
[0004] The present disclosure provides a method, apparatus, storage medium, and electronic device for detecting router identifier conflicts, which at least overcome to a certain extent the problem of network routing oscillation in the related art.
[0005] Other features and advantages of the present disclosure will become apparent through the following detailed description, or will be learned in part through the practice of the present disclosure.
[0006] According to one aspect of the present disclosure, there is provided a method for detecting router identifier conflicts, including:
[0007] A receiving-end routing device receives a link-state advertisement, and the link-state advertisement includes a source router identifier;
[0008] The receiving-end routing device determines that the source router identifier is the same as the router identifier of the receiving-end routing device;
[0009] The receiving-end routing device determines whether the interval time between receiving the link-state advertisement and the last link-state advertisement generated by the receiving-end routing device does not exceed a conflict detection interval, and the link advertisement time limit of the receiving-end routing device is less than a preset link-state advertisement survival time threshold;
[0010] If so, increase the conflict statistics count value; otherwise, clear the conflict statistics count value;
[0011] If the conflict statistics count value is greater than a conflict threshold, the receiving-end routing device determines that there is a router identifier conflict.
[0012] In an embodiment of the present disclosure, the method further includes:
[0013] Obtain the retransmission interval included in the link state advertisement;
[0014] Calculate the conflict detection interval according to the retransmission interval.
[0015] In an embodiment of the present disclosure, after the receiving end routing device determines that there is a router identifier conflict if the conflict statistics count value is greater than the conflict threshold, the method further includes:
[0016] The receiving end routing device generates a new router identifier different from the original router identifier;
[0017] The receiving end routing device generates a new link state advertisement based on the new router identifier and establishes a neighbor relationship with other routers;
[0018] Clear the conflict statistics count value.
[0019] In an embodiment of the present disclosure, the method further includes:
[0020] Obtain a conflict detection interval threshold;
[0021] If the conflict detection interval is less than or equal to the conflict detection interval threshold, update the conflict detection interval to the conflict detection interval threshold.
[0022] In an embodiment of the present disclosure, the calculating the conflict detection interval according to the retransmission interval includes:
[0023] Obtain network status information and set adjustment parameters according to the network status information;
[0024] Determine the ratio of the retransmission interval to the adjustment parameter as the conflict detection interval.
[0025] In an embodiment of the present disclosure, the network status information includes: network topology structure, network transmission rate.
[0026] According to another aspect of the present disclosure, there is also provided a router identifier conflict detection device, including:
[0027] A link state advertisement receiving module, which receives a link state advertisement, and the link state advertisement includes a source router identifier;
[0028] A router identifier determination module, which is used to determine that the source router identifier is the same as the router identifier of the receiving end routing device;
[0029] A router identifier judgment module, configured to judge whether the interval time between receiving the link state advertisement and the link state advertisement generated by the receiving-end routing device last time does not exceed the conflict detection interval, and the link advertisement time limit of the receiving-end routing device is less than a preset link state advertisement survival time threshold;
[0030] If so, increase the conflict statistics count value; otherwise, clear the conflict statistics count value;
[0031] If the conflict statistics count value is greater than the conflict threshold, the receiving-end routing device determines that there is a router identifier conflict.
[0032] In an embodiment of the present disclosure, a router identifier conflict detection device includes:
[0033] A router identifier generation module, configured to generate a new router identifier different from the original router identifier;
[0034] A router rebuilding neighbor module, based on the new router identifier, generates a new link state advertisement and establishes neighbor relationships with other routers.
[0035] According to another aspect of the present disclosure, there is also provided an electronic device, including: a processor; and a memory, configured to store executable instructions of the processor; wherein, the processor is configured to execute the router identifier conflict detection method described in any one of the above via executing the executable instructions.
[0036] According to another aspect of the present disclosure, there is also provided a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the router identifier conflict detection method described in any one of the above is implemented.
[0037] The present disclosure provides a router identifier conflict detection method, device, storage medium and electronic device, including: a receiving-end routing device receives a link state advertisement, and the link state advertisement includes a source router identifier; the receiving-end routing device determines that the source router identifier is the same as the router identifier of the receiving-end routing device; the receiving-end routing device judges whether the interval time between receiving the link state advertisement and the link state advertisement generated by the receiving-end routing device last time does not exceed the conflict detection interval, and the link advertisement time limit of the receiving-end routing device is less than a preset link state advertisement survival time threshold; if so, increase the conflict statistics count value; if the conflict statistics count value is greater than the conflict threshold, the receiving-end routing device determines that there is a router identifier conflict. Embodiments of the present disclosure can automatically detect router identifier conflicts.
[0038] Further, after the receiving - end routing device determines that there is a router identifier conflict, the receiving - end routing device generates a new router identifier different from the original router identifier; the receiving - end routing device generates a new link - state advertisement based on the new router identifier and establishes neighbor relationships with other routers, and can automatically handle router identifier conflicts.
[0039] It should be understood that the above general description and the following detailed description are only exemplary and explanatory, and cannot limit the present disclosure. Brief Description of the Drawings
[0040] The accompanying drawings herein are incorporated into the specification and constitute a part of this specification, showing embodiments consistent with the present disclosure, and are used together with the specification to explain the principles of the present disclosure. Obviously, the drawings in the following description are only some embodiments of the present disclosure, and those of ordinary skill in the art can obtain other drawings based on these drawings without creative efforts.
[0041] Figure 1 Showing a flowchart of a method for detecting router identifier conflicts in an embodiment of the present disclosure;
[0042] Figure 2 Showing a flowchart of a method for automatically handling router identifier conflicts in an embodiment of the present disclosure;
[0043] Figure 3 Showing a flowchart of a method for calculating a conflict detection interval according to a re - transmission interval in an embodiment of the present disclosure;
[0044] Figure 4 Showing a flowchart of a method for calculating a conflict detection interval in an embodiment of the present disclosure;
[0045] Figure 5 Showing a flowchart of a method for updating a conflict detection interval in an embodiment of the present disclosure;
[0046] Figure 6 Showing a schematic diagram of a device for detecting router identifier conflicts in an embodiment of the present disclosure;
[0047] Figure 7 Showing a flowchart of another method for detecting router identifier conflicts in an embodiment of the present disclosure;
[0048] Figure 8 Showing a schematic diagram of a system for detecting router identifier conflicts in an embodiment of the present disclosure; and
[0049] Figure 9 Showing a block diagram of the structure of an electronic device in an embodiment of the present disclosure. Detailed Embodiments
[0050] Example embodiments will now be described more fully with reference to the accompanying drawings. However, the example embodiments can be implemented in various forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the concept of the example embodiments to those skilled in the art. The features, structures, or characteristics described may be combined in any suitable manner in one or more embodiments.
[0051] In addition, the accompanying drawings are only schematic illustrations of the present disclosure and are not necessarily drawn to scale. The same reference numerals in the drawings denote the same or similar parts, and thus repeated descriptions thereof will be omitted. Some of the block diagrams shown in the drawings are functional entities and do not necessarily correspond to physically or logically independent entities. These functional entities may be implemented in software form, or in one or more hardware modules or integrated circuits, or in different networks and / or processor devices and / or microcontroller devices.
[0052] For ease of understanding, several terms related to the present disclosure are first explained as follows:
[0053] The OSPF routing protocol is a typical link-state routing protocol that multicasts link-state data LSAs (Link State Advertisements) to all routers within a certain area; the OSPF routing protocol is generally used within the same routing domain; here, the routing domain refers to an AS (Autonomous System), which is a group of networks that exchange routing information with each other through a unified routing policy or routing protocol; within this AS, each router running OSPF collects its own link-state information and broadcasts its link state throughout the area through the Flooding algorithm, so as to maintain a synchronized link-state database within the entire area; based on this database, each router calculates a shortest path tree with itself as the root and other network nodes as the leaves, thereby calculating the shortest paths from itself to each node within the area, and using these shortest paths to construct a routing table.
[0054] Link-State Advertisement (LSA), each router generates a router link-state advertisement; this most basic link-state advertisement lists all the links or interfaces of the router, indicates their status and the outbound cost along each link direction, as well as all known OSPF neighbors on that link; these link-state advertisements will only be flooded within the area where they originate; all router link-state advertisements listed in the database can be viewed through relevant commands.
[0055] Link state retransmission interval. The router will confirm each newly received link state notification, and the link state advertisement will be retransmitted until the router confirms it. The link state retransmission interval defines the time interval between two retransmissions. The retransmission interval can be set using a command. Generally, the time interval for adjacent routers to retransmit link state notifications is 5 seconds.
[0056] The following will describe this exemplary embodiment in detail with reference to the accompanying drawings and embodiments.
[0057] An embodiment of the present disclosure provides a method for detecting router identifier conflicts, which can be executed by any electronic device with computing and processing capabilities.
[0058] Figure 1 The flowchart of a method for detecting router identifier conflicts in an embodiment of the present disclosure is shown. As Figure 1 shown, the method for detecting router identifier conflicts provided in the embodiment of the present disclosure includes the following steps:
[0059] S102, The receiving-end routing device receives a link state advertisement, which includes the source router identifier.
[0060] It should be noted that the protocol applied by the routing device can be, but is not limited to, the OSPF routing protocol. Taking a routing device running the OSPF routing protocol as an example, a routing device running the OSPF routing protocol needs to have a router identifier to communicate with other routing devices running the OSPF routing protocol. The router identifier is actually an IP (Internet Protocol) address. The router identifier can be configured manually or elected autonomously. Autonomous election includes: if a routing device has a loopback interface, the largest IP address of the loopback interface is selected as the router identifier; if the routing device does not have a loopback interface, the largest IP address of the physical port is selected as the router identifier.
[0061] It should be noted that each routing device will generate a link state advertisement (LSA). The link state advertisement lists all the links or interfaces of the routing device, indicates their status and the outbound cost along each link direction, and all the known OSPF neighbors on that link. The receiving-end routing device receives the link state advertisement, which includes the source router identifier. The source router identifier refers to the router identifier of the source routing device, and the source router identifier is sent to the receiving-end routing device through the link state advertisement.
[0062] In one embodiment, multiple receiving-end routing devices can receive link state advertisements in parallel. In the embodiment of the present disclosure, a receiving-end routing device is taken as an example for introduction.
[0063] S104, the receiving-end routing device determines that the source router identifier is the same as the router identifier of the receiving-end routing device.
[0064] It should be noted that the receiving-end routing device receives link state advertisements sent by other routing devices that communicate with it. If the router identifier included in the link state advertisement sent by other routing devices is the same as the router identifier of the receiving-end routing device, the receiving-end routing device will mistakenly think that it is the link state advertisement generated by itself, resulting in continuous refreshing, and ultimately leading to network routing device oscillation; if the router identifier included in the link state advertisement sent by other routing devices is different from the router identifier of the receiving-end routing device, the receiving-end routing device and other routing devices will communicate normally.
[0065] In one embodiment, the device for determining that the source router identifier is the same as the router identifier of the receiving-end routing device includes, but is not limited to, the receiving-end routing device.
[0066] S106, the receiving-end routing device determines whether the interval time between the received link state advertisement and the link state advertisement generated by the receiving-end routing device last time does not exceed the conflict detection interval, and the link advertisement time limit of the receiving-end routing device is less than the preset link state advertisement survival time threshold.
[0067] It should be noted that the conflict detection interval is the time interval for detecting router identifier conflicts, and it is necessary to consider network topology complexity, congestion degree, transmission rate, etc., and dynamically adjust the conflict detection interval; if the conflict detection interval is too short, detecting router identifier conflicts in too short a time will cause resource waste; if the conflict detection interval is too long, router identifier conflicts may not be detected in time. Before detecting router identifier conflicts, the receiving-end routing device will mistakenly think that it is the link state advertisement generated by itself, resulting in continuous refreshing, and ultimately leading to network routing device oscillation.
[0068] It should be noted that the link advertisement time limit refers to the time that the link state advertisement has survived; the link state advertisement survival time threshold refers to the time threshold set according to the network state, which can be set to 200S; the link advertisement time limit of the receiving-end routing device is less than the preset link state advertisement survival time threshold, which can prevent the receiving-end routing device from receiving old link state advertisements repeatedly and improve the efficiency of conflict detection.
[0069] In one embodiment, the receiving-end routing device obtains the time of the link state advertisement generated by itself last time, and obtains the time when the receiving-end routing device receives a link state advertisement with the same router identifier as its own; calculates the interval time between the time of the link state advertisement generated by the receiving-end routing device itself last time and the time when it receives a link state advertisement with the same router identifier as its own.
[0070] S108, If so, increment the conflict count value; otherwise, clear the conflict count value.
[0071] It should be noted that the count includes but is not limited to a mathematical behavior of repeated incrementing by one. The count value is the specific accumulated value. The conflict count value is the specific value calculated when the link advertisement time limit of the receiving-end routing device is less than the preset link state advertisement survival time threshold, and the interval time between the received link state advertisement and the link state advertisement generated by the receiving-end routing device last time does not exceed the conflict detection interval; if the link advertisement time limit of the receiving-end routing device is less than the preset link state advertisement survival time threshold, and the interval time between the received link state advertisement and the link state advertisement generated by the receiving-end routing device last time does not exceed the conflict detection interval, increment the conflict count value; if the link advertisement time limit of the receiving-end routing device is not less than the preset link state advertisement survival time threshold, or the interval time between the received link state advertisement and the link state advertisement generated by the receiving-end routing device last time exceeds the conflict detection interval and increment the conflict count value by one, then clear the conflict count value.
[0072] S110, If the conflict count value is greater than the conflict threshold, the receiving-end routing device determines that there is a router identifier conflict.
[0073] It should be noted that the conflict threshold can be set manually or set according to the complexity of the network topology, transmission rate, historical information, etc.; if the conflict count value is greater than the conflict threshold, the receiving-end routing device determines that there is a router identifier conflict.
[0074] In the above embodiment, the receiving-end routing device receives a link state advertisement, and the link state advertisement includes the source router identifier; the receiving-end routing device obtains the link state advertisement with the source router identifier the same as its own router identifier of the receiving-end routing device, and dynamically adjusts the conflict detection interval according to the network topology complexity and congestion degree; if the interval time between the received link state advertisement and the link state advertisement generated by the receiving-end routing device last time does not exceed the conflict detection interval and the link advertisement time limit of the receiving-end routing device is less than the preset link state advertisement survival time threshold, then increment the conflict count value. When the conflict count value is greater than the conflict threshold, the receiving-end routing device determines that there is a router identifier conflict, avoiding occasional errors and improving the accuracy of conflict detection.
[0075] In an embodiment of the present disclosure, Figure 2 shows a flowchart of a method for automatically processing router identifier conflicts in an embodiment of the present disclosure, as Figure 2 shown. After if the conflict count value is greater than the conflict threshold, the receiving-end routing device determines that there is a router identifier conflict, the following steps are included:
[0076] S202, The receiving - end routing device generates a new router identifier that is different from the original router identifier.
[0077] In one embodiment, if it is determined that there is a router identifier conflict in the receiving - end routing device, the receiving - end routing device generates a random router identifier that is different from the original router identifier.
[0078] S204, The receiving - end routing device generates a new link - state advertisement based on the new router identifier and establishes a neighbor relationship with other routers;
[0079] S206, Clear the conflict statistics count value.
[0080] In the above - mentioned embodiment, the receiving - end routing device generates a new router identifier, generates a new link - state advertisement based on the new router identifier, and establishes a neighbor relationship with other routers, which can automatically handle router identifier conflicts, without the need for manual modification of the router identifier, and maintains the stability of the neighbor relationship in the network topology.
[0081] In an embodiment of the present disclosure, Figure 3 shows a flowchart of a method for calculating a conflict detection interval according to a re - transmission interval in an embodiment of the present disclosure, as Figure 3 shown, including the following steps:
[0082] S302, Obtain the re - transmission interval included in the link - state advertisement.
[0083] It should be noted that the router will confirm each newly received link - state notification, and the link - state advertisement will be re - transmitted until the router confirms it; the link - state re - transmission interval defines the time interval between two re - transmissions, and the re - transmission interval can be set using a command. Generally, the time interval value for adjacent routers to re - transmit link - state notifications is 5 seconds.
[0084] S304, Calculate the conflict detection interval according to the re - transmission interval.
[0085] In an embodiment of the present disclosure, Figure 4 shows a flowchart of a method for calculating a conflict detection interval in an embodiment of the present disclosure, as Figure 4 shown, S304, calculating the conflict detection interval according to the re - transmission interval, includes the following steps:
[0086] S402, Obtain network status information and set adjustment parameters according to the network status information.
[0087] It should be noted that the network status information may be, but is not limited to, parameter data such as network topology, network transmission rate, channel quality, and transmission duration. The adjustment parameter can be set according to one parameter data, or can be evaluated and set according to the sum of multiple parameter data; the adjustment parameter can be set manually, or the parameter data can be obtained to automatically set the adjustment parameter.
[0088] S404. Determine the conflict detection interval as the ratio of the retransmission interval to the adjustment parameter.
[0089] In the above embodiment, according to the network status information, the conflict detection interval is dynamically adjusted to avoid accidental errors and improve the speed and accuracy of conflict detection.
[0090] In an embodiment of the present disclosure, Figure 5 The flowchart of a method for updating the conflict detection interval in an embodiment of the present disclosure is shown. As Figure 5 shown, it includes the following steps:
[0091] S502. Obtain the conflict detection interval threshold.
[0092] It should be noted that the conflict detection interval threshold is the minimum value of the conflict detection interval; if the conflict detection interval determined by the ratio of the retransmission interval to the adjustment parameter is too large, it may lead to the inability to perform conflict detection in a timely manner; the conflict detection interval threshold can be manually set or set manually according to information such as historical conflict detection interval time-related data.
[0093] S504. If the conflict detection interval is less than or equal to the conflict detection interval threshold, update the conflict detection interval to the conflict detection interval threshold.
[0094] In one embodiment, after the conflict detection interval is determined as the ratio of the retransmission interval to the adjustment parameter, obtain the conflict detection interval threshold, and determine whether to update the conflict detection interval to the conflict detection interval threshold according to the conflict detection interval and the conflict detection threshold.
[0095] In another embodiment, the conflict detection interval threshold can be manually set or set manually, and the conflict detection interval threshold can be obtained in real time or in real time; compare the conflict detection interval threshold with the conflict detection interval to determine whether to update the conflict detection interval threshold.
[0096] It should be noted that if the conflict detection interval threshold is less than or equal to the conflict detection interval, the conflict detection interval remains unchanged.
[0097] In the above embodiment, when the conflict detection interval is less than or equal to the conflict detection interval threshold, the conflict detection interval is updated to the conflict detection interval threshold, ensuring that conflict detection can be performed in a timely manner and improving the accuracy of conflict detection.
[0098] Based on the same inventive concept, an embodiment of the present disclosure further provides a router identifier conflict detection device, as described in the following embodiments. Since the principle of problem-solving of this device embodiment is similar to the above Figure 1 shown router identifier conflict detection method, the implementation of this device embodiment can refer to the implementation of the above method embodiment, and the repeated parts will not be elaborated.
[0099] Figure 6 shows a schematic diagram of a router identifier conflict detection device in an embodiment of the present disclosure, as Figure 6 shown, the router identifier conflict detection device 6 includes:
[0100] A link state advertisement receiving module 601, which receives link state advertisements, and the link state advertisements include source router identifiers;
[0101] A router identifier determination module 602, which is used to determine that the source router identifier is the same as the router identifier of the receiving-end routing device;
[0102] A router identifier judgment module 603, which is used to judge whether the interval time between the received link state advertisement and the link state advertisement generated by the receiving-end routing device last time does not exceed the conflict detection interval, and the link advertisement time limit of the receiving-end routing device is less than the preset link state advertisement survival time threshold; if so, increase the conflict statistics value, otherwise, clear the conflict statistics value; if the conflict statistics value is greater than the conflict threshold, the receiving-end routing device determines that there is a router identifier conflict.
[0103] A router identifier generation module 604, which is used to generate a new router identifier different from the original router identifier;
[0104] A router re-establishing neighbor module 605, which generates a new link state advertisement based on the new router identifier and establishes neighbor relationships with other routers.
[0105] Figure 7 shows a flowchart of another router identifier conflict detection method in an embodiment of the present disclosure, as Figure 7 shown, and it can be implemented through the following steps:
[0106] S702, the receiving-end routing device receives a link state advertisement containing a source router identifier;
[0107] S704, compare whether the source router identifier included in the link state advertisement is consistent with the router identifier of the receiving-end routing device;
[0108] S706, if they are consistent, calculate the conflict detection interval according to the retransmission interval included in the link state advertisement;
[0109] S708, determine whether the interval between the received link state advertisement and the link state advertisement previously generated by the receiving-end routing device itself does not exceed the conflict detection interval;
[0110] S710, if so, determine whether its own link advertisement time limit is less than the preset link state advertisement survival time threshold;
[0111] S712, if so, increase the conflict statistics count value; otherwise, clear the conflict statistics count value;
[0112] S714, determine whether the conflict statistics count value is greater than the preset conflict detection interval threshold;
[0113] S716, if the conflict statistics count value is greater than the preset conflict detection interval threshold, the receiving-end routing device determines that there is a router identifier conflict; otherwise, the receiving-end routing device cannot determine that there is a router identifier conflict;
[0114] S718, the receiving-end routing device generates a random router identifier different from the original router identifier;
[0115] S720, the receiving-end routing device generates a new link state advertisement based on the new router identifier and establishes a neighbor relationship with other routers;
[0116] S722, clear the conflict statistics count value.
[0117] It should be noted that if the source router identifier included in the link state advertisement is inconsistent with the router identifier of the receiving-end routing device, the receiving-end routing device cannot determine that there is a router identifier conflict; if the source router identifier included in the link state advertisement is consistent with the router identifier of the receiving-end routing device, obtain the retransmission interval included in the link state advertisement; set adjustment parameters according to the complexity and congestion of the network topology; the conflict detection interval is the ratio of the retransmission interval to the adjustment parameter; if the conflict detection interval is less than the preset conflict detection interval threshold, the conflict detection interval is updated to the conflict detection interval threshold; if the conflict detection interval is not less than the preset conflict detection interval threshold, clear the conflict statistics count value, and the receiving-end routing device cannot determine that there is a router identifier conflict; if the conflict detection interval is less than the preset conflict detection interval threshold and its own link advertisement time limit is less than the preset link state advertisement survival time threshold, increase the conflict statistics count value; if the conflict detection interval is not less than the preset conflict detection interval threshold or its own link advertisement time limit is less than the preset link state advertisement survival time threshold, clear the conflict statistics count value, and the receiving-end routing device cannot determine that there is a router identifier conflict.
[0118] Through the above embodiments, the router identifier can be obtained by receiving link state advertisements. According to the complexity and congestion degree of the network topology, the conflict detection interval can be dynamically adjusted, and the conflict detection interval threshold can be set to avoid occasional errors and improve the accuracy of conflict detection. Moreover, the receiving-end routing device that determines that there is a router identifier conflict generates a random router identifier different from the original router identifier and establishes neighbor relationships with other routers, which can automatically handle router identifier conflicts without the need for manual modification of the router identifier, maintaining the stability of neighbor relationships in the network topology.
[0119] Based on the same inventive concept, an embodiment of the present disclosure also provides a router identifier conflict detection system as described in the following embodiments. Since the principle of solving problems in this system embodiment is similar to the Figure 7 router identifier conflict detection method shown above, the implementation of this system embodiment can refer to the implementation of the above method embodiment, and the repeated parts will not be elaborated.
[0120] Figure 8 A schematic diagram of a router identifier conflict detection system in an embodiment of the present disclosure is shown. As Figure 8 shown, the router identifier conflict detection system includes the following modules:
[0121] An interface module 801, configured to receive and send link state advertisements and obtain the retransmission interval of the link state advertisements;
[0122] A detection interval processing module 802, which sets adjustment parameters according to the retransmission interval of the obtained link state advertisements, the complexity of the network topology, and the congestion situation, calculates the conflict detection interval, compares whether the calculated conflict detection interval is less than a preset conflict detection interval threshold. If it is less, the conflict detection interval is set to the conflict detection interval threshold, and the conflict detection interval is automatically calculated by the detection interval processing module 802.
[0123] A conflict detection module 803, which determines that the interface link state advertisement containing the router identifier obtained from the interface module 801 is the same as the router identifier of the receiving-end device itself, and the interval time between the link state advertisement received this time and the link state advertisement generated by itself last time does not exceed the conflict detection interval, and at the same time, its own link advertisement time limit is less than a preset link state advertisement survival time threshold, then the conflict statistics value is incremented; otherwise, the conflict statistics value is cleared. If the conflict statistics value is greater than the conflict threshold, it is determined that the receiving-end routing device has a router identifier conflict.
[0124] The conflict handling module 804 causes the receiving end routing device that confirms the existence of a router identifier conflict to randomly generate a new router identifier different from the original router identifier, and clears the conflict statistics count value; the receiving end routing device regenerates a link state advertisement based on the new router identifier and re - establishes neighbor relationships with other routing devices.
[0125] Those skilled in the art of the present disclosure can understand that various aspects of the present disclosure can be implemented as a system, a method, or a program product. Therefore, various aspects of the present disclosure can be specifically implemented in the following forms: a complete hardware implementation, a complete software implementation (including firmware, microcode, etc.), or an implementation combining hardware and software aspects, which can be collectively referred to as "circuitry", "module", or "system" here.
[0126] The following refers to Figure 9 to describe the electronic device 900 according to this embodiment of the present disclosure. Figure 9 The illustrated electronic device 900 is merely an example and should not impose any limitation on the functions and usage scope of the embodiments of the present disclosure.
[0127] As Figure 9 shown, the electronic device 900 is presented in the form of a general - purpose computing device. The components of the electronic device 900 may include, but are not limited to: at least one of the above - mentioned processing units 910, at least one of the above - mentioned storage units 920, and a bus 930 connecting different system components (including the storage unit 920 and the processing unit 910).
[0128] Among them, the storage unit stores program code, and the program code can be executed by the processing unit 910, so that the processing unit 910 executes the steps according to various exemplary embodiments of the present disclosure described in the above - mentioned "Exemplary Method" section of this specification. For example, the processing unit 910 may execute the following steps of the above - mentioned method embodiment: the receiving end routing device receives a link state advertisement, and the link state advertisement includes a source router identifier; the receiving end routing device determines that the source router identifier is the same as the router identifier of the receiving end routing device; the receiving end routing device determines whether the interval time between receiving the link state advertisement and the link state advertisement generated by the receiving end routing device last time does not exceed the conflict detection interval, and the link advertisement time limit of the receiving end routing device is less than a preset link state advertisement survival time threshold; if so, increase the conflict statistics count value, otherwise, clear the conflict statistics count value; if the conflict statistics count value is greater than the conflict threshold, the receiving end routing device determines that there is a router identifier conflict.
[0129] The processing unit 910 may further execute the following steps of the above method embodiments: The receiving - end routing device receives a link - state advertisement containing the source router identifier; compares whether the source router identifier included in the link - state advertisement is the same as the router identifier of the receiving - end routing device; if they are the same, calculates the conflict detection interval according to the re - transmission interval included in the link - state advertisement; determines whether the interval between the received link - state advertisement and the link - state advertisement generated by the receiving - end routing device itself last time does not exceed the conflict detection interval, and the link advertisement time limit of itself is less than the preset link - state advertisement survival time threshold; if so, increases the conflict statistics value; otherwise, clears the conflict statistics value; when the conflict statistics value is greater than the preset conflict detection interval threshold, the receiving - end routing device determines that there is a router identifier conflict; the receiving - end routing device generates a random router identifier different from the original router identifier; the receiving - end routing device generates a new link - state advertisement based on the new router identifier and establishes a neighbor relationship with other routers; clears the conflict statistics value.
[0130] The storage unit 920 may include a readable medium in the form of a volatile storage unit, such as a random access storage unit (RAM) 9201 and / or a cache storage unit 9202, and may further include a read - only storage unit (ROM) 9203.
[0131] The storage unit 920 may further include a program / utility 9204 having a set (at least one) of program modules 9205. Such program modules 9205 include, but are not limited to: an operating system, one or more application programs, other program modules, and program data. Each or some combination of these examples may include the implementation of a network environment.
[0132] The bus 930 may represent one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of the multiple bus structures.
[0133] The electronic device 900 can also communicate with one or more external devices 940 (such as a keyboard, a pointing device, a Bluetooth device, etc.), and can also communicate with one or more devices that enable a user to interact with the electronic device 900, and / or communicate with any device (such as a router, a modem, etc.) that enables the electronic device 900 to communicate with one or more other computing devices. Such communication can be carried out through the input / output (I / O) interface 950. Moreover, the electronic device 900 can also communicate with one or more networks (such as a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) through the network adapter 960. As shown in the figure, the network adapter 960 communicates with other modules of the electronic device 900 through the bus 930. It should be understood that, although not shown in the figure, other hardware and / or software modules can be used in combination with the electronic device 900, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, etc.
[0134] Through the description of the above embodiments, those skilled in the art can easily understand that the exemplary embodiments described herein can be implemented by software, or can be implemented by the way of software combined with necessary hardware. Therefore, the technical solutions according to the embodiments of the present disclosure can be embodied in the form of a software product, and the software product can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, including several instructions to enable a computing device (which can be a personal computer, a server, a terminal device, or a network device, etc.) to execute the method according to the embodiments of the present disclosure.
[0135] In an exemplary embodiment of the present disclosure, there is also provided a computer-readable storage medium, and the computer-readable storage medium can be a readable signal medium or a readable storage medium. A program product capable of implementing the above method of the present disclosure is stored thereon. In some possible implementation manners, various aspects of the present disclosure can also be implemented in the form of a program product, which includes program code. When the program product runs on a terminal device, the program code is used to enable the terminal device to execute the steps according to various exemplary embodiments described in the "exemplary method" section of this specification.
[0136] More specific examples of the computer-readable storage medium in the present disclosure can include but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.
[0137] In the present disclosure, a computer-readable storage medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries readable program code. Such a propagated data signal may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the foregoing. The readable signal medium may also be any readable medium other than the readable storage medium, which can send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.
[0138] Optionally, the program code contained on the computer-readable storage medium may be transmitted using any appropriate medium, including but not limited to wireless, wired, optical fiber, RF, etc., or any suitable combination of the foregoing.
[0139] In a specific implementation, the program code for performing the operations of the present disclosure may be written in any combination of one or more programming languages. The programming languages include object-oriented programming languages such as Java, C++, etc., and also include conventional procedural programming languages such as the "C" language or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, executed as a stand-alone software package, partially on the user computing device and partially on a remote computing device, or entirely on the remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., by connecting through the Internet using an Internet service provider).
[0140] It should be noted that although several modules or units of a device for action execution are mentioned in the above detailed description, such a division is not mandatory. In fact, according to the embodiments of the present disclosure, the features and functions of two or more of the above-described modules or units may be embodied in one module or unit. Conversely, the features and functions of one module or unit described above may be further divided and embodied by multiple modules or units.
[0141] In addition, although the steps of the methods in the present disclosure are described in a specific order in the drawings, this does not require or imply that these steps must be performed in that specific order, or that all the steps shown must be performed to achieve the desired result. Additionally or alternatively, some steps may be omitted, multiple steps may be combined into one step for execution, and / or one step may be decomposed into multiple steps for execution, etc.
[0142] From the description of the above embodiments, it is easy for those skilled in the art to understand that the exemplary embodiments described herein can be implemented by software or by a combination of software and necessary hardware. Therefore, the technical solutions according to the embodiments of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (such as a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, and includes several instructions to enable a computing device (such as a personal computer, a server, a mobile terminal, or a network device, etc.) to execute the method according to the embodiments of the present disclosure.
[0143] After considering the specification and practicing the invention disclosed herein, those skilled in the art will readily conceive of other embodiments of the present disclosure. The present disclosure is intended to cover any variations, uses, or adaptations of the present disclosure, which follow the general principles of the present disclosure and include well-known common general knowledge or conventional technical means in the technical field not disclosed by the present disclosure. The specification and examples are only regarded as exemplary, and the true scope and spirit of the present disclosure are pointed out by the appended claims.
Claims
1. A router identifier conflict detection method, characterized in that, including: The receiving - end routing device receives a link - state advertisement, which includes a source router identifier; The receiving - end routing device determines that the source router identifier is the same as the router identifier of the receiving - end routing device; The receiving - end routing device determines whether the interval between receiving the link - state advertisement and the last link - state advertisement generated by the receiving - end routing device does not exceed the conflict - detection interval, and whether the link - advertisement time limit of the receiving - end routing device is less than a preset link - state advertisement survival - time threshold; If so, increase the conflict - statistics count value; otherwise, clear the conflict - statistics count value; If the conflict - statistics count value is greater than the conflict threshold, the receiving - end routing device determines that there is a router - identifier conflict; The method further includes: Obtaining the retransmission interval included in the link - state advertisement; Calculating the conflict - detection interval according to the retransmission interval.
2. The router identifier conflict detection method according to claim 1, wherein After the step that if the conflict - statistics count value is greater than the conflict threshold, the receiving - end routing device determines that there is a router - identifier conflict, the method further includes: The receiving - end routing device generates a new router identifier different from the original router identifier; The receiving - end routing device generates a new link - state advertisement based on the new router identifier and establishes a neighbor relationship with other routers; Clear the conflict - statistics count value.
3. The router identifier conflict detection method according to claim 1, wherein The calculating the conflict - detection interval according to the retransmission interval includes: Obtaining network - state information and setting adjustment parameters according to the network - state information; Determining the ratio of the retransmission interval to the adjustment parameter as the conflict - detection interval.
4. The router identifier conflict detection method according to claim 1, wherein The method further includes: Obtaining a conflict - detection interval threshold; If the conflict - detection interval is less than or equal to the conflict - detection interval threshold, update the conflict - detection interval to the conflict - detection interval threshold.
5. The router identification conflict detection method according to claim 3, wherein The network - state information includes: network topology structure, network transmission rate.
6. A router identifier conflict detection device, characterized in that, including: A link - state advertisement receiving module, which receives a link - state advertisement that includes a source router identifier; A router - identifier determining module, which is used to determine that the source router identifier is the same as the router identifier of the receiving - end routing device; A router - identifier judging module, which is used to judge whether the interval between receiving the link - state advertisement and the last link - state advertisement generated by the receiving - end routing device does not exceed the conflict - detection interval, and whether the link - advertisement time limit of the receiving - end routing device is less than a preset link - state advertisement survival - time threshold; If so, increase the conflict - statistics count value; otherwise, clear the conflict - statistics count value; If the conflict - statistics count value is greater than the conflict threshold, the receiving - end routing device determines that there is a router - identifier conflict; An interface module, which is used to obtain the retransmission interval included in the link - state advertisement; A detection - interval processing module, which is used to calculate the conflict - detection interval according to the retransmission interval.
7. The router identifier conflict detection device according to claim 6, characterized in that, including: A router - identifier generating module, which is used to generate a new router identifier different from the original router identifier; A router - rebuilding neighbor module, which generates a new link - state advertisement based on the new router identifier and establishes a neighbor relationship with other routers.
8. An electronic device, characterized in that, including: A processor; and A memory, which is used to store the executable instructions of the processor; Among them, the processor is configured to execute the router identifier conflict detection method according to any one of claims 1 to 5 by executing the executable instructions.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the router identifier conflict detection method according to any one of claims 1 to 5.
Citation Information
Patent Citations
Router ID collision detection method and device
CN107181832A