CN112383419A - OSPF network problem warning method, device, computer equipment and storage medium - Google Patents

OSPF network problem warning method, device, computer equipment and storage medium Download PDF

Info

Publication number
CN112383419A
CN112383419A CN202011208992.9A CN202011208992A CN112383419A CN 112383419 A CN112383419 A CN 112383419A CN 202011208992 A CN202011208992 A CN 202011208992A CN 112383419 A CN112383419 A CN 112383419A
Authority
CN
China
Prior art keywords
ospf
link
information
broadcast information
real
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.)
Granted
Application number
CN202011208992.9A
Other languages
Chinese (zh)
Other versions
CN112383419B (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.)
Individual
Original Assignee
Individual
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 Individual filed Critical Individual
Priority to CN202011208992.9A priority Critical patent/CN112383419B/en
Publication of CN112383419A publication Critical patent/CN112383419A/en
Application granted granted Critical
Publication of CN112383419B publication Critical patent/CN112383419B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/06Management of faults, events, alarms or notifications
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/06Management of faults, events, alarms or notifications
    • H04L41/0631Management of faults, events, alarms or notifications using root cause analysis; using analysis of correlation between notifications, alarms or events based on decision criteria, e.g. hierarchy, tree or time analysis
    • H04L41/065Management of faults, events, alarms or notifications using root cause analysis; using analysis of correlation between notifications, alarms or events based on decision criteria, e.g. hierarchy, tree or time analysis involving logical or physical relationship, e.g. grouping and hierarchies
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/12Discovery or management of network topologies
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/02Topology update or discovery

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention relates to a method, a device, computer equipment and a storage medium for alarming OSPF network problems, wherein the method comprises the steps of establishing a neighbor relation for routing equipment in an OSPF area; collecting link state broadcast information of an OSPF area to obtain OSPF link state broadcast information; refining and summarizing OSPF link state broadcast information to obtain OSPF real-time operation state information; comparing and analyzing the OSPF real-time running state information with OSPF running state information stored in a database to obtain an alarm pushing queue; and carrying out alarm pushing according to the alarm pushing queue. The invention can analyze OSPF attribute change in real time and carry out alarm problem of related OSPF network, can not increase network load to the current network, can not omit any OSPF network problem, and realizes real time analysis of OSPF attribute change and carry out alarm problem of related OSPF network.

Description

OSPF network problem warning method, device, computer equipment and storage medium
Technical Field
The invention relates to the technical field of computer networks, in particular to an OSPF network problem warning method, an OSPF network problem warning device, computer equipment and a storage medium.
Background
A network constructed based on the Open Shortest Path First (OSPF) protocol is called an OSPF network.
The existing network management system is realized by training equipment in a network in turn based on SNMP (simple network management protocol), wherein SNMP is a traditional network management technology, and the SNMP-based network management system is an equipment-level monitoring and management system based on periodic polling. Events occurring in the network between polling intervals are missed, and increasing the polling density increases the load of the network, which does not have the capability of monitoring the OSPF network in real time and feeding back OSPF network failures, which is of interest to network managers, for example, some users feed back to access some special network cards, but from the view of a network management system, the states of all routers and links are normal, so it is difficult to determine where to go wrong and how to remove the failures, in fact, some routes are repeatedly changed due to the routing jitter in a short time of OSPF, so that access to some special networks is blocked, but current network management tools do not have the capability of analyzing the real-time routing state of the OSPF network and prompting alarms.
Therefore, there is a need to design a new method for analyzing OSPF attribute changes in real time and performing alarm problem of related OSPF network.
Disclosure of Invention
The invention aims to overcome the defects of the prior art and provides an OSPF network problem warning method, an OSPF network problem warning device, computer equipment and a storage medium.
In order to achieve the purpose, the invention adopts the following technical scheme: the OSPF network problem warning method comprises the following steps:
establishing a neighbor relation for routing equipment in an OSPF area;
collecting link state broadcast information of an OSPF area to obtain OSPF link state broadcast information;
refining and summarizing OSPF link state broadcast information to obtain OSPF real-time operation state information;
comparing and analyzing the OSPF real-time running state information with OSPF running state information stored in a database to obtain an alarm pushing queue;
and carrying out alarm pushing according to the alarm pushing queue.
The further technical scheme is as follows: the refining and summarizing the OSPF link state broadcast information to obtain OSPF real-time operation state information comprises:
judging whether the OSPF link state broadcast information is router link state broadcast information;
if the OSPF link state broadcast information is router link state broadcast information, analyzing the link attribute in the OSPF link state broadcast information to obtain an analysis result;
judging whether the link attribute in the OSPF link state broadcast information is analyzed;
if the analysis of the link attribute in the OSPF link state broadcast information is completed, analyzing fields related to the router access target, connection data and the type of router connection in a message body of the OSPF link state broadcast information to obtain router related attributes;
analyzing fields related to service types in the message body of the OSPF link state broadcast information to obtain service type attributes;
and summarizing the analysis result, the router correlation attribute and the service type attribute to obtain OSPF real-time operation state information.
The further technical scheme is as follows: the analyzing the link attribute in the OSPF link-state broadcast information to obtain an analysis result includes:
analyzing a time field which is about to pass after the generation of the link state broadcast information in a message header of the OSPF link state broadcast information, and storing the time field in a memory to obtain time information;
analyzing a field related to a router ID generating the link state broadcast information in a message header of the OSPF link state broadcast information, and storing the field in a memory to obtain the router ID;
analyzing fields related to the serial number of the link state broadcast information in the message header of the OSPF link state broadcast information, and storing the fields in a memory to obtain the serial number;
analyzing a field related to the total length of the link state broadcast information in a message header of the OSPF link state broadcast information, and storing the field in a memory to obtain the total length;
analyzing the related flag bit in the message body of the OSPF link state broadcast information to obtain flag information;
analyzing a field for describing the number of the link information in a message body of the OSPF link state broadcast information to obtain the number of the links;
and integrating the time information, the router ID, the serial number, the total length, the mark information and the link number to obtain an analysis result.
The further technical scheme is as follows: after the summarizing and analyzing result, the router-related attribute and the service type attribute are obtained to obtain OSPF real-time operation state information, the method further comprises the following steps:
and storing the OSPF real-time running state information in a database.
The further technical scheme is as follows: the comparing and analyzing according to the OSPF real-time operation state information and the OSPF operation state information stored in the database to obtain an alarm push queue includes:
judging whether the OSPF real-time running state information exists in a memory cache;
if the OSPF real-time running state information exists in the memory cache, screening links which exist in the OSPF running state information stored in the database and do not exist in the OSPF real-time running state information to obtain a link-down set, and storing the link-down set in the memory cache;
screening links which do not exist in OSPF operation state information stored in a database and exist in the OSPF real-time operation state information to obtain an upward link set, and storing the upward link set in a memory cache;
screening links which exist in OSPF running state information stored in a database and exist in the OSPF real-time running state information to obtain the same link set;
judging whether the overhead attribute of the router connection in the same link set is changed;
if the overhead attribute of the router connection in the same link set is changed, screening the link with the changed overhead attribute of the router connection to obtain an overhead attribute change set, and storing the overhead attribute change set in a memory cache;
judging whether a link is required to be used as an alarm push content or not;
if the link up is required to be used as the alarm push content, adding the link up set into an alarm push queue;
judging whether the overhead attribute of the link router connection needs to be changed or not as alarm push content;
if the overhead attribute connected with the link router needs to be changed to serve as the alarm pushing content, adding the overhead attribute change set into an alarm pushing queue;
if the OSPF real-time running state information does not exist in the memory cache, storing the OSPF real-time running state information in the memory cache;
and marking all links in the OSPF link state broadcast information as link-up to obtain a link-up set, and executing the judgment to judge whether the link-up is required to be used as an alarm push content.
The further technical scheme is as follows: after the alarm pushing is performed according to the alarm pushing queue, the method further comprises the following steps:
and analyzing the OSPF network alarm in the historical time period to obtain an analysis result, and displaying the analysis result at the terminal.
The further technical scheme is as follows: the analyzing the OSPF network alarm in the historical time period to obtain an analysis result, and displaying the analysis result on the terminal includes:
judging whether the inquired historical time period is legal or not;
if the inquired historical time period is legal, constructing an inquiry statement of OSPF network historical alarm analysis, taking the inquired historical time period as an inquiry condition, and executing related database inquiry operation to obtain a database inquiry result;
judging whether the database query result is empty or not;
if the database query result is empty, generating prompt information for making a query error so as to obtain an analysis result, and displaying the analysis result at the terminal;
and if the database query result is not empty, formatting the database query result to obtain an analysis result, and displaying the analysis result at the terminal.
The invention also provides an OSPF network problem warning device, which comprises:
the establishing unit is used for establishing a neighbor relation for the routing equipment in the OSPF area;
an information collecting unit, configured to collect link-state broadcast information of an OSPF area to obtain OSPF link-state broadcast information;
the refining unit is used for refining and summarizing OSPF link state broadcast information to obtain OSPF real-time operation state information;
the comparison unit is used for comparing and analyzing the OSPF real-time running state information with OSPF running state information stored in the database to obtain an alarm pushing queue;
and the pushing unit is used for carrying out alarm pushing according to the alarm pushing queue.
The invention also provides computer equipment which comprises a memory and a processor, wherein the memory is stored with a computer program, and the processor realizes the method when executing the computer program.
The invention also provides a storage medium storing a computer program which, when executed by a processor, is operable to carry out the method as described above.
Compared with the prior art, the invention has the beneficial effects that: the invention collects the link state broadcast information of the OSPF area by establishing neighbors with the routing equipment in the OSPF area, extracts and summarizes OSPF real-time operation state information from different types of LSA messages, and performs alarm analysis according to the information, thereby being capable of analyzing OSPF attribute change in real time and performing alarm problem of related OSPF network, not increasing network load to the current network, not missing any OSPF network problem, and realizing real-time OSPF attribute change analysis and related OSPF network alarm problem.
The invention is further described below with reference to the accompanying drawings and specific embodiments.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a schematic view of an application scenario of an OSPF network problem warning method according to an embodiment of the present invention;
FIG. 2 is a flow chart illustrating an OSPF network problem warning method according to an embodiment of the present invention;
FIG. 3 is a flow chart illustrating an OSPF network problem alerting method according to another embodiment of the present invention;
FIG. 4 is a schematic block diagram of an OSPF network problem alerting device according to an embodiment of the present invention;
FIG. 5 is a schematic block diagram of an OSPF network problem alerting device according to another embodiment of the present invention;
FIG. 6 is a schematic block diagram of a computer device provided by an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It will be understood that the terms "comprises" and/or "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It is also to be understood that the terminology used in the description of the invention herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used in the specification of the present invention and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
It should be further understood that the term "and/or" as used in this specification and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.
Referring to fig. 1 and fig. 2, fig. 1 is a schematic view of an application scenario of an OSPF network problem warning method according to an embodiment of the present invention. Fig. 2 is a schematic flow chart of an OSPF network problem warning method according to an embodiment of the present invention. The OSPF network problem warning method is applied to a server. The server carries out data interaction with the terminal and a plurality of OSPF area routing devices, extracts and summarizes the information by collecting the link state broadcast information in the OSPF area, compares the previous OSPF running state information stored in the database, and updates the alarm queue according to the comparison result, thereby carrying out alarm push.
Fig. 2 is a flowchart illustrating an OSPF network problem alerting method according to an embodiment of the present invention. As shown in fig. 2, the method includes the following steps S110 to S150.
S110, establishing a neighbor relation for the routing equipment in the OSPF area.
In this embodiment, the neighbor relation refers to a relation that is established between the server and the routing device in the OSPF area and can automatically collect the link-state broadcast information.
S120, collecting the link state broadcast information of the OSPF area to obtain the OSPF link state broadcast information.
In this embodiment, the OSPF Link-State broadcast Information refers to LSA (Link-State Advertisement) Information in the OSPF area, the LSA Information is a packet used by the Link-State protocol and includes Information about neighbor and channel costs, and the LSA Information is received by the routers for maintaining their RIB (Routing table).
The OSPF routing protocol is a link-state routing protocol, where links are interfaces on devices. Link state type routing protocols make routing decisions based on the link state of the connecting source and destination devices. Link state is a description of an interface and its relationship to neighboring network devices, and information of the interface, i.e., information of the link, i.e., state information of the link. The information includes the prefix of the interface, the netmask, the link type of the network to which the interface is connected, the router on the same link with the interface, etc. These link-state information is carried by different types of LSAs and is propagated over the network.
The router stores the collected LSA information in a link-state database and then runs an SPF algorithm to calculate a routing table. The essential difference between the link state database and the routing table is that the database contains the complete link state raw data, while the routing table lists the shortest paths to all known destination networks.
Specifically, the link-state broadcast information of the OSPF area includes five types, namely, router LSAs, each of which generates a type 1 LSA advertisement. This most basic LSA advertisement lists all the links or interfaces of the router and indicates their state and outbound cost along each link, as well as all known OSPF neighbors on that link; in addition, type 1 LSAs also indicate whether a Router is an ABR (Area Border Router) or an ASBR (Autonomous System Border Router), and these LSA advertisements only flood-flood; second, network LSA, type 2 LSA is generated by DR (designated router) for each relay Broadcast network or NBMA (Non-Broadcast-Multiple Access) network in the area. The transit network is directly connected to at least two OSPF routers, and a multiple access network such as Ethernet belongs to the transit network. A type 2 LSA lists the subnet masks of all routers comprising the DR itself and the links that make up the transit network, the DR of the transit link being responsible for advertising a type 2 LSA, which is then flooded to all routers within the area, the type 2 LSA not being propagated across area boundaries, its link state ID being the IP interface address advertising its DR. Unlike router LSAs, network LSAs do not have a metric field; and thirdly, network summary LSAs, wherein the type-3 LSAs are generated by the ABR, the type-3 LSAs advertise the network in one area to other areas in the OSPF autonomous system, the type-1 and type-2 LSAs are limited in the area, and the ABR sends the type-3 LSAs outwards after receiving the type-1 LSAs from other routers in the area so as to advertise the network learned by the type-1 LSAs to other areas. A type 3 LSA is only flooded in one area, but ABR regenerates a type 3 LSA to flood it to other areas; and fourthly, the ASBR gathers the LSA, only when the ASBR exists in the area, the ABR can generate a type 4 LSA, the type 4 LSA identifies the ASBR and provides a route to the ASBR, and the data flow to the external autonomous system requires a routing table to contain information about the ASBR advertising the external route. The link state ID is set to the router ID of the ASBR; and fifthly, the self-governing system external LSA, the LSA of 5 class describes the route for the network outside the OSPF self-governing system, and also comprises the default route outside the self-governing system, the default route is sent by the ASBR and is diffused to the whole AS, the LSA of 5 class is the only LSA notice which is not associated with a specific area in the link state database, the route of OE1 and OE2 does not belong to a certain area and is independent, and the LSA notice of 5 class is subjected to flood diffusion in the whole self-governing system. Its link state ID is the network number of the external network.
By analyzing the content carried by the common LSA of the OSPF, the method discovers that the real-time running state of the OSPF area can be analyzed by collecting the LSA of the router flooded by the OSPF routing equipment in real time, and can carry out related alarm aiming at the link state information carried by the LSA of the router. Connections of different network types may be analyzed with different dimensions.
S130, refining and summarizing the OSPF link state broadcast information to obtain OSPF real-time operation state information.
In this embodiment, the OSPF real-time operating state information refers to a real-time operating state in the OSPF area.
The OSPF Link State broadcast information comprises a message header and a message body, wherein the message header comprises LS age, Options, LS type, Link State ID, updating Router, LS Sequence Number, LS check sum and Length.
LS age is 2 bytes, which indicates the time elapsed after the LSA is generated, and the value of the LSA increases continuously in seconds, regardless of whether the LSA is transmitted on a Link or stored in an LSDB (Link State DataBase). The maximum lifetime is 3600s and the refresh time is 1800 s. If the survival time of a certain LSA exceeds 3600s, the LSA is deleted from the database;
options are 1 byte, and selectable items comprise E, namely running flooding AS _ External _ LSA, MC, namely forwarding IP multicast message, N/P, namely processing Type-7 LSA, and DC, namely processing on-demand link;
the LS type is 1 byte and represents the type of the LSA, and the LS type is 1, which indicates that the type of the LSA is a router LSA; LS type is 2, which indicates that the type of the LSA is network LSA; the LS type is 3, which indicates that the type of the LSA is a network summary LSA; if the LS type is 4, the LSA type is an ASBR summary LSA; the LS type is 5, which indicates that the type of the LSA is an external LSA of the autonomous system;
the Link State ID is 4 bytes, and an LSA is described in the routing domain according to the LS Type and the LSA description in the LSA;
the updating Router is 4 bytes and represents the Router ID for generating the LSA;
the LS Sequence Number is 4 bytes and represents the Sequence Number of the LSA, and other routers can judge which LSA is the latest according to the value;
LS Checksum is 2 bytes, and the checksums of other fields except LS age;
length is 2 bytes and the total Length of the LSA contains the LSA header in bytes.
The message body of the OSPF link state broadcast information comprises the following contents:
v is 1 bit, if the router generating the LSA is the end point of virtual link connection, it is 1;
e is 1 bit, if the router generating the LSA is ASBR, the router is set as 1;
b is 1 bit, if the router generating the LSA is ABR, the router is set as 1;
number of Links is 2 bytes, which represents the Number of link information described in LSA, including all Links and interfaces in a certain area on the router;
link ID is 4 bytes, representing the destination of the router access, whose value depends on the type of connection, see table 1;
link Data is 4 bytes, representing connection Data, the value of which depends on the type of connection, see Table 1;
type is 1 byte, which indicates the Type of router connection, see table 1;
number of TOS is 1 byte, which represents the Number of TOS of different connections;
metric is 2 bytes, which represents the overhead of the router connection;
TOS is 1 byte, which represents service type;
the TOS metric is 2 bytes, indicating TOS overhead information.
TABLE 1 Router LSA Link type and meaning of its Link ID field
Figure DEST_PATH_IMAGE001
In one embodiment, the step S130 may include steps S131 to S136.
S131, judging whether OSPF link state broadcast information is router link state broadcast information;
s132, if the OSPF link state broadcast information is router link state broadcast information, analyzing the link attribute in the OSPF link state broadcast information to obtain an analysis result.
In this embodiment, the analysis result refers to time information, router ID, sequence number, total length, flag information, and link number.
In one embodiment, the step S132 may include steps S1321 to S1327.
S1321, analyzing the time field about the time after the generation of the link state broadcast information in the message header of the OSPF link state broadcast information, and storing the time field in a memory to obtain the time information.
In this embodiment, the time information refers to the content corresponding to the LS age field.
S1322, analyzing the field related to the router ID generating the link state broadcast information in the message header of the OSPF link state broadcast information, and storing in the memory to obtain the router ID.
In this embodiment, the Router ID refers to the content corresponding to the Advertising Router field.
S1323, analyzing the fields related to the sequence number of the link state broadcast information in the message header of the OSPF link state broadcast information, and storing the fields in a memory to obtain the sequence number.
In this embodiment, the sequence number refers to the content corresponding to the LS sequence number field.
S1324, analyzing a field related to the total length of the link state broadcast information in a message header of the OSPF link state broadcast information, and storing the field in a memory to obtain the total length.
In this embodiment, the total Length refers to the content corresponding to the Length field, and is used to parse and verify other attributes included in the LSA.
S1325, analyzing the relevant flag bit in the message body of the OSPF link state broadcast information to obtain the flag information.
In this embodiment, the flag information refers to the content corresponding to the V, E, B flag bit, and binds the router role currently announcing the LSA.
S1326, analyzing the field describing the number of the link information in the message body of the OSPF link state broadcast information to obtain the number of the links.
In this embodiment, the Number of links refers to the content corresponding to the Number of links field, and is used for circularly analyzing the related link attributes
S1327, integrating the time information, the router ID, the serial number, the total length, the mark information and the link number to obtain an analysis result.
S133, judging whether the link attribute in the OSPF link state broadcast information is analyzed;
s134, if the analysis of the link attribute in the OSPF link state broadcast information is completed, analyzing fields related to the router access target, the connection data and the router connection type in the message body of the OSPF link state broadcast information to obtain the router related attribute.
In this embodiment, the router-related attribute refers to a destination accessed by the router, connection data, and a type of router connection.
Specifically, Link ID, Link Data and Type fields of the Link of the OSPF Link state broadcast information are parsed.
S135, analyzing the fields related to the service type in the message body of the OSPF link state broadcast information to obtain the service type attribute.
In this embodiment, the service type attribute refers to a relevant attribute corresponding to the TOS field.
S136, summarizing the analysis result, the router correlation attribute and the service type attribute to obtain OSPF real-time operation state information.
And comparing and analyzing the OSPF real-time running state information acquired in real time, analyzing the previous OSPF running state information to obtain corresponding running state information, and storing.
In an embodiment, after step S136, the method further includes:
and storing the OSPF real-time running state information in a database.
Specifically, the current analysis result, the router correlation attribute and the service type attribute are summarized into a data record; updating the analyzed analysis result, the router related attribute and the service type attribute into a memory cache; and after all the link attributes are analyzed, storing all the link attributes, namely the analysis result, the router related attribute and the service type attribute into a real-time database.
If the OSPF link state broadcast message is not the router link state broadcast message, then entering an end step.
And S140, comparing and analyzing the OSPF real-time running state information with OSPF running state information stored in a database to obtain an alarm pushing queue.
In this embodiment, the alarm push queuing refers to a message set that needs alarm pushing.
In one embodiment, the step S140 may include steps S140 a-S140 l.
S140a, judging whether the OSPF real-time running state information exists in a memory cache;
s140b, if the OSPF real-time running state information exists in the memory cache, screening out links that exist in the OSPF running state information stored in the database and do not exist in the OSPF real-time running state information, so as to obtain a link-down set, and storing the link-down set in the memory cache.
In this embodiment, the link-down set refers to a set of links that exist in the OSPF operating state information stored in the database and do not exist in the OSPF real-time operating state information.
S140c, screening links that do not exist in the OSPF operating state information stored in the database and exist in the OSPF real-time operating state information, so as to obtain an upward link set, and storing the upward link set in a memory cache.
In this embodiment, the link-up set includes a set of links that are not present in the OSPF active state information stored in the database and that are present in the OSPF real-time active state information.
S140d, screening links which exist in the OSPF running state information stored in the database and exist in the OSPF real-time running state information to obtain the same link set.
In this embodiment, the same link set refers to a set formed by links existing in OSPF running state information stored in a database and existing in the OSPF real-time running state information.
S140e, judging whether the overhead attribute of the router connection in the same link set is changed;
s140f, if the overhead attribute of the router connection in the same link set changes, screening out the link with the changed overhead attribute of the router connection to obtain an overhead attribute change set, and storing the overhead attribute change set in a memory cache.
In this embodiment, the cost attribute change set refers to a set of links with changed cost attributes connected to routers in the same link set.
S140g, judging whether the link is required to be used as an alarm push content or not;
s140h, if the link up is required to be used as the alarm push content, adding the link up set into an alarm push queue;
s140i, judging whether the overhead attribute of the link router connection needs to be changed or not as alarm push content;
s140j, if the overhead attribute connected with the link router needs to be changed to serve as the content of alarm pushing, adding the overhead attribute change set into an alarm pushing queue;
s140k, if the OSPF real-time running state information does not exist in the memory cache, storing the OSPF real-time running state information in the memory cache;
s140l, marking all links in the OSPF link-state broadcast information as link-up to obtain a link-up set, and executing the step S140 g.
In this embodiment, the link-up set further includes OSPF link-state broadcast information that does not exist in the memory cache.
And S150, carrying out alarm pushing according to the alarm pushing queue.
The OSPF network problem warning method collects the link state broadcast information of the OSPF area by establishing neighbors with routing equipment in the OSPF area, extracts and summarizes OSPF real-time operation state information from different types of LSA messages, and carries out warning analysis according to the information, thereby being capable of analyzing OSPF attribute change in real time and carrying out warning problem of related OSPF network, not increasing network load to the current network, not missing any OSPF network problem, and realizing analyzing OSPF attribute change in real time and carrying out warning problem of related OSPF network.
Fig. 3 is a flowchart illustrating an OSPF network problem alerting method according to another embodiment of the present invention. As shown in fig. 3, the OSPF network problem warning method of the present embodiment includes steps S210-S270. Steps S210 to S250 are similar to steps S110 to S150 in the above embodiments, and are not described herein again. The added step S260 in the present embodiment is explained in detail below.
S260, analyzing the OSPF network alarm in the historical time period to obtain an analysis result, and displaying the analysis result at the terminal.
In this embodiment, the analysis result refers to a historical alarm condition of the OSPF network.
In one embodiment, the step S260 may include steps S261 to S265.
S261, judging whether the inquired historical time period is legal or not;
s262, if the inquired historical time quantum is legal, an inquiry statement of OSPF network historical alarm analysis is constructed, the inquired historical time quantum is used as an inquiry condition, and relevant database inquiry operation is executed to obtain a database inquiry result.
In this embodiment, the query result of the database refers to the situation of OSPF network alarm in a specified time period queried by using a query statement. The database query result comprises the time of the alarm, the type of the alarm, the additional information of the alarm, the description information of the alarm and the like
S263, judging whether the database query result is empty;
s264, if the database query result is empty, generating prompt information of query error to obtain an analysis result, and displaying the analysis result at a terminal;
and S265, if the database query result is not empty, formatting the database query result to obtain an analysis result, and displaying the analysis result at the terminal.
The OSPF related alarm information is stored, the analysis and backtracking of the operation alarms in the OSPF time period are carried out, and historical data can be analyzed, so that the OSPF alarm condition in a certain specified historical time period is analyzed.
Fig. 4 is a schematic block diagram of an OSPF network problem alerting device 300 according to an embodiment of the present invention. As shown in fig. 4, the present invention further provides an OSPF network problem alarming apparatus 300 corresponding to the above OSPF network problem alarming method. The OSPF network problem alerting device 300 includes elements for performing the OSPF network problem alerting method described above, and may be configured in a server. Specifically, referring to fig. 4, the OSPF network problem alarming apparatus 300 includes an establishing unit 301, an information collecting unit 302, a refining unit 303, a comparing unit 304, and a pushing unit 305.
An establishing unit 301, configured to establish a neighbor relation for a routing device in an OSPF area; an information collecting unit 302, configured to collect link-state broadcast information of an OSPF area to obtain OSPF link-state broadcast information; a refining unit 303, configured to refine and summarize OSPF link-state broadcast information to obtain OSPF real-time operation state information; a comparing unit 304, configured to compare and analyze the OSPF real-time operating state information with OSPF operating state information stored in the database to obtain an alarm push queue; the pushing unit 305 is configured to perform alarm pushing according to the alarm pushing queue.
In an embodiment, the refining unit 303 includes a first determining subunit, a first parsing subunit, a second determining subunit, a second parsing subunit, a third parsing subunit, a summarizing subunit, and a storing subunit.
A first judging subunit, configured to judge whether the OSPF link-state broadcast information is router link-state broadcast information; a first parsing subunit, configured to, if the OSPF link-state broadcast information is router link-state broadcast information, parse a link attribute in the OSPF link-state broadcast information to obtain a parsing result; a second judging subunit, configured to judge whether or not the link attribute in the OSPF link-state broadcast information is completely analyzed; a second parsing subunit, configured to, if the link attribute parsing in the OSPF link-state broadcast information is completed, parse fields, in a message body of the OSPF link-state broadcast information, related to a target accessed by a router, connection data, and a type of router connection, to obtain a router-related attribute; a third parsing subunit, configured to parse a field, related to a service type, in a message body of the OSPF link-state broadcast information to obtain a service type attribute; the collecting subunit is used for collecting the analysis result, the router correlation attribute and the service type attribute so as to obtain OSPF real-time operation state information; and the storage subunit is used for storing the OSPF real-time running state information in a database.
In an embodiment, the first parsing subunit includes a time parsing module, a router ID parsing module, a serial number module, a length module, a flag bit module, a number parsing module, and an integration module.
The time analysis module is used for analyzing a time field which is in a message header of the OSPF link state broadcast information and passes after the generation of the link state broadcast information, and storing the time field in a memory to obtain time information; a router ID analyzing module, configured to analyze a field in a header of the OSPF link state broadcast information, where the field is related to a router ID that generates the link state broadcast information, and store the field in a memory to obtain the router ID; a sequence number module, configured to parse a field in a header of the OSPF link-state broadcast information, where the field is related to a sequence number of the link-state broadcast information, and store the field in a memory to obtain the sequence number; a length module, configured to parse a field in a header of the OSPF link-state broadcast information, where the field is related to a total length of the OSPF link-state broadcast information, and store the field in a memory to obtain the total length; a flag bit module, configured to parse a flag bit related to a packet body of the OSPF link state broadcast information to obtain flag information; a quantity analysis module for analyzing the field describing the quantity of the link information in the message body of the OSPF link state broadcast information to obtain the quantity of the link; and the integration module is used for integrating the time information, the router ID, the serial number, the total length, the mark information and the link number to obtain an analysis result.
In an embodiment, the comparing unit 304 includes a third determining subunit, a downward set acquiring subunit, an upward set acquiring subunit, an identical set acquiring subunit, a fourth determining subunit, a changed set acquiring subunit, a fifth determining subunit, a first adding subunit, a sixth determining subunit, a second adding subunit, an information saving subunit, and a marking subunit.
A third judging subunit, configured to judge whether the OSPF real-time running state information exists in a memory cache; a downward set obtaining subunit, configured to, if the OSPF real-time running state information exists in the memory cache, screen out links that exist in the OSPF running state information stored in the database and do not exist in the OSPF real-time running state information, to obtain a downward link set, and store the downward link set in the memory cache; an upward set acquiring subunit, configured to screen links that do not exist in OSPF operating state information stored in the database and exist in the OSPF real-time operating state information, to obtain an upward link set, and store the upward link set in a memory cache; the same set acquiring subunit is used for screening links which exist in OSPF running state information stored in a database and exist in the OSPF real-time running state information so as to acquire a same link set; a fourth judging subunit, configured to judge whether the overhead attribute of the router connection in the same link set changes; a change set obtaining subunit, configured to, if the overhead attribute of the router connection in the same link set changes, screen out a link whose overhead attribute of the router connection changes, to obtain an overhead attribute change set, and store the overhead attribute change set in a memory cache; a fifth judging subunit, configured to judge whether a link needs to be used as an alarm push content upwards; the first adding subunit is used for adding the link-up set into an alarm push queue if the link-up is required to be used as the alarm push content; a sixth judging subunit, configured to judge whether the overhead attribute of the link router connection needs to be changed to serve as an alarm push content; the second adding subunit is used for adding the overhead attribute change set into the alarm pushing queue if the overhead attribute connected with the link router needs to be changed to serve as the alarm pushing content; an information saving subunit, configured to save the OSPF real-time running state information in a memory cache if the OSPF real-time running state information does not exist in the memory cache; and the marking subunit is used for marking all the links in the OSPF link state broadcast information as the link up to obtain a link up set, and executing the judgment to judge whether the link up is required to be used as alarm push content.
Fig. 5 is a schematic block diagram of an OSPF network problem alerting device 300 according to another embodiment of the present invention. As shown in fig. 5, the OSPF network problem warning device 300 of the present embodiment is added with a history analysis unit 306 on the basis of the above embodiments.
And the history analysis unit 306 is configured to analyze the OSPF network alarm in the history time period to obtain an analysis result, and display the analysis result at the terminal.
In one embodiment, the history analysis unit 306 includes a legal judgment subunit, a query subunit, a result judgment subunit, an error generation subunit, and a formatting subunit.
A legality judging subunit, configured to judge whether the queried historical time period is legal; the query subunit is used for constructing a query statement of OSPF network historical alarm analysis if the queried historical time quantum is legal, taking the queried historical time quantum as a query condition, and executing related database query operation to obtain a database query result; a result judging subunit, configured to judge whether the database query result is empty; the error generation subunit is used for generating prompt information for inquiring errors to obtain an analysis result and displaying the analysis result on the terminal if the database inquiry result is empty; and the formatting subunit is used for formatting the database query result to obtain an analysis result and displaying the analysis result at the terminal if the database query result is not empty.
It should be noted that, as can be clearly understood by those skilled in the art, the specific implementation process of the OSPF network problem warning apparatus 300 and each unit may refer to the corresponding description in the foregoing method embodiment, and for convenience and brevity of description, no further description is provided herein.
The OSPF network problem alerting device 300 described above may be implemented in the form of a computer program that may be run on a computer apparatus as shown in fig. 6.
Referring to fig. 6, fig. 6 is a schematic block diagram of a computer device according to an embodiment of the present application. The computer device 500 may be a server, wherein the server may be an independent server or a server cluster composed of a plurality of servers.
Referring to fig. 6, the computer device 500 includes a processor 502, memory, and a network interface 505 connected by a system bus 501, where the memory may include a non-volatile storage medium 503 and an internal memory 504.
The non-volatile storage medium 503 may store an operating system 5031 and a computer program 5032. The computer programs 5032 include program instructions that, when executed, cause the processor 502 to perform an OSPF network problem alerting method.
The processor 502 is used to provide computing and control capabilities to support the operation of the overall computer device 500.
The internal memory 504 provides an environment for the operation of the computer program 5032 in the non-volatile storage medium 503, and when the computer program 5032 is executed by the processor 502, the processor 502 can execute an OSPF network problem alarm method.
The network interface 505 is used for network communication with other devices. Those skilled in the art will appreciate that the configuration shown in fig. 6 is a block diagram of only a portion of the configuration associated with the present application and does not constitute a limitation of the computer device 500 to which the present application may be applied, and that a particular computer device 500 may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
Wherein the processor 502 is configured to run the computer program 5032 stored in the memory to implement the following steps:
establishing a neighbor relation for routing equipment in an OSPF area; collecting link state broadcast information of an OSPF area to obtain OSPF link state broadcast information; refining and summarizing OSPF link state broadcast information to obtain OSPF real-time operation state information; comparing and analyzing the OSPF real-time running state information with OSPF running state information stored in a database to obtain an alarm pushing queue; and carrying out alarm pushing according to the alarm pushing queue.
In an embodiment, when implementing the step of refining and summarizing OSPF link-state broadcast information to obtain OSPF real-time operation state information, the processor 502 specifically implements the following steps:
judging whether the OSPF link state broadcast information is router link state broadcast information; if the OSPF link state broadcast information is router link state broadcast information, analyzing the link attribute in the OSPF link state broadcast information to obtain an analysis result; judging whether the link attribute in the OSPF link state broadcast information is analyzed; if the analysis of the link attribute in the OSPF link state broadcast information is completed, analyzing fields related to the router access target, connection data and the type of router connection in a message body of the OSPF link state broadcast information to obtain router related attributes; analyzing fields related to service types in the message body of the OSPF link state broadcast information to obtain service type attributes; and summarizing the analysis result, the router correlation attribute and the service type attribute to obtain OSPF real-time operation state information.
In an embodiment, when implementing the step of analyzing the link attribute in the OSPF link-state broadcast information to obtain an analysis result, the processor 502 specifically implements the following steps:
analyzing a time field which is about to pass after the generation of the link state broadcast information in a message header of the OSPF link state broadcast information, and storing the time field in a memory to obtain time information; analyzing a field related to a router ID generating the link state broadcast information in a message header of the OSPF link state broadcast information, and storing the field in a memory to obtain the router ID; analyzing fields related to the serial number of the link state broadcast information in the message header of the OSPF link state broadcast information, and storing the fields in a memory to obtain the serial number; analyzing a field related to the total length of the link state broadcast information in a message header of the OSPF link state broadcast information, and storing the field in a memory to obtain the total length; analyzing the related flag bit in the message body of the OSPF link state broadcast information to obtain flag information; analyzing a field for describing the number of the link information in a message body of the OSPF link state broadcast information to obtain the number of the links; and integrating the time information, the router ID, the serial number, the total length, the mark information and the link number to obtain an analysis result.
In an embodiment, after the step of implementing the summarized parsing result, the router correlation attribute and the service type attribute to obtain the OSPF real-time operation state information, the processor 502 further implements the following steps:
and storing the OSPF real-time running state information in a database.
In an embodiment, when implementing the step of comparing and analyzing the OSPF real-time operating state information with the OSPF operating state information stored in the database to obtain the alarm pushing queue, the processor 502 specifically implements the following steps:
judging whether the OSPF real-time running state information exists in a memory cache; if the OSPF real-time running state information exists in the memory cache, screening links which exist in the OSPF running state information stored in the database and do not exist in the OSPF real-time running state information to obtain a link-down set, and storing the link-down set in the memory cache; screening links which do not exist in OSPF operation state information stored in a database and exist in the OSPF real-time operation state information to obtain an upward link set, and storing the upward link set in a memory cache; screening links which exist in OSPF running state information stored in a database and exist in the OSPF real-time running state information to obtain the same link set; judging whether the overhead attribute of the router connection in the same link set is changed; if the overhead attribute of the router connection in the same link set is changed, screening the link with the changed overhead attribute of the router connection to obtain an overhead attribute change set, and storing the overhead attribute change set in a memory cache; judging whether a link is required to be used as an alarm push content or not; if the link up is required to be used as the alarm push content, adding the link up set into an alarm push queue; judging whether the overhead attribute of the link router connection needs to be changed or not as alarm push content; if the overhead attribute connected with the link router needs to be changed to serve as the alarm pushing content, adding the overhead attribute change set into an alarm pushing queue; if the OSPF real-time running state information does not exist in the memory cache, storing the OSPF real-time running state information in the memory cache; and marking all links in the OSPF link state broadcast information as link-up to obtain a link-up set, and executing the judgment to judge whether the link-up is required to be used as an alarm push content.
In an embodiment, after implementing the step of pushing an alarm according to the alarm pushing queue, the processor 502 further implements the following steps:
and analyzing the OSPF network alarm in the historical time period to obtain an analysis result, and displaying the analysis result at the terminal.
In an embodiment, when implementing the OSPF network alarm analysis in the historical time period to obtain an analysis result, and when the terminal displays the analysis result, the processor 502 specifically implements the following steps:
judging whether the inquired historical time period is legal or not; if the inquired historical time period is legal, constructing an inquiry statement of OSPF network historical alarm analysis, taking the inquired historical time period as an inquiry condition, and executing related database inquiry operation to obtain a database inquiry result; judging whether the database query result is empty or not; if the database query result is empty, generating prompt information for making a query error so as to obtain an analysis result, and displaying the analysis result at the terminal; and if the database query result is not empty, formatting the database query result to obtain an analysis result, and displaying the analysis result at the terminal.
It should be understood that in the embodiment of the present Application, the Processor 502 may be a Central Processing Unit (CPU), and the Processor 502 may also be other general-purpose processors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components, and the like. Wherein a general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
It will be understood by those skilled in the art that all or part of the flow of the method implementing the above embodiments may be implemented by a computer program instructing associated hardware. The computer program includes program instructions, and the computer program may be stored in a storage medium, which is a computer-readable storage medium. The program instructions are executed by at least one processor in the computer system to implement the flow steps of the embodiments of the method described above.
Accordingly, the present invention also provides a storage medium. The storage medium may be a computer-readable storage medium. The storage medium stores a computer program, wherein the computer program, when executed by a processor, causes the processor to perform the steps of:
establishing a neighbor relation for routing equipment in an OSPF area; collecting link state broadcast information of an OSPF area to obtain OSPF link state broadcast information; refining and summarizing OSPF link state broadcast information to obtain OSPF real-time operation state information; comparing and analyzing the OSPF real-time running state information with OSPF running state information stored in a database to obtain an alarm pushing queue; and carrying out alarm pushing according to the alarm pushing queue.
In an embodiment, when the processor executes the computer program to implement the step of refining and summarizing OSPF link-state broadcast information to obtain OSPF real-time operating state information, the following steps are specifically implemented:
judging whether the OSPF link state broadcast information is router link state broadcast information; if the OSPF link state broadcast information is router link state broadcast information, analyzing the link attribute in the OSPF link state broadcast information to obtain an analysis result; judging whether the link attribute in the OSPF link state broadcast information is analyzed; if the analysis of the link attribute in the OSPF link state broadcast information is completed, analyzing fields related to the router access target, connection data and the type of router connection in a message body of the OSPF link state broadcast information to obtain router related attributes; analyzing fields related to service types in the message body of the OSPF link state broadcast information to obtain service type attributes; and summarizing the analysis result, the router correlation attribute and the service type attribute to obtain OSPF real-time operation state information.
In an embodiment, when the processor executes the computer program to implement the step of parsing the link attribute in the OSPF link-state broadcast information to obtain a parsing result, the following steps are specifically implemented:
analyzing a time field which is about to pass after the generation of the link state broadcast information in a message header of the OSPF link state broadcast information, and storing the time field in a memory to obtain time information; analyzing a field related to a router ID generating the link state broadcast information in a message header of the OSPF link state broadcast information, and storing the field in a memory to obtain the router ID; analyzing fields related to the serial number of the link state broadcast information in the message header of the OSPF link state broadcast information, and storing the fields in a memory to obtain the serial number; analyzing a field related to the total length of the link state broadcast information in a message header of the OSPF link state broadcast information, and storing the field in a memory to obtain the total length; analyzing the related flag bit in the message body of the OSPF link state broadcast information to obtain flag information; analyzing a field for describing the number of the link information in a message body of the OSPF link state broadcast information to obtain the number of the links; and integrating the time information, the router ID, the serial number, the total length, the mark information and the link number to obtain an analysis result.
In an embodiment, after the step of executing the computer program to implement the summarized parsing result, the router-related attribute and the service type attribute to obtain the OSPF real-time operating state information, the processor further implements the following steps:
and storing the OSPF real-time running state information in a database.
In an embodiment, when the processor executes the computer program to implement the step of comparing and analyzing the OSPF real-time operating state information with the OSPF operating state information stored in the database to obtain the alarm pushing queue, the following steps are specifically implemented:
judging whether the OSPF real-time running state information exists in a memory cache; if the OSPF real-time running state information exists in the memory cache, screening links which exist in the OSPF running state information stored in the database and do not exist in the OSPF real-time running state information to obtain a link-down set, and storing the link-down set in the memory cache; screening links which do not exist in OSPF operation state information stored in a database and exist in the OSPF real-time operation state information to obtain an upward link set, and storing the upward link set in a memory cache; screening links which exist in OSPF running state information stored in a database and exist in the OSPF real-time running state information to obtain the same link set; judging whether the overhead attribute of the router connection in the same link set is changed; if the overhead attribute of the router connection in the same link set is changed, screening the link with the changed overhead attribute of the router connection to obtain an overhead attribute change set, and storing the overhead attribute change set in a memory cache; judging whether a link is required to be used as an alarm push content or not; if the link up is required to be used as the alarm push content, adding the link up set into an alarm push queue; judging whether the overhead attribute of the link router connection needs to be changed or not as alarm push content; if the overhead attribute connected with the link router needs to be changed to serve as the alarm pushing content, adding the overhead attribute change set into an alarm pushing queue; if the OSPF real-time running state information does not exist in the memory cache, storing the OSPF real-time running state information in the memory cache; and marking all links in the OSPF link state broadcast information as link-up to obtain a link-up set, and executing the judgment to judge whether the link-up is required to be used as an alarm push content.
In an embodiment, after the processor executes the computer program to implement the step of pushing the alarms according to the alarm pushing queue, the processor further implements the following steps:
and analyzing the OSPF network alarm in the historical time period to obtain an analysis result, and displaying the analysis result at the terminal.
In an embodiment, the processor implements the OSPF network alarm analysis in the historical time period by executing the computer program to obtain an analysis result, and when the terminal displays the analysis result, the following steps are specifically implemented:
judging whether the inquired historical time period is legal or not; if the inquired historical time period is legal, constructing an inquiry statement of OSPF network historical alarm analysis, taking the inquired historical time period as an inquiry condition, and executing related database inquiry operation to obtain a database inquiry result; judging whether the database query result is empty or not; if the database query result is empty, generating prompt information for making a query error so as to obtain an analysis result, and displaying the analysis result at the terminal; and if the database query result is not empty, formatting the database query result to obtain an analysis result, and displaying the analysis result at the terminal.
The storage medium may be a usb disk, a removable hard disk, a Read-Only Memory (ROM), a magnetic disk, or an optical disk, which can store various computer readable storage media.
Those of ordinary skill in the art will appreciate that the elements and algorithm steps of the examples described in connection with the embodiments disclosed herein may be embodied in electronic hardware, computer software, or combinations of both, and that the components and steps of the examples have been described in a functional general in the foregoing description for the purpose of illustrating clearly the interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
In the embodiments provided in the present invention, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative. For example, the division of each unit is only one logic function division, and there may be another division manner in actual implementation. For example, various elements or components may be combined or may be integrated into another system, or some features may be omitted, or not implemented.
The steps in the method of the embodiment of the invention can be sequentially adjusted, combined and deleted according to actual needs. The units in the device of the embodiment of the invention can be merged, divided and deleted according to actual needs. In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a storage medium. Based on such understanding, the technical solution of the present invention essentially or partially contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a terminal, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention.
While the invention has been described with reference to specific embodiments, the invention is not limited thereto, and various equivalent modifications and substitutions can be easily made by those skilled in the art within the technical scope of the invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (10)

  1. An OSPF network problem warning method, comprising:
    establishing a neighbor relation for routing equipment in an OSPF area;
    collecting link state broadcast information of an OSPF area to obtain OSPF link state broadcast information;
    refining and summarizing OSPF link state broadcast information to obtain OSPF real-time operation state information;
    comparing and analyzing the OSPF real-time running state information with OSPF running state information stored in a database to obtain an alarm pushing queue;
    and carrying out alarm pushing according to the alarm pushing queue.
  2. 2. The OSPF network problem alerting method of claim 1 wherein said refining and summarizing OSPF link-state broadcast information to obtain OSPF real-time operational state information comprises:
    judging whether the OSPF link state broadcast information is router link state broadcast information;
    if the OSPF link state broadcast information is router link state broadcast information, analyzing the link attribute in the OSPF link state broadcast information to obtain an analysis result;
    judging whether the link attribute in the OSPF link state broadcast information is analyzed;
    if the analysis of the link attribute in the OSPF link state broadcast information is completed, analyzing fields related to the router access target, connection data and the type of router connection in a message body of the OSPF link state broadcast information to obtain router related attributes;
    analyzing fields related to service types in the message body of the OSPF link state broadcast information to obtain service type attributes;
    and summarizing the analysis result, the router correlation attribute and the service type attribute to obtain OSPF real-time operation state information.
  3. 3. The OSPF network problem alerting method of claim 2 wherein said parsing link attributes in said OSPF link-state broadcast message to obtain a parsed result comprises:
    analyzing a time field which is about to pass after the generation of the link state broadcast information in a message header of the OSPF link state broadcast information, and storing the time field in a memory to obtain time information;
    analyzing a field related to a router ID generating the link state broadcast information in a message header of the OSPF link state broadcast information, and storing the field in a memory to obtain the router ID;
    analyzing fields related to the serial number of the link state broadcast information in the message header of the OSPF link state broadcast information, and storing the fields in a memory to obtain the serial number;
    analyzing a field related to the total length of the link state broadcast information in a message header of the OSPF link state broadcast information, and storing the field in a memory to obtain the total length;
    analyzing the related flag bit in the message body of the OSPF link state broadcast information to obtain flag information;
    analyzing a field for describing the number of the link information in a message body of the OSPF link state broadcast information to obtain the number of the links;
    and integrating the time information, the router ID, the serial number, the total length, the mark information and the link number to obtain an analysis result.
  4. 4. The OSPF network problem alerting method of claim 3, wherein after aggregating the parsed results, router-related attributes, and service type attributes to obtain OSPF real-time operational state information, further comprising:
    and storing the OSPF real-time running state information in a database.
  5. 5. The OSPF network problem alerting method of claim 1 wherein comparing and analyzing the OSPF real-time operating state information with OSPF operating state information stored in a database to obtain an alert push queue comprises:
    judging whether the OSPF real-time running state information exists in a memory cache;
    if the OSPF real-time running state information exists in the memory cache, screening links which exist in the OSPF running state information stored in the database and do not exist in the OSPF real-time running state information to obtain a link-down set, and storing the link-down set in the memory cache;
    screening links which do not exist in OSPF operation state information stored in a database and exist in the OSPF real-time operation state information to obtain an upward link set, and storing the upward link set in a memory cache;
    screening links which exist in OSPF running state information stored in a database and exist in the OSPF real-time running state information to obtain the same link set;
    judging whether the overhead attribute of the router connection in the same link set is changed;
    if the overhead attribute of the router connection in the same link set is changed, screening the link with the changed overhead attribute of the router connection to obtain an overhead attribute change set, and storing the overhead attribute change set in a memory cache;
    judging whether a link is required to be used as an alarm push content or not;
    if the link up is required to be used as the alarm push content, adding the link up set into an alarm push queue;
    judging whether the overhead attribute of the link router connection needs to be changed or not as alarm push content;
    if the overhead attribute connected with the link router needs to be changed to serve as the alarm pushing content, adding the overhead attribute change set into an alarm pushing queue;
    if the OSPF real-time running state information does not exist in the memory cache, storing the OSPF real-time running state information in the memory cache;
    and marking all links in the OSPF link state broadcast information as link-up to obtain a link-up set, and executing the judgment to judge whether the link-up is required to be used as an alarm push content.
  6. 6. The OSPF network problem alerting method of any of claims 1-5, wherein after performing an alert push according to the alert push queue, further comprising:
    and analyzing the OSPF network alarm in the historical time period to obtain an analysis result, and displaying the analysis result at the terminal.
  7. 7. The OSPF network problem alerting method of claim 6 wherein analyzing OSPF network alarms during historical time periods to obtain analysis results and presenting the analysis results at a terminal comprises:
    judging whether the inquired historical time period is legal or not;
    if the inquired historical time period is legal, constructing an inquiry statement of OSPF network historical alarm analysis, taking the inquired historical time period as an inquiry condition, and executing related database inquiry operation to obtain a database inquiry result;
    judging whether the database query result is empty or not;
    if the database query result is empty, generating prompt information for making a query error so as to obtain an analysis result, and displaying the analysis result at the terminal;
    and if the database query result is not empty, formatting the database query result to obtain an analysis result, and displaying the analysis result at the terminal.
  8. An OSPF network problem alerting device, comprising:
    the establishing unit is used for establishing a neighbor relation for the routing equipment in the OSPF area;
    an information collecting unit, configured to collect link-state broadcast information of an OSPF area to obtain OSPF link-state broadcast information;
    the refining unit is used for refining and summarizing OSPF link state broadcast information to obtain OSPF real-time operation state information;
    the comparison unit is used for comparing and analyzing the OSPF real-time running state information with OSPF running state information stored in the database to obtain an alarm pushing queue;
    and the pushing unit is used for carrying out alarm pushing according to the alarm pushing queue.
  9. 9. A computer device, characterized in that the computer device comprises a memory, on which a computer program is stored, and a processor, which when executing the computer program implements the method according to any of claims 1 to 7.
  10. 10. A storage medium, characterized in that the storage medium stores a computer program which, when executed by a processor, implements the method according to any one of claims 1 to 7.
CN202011208992.9A 2020-11-03 2020-11-03 OSPF network problem warning method, device, computer equipment and storage medium Active CN112383419B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011208992.9A CN112383419B (en) 2020-11-03 2020-11-03 OSPF network problem warning method, device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011208992.9A CN112383419B (en) 2020-11-03 2020-11-03 OSPF network problem warning method, device, computer equipment and storage medium

Publications (2)

Publication Number Publication Date
CN112383419A true CN112383419A (en) 2021-02-19
CN112383419B CN112383419B (en) 2022-08-05

Family

ID=74576655

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011208992.9A Active CN112383419B (en) 2020-11-03 2020-11-03 OSPF network problem warning method, device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112383419B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113014429A (en) * 2021-02-24 2021-06-22 紫光云技术有限公司 Link relation monitoring system

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101547125A (en) * 2008-03-25 2009-09-30 中国科学院计算技术研究所 System and method for abnormal network positioning of autonomous system
CN101547114A (en) * 2008-03-25 2009-09-30 中国科学院计算技术研究所 Topology processing system and method in autonomous system
CN103178991A (en) * 2011-12-21 2013-06-26 中国移动通信集团黑龙江有限公司 Method and system for analyzing multiple-network relation
CN105262691A (en) * 2015-10-30 2016-01-20 上海斐讯数据通信技术有限公司 Method and device for removing ineffective LSA of OSPF rapidly
US20160269293A1 (en) * 2015-03-11 2016-09-15 Juniper Networks, Inc. Reducing link state protocol traffic during graceful restart
CN106992891A (en) * 2017-04-20 2017-07-28 中国科学院计算技术研究所 A kind of routing configuration method for detecting abnormality and system for ospf network
CN110636008A (en) * 2018-06-22 2019-12-31 中国电信股份有限公司 Network topology information acquisition method, network topology construction system and boundary router
WO2020167790A1 (en) * 2019-02-15 2020-08-20 Futurewei Technologies, Inc. System and method for interior gateway protocol (igp) fast convergence

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101547125A (en) * 2008-03-25 2009-09-30 中国科学院计算技术研究所 System and method for abnormal network positioning of autonomous system
CN101547114A (en) * 2008-03-25 2009-09-30 中国科学院计算技术研究所 Topology processing system and method in autonomous system
CN103178991A (en) * 2011-12-21 2013-06-26 中国移动通信集团黑龙江有限公司 Method and system for analyzing multiple-network relation
US20160269293A1 (en) * 2015-03-11 2016-09-15 Juniper Networks, Inc. Reducing link state protocol traffic during graceful restart
CN105262691A (en) * 2015-10-30 2016-01-20 上海斐讯数据通信技术有限公司 Method and device for removing ineffective LSA of OSPF rapidly
CN106992891A (en) * 2017-04-20 2017-07-28 中国科学院计算技术研究所 A kind of routing configuration method for detecting abnormality and system for ospf network
CN110636008A (en) * 2018-06-22 2019-12-31 中国电信股份有限公司 Network topology information acquisition method, network topology construction system and boundary router
WO2020167790A1 (en) * 2019-02-15 2020-08-20 Futurewei Technologies, Inc. System and method for interior gateway protocol (igp) fast convergence

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
李鹏飞,陈鸣,钱红燕: "ARSAO:一种通用的检测与防御OSPF路由欺骗的机制", 《计算机技术与发展》 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113014429A (en) * 2021-02-24 2021-06-22 紫光云技术有限公司 Link relation monitoring system

Also Published As

Publication number Publication date
CN112383419B (en) 2022-08-05

Similar Documents

Publication Publication Date Title
US7120120B2 (en) Method and system for topology construction and path identification in a two-level routing domain operated according to a simple link state routing protocol
US7889666B1 (en) Scalable and robust troubleshooting framework for VPN backbones
Xiao et al. QoS extension to BGP
US7230949B2 (en) Efficient method and system for automatic discovery and verification of optimal paths through a dynamic multi-point meshed overlay network
US7961642B2 (en) System and method for obtaining network link state information from sequential distance vector routing tables
US7606896B2 (en) Device, method, and program for estimating quality-deteriorated area of network
CN108449210B (en) Network routing fault monitoring system
CN110784373B (en) Virtual network convergence method and device
US11848853B2 (en) System and method for handling IGP flooding topology inconsistency
Al-Naday et al. Information resilience: source recovery in an information-centric network
CN112383419B (en) OSPF network problem warning method, device, computer equipment and storage medium
US8559317B2 (en) Alarm threshold for BGP flapping detection
CN108924011A (en) Monitoring system, relevant device, method and medium for OSPF+ Routing Protocol
CN108600055B (en) Data forwarding method and device and routing equipment
JP5221594B2 (en) Network monitoring apparatus, network monitoring method, and network monitoring program
CN115801654A (en) Route notification method, path establishment method and service data transmission method
CN111935015B (en) MPLS VPN analysis method, device, computer equipment and storage medium
CN112491726B (en) Route searching and analyzing method and device, computer equipment and storage medium
CN114006800B (en) Equipment off-network alarm method and device based on IGP-SPF algorithm
CN117857437A (en) Method and device for determining backup path and nonvolatile storage medium
CN103004149B (en) For the method in certainty equivalents path in a network, network equipment and system
CN116208542A (en) Path announcement method, path calculation method, electronic device, and readable storage medium
WO2003049340A2 (en) Method and system for topology construction and path identification in a two-level routing domain operated according to a simple link state routing protocol
CN115604110A (en) Method and device for updating BGP Update message
CN117834437A (en) Quantitative attribute verification method based on Internet routing configuration

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