Monitoring processing method and device based on BGP (Border Gateway Protocol)

CN120358182APending Publication Date: 2025-07-22ZTE CORP
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410090409.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-01-22
Publication Date
2025-07-22

AI Technical Summary

Technical Problem

The existing BMP protocol cannot implement fine-grained monitoring, resulting in high CPU overhead for router equipment, high pressure for SDN control controllers, and manual configuration cannot keep up with the problem of network scale expansion, affecting network operation and maintenance efficiency and security.

Method used

By extending the BGP flow rules BGP-FS, it constructs routing rule entries, carries BMP monitoring information, and automatically instructs the routing equipment to monitor and report the results, achieving fine-grained BMP monitoring.

Benefits of technology

It realizes automatic and fine-grained BMP monitoring, reduces CPU overhead, improves network flexibility and maintainability, reduces human adjustment errors, and improves operators' security operation and maintenance efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120358182A_ABST
    Figure CN120358182A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a monitoring processing method and device based on a BGP (Border Gateway Protocol), and the method comprises the steps: constructing a BGP-FS routing rule entry through expanding the BGP-FS, and enabling the BGP-FS to carry BMP information needed for starting the monitoring of a BMP monitoring protocol; the BGP-FS routing rule entry is sent to the routing device, the BGP-FS routing rule entry is used for indicating the routing device to conduct monitoring and reporting the monitoring result, the problem of how to monitor the BMP in the related technology can be solved, the BGP-FS is expanded and used for carrying BMP information needed by the BMP to start automatic monitoring, and the purpose of automatic and fine-grained monitoring is achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Embodiments of the present application relate to the field of communication technologies, and in particular, to a monitoring processing method and device based on the Border Gateway Protocol (BGP). Background Art

[0002] Before implementing the BGP Monitoring Protocol (BMP), customers could only obtain the running status of the Border Gateway Protocol (BGP) of devices through manual queries, with low efficiency. After implementing BMP, the monitored devices can report their running status information to the monitoring server by connecting to the monitoring server, greatly improving the efficiency of network monitoring. By understanding the BGP running status through BMP, potential security hazards in the network can be discovered in a timely manner and avoidance measures can be taken, ensuring the stability of the network. The BMP protocol timely sends the BGP neighbor status information and routing change information on the monitored devices to the monitoring server, and the monitoring server sorts and analyzes the collected information to obtain the rules of BGP neighbor status changes and routing refreshes, greatly improving the efficiency of network monitoring.

[0003] However, the current BMP protocol cannot monitor routes in a fine-grained manner. After the function is turned on, all received routes on the neighbor (including those before policy, after policy, and before and after policy) will be packaged and reported to the SDN control controller through the BMP neighbor. This not only brings a significant Central Processing Unit (CPU) overhead to the router device but also causes a great deal of protocol processing pressure on the Software Defined Networking (SDN) control controller.

[0004] In addition, since it is impossible to pre-perceive the nodes or neighbor devices with problems, the BMP function is manually configured in advance. When the network scale continues to expand, manual configuration cannot keep up with the scale, posing a significant challenge to network operation and maintenance.

[0005] Traditional routing was originally designed for traffic forwarding. The routing table entries only contain prefix mask information for destination address matching and traffic egress interface information. Later, with the development needs of network services (such as anti-Distributed Denial of Service (DDOS) attacks and traffic engineering), to support traffic policies (such as static policy routing, etc.), it is required that the forwarding routing table entries can further subdivide data streams, not limited to matching data streams according to the destination address, but also including source address, IP protocol number, port number, etc.; for the processing action information of the flow, it is not limited to forwarding from a certain egress interface, but also includes processing actions such as rate limiting, discarding, and redirecting. However, the biggest limitation of policy routing is that it belongs to a local behavior, requires configuration on each device, has a large manual configuration workload, high requirements for operation and maintenance personnel, and poor maintainability for network tuning, etc.

[0006] To solve the above problems, the Internet Engineering Task Force (IETF) proposed to apply the Border Gateway Protocol (BGP) Flow Specification (FS) protocol on network forwarding devices. After the FS routes are sent to the network devices, they are converted into control policies, ultimately affecting the routing results in the network and achieving the adjustment and optimization of traffic paths. The use of this technology will greatly improve the accuracy of network traffic optimization, enhance network flexibility and maintainability, reduce human adjustment errors, and have an extremely important impact on the secure operation and efficient operation of operators. However, there are defects in the monitoring of BMP.

[0007] For the problem of how to monitor BMP in related technologies, no solution has been proposed yet. Summary of the Invention

[0008] The embodiments of the present application provide a monitoring processing method and device based on the Border Gateway Protocol (BGP) to at least solve the problem of how to monitor BMP in related technologies.

[0009] According to an embodiment of the present application, a monitoring processing method based on the Border Gateway Protocol (BGP) is provided, which is applied to a server. The method includes:

[0010] Construct a BGP-FS routing rule entry by extending the BGP Flow Specification (BGP-FS), where the BGP-FS carries the BMP information required to enable the monitoring of the BGP Monitoring Protocol (BMP).

[0011] Send the BGP-FS routing rule entry to a routing device, where the BGP-FS routing rule entry is used to instruct the routing device to perform monitoring and report the monitoring result.

[0012] According to another embodiment of the present application, a monitoring processing method based on the Border Gateway Protocol (BGP) is further provided, which is applied to a routing device. The method includes:

[0013] The receiving server receives the BGP-FS routing rule entry constructed by extending the BGP flow rule BGP-FS, wherein the BGP-FS carries the BMP information required for enabling the monitoring of the BGP monitoring protocol BMP;

[0014] Monitor according to the BGP-FS routing rule entry, and report the monitoring result to the server.

[0015] According to another embodiment of the present application, there is also provided a monitoring processing device based on the Border Gateway Protocol BGP, which is applied to a server. The device includes:

[0016] A construction module, configured to construct a BGP-FS routing rule entry by extending the BGP flow rule BGP-FS, wherein the BGP-FS carries the BMP information required for enabling the monitoring of the BGP monitoring protocol BMP;

[0017] A sending module, configured to send the BGP-FS routing rule entry to a routing device, wherein the BGP-FS routing rule entry is used to instruct the routing device to perform monitoring and report the monitoring result.

[0018] According to another embodiment of the present application, there is also provided a monitoring processing device based on the Border Gateway Protocol BGP, which is applied to a routing device. The device includes:

[0019] A receiving module, configured to receive the BGP-FS routing rule entry constructed by the server by extending the BGP flow rule BGP-FS, wherein the BGP-FS carries the BMP information required for enabling the monitoring of the BGP monitoring protocol BMP;

[0020] A monitoring module, configured to perform monitoring according to the BGP-FS routing rule entry and report the monitoring result to the server.

[0021] According to still another embodiment of the present application, there is also provided a computer-readable storage medium, in which a computer program is stored, wherein the computer program is set to execute the steps in any one of the above method embodiments when running.

[0022] According to still another embodiment of the present application, there is also provided an electronic device, including a memory and a processor. A computer program is stored in the memory, and the processor is set to run the computer program to execute the steps in any one of the above method embodiments.

[0023] In an embodiment of the present application, a BGP-FS routing rule entry is constructed by extending BGP-FS, and the BGP-FS carries BMP information required for enabling monitoring of the BGP monitoring protocol BMP; the BGP-FS routing rule entry is sent to a routing device, and the BGP-FS routing rule entry is used to instruct the routing device to perform monitoring and report a monitoring result, which can solve the problem of how to monitor BMP in the related art. By extending BGP-FS to carry the BMP information required for automatic monitoring of BMP, the purpose of automatic and fine-grained monitoring is achieved. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] Figure 1 is a hardware structure block diagram of a computer device for a monitoring processing method based on the Border Gateway Protocol (BGP) according to an embodiment of the present application;

[0025] Figure 2 is a flowchart of a monitoring processing method based on the Border Gateway Protocol (BGP) according to an embodiment of the present application Figure 1 ;

[0026] Figure 3 is a schematic diagram of extending BGP attributes according to an embodiment of the present application;

[0027] Figure 4 is a schematic diagram of adding an action item according to an embodiment of the present application;

[0028] Figure 5 is a schematic diagram of adding a sub-tlv in the newly added BGP BMP attribute according to an embodiment of the present application;

[0029] Figure 6 is a schematic diagram of adding a sub-tlv in the newly added BGP BMP attribute according to an optional embodiment of the present application Figure 1 ;

[0030] Figure 7 is a schematic diagram of adding a sub-tlv in the newly added BGP BMP attribute according to an optional embodiment of the present application Figure 2 ;

[0031] Figure 8 is a schematic diagram of adding a sub-tlv in the newly added BGP BMP attribute according to an optional embodiment of the present application Figure 3 ;

[0032] Figure 9 is a schematic diagram of adding a sub-tlv in the newly added BGP BMP attribute according to an optional embodiment of the present application Figure 4 ;

[0033] Figure 10 is a flowchart of a monitoring processing method based on the Border Gateway Protocol (BGP) according to an embodiment of the present applicationFigure 2 ;

[0034] Figure 11 is a schematic diagram of automatically creating a BMP basic session according to an embodiment of the present application;

[0035] Figure 12 is a schematic diagram of BMP reporting a customized time period according to an embodiment of the present application;

[0036] Figure 13 is a schematic diagram of BMP reporting an ipv4 unicast address family route according to an embodiment of the present application;

[0037] Figure 14 is a block diagram of a monitoring processing device based on the Border Gateway Protocol (BGP) according to an embodiment of the present application Figure 1 ;

[0038] Figure 15 is a block diagram of a monitoring processing device based on the Border Gateway Protocol (BGP) according to an embodiment of the present application Figure 2 . Detailed implementation manners

[0039] In the following, embodiments of the present application will be described in detail with reference to the accompanying drawings and in conjunction with the embodiments.

[0040] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and do not necessarily need to describe a specific order or sequence.

[0041] The method embodiments provided in the embodiments of the present application can be executed in a computer device or a similar computing device. Taking being run on a computer device as an example, Figure 1 is a hardware structure block diagram of a computer device for a monitoring processing method based on the Border Gateway Protocol (BGP) according to an embodiment of the present application. As Figure 1 shown, the computer device may include one or more ( Figure 1 only one is shown in Figure 1 a processor 102 (the processor 102 may include, but is not limited to, a processing device such as a microprocessor MCU or a programmable logic device) and a memory 104 for storing data. Among them, the above-mentioned computer device may further include a transmission device 106 for communication functions and an input / output device 108. Those of ordinary skill in the art can understand that Figure 1 the structure shown in Figure 1 is only schematic and does not limit the structure of the above-mentioned computer device. For example, the computer device may further include more or fewer components than

[0042] The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the monitoring and processing method based on the Border Gateway Protocol (BGP) in the embodiments of the present application. The processor 102 executes various functional applications and board matching by running the computer program stored in the memory 104, that is, the above-mentioned method is implemented. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memories, or other non-volatile solid-state memories. In some instances, the memory 104 may further include a memory remotely set relative to the processor 102, and these remote memories can be connected to the computer device through a network. Examples of the above network include, but are not limited to, the Internet, enterprise intranets, local area networks, mobile communication networks, and combinations thereof.

[0043] The transmission device 106 is used to receive or send data via a network. Specific examples of the above network may include a wireless network provided by a communication provider of the computer device. In one instance, the transmission device 106 includes a network adapter (Network Interface Controller, abbreviated as NIC), which can be connected to other network devices through a base station and thus communicate with the Internet. In one instance, the transmission device 106 may be a Radio Frequency (RF) module, which is used to communicate with the Internet wirelessly.

[0044] In this embodiment, a monitoring and processing method based on the Border Gateway Protocol (BGP) running on the above computer device is provided. Figure 2 It is the flow of the monitoring and processing method based on the Border Gateway Protocol (BGP) according to the embodiments of the present application. Figure 1 , applied to a server, such as Figure 2 shown, and this flow includes the following steps:

[0045] Step S202, constructing a BGP-FS routing rule entry by extending BGP-FS, where the BGP-FS carries BMP information required for enabling BMP monitoring.

[0046] Step S204, sending the BGP-FS routing rule entry to a routing device, where the BGP-FS routing rule entry is used to instruct the routing device to perform monitoring and report the monitoring result.

[0047] Through the above steps S202 to S204, the problem of how to monitor BMP in the related art can be solved. By extending BGP-FS to carry the BMP information required for automatically monitoring BMP, the purpose of automatic and fine-grained monitoring is achieved.

[0048] In one embodiment, step S202 may specifically include: when the above BMP information does not contain the neighbor address to be monitored, adding a new action item in BGP-FS, where the action item is used to indicate automatically performing a BMP action; adding a BGP attribute in BGP-FS, Figure 3 is a schematic diagram of an extended BGP attribute according to an embodiment of the present application, as Figure 3 shown, and this BGP attribute is used to carry BMP information.

[0049] In the embodiment of the present application, as Figure 3 shown, the BGP attribute includes Type, Length, and Value; among them, Type is used to indicate that the BGP attribute carries BMP information, Length is used to indicate the length of Value, and Value contains multiple sub-tlvs, and each sub-tlv is used to carry BMP information.

[0050] Figure 4 is a schematic diagram of a newly added action item according to an embodiment of the present application, as Figure 4 shown, adding an action item in the newly added BGP-FS route, that is, automatically performing a BMP action, as Figure 4 the underlined field in (according to RFC8955).

[0051] In another embodiment, step S202 may specifically include: when the above BMP information contains the neighbor address to be monitored, adding a new match item in BGP-FS, where the match item is used to indicate the neighbor address to be monitored; adding a new action item in BGP-FS, where the action item is used to indicate automatically performing a BMP action; adding a BGP attribute in BGP-FS, where the BGP attribute is used to carry BMP information other than the neighbor address to be monitored.

[0052] In the embodiment of the present application, the above BMP information includes the basic data for establishing a BMP session and the monitoring policy. Figure 5 is a schematic diagram of a sub-tlv in the newly added BGP BMP attribute according to an embodiment of the present application, as Figure 5As shown, each sub-tlv includes a sub-tlv type, a sub-tlv length, and a sub-tlv value. Among them, the sub-tlv value is used to carry one of the following: basic data, monitoring policy; the sub-tlv type is one of the following: 0x01, 0x02, 0x03, 0x04. Among them, 0x01 is used to carry basic data, and 0x02, 0x03, and 0x04 are all used to carry monitoring policies. 0x02 is used to carry the time period for BMP monitoring or reporting, 0x03 is used to carry the policy information for BMP monitoring or reporting, and 0x04 is used to carry the address family information for BMP monitoring or reporting.

[0053] In the embodiment of the present application, when the sub-tlv type is 0x01, the sub-tlv value is used to carry basic data. Among them, the sub-tlv value includes: BMP listening port listen-port; BMP neighbor port station-port; address type address-type; BMP neighbor address station-address.

[0054] Figure 6 It is a schematic diagram of the sub-tlv in the newly added BGP BMP attribute according to an alternative embodiment of the present application Figure 1 , such as Figure 6 As shown, type 1, sub-tlv type = 0x01, is used to carry the basic data of the BMP session (must be carried), where:

[0055] listen-port: BMP listening port;

[0056] station-port: The port used by the BMP neighbor to initiate an active health check

[0057] address-type = 1 represents the ipv4 address type;

[0058] address-type = 2 represents the ipv6 address type;

[0059] station-address is divided into an ipv4 address (4 bytes) and an ipv6 address (16 bytes), representing the BMP neighbor address.

[0060] When the sub-tlv type is 0x02, the sub-tlv value includes: start_time, end_time.

[0061] Figure 7 It is a schematic diagram of the sub-tlv in the newly added BGP BMP attribute according to an alternative embodiment of the present applicationFigure 2 , such as Figure 7 shown, type 2, sub-tlv type = 0x02, is used to carry which time periods of BGP routes are reported by BMP, where:

[0062] start_time represents the start time (Greenwich Mean Time), in seconds;

[0063] end_time represents the end time, in seconds;

[0064] BMP needs to report route entries belonging to the time period [start_time, end_time].

[0065] In the case where the sub-tlv type is 0x03, the sub-tlv value includes: flag and rib flag bits. Among them, flag = 1 represents monitoring or reporting routes before the sending policy, flag = 2 represents monitoring or reporting routes after the sending policy, and flag = 3 represents monitoring or reporting routes before and after the sending policy; rib = 1 represents monitoring or reporting routes received from the remote end, rib = 2 represents monitoring or reporting routes received locally, and rib = 3 represents monitoring or reporting routes sent out.

[0066] Figure 8 is a schematic diagram of the sub-tlv in the newly added BGP BMP attribute according to an optional embodiment of the present application Figure 3 , such as Figure 8 shown, type 3, sub-tlv type = 0x03, is used to carry the policy information reported by BMP, where:

[0067] Both the flag and rib flag bits are 1 byte and are extensible. The present invention defines the values as follows:

[0068] flag = 1 represents the route before the sending policy;

[0069] flag = 2 represents the route after the sending policy;

[0070] flag = 3 represents the routes before and after the sending policy;

[0071] rib = 1 represents the route received from the remote end;

[0072] rib = 2 represents the route received locally;

[0073] rib = 3 represents the route sent out.

[0074] In the case where the sub-t lv type is 0x04, the sub-t lv value includes: address family information afi, where afi = 1 represents monitoring or reporting the ipv4 unicast address family, afi = 2 represents monitoring or reporting the ipv6 unicast address family, afi = 3 represents monitoring or reporting the vpnv4 unicast address family, afi = 4 represents monitoring or reporting the vpnv6 unicast address family, afi = 5 represents monitoring or reporting the ipv4-vrf unicast address family, afi = 6 represents monitoring or reporting the ipv6-vrf unicast address family, and afi = 7 represents monitoring or reporting the evpn address family.

[0075] Figure 9 It is a schematic diagram of sub-t lv in the newly added BGP BMP attribute according to an alternative embodiment of the present application Figure 4 , such as Figure 9 shown, type 4, sub-t lv type = 0x04, is used to carry the address family information reported by BMP, where:

[0076] afi = 1 represents sending the ipv4 unicast address family;

[0077] afi = 2 represents sending the ipv6 unicast address family;

[0078] afi = 3 represents sending the vpnv4 unicast address family;

[0079] afi = 4 represents sending the vpnv6 unicast address family;

[0080] afi = 5 represents sending the ipv4-vrf unicast address family;

[0081] afi = 6 represents sending the ipv6-vrf unicast address family;

[0082] afi = 7 represents sending the evpn address family.

[0083] An embodiment of the present application also provides a monitoring and processing method based on the Border Gateway Protocol (BGP), Figure 10 It is a flowchart of the monitoring and processing method based on the Border Gateway Protocol (BGP) according to an embodiment of the present application Figure 2 , such as Figure 10 shown, applied to a routing device, and the process includes the following steps:

[0084] Step S1002, receiving a BGP-FS routing rule entry constructed by the server through extended BGP-FS, where the BGP-FS carries the BMP information required for enabling BMP monitoring;

[0085] Step S1004, performing monitoring according to the BGP-FS routing rule entry and reporting the monitoring result to the server.

[0086] Through the above steps S1002 to S1004, the problem of how to monitor BMP in the related art can be solved, and BGP-FS is extended to carry the BMP information required for automatically monitoring BMP, achieving the purpose of automatic and fine-grained monitoring.

[0087] In one embodiment, in the above step S1004, the monitoring according to the BGP-FS routing rule entry may specifically include: when the BMP information includes the neighbor address to be monitored, monitoring the BGP neighbor corresponding to the neighbor address to be monitored; when the BMP information does not include the neighbor address to be monitored, monitoring all BGP neighbors.

[0088] Optionally, before the above step S1004, the method further includes: parsing the above BGP-FS routing rule entry to obtain the basic data for establishing a BMP session, where the BMP information includes the basic data, and creating a BMP session with the server according to the basic data.

[0089] In another embodiment, the above step S1004 may specifically include: when the above BMP information further includes a monitoring policy, obtaining the monitoring policy from the BGP-FS routing rule entry; monitoring according to the monitoring policy; and reporting the above monitoring result to the server based on the BMP session according to the reporting condition corresponding to the monitoring policy.

[0090] The embodiments of the present application realize automatic BMP collection and reporting, specifically including: traffic anomalies and attack analysis, finding that there are abnormal situations in some BGP neighbors, and it is necessary to monitor the routing entries sent and received on the neighbors; constructing BGP-FS rules, carrying BMP action items, and distributing them to abnormal devices; the device parses the BGP-FS rules, extracts BMP information, automatically establishes a BMP session with the server, and enables BMP monitoring; when extracting BMP information, if the BGP-FS match item includes the destination address, it is used as the neighbor address for BMP monitoring; if the BGP-FS match item does not include the destination address, BMP monitoring is performed on all BGP neighbors on the receiving device; when a routing entry that meets the conditions is generated, it is reported through the BMP session. It solves the thorny problem of manually operating BMP in complex topology scenarios, enhances network flexibility and maintainability, reduces human adjustment errors, and has an extremely important impact on the safe operation and efficient operation of operators; it solves the current problems of high CPU occupancy and untimely performance processing in BMP reporting; it refines the granularity of BMP reporting and gives customers precise customization options; it enriches the action items of BGP-Flowspec and fills the relevant gaps.

[0091] Figure 11 It is a schematic diagram of automatically creating a BMP basic session according to an embodiment of the present application. As Figure 11 shown, it includes:

[0092] (1) After traffic analysis, the BGP-FS server discovers that there are abnormalities in the routing messages from PE2 to PE1 and needs to be monitored in a timely manner;

[0093] (2) The BGP-FS server automatically constructs a BGP-FS routing rule entry:

[0094] The match item is dest-ip 10.10.10.1, representing the neighbor address (PE1) to be monitored;

[0095] The action item is a BMP action item, used to automatically create a BMP session;

[0096] Carry BGP BMP attributes, including the listening port, BMP neighbor port, and BMP neighbor address;

[0097] (3) After receiving the BGP-FS routing rule, device PE2 parses the BGP-FS entry to obtain the basic data for establishing a BMP session; creates a BMP session based on the basic data, and the BMP session is up; according to the RFC7854 protocol standard, route monitoring reports are made for BGP neighbor 10.10.10.1, i.e., PE1.

[0098] (4) The BGP-FS server receives the messages reported by BMP and conducts further analysis.

[0099] Figure 12 It is a schematic diagram of customizing a reporting time period for BMP according to an embodiment of the present application. As Figure 12 shown, it includes: (1) After traffic analysis, the BGP-FS server discovers that there are abnormalities in the routing messages from PE2 to PE1 during the time period [100, 1000] and needs to monitor the routing reception and transmission during this time period;

[0100] (2) The BGP-FS server automatically constructs a BGP-FS routing rule entry:

[0101] The match item is dest-ip 10.10.10.1, representing the neighbor address to be monitored;

[0102] The action item is a BMP action item, used to automatically create a BMP session;

[0103] Carry BGP BMP basic attributes, including the listening port, BMP neighbor port, and BMP neighbor address;

[0104] Carry the BGP BMP time attribute, including start and end times, start-time = 100s, end-time = 1000s;

[0105] (3) After the device PE2 receives the BGP-FS routing rule:

[0106] Parse the BGP-FS entry to obtain the basic data and time data for establishing the BMP session;

[0107] Create a BMP session based on the basic data;

[0108] The BMP session is up;

[0109] According to the RFC7854 protocol standard, perform routing monitoring and reporting on the BGP neighbor 10.10.10.1, i.e., PE1;

[0110] Only the routing entries with the generated time in the range of [100, 2000] will be selected for reporting;

[0111] (4) The BGP-FS server receives the message reported by the BMP and conducts further analysis.

[0112] Figure 13 It is a schematic diagram of the BMP reporting the IPv4 unicast address family route according to the embodiment of the present application, as Figure 13 shown, including:

[0113] (1) After traffic analysis, the BGP-FS server discovers that there are abnormalities in the IPv4 unicast routing from PE2 to PE1 and needs to monitor the sending and receiving of IPv4 unicast routes;

[0114] (2) The BGP-FS server automatically constructs a BGP-FS routing rule entry:

[0115] The match item is dest-ip 10.10.10.1, representing the neighbor address to be monitored;

[0116] The action item is the BMP action item, used to automatically create a BMP session;

[0117] Carry the BGP BMP basic attributes, including the listening port, BMP neighbor port, and BMP neighbor address;

[0118] Carry the BGP BMP address family attribute, including the afi = 1 data;

[0119] (3) After the device PE2 receives the BGP-FS routing rule:

[0120] Parse the BGP-FS entry to obtain the basic data and address family data for establishing the BMP session;

[0121] Create a BMP session based on the basic data;

[0122] The BMP session goes up;

[0123] According to the RFC7854 protocol standard, monitor and report the routing of BGP neighbor 10.10.10.1, i.e., PE1;

[0124] Only the routing entries of the ipv4 unicast address family will be selected for reporting;

[0125] (4) The BGP-FS server receives the message reported by BMP and conducts further analysis.

[0126] The embodiment of the present application also provides a monitoring and processing device based on the Border Gateway Protocol (BGP), Figure 14 which is the block diagram of the monitoring and processing device based on the Border Gateway Protocol (BGP) according to the embodiment of the present application, Figure 1 , as Figure 14 shown, applied to a server, and the device includes:

[0127] A construction module 142, configured to construct a BGP-FS routing rule entry by extending the BGP flow rule BGP-FS, where the BGP-FS carries BMP information required for enabling the BGP monitoring protocol BMP monitoring;

[0128] A sending module 144, configured to send the BGP-FS routing rule entry to a routing device, where the BGP-FS routing rule entry is used to instruct the routing device to perform monitoring and report the monitoring result.

[0129] In one embodiment, the construction module 142 is further configured to, when the BMP information does not include the neighbor address to be monitored, add a new action item in the BGP-FS, where the action item is used to indicate automatically performing a BMP action; and add a new BGP attribute in the BGP-FS, where the BGP attribute is used to carry the BMP information.

[0130] In one embodiment, the construction module 142 is further configured to, when the BMP information includes the neighbor address to be monitored, add a new match item in the BGP-FS, where the match item is used to indicate the neighbor address to be monitored; add a new action item in the BGP-FS, where the action item is used to indicate automatically performing a BMP action; and add a new BGP attribute in the BGP-FS, where the BGP attribute is used to carry the BMP information except the neighbor address to be monitored.

[0131] In one embodiment, the BGP attributes include Type, Length, and Value. Among them, the Type is used to indicate that the BGP attribute carries the BMP information, the Length is used to indicate the length of the Value, and the Value contains multiple sub-tlvs, and each sub-tlv is used to carry the BMP information.

[0132] In one embodiment, the BMP information includes the basic data for establishing a BMP session and the monitoring policy.

[0133] Each sub-tlv includes a sub-tlv type, a sub-tlv length, and a sub-tlv value. Among them, the sub-tlv value is used to carry one of the following: the basic data, the monitoring policy.

[0134] The sub-tlv type is one of the following: 0x01, 0x02, 0x03, 0x04. Among them, 0x01 is used to carry the basic data, and 0x02, 0x03, and 0x04 are all used to carry the monitoring policy. 0x02 is used to carry the time period for BMP monitoring or reporting, 0x03 is used to carry the policy information for BMP monitoring or reporting, and 0x04 is used to carry the address family information for BMP monitoring or reporting.

[0135] In one embodiment, when the sub-tlv type is 0x01, the sub-tlv value is used to carry the basic data. Among them, the sub-tlv value includes: BMP listening port listen-port; BMP neighbor port station-port; address type address-type; BMP neighbor address station-address.

[0136] When the sub-tlv type is 0x02, the sub-tlv value includes: start_time, end_time.

[0137] When the sub-tlv type is 0x03, the sub-tlv value includes: flag and rib flag bits. Among them, flag = 1 represents monitoring or reporting the routes before the sending policy, flag = 2 represents monitoring or reporting the routes after the sending policy, and flag = 3 represents monitoring or reporting the routes before and after the sending policy; rib = 1 represents monitoring or reporting the routes received from the remote end, rib = 2 represents monitoring or reporting the routes received locally, and rib = 3 represents monitoring or reporting the routes sent out.

[0138] When the sub-t lv type is 0x04, the sub-t lv value includes: address family information afi, where afi = 1 represents monitoring or reporting the ipv4 unicast address family, afi = 2 represents monitoring or reporting the ipv6 unicast address family, afi = 3 represents monitoring or reporting the vpnv4 unicast address family, afi = 4 represents monitoring or reporting the vpnv6 unicast address family, afi = 5 represents monitoring or reporting the ipv4-vrf unicast address family, afi = 6 represents monitoring or reporting the ipv6-vrf unicast address family, and afi = 7 represents monitoring or reporting the evpn address family.

[0139] An embodiment of the present application also provides a monitoring processing device based on the Border Gateway Protocol (BGP). Figure 15 It is a block diagram of the monitoring processing device based on the Border Gateway Protocol (BGP) according to the embodiment of the present application. Figure 2 , as Figure 15 shown, applied to a routing device, the device includes:

[0140] A receiving module 152, configured to receive a BGP-FS routing rule entry constructed by a server through an extended BGP flow rule (BGP-FS), where the BGP-FS carries BMP information required for enabling BGP Monitoring Protocol (BMP) monitoring.

[0141] A monitoring module 154, configured to perform monitoring according to the BGP-FS routing rule entry and report the monitoring result to the server.

[0142] In one embodiment, the monitoring module 154 is further configured to monitor the BGP neighbor corresponding to the neighbor address to be monitored when the BMP information includes the neighbor address to be monitored; and monitor all BGP neighbors when the BMP information does not include the neighbor address to be monitored.

[0143] In one embodiment, the device further includes:

[0144] A parsing module, configured to parse the BGP-FS routing rule entry to obtain basic data for establishing a BMP session, where the BMP information includes the basic data.

[0145] A creating module, configured to create a BMP session with the server according to the basic data.

[0146] In one embodiment, the monitoring module 154 is further configured to obtain the monitoring policy from the BGP-FS routing rule entry when the BMP information further includes a monitoring policy; perform monitoring according to the monitoring policy; and report the monitoring result to the server based on the BMP session according to the reporting condition corresponding to the monitoring policy.

[0147] Embodiments of the present application further provide a computer-readable storage medium storing a computer program, wherein the computer program is configured to execute the steps in any one of the above method embodiments when running.

[0148] In an exemplary embodiment, the above computer-readable storage medium may include, but is not limited to, various media capable of storing computer programs such as USB flash drives, read-only memories (ROM), random access memories (RAM), mobile hard disks, magnetic disks, or optical discs.

[0149] Embodiments of the present application further provide an electronic device including a memory and a processor, where the memory stores a computer program, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.

[0150] In an exemplary embodiment, the above electronic device may further include a transmission device and an input / output device, where the transmission device is connected to the above processor, and the input / output device is connected to the above processor.

[0151] Specific examples in this embodiment may refer to the examples described in the above embodiments and exemplary embodiments, and will not be elaborated herein.

[0152] Obviously, those skilled in the art should understand that the above modules or steps of the present application can be implemented by a general-purpose computing device. They can be concentrated on a single computing device or distributed on a network composed of multiple computing devices. They can be implemented by program codes executable by the computing device, so that they can be stored in a storage device and executed by the computing device. And in some cases, the steps shown or described can be executed in a different order than here, or they can be separately fabricated into individual integrated circuit modules, or multiple modules or steps among them can be fabricated into a single integrated circuit module to implement. In this way, the present application is not limited to any specific combination of hardware and software.

[0153] The above are only the preferred embodiments of the present application and are not used to limit the present application. For those skilled in the art, the present application can have various changes and modifications. Any modification, equivalent replacement, improvement, etc. made within the principle of the present application shall be included in the protection scope of the present application.

Claims

1. A monitoring and processing method based on the Border Gateway Protocol (BGP), which is applied to a server, is characterized in that, The method includes: Constructing a BGP-FS routing rule entry by extending a BGP flow rule BGP-FS, where the BGP-FS carries BMP information required for enabling BGP Monitoring Protocol (BMP) monitoring; Sending the BGP-FS routing rule entry to a routing device, where the BGP-FS routing rule entry is used to instruct the routing device to perform monitoring and report a monitoring result.

2. The method according to claim 1, characterized in that, Constructing a BGP-FS routing rule entry by extending a BGP flow rule BGP-FS includes: When the BMP information does not include a neighbor address to be monitored, adding an action item in the BGP-FS, where the action item is used to instruct an automatic BMP action; Adding a BGP attribute in the BGP-FS, where the BGP attribute is used to carry the BMP information.

3. The method according to claim 1, wherein Constructing a BGP-FS routing rule entry by extending a BGP flow rule BGP-FS includes: When the BMP information includes a neighbor address to be monitored, adding a match item in the BGP-FS, where the match item is used to indicate the neighbor address to be monitored; Adding an action item in the BGP-FS, where the action item is used to instruct an automatic BMP action; Adding a BGP attribute in the BGP-FS, where the BGP attribute is used to carry the BMP information except the neighbor address to be monitored.

4. The method according to claim 2 or 3, wherein the BGP attribute includes a Type, a Length, and a Value; wherein, the Type is used to indicate that the BGP attribute carries the BMP information, the Length is used to indicate the length of the Value, and the Value includes multiple sub-tlvs, and each sub-tlv is used to carry the BMP information.

5. The method according to claim 4, wherein The BMP information includes basic data for establishing a BMP session and a monitoring policy; Each sub-tlv includes a sub-tlv type, a sub-tlv length, and a sub-tlv value, where the sub-tlv value is used to carry one of the following: the basic data, the monitoring policy; The sub-tlv type is one of the following: 0x01, 0x02, 0x03, 0x04, where 0x01 is used to carry the basic data, and 0x02, 0x03, and 0x04 are all used to carry the monitoring policy, 0x02 is used to carry a time period for BMP monitoring or reporting, 0x03 is used to carry policy information for BMP monitoring or reporting, and 0x04 is used to carry address family information for BMP monitoring or reporting.

6. The method according to claim 5, wherein When the sub - tlv type is 0x01, the sub - tlv value is used to carry the basic data, where the sub - tlv value includes: BMP listening port listen - port; BMP neighbor port station - port; address type address - type; BMP neighbor address station - address; When the sub - tlv type is 0x02, the sub - tlv value includes: start time start_time, end time end_time; When the sub - tlv type is 0x03, the sub - tlv value includes: flag and rib flag bits, where flag = 1 represents monitoring or reporting the route before the sending policy, flag = 2 represents monitoring or reporting the route after the sending policy, flag = 3 represents monitoring or reporting the route before and after the sending policy; rib = 1 represents monitoring or reporting the route received from the remote end, rib = 2 represents monitoring or reporting the route received locally, rib = 3 represents monitoring or reporting the route sent out; When the sub - tlv type is 0x04, the sub - tlv value includes: address family information afi, where afi = 1 represents monitoring or reporting the ipv4 unicast address family, afi = 2 represents monitoring or reporting the ipv6 unicast address family, afi = 3 represents monitoring or reporting the vpnv4 unicast address family, afi = 4 represents monitoring or reporting the vpnv6 unicast address family, afi = 5 represents monitoring or reporting the ipv4 - vrf unicast address family, afi = 6 represents monitoring or reporting the ipv6 - vrf unicast address family, afi = 7 represents monitoring or reporting the evpn address family.

7. A monitoring and processing method based on the Border Gateway Protocol (BGP), applied to a routing device, characterized in that, The method includes: Receiving a BGP - FS routing rule entry constructed by a server through an extended BGP flow rule BGP - FS, where the BGP - FS carries BMP information required for enabling the BGP monitoring protocol BMP monitoring; Monitoring according to the BGP - FS routing rule entry and reporting the monitoring result to the server.

8. The method according to claim 7, wherein Monitoring according to the BGP - FS routing rule entry includes: When the BMP information contains the neighbor address to be monitored, monitoring the BGP neighbor corresponding to the neighbor address to be monitored; When the BMP information does not contain the neighbor address to be monitored, monitoring all BGP neighbors.

9. The method according to claim 7, characterized in that, Before monitoring according to the BGP - FS routing rule entry, the method further includes: Parsing the BGP - FS routing rule entry to obtain the basic data for establishing a BMP session, where the BMP information includes the basic data; Creating a BMP session with the server according to the basic data.

10. The method according to claim 9, characterized in that, Monitoring according to the BGP - FS routing rule entry and reporting the monitoring result to the server includes: When the BMP information further includes a monitoring policy, obtain the monitoring policy from the BGP-FS routing rule entry; Perform monitoring according to the monitoring policy; Based on the BMP session, report the monitoring result to the server according to the reporting condition corresponding to the monitoring policy.

11. A monitoring and processing device based on the Border Gateway Protocol (BGP), which is applied to a server, and is characterized in that, The device includes: A construction module, configured to construct a BGP-FS routing rule entry by extending the BGP flow rule BGP-FS, where the BGP-FS carries BMP information required for enabling BGP monitoring protocol BMP monitoring; A sending module, configured to send the BGP-FS routing rule entry to a routing device, where the BGP-FS routing rule entry is used to instruct the routing device to perform monitoring and report a monitoring result.

12. A monitoring and processing device based on the Border Gateway Protocol (BGP), which is applied to a routing device, is characterized in that The device includes: A receiving module, configured to receive a BGP-FS routing rule entry constructed by a server through extending the BGP flow rule BGP-FS, where the BGP-FS carries BMP information required for enabling BGP monitoring protocol BMP monitoring; A monitoring module, configured to perform monitoring according to the BGP-FS routing rule entry and report the monitoring result to the server.

13. A computer-readable storage medium storing a computer program therein, wherein, The computer program is set to execute the method described in any one of claims 1 to 6 and 7 to 10 when running.

14. An electronic device, including a memory and a processor, where a computer program is stored in the memory, and the processor is set to run the computer program to execute the method described in any one of claims 1 to 6 and 7 to 10.