A method and system for VRF-based multi-plane BGP gateway state detection
By using a VRF-based multi-plane BGP gateway state detection method, the GoBGP RPC interface is used to automatically check and handle network device connectivity issues, solving the problems of low accuracy and efficiency in multi-plane management in network management, and achieving fast and accurate fault handling and recovery.
Patent Information
- Application Number
- CN202411773095.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-04
- Publication Date
- 2025-11-04
- Estimated Expiration
- 2044-12-04
AI Technical Summary
Existing technologies cannot efficiently and accurately manage multiple network planes within network devices, resulting in low network management accuracy and efficiency. Furthermore, traditional methods rely on manual inspection or device reporting, which introduces delays and errors.
A VRF-based multi-plane BGP gateway status detection method is adopted. The BGP neighbor status is checked periodically through the GoBGP RPC interface. VRF is used to distinguish network planes, automatically identify and handle gateway connectivity issues, and a delay recovery threshold is set to prevent frequent removal and recovery.
It enables seamless, second-level fault removal and recovery for operations and maintenance personnel, improving the accuracy and efficiency of network management, reducing the operational burden, and enhancing network stability and user experience.
Smart Images

Figure CN119814614B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of computers, in particular to the technical field of IT and software development, and specifically to a multi-plane BGP gateway state detection method and system based on VRF, an electronic device and a storage medium. BACKGROUND
[0002] With the rapid development of network technology, various network applications are emerging, and the requirements for network device performance are becoming higher and higher. As one of the key protocols of the Internet, BGP (Border Gateway Protocol) plays a key role. BGP allows routers to exchange routing and reachability information for making decisions on selecting the optimal path between networks.
[0003] However, in a complex network environment, gateway devices may be unstable due to various reasons such as device failure, line failure, configuration error, etc. At this time, a mechanism is needed to timely discover and handle the connectivity problems of gateway devices. The traditional method is usually to discover and handle these problems by periodic inspection by network management personnel or relying on fault information reported by the device, but these methods have many shortcomings. For example, manual inspection is not only inefficient and prone to error, but also difficult to meet the management needs of large-scale networks; the fault information reported by the device may be delayed, and depends on the fault detection and reporting capabilities of the device itself, which may not accurately and timely discover and reflect the actual connectivity problems.
[0004] In addition, the existing network device management is usually based on the overall state of the device, without distinguishing and managing various network planes inside the device. The connectivity state of the network plane has an important influence on the overall state of the device, and different network planes may have great differences in connectivity state due to factors such as network type, routing strategy, etc. For example, different types of network connections such as Internet, dedicated network (CN2) and intranet connection (LAN) may have differences in connectivity state due to factors such as network environment, physical line, traffic policy, etc. If the various network planes inside the device cannot be managed in detail, the precision and efficiency of network management may be reduced.
[0005] Therefore, how to provide a multi-plane BGP gateway state detection method and system based on VRF, an electronic device and a storage medium has become a technical problem to be solved in the field. SUMMARY
[0006] The purpose of the present application is to provide a multi-plane BGP gateway state detection method and system based on VRF, an electronic device and a storage medium.
[0007] According to a first aspect of the present application, a VRF-based multi-plane BGP gateway state detection is provided, comprising,
[0008] In step S1, different network planes are identified by different VRFs in BGP configuration.
[0009] In step S2, a BGP-provided RPC interface written in Go language is used to periodically check the BGP neighbor state of each gateway.
[0010] In step S3, it is determined whether the corresponding network plane is a normal network plane according to the BGP neighbor state of the gateway and the VRF identification.
[0011] In step S4, if there is at least one network plane with an abnormal state in the BGP gateway, it is determined that the state of the BGP gateway is abnormal, and the control component will call an interface to remove the gateway.
[0012] According to the method of the first aspect of the present application, in step S4, the method further comprises:
[0013] When the number of consecutive accumulated check states of the removed gateway is normal exceeds a threshold value, the control component restores the gateway through an interface.
[0014] According to the method of the first aspect of the present application, in step S1, the different network planes are identified by different VRFs in BGP configuration, comprising:
[0015] The VRF value is set to a first value to represent the Internet network plane.
[0016] The VRF value is set to a second value to represent the dedicated line network plane.
[0017] The VRF value is set to a third value to represent the intranet connection network plane.
[0018] According to the method of the first aspect of the present application, in step S3, the state of the network plane and the gateway is determined to be normal according to the BGP neighbor state of the gateway and the network plane identified by the VRF, comprising:
[0019] In the same VRF-identified network plane, if at least one connection state is detected to be connected successfully, it is determined that the state of the network plane is normal. If the state of any network plane in all network planes of the gateway is abnormal, it is determined that the state of the gateway is abnormal.
[0020] The second aspect of the present application discloses a VRF-based multi-plane BGP gateway state detection system, comprising:
[0021] The first processing module is configured to identify different network planes with different VRFs in the BGP configuration;
[0022] The second processing module is configured to regularly check the BGP neighbor state of each gateway using the RPC interface provided by the BGP written in the Go language.
[0023] The third processing module is configured to determine whether the corresponding network plane is a normal network plane according to the BGP neighbor state of the gateway and the VRF identification.
[0024] The fourth processing module is configured to determine that the state of the BGP gateway is abnormal if there is at least one network plane with an abnormal state in the BGP gateway, and the management component will remove the gateway through the interface.
[0025] According to the system of the second aspect of the present application, the fourth processing module is specifically configured to restore the removed gateway through the interface when the number of consecutive accumulated check states of the removed gateway is greater than a threshold value.
[0026] According to the system of the second aspect of the present application, the first processing module is specifically configured to identify different network planes with different VRFs in the BGP configuration, including:
[0027] The VRF value is set to a first value to represent the Internet network plane, the VRF value is set to a second value to represent the dedicated line network plane, and the VRF value is set to a third value to represent the intranet connection network plane.
[0028] According to the system of the second aspect of the present application, the third processing module is specifically configured to determine whether the network plane and the state of the gateway are normal according to the BGP neighbor state of the gateway and the network plane identified by the VRF, including:
[0029] In the network plane with the same VRF identification, at least one connection state is detected to be connected successfully, and the state of the network plane is determined to be a normal state; and in all network planes of the gateway, if the state of any network plane is abnormal, the state of the gateway is determined to be an abnormal state.
[0030] The fourth aspect of the present application discloses a computer readable storage medium. The computer readable storage medium stores a computer program, and the computer program is executed by a processor to realize the steps of the VRF-based multi-plane BGP gateway state detection method of any one of the first aspect of the present application.
[0031] In a fifth aspect, the present application shows a computer program product, when instructions in the computer program product are executed by a processor of an electronic device, enable the electronic device to perform the method according to any one of the preceding aspects.
[0032] The technical scheme provided by the present application can have the following beneficial effects:
[0033] As can be seen from the above scheme, the embodiment of the present application provides a VRF-based multi-plane BGP gateway state detection method, system, electronic device and storage medium, which has the following beneficial effects: a multi-plane gateway state detection is realized; through the VRF-based multi-plane BGP gateway state, the intervention of the operation and maintenance personnel after the fault occurs is avoided, and the second-level fault removal and recovery without user awareness of operation and maintenance are realized. BRIEF DESCRIPTION OF DRAWINGS
[0034] Figure 1 A flow chart of a VRF-based multi-plane BGP gateway state detection method according to an embodiment is provided;
[0035] Figure 2 A gateway state detection result judgment basis according to an embodiment is provided;
[0036] Figure 3 A structure diagram of a VRF-based multi-plane BGP gateway state detection system according to an embodiment of the present application is provided;
[0037] Figure 4 A block diagram of an electronic device according to an embodiment of the present application is provided;
[0038] Figure 5 A block diagram of a computer readable storage medium according to an embodiment of the present application is provided. DETAILED DESCRIPTION
[0039] The technical scheme in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor fall within the scope of protection of the present application.
[0040] The present application discloses a VRF-based multi-plane BGP gateway state detection method, aiming to provide a method capable of distinguishing different network planes according to different VRFs (Virtual Routing and Forwarding), automatically checking the BGP neighbor state of the gateway, and automatically processing the connectivity problem of the gateway, thereby improving the efficiency and accuracy of network management.
[0041] GoBGP is a BGP (Border Gateway Protocol) daemon written in Go language, aiming to provide a high-performance, easy-to-deploy and manage BGP solution for modern network environments; it is an open-source BGP implementation that provides a rich API, including RPC interfaces, which can be used to query and manage the status of BGP. However, how to utilize these APIs to design a system that can efficiently and accurately manage network devices, detect and handle device connectivity problems is a problem that needs to be solved. Therefore, the present application adopts a network device management method based on the RPC interface of GoBGP.
[0042] API: Application Programming Interface, is a set of pre-defined functions or protocols for data transmission and instruction processing between different components of a software system, so that application programs can integrate and share data resources. In simple terms, API is a medium for data transmission between systems.
[0043] RPC: Remote Procedure Call, is a computer communication protocol that allows one computer program to call a subprogram on another computer over a network and get the return value. RPC makes distributed computing applications more convenient and efficient, by hiding the underlying network communication details, making remote communication between programs as simple as local calls.
[0044] Firstly, according to the VRF, the method distinguishes different network planes, for example, using VRF "200" to represent the Internet, using VRF "212" to represent the dedicated network (CN2), and using VRF "300" to represent the internal network connection (LAN). In this way, the method can manage various network planes inside the network device in detail, improving the accuracy of network management.
[0045] VRF: Virtual Routing and Forwarding, is a network technology mainly used to create multiple routing tables on a three-layer forwarding device, thereby realizing the isolation of data or services. This technology is commonly used in firewall and other applications that require isolation. Through VRF technology, multiple instances can be created on a physical device, each instance having independent interfaces, routing tables and routing protocol processes, etc., thereby realizing routing isolation between instances.
[0046] Then, the method periodically (for example, once per second) checks the BGP neighbor state of the gateway through the RPC interface of GoBGP, so as to discover and handle the connectivity problem of the gateway. This method avoids the shortcomings of traditional manual checking and device fault reporting, and improves the efficiency of problem discovery and handling.
[0047] Then, the method determines whether the gateway needs to be removed according to the result of the connectivity check. The specific determination principle is that, in the network plane formed by the connections with the same VRF, if there is at least one connection with the state of ESTABLISHED, it is considered that this network plane is normal; in all network planes of the gateway, if there is one network plane that is not normal, it is considered that the state of the gateway is abnormal and needs to be removed. In this way, the method can accurately determine and handle the connectivity problem of the gateway, and avoid the situation that the entire device is mistakenly determined to be abnormal due to a single network plane problem.
[0048] Finally, if the state of the gateway is abnormal, the method will call the interface to remove the gateway, and set a delay recovery threshold RECOVER_THRESH (function, unit: "second"). When the number of times that the removed gateway is continuously accumulated and checked to be normal, that is, "healthy", exceeds the threshold, the method will call the interface to restore the gateway. This method can prevent the network device from being frequently removed and restored due to temporary connectivity problems, and improve the network stability.
[0049] Through this method, the application can manage the connectivity of the network device, automatically handle the device connectivity problem, improve the network management efficiency and accuracy, and meet the current needs.
[0050] Embodiment 1
[0051] According to a first aspect of the application, a VRF-based multi-plane BGP gateway state detection method is disclosed. Figure 1 As shown in the flowchart of the VRF-based multi-plane BGP gateway state detection method according to an embodiment of the application, Figure 1 The method comprises the following steps:
[0052] In step S1, different network planes are identified by different VRFs in the BGP configuration.
[0053] In step S1, different network planes are identified by different VRFs in the BGP configuration.
[0054] In some embodiments, in the step S1, the different network planes are identified by different VRFs in the BGP configuration, which comprises:
[0055] The VRF value is set to a first numerical value to represent the Internet network plane;
[0056] Setting the VRF value to a second value represents a dedicated network network plane;
[0057] Setting the VRF value to a third value represents an intranet connection network plane.
[0058] In some specific embodiments, the VRF value is set to "200" to represent the Internet network plane, the VRF value is set to "212" to represent the dedicated network network plane, and the VRF value is set to "300" to represent the intranet connection network plane. In this way, various network planes inside the network device can be managed in detail, improving the accuracy of network management. Different network planes inside the device can be managed and connectivity checked in detail.
[0059] Step S2, using the RPC interface provided by BGP written in Go language to periodically check the BGP neighbor state of each gateway;
[0060] In step S2, the RPC interface provided by GoBGP is used to periodically check the BGP neighbor state of each gateway.
[0061] Specifically, the frequency of such automatic checking can be set to once per second, aiming to discover and quickly respond to any possible network connectivity problems. The RPC interface of GoBGP provides detailed and in-depth control and query capabilities for the BGP routing protocol, making such periodic checking possible. This method avoids the shortcomings of traditional manual checking and device fault reporting, improving the efficiency of problem discovery and handling.
[0062] Step S3, determining whether the corresponding network plane is a normal network plane according to the BGP neighbor state of the gateway and the VRF identification;
[0063] In step S3, according to the BGP neighbor state of the gateway and the network plane of the VRF identification, it is determined whether the network plane and the state of the gateway are abnormal; in the same network plane of the VRF identification, it is determined that the state of the network plane is normal when at least one connection state is detected to be connected successfully; if the state of any one network plane is abnormal in all network planes of the gateway, it is determined that the state of the gateway is abnormal.
[0064] In some embodiments, in the step S3, as shown in the following table, the determination of whether the network plane and the state of the gateway are normal according to the BGP neighbor state of the gateway and the network plane of the VRF identification includes: Figure 2
[0065] In the same network plane with the same VRF identifier, as long as there is at least one connection state being ESTABLISHED, the network plane is considered to be normal; and in all network planes of the gateway, if any network plane is abnormal, the gateway is determined to be in an abnormal state. In this way, the connectivity problem of the gateway can be accurately judged and processed, and the situation that the entire device is mistakenly determined to be abnormal due to a single network plane problem is avoided.
[0066] Once it is determined that the gateway is in an abnormal state, the management and control component will remove the gateway through an interface. This process is automatically performed, greatly improving the fault response speed.
[0067] In step S4, if there is at least one network plane in the BGP gateway that is in an abnormal state, it is determined that the state of the BGP gateway is abnormal, and the management and control component will call an interface to remove the gateway.
[0068] In step S4, if it is determined that the state of a gateway is abnormal, the management and control component will call an interface to remove the gateway. This automatic removal strategy greatly improves the fault processing speed and shortens the network recovery time.
[0069] In some embodiments, in the step S4, in order to prevent frequent removal and recovery due to temporary connectivity problems, a threshold value RECOVER_THRESH for delayed recovery is set, and when the number of times that the removed gateway is continuously accumulated and checked to be normal exceeds the threshold value, that is, when the number of times that the removed gateway is continuously accumulated and checked to be "healthy" exceeds the threshold value, the management and control component will restore the gateway through an interface. This design can quickly handle faults, prevent network devices from being frequently removed and restored due to temporary connectivity problems, and ensure the stability of the network.
[0070] In summary, the scheme proposed by the present application needs the management and control component to detect the BGP connection state of each plane in order to ensure that the business logic of the gateway data plane is normal. When the BGP connection state is abnormal, the abnormality can be discovered in the first time, and according to the judgment strategy of the BGP connection state to the gateway state, it is determined whether the gateway needs to be removed. At the same time, the BGP connection is continuously detected to ensure that the gateway is in a normal state after a threshold time, and the state is recovered from abnormal to normal, and the gateway is automatically mounted.
[0071] At the same time, in order to ensure that the operation and maintenance can be sensed in time, an alarm interface is called to notify the operation and maintenance personnel when the gateway is removed and mounted.
[0072] Since the traditional manual processing method cannot achieve second-level perception and processing of the abnormal BGP connection state based on multiple planes, and the system cannot generate an alarm in time, the burden of operation and maintenance intervention is increased, and the user experience is reduced.
[0073] The embodiment realizes the automatic BGP neighbor state checking method of GoBGP based on VRF, and integrates alarm and fault processing functions, thereby effectively improving the control ability of network managers on network connectivity, reducing the risk of network failure, improving network availability and stability, improving user experience, and reducing the work difficulty of operation and maintenance personnel.
[0074] It should be noted that, for the method embodiments, in order to simply describe, they are all described as a series of action combinations, but those skilled in the art should know that the present application is not limited to the action sequence described, because according to the present application, certain steps can be performed in other sequences or simultaneously. Secondly, those skilled in the art should know that the embodiments described in the specification are all optional embodiments, and the actions involved are not necessarily required by the present application.
[0075] Embodiment 2:
[0076] The application discloses a multi-plane BGP gateway state detection system based on VRF. Figure 3 A structure diagram of a multi-plane BGP gateway state detection system based on VRF according to an embodiment of the application is shown in FIG. 1. Figure 3 As shown in FIG. 1, the system 100 comprises:
[0077] A first processing module 101 is configured to identify different network planes by different VRFs in BGP configuration.
[0078] A second processing module 102 is configured to periodically check the BGP neighbor state of each gateway by using the RPC interface provided by BGP written in Go language.
[0079] A third processing module 103 is configured to determine whether the corresponding network plane is a normal network plane according to the BGP neighbor state of the gateway and the VRF identification.
[0080] A fourth processing module 104 is configured to determine that the state of the BGP gateway is abnormal if there is at least one network plane with an abnormal state in the BGP gateway, and a management component will remove the gateway by calling an interface.
[0081] According to the system of the second aspect of the application, the first processing module 101 is specifically configured to identify different network planes by different VRFs in BGP configuration.
[0082] The VRF value is set as a first numerical value to represent the Internet network plane.
[0083] The VRF value is set as a second numerical value to represent the dedicated line network plane.
[0084] The VRF value is set to a third value to represent the intranet connection network plane.
[0085] Specifically, the VRF value is set to “200” to represent the Internet network plane, the VRF value is set to “212” to represent the dedicated line network plane, and the VRF value is set to “300” to represent the intranet connection network plane. In this way, various network planes inside the network device can be managed in detail, and the precision of network management is improved. Fine-grained management and connectivity checking can be performed for different network planes inside the device.
[0086] According to the system of the second aspect of the application, the second processing module 102 is specifically configured to set the frequency of such automatic checking to once per second, aiming to discover and quickly respond to any possible network connectivity problems. The RPC interface of GoBGP provides detailed and in-depth control and query capabilities for the BGP routing protocol, making such periodic checking possible. This method avoids the shortcomings of traditional manual checking and device fault reporting, and improves the efficiency of problem discovery and processing.
[0087] According to the system of the second aspect of the application, the third processing module 103 is specifically configured to determine whether the network plane and the gateway are in a normal state according to the BGP neighbor state of the gateway and the network plane identified by the VRF, as shown in the following table: Figure 2
[0088] Specifically, as long as there is at least one connection in the network plane identified by the same VRF in an ESTABLISHED state, the network plane is considered to be normal, and if any network plane in all network planes of the gateway is abnormal, the gateway is determined to be in an abnormal state. In this way, the connectivity problem of the gateway can be accurately determined and processed, and the situation that the entire device is mistakenly determined to be abnormal due to a single network plane problem is avoided.
[0089] According to the system of the second aspect of the application, the fourth processing module 104 is specifically configured to set a delay recovery threshold RECOVER_THRESH to prevent frequent removal and recovery due to temporary connectivity problems, and when the number of consecutive accumulations of the gateway being removed and checked to be normal, i.e., “healthy”, exceeds the threshold, the management and control component recovers the gateway through the interface. This design can quickly handle faults and prevent the network device from being frequently removed and recovered due to temporary connectivity problems, ensuring the stability of the network.
[0090] For the system embodiment, as it is basically similar to the method embodiment, the description is relatively simple, and the relevant part can be referred to the part of the method embodiment.
[0091] Embodiment 3:
[0092] The application further discloses an electronic device. The electronic device comprises a memory and a processor, the memory stores a computer program, and the processor implements the steps of the method when executing the computer program.
[0093] The electronic device of the application embodiment comprises a processor, a memory, a computer program stored on the memory and executable on the processor, the computer program is executed by the processor to realize the processes of the above-mentioned method embodiment, and the same technical effects can be achieved. To avoid repetition, it will not be repeated here.
[0094] The application embodiment further provides a computer readable storage medium, the computer readable storage medium stores a computer program, and the computer program is executed by the processor to realize the processes of the above-mentioned method embodiment, and the same technical effects can be achieved. To avoid repetition, it will not be repeated here. The computer readable storage medium is, for example, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0095] Figure 4 The application shows a block diagram of an electronic device 800. For example, the electronic device 800 can be a mobile phone, a computer, a digital broadcast terminal, a message transmission device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.
[0096] Referring to Figure 4 The electronic device 800 can include one or more of the following components: a processing component 802, a memory 804, a power supply component 806, a multimedia component 808, an audio component 810, an input / output (I / O) interface 812, a sensor component 814, and a communication component 816.
[0097] The processing component 802 generally controls the overall operations of the electronic device 800, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 802 can include one or more processors 820 to execute instructions and to complete all or part of steps of the above methods. In addition, the processing component 802 can include one or more modules to facilitate the interaction between the processing component 802 and other components. For example, the processing component 802 can include a multimedia module to facilitate the interaction between the multimedia component 808 and the processing component 802.
[0098] The memory 804 is configured to store various types of data to support operations of the electronic device 800. Examples of these data include instructions for any application or method operating on the electronic device 800, contact data, phonebook data, messages, images, videos, and the like. The memory 804 can be implemented by any type of volatile or non-volatile storage devices or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read only memory (EEPROM), erasable programmable read only memory (EPROM), programmable read only memory (PROM), read only memory (ROM), magnetic memory, flash memory, magnetic disc or optical disc.
[0099] The power component 806 provides power to various components of the electronic device 800. The power component 806 can include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the electronic device 800.
[0100] The multimedia component 808 includes a screen providing an output interface between the electronic device 800 and a user. In some embodiments, the screen can include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes the touch panel, the screen can be implemented as a touch screen to receive an input signal from a user. The touch panel includes one or more touch sensors to sense a touch, a slide, and a gesture on the touch panel. The touch sensor can not only sense a boundary of a touching or sliding action, but also detect duration and pressure related to the touching or sliding action. In some embodiments, the multimedia component 808 includes a front camera and / or a rear camera. The front camera and / or the rear camera can receive external multimedia data when the device 800 is in an operating mode, such as a shooting mode or a video mode. Each of the front camera and the rear camera can be a fixed optical lens system or have a focal length and optical zoom capability.
[0101] The audio component 810 is configured to output and / or input audio signals. For example, the audio component 810 includes a microphone (MIC) that is configured to receive an external audio signal when the electronic device 800 is in an operation mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signal can be further stored in the memory 804 or transmitted via the communication component 816. In some embodiments, the audio component 810 also includes a speaker for outputting audio signals.
[0102] The I / O interface 812 provides an interface between the processing component 802 and peripheral interface modules, which can be a keypad, a click wheel, buttons, and the like. The buttons can include, but are not limited to, a home button, a volume button, a start button, and a lock button.
[0103] The sensor component 814 includes one or more sensors for providing status assessments of various aspects of the electronic device 800. For example, the sensor component 814 can detect an open / closed position of the device 800, relative positioning of components, such as a display and a keypad of the electronic device 800, a change of position of the electronic device 800 or a component of the electronic device 800, presence or absence of user contact with the electronic device 800, orientation or acceleration / deceleration of the electronic device 800, and temperature changes of the electronic device 800. The sensor component 814 can include an orientation sensor, an acceleration sensor, a proximity sensor, a gesture sensor, a biometric sensor, a temperature / humidity sensor, an illumination sensor, and / or an interaction sensor. The sensor component 814 can further include an electronic component, for example, a camera, a microphone, and / or a user input interface, to measure a physical quantity or to generate a user interface.
[0104] The communication component 816 is configured to facilitate wired or wireless communication between the electronic device 800 and other devices. The electronic device 800 can access a wireless network based on a communication standard, such as WiFi, a operator network, such as 2G, 3G, 4G, or 5G, or a combination thereof. In an example embodiment, the communication component 816 receives a broadcast signal or broadcast operation information from an external broadcast management system via a broadcast channel. In an example embodiment, the communication component 816 further includes a near-field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology, and other technology.
[0105] In exemplary embodiments, the electronic device 800 can be implemented with one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, micro-controllers, microprocessors or other electronic elements, for performing the above-described methods.
[0106] In exemplary embodiments, a non-transitory computer-readable storage medium including instructions, such as the memory 804 including instructions, is also provided, which can be executed by the processor 820 of the electronic device 800 to accomplish the above-described methods. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disc, and an optical data storage device, etc.
[0107] Embodiment 4:
[0108] Figure 5 is a block diagram of a computer-readable storage medium 1900 shown in the present application. For example, the computer-readable storage medium 1900 can be provided as a server.
[0109] Referring to Figure 5 The computer-readable storage medium 1900 includes a processing component 1922, which further includes one or more processors, and a memory resource represented by a memory 1932, for storing instructions executable by the processing component 1922, such as an application program. The application program stored in the memory 1932 can include one or more than one module each corresponding to a set of instructions. In addition, the processing component 1922 is configured to execute the instructions to perform the above-described methods.
[0110] The computer-readable storage medium 1900 can also include a power supply component 1926 configured to perform power management of the computer-readable storage medium 1900, a wired or wireless network interface 1950 configured to connect the computer-readable storage medium 1900 to a network, and an input / output (I / O) interface 1958. The computer-readable storage medium 1900 can operate based on an operating system stored in the memory 1932, such as Windows ServerTM, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM or the like.
[0111] It should be noted that, in the present document, the terms "comprises", "comprising", or any other variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but can also include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element preceded by "comprises... a" does not, without more constraints, foreclose the existence of additional identical elements in the process, method, article, or apparatus that comprises the element.
[0112] Those skilled in the art can clearly understand that the above-mentioned embodiment method can be realized by means of software and necessary general hardware platform, of course, it can also be realized by hardware, but in many cases, the former is a better embodiment. Based on such understanding, the technical solutions of the present application can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes a plurality of instructions for making a terminal (which can be a mobile phone, computer, server, air conditioner, or network device, etc.) execute the methods described in various embodiments of the present application.
[0113] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific embodiments, and the above-mentioned specific embodiments are only illustrative, not restrictive, and those skilled in the art can make many forms under the inspiration of the present application without departing from the scope of the present application and the scope of protection of the claims.
[0114] Those skilled in the art can realize that the units and algorithm steps of each example described in conjunction with the embodiments disclosed in the embodiments of the present application can be realized by electronic hardware or a combination of computer software and electronic hardware. Whether the functions are executed in hardware or software depends on the specific application and design constraints of the technical solutions. Professional technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the present application.
[0115] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the above-described system, device and unit can refer to the corresponding process in the foregoing method embodiments, which will not be described here.
[0116] In the embodiments of the present application, it should be understood that the disclosed apparatus and method can be implemented in other manners. For example, the described embodiments of the apparatus are merely schematic. For example, the division of the units is only a logical function division. There can be another division manner for the actual implementation, for example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the displayed or discussed mutual couplings or direct couplings or communication connections can be indirect couplings or communication connections through some interfaces, devices or units, and can be in electrical, mechanical or other forms.
[0117] The units described as separate components can or can not be physically separate, and the components shown as units can or can not be physical units, i.e., can be located in one place, or can be distributed on multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the embodiments.
[0118] In addition, each functional unit in the various embodiments of the present application can be integrated into a processing unit, or each unit can be a physically independent unit, or two or more units can be integrated into a unit.
[0119] If the functions are realized in the form of software function units and sold or used as independent products, they can be stored in a computer readable storage medium. Based on this understanding, the technical solutions of the present application or the parts of the technical solutions that essentially contribute to the prior art can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present application. The aforementioned storage medium includes various media that can store program codes, such as U disk, mobile hard disk, ROM, RAM, magnetic disk or optical disk, etc.
[0120] The above is merely specific embodiments of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art can easily think of changes or replacements within the technical scope disclosed in the present application, which should be covered within the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.
Claims
1. A VRF-based method for detecting the state of a multi-plane BGP gateway, characterized in that, include: Step S1: In the BGP configuration, use different VRFs to identify different network planes; Step S2: Use the RPC interface provided by BGP, written in Go, to periodically check the BGP neighbor status of each gateway; Step S3: Determine whether the corresponding network plane is a normal network plane based on the gateway's BGP neighbor status and VRF identifier; Step S4: If there is at least one network plane in the BGP gateway that is in an abnormal state, the BGP gateway is determined to be in an abnormal state, and the management component will call the interface to remove the gateway.
2. The VRF-based multi-plane BGP gateway state detection method according to claim 1, characterized in that, In step S4, the method further includes: When the number of consecutive times a removed gateway is checked and found to be in a normal state exceeds a threshold, the control component restores the gateway through an interface.
3. The VRF-based multi-plane BGP gateway state detection method according to claim 1, characterized in that, In step S1, identifying different network planes using different VRFs in the BGP configuration includes: Set the VRF value as the first value to represent the Internet network plane; Setting the VRF value to the second value represents the leased network plane; Setting the VRF value to the third value represents the internal network connection plane.
4. The VRF-based multi-plane BGP gateway state detection method according to claim 1, characterized in that, In step S3, determining whether the network plane and the gateway are in normal condition based on the gateway's BGP neighbor status and the network plane identified by the VRF includes: When at least one connection in the network plane with the same VRF identifier is detected as having a successful connection, the network plane is determined to be in a normal state. If any one of the network planes of the gateway is in an abnormal state, the gateway is determined to be in an abnormal state.
5. A VRF-based multi-plane BGP gateway state detection system, characterized in that, The system includes: The first processing module is configured to identify different network planes using different VRFs in the BGP configuration; The second processing module is configured to periodically check the BGP neighbor status of each gateway using the RPC interface provided by BGP, which is written in Go. The third processing module is configured to determine whether the corresponding network plane is a normal network plane based on the gateway's BGP neighbor status and VRF identifier. The fourth processing module is configured to determine that the BGP gateway is in an abnormal state if at least one network plane in the BGP gateway is in an abnormal state, and the management component will call the interface to remove the gateway.
6. The VRF-based multi-plane BGP gateway state detection system according to claim 5, characterized in that, The fourth processing module is specifically configured such that when the number of consecutive cumulative checks showing a normal status for a removed gateway exceeds a threshold, the control component restores the gateway through an interface.
7. The VRF-based multi-plane BGP gateway state detection system according to claim 5, characterized in that, The first processing module is specifically configured such that, in the BGP configuration, different network planes are identified using different VRFs, including: The VRF value is set to the first value to represent the Internet network plane, the VRF value is set to the second value to represent the leased line network plane, and the VRF value is set to the third value to represent the intranet connection network plane.
8. The VRF-based multi-plane BGP gateway state detection system according to claim 5, characterized in that, The third processing module is specifically configured to determine whether the network plane and the gateway are in normal status based on the gateway's BGP neighbor status and the network plane identified by the VRF, including: Within the same VRF-identified network plane, if at least one connection is detected as successful, the network plane is determined to be in a normal state; conversely, if any one of the gateway's network planes is in an abnormal state, the gateway is determined to be in an abnormal state.
9. An electronic device, characterized in that, The electronic device includes a memory and a processor. The memory stores a computer program. When the processor executes the computer program, it implements the steps of the VRF-based multiplane BGP gateway state detection method according to any one of claims 1 to 4.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps of the VRF-based multiplane BGP gateway state detection method according to any one of claims 1 to 4.
Citation Information
Patent Citations
Network element state detection method based on BGP state
CN118353815A
Extending virtual routing and forwarding
US10623315B1