Summary of the invention
The objective of the invention is to overcome the deficiencies in the prior art, real-time network route topological treatment system and method in a kind of autonomous system are provided, it utilizes the Link State Advertisement (OSPFLSA) of OSPF, make up the DR relevant topology interior with upgrading autonomous system, subnet annexation in the autonomous system is visual, make things convenient for the network management personnel to find the physical connection relation of subnet, better network is managed, and when the OSPF renewal message that collects is incomplete or out of order, still can set up between the correct router, the annexation of router and subnet.
In order to achieve the above object, the invention provides following technical scheme:
Real-time network route topological treatment system in a kind of autonomous system is characterized in that, comprising:
Before the analytic unit that traces back, be used for the OSPF LSA message according to the routing iinformation acquisition probe collection that receives, the analytic message content is analyzed the network topology change relevant with DR, handle the DR network segment information that respective regions comprises in the DR mapping table, and upgrade the topological diagram in the autonomous system;
The routing iinformation acquisition probe, be used for by physically being deployed to the ospf area of autonomous system, and be communicated in the network by the tunnel, set up syntople with the router of the operation OSPF Routing Protocol of each ospf area in the network, in real time be captured in the OSPF LSA message that this ospf area floods passively, and send to the analytic unit that traces back before described.
Further, the analytic unit that traces back before described comprises Network LSA processing module and Router LSA processing module, wherein:
Described Network LSA processing module, be used for OSPF Network LSA message according to the routing iinformation acquisition probe collection that receives, the analytic message content, front and back two Network LSA message of the router by relatively sending this Network LSA message, analyze the variation of topology relevant in the autonomous system with DR, make up or upgrade the network segment information that comprises this DR in the overall DR mapping table, and upgrade topological diagram;
Described Router LSA processing module, be used for OSPF Router LSA message according to the routing iinformation acquisition probe collection that receives, the analytic message content, front and back two Router LSA message of the router by relatively sending this Router LSA message, and judge whether the Link type among two the Router LSA in front and back is relevant with DR, analyze the change in topology in the autonomous system, make up, delete or upgrade the network segment information that comprises this DR in the overall DR mapping table, and upgrade topological diagram.
Further, described DR network segment information comprises the data structure that contains following content: ordinary router tabulation, the IP address of the DR network segment, the IP address of DR, the connection router-list of DR.
Further, that the ospf protocol of described routing iinformation acquisition probe and router relation is lost or when setting up, the analytic unit that traces back before described sends the control message that neighbours lose or neighbours set up.
Further, real-time network route topological treatment system in the described autonomous system also comprises the message field sub-module, be used to distinguish the type of message of described routing iinformation acquisition probe and the analytic unit transmission of before tracing back, described type of message one class be the routing iinformation acquisition probe by with network in ospf router set up the route updating packet that neighborhood obtains; Another kind of be that the routing iinformation acquisition probe is sent and network in neighborhood between the ospf router control message setting up or lose.
Further, when the analytic unit that traces back before described, control message that the neighborhood in receiving that the routing iinformation acquisition probe is sent and network between the ospf router is lost, remove the annexation of this router and other routers, subnet, upgrade topological diagram.
Further, real-time network route topological treatment system in the described autonomous system also comprises configuration module, be used for the router in the described routing iinformation acquisition probe coverage is carried out the OSPF configuration, make the router of setting up the tunnel in routing iinformation acquisition probe and the autonomous system set up the OSPF full adjacency, collect the message information in each zone.
The present invention also provides the real-time network route topological processing method in a kind of autonomous system, comprises the steps:
Step S1 ' by in the ospf area that physically is deployed to autonomous system, passively is captured in renewal message that this ospf area flood in real time with the routing iinformation acquisition probe, and the analytic unit that traces back before being transferred to;
Step S1, before the OSPF that analytic unit gathers according to the routing iinformation acquisition probe that receives that traces back upgrade message, the analytic message content, analyze the network topology change relevant with DR, make up, delete or upgrade the DR network segment information that respective regions comprises in the overall DR mapping table, and upgrade the topological diagram in the autonomous system.
Further, in described step S1 ', comprise that also the routing iinformation acquisition probe extracts each LSA from each OSPF that receives renewal message, increase this message from ospf router IP address, the autonomous system field under this router, and the respective field of OSPF header.
Further, described step S1 specifically comprises the steps:
Step S11, the preceding analytic unit that traces back receives OSPF and upgrades message, judges OSPF LSA type, if OSPF LSA type is Network LSA, then changes step S12; If OSPF LSA type is Router LSA, then change step S13;
Step S12, before the OSPFNetwork LSA message that analytic unit gathers according to the routing iinformation acquisition probe that receives that traces back, the analytic message content, by two Network LSA messages before and after comparing, analyze the variation of topology relevant in the autonomous system with DR, make up or upgrade the network segment information that comprises this DR in the overall DR mapping table, change step S14;
Step S13, before the OSPFRouter LSA message that analytic unit gathers according to the routing iinformation acquisition probe that receives that traces back, the analytic message content, front and back two Router LSA message of the router by relatively sending this Router LSA message, and judge whether the Link type among two the Router LSA in front and back is relevant with DR, analyze the change in topology in the autonomous system, make up, delete or upgrade the network segment information that comprises this DR in the overall DR mapping table, change step S14;
Step S14 according to analysis result topology information in the neofield more, changes step S11.
Further, in described step S14, topology information comprises in the described more neofield: set up or delete the annexation between annexation, router and the subnet between the router; Wherein, when the annexation of setting up between the router, check with the corresponding reverse annexation of newly-established unidirectional annexation and whether set up, if set up, then set up the annexation between the router, otherwise wouldn't set up the annexation between the router.
Further, the network segment information of described DR comprises the data structure that contains following content: ordinary router tabulation, the IP address of the DR network segment, the IP address of DR, the connection router-list of DR.
Further, among the described step S11, also comprise distinguish the OSPF receive upgrade message be OSPF LSA message, or the routing iinformation acquisition probe sent and network in neighborhood between the ospf router application layer control message setting up or lose; If the application layer that judged result is described neighborhood loses is controlled message, then remove the annexation of this router and other routers, subnet, change step S14.
Further, described step S12 specifically comprises the steps:
Step S1201 if the age of this Network LSA surpasses the maximum age or this Network LSA is identical with the nearest Network LSA that current RouterID sends before, then changes step S11; Otherwise change step S1202;
Step S1202, whether respective regions comprises the network segment information of DR in the DR mapping table of the judgement overall situation, if not, then make up the network segment information of this Network DR that LSA comprises, and be index with regional number and interface message, join in the overall DR mapping table, change step S1204; If then change step S1203;
Step S1203, whether the IP field of judging the DR network segment in the DR network segment information is empty, if be empty, then fill in the IP address field of the DR in the DR network segment information, ordinary router tabulation in the traversal DR network segment information, set up the monolateral link relation of the IP address of the router sensing DR in this tabulation, change step S1204; If be not empty, then change step S1204;
Step S1204, upgrade the IP address field of the DR in the DR network segment information and the IP address of the DR network segment, the router-list that is connected of more current DR network segment information and original DR network segment information, remove the two-way link relation that no longer exists, increase the one way link relation of newly-increased router and current RouterID, and set up the annexation of the newly-increased router and the DR network segment; The DR that the router that adheres among the current Network LSA is filled in to the DR network segment information connects in the router-list, changes step S11.
Further, described step S13 specifically comprises:
Step S1301, the OSPF that the preceding analytic unit that traces back is gathered according to the routing iinformation acquisition probe that receives
Router LSA message, the analytic message content, relatively send front and back two Router LSA message of the router transmission of Router LSA message, judge whether contain non-existent interface among the current Router LSA among last the Router LSA,, represent that then these interfaces are no longer available if contain non-existent interface among the current Router LSA, judge again whether this interface message is relevant with DR, according to judged result, revise the annexation in the topological diagram, change step S1302;
Step S1302, front and back two Router LSA message of sending of this router relatively, judge and whether contain non-existent interface among last the Router LSA among the current Router LSA, if contain non-existent interface among last the Router LSA, represent that then these interfaces newly start, change step S1304; Otherwise change step S1303;
Step S1303, front and back two Router LSA message of sending of this router relatively, judge among the current Router LSA with last Router LSA in the link information of overlapping interface section whether identical, if described link information is inequality, the link information of then representing these interfaces has changed, judge again whether the link information inequality that comprises among last the Router LSA is relevant with DR, if it is relevant with DR, then judge the network segment information that whether contains described link information region DR inequality in the overall DR mapping table, if, then change step 1305, if not, then change step S1304; If the link information inequality and the DR that comprise among described last the RouterLSA are uncorrelated, then handle on the router interface and the incoherent annexation of DR, and change step S1304;
Step S1304, judge whether non-existent link information is relevant with DR among last the Router LSA that comprises among the current Router LSA, if it is relevant with DR, then make up or upgrade the DR network segment information of this interface message region in the overall DR mapping table, revise the annexation in the topological diagram, change step S11; If not relevant, then handle on the router interface and the incoherent annexation of DR with DR; Change step S11;
Step 1305 judges whether link information inequality described in last the Router LSA represents that current router is DR, according to judged result, handles DR network segment information, changes step S1304.
Further, described step S1301 specifically comprises the steps:
Step S1301a judges whether the age of current Router LSA surpasses the maximum age, if surpass, then is expressed as and cancels message, disregards, and changes step S11; Otherwise the link information of then getting this Router LSA is made as newlinklist, and gets the Router LSA that last RouterID sends, and gets its link information, is made as oldlinklist, changes step S1301b;
Step S1301b judges whether the link information among the oldlinklist is handled, if then change step S1302; If not, link information in the middle of getting is made as oldlinkinf, changes step S1301c;
Whether step S1301c, the interface of judging oldlinkinf be identical with the interface of link information among the newlinklist, if identical, represents that then this interface is still available, then changes step S1301g, otherwise, represent that then this interface is no longer available, change step S1301d;
Step S1301d, whether the type of judging oldlinkinf is 2, if not, represent that then this link information is not relevant with DR, with the incoherent annexation of DR, and change step S1301g on the deletion router interface, otherwise, represent that then this link information is the relevant link information of DR, changes step S1301e;
Step S1301e judges the network segment information that whether contains the DR of oldlinkinf region in the overall DR mapping table, if then the link information of this DR network segment was received in expression before, and this network segment information is made as DRinf, changeed step S1301f; Otherwise, represent that the DR of this oldlinkinf region changes, or a new DR, and receive the link information of this DR network segment the first time, change step S1301g;
Step S130lf judges whether oldlinkinf represents that oneself is DR, if, represent that then the DR interface no longer is effectively, delete this DR network segment information D Rinf, and all annexations that comprise among the deletion DRinf, change step S1301g; If not, represent that then this interface no longer belongs to this DR network segment, delete information and the annexation of RouterID in the ordinary router tabulation of this DR network segment information D Rinf, change step S1301g;
Step S1301g, the information of this oldlinkinf is changeed step S1301b for what handled among the mark oldlinklist.
Further, step S1302 specifically comprises the steps:
Step S1302a judges whether the link information among the newlinklist is handled, if then change step S11; Otherwise link information in the middle of getting is made as newlinkinf, changes step S1302b;
Whether step S1302b, the interface of judging this link information newlinkinf among the current Router LSA be identical with the interface of a link information among the oldlinklist, if identical, then changes step S1303, otherwise change step S1304.
Further, described step S1303 specifically comprises the steps:
Step S1303a judges whether newlinkinf is consistent with the oldlinkinf link information, if consistent, then changes step S1302a; Otherwise, change step S1303b;
Step S1303b judges whether the oldlinkinf type is 2, if represent that then this link information is the relevant link information of DR, changes step S1303c; If not, represent that this link information is not relevant with DR, then on the Processing Interface with the incoherent annexation of DR, and change step S1304;
Step S1303c judges the network segment information that whether contains the DR of oldlinkinf region in the overall DR mapping table, if, then change step S1305, if not, then change step S1304.
Further, described step S1304 specifically comprises the steps:
Step S1304a judges whether the type type of described newlinkinf is 2, if not, then on the Processing Interface with the incoherent annexation of DR, and change step S1302a; If change step 1304b;
Step S1304b judges the network segment information that whether contains the DR of newlinkinf region in the overall DR mapping table, if, then this network segment information is made as DRinf, change step S1304c; If not, then the message information of new DR is received for the first time in expression, newly makes up the network segment information D Rinf that newlinkinf comprises DR, and is index with regional number and interface message, joins in the DR mapping table of the overall situation, changes step S1304c;
Step S1304c judges whether newlinkinf represents that oneself is DR, if not, then RouterID is filled up in the ordinary router tabulation of network segment information D Rinf, changes step S1304e; If change step S1304d;
Step S1304d, whether the IP field of judging the DR network segment among the DRinf is empty, if, then the Router LSA of this DR is received in expression for the first time, and do not receive the Network LSA of this DR, the IP address field of filling in the DR among the DRinf, ordinary router tabulation among the traversal DRinf before, set up the monolateral link relation of the router sensing DRid in the tabulation, change step S1302a; If not, then receive the Network LSA of this DR before the expression, changeed step S1302a;
Step S1304e is filled up to RouterID in the ordinary router tabulation of DRinf, and judges whether the IP field of the DR network segment among the DRinf is empty, if not, then sets up the monolateral link relation of DRid among RouterID and the DRinf, changes step S1302a; If then change step S1302a.
Further, described step S1305 specifically comprises the steps:
Step S1305a judges whether oldlinkinf represents that oneself is DR, if, then change step S1305b, if not, then change step S1305c;
Step S1305b, oldlinkinf represent that oneself is DR, represent that then original DR becomes ordinary router, the corresponding network segment information D of deletion DR Rinf, and all annexations that comprise among the deletion DRinf; Change step S1304;
Step S1305c, oldlinkinf represent it oneself is not to be DR, and then the original interface annexation that links to each other with DR of expression changes, information and the annexation of RouterID in the ordinary router tabulation of deletion network segment information D Rinf; Change step 1304.
Further, on Processing Interface described in described step S1303 and the step S1304,, comprise the steps: with the incoherent annexation of DR
Step S2001 judges whether the type type of the Link information among the Router LSA is 3, if then change step S2002; If not, then change step S2003;
Step S2002, the annexation of renewal current router and stub subnet finishes;
Step S2003 upgrades the monolateral annexation between the router in current router and the Link information, finishes.
The invention has the beneficial effects as follows:
Real-time network route topological treatment system and method in the autonomous system of the present invention, set up session by the ordinary router in the zone in route probe and the network, network measure mode by passive type, under the situation of not emphasis network load, collect OSPF in real time and upgrade message, and then the OSPF that analyzing and processing collects upgrades message, as the unit that analyzes, the annexation between the annexation between the router, router and the subnet is integrated into topological structure in the comprehensively real-time territory with OSPF LSA.This comprehensive following 2 points that are mainly reflected in: the first, the annexation between annexation, router and the subnet between the router in any moment network is embodied comprehensively; The second, annexation can guarantee the consistency with the real network topology according to the connection situation real-time update of real network.
The present invention is that each DR network segment is safeguarded a data structure, i.e. DR network segment information, and set up overall DR mapping table and come organization of unity DR network segment information, and according to this network segment message structure, the mode analyzed of tracing back before taking is topology in the neofield more.When the OSPF renewal message that collects is incomplete or out of order, avoid the topological link information in the network to make mistakes.
Embodiment
In order to make purpose of the present invention, technical scheme and advantage clearer,, real-time network route topological treatment system and method in the autonomous system of the present invention are further described below in conjunction with drawings and Examples.Should be appreciated that specific embodiment described herein only in order to explanation the present invention, and be not used in qualification the present invention.
As shown in Figure 5, the relevant real-time network route topological treatment system of DR in the autonomous system 1 of the present invention, it comprises routing iinformation acquisition probe 5 and the analytic unit 2 that before traces back, wherein:
Described routing iinformation acquisition probe 5, be used for ospf area (Area) by physically being deployed to autonomous system 1 (AS), and be communicated in the network by the tunnel, set up syntople with the router 6 of the operation OSPF Routing Protocol of each ospf area in the network, be captured in flood Link State Advertisement (OSPF LSA) message of (flooding) of this ospf area in real time passively, and the analytic unit 2 that traces back before the Link State Advertisement message that collects sent to.
Analytic unit 2 traces back before described, be used for OSPF Link State Advertisement (LSA) message according to routing iinformation acquisition probe 5 collections that receive, the analytic message content, analyze the network topology change relevant with DR, make up, delete or upgrade the DR network segment information that respective regions comprises in the overall DR mapping table, and upgrade the topological diagram in the autonomous system 1.
Preferably, the analytic unit 2 that traces back before described comprises Network LSA processing module 21 and Router LSA processing module 22, wherein:
Network LSA processing module 21, be used for OSPF Network LSA message according to routing iinformation acquisition probe 5 collections that receive, the analytic message content, by two Network LSA messages before and after comparing, analyze the variation of topology relevant in the autonomous system 1 with DR, make up or upgrade the network segment information that comprises this DR in the overall DR mapping table, and upgrade topological diagram.
Router LSA processing module 22, be used for OSPF Router LSA message according to routing iinformation acquisition probe 5 collections that receive, the analytic message content, by two RouterLSA messages in front and back of this router relatively, and judge whether the Link type among two the Router LSA in front and back is relevant with DR, analyze the change in topology in the autonomous system 1, make up, delete or upgrade the network segment information that comprises this DR in the overall DR mapping table, and upgrade topological diagram.
Adopt relatively two the LSA method of message processing in the front and back topological relation of router, be called " the preceding analysis of tracing back " method in the present invention.
Described DR network segment information comprises the data structure that contains following content: ordinary router tabulation, the IP address of the DR network segment, the IP address (DRid) of DR, the router-list of DR.
Routing iinformation acquisition probe 5 needs simulation to realize complete OSPF Open Shortest Path First (ospf protocol), can move the state machine of OSPF Open Shortest Path First, can set up the OSPF session and exchange the OSPF route updating packet with real router 6, this can be realized by the existing route software GNU Zebra that increases income.
Realize that by the route software GNU Zebra that increases income routing iinformation acquisition probe 5 is a kind of prior aries, the content that those skilled in the art describe according to the embodiment of the invention can realize this routing iinformation acquisition probe, therefore, in embodiments of the present invention, describe in detail no longer one by one.
In order to realize the purpose of the passive collection of routing iinformation acquisition probe of the present invention, be that routing iinformation acquisition probe and real router are set up after the OSPF session, just accept the OSPF renewal message that the other side sends over passively, therefore, routing iinformation acquisition probe 5 of the present invention, except according to the ospf protocol standard, in order to keep outside the periodicity Keep Alive message that sends with the neighborhood of the other side's router, in network, do not inject other any messages, thereby do not influence the existing route situation of network, thereby reach the purpose of passive collection.In addition, that lose when the ospf protocol of route acquisition probe and router relation or when setting up, the route acquisition probe can send that neighbours lose (Neighbor Lost) or neighbours set up the self-defined control messages of (Neighbor Gain) so that the upper strata routine analyzer is done corresponding processing to the routine analyzer on upper strata.
The mode of network collection equipment by tunnel participate in the ospf protocol of a plurality of autonomous systems 1 mutual in, obtain the LSD information of each ospf area.Routing iinformation acquisition probe 5 is deployed to each operation OSPF Open Shortest Path First (OSPF) zone mode in (Area) of autonomous system 1 (AS) by physical department, perhaps only physical department is deployed in the ospf area (Area) of an autonomous system 1 (AS), by tunnel (tunnel, GRE for example) is communicated to the mode in other ospf areas in the network, come with network in the router 6 of any operation OSPF Routing Protocol of each specific ospf area (Area) set up relation in abutting connection with (Adjacency), be captured in Link State Advertisement (LSA) message that this ospf area (Area) floods in real time passively.
For Link State declaration (LSA) message that collects in real time, safeguard an OSPF message tabulation for each router 6, up-to-date OSPF Router LSA and the OSPFNetwork LSA that this router 6 produces write down in the subregion.
Preferably, for the purpose that realizes that the routing iinformation acquisition probe 5 and the analytic unit 2 that before traces back effectively combine, topology processing system in the described autonomous system 1 also comprises message field sub-module 4, is used to the type of message of distinguishing routing iinformation acquisition probe 5 and before tracing back analytic unit 2 transmission.Described type of message one class be routing iinformation acquisition probe 5 by with network in ospf router 6 set up the route updating packet that neighborhood obtains; Another kind of be that the route acquisition probe is sent and network in neighborhood between the ospf router 6 application layer control message setting up or lose.
Preferably, analytic unit 2 traces back before described, when also being used for receiving the application layer control message that the neighborhood between that the route acquisition probe is sent and the network ospf router 6 loses, remove the annexation of this router and other routers, subnet, the renewal topological diagram.When the application layer that the neighborhood in receiving that the route acquisition probe is sent and network between the ospf router 6 is set up is controlled message, then be failure to actuate, continue to receive next message.
More preferably, topology processing system in the described autonomous system also further comprises configuration module 3, be used for the router 6 in route information gathering probe 5 coverages is carried out the OSPF configuration, make the router 6 of setting up the tunnel in routing iinformation acquisition probe 5 and the autonomous system 1 set up the OSPF full adjacency, collect the message information in each zone.
Router 6 in route information gathering probe 5 coverages is carried out correct OSPF configuration.Under the mutual prerequisite of the correct information that router 6 in routing iinformation acquisition probe 5 coverages carries out, guarantee that collector can receive comprehensive ospf information.Need in autonomous system 1, carry out the OSPF configuration, make the router 6 of setting up tunnel (tunnel) in acquisition probe and the autonomous system 1 set up the OSPF full adjacency, collect the message information of each router 6 in the zone.
As a kind of embodiment, describedly carry out OSPF configuration in autonomous system 1, can be achieved as follows:
If acquisition probe and monitored router 6 belong to the same area, certain interface of collector is joined this zone with rtrv-map-network command; Make acquisition probe and the router 6 in the zone set up the OSPF full adjacency, collect the message information of each router 6 in the zone.
If acquisition probe and monitored router 6 belong to zones of different, on probe, set up earlier tunnel (tunnel), with rtrv-map-network command this tunnel is joined the area to be monitored again, make acquisition probe and the router 6 in the zone set up the OSPF full adjacency, collect the message information of each router 6 in the zone.
In order to realize goal of the invention, the present invention also provides the DR in a kind of autonomous system relevant real-time network route topological processing method, this method makes among the OSPF in routing iinformation acquisition probe and the network in each zone router set up session, network measure mode by passive type, can be under the situation of not emphasis network load, collect the OSPF routing update message in real time, the method based on " the preceding analysis of tracing back " provides the relevant route topological real-time and dynamic annexation of the interior DR of ospf domain in the network then.Therefore, method of the present invention comprises two stages:
One .OSPF routing update information acquisition phase.
The routing iinformation acquisition probe is by the simulation to ospf protocol, can set up neighborhood with the ospf router in the network, simultaneously by making the routing iinformation acquisition probe not send any route updating packet, can give way by the information gathering probe in real time passive collect OSPF route updating packet (OSPFUpdate) in the network.OSPF LSA type of message mainly is divided into 5 types, and what mainly use in " the preceding analysis of tracing back " of the present invention algorithm is the message of kind one (Router LSA) and kind two (network LSA).In addition, that lose when the neighborhood of route acquisition probe and ospf router or when setting up, the self-defined control messages that the route acquisition probe can be lost (Neighbor Lost) or neighbours' foundation (Neighbor Gain) to the routine analyzer transmission neighbours on upper strata is so that the upper strata routine analyzer is done corresponding processing, to guarantee the real-time of network topology.
Two. the stage of ospf network route topological in the router level territory " the preceding analysis of tracing back ".
This stage is by accepting the OSPF route updating packet that OSPF routing update information acquisition phase is collected, carry out " the preceding analysis of tracing back " of autonomic system network topology, can provide the network routing topological connectivity of OSPF in the territory in real time, and with this connectivity specific between the router in the autonomous system, between router and the subnet.
For the annexation between the router in the analysis domain, and, need to set up two-way link relation between the router according to the definition of ospf protocol.When just thinking that router has been set up two-way link, just set up the topological connection relation between the router.In the network of P2P network or virtual circuit type, then when having sent the link information of the Router LSA that comprises the other side ID, the router both sides just set up the topological connection relation between the router, when receive the age be the maximum age 3600 cancel the information of LSA the time, then remove the two-way link relation.And in radio network or NAMB network, then need DR to send corresponding Router LSA declaration oneself, Network LSA declaration DR network segment information, and after ordinary router had declared to comprise the link information of Router LSA of DR, both mate errorlessly could set up two-way link relation.But owing to ordinary router declaration in the prior art comprises the interface message that has only comprised DR in the link information of the Router LSA of DR, can not directly set up the link relation, so safeguarded a data structure for each DR network segment among the present invention, with DR region number and DR interface message as index.This data structure has comprised ordinary router tabulation, the IP address of the DR network segment, the IP address (DRid) of DR, the connection router-list of DR.Have only the common factor ordinary router partly of the router-list of ordinary router tabulation and DR just can set up two-way link relation with DR.
For router in the analysis domain and the topological connection relation between the subnet, need handle two types message.For the topological connection relation between stub subnet and the router, then just think to receive when the link information type type that comprises this subnet information is 3 Router LSA and set up, promptly set up between the router of this stub subnet and this Router LSA of declaration and establish a connection; And the topological connection relation between DR subnet and the router is set up when then ought receive the Network LSA of DR.This topological connection relation comprises: the protocol logic annexation between ordinary router and the DR, the annexation of the router and the DR subnet network segment.
Specifically, the real-time network route topological processing method that the DR in the autonomous system of the present invention is relevant comprises:
Step S1 ' by in the ospf area that physically is deployed to autonomous system, passively is captured in renewal message that this ospf area flood in real time with the routing iinformation acquisition probe, and the analytic unit that traces back before being transferred to;
Step S1, before the OSPF that analytic unit gathers according to the routing iinformation acquisition probe that receives 5 that traces back upgrade message, the analytic message content, analyze the network topology change relevant with DR, make up, delete or upgrade the DR network segment information that respective regions comprises in the overall DR mapping table, and upgrade the topological diagram in the autonomous system 1.
Preferably, among the described step S1 ', comprise that also the routing iinformation acquisition probe extracts each LSA from each OSPF that receives renewal message, increase this message from ospf router IP address (advertising router), this router under autonomous system number (AS) field, and the respective field of OSPF header.
Preferably, as shown in Figure 1, described step S1 specifically comprises, wherein:
Step S11, the preceding analytic unit that traces back receives OSPF and upgrades message, judges OSPF LSA type, if OSPF LSA type is Network LSA, then changes step S12; If OSPF LSA type is Router LSA, then change step S13;
Step S12, before the OSPFNetwork LSA message that analytic unit gathers according to the routing iinformation acquisition probe that receives 5 that traces back, the analytic message content, by two Network LSA messages before and after comparing, analyze the variation of topology relevant in the autonomous system 1 with DR, make up or upgrade the network segment information that comprises this DR in the overall DR mapping table, change step S14.
Step S13, before the OSPFRouter LSA message that analytic unit gathers according to the routing iinformation acquisition probe that receives 5 that traces back, the analytic message content, by front and back two Router LSA message of this router relatively, and judge whether the Link type among two the Router LSA in front and back is relevant with DR, analyze the change in topology in the autonomous system 1, make up, delete or upgrade the network segment information that comprises this DR in the overall DR mapping table, change step S14.
Step S14 according to analysis result topology information in the neofield more, changes step S11.
Preferably, topology information comprises in the described more neofield: set up or delete the annexation between annexation, router and the subnet between the router; Wherein, when the annexation of setting up between the router, check with the corresponding reverse annexation of newly-established unidirectional annexation and whether set up, if set up, then set up the annexation between the router, otherwise wouldn't set up the annexation between the router.
The network segment information of described DR comprises the data structure that contains following content: ordinary router tabulation, the IP address of the DR network segment, the IP address (DRid) of DR, the connection router-list of DR.
Preferably, among the described step S11, also comprise distinguish the OSPF receive upgrade message be OSPF LSA message, or the route acquisition probe sent and network in neighborhood between the ospf router 6 application layer control message setting up or lose; If the application layer that judged result is described neighborhood loses control message then changes step S15;
When step S15, the preceding analytic unit that traces back receive the application layer control message that the neighborhood between the ospf router 6 is lost in that the route acquisition probe is sent and the network, remove the annexation of this router and other routers, subnet, change step S14.
Step S12 is described in further detail below, and as shown in Figure 2, step S12 specifically comprises:
Step S1201, if surpassing maximum age MAXAGE or this NetworkLSA and current RouterID, the age of this Network LSA (sends the router id of this Router LSA, being the IP address) a nearest Network LSA of transmission is identical before, then changes step S11; Otherwise change step S1202;
Step S1202, whether respective regions comprises the network segment information D Rinf of DR in the DR mapping table of the judgement overall situation, if not, then make up the network segment information D Rinf of this Network DR that LSA comprises, and be index with regional number and interface message, join in the overall DR mapping table, change step S1204; If then change step S1203;
Step S1203, whether the IP field of judging the DR network segment among the DR network segment information D Rinf is empty, if be empty, then fill in IP address (DRid) field of the DR among the DR network segment information D Rinf, ordinary router tabulation among the traversal DR network segment information D Rinf, set up the monolateral link relation of the IP address of the router sensing DR in this tabulation, change step S1204); If be not empty, then change step S1204;
Step S1204, upgrade IP address (DRid) field of the DR among the DR network segment information D Rinf and the IP address of the DR network segment, the router-list that is connected of more current DR network segment information and original DR network segment information, remove the two-way link relation that no longer exists, increase the one way link relation of newly-increased router and current RouterID, and set up the annexation of the newly-increased router and the DR network segment; The DR that the router that adheres among the current Network LSA is filled in to the DR network segment information D Rinf connects in the router-list, changes step S11.
Step S13 is described in further detail below, and step S13 specifically comprises:
Step S1301, front and back two Router LSA message of sending of this router relatively, judge and whether contain non-existent interface among the current Router LSA among last the Router LSA, if contain non-existent interface among the current Router LSA, represent that then these interfaces are no longer available, judge again whether this interface message is relevant with DR, according to judged result, revise the annexation in the topological diagram, change step S1302;
Step S1302, front and back two Router LSA message of sending of this router relatively, judge and whether contain non-existent interface among last the Router LSA among the current Router LSA, if contain non-existent interface among last the Router LSA, represent that then these interfaces newly start, change step S1304; Otherwise change step S1303;
Step S1303, front and back two Router LSA message of sending of this router relatively, judge among the current Router LSA with last Router LSA in the link information of overlapping interface section whether identical, if described link information is inequality, the link information of then representing these interfaces has changed, judge again whether the link information inequality that comprises among last the Router LSA is relevant with DR, if it is relevant with DR, judge that then overall DR hints obliquely at the network segment information that whether contains described link information region DR inequality in the table, if, then change step 1305, if not, then change step S1304; If described last Router
The link information inequality that comprises among the LSA is not relevant with DR, then handles on the router interface and the incoherent annexation of DR, and changes step S1304; Described and the incoherent annexation of DR comprises and the annexation of stub subnet, the annexation or the virtual link type annexation of P2P (Peer-to-Peer) type;
Step S1304, judge whether non-existent link information is relevant with DR among last the Router LSA that comprises among the current Router LSA, if it is relevant with DR, then make up or upgrade the DR network segment information of this interface message region in the overall DR mapping table, revise the annexation in the topological diagram, change step S11; If not relevant, then handle on the router interface and the incoherent annexation of DR with DR; Change step S11;
Step 1305 judges whether link information inequality described in last the Router LSA represents that current router is DR, according to judged result, handles DR network segment information, changes step S1304.
Preferably, as shown in Figure 3, described step S1301 specifically comprises the steps:
Step S1301a judges whether the age of current Router LSA surpasses maximum age MAXAGE, if surpass, then is expressed as and cancels message, disregards, and changes step S11; Otherwise the link information of then getting this Router LSA is made as newlinklist, and gets the Router LSA that last RouterID sends, and gets its link information, is made as oldlinklist, changes step S1301b;
Step S1301b judges whether the link information among the oldlinklist is handled, if then change step S1302; If not, link information in the middle of getting is made as oldlinkinf, changes step S1301c;
Whether step S1301c, the interface of judging oldlinkinf be identical with the interface of link information among the newlinklist, if identical, represents that then this interface is still available, then changes step S1301g, otherwise, represent that then this interface is no longer available, change step S1301d;
Step S1301d, whether the type of judging oldlinkinf is 2, if not, represent that then this link information is not relevant with DR, with the incoherent annexation of DR, and change step S1301g on the deletion router interface, otherwise, represent that then this link information is the relevant link information of DR, changes step S1301e;
Step S1301e judges the network segment information that whether contains the DR of oldlinkinf region in the overall DR mapping table, if then the link information of this DR network segment was received in expression before, and this network segment information is made as DRinf, changeed step S1301f; Otherwise, represent that the DR of this oldlinkinf region changes, or a new DR information, and receive the link information of this DR network segment the first time, change step S1301g;
Step S1301f judges whether oldlinkinf represents that oneself is DR, if, represent that then the DR interface no longer is effectively, delete this DR network segment information D Rinf, and all annexations that comprise among the deletion DRinf, change step S1301g; If not, represent that then this interface no longer belongs to this DR network segment, delete information and the annexation of RouterID in the ordinary router tabulation of this DR network segment information D Rinf, change step S1301g.
Step S1301g, the information of this oldlinkinf is changeed step S1301b for what handled among the mark oldlinklist.
Preferably, as shown in Figure 3, step S1302 specifically comprises the steps:
Step S1302a judges whether the link information among the newlinklist is handled, if then change step S11; Otherwise link information in the middle of getting is made as newlinkinf, changes step S1302b;
Whether the interface that step S1302b. judges this link information newlinkinf among the current Router LSA is identical with the interface of a link information among the oldlinklist, if identical, then changes step S1303, otherwise changes step S1304;
Preferably, as shown in Figure 3, described step S1303 specifically comprises the steps:
Step S1303a judges whether newlinkinf is consistent with the oldlinkinf link information, if consistent, then changes step S1302a; Otherwise, change step S1303b;
Step S1303b judges whether the oldlinkinf type is 2, if represent that then this link information is the relevant link information of DR, changes step S1303c; If not, represent that this link information is not relevant with DR, then on the Processing Interface with the incoherent annexation of DR, and change step S1304;
Step S1303c judges the network segment information that whether contains the DR of oldlinkinf region in the overall DR mapping table, if, then change step S1305, if not, then change step S1304.
Preferably, as shown in Figure 3, described step S1304 specifically comprises the steps:
Step S1304a judges whether the type type of described newlinkinf is 2, if not, then on the Processing Interface with the incoherent annexation of DR, and change step S1302a; If change step 1304b;
Step S1304b judges the network segment information that whether contains the DR of newlinkinf region in the overall DR mapping table, if, then this network segment information is made as DRinf, change step S1304c; If not, then the message information of new DR is received for the first time in expression, newly sets up the network segment information D Rinf that newlinkinf comprises DR, and is index with regional number and interface message, joins in the DR mapping table of the overall situation, changes step S1304c;
Step S1304c judges whether newlinkinf represents that oneself is DR, if not, then RouterID is filled up in the ordinary router tabulation of network segment information D Rinf, changes step S1304e; If change step S1304d;
Step S1304d, whether the IP field of judging the DR network segment among the DRinf is empty, if, then the Router LSA of this DR is received in expression for the first time, and do not receive the Network LSA of this DR before, fill in IP address (DRid) field of the DR among the DRinf, ordinary router tabulation among the traversal DRinf, set up the monolateral link relation of the router sensing DRid in the tabulation, change step S1302a; If not, then receive the Network LSA of this DR before the expression, changeed step S1302a;
Step S1304e is filled up to RouterID in the ordinary router tabulation of DRinf, and judges whether the IP field of the DR network segment among the DRinf is empty, if not, then sets up the monolateral link relation of DRid among RouterID and the DRinf, changes step S1302a; If then change step S1302a.
Preferably, as shown in Figure 3, described step S1305 specifically comprises the steps:
Step S1305a judges whether oldlinkinf represents that oneself is DR, if, then change step S1305b, if not, then change step S1305c;
Step S1305b, oldlinkinf represent that oneself is DR, represent that then original DR becomes ordinary router, the corresponding network segment information D of deletion DR Rinf, and all annexations that comprise among the deletion DRinf; Change step S1304;
Step S1305c, oldlinkinf represent it oneself is not to be DR, and then the original interface annexation that links to each other with DR of expression changes, information and the annexation of RouterID in the ordinary router tabulation of deletion network segment information D Rinf; Change step 1304.
Further, on Processing Interface described in above-mentioned steps S1303b and the step S1304a,, as shown in Figure 4, comprise the steps: with the incoherent annexation of DR
Step S2001 judges whether the type type of Link information is 3, if, then show it is the annexation of router and stub subnet, change step S2002; If not, then show it is the P2P or the virtual circuit annexation of router, change step S2003;
Step S2002, the annexation of renewal current router and stub subnet finishes;
Step S2003 upgrades the monolateral annexation between the router in current router and the Link information, finishes.
In the above-mentioned steps, Newlinklist, Newlinkinf are meant in current Router LSA message, Oldlinklist, Oldlinkinf are meant in a last Router LSA, after current Router LSA handled, when handling next Router LSA, then current Router LSA is a described last Router LSA with respect to next Router LSA.
Among the OSPF in routing iinformation acquisition probe of the present invention and the network in each zone router set up session, network measure mode by passive type, can be under the situation of not emphasis network load, collect the OSPF routing update message in real time, the method based on " the preceding analysis of tracing back " provides the relevant route topological real-time and dynamic annexation of the interior DR of ospf domain in the network then.
Real-time network route topological treatment system and method in the autonomous system of the present invention, set up session by the ordinary router in the zone in route probe and the network, network measure mode by passive type, under the situation of not emphasis network load, collect OSPF in real time and upgrade message, and then the OSPF that analyzing and processing collects upgrades message, as the unit that analyzes, the annexation between the annexation between the router, router and the subnet is integrated into topological structure in the comprehensively real-time territory with OSPF LSA.This comprehensive following 2 points that are mainly reflected in: the first, the annexation between annexation, router and the subnet between the router in any moment network is embodied comprehensively; The second, annexation can guarantee the consistency with the real network topology according to the connection situation real-time update of real network.
The present invention is that each DR network segment is safeguarded a data structure, i.e. DR network segment information, and set up overall DR mapping table and come organization of unity DR network segment information, and according to this network segment message structure, the mode analyzed of tracing back before taking is topology in the neofield more.When the OSPF renewal message that collects is incomplete or out of order, avoid the topological link information in the network to make mistakes.
Above said content; only for the concrete execution mode of the present invention, but protection scope of the present invention is not limited thereto, and anyly is familiar with those skilled in the art in the technical scope that the present invention discloses; the variation that can expect easily or replacement all should be encompassed in protection scope of the present invention.