Content of the invention
The present invention provides a kind of method and device of MPLS VPN Topology Discovery, can represent the overall topology of network
Structure, is easy to management personnel and network is managed.
For reaching above-mentioned purpose, the present invention adopts the following technical scheme that:
In a first aspect, the present invention provides a kind of method of MPLS VPN Topology Discovery, methods described includes:
Obtain the configuration information of each network equipment;Described configuration information includes:LDP(Label Distribution
Protocol, tag distribution protocol) and configuration information and VRF (Virtual Routing Forwarding Instance, virtual
Forwarding instance) configuration information;VRF configuration information includes:Interface message and RT parameter;
According to the configuration information of the network equipment, determine the type of the network equipment, the type of the described network equipment includes backbone
Net core router P and backbone edges router PE;
The LDP configuration information of the type according to each network equipment and each network equipment, determines P and PE in network, no
With the annexation between P;
When the network equipment is for PE, according to the interface message in the VRF configuration information of PE, determine the use being connected with described PE
Family lateral edges router CE;According to the RT parameter in the VRF configuration information of PE, determine the annexation between different PE;
According to the annexation between P, PE, CE in network, generate topological diagram.
Second aspect, the present invention provides a kind of device of MPLS VPN Topology Discovery, and described device includes:
Acquisition module, for obtaining the configuration information of each network equipment;Described configuration information includes:LDP configuration information
With VRF configuration information;VRF configuration information includes:Interface message and RT parameter;
Identification module, the configuration information of the network equipment for being obtained according to acquisition module, determine the type of the network equipment,
The type of the described network equipment includes backbone network core router P and backbone edges router PE;
Determining module, for the LDP configuration information of the type according to each network equipment and each network equipment, determines net
Annexation between P and PE, different P in network;When the network equipment is for PE, according to the interface letter in the VRF configuration information of PE
Breath, determines the user side edge router CE being connected with described PE;According to the RT parameter in the VRF configuration information of PE, determine not
With the annexation between PE;
Generation module, for according to the annexation between P, PE, CE in network, generating topological diagram.
The invention provides a kind of method and device of MPLS VPN Topology Discovery, by obtaining joining of the network equipment
Confidence ceases, and the configuration information according to the network equipment, determines the type of the network equipment;Type according to the network equipment and network set
Standby LDP configuration information, determines the annexation between P and PE, different P;The interface of the VRF configuration information according to the network equipment
Information, determines the annexation between PE and CE (Customer Edge, user side edge router);According to the network equipment
RT parameter in VRF configuration information, determines the annexation between different PE;Thus according to the annexation between P, PE, CE,
Generate topological diagram.The topological diagram generating compared to prior art can only represent the part annexation of the network equipment, and the present invention gives birth to
The Zhang Tuo becoming flutters whole annexations that in figure contains the network equipment present in network, thus management personnel being capable of basis
The topological diagram that the present invention generates is realized to MPLS VPN comprehensively managing.
Specific embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is carried out clear, complete
Site preparation description is it is clear that described embodiment is only a part of embodiment of the present invention, rather than whole embodiments.It is based on
Embodiment in the present invention, it is all other that those of ordinary skill in the art are obtained under the premise of not making creative work
Embodiment, broadly falls into the scope of protection of the invention.
As shown in figure 1, MPLS VPN includes:Backbone network core router 11, backbone edges router 12, user's side
Edge router 13.Wherein, backbone network core router 11, for being responsible for forwarding the data message in network.Backbone edges road
By device 12, for storing VRF, process VPN-IPv4 route, be the main body that vpn service is processed.Backbone network core router and bone
Dry network edge router forms VPN backbone network.User side edge router 13, for issuing user network route, user is stood
Point (site) is connected with VPN backbone network.
As shown in Fig. 2 the embodiment of the present invention provides a kind of method of MPLS VPN Topology Discovery, it is applied to Fig. 1 institute
The MPLS VPN showing, the executive agent of methods described is NMS.Described NMS is used for showing topological diagram,
Detection and the port status of the analysis network equipment, are diagnosed in network equipment failure and are reported to the police.Methods described includes:
101st, obtain the configuration information of each network equipment.
Wherein, described configuration information includes:LDP configuration information and VRF configuration information;VRF configuration information includes:Interface is believed
Breath and RT parameter.
During implementing, by snmp protocol (Simple Network Management Protocol, simple net
Network management agreement), NMS accesses management information bank (Management corresponding with each network equipment
Information Base, MIB), thus getting the configuration information of each network equipment.
102nd, the configuration information according to the network equipment, determines the type of the network equipment.
Wherein, the type of the described network equipment includes backbone network core router P and backbone edges router PE.
During implementing, because PE needs to store VRF, in the configuration information of the process of responsible vpn service, therefore PE
Include VRF configuration information;And P is merely responsible for the forwarding of data message, in not responsible process vpn service, the therefore configuration information of P
There is not VRF configuration information.So, can be judged according to above-mentioned analysis:When comprising VRF in the configuration information of the network equipment
When configuration information and LDP configuration information, determine that the type of the described network equipment is PE;When comprising in the configuration information of the network equipment
LDP configuration information, when not comprising VRF configuration information, determines that the type of the described network equipment is P.
103rd, the LDP configuration information of the type according to each network equipment and each network equipment, determine in network P with
Annexation between PE, different P.
Wherein, LDP configuration information includes routing table.Described routing table includes:Next-hop ip address.
During implementing, according to the next-hop ip address in the routing table of the network equipment it may be determined that adjacent networks
Equipment.There is annexation in the described network equipment and adjacent network device.Due to having determined that the class of the network equipment in step 102
Type, may thereby determine that described annexation is the annexation between P and PE, or the annexation between different P.
Exemplary, adjacent network device that the next hop address of the routing table of P determines is PE it is determined that between P and PE
There is annexation.Or, the adjacent network device that the next hop address of the routing table of P determines is P it is determined that this two differences
There is annexation between P.
104th, when the network equipment is for PE, according to the interface message in the VRF configuration information of PE, determine and be connected with described PE
User side edge router CE.
During implementing, because the interface message in the VRF configuration information of PE is connecing of the CE that is connected with described PE
Message breath is such that it is able to determine the CE being connected with described PE.
105th, according to the RT parameter in the VRF configuration information of PE, determine the annexation between different PE.
Wherein, RT parameter comprises:Export (derivation) attribute and import (importing) attribute.
During implementing, check export attribute and the import attribute of the RT parameter of PE;When a PE's
When export attribute is identical with the import attribute of another PE, determine there is annexation between this two PE.
What deserves to be explained is, it is not carried out the priority difference in step between step 103,104,105.
106th, according to the annexation between P, PE, CE in network, generate topological diagram.
During implementing, the embodiment of the present invention generate topological diagram in can with different icon representation P, PE, CE,
Represent the annexation between P and PE, PE and CE, different P, different PE with different line segments.
Embodiments provide a kind of method of MPLS VPN Topology Discovery, by obtaining joining of the network equipment
Confidence ceases, and the configuration information according to the network equipment, determines the type of the network equipment;Type according to the network equipment and network set
Standby LDP configuration information, determines the annexation between P and PE, different P;The interface of the VRF configuration information according to the network equipment
Information, determines the annexation between PE and CE;According to the RT parameter in the VRF configuration information of the network equipment, determine different PE
Between annexation;Thus according to the annexation between P, PE, CE, generating topological diagram.Generate compared to prior art
Topological diagram can only represent the part annexation of the network equipment, and the Zhang Tuo that the embodiment of the present invention generates flutters in figure and contains network
Present in the network equipment whole annexations, thus the topological diagram pair that management personnel can generate according to embodiments of the present invention
MPLS VPN realizes comprehensively managing.
Optionally, as shown in figure 3, in a kind of specific implementation of step 105, this step 105 specifically includes following
Several steps:
201st, select a PE from all PE, check RT parameter in the VRF configuration information of selected PE
Import attribute;
202nd, check the export attribute of the RT parameter in the VRF configuration information of other PE;
203rd, when the export attribute of the RT parameter of some PE and the RT parameter of selected PE in other PE
When import attribute is identical, determine there is annexation between this two PE;
204th, repeat step 201 to step 203 travels through all of PE, determines the annexation between different PE.
Annexation between different PE be can determine by step 201 to 204.
The network equipment may be increased in network newly, or the situation of network equipment failure occurs.These factors lead to net
The topological structure of network is dynamic change.Fixing topological diagram can not reflect the topological structure of current network strictly according to the facts.Therefore, need
Topological diagram is updated timing, manages current network in order to management personnel using in the topological diagram after updating.In Fig. 2 institute
On the basis of showing method, the method that embodiments provides another kind of MPLS VPN Topology Discovery.As shown in figure 4,
After step 106, methods described also includes:
107th, the configuration information of timing acquisition all-network equipment.
During implementing, the time interval of timing acquisition configuration information is arranged by system default, or by administrative man
Member is actively arranged.But what deserves to be explained is, the setting of described time interval is it is also contemplated that the practical situation of network, it is to avoid arrange
Long or too short.When described time interval arranges too short, frequently obtain the configuration information of the network equipment, network can be given
Cause to bear;When described time interval arranges long, then can be because of the topological structure of the network that do not upgrade in time, administrative man
Member effectively can not be managed to current network.
108th, judge whether the configuration information that this obtains is identical with the last configuration information obtaining.
109th, when the configuration information obtaining twice differs, the configuration information being obtained according to this, regenerate topology
Figure.
Wherein, the configuration information obtaining twice differs, and specifically includes following several situation:Consolidated network equipment obtains twice
The configuration information taking differs;There is the configuration information of the newly-increased network equipment in this configuration information obtaining;This obtains
Configuration information in lack the configuration information of the network equipment that the last time gets.
During implementing, when the configuration information obtaining twice differs, can be believed according to the configuration that this obtain
Breath, repeat step 102-106, regenerate topological diagram.
A kind of method of MPLS VPN Topology Discovery provided in an embodiment of the present invention, by the timing acquisition network equipment
Configuration information, and when the configuration information obtaining twice differs, regenerate new topological diagram.By said method, protect
The topological diagram having demonstrate,proved embodiment of the present invention generation can reflect the topological structure of current network, in time in order to management personnel according to this
The topological diagram management current network that inventive embodiments generate.
As shown in figure 5, the embodiment of the present invention provides a kind of device of MPLS VPN Topology Discovery, aforementioned for executing
MPLS VPN Topology Discovery method.Described device includes:
Acquisition module 21, for obtaining the configuration information of each network equipment;Described configuration information includes:LDP configuration letter
Breath and VRF configuration information;VRF configuration information includes:Interface message and RT parameter.
Identification module 22, the configuration information of the network equipment for being obtained according to acquisition module 21, determine the network equipment
Type, the type of the described network equipment includes backbone network core router P and backbone edges router PE.
Determining module 23, for the LDP configuration information of the type according to each network equipment and each network equipment, determines
Annexation between P and PE, different P in network;When the network equipment is for PE, according to the interface in the VRF configuration information of PE
Information, determines the user side edge router CE being connected with described PE;According to the RT parameter in the VRF configuration information of PE, determine
Annexation between different PE.
Generation module 24, for according to the annexation between P, PE, CE in network, generating topological diagram.
During one kind implements, described identification module 22, it is additionally operable to when comprising in the configuration information of the network equipment
When VRF configuration information and LDP configuration information, determine that the type of the described network equipment is PE;When in the configuration information of the network equipment
Comprise LDP configuration information, when not comprising VRF configuration information, determine that the type of the described network equipment is P.
During one kind implements, RT parameter comprises:Derive export attribute and import import attribute;Described true
Cover half block 23, is additionally operable to check export attribute and the import attribute of the RT parameter of PE;When a PE export attribute with
When the import attribute of another PE is identical, determine there is annexation between this two PE.
During one kind implements, LDP configuration information includes routing table;Routing table includes next hop address;
Described determining module 23, is additionally operable to, according to the next hop address in the routing table of the network equipment, determine the adjacent network equipment;Institute
State and between the network equipment and adjacent network device, there is annexation;Class according to the described network equipment and adjacent network device
Type, determines that described annexation is the annexation between P and PE, or the annexation between different P.
Embodiments provide a kind of device of MPLS VPN Topology Discovery, by obtaining joining of the network equipment
Confidence ceases, and the configuration information according to the network equipment, determines the type of the network equipment;Type according to the network equipment and network set
Standby LDP configuration information, determines the annexation between P and PE, different P;The interface of the VRF configuration information according to the network equipment
Information, determines the annexation between PE and CE;According to the RT parameter in the VRF configuration information of the network equipment, determine different PE
Between annexation;Thus according to the annexation between P, PE, CE, generating topological diagram.Generate compared to prior art
Topological diagram can only represent the part annexation of the network equipment, and the Zhang Tuo that the embodiment of the present invention generates flutters in figure and contains network
Present in the network equipment whole annexations, thus the topological diagram pair that management personnel can generate according to embodiments of the present invention
MPLS VPN realizes comprehensively managing.
On the basis of device shown in Fig. 5, the embodiment of the present invention provides another kind of MPLS VPN Topology Discovery
Device.As shown in fig. 6, described device also includes:Judge module 25.
Described acquisition module 21, is additionally operable to the configuration information of timing acquisition all-network equipment;
Described judge module 25, for judging the configuration information whether phase of configuration information that this obtains and last acquisition
With;
Described generation module 24, is additionally operable to when the configuration information obtaining twice differs, the configuration being obtained according to this
Information, regenerates topological diagram.
A kind of device of MPLS VPN Topology Discovery provided in an embodiment of the present invention, by the timing acquisition network equipment
Configuration information, and when the configuration information obtaining twice differs, regenerate new topological diagram.By said method, protect
The topological diagram having demonstrate,proved embodiment of the present invention generation can reflect the topological structure of current network, in time in order to management personnel according to this
The topological diagram management current network that inventive embodiments generate.
Each embodiment in this specification is all described by the way of going forward one by one, identical similar portion between each embodiment
Divide mutually referring to what each embodiment stressed is the difference with other embodiment.Real especially for device
For applying example, because it is substantially similar to embodiment of the method, so describing fairly simple, referring to embodiment of the method in place of correlation
Part illustrate.
One of ordinary skill in the art will appreciate that realizing all or part of flow process in above-described embodiment method, it is permissible
Instruct related hardware to complete by computer program, described program can be stored in computer read/write memory medium
In, this program is upon execution, it may include as the flow process of the embodiment of above-mentioned each method.Wherein, described storage medium can be magnetic
Dish, CD, read-only memory (Read-Only Memory, ROM) or random access memory (Random Access
Memory, RAM) etc..
The above, the only specific embodiment of the present invention, but protection scope of the present invention is not limited thereto, and any
Those familiar with the art the invention discloses technical scope in, the change or replacement that can readily occur in, all answer
It is included within the scope of the present invention.Therefore, protection scope of the present invention should be defined by scope of the claims.