Abnormal routing processing method, device and readable storage medium
By generating high-priority target route prefixes to handle abnormal routes, the network security issues caused by BGP hijacking are resolved, enabling secure data forwarding and reducing fault duration.
Patent Information
- Application Number
- CN202311560270.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-21
- Publication Date
- 2026-11-24
- Estimated Expiration
- 2043-11-21
AI Technical Summary
In existing technologies, Border Gateway Protocol (BGP) hijacking leads to poor security in communication networks, with routers still forwarding target data to unauthorized terminals and failing to detect and handle abnormal routes in a timely manner.
By determining whether the route to be analyzed is an abnormal route, a target route prefix is generated with higher priority than the route prefix of the route to be analyzed. The target route prefix is then sent to the routing device to forward the target data, ensuring that the data is forwarded to the normal node.
It improves the security of communication networks, prevents abnormal routes from forwarding data to unauthorized terminals, shortens network failure time, and reduces the impact of routing anomalies.
Smart Images

Figure CN117439947B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of communication technology, and in particular to an abnormal routing processing method, apparatus and readable storage medium. Background Technology
[0002] Border Gateway Protocol (BGP) hijacking refers to the act of an unauthorized terminal deceiving Internet routing protocols to redirect target data destined for a target terminal to an unauthorized terminal or other non-target terminal, thereby causing network anomalies and other problems for the target terminal.
[0003] In related technologies, when a router is hijacked, as long as the router's routing table is normal, the router will still forward the target data to the unauthorized terminal, resulting in poor security of the communication network. Summary of the Invention
[0004] This application provides an abnormal routing processing method, apparatus, and readable storage medium for improving the security of communication networks.
[0005] To achieve the above objectives, this application adopts the following technical solution:
[0006] Firstly, an abnormal route handling method is provided, comprising: determining whether the route to be analyzed is an abnormal route, wherein the route to be analyzed is used to forward target data; the abnormal route is a route whose route prefix has been tampered with; if the route to be analyzed is an abnormal route, generating a target route prefix based on the route prefix of the route to be analyzed, wherein the target node pointed to by the target route prefix is a normal node, and the priority of the target route prefix is greater than the priority of the route prefix of the route to be analyzed; and sending the target route prefix to the routing device corresponding to the route to be analyzed, so that the routing device forwards the target data based on the target route prefix.
[0007] Optionally, a target route prefix is generated based on the route prefix of the route to be analyzed, including: determining the target mask value and the IP address of the target node; the target mask value is greater than the mask value in the route prefix of the route to be analyzed; if the route to be analyzed is an internal network route, the target node is a non-blackhole node; if the route to be analyzed is an external network route, the target node is a blackhole node; the target mask value corresponding to the internal network route is different from the target mask value corresponding to the external network route; and the target mask value and the IP address of the target node are combined to obtain the target route prefix.
[0008] Optionally, the method further includes: obtaining the corresponding routing device identifier of the route to be analyzed; determining the route type of the route to be analyzed based on the routing device identifier and the first mapping relationship; the route type includes intranet routes and extranet routes; the first mapping relationship includes the correspondence between multiple routing device identifiers and multiple route types.
[0009] Optionally, determining that the route to be analyzed is an abnormal route includes: obtaining the routing information of the route to be analyzed; the routing information includes the routing prefix and the Autonomous System (AS) path; determining the target AS path based on the routing prefix and the second mapping relationship; if the AS path is different from the target AS path, the route to be analyzed is determined to be an abnormal route; the second mapping relationship includes the correspondence between multiple routing prefixes and multiple AS paths.
[0010] Based on the technical solution provided in this application, the abnormal route processing device can generate a target route prefix based on the route prefix of the route to be analyzed when the route to be analyzed is abnormal. This allows the route to be analyzed to forward target data based on the target route prefix. Since the target node pointed to by the target route prefix is a normal node, and the priority of the target route prefix is higher than that of the route prefix of the route to be analyzed, the abnormal route can be forwarded preferentially from the target route prefix, avoiding the abnormal route from forwarding target data to unauthorized terminals and improving the security of the communication network. In addition, compared with manual handling of abnormal routes, this application can shorten the network failure time caused by route anomalies and reduce the impact of route anomalies through the above-mentioned automatic processing process.
[0011] Secondly, an abnormal route processing device is provided, comprising: a determining unit, a processing unit, and a sending unit; the determining unit is used to determine whether the route to be analyzed is an abnormal route, the route to be analyzed being used to forward target data; the abnormal route is a route whose route prefix has been tampered with; the processing unit is used to generate a target route prefix based on the route prefix of the route to be analyzed when the route to be analyzed is an abnormal route, the target node pointed to by the target route prefix is a normal node, and the priority of the target route prefix is greater than the priority of the route prefix of the route to be analyzed; the sending unit is used to send the target route prefix to the routing device corresponding to the route to be analyzed, so that the routing device forwards the target data based on the target route prefix.
[0012] Optionally, the processing unit is specifically used for: determining the target mask value and the IP address of the target node; the target mask value is greater than the mask value in the route prefix of the route to be analyzed; when the route to be analyzed is an internal network route, the target node is a non-black hole node; when the route to be analyzed is an external network route, the target node is a black hole node; the target mask value corresponding to the internal network route is different from the target mask value corresponding to the external network route; and combining the target mask value and the IP address of the target node to obtain the target route prefix.
[0013] Optionally, the device further includes an acquisition unit; the acquisition unit is used to acquire the corresponding routing device identifier of the route to be analyzed; the determination unit is further used to determine the route type of the route to be analyzed based on the routing device identifier and the first mapping relationship; the route type includes intranet routes and extranet routes; the first mapping relationship includes the correspondence between multiple routing device identifiers and multiple route types.
[0014] Optionally, the determining unit is specifically used for: obtaining routing information of the route to be analyzed; the routing information includes routing prefixes and Autonomous System (AS) paths; determining the target AS path based on the routing prefixes and the second mapping relationship; and determining the route to be analyzed as an abnormal route if the AS path is different from the target AS path; the second mapping relationship includes the correspondence between multiple routing prefixes and multiple AS paths.
[0015] Thirdly, an abnormal routing processing device is provided, which can realize the functions performed by the abnormal routing processing device in the above aspects or possible designs. The functions can be implemented by hardware. For example, in one possible design, the abnormal routing processing device may include a processor and a communication interface. The processor can be used to support the abnormal routing processing device in realizing the functions involved in the first aspect or any possible design of the first aspect.
[0016] In another possible design, the exception routing processing apparatus may further include a memory for storing necessary computer execution instructions and data. When the exception routing processing apparatus is running, the processor executes the computer execution instructions stored in the memory to cause the exception routing processing apparatus to perform the first aspect or any of the possible exception routing methods described above.
[0017] Fourthly, a computer-readable storage medium is provided, which may be a readable non-volatile storage medium storing computer instructions or programs that, when executed on a computer, enable the computer to perform the first aspect or any of the possible exception routing methods described above.
[0018] Fifthly, a computer program product containing instructions is provided that, when run on a computer, enables the computer to execute the exception routing processing method of the first aspect or any possible design of the above aspects.
[0019] A sixth aspect provides an electronic device comprising one or more processors and one or more memories. The one or more memories are coupled to the one or more processors, and the one or more memories are used to store computer program code, including computer instructions, which, when executed by the one or more processors, cause the electronic device to perform an exception routing method as described in the first aspect or any possible design of the first aspect.
[0020] In a seventh aspect, a chip system is provided, comprising a processor and a communication interface, which can be used to implement the functions performed by the exception routing processing device in the first aspect or any possible design of the first aspect. In one possible design, the chip system further includes a memory for storing program instructions and / or data. The chip system may be composed of chips or may include chips and other discrete devices, without limitation. Attached Figure Description
[0021] Figure 1 This is a schematic diagram of the structure of an abnormal routing processing system provided in an embodiment of this application;
[0022] Figure 2 This is a schematic diagram of the structure of an abnormal routing processing device provided in an embodiment of this application;
[0023] Figure 3 A flowchart illustrating an abnormal routing handling method provided in an embodiment of this application;
[0024] Figure 4 A flowchart illustrating another abnormal routing processing method provided in this application embodiment;
[0025] Figure 5 A flowchart illustrating another abnormal routing processing method provided in this application embodiment;
[0026] Figure 6 This is a schematic diagram of another abnormal routing processing device provided in an embodiment of this application. Detailed Implementation
[0027] To enable those skilled in the art to better understand the technical solutions of this disclosure, the technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings.
[0028] It should be noted that the terms "first," "second," etc., used in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this disclosure described herein can be implemented in orders other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this disclosure. Rather, they are merely examples of apparatuses and methods consistent with some aspects of the embodiments of this application as detailed in the appended claims.
[0029] It should also be understood that the term "comprising" indicates the presence of the described feature, whole, step, operation, element and / or component, but does not exclude the presence or addition of one or more other features, wholes, steps, operations, elements and / or components.
[0030] The following is an explanation of the terms used in this application.
[0031] 1. Border Gateway Protocol (BGP): BGP is a routing protocol used to exchange Network Layer Reachability Information (NLRI) between routing domains. Because different administrative bodies control their respective routing domains, these domains are often referred to as Autonomous Systems (AS). The modern Internet is a large network composed of multiple interconnected ASs, and BGP, as an external routing protocol standard for the Internet, is widely used among Internet Service Providers (ISPs).
[0032] 2. AS: In the Internet, an Autonomous System (AS) is a small unit that has the authority to autonomously decide which routing protocols to use within the system. This network unit can be a simple network or a group of networks controlled by one or more ordinary network administrators; it is a single, manageable network unit (such as a university, an enterprise, or a company). An Autonomous System is sometimes also referred to as a routing domain (RD). An Autonomous System is assigned a globally unique 16-bit number, sometimes called the Autonomous System Number (ASN).
[0033] 3. Route Prefix: Also known as the destination network / mask, this is the destination network address and network mask associated with the route entry. A complete route prefix consists of: destination network address + prefix length (or network mask), both of which are indispensable. For example, 192.168.1.0 / 24 and 192.168.1.0 / 25, although they have the same destination network address, 192.168.1.0, are two different routes because their prefix lengths, 24 and 25, are different.
[0034] 4. Blackhole Routing: This is actually a special type of static routing that can absorb all irrelevant routes, preventing them from returning. It's typically a route entry created actively by the admin. Data packets destined for this network segment will be discarded upon arrival at the device.
[0035] BGP hijacking refers to a situation where an unauthorized terminal redirects target data destined for a target terminal to another unauthorized terminal or other non-target terminal by deceiving the Internet routing protocol, thereby causing network anomalies and other problems for the target terminal.
[0036] Network failure: Normal data traffic may be redirected to the wrong destination. This can affect the online experience of the target end user and render the network unavailable.
[0037] Data breach: Unauthorized terminals may use BGP hijacking to steal sensitive information, such as login credentials and credit card information. This information may be used for unauthorized access, malicious attacks, and other fraudulent activities.
[0038] Malicious attacks: Unauthorized terminals may use BGP hijacking to redirect network traffic to unauthorized servers, thereby launching other types of network attacks, such as Distributed Denial of Service (DDoS) attacks and man-in-the-middle attacks. These attacks may lead to network paralysis and data loss.
[0039] Fake websites: Unauthorized terminals may use BGP hijacking to trick users into accessing fake websites, thereby stealing users' sensitive information or installing malware on users' computers.
[0040] Routing within an AS can be advertised using BGP or Interior Gateway Protocol (IGP), but inter-AS routing is typically done using BGP. BGP allows for flexible route selection by adjusting its own attribute values and is widely used by ISPs and large internet companies. However, BGP routers only advertise the best route to their peers, which is detrimental to route analysis. Furthermore, routers do not store historical routing information, so they cannot immediately detect BGP hijacking within the network. As long as the router's routing table is intact, data packets will be forwarded normally.
[0041] In related technologies, when a router is hijacked, as long as the router's routing table is normal, the router will still forward the target data to the unauthorized terminal, resulting in poor security of the communication network.
[0042] In view of this, embodiments of this application provide an abnormal route processing method, the method comprising: determining that the route to be analyzed is an abnormal route; the route to be analyzed is used to forward target data; the abnormal route is a Border Gateway Protocol (BGP) hijacked route; generating a target route prefix based on the route prefix of the route to be analyzed, so that the route to be analyzed forwards target data based on the target route prefix; the target node pointed to by the target route prefix is a normal node, and the priority of the target route prefix is greater than that of the route prefix of the route to be analyzed.
[0043] The methods provided in the embodiments of this application will now be described in detail with reference to the accompanying drawings.
[0044] It should be noted that the network system described in the embodiments of this application is for the purpose of more clearly illustrating the technical solutions of the embodiments of this application, and does not constitute a limitation on the technical solutions provided in the embodiments of this application. As those skilled in the art will know, with the evolution of network systems and the emergence of other network systems, the technical solutions provided in the embodiments of this application are also applicable to similar technical problems.
[0045] Figure 1 The diagram shown is a structural schematic of an abnormal routing processing system 10 provided in an embodiment of this application. Figure 1 As shown, the anomaly routing processing system 10 may include a Software Defined Network (SDN) controller 11, a Border Gateway Monitoring Protocol (BMP) acquisition and analysis system 12, and a router 13. The SDN controller 11, the BMP acquisition and analysis system 12, and the router 13 are connected to each other. For example, the SDN controller 11, the BMP acquisition and analysis system 12, and the router 13 can be connected wirelessly.
[0046] In the embodiments of this application, the SDN controller 11 is used to generate a target route prefix based on the route prefix of the route to be analyzed when it is determined that the route to be analyzed is an abnormal route, so that the route to be analyzed forwards the target data based on the target route prefix.
[0047] The BMP acquisition and analysis system 12 can be used to determine abnormal routes.
[0048] In some embodiments, the BMP acquisition and analysis system 12 can also be used to display detailed information about abnormal routes in the display interface of the BMP acquisition and analysis system 12.
[0049] In some embodiments, the BMP acquisition and analysis system 12 can also send abnormal alarm information to maintenance personnel.
[0050] Among them, the abnormal alarm information is used to indicate that there is an abnormality in the router.
[0051] In the embodiments of this application, the SDN controller 11 and the BMP acquisition and analysis system 12 can be servers. These servers can be a single server or a server cluster consisting of multiple servers. In some embodiments, the server cluster can also be a distributed cluster. The embodiments of this application do not limit the specific technology, quantity, or form of the servers. Similarly, the embodiments of this application do not limit the specific technology, quantity, or form of the BMP acquisition and analysis system 12.
[0052] Router 13 is used to forward network data. For example, router 13 can advertise services. In the embodiments of this application, the specific technology and device form of router 13 are not limited.
[0053] It should be noted that, Figure 1 This is just an example framework diagram. Figure 1 The names of the various devices included are unrestricted, and except for Figure 1 In addition to the functional nodes shown, other nodes may also be included, but this application embodiment does not limit this.
[0054] In practical implementation, Figure 1 Each device in the process can be adopted Figure 2 The shown composition structure, or including Figure 2 The components shown. Figure 2 This is a schematic diagram illustrating the composition of an abnormal routing processing device 200 provided in an embodiment of this application. The abnormal routing processing device 200 can be a server, or it can be a chip or system-on-a-chip within the server. Figure 2As shown, the abnormal routing processing device 200 includes a processor 201, a communication interface 202, and a communication line 203.
[0055] Furthermore, the abnormal routing processing device 200 may also include a memory 204. The processor 201, the memory 204, and the communication interface 202 can be connected via a communication line 203.
[0056] The processor 201 can be a CPU, a general-purpose processor, a network processor (NP), a digital signal processor (DSP), a microprocessor, a microcontroller, a programmable logic device (PLD), or any combination thereof. The processor 201 can also be other devices with processing capabilities, such as circuits, devices, or software modules, without limitation.
[0057] Communication interface 202 is used to communicate with other devices or other communication networks. Communication interface 202 can be a module, circuit, communication interface, or any device capable of enabling communication.
[0058] Communication line 203 is used to transmit information between the components included in the abnormal routing processing device 200.
[0059] Memory 204 is used to store instructions. These instructions can be computer programs.
[0060] The memory 204 can be a read-only memory (ROM) or other type of static storage device that can store static information and / or instructions; it can also be a random access memory (RAM) or other type of dynamic storage device that can store information and / or instructions; it can also be an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage (including compressed optical discs, laser discs, optical discs, digital universal optical discs, Blu-ray discs, etc.), magnetic disk storage media or other magnetic storage devices, etc., without limitation.
[0061] It should be noted that the memory 204 can exist independently of the processor 201 or can be integrated with the processor 201. The memory 204 can be used to store instructions, program code, or some data, etc. The memory 204 can be located inside or outside the exception routing processing device 200, without limitation. The processor 201 is used to execute the instructions stored in the memory 204 to implement the exception routing processing method provided in the following embodiments of this application.
[0062] In one example, processor 201 may include one or more CPUs, for example, Figure 2 CPU0 and CPU1 in the CPU.
[0063] As an optional implementation, the exception routing processing device 200 includes multiple processors, for example, besides Figure 2 In addition to processor 201, it may also include processor 205.
[0064] It should be pointed out that, Figure 2 The composition shown does not constitute a basis for this. Figure 1 The limitations of each device in the process, except Figure 2 In addition to the components shown, Figure 1 The various devices in can include compared to Figure 2 More or fewer components, or combinations of certain components, or different arrangements of components.
[0065] In this embodiment of the application, the chip system may be composed of chips or may include chips and other discrete devices.
[0066] Furthermore, the actions, terms, etc., involved in the various embodiments of this application can be referenced interchangeably without limitation. The message names or parameter names in the messages exchanged between the various devices in the embodiments of this application are merely examples, and other names may be used in specific implementations without limitation.
[0067] To facilitate a clear description of the technical solutions in the embodiments of this application, the terms "first" and "second" are used in the embodiments of this application to distinguish identical or similar items with essentially the same function and effect. Those skilled in the art will understand that the terms "first" and "second" do not limit the quantity or execution order, and the terms "first" and "second" are not necessarily different.
[0068] It should be noted that, in this application, the terms "exemplary" or "for example" are used to indicate that something is being described as an example, illustration, or illustration. Any embodiment or design described as "exemplary" or "for example" in this application should not be construed as being more preferred or advantageous than other embodiments or design solutions. Specifically, the use of terms such as "exemplary" or "for example" is intended to present the relevant concepts in a concrete manner.
[0069] In this application, "at least one" means one or more, and "more than one" means two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can mean: A alone, A and B simultaneously, or B alone, where A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. "At least one of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one of a, b, or c can mean: a, b, c, ab, ac, bc, or abc, where a, b, and c can be single or multiple.
[0070] The following is combined Figure 1 The abnormal routing processing system shown herein describes the abnormal routing processing method provided in the embodiments of this application.
[0071] Figure 3 This application provides an abnormal routing processing method, applicable to an abnormal routing processing device, and also applicable to components within the abnormal routing processing device, such as chips. For example, the abnormal routing processing device can be... Figure 1 The SDN controller 11 in the middle.
[0072] This application uses an example of an abnormal routing processing device for illustration. Figure 3 As shown, the method includes the following steps S301-S303:
[0073] S301. Determine whether the route to be analyzed is an abnormal route.
[0074] Among them, the route to be analyzed is used to forward the target data; the abnormal route is the route whose route prefix has been tampered with (or the route whose Border Gateway Protocol (BGP) has been hijacked). For example, the target data can be image data, audio data, video data, text data, etc.
[0075] As one possible implementation, the abnormal route processing device can compare the routing information of the route to be analyzed with the routing information in the BGP routing standard library, obtain the comparison result, and determine whether the route to be analyzed is an abnormal route based on the comparison result.
[0076] The comparison results are used to indicate whether the route to be analyzed is an abnormal route. The comparison results include a first comparison result and a second comparison result. The first comparison result indicates that the routing information of the route to be analyzed is different from the routing information in the BGP routing standard library; the second comparison result indicates that the routing information of the route to be analyzed is the same as the routing information in the BGP routing standard library.
[0077] The abnormal route processing device can determine that the route to be analyzed is an abnormal route if the comparison result is the first comparison result, and determine that the route to be analyzed is a normal route if the comparison result is the second comparison result.
[0078] It should be noted that the BGP routing standard library is pre-stored in the abnormal route handling device. The BGP routing standard library contains BGP route prefix information and AS_PATH (AS path) information.
[0079] S302. If the route to be analyzed is an abnormal route, generate the target route prefix based on the route prefix of the route to be analyzed.
[0080] In this context, the target node pointed to by the target route prefix is a normal node, and the priority of the target route prefix is greater than the priority of the route prefix of the route to be analyzed.
[0081] As one possible implementation, the anomaly routing processing device can generate different target route prefixes based on the type of the route to be analyzed.
[0082] The types of routes to be analyzed can include internal network routes (routes in the standard library whose AS originates from this AS) and external network routes (routes in the standard library whose AS does not originate from this AS).
[0083] In one example, when the route to be analyzed is an internal network route, the target node is the first target node, which is a non-blackhole route node. The abnormal route processing device can determine the first mask value and the IP address of the first target node, and combine the first mask value and the IP address of the first target node to obtain the target route prefix.
[0084] The first mask value is greater than the second mask value, and the second mask value is the mask value in the routing prefix of the route to be analyzed.
[0085] For example, if the hijacked route is 10.1.0.0 / 16, that is, the IP address of the first target node is 10.1.0.0 and the second mask value is 16, the abnormal route processing device can set the first mask value to a mask value greater than 16, such as 17; at this time, the target route prefix can be 10.1.0.0 / 17 and 10.1.1.0 / 17.
[0086] Understandably, by combining the first mask value with the IP address of the first target node, the target data can be redirected to a normal node, thus improving the security of the communication network.
[0087] In another example, when the route to be analyzed is an external network route, the target node is the second target node, which is a black hole route node; the abnormal route processing device can determine the third mask value and the IP address of the second target node, and combine the third mask value and the IP address of the second target node to obtain the target route prefix.
[0088] The third mask value is greater than the second mask value, and the third mask value is different from the first mask value. The black hole routing node points to the Nill0 interface.
[0089] Understandably, by combining the third mask value with the IP address of the second target node to obtain the target routing prefix, external network routes can be blocked, preventing target data from being forwarded to illegal terminals and improving the security of the communication network.
[0090] For example, the destination route prefix can be a 32-bit detailed route.
[0091] It should be noted that the routing standard library in the abnormal route processing device can include routing identifiers of multiple internal network routes belonging to this network. The abnormal route processing device can match the routing identifier of the route to be analyzed with the routing identifiers of multiple internal network routes to determine the type of the route to be analyzed.
[0092] For example, if the route identifier of the route to be analyzed matches one of the route identifiers of multiple internal network routes, the abnormal route processing device can determine that the route to be analyzed is an internal network route; if the route identifier of the route to be analyzed does not match any of the route identifiers of multiple internal network routes, the abnormal route processing device can determine that the route to be analyzed is an external network route.
[0093] In practical applications, the route to be analyzed can be either an Internet Protocol version 4 (IPv4) route or an Internet Protocol version 6 (IPv6) route.
[0094] S303. Send the target route prefix to the routing device corresponding to the route to be analyzed, so that the routing device forwards the target data based on the target route prefix.
[0095] As one possible implementation, the abnormal routing processing device can obtain the address of the routing device corresponding to the route to be analyzed from the network log, and send the target routing prefix to the route to be analyzed based on the address of the routing device corresponding to the route to be analyzed, so that the routing device forwards the target data based on the target routing prefix.
[0096] Based on the technical solution provided in this application, the abnormal route processing device can generate a target route prefix based on the route prefix of the route to be analyzed when the route to be analyzed is abnormal. This allows the route to be analyzed to forward target data based on the target route prefix. Since the target node pointed to by the target route prefix is a normal node, and the priority of the target route prefix is higher than that of the route prefix of the route to be analyzed, the abnormal route can be forwarded preferentially from the target route prefix, avoiding the abnormal route from forwarding target data to unauthorized terminals and improving the security of the communication network. In addition, compared with manual handling of abnormal routes, this application can shorten the network failure time caused by route anomalies and reduce the impact of route anomalies through the above-mentioned automatic processing process.
[0097] One possible implementation, such as Figure 4 As shown, in order to determine that the route to be analyzed is an abnormal route, the abnormal route processing method of this application may further include the following S401-S402.
[0098] S401. Obtain the routing information of the route to be analyzed.
[0099] The routing information includes the routing prefix and the Autonomous System (AS) path. It may also include the AS origin (ORIGIN), the address of the next node (NEXT_HOP), the multi-exit identifier (MULTI_EXIT_DISC), and the community attribute (COMMUNITY).
[0100] As one possible implementation, the abnormal route processing device can obtain the routing log of the route to be analyzed from the core network and parse the routing log to obtain the routing information of the route to be analyzed.
[0101] S402. Determine the target AS path based on the routing prefix and the second mapping relationship. If the AS path is different from the target AS path, determine the route to be analyzed as an abnormal route.
[0102] The second mapping relationship includes different routing prefixes and their corresponding target AS paths. This second mapping relationship is stored in a standard library within the abnormal routing processing device.
[0103] As one possible implementation, the abnormal route processing device can determine the target route prefix based on the route prefix, and determine the route to be analyzed as an abnormal route if the target AS path that has a mapping relationship with the target route prefix is determined from the second mapping relationship and the AS path is different from the target AS path.
[0104] The target route prefix can be the same as the route prefix, or it can be a route prefix with a mask value smaller than the route prefix mask value.
[0105] In one example, the abnormal route processing device can determine that the route to be analyzed is an abnormal route if the target route prefix is the same as the route prefix but the AS path is different from the target AS path (e.g., the AS path origins are different).
[0106] For example, if the prefix of the route to be analyzed is 10.1.0.0 / 16 (mask value is 16) and the AS path is (300, 200, 250) (that is, the origin of the AS path is 250), and the target route prefix is 10.1.0.0 / 16, but the AS path is (300, 200, 100), that is, the AS origin of the target AS path is 100, the AS path origin of the route prefix of the route to be analyzed is inconsistent with the AS path origin of the route in the standard library, then the route has been hijacked, and the abnormal route processing device can determine that the route to be analyzed is an abnormal route.
[0107] In another example, the abnormal route processing device can determine that the route to be analyzed is an abnormal route when the target route prefix is less than the route prefix and the AS path is different from the target AS path (e.g., the AS path originates from different sources).
[0108] For example, if the prefix of the route to be analyzed is 10.1.0.0 / 18 (mask value is 18) and the AS path is (300, 200, 250) (that is, the origin of the AS path is 250), and the target route prefix is 10.1.0.0 / 16 (mask value is 16), but the AS path is (300, 200, 100), that is, the AS origin of the target AS path is 100, the AS path origin of the route prefix of the route to be analyzed is inconsistent with the target AS path origin of the route in the standard library, then the route has been hijacked, and the abnormal route processing device can determine that the route to be analyzed is an abnormal route.
[0109] One possible implementation, such as Figure 5 As shown, the abnormal routing processing method of this application may further include the following S501-S507.
[0110] The S501 and BMP acquisition system receives and parses the routing information of the routes to be analyzed.
[0111] For a detailed explanation of this step, please refer to S401, which will not be repeated here.
[0112] The S502 and BMP acquisition systems store routing information in the Kafka system and database.
[0113] The S503 and BMP analysis systems obtain real-time routing information.
[0114] As one possible implementation, the BMP analysis system can obtain real-time routing information through the Kafka system.
[0115] The S504 and BMP analysis systems determine whether the route to be analyzed is an abnormal route.
[0116] For a detailed explanation of this step, please refer to S301, which will not be repeated here.
[0117] When the S505 and BMP analysis systems determine that the route to be analyzed is an abnormal route, they generate alarm information and display it on the display interface.
[0118] The format of the alarm message can be set as needed. For example, it can be text or an image.
[0119] When the S506 and BMP analysis systems determine that the route to be analyzed is a normal route, they will display it on the display interface.
[0120] In one example, the content displayed on the interface may include routing information of the route to be analyzed, the analysis results of the route to be analyzed, etc.
[0121] The S507 and BMP analysis systems modify the router's routing prefix (i.e., modify the router's advertisement).
[0122] For a detailed explanation of this step, please refer to S302, which will not be repeated here.
[0123] The various solutions in the above embodiments of this application can be combined without contradiction.
[0124] This application embodiment can divide the abnormal routing processing device into functional modules or functional units according to the above method example. For example, each function can be divided into a separate functional module or functional unit, or two or more functions can be integrated into one processing module. The integrated module can be implemented in hardware or in software functional modules or functional units. The module or unit division in this application embodiment is illustrative and only represents one logical functional division; other division methods may be used in actual implementation.
[0125] When dividing each function into modules according to its corresponding function. Figure 6 A schematic diagram of an abnormal routing processing device 600 is shown. The abnormal routing processing device can be an SDN controller or a chip applied in the SDN controller. The abnormal routing processing device 600 can be used to perform the functions of the abnormal routing processing device involved in the above embodiments. Figure 6 The abnormal route processing device 600 shown may include: a determining unit 601, a processing unit 602, and a sending unit 603; the determining unit 601 is used to determine whether the route to be analyzed is an abnormal route, the route to be analyzed is used to forward target data; the abnormal route is a route whose route prefix has been tampered with; the processing unit 602 is used to generate a target route prefix based on the route prefix of the route to be analyzed when the route to be analyzed is an abnormal route, the target node pointed to by the target route prefix is a normal node, and the priority of the target route prefix is greater than the priority of the route prefix of the route to be analyzed; the sending unit 603 is used to send the target route prefix to the routing device corresponding to the route to be analyzed, so that the routing device forwards the target data based on the target route prefix.
[0126] Optionally, the processing unit 602 is specifically used for: determining the target mask value and the IP address of the target node; the target mask value is greater than the mask value in the route prefix of the route to be analyzed; when the route to be analyzed is an internal network route, the target node is a non-black hole node; when the route to be analyzed is an external network route, the target node is a black hole node; the target mask value corresponding to the internal network route is different from the target mask value corresponding to the external network route; and combining the target mask value and the IP address of the target node to obtain the target route prefix.
[0127] Optionally, the device further includes an acquisition unit 604; the acquisition unit 604 is used to acquire the corresponding routing device identifier of the route to be analyzed; the determination unit 601 is further used to determine the route type of the route to be analyzed based on the routing device identifier and the first mapping relationship; the route type includes intranet route and extranet route; the first mapping relationship includes the correspondence between multiple routing device identifiers and multiple route types.
[0128] Optionally, the determining unit 601 is specifically used for: obtaining routing information of the route to be analyzed; the routing information includes routing prefixes and autonomous system (AS) paths; determining the target AS path based on the routing prefixes and the second mapping relationship; and determining the route to be analyzed as an abnormal route if the AS path is different from the target AS path; the second mapping relationship includes the correspondence between multiple routing prefixes and multiple AS paths.
[0129] This application also provides a computer-readable storage medium. All or part of the processes in the above method embodiments can be executed by a computer program instructing related hardware. This program can be stored in the computer-readable storage medium, and when executed, it can include the processes described in the above method embodiments. The computer-readable storage medium can be an internal storage unit of the abnormal routing processing device (including a data sender and / or a data receiver) of any of the foregoing embodiments, such as the hard disk or memory of the abnormal routing processing device. The computer-readable storage medium can also be an external storage device of the terminal device, such as a plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, etc., equipped on the terminal device. Further, the computer-readable storage medium can include both the internal storage unit of the abnormal routing processing device and an external storage device. The computer-readable storage medium is used to store the computer program and other programs and data required by the abnormal routing processing device. The computer-readable storage medium can also be used to temporarily store data that has been output or will be output.
[0130] It should be noted that the terms "first" and "second," etc., in the specification, claims, and drawings of this application are used to distinguish different objects, not to describe a specific order. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or apparatus that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, products, or apparatuses.
[0131] It should be understood that in this application, "at least one (item)" means one or more, "more than one" means two or more, "at least two (items)" means two or three or more, and "and / or" is used to describe the relationship between related objects, indicating that there can be three relationships. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist simultaneously, where A and B can be singular or plural. The character " / " generally indicates that the related objects before and after are in an "or" relationship. "At least one (item) of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one (item) of a, b, or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, and c can be single or multiple.
[0132] Through the above description of the embodiments, those skilled in the art can clearly understand that, for the sake of convenience and brevity, only the division of the above functional modules is used as an example. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.
[0133] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another apparatus, or some features may be ignored or not executed. Furthermore, the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.
[0134] The units described as separate components may or may not be physically separate. A component shown as a unit can be one or more physical units; that is, it can be located in one place or distributed in multiple different locations. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0135] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0136] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solutions of the embodiments of this application, essentially, or the parts that contribute to the prior art, or all or part of the technical solutions, can be embodied in the form of a software product. This software product is stored in a storage medium and includes several instructions to cause a device (which may be a microcontroller, chip, etc.) or processor to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, ROM, RAM, magnetic disks, or optical disks.
[0137] The above are merely specific embodiments of this application, but the scope of protection of this application is not limited thereto. Any changes or substitutions within the technical scope disclosed in this application should be 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.
Claims
1. An abnormal routing handling method, characterized in that, The method includes: Determine whether the route to be analyzed is an abnormal route, the route to be analyzed is used to forward target data; the abnormal route is a route whose route prefix has been tampered with. If the route to be analyzed is the abnormal route, a target route prefix is generated based on the route prefix of the route to be analyzed. The target node pointed to by the target route prefix is a normal node, and the priority of the target route prefix is greater than the priority of the route prefix of the route to be analyzed. The target route prefix is a 32-bit detailed route. Send the target route prefix to the routing device corresponding to the route to be analyzed, so that the routing device forwards the target data based on the target route prefix; The step of generating a target route prefix based on the route prefix of the route to be analyzed includes: The target mask value and the IP address of the target node are determined; the target mask value is greater than the mask value in the route prefix of the route to be analyzed; if the route to be analyzed is an internal network route, the target node is a non-blackhole node; if the route to be analyzed is an external network route, the target node is a blackhole node; the target mask value corresponding to the internal network route is different from the target mask value corresponding to the external network route; wherein, the internal network route is a route in the BGP route standard library whose origin is this AS, and the external network route is a route in the BGP route standard library whose origin is not this AS; the blackhole node points to a null interface; The target mask value and the IP address of the target node are combined to obtain the target routing prefix; Obtain the routing device identifier corresponding to the route to be analyzed; The route type of the route to be analyzed is determined based on the routing device identifier and the first mapping relationship; the route type includes intranet routes and extranet routes; the first mapping relationship includes a correspondence between multiple routing device identifiers and multiple route types; The process of determining that the route to be analyzed is an abnormal route includes: Obtain the routing information of the route to be analyzed; the routing information includes the route prefix and the Autonomous System (AS) path; The target AS path is determined based on the routing prefix and the second mapping relationship. If the AS path is different from the target AS path, the route to be analyzed is determined to be an abnormal route. The second mapping relationship includes the correspondence between multiple routing prefixes and multiple AS paths.
2. An abnormal routing processing device, characterized in that, The device includes: a determining unit, a processing unit, and a sending unit; The determining unit is used to determine whether the route to be analyzed is an abnormal route, the route to be analyzed is used to forward target data; the abnormal route is a route whose route prefix has been tampered with. The processing unit is configured to generate a target route prefix based on the route prefix of the route to be analyzed when the route to be analyzed is the abnormal route. The target node pointed to by the target route prefix is a normal node, and the priority of the target route prefix is greater than the priority of the route prefix of the route to be analyzed. The target route prefix is a 32-bit detailed route. The sending unit is configured to send the target route prefix to the routing device corresponding to the route to be analyzed, so that the routing device forwards the target data based on the target route prefix; The processing unit is specifically used for: The target mask value and the IP address of the target node are determined; the target mask value is greater than the mask value in the route prefix of the route to be analyzed; if the route to be analyzed is an internal network route, the target node is a non-blackhole node; if the route to be analyzed is an external network route, the target node is a blackhole node; the target mask value corresponding to the internal network route is different from the target mask value corresponding to the external network route; wherein, the internal network route is a route in the BGP route standard library whose origin is this AS, and the external network route is a route in the BGP route standard library whose origin is not this AS; the blackhole node points to a null interface; The target mask value and the IP address of the target node are combined to obtain the target routing prefix; The device further includes an acquisition unit; The acquisition unit is used to acquire the routing device identifier corresponding to the route to be analyzed; The determining unit is further configured to determine the routing type of the route to be analyzed based on the routing device identifier and the first mapping relationship; the routing type includes intranet routing and extranet routing; the first mapping relationship includes a correspondence between multiple routing device identifiers and multiple routing types; The determining unit is specifically used for: Obtain the routing information of the route to be analyzed; the routing information includes the route prefix and the Autonomous System (AS) path; The target AS path is determined based on the routing prefix and the second mapping relationship. If the AS path is different from the target AS path, the route to be analyzed is determined to be an abnormal route. The second mapping relationship includes the correspondence between multiple routing prefixes and multiple AS paths.
3. A computer-readable storage medium, characterized in that, The readable storage medium stores instructions that, when executed, implement the method as described in claim 1.
4. An abnormal routing processing device, characterized in that, include: The processor, memory, and communication interface; wherein the communication interface is used for communication between the abnormal routing processing device and other devices or networks; The memory is used to store one or more programs, which include computer-executable instructions. When the abnormal routing processing device is running, the processor executes the computer-executable instructions stored in the memory to cause the abnormal routing processing device to perform the method of claim 1.
