CN106411748B - The dynamic topology maintaining method of across a network - Google Patents
The dynamic topology maintaining method of across a network Download PDFInfo
- Publication number
- CN106411748B CN106411748B CN201610876723.7A CN201610876723A CN106411748B CN 106411748 B CN106411748 B CN 106411748B CN 201610876723 A CN201610876723 A CN 201610876723A CN 106411748 B CN106411748 B CN 106411748B
- Authority
- CN
- China
- Prior art keywords
- router
- network
- queue
- routing table
- current
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L45/00—Routing or path finding of packets in data switching networks
- H04L45/02—Topology update or discovery
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L41/00—Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
- H04L41/12—Discovery or management of network topologies
Abstract
The present invention relates to the dynamic topology maintaining methods of across a network, comprising: A., according to Host routes table information, obtains default gateway router, default gateway router is put into router queue in specified network;B. the Router Object obtained in the router queue traverses the routing table information of current router as current router, obtains subnet connected to it and/or adjacent router;C. the step B router obtained is sentenced and is handled again;D. step B and C are executed to the all-router object in the router queue;E. after traversing the Router Object in router queue, the topology information of router and subnet in network is obtained.The present invention can monitor network topology structure in real time, network load be effectively reduced, and the maintenance process speed of service of topological structure is fast.The topological correct judgment of network system is significantly improved, the demand that network management monitored and safeguarded automatically specified network topology is met.
Description
Technical field
The present invention relates to computer network communications, are concretely the dynamic topology maintaining methods of across a network.
Background technique
With the continuous development of communication and computer technology, computer network is very widely used in people's lives, right
The development of society plays increasingly important role.Number of devices and type in network gradually increase, and network size is increasingly
Greatly, so that network management becomes increasingly complex.Basis of the dynamic topology maintaining method as network management, can not only find network
Topological structure, additionally it is possible to provide support for fault management, performance management and the configuration management etc. of network.Dynamic topology maintenance
Method can dynamic, the operating condition of comprehensive display management network, manager can be more easier to monitor and safeguard specified
Network.
The dynamic topology of across a network is safeguarded, is referred to that Dynamic Maintenance specifies the topology of network, is monitored a specified network
In all devices node such as host, interchanger and router etc. find out.By such as routing table of the information in analytical equipment,
ARP table etc. obtains the connection between device node.Common topology maintaining method mainly has: the network based on DNS Protocol
ICMP agreement is safeguarded and are based on to topology maintenance, the network topology maintenance based on RIP agreement, the network topology based on ospf protocol
Network topology maintenance etc..Network topology maintaining method based on DNS Protocol, the main domain name using in dns server to IP
The mapping of address obtains host information.Network topology maintaining method based on RIP agreement mainly passes through acquisition routing table information, obtains
The equipment and sub-network connected to router, the router of traversal router connection, recurrence is gone down always, until traversing complete
Network.Network topology maintaining method based on ospf protocol is similar with RIP, is obtained by obtaining and analyzing routing table information
The connection of facility information and equipment into network.Network topology maintenance based on ICMP agreement using ping and
Traceroute order realizes whether the host for testing an IP sections of the insides is reachable, network topology feelings in ip sections of monitoring and maintenance
Condition.
Several network topology maintaining methods above, there is a different application scenarios, and operational efficiency, topology maintenance it is correct
There is also different degrees of defects for rate.It is mainly manifested in the speed of network load, the correctness of topological structure, discovery topological structure
And applicability etc..Such as the method network load based on DNS Protocol is low, but accuracy is lower.Method based on RIP agreement
Accuracy is higher, is only intended to less network.Method accuracy based on ospf protocol is high, and network load is also very high.It is based on
The method network load of ICMP agreement is higher and the speed of service is slow.
Summary of the invention
The present invention provides a kind of dynamic topology maintaining method of across a network, make to protect for various types of networks
Card accuracy and the low mode of network load carry out dynamic topology maintenance.
The dynamic topology maintaining method of across a network of the present invention, comprising:
A. default gateway router is obtained, by default gateway router according to Host routes table information in specified network
It is put into router queue;
B. a Router Object in the router queue is obtained, as current router, traverses current router
Routing table information, obtain subnet connected to it and/or adjacent router;
C. the step B router obtained is sentenced and is handled again;
D. step B and C are executed to the all-router object in the router queue;
E. after traversing the Router Object in router queue, the topology information of router and subnet in network is obtained.
Further, in step B, the next-hop of routing table current entry is obtained according to the routing table information of current router
Whether address is that direct deliver is handled respectively according to next hop address.
Specifically, if the next hop address is directly to deliver, i.e., next hop address is a subnet address, then will
The next hop address is associated as subnet object;If next hop address is to deliver indirectly, i.e., next hop address is router, then
Judge whether the router had stepped through, if having stepped through the router, updates current router and the router
Otherwise the router is put into router queue by link information;After the delivery attribute for having judged next hop address, continue to traverse
Router list item, until traversal is completed.
Further, the processing again of sentencing of step C can avoid carrying out repeating traversal to identical router, in this way can be into one
Step improves the correctness of topology judgement, and improves the runing time of system.Sentence described in step C and handle again, is to pass through traversal
The router queue obtains the routing table of each Router Object, if there is acquired routing in the routing table of Router Object
The next-hop IP of device object, then the Router Object had stepped through, and by it after router queue deletion, otherwise by the road
It is maintained in router queue by device object.
On this basis, step A further includes setting maximum hop count threshold value, illustrates the arrival purpose since originating router
The router number that router is passed through.If reaching maximum hop count threshold value router queue in traversal to traverse not yet
It is complete, illustrate that network size is larger, the network topology of specified network can not be completely found in Designated Router hop count, then is stopped
Router queue is traversed, next step is continued to execute.
In order to enable dynamic topology maintaining method of the invention that there is good across a network row, preferably dynamically opening up
It flutters in maintenance and network communication is carried out by snmp protocol (Simple Network Management Protocol).
The dynamic topology maintaining method of across a network of the present invention, can not only monitor network topology structure in real time, be effectively reduced
Network load, and the maintenance process speed of service of topological structure is fast.The topological correct judgment of network system is significantly improved,
Meet the demand that network management monitored and safeguarded automatically specified network topology.
Specific embodiment with reference to embodiments is described in further detail above content of the invention again.
But the range that this should not be interpreted as to the above-mentioned theme of the present invention is only limitted to example below.Think not departing from the above-mentioned technology of the present invention
In the case of thinking, the various replacements or change made according to ordinary skill knowledge and customary means should all be included in this hair
In bright range.
Detailed description of the invention
Fig. 1 is topological structure schematic diagram in embodiment.
Fig. 2 is the flow chart of the dynamic topology maintaining method of across a network of the present invention.
Fig. 3 is to sentence the flow chart handled again in Fig. 2.
Specific embodiment
A usual network is made of different communication equipments, such as host, router, interchanger and bridge equipment.
It is connected with each other between equipment, is communicated by communication protocol.Network topology maintenance is exactly to monitor and safeguard that network is all to lead to
Believe the connection between equipment and equipment.
Network model as shown in Figure 1 has 5 hosts in this network model, is indicated respectively with H1~H5,4 roads
It by device, is indicated respectively with R1~R4,4 sub-networks are indicated with N1~N4 respectively.
The present embodiment is topology monitoring and the maintenance that whole network is finally completed since the host H1 of the network.
The dynamic topology maintaining method of across a network of the invention as shown in Figure 2, step are as follows:
A. on the basis of snmp protocol, the default gateway in the network model is obtained, constructs router queue.It sets simultaneously
Set it can be found that maximum router hops.
In Fig. 1, host H1 obtains the IP routing table of host H1 using the get-request operation of snmp protocol.By obtaining
The content in the IP routing table is taken, the default gateway for obtaining host H1 is router R1.Router queue is initialized, and by road
It is put into router queue by device R1 as a Router Object.Same method is put into router R2 in router queue
The Router Object of~R4.Wherein each Router Object has IpList (routing table) object, for storing the router
The corresponding IP address in each port.
B. router queue is traversed.A Router Object in current queue is obtained as current router pair
As.Such as current router object is router R1 when traversing for the first time.Then current router object (router R1) is traversed
Routing table information, obtain each routing table list item of current router object, i.e. next hop address.Example as shown in figure 1, currently
When Router Object is router R1, next hop address is respectively the address of router R3 and subnet N1.
It whether is that direct deliver is handled respectively according to the next hop address of current router object: if next in routing table
The value of the ipRouteType field of jump is expressed as directly delivering, then illustrate target address directly with current router object
It is connected, i.e., next hop address is a subnet.Subnet object is constructed, subnet information, such as subnet mask are set, and are associated with and work as
On the network interface of preceding router.When such as traversing router R1, the data packet in subnet N1 is directly to deliver, then constructs subnet
Object N1, and associate on the network interface of router R1 object.
If the value of the ipRouteType field of next-hop is expressed as handing over indirectly in the routing table of current router object
It pays, the subnet where illustrating destination address is not directly to be connected with current router, it is necessary at least using a router.
I.e. current router next hop address is a Router Object.Judge whether the Router Object of next-hop traversed, such as time
It goes through to router R3, next hop address includes router R1, router R2 and router R4.At this moment judge the router of next-hop
Whether had stepped through, and if had stepped through, updated the link information between table of router.Such as continue to traverse router
When R2, next hop router address is router R3.Due to being had stepped through before router R3, does not need to traverse again, just set
The neighboring router for setting router R2 is router R3, i.e. link information more between new router.After link information has updated,
Continue the routing table of traversal current router object.
If next-hop is not traversed router, which is put into router queue.
C. next hop router object is sentenced and is handled again, judge whether next hop router is traversed, avoid repeating
Traversal.It is as shown in Figure 3 that router sentences processing again:
C1: traversal router queue, first Router Object for obtaining router queue is current router object.
C2: whether the routing table for judging each Router Object in router queue includes under acquired Router Object
One jumps IP.
C3: if the routing table of a certain Router Object includes the next-hop IP of acquired Router Object, illustrate the road
It was had stepped through by device object, and continued the routing table information for traversing other Router Objects.
C4: if the routing table of a certain Router Object does not include the next-hop IP of acquired Router Object, illustrate this
Router Object does not have traversed, constructs new Router Object R, obtains the Port IP table of router, constructs Router Object R
Routing table.In routing table using Port IP table fills Router Object R.The Router Object R constructed is added
It is last to router queue.
D. judge the Router Object for whether having traversal in router queue or not.If having the routing of traversal or not
Device object then repeats step B and C, continues to traverse the Router Object in router queue.
If the maximum hop count threshold value router queue that traversal number reaches setting has traversed not yet, stop traversal routing
Device queue.Illustrate that network size is larger, the network topology of specified network can not be completely found in Designated Router hop count.
E. it completes after being traversed to router queue, that is, gets route-map and the subnet information etc. in network topology,
And get the information of mobile host computers in subnet.
So far, the network topology monitoring being over to specified network.Connection letter between its interior joint, subnet and node
Breath, is stored in Router Object, subnet object and host object.It can be exported and be shown by console, it can also be with
It is come out by graph-based.
Claims (5)
1. the dynamic topology maintaining method of across a network, feature include:
A. default gateway router is obtained, default gateway router is put into according to Host routes table information in specified network
In router queue;
B. the Router Object obtained in the router queue traverses the road of current router as current router
By table information, subnet connected to it and/or adjacent router are obtained;
C. the step B router obtained is sentenced and is handled again;
D. step B and C are executed to the all-router object in the router queue;
E. after traversing the Router Object in router queue, the topology information of router and subnet in network is obtained;
Step C is specifically included:
C1: traversal router queue, first Router Object for obtaining router queue is current router object;
C2: judge each Router Object in router queue routing table whether include acquired Router Object next-hop
IP;
C3: if the routing table of a certain Router Object includes the next-hop IP of acquired Router Object, illustrate the router
Object had stepped through, and continued the routing table information for traversing other Router Objects;
C4: if the routing table of a certain Router Object does not include the next-hop IP of acquired Router Object, illustrate the routing
Device object does not have traversed, constructs new Router Object R, obtains the Port IP table of router, constructs the road of Router Object R
By table, in the routing table using Port IP table fills Router Object R, the Router Object R constructed is added to road
It is last by device queue.
2. the dynamic topology maintaining method of across a network as described in claim 1, it is characterized in that: in step B, according to current routing
Whether the routing table information of device obtains the next hop address of routing table current entry, be that direct deliver is distinguished according to next hop address
Processing.
3. the dynamic topology maintaining method of across a network as claimed in claim 2, it is characterized in that: if the next hop address is
It directly delivers, then the next hop address is associated as subnet object;If next hop address is to deliver indirectly, next-hop
Location is router, if having stepped through the router, updates the link information of current router and the router, otherwise should
Router is put into router queue;After the delivery attribute for having judged next hop address, continue to traverse router list item.
4. the dynamic topology maintaining method of the across a network as described in one of claims 1 to 3, it is characterized in that: step A further includes setting
Set maximum hop count threshold value.
5. the dynamic topology maintaining method of the across a network as described in one of claims 1 to 3, it is characterized in that: it is tieed up in dynamic topology
Network communication is carried out by snmp protocol in shield.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610876723.7A CN106411748B (en) | 2016-10-08 | 2016-10-08 | The dynamic topology maintaining method of across a network |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610876723.7A CN106411748B (en) | 2016-10-08 | 2016-10-08 | The dynamic topology maintaining method of across a network |
Publications (2)
Publication Number | Publication Date |
---|---|
CN106411748A CN106411748A (en) | 2017-02-15 |
CN106411748B true CN106411748B (en) | 2019-08-06 |
Family
ID=59228528
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610876723.7A Active CN106411748B (en) | 2016-10-08 | 2016-10-08 | The dynamic topology maintaining method of across a network |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106411748B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114979076B (en) * | 2022-05-23 | 2024-03-29 | 杭州仟金顶信息科技有限公司 | Flattened communication method oriented to cross-host container |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1756189A (en) * | 2004-09-30 | 2006-04-05 | 北京航空航天大学 | IP network topology discovering method based on SNMP |
CN102045190A (en) * | 2009-10-21 | 2011-05-04 | 杭州华三通信技术有限公司 | Network topology discovery method and device |
CN104579978A (en) * | 2014-12-30 | 2015-04-29 | 国网安徽省电力公司芜湖供电公司 | Link-layer topology discovery method for dynamic network |
-
2016
- 2016-10-08 CN CN201610876723.7A patent/CN106411748B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1756189A (en) * | 2004-09-30 | 2006-04-05 | 北京航空航天大学 | IP network topology discovering method based on SNMP |
CN102045190A (en) * | 2009-10-21 | 2011-05-04 | 杭州华三通信技术有限公司 | Network topology discovery method and device |
CN104579978A (en) * | 2014-12-30 | 2015-04-29 | 国网安徽省电力公司芜湖供电公司 | Link-layer topology discovery method for dynamic network |
Also Published As
Publication number | Publication date |
---|---|
CN106411748A (en) | 2017-02-15 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10505804B2 (en) | System and method of discovering paths in a network | |
JP7108674B2 (en) | Failure root cause determination method and device, and computer storage medium | |
EP3222005B1 (en) | Passive performance measurement for inline service chaining | |
EP3222006B1 (en) | Passive performance measurement for inline service chaining | |
EP2984798B1 (en) | Identification of paths taken through a network of interconnected devices | |
EP3675419A1 (en) | Method and apparatus for detecting network fault | |
US20150163243A1 (en) | Data stream security processing method and apparatus | |
EP3065360A1 (en) | Traffic cleaning method and device, and computer storage medium | |
CN106487558B (en) | A kind of method and apparatus for realizing the scalable appearance of access device | |
CN105429841B (en) | NNI PING implementation method and device | |
JP6193473B2 (en) | Computer-implemented method, computer program product and computer | |
CN104320278A (en) | Wide area network realizing method and device based on software-defined network | |
CN109067592A (en) | A kind of intelligent control device and management-control method for matching electricity consumption towards intelligence | |
CN108429680A (en) | A kind of method for configuring route, system, medium and equipment based on virtual private cloud | |
US8914503B2 (en) | Detected IP link and connectivity inference | |
EP3200398B1 (en) | Automated mirroring and remote switch port analyzer (rspan)/encapsulated remote switch port analyzer (erspan) functions using fabric attach (fa) signaling | |
CN110098988A (en) | For handling the method and system of Internet Protocol packet | |
CN106411748B (en) | The dynamic topology maintaining method of across a network | |
CN112532468B (en) | Network measurement system, method, device and storage medium | |
CN105812168B (en) | A kind of method and apparatus for drawing network topological diagram | |
CN108282404B (en) | Route generation method, device and system | |
CN114244763B (en) | Dynamic network topology management method and system based on rule engine | |
US11438237B1 (en) | Systems and methods for determining physical links between network devices | |
CN105009542B (en) | A kind of method and apparatus for handling message | |
Ma et al. | An algorithm of physical network topology discovery in multi-VLANs |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |