CN115834461B - Method and device for generating BGP global connection diagram based on route analysis - Google Patents

Method and device for generating BGP global connection diagram based on route analysis Download PDF

Info

Publication number
CN115834461B
CN115834461B CN202211402943.8A CN202211402943A CN115834461B CN 115834461 B CN115834461 B CN 115834461B CN 202211402943 A CN202211402943 A CN 202211402943A CN 115834461 B CN115834461 B CN 115834461B
Authority
CN
China
Prior art keywords
route
bgp
domain
cluster
routing
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202211402943.8A
Other languages
Chinese (zh)
Other versions
CN115834461A (en
Inventor
金宇翔
李艳芳
范艳芳
周伟
谷月
苗雨
韩彬
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Pla 61516
Original Assignee
Pla 61516
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Pla 61516 filed Critical Pla 61516
Priority to CN202211402943.8A priority Critical patent/CN115834461B/en
Publication of CN115834461A publication Critical patent/CN115834461A/en
Application granted granted Critical
Publication of CN115834461B publication Critical patent/CN115834461B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The application relates to a method and a device for generating a BGP global connection diagram based on route analysis, which belong to the technical field of network management and are applied to a BGP protocol module; comprising the following steps: through establishing an iBGP peer with a BGP route reflector in a first AS domain, obtaining the advertised BGP route entry information about the BGP route reflector; analyzing BGP route item information, and extracting a plurality of BGP routes; each BGP route includes a plurality of routing attribute fields; drawing a first connection relation diagram corresponding to each BGP route based on the route attribute field; based on the first connection relation diagram corresponding to each BGP route, generating an intra-domain iBGP connection diagram and a cross-domain BGP connection diagram of a first AS domain; and generating a global connection graph of the target management network based on the intra-domain iBGP connection graph and the cross-domain BGP connection graph of the first AS domain. The application relieves the technical problems of large equipment adaptation and total acquisition workload and poor timeliness in the prior art.

Description

Method and device for generating BGP global connection diagram based on route analysis
Technical Field
The present application relates to the field of network management technologies, and in particular, to a method and an apparatus for generating a BGP global connection map based on route analysis.
Background
BGP (english: border Gateway Protocol, chinese: border gateway protocol) is a dynamic routing protocol for transferring and selecting loop-free optimal routes between autonomous systems AS (Autonomous System), currently commonly used as BGP-4 version, and is widely used in carrier backbone networks, internet and large enterprise access, and military backbone communication networks.
BGP is divided into eBGP and iBGP according to its operation. The method comprises the steps that eBGP neighbor relations are established among peers running in different AS and used for publishing and transferring inter-domain routing information across operators or ISPs and the like; the iBGP neighbor relationship is established between peers within the same AS, and is commonly used for delivering user routing and service routing information within the same operator AS. The network operation and maintenance management mechanism generally needs to manage and control the routing equipment of the running BGP protocol to acquire the eBGP and iBGP peer relationship and the routing path, generate a cross-domain and intra-domain connection diagram (i.e., global connection diagram) in the management network range, realize BGP visual management, and improve the network operation and routing management efficiency.
The current common way of generating BGP connectivity graphs is: the network management system adopts SNMP protocol or CLI interface to interact with the nano-pipeline by the equipment, and collects the information of BGP Session, router-ID, routing table and the like on the Router to form a global connection diagram of the management network. This approach has the following drawbacks: 1. routing equipment of different manufacturers or different models and different software versions of the same manufacturer has larger difference between SNMP MIB (simple network management interface) and CLI (customer premise interface) interfaces, lacks a set of standardized and generalized templates, needs to do a large amount of equipment adaptation work in software development, and even cannot adapt due to the old and the old equipment shutdown, unsmooth technical support channels of manufacturers and the like; 2. the effectiveness of the acquisition is limited, and the mode has certain performance loss on all the acquired routing equipment, so that the shortening of the acquisition time interval can cause great influence on the equipment and network performance; 3. the total acquisition of all routing devices running BGP is needed, and when the network scale is large, the number of the related devices is large, and the workload is large.
Disclosure of Invention
In view of the above, the application provides a method and a device for generating a BGP global connection diagram based on route analysis, so as to solve the technical problems of large equipment adaptation and total acquisition workload and poor timeliness in the prior art.
In a first aspect, an embodiment of the present application provides a method for generating a BGP global connection map based on route analysis, which is applied to a BGP protocol module; comprising the following steps: through establishing an iBGP peer with a BGP route reflector in a first AS domain, obtaining the advertised BGP route entry information about the BGP route reflector; the first AS domain is an AS domain in a target management network; analyzing the BGP route item information, and extracting a plurality of BGP routes; each BGP route includes a plurality of routing attribute fields; drawing a first connection relation diagram corresponding to each BGP route based on the route attribute field; the first connection relation diagram comprises the connection relation between the routing equipment and the routing equipment through which each BGP route passes; generating an intra-domain iBGP connection diagram and a cross-domain BGP connection diagram of the first AS domain based on the first connection relationship diagram corresponding to each BGP route; and generating a global connection graph of the target management network based on the intra-domain iBGP connection graph and the cross-domain BGP connection graph of the first AS domain.
Further, the routing attribute field includes an AS path, a routing originator ID, a cluster list, a next hop attribute, a peer address, a community attribute; the cluster list includes a plurality of cluster IDs.
Further, based on the routing attribute field, drawing a first connection relation diagram corresponding to each BGP route, including: drawing a plurality of route equipment icons based on the route originator ID of the first BGP route and the cluster ID in the cluster list; the first BGP route is one BGP route in the plurality of BGP routes; the identification information of the routing equipment icon is a routing ID value; one cluster ID corresponds to one route ID value; the route ID value of the route equipment icon corresponding to the route initiator ID is the route initiator ID value; sequentially drawing a connection line between corresponding routing device icons in the order from the routing originator ID to the rightmost cluster ID in the cluster list and from the rightmost cluster ID to the next right cluster ID in the cluster list until the leftmost cluster ID in the cluster list; if the AS path field of the first BGP route is not empty, judging whether a route originator ID and a cluster list field exist; if the next-hop attribute is different from the ID field value of the route originator, drawing the next-hop attribute AS an ASBR route equipment icon of the AS autonomous domain at the leftmost side of the AS path, and drawing a connecting line between the ASBR route equipment icon and the route equipment icon corresponding to the route originator ID to form a pair of cross-domain BGP connection relations; if the next-hop attribute does not exist and the value of the peer address field is different from that of the next-hop attribute, the next-hop attribute is drawn AS an ASBR route device icon of the AS autonomous domain at the leftmost side of the AS path, the peer address is drawn AS a route device icon, the route ID is set AS the value of the peer address field, and a drawing connection line between the two icons forms a pair of cross-domain BGP connection relations.
Further, before drawing the plurality of routing device icons, further includes: determining a route ID value of a routing device icon corresponding to the cluster ID of the first BGP route includes: if the cluster corresponding to the first BGP route only comprises one BGP route reflector, acquiring a first mapping relation table of a cluster ID and a route ID of the BGP route reflector based on network planning information, and determining a route ID value of a route equipment icon corresponding to the cluster ID based on the first mapping relation table; if the cluster corresponding to the first BGP route includes at least two BGP route reflectors and the cluster ID is located at the leftmost side of the cluster list, it is determined that the route ID value of the route device icon corresponding to the cluster ID is a field value of a peer address in a route attribute field of the first BGP route.
Further, the method further comprises the following steps: determining a routing ID value of a routing equipment icon corresponding to the next hop attribute; comprising the following steps: and acquiring a cross-domain link port IP address list and routing ID values of ASBRs of all AS domains based on the network planning information of the target management network, establishing a mapping relation table of the cross-domain link port IP addresses and the routing ID values of the ASBRs, and setting the routing ID value of the cross-domain link port IP address mapping which is the same AS the next hop attribute value of the first BGP route AS the routing ID of the routing equipment icon corresponding to the next hop attribute.
Further, determining a routing ID value of the routing device icon corresponding to the next hop attribute, further includes: all ASBRs of all AS domains announce the IP addresses of the cross-domain link ports to a BGP route reflector in the form of 32-bit mask host addresses, find the 32-bit mask host addresses and the next-hop attribute field values corresponding to the addresses from the received intra-domain routes with the AS path values being empty, and establish a second mapping relation table of the 32-bit mask host addresses and the route ID values by taking the next-hop attribute field values AS the route ID values; and setting a route ID value of the 32-bit mask host address mapping which is the same as the next hop attribute field value of the first BGP route as a route ID value of a route equipment icon corresponding to the next hop attribute based on the second mapping relation table.
Further, the method further comprises the following steps: updating the global connection map of the target management network; comprising the following steps: obtaining BGP update information of the target management network; based on the BGP update message, performing update operation on the global connection graph; the update operation includes any one of: and adding the connection relation of the routing equipment, and deleting the connection relation of the routing equipment.
In a second aspect, an embodiment of the present application further provides an apparatus for generating a BGP global connection map based on route analysis, where the apparatus includes: the system comprises a BGP protocol module, an analysis module, a first drawing module, a second drawing module and a generation module; the BGP protocol module is used for acquiring the advertised BGP route entry information about the BGP route reflector by establishing an iBGP peer with the BGP route reflector in the first AS domain; the first AS domain is an AS domain in a target management network; the analyzing module is used for analyzing the BGP route item information and extracting a plurality of BGP routes; each BGP route includes a plurality of routing attribute fields; the first drawing module is configured to draw a first connection relationship diagram corresponding to each BGP route based on the routing attribute field; the first connection relation diagram comprises the connection relation between the routing equipment and the routing equipment through which each BGP route passes; the second drawing module is configured to generate an intra-domain iBGP connection graph and a cross-domain BGP connection graph of the first AS domain based on the first connection relationship graph corresponding to each BGP route; the generating module is configured to generate a global connection graph of the target management network based on the intra-domain iBGP connection graph and the inter-domain BGP connection graph of the first AS domain.
Further, the routing attribute field includes an AS path, a routing originator ID, a cluster list, a next hop attribute, a peer address, a community attribute; the cluster list comprises a plurality of cluster IDs; the first drawing module is further configured to: drawing a plurality of route equipment icons based on the route originator ID of the first BGP route and the cluster ID in the cluster list; the first BGP route is one BGP route in the plurality of BGP routes; the identification information of the routing equipment icon is a routing ID value; one cluster ID corresponds to one route ID value; the route ID value of the route equipment icon corresponding to the route initiator ID is the route initiator ID value; sequentially drawing a connection line between corresponding routing device icons in the order from the routing originator ID to the rightmost cluster ID in the cluster list and from the rightmost cluster ID to the next right cluster ID in the cluster list until the leftmost cluster ID in the cluster list; if the AS path field of the first BGP route is not empty, judging whether a route originator ID and a cluster list field exist; if the next-hop attribute is different from the ID field value of the route originator, drawing the next-hop attribute AS an ASBR route equipment icon of the AS autonomous domain at the leftmost side of the AS path, and drawing a connecting line between the ASBR route equipment icon and the route equipment icon corresponding to the route originator ID to form a pair of cross-domain BGP connection relations; if the next-hop attribute does not exist and the value of the peer address field is different from that of the next-hop attribute, the next-hop attribute is drawn AS an ASBR route device icon of the AS autonomous domain at the leftmost side of the AS path, the peer address is drawn AS a route device icon, the route ID is set AS the value of the peer address field, and a drawing connection line between the two icons forms a pair of cross-domain BGP connection relations.
Further, the deployment mode of the BGP protocol module includes any one of the following: establishing a BGP peer relationship between a newly added BGP speaker in the target management network and a route in the target management network by using an independent deployment mode; and using an integrated deployment mode, and adding a data standardization processing and output function to the original BGP-4 routing protocol processing function by a BGP routing reflector in the target management network.
The application provides a method and a device for generating a BGP global connection diagram based on route analysis, which are used for receiving BGP route item information at a small number of key points and analyzing to generate a BGP route, and then generating the BGP global connection diagram based on a plurality of route attribute fields of the BGP route.
Drawings
In order to more clearly illustrate the embodiments of the application or the technical solutions in the prior art, the drawings that are needed in the detailed description of the embodiments and the prior art will be briefly described below, it being obvious that the drawings in the following description are some embodiments of the application and that other drawings may be obtained from these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a flowchart of a method for generating a BGP global connection map based on route analysis according to an embodiment of the present application;
fig. 2 is a schematic diagram of a first apparatus for generating a BGP global connection map based on route analysis according to an embodiment of the present application;
fig. 3 is a schematic diagram of a second apparatus for generating a BGP global connection map based on route analysis according to an embodiment of the present application;
fig. 4 is a schematic diagram of a third apparatus for generating a BGP global connection map based on route analysis according to an embodiment of the present application.
Detailed Description
In order to further describe the technical means and effects adopted by the present application for achieving the intended purpose, the following detailed description will refer to the specific implementation, structure, characteristics and effects according to the present application with reference to the accompanying drawings and preferred embodiments.
Embodiment one:
fig. 1 is a flowchart of a method for generating a BGP global connection map based on route analysis according to an embodiment of the present application, where the method is applied to a BGP protocol module, and the BGP protocol module is a module that runs a standard BGP-4 version routing protocol. As shown in fig. 1, the method specifically includes the following steps:
step S102, through establishing an iBGP peer with a BGP route reflector in a first AS domain, obtaining the advertised BGP route entry information about the BGP route reflector; the first AS domain is an AS domain within the target management network.
Step S104, analyzing BGP route item information, extracting a plurality of BGP routes; each BGP route includes a plurality of routing attribute fields.
Optionally, in the embodiment of the present application, the routing attribute field includes an AS Path (AS-Path), a routing Originator ID (origin_id), a Cluster List (cluster_list), a Next-Hop attribute (next_hop), a peer address (peer address), and a Community attribute (Community); wherein the Cluster list includes a plurality of Cluster IDs (cluster_ids).
Step S106, drawing a first connection relation diagram corresponding to each BGP route based on the route attribute field; the first connection graph includes a connection relationship between a routing device and a routing device through which each BGP route passes.
Step S108, based on the first connection relation diagram corresponding to each BGP route, an intra-domain iBGP connection diagram and a cross-domain BGP connection diagram of the first AS domain are generated.
Specifically, by repeating steps S102-S106, a connection relationship diagram corresponding to all BGP routes in the first AS domain may be generated, and when router icons or wires in the connection relationship diagram corresponding to the BGP routes overlap, only one router icon or one wire is reserved.
Step S110, generating a global connection graph of the target management network based on the intra-domain iBGP connection graph and the cross-domain BGP connection graph of the first AS domain.
Specifically, by repeating steps S102-S108, intra-domain iBGP connection maps and inter-domain BGP connection maps of all AS domains in the target management network may be generated, and finally, a global connection map of the target management network is formed.
The application provides a method for generating a BGP global connection diagram based on route analysis, which is characterized in that BGP route item information is received at a small number of key points and analyzed to generate a BGP route, and then a BGP global connection diagram is generated based on a plurality of route attribute fields of the BGP route.
Specifically, step S106 further includes the steps of:
step S1061, drawing a plurality of route device icons based on the route originator ID of the first BGP route and the cluster IDs in the cluster list; the first BGP route is one BGP route in a plurality of BGP routes; the identification information of the routing equipment icon is a routing ID value; one cluster ID corresponds to one route ID value; the route ID (Router-ID) value of the route device icon corresponding to the route originator ID is the route originator ID value.
Specifically, the original_id and all the cluster_ids in the cluster_list in the first BGP route are drawn as corresponding route device icons, and the unique identification information thereof is a Router-ID value. The Router-ID value of the origin_ID routing device icon is the origin_ID value.
Step S1062, sequentially drawing a connection line between the corresponding routing device icons in order from the route originator ID to the rightmost cluster ID in the cluster list and from the rightmost cluster ID to the next right cluster ID in the cluster list, until the leftmost cluster ID in the cluster list.
Specifically, according to the generated route equipment icons, sequentially drawing connecting lines between the corresponding route equipment icons according to the sequence from the rightmost Cluster_ID in the original cluster_ID to the Cluster_List to the next rightmost Cluster_ID in the Cluster_List until the leftmost Cluster_ID, wherein the connecting lines of the virtual icons and other route equipment icons are broken lines, the uncertain iBGP connection relation is represented, and the other connecting lines are solid lines.
Step S1063, if the AS path field of the first BGP route is not empty, judging whether the route originator ID and the cluster list field exist; if yes, step S1064 is performed, and if no, step S1065 is performed.
In step S1064, if the next-hop attribute is different from the route originator ID field value, the next-hop attribute is drawn AS an ASBR route device icon of the AS self-treatment domain at the leftmost side of the AS path, and a connection line is drawn between the ASBR route device icon and the route device icon corresponding to the route originator ID, so AS to form a pair of cross-domain BGP connection relations.
In step S1065, if there is no next hop attribute and the peer address field value are different, the next hop attribute is drawn AS an ASBR routing device icon of the AS self-treatment domain at the leftmost side of the AS path, the peer address is drawn AS a routing device icon, the routing ID is set AS the peer address field value, and a pair of cross-domain BGP connection relations are formed by drawing connection lines between the two icons. Wherein an ASBR (autonomous system border router, autonomous System Boundary Router) is located between the OSPF autonomous system and the non-OSPF network.
Specifically, when the first BGP route AS-Path field is not empty, the following operations are performed: judging whether an original_ID field and a Cluster_List field exist, if so, drawing the next_Hop AS an ASBR route device icon of the AS-Path leftmost AS autonomous domain, and drawing a connection line with the original_ID route device icon to form a pair of cross-domain BGP connection relations; if the next_hop and the peerdaddress field value are not the same, the next_hop is drawn AS an ASBR route device icon of the AS-Path leftmost AS autonomous domain, the peerdaddress is drawn AS a route device icon, the Router-ID is set AS the peerdaddress field value, and a drawing connection line between the two icons forms a pair of cross-domain BGP connection relations.
Optionally, step S1061 further includes: and determining a route ID value of the route equipment icon corresponding to the cluster ID of the first BGP route. Specifically, the method comprises the following steps:
if the cluster corresponding to the first BGP route only comprises one BGP route reflector, acquiring a first mapping relation table of the cluster ID and the route ID of the BGP route reflector based on the network planning information, and determining a route ID value of a route equipment icon corresponding to the cluster ID based on the first mapping relation table;
if the cluster corresponding to the first BGP route comprises at least two BGP route reflectors and the cluster ID is positioned at the leftmost side of the cluster list, determining that the route ID value of the route equipment icon corresponding to the cluster ID is the field value of the peer address in the route attribute field of the first BGP route.
In the embodiment of the application, three possible implementation manners are provided to determine the Router-ID value of the cluster_id routing device icon.
In a first possible implementation manner, in a corresponding network scenario, the Cluster corresponding to the cluster_id includes only 1 route reflector (RouteReflector, RR), and a Router-ID one-to-one mapping table of the cluster_id and the RR may be obtained according to the network planning information, so as to determine a Router-ID value of the cluster_id routing device icon.
In a second possible implementation manner, in the corresponding network scenario, the Cluster corresponding to the cluster_id includes 2 or more RRs, and the cluster_id is located at the leftmost side of the cluster_list, that is, the Cluster is the Cluster where the first BGP RR is located, and then the Router-ID value of the cluster_id routing device icon is set to be the PeerAddress field value in the first BGP routing information.
In a third possible implementation manner, in a corresponding network scenario, when the Cluster corresponding to the cluster_id includes 2 or more RRs and the Router-ID cannot be determined in the two ways, by setting a routing policy on the RR of the Cluster, and when the iBGP peer is notified of a route, adding a specific format Community (Community field) including the Router-ID of the RR and the cluster_id information of the Cluster, where the cluster_id is located, and the device obtains a mapping relationship between the cluster_id and the Router-ID according to the specific format Community in the first BGP route, and after comparing and checking with the network planning information, sets a Router-ID value of the cluster_id routing device icon.
In other possible network scenarios, where the Router-ID cannot be determined in the above manner, this cluster_id routing device icon is set to a virtual icon, not containing the Router-ID value.
The embodiment of the application also provides an implementation mode, wherein the Next Hop is not changed when the routing policy is set on the ASBR to announce the route to the intra-domain BGP RR, and meanwhile, the Next Hop is not changed when the routing policy is set on the BGP RR to announce the route to the device, and the Router-ID of the Next Hop is modified to be ASBR when the routing policy is set on other iBGP peers, so that the next_hop of the BGP route is different from the origin_ID.
Optionally, the method provided by the embodiment of the application further includes: and determining a routing ID value of the routing equipment icon corresponding to the next hop attribute.
Specifically, a list of all ASBR cross-domain link port IP addresses and route ID values of the ASBRs in all AS domains are obtained based on network planning information of a target management network, a mapping relation table of the cross-domain link port IP addresses and the route ID values of the ASBRs is established, and the route ID value of the cross-domain link port IP address mapping which is the same AS the next hop attribute value of the first BGP route is set AS the route ID of a route equipment icon corresponding to the next hop attribute.
Specifically, all ASBRs of all AS domains announce the cross-domain link port IP address to the BGP route reflector in the form of a 32-bit mask host address, find the 32-bit mask host address and the next-hop attribute field value corresponding to the address from the received intra-domain route with the AS path value being null, and establish a second mapping relation table of the 32-bit mask host address and the route ID value by using the next-hop attribute field value AS the route ID value;
and setting the route ID value of the 32-bit mask host address mapping which is the same as the next hop attribute field value of the first BGP route as the route ID value of the route equipment icon corresponding to the next hop attribute based on the second mapping relation table.
In the embodiment of the present application, the Router-ID value corresponding to the next_hop routing device icon may be determined as follows:
in a first possible implementation manner, a list of all ASBR cross-domain link port IP addresses and Router-ID values of the ASBRs in all AS domains are obtained according to network planning information, a Router-ID mapping relation table of the cross-domain link port IP addresses and the ASBRs is established, and the Router-ID value of the cross-domain link port IP address mapping identical to the first BGP route next_hop value is set AS a next_hop routing device icon Router-ID.
In a second possible implementation, all ASBRs of all AS domains announce the cross-domain link port IP address to the BGP RR in the form of a 32-bit mask host address, and the device searches the received intra-domain route with the AS-Path value null for the 32-bit mask host address and a next_hop field value corresponding to the address, and uses the next_hop field value AS a Router-ID value to establish a mapping relationship table between the 32-bit mask host address and the Router-ID. According to the mapping relation table, the Router-ID value of the 32-bit mask host address mapping which is the same as the value of the first BGP route Next_Hop field is set as a Next_Hop route device icon Router-ID.
Optionally, the method provided by the embodiment of the application further includes: updating the global connection map of the target management network. Specifically, the method comprises the following steps:
obtaining BGP update information of a target management network;
based on BGP update message, updating the global connection graph; the update operation includes any one of the following: and adding the connection relation of the routing equipment, and deleting the connection relation of the routing equipment.
The embodiment of the application also provides a BGP global connection map updating method based on route analysis, which comprises the following steps:
when a BGP route Update event newly occurs in the management network, the BGP protocol module receives a BGP Update message, synchronously updates route information to a route database module, and the route database module distinguishes the Update message type as NLRI (network layer reachable message) or Withdraw Routes (withdrawn Routes) and starts to newly add or delete route equipment icons and connecting lines in the connection diagram. Specifically, when the Update message type is NLRI, triggering a new operation; when the Update message type is widthawrroute, a delete operation is triggered.
When executing the new operation, the method for generating the BGP global connection graph based on the route analysis provided by the embodiment of the present application analyzes to obtain the route device icon and the connection line to be drawn, and determines whether the same route device icon and connection line already exist, if so, does not execute the drawing operation, and if not, executes the drawing operation to update the BGP connection graph.
When the deleting operation is executed, the corresponding BGP route item and attribute value are searched in the route database module according to the route address in the Withaw route field, the route equipment icon and the link to be deleted are obtained through analysis according to the same step of the generating method, whether any other BGP route exists or not is judged, the same route equipment icon and link can be generated, if yes, the deleting operation is not executed, and if not, the deleting operation is executed to update the BGP connection diagram.
Optionally, the method provided by the embodiment of the present application further includes periodically updating and manually updating BGP connection graphs, where the method includes: the BGP protocol module supports a Route refreshing function (Route-refresh capability), when establishing a neighbor relation with a peer, the peer is determined to support the same function through a received open message, a Route-refresh message is sent to the peer through a periodical or manual triggering mode, after receiving the message, the peer re-announces all Route information through an NLRI type Update message, the device executes deleting operation on all BGP Route information announced by the peer stored in a Route database according to the method, and then executes a new operation according to the NLRI type Update message, so that BGP connection diagram updating is completed.
Embodiment two:
fig. 2 is a schematic diagram of a first apparatus for generating a BGP global connection map based on route analysis according to an embodiment of the present application. As shown in fig. 2, the apparatus includes: BGP protocol module 10, parsing module 20, first drawing module 30, second drawing module 40 and generating module 50.
Specifically, the BGP protocol module 10 is configured to obtain BGP route entry information about an advertisement of a BGP route reflector by establishing an iBGP peer with the BGP route reflector in the first AS domain; the first AS domain is an AS domain within the target management network.
The parsing module 20 is configured to parse BGP route entry information and extract a plurality of BGP routes; each BGP route includes a plurality of routing attribute fields.
A first drawing module 30, configured to draw a first connection relationship diagram corresponding to each BGP route based on the routing attribute field; the first connection graph includes a connection relationship between a routing device and a routing device through which each BGP route passes.
The second drawing module 40 is configured to generate an intra-domain iBGP connection map and a cross-domain BGP connection map of the first AS domain based on the first connection relationship map corresponding to each BGP route.
A generating module 50, configured to generate a global connection map of the target management network based on the intra-domain iBGP connection map and the inter-domain BGP connection map of the first AS domain.
The application provides a device for generating a BGP global connection diagram based on route analysis, which receives BGP route item information at a small number of key points and analyzes and generates a BGP route, and then generates the BGP global connection diagram based on a plurality of route attribute fields of the BGP route.
Optionally, the routing attribute field includes an AS path, a routing originator ID, a cluster list, a next hop attribute, a peer address, a community attribute; the cluster list includes a plurality of cluster IDs; the first drawing module 30 is further configured to:
drawing a plurality of route equipment icons based on the route originator ID of the first BGP route and the cluster ID in the cluster list; the first BGP route is one BGP route in a plurality of BGP routes; the identification information of the routing equipment icon is a routing ID value; one cluster ID corresponds to one route ID value; the route ID value of the route equipment icon corresponding to the route initiator ID is the route initiator ID value;
sequentially drawing a connecting line between corresponding routing equipment icons according to the sequence from the routing originator ID to the rightmost cluster ID in the cluster list and the sequence from the rightmost cluster ID to the next right cluster ID in the cluster list until the leftmost cluster ID in the cluster list;
if the AS path field of the first BGP route is not empty, judging whether a route originator ID and a cluster list field exist;
if the next hop attribute is different from the ID field value of the route originator, drawing the next hop attribute AS an ASBR route equipment icon of the AS self-treatment domain at the leftmost side of the AS path, and drawing a connecting line between the ASBR route equipment icon and a route equipment icon corresponding to the route originator ID to form a pair of cross-domain BGP connection relations;
if the next hop attribute does not exist and the value of the peer address field is different from that of the next hop attribute, the next hop attribute is drawn AS an ASBR route device icon of the AS autonomous domain at the leftmost side of the AS path, the peer address is drawn AS a route device icon, the route ID is set AS the value of the peer address field, and a drawing connection line between the two icons forms a pair of cross-domain BGP connection relations.
Optionally, in the embodiment of the present application, the BGP protocol module 10 is deployed in any of the following manners:
establishing a BGP peer relationship between a newly added BGP speaker in the target management network and a route in the target management network by using an independent deployment mode;
and using an integrated deployment mode, adding a data standardization processing and output function to the original BGP-4 routing protocol processing function by a BGP routing reflector in the target management network.
In the embodiment of the application, the BGP protocol module uses an integrated deployment mode, is realized by adding data standardization processing and output functions to BGP RRs in the affiliated network, does not have newly built BGP peers, and synchronously updates all routing items received by the BGP RRs after the standardization processing to the routing database module. The difference compared to the stand-alone deployment mode is that: based on the original operation, a BGP RR route device icon is newly added, and the Router-ID is the Router-ID value of the integrated deployment mode BGP RR. When the original_ID and Cluster_List fields exist in the first BGP route, adding BGP RR route equipment icons and drawing connecting lines with the leftmost Cluster_ID route equipment icons of the Cluster_List; when the original_ID and Cluster_List fields do not exist in the first BGP route, a BGP RR route equipment icon and a PeerAddress route equipment icon are added, and a connecting line between the two icons is drawn.
Fig. 3 is a schematic diagram of a second apparatus for generating a BGP global connection map based on route analysis according to an embodiment of the present application, where the apparatus is applied to a network system. As shown in fig. 3, the network system includes BGP RR (route reflector), ASBR (area border router), other routing devices, and interconnection links, where the ASBR, BGP RR, and other routing devices exchange route entry information through BGP protocol.
As shown in fig. 3, the apparatus includes a BGP protocol module 10, a routing database module 60, and a parsing and drawing module 70, where each module may be deployed centrally on the same physical entity or distributed among multiple physical entities.
Specifically, the BGP protocol module 10 runs the BGP-4 version routing protocol, establishes BGP neighbor relation with the nano-pipeline routing device, receives intra-domain and cross-domain routing entries, performs standardization processing, outputs the standardized routing entries to the routing database module 60 for storage, and synchronously updates data in real time according to network change conditions.
The routing database module 60 stores the collected standardized routing entry information and records routing entry changes.
The parsing and drawing module 70 extracts the AS-Path, originator _id, the cluster_list (List of cluster_ids), and the next_ Hop, peerAddress, community field values from the route entry information in the route database, parses and generates BGP peer connection relationship basic data, draws and forms BGP global connection diagrams, and provides interfaces for external system calls, including but not limited to Web page forms.
As shown in fig. 3, the BGP protocol module 10 uses an independent deployment mode, establishes a new BGP peer as a newly added BGP Speaker in the affiliated network and a routing device in the affiliated network, receives BGP route entry information advertised by the new peer, performs standardization processing, and outputs the BGP route entry information to the routing database module.
Optionally, fig. 4 is a schematic diagram of a third apparatus for generating a BGP global connection map based on route analysis according to an embodiment of the present application. As shown in fig. 4, the BGP protocol module 10 uses an integrated deployment mode, and is implemented by adding a data standardization process and an output function to the BGP RR in the affiliated network to maintain the original BGP-4 routing protocol processing function, without newly creating a BGP peer, and outputs the standardized processing result of the routing entry information originally received by the BGP RR to the routing database module.
The present application is not limited to the above embodiments, but is capable of modification and variation in detail, and other modifications and variations can be made by those skilled in the art without departing from the scope of the present application.

Claims (7)

1. A method for generating BGP global connectivity map based on routing analysis, comprising:
through establishing an iBGP peer with a BGP route reflector in a first AS domain, obtaining the advertised BGP route entry information about the BGP route reflector; the first AS domain is an AS domain in a target management network;
analyzing the BGP route item information, and extracting a plurality of BGP routes; each BGP route includes a plurality of routing attribute fields;
drawing a first connection relation diagram corresponding to each BGP route based on the route attribute field; the first connection relation diagram comprises the connection relation between the routing equipment and the routing equipment through which each BGP route passes;
generating an intra-domain iBGP connection diagram and a cross-domain BGP connection diagram of the first AS domain based on the first connection relationship diagram corresponding to each BGP route;
generating a global connection graph of the target management network based on the intra-domain iBGP connection graph and the cross-domain BGP connection graph of the first AS domain;
the routing attribute fields include AS path, routing originator ID, cluster list, next hop attribute, peer address, and community attribute; the cluster list comprises a plurality of cluster IDs;
based on the routing attribute field, drawing a first connection relation diagram corresponding to each BGP route, including:
drawing a plurality of route equipment icons based on the route originator ID of the first BGP route and the cluster ID in the cluster list; the first BGP route is one BGP route in the plurality of BGP routes; the identification information of the routing equipment icon is a routing ID value; one cluster ID corresponds to one route ID value; the route ID value of the route equipment icon corresponding to the route initiator ID is the route initiator ID value;
sequentially drawing a connection line between corresponding routing device icons in the order from the routing originator ID to the rightmost cluster ID in the cluster list and from the rightmost cluster ID to the next right cluster ID in the cluster list until the leftmost cluster ID in the cluster list;
if the AS path field of the first BGP route is not empty, judging whether a route originator ID and a cluster list field exist;
if the next-hop attribute is different from the ID field value of the route originator, drawing the next-hop attribute AS an ASBR route equipment icon of the AS autonomous domain at the leftmost side of the AS path, and drawing a connecting line between the ASBR route equipment icon and the route equipment icon corresponding to the route originator ID to form a pair of cross-domain BGP connection relations;
if the next-hop attribute does not exist and the value of the peer address field is different from that of the next-hop attribute, the next-hop attribute is drawn AS an ASBR route device icon of the AS autonomous domain at the leftmost side of the AS path, the peer address is drawn AS a route device icon, the route ID is set AS the value of the peer address field, and a drawing connection line between the two icons forms a pair of cross-domain BGP connection relations.
2. The method of claim 1, further comprising, prior to drawing the plurality of routing device icons: determining a route ID value of a routing device icon corresponding to the cluster ID of the first BGP route includes:
if the cluster corresponding to the first BGP route only comprises one BGP route reflector, acquiring a first mapping relation table of a cluster ID and a route ID of the BGP route reflector based on network planning information, and determining a route ID value of a route equipment icon corresponding to the cluster ID based on the first mapping relation table;
if the cluster corresponding to the first BGP route includes at least two BGP route reflectors and the cluster ID is located at the leftmost side of the cluster list, it is determined that the route ID value of the route device icon corresponding to the cluster ID is a field value of a peer address in a route attribute field of the first BGP route.
3. The method as recited in claim 1, further comprising: determining a routing ID value of a routing equipment icon corresponding to the next hop attribute; comprising the following steps:
and acquiring a cross-domain link port IP address list and route ID values of ASBRs of all AS domains based on the network planning information of the target management network, establishing a mapping relation table of the cross-domain link port IP addresses and the route ID values of the ASBRs, and setting the route ID value of the cross-domain link port IP address mapping which is the same AS the next hop attribute value of the first BGP route AS the route ID of the route equipment icon corresponding to the next hop attribute.
4. The method of claim 3, wherein determining the routing ID value of the routing device icon corresponding to the next hop attribute further comprises:
all ASBRs of all AS domains announce the IP addresses of the cross-domain link ports to a BGP route reflector in the form of 32-bit mask host addresses, find the 32-bit mask host addresses and the next-hop attribute field values corresponding to the addresses from the received intra-domain routes with the AS path values being empty, and establish a second mapping relation table of the 32-bit mask host addresses and the route ID values by taking the next-hop attribute field values AS the route ID values;
and setting a route ID value of the 32-bit mask host address mapping which is the same as the next hop attribute field value of the first BGP route as a route ID value of a route equipment icon corresponding to the next hop attribute based on the second mapping relation table.
5. The method as recited in claim 1, further comprising: updating the global connection map of the target management network; comprising the following steps:
obtaining BGP update information of the target management network;
based on the BGP update message, performing update operation on the global connection graph; the update operation includes any one of: and adding the connection relation of the routing equipment, and deleting the connection relation of the routing equipment.
6. An apparatus for generating a BGP global connectivity map based on route analysis, comprising: the system comprises a BGP protocol module, an analysis module, a first drawing module, a second drawing module and a generation module; wherein,,
the BGP protocol module is configured to obtain BGP route entry information about an advertisement of a BGP route reflector by establishing an iBGP peer with the BGP route reflector in a first AS domain; the first AS domain is an AS domain in a target management network;
the analyzing module is used for analyzing the BGP route item information and extracting a plurality of BGP routes; each BGP route includes a plurality of routing attribute fields;
the first drawing module is configured to draw a first connection relationship diagram corresponding to each BGP route based on the routing attribute field; the first connection relation diagram comprises the connection relation between the routing equipment and the routing equipment through which each BGP route passes;
the second drawing module is configured to generate an intra-domain iBGP connection graph and a cross-domain BGP connection graph of the first AS domain based on the first connection relationship graph corresponding to each BGP route;
the generating module is configured to generate a global connection graph of the target management network based on the intra-domain iBGP connection graph and the inter-domain BGP connection graph of the first AS domain;
the routing attribute fields include AS path, routing originator ID, cluster list, next hop attribute, peer address, and community attribute; the cluster list comprises a plurality of cluster IDs; the first drawing module is further configured to:
drawing a plurality of route equipment icons based on the route originator ID of the first BGP route and the cluster ID in the cluster list; the first BGP route is one BGP route in the plurality of BGP routes; the identification information of the routing equipment icon is a routing ID value; one cluster ID corresponds to one route ID value; the route ID value of the route equipment icon corresponding to the route initiator ID is the route initiator ID value;
sequentially drawing a connection line between corresponding routing device icons in the order from the routing originator ID to the rightmost cluster ID in the cluster list and from the rightmost cluster ID to the next right cluster ID in the cluster list until the leftmost cluster ID in the cluster list;
if the AS path field of the first BGP route is not empty, judging whether a route originator ID and a cluster list field exist;
if the next-hop attribute is different from the ID field value of the route originator, drawing the next-hop attribute AS an ASBR route equipment icon of the AS autonomous domain at the leftmost side of the AS path, and drawing a connecting line between the ASBR route equipment icon and the route equipment icon corresponding to the route originator ID to form a pair of cross-domain BGP connection relations;
if the next-hop attribute does not exist and the value of the peer address field is different from that of the next-hop attribute, the next-hop attribute is drawn AS an ASBR route device icon of the AS autonomous domain at the leftmost side of the AS path, the peer address is drawn AS a route device icon, the route ID is set AS the value of the peer address field, and a drawing connection line between the two icons forms a pair of cross-domain BGP connection relations.
7. The apparatus of claim 6, wherein the BGP protocol module is deployed in a manner comprising any of:
establishing a BGP peer relationship between a newly added BGP speaker in the target management network and a route in the target management network by using an independent deployment mode;
and using an integrated deployment mode, and adding a data standardization processing and output function to the original BGP-4 routing protocol processing function by a BGP routing reflector in the target management network.
CN202211402943.8A 2022-11-09 2022-11-09 Method and device for generating BGP global connection diagram based on route analysis Active CN115834461B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211402943.8A CN115834461B (en) 2022-11-09 2022-11-09 Method and device for generating BGP global connection diagram based on route analysis

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211402943.8A CN115834461B (en) 2022-11-09 2022-11-09 Method and device for generating BGP global connection diagram based on route analysis

Publications (2)

Publication Number Publication Date
CN115834461A CN115834461A (en) 2023-03-21
CN115834461B true CN115834461B (en) 2023-10-27

Family

ID=85527515

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211402943.8A Active CN115834461B (en) 2022-11-09 2022-11-09 Method and device for generating BGP global connection diagram based on route analysis

Country Status (1)

Country Link
CN (1) CN115834461B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101163109A (en) * 2007-11-14 2008-04-16 中国科学院计算技术研究所 Autonomic system network routing topology constructing method
CN101252488A (en) * 2008-04-15 2008-08-27 中国科学院计算技术研究所 Multi self-governing system router level topology processing system and method
US7787396B1 (en) * 2004-05-27 2010-08-31 Cisco Technology, Inc. Automatic ORF-list creation for route partitioning across BGP route reflectors
CN114363003A (en) * 2019-03-11 2022-04-15 华为技术有限公司 BGP route identification method, device and equipment

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7561588B2 (en) * 2005-07-22 2009-07-14 Cisco Technology, Inc. Processing two-octet and four-octet values using border gateway protocol

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7787396B1 (en) * 2004-05-27 2010-08-31 Cisco Technology, Inc. Automatic ORF-list creation for route partitioning across BGP route reflectors
CN101163109A (en) * 2007-11-14 2008-04-16 中国科学院计算技术研究所 Autonomic system network routing topology constructing method
CN101252488A (en) * 2008-04-15 2008-08-27 中国科学院计算技术研究所 Multi self-governing system router level topology processing system and method
CN114363003A (en) * 2019-03-11 2022-04-15 华为技术有限公司 BGP route identification method, device and equipment

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
互联网域间路由系统动态行为研究与机制设计;王小强;《中国博士学位论文全文数据库信息科技辑》;第43-48页 *

Also Published As

Publication number Publication date
CN115834461A (en) 2023-03-21

Similar Documents

Publication Publication Date Title
JP4112492B2 (en) Use of link state information for IP network topology discovery
Haddadi et al. Network topologies: inference, modeling, and generation
KR100793530B1 (en) Using link state information to discover ip network topology
US8526325B2 (en) Detecting and identifying connectivity in a network
US7593352B2 (en) Discovering MPLS VPN services in a network
US9118587B2 (en) Network multi-path discovery
US7069343B2 (en) Topology discovery by partitioning multiple discovery techniques
US20030112808A1 (en) Automatic configuration of IP tunnels
CN106992891B (en) A kind of routing configuration method for detecting abnormality and system for ospf network
US8165038B2 (en) Network physical connection inference for IP tunnels
US20120320796A1 (en) Method and apparatus for advertising border connection information of autonomous system
WO2021147320A1 (en) Routing abnormity detection method, apparatus and system, and computer storage medium
CN108574628B (en) Method, device and system for establishing domain-level topology
CN104579978B (en) A kind of dynamic network Datalink Layer Topology Discovery method
CN113452561A (en) Topology generation method, device and equipment and readable storage medium
US20040215781A1 (en) Techniques for determining device connectivity in a network using protocol-specific connectivity information
US9087299B2 (en) Inferring connectivity in the presence of conflicting network data
CN115834461B (en) Method and device for generating BGP global connection diagram based on route analysis
CN112787930B (en) Method, device and storage medium for monitoring running state of peer
US7471642B2 (en) Communication terminal, load distribution method and load distribution processing program
CN115277418A (en) BGP network operation and maintenance system
CN111478808B (en) Method, system, electronic device and storage medium for assisting configuration update verification
CN114422415A (en) Egress node processing flows in segmented routing
CN117176639B (en) Multi-protocol-based network topology automatic discovery method and device
CN106603418B (en) Network topology updating method and traffic analysis equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CB03 Change of inventor or designer information
CB03 Change of inventor or designer information

Inventor after: Jin Yuxiang

Inventor after: Li Yanfang

Inventor after: Fan Yanfang

Inventor after: Zhou Wei

Inventor after: Gu Yue

Inventor after: Miao Yu

Inventor after: Han Bin

Inventor before: Jin Yuxiang

Inventor before: Li Yanfang

Inventor before: Fan Yanfang

Inventor before: Zhou Wei

Inventor before: Gu Yue

Inventor before: Miao Yu

Inventor before: Han Bin