Movatterモバイル変換


[0]ホーム

URL:


CN110535694A - Method for discovering network topology and device - Google Patents

Method for discovering network topology and device
Download PDF

Info

Publication number
CN110535694A
CN110535694ACN201910764105.7ACN201910764105ACN110535694ACN 110535694 ACN110535694 ACN 110535694ACN 201910764105 ACN201910764105 ACN 201910764105ACN 110535694 ACN110535694 ACN 110535694A
Authority
CN
China
Prior art keywords
address
network equipment
survival
thread
icmp
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.)
Pending
Application number
CN201910764105.7A
Other languages
Chinese (zh)
Inventor
杨印州
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hangzhou DPTech Technologies Co Ltd
Original Assignee
Hangzhou DPTech Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hangzhou DPTech Technologies Co LtdfiledCriticalHangzhou DPTech Technologies Co Ltd
Priority to CN201910764105.7ApriorityCriticalpatent/CN110535694A/en
Publication of CN110535694ApublicationCriticalpatent/CN110535694A/en
Pendinglegal-statusCriticalCurrent

Links

Classifications

Landscapes

Abstract

The application provides a kind of method for discovering network topology and device, in each network equipment for including applied to local area network, the described method includes: broadcasting for obtaining the SNMP request message of ARP table and routing table, so that other network equipments for receiving SNMP request message in local area network, which return, carries itself ARP table of storage and the SNMP response message of routing table;The internet protocol address for including in the ARP table carried in received each SNMP response message is added in high survival probability set, and the IP address in all IP address that the network segment of local area network includes in addition to the IP address in high survival probability set is added in low survival probability set;Start first thread, the second thread and third thread simultaneously;The type list of the network equipment of the routing table and survival that carry in each SNMP response message based on the received determines the connection relationship of the network equipment of survival.Using embodiments herein, the efficiency of discovering network topology is greatly promoted.

Description

Method for discovering network topology and device
Technical field
This application involves network communication technology field, it is specifically designed a kind of method for discovering network topology and device.
Background technique
Network topological information has considerable effect for network management, the network planning, for example, current existingHow new equipment, awareness network current operating status is reasonably added in network, the tool that timely awareness network failure occursBody position discovers whether that unknown device invades current network etc..The process for obtaining network topological information is exactly that network is opened upDiscovery is flutterred, the necessity and importance of discovering network topology are increasingly prominent.
Currently, method for discovering network topology is, the network segment that each network equipment in local area network obtains local area network includesAll Internet protocol (Internet Protocol, IP) addresses;Detecting the corresponding network equipment of all IP address obtained isNo survival sends the Internet Control Message agreement Internet Control for carrying that target ip address is purpose IP addressMessage Protocol, ICMP) request message can be with if receiving the corresponding ICMP response message of ICMP request messageThe corresponding network equipment survival of target ip address is determined, conversely, illustrating that the corresponding network equipment of target ip address is not survived;ThenThe type of the network equipment of all survivals is judged again, for example, it may be possible to be router, interchanger, host etc.;It finally determines eachConnection relationship between the network equipment, as between the connection of connection, router and interchanger between router, interchanger and hostConnection etc..
In above-mentioned method for discovering network topology, each step is executed using serial manner, when wasting a large amount of waitingBetween, it is extremely low so as to cause the efficiency of discovering network topology.
Summary of the invention
In view of this, the application provides a kind of method for discovering network topology and device, to solve the effect of discovering network topologyThe extremely low problem of rate.
Specifically, the application is achieved by the following technical solution:
A kind of method for discovering network topology, in each network equipment for including applied to local area network, which comprises
The Simple Network Management Protocol SNMP request message for obtaining Address Resolution Protocol ARP table and routing table is broadcasted,So that received in the local area network SNMP request message other network equipments return carry itself storage ARP table andThe SNMP response message of routing table;
The internet protocol address for including in the ARP table carried in received each SNMP response message is added to heightIn survival probability set, and except in the high survival probability set in all IP address for including by the network segment of the local area networkIP address except IP address is added in low survival probability set;
Start simultaneously and determines whether the corresponding network equipment of IP address in the high survival probability set survives firstThread determines that the second thread that whether the corresponding network equipment of IP address in the low survival probability set survives and determination are depositedThe third thread of the type of the network equipment living;
The type list of the network equipment of the routing table and survival that carry in each SNMP response message based on the received determinesThe connection relationship of the network equipment of survival.
A kind of network topology discovery device, in each network equipment for including applied to local area network, which is characterized in that describedDevice includes:
Broadcast module, for broadcasting the SNMP request message for obtaining ARP table and routing table, so that in the local area networkOther network equipments for receiving the SNMP request message return to the SNMP response for carrying the ARP table and routing table of itself storageMessage;
Adding module, the Internet protocol for that will include in the ARP table that carried in received each SNMP response messageIP address is added in high survival probability set, and by all IP address that the network segment of the local area network includes except the height is depositedThe IP address except IP address in Making by Probability Sets living is added in low survival probability set;
Starting module determines that the corresponding network equipment of IP address in the high survival probability set is for starting simultaneouslyThe first thread of no survival, the corresponding network equipment of IP address for determining in the low survival probability set whether survive secondThe third thread of the type of thread and the network equipment of determining survival;
Determining module, the network equipment of routing table and survival for being carried in each SNMP response message based on the receivedType list determine survival the network equipment connection relationship.
By the above technical solution provided by the present application as it can be seen that can will be carried in received each SNMP response messageThe IP address for including in ARP table is added in high survival probability set, and in all IP address for including by the network segment of local area networkIP address in addition to the IP address in high survival probability set is added in low survival probability set, then starts determination simultaneouslyFirst thread that whether the corresponding network equipment of IP address in high survival probability set survives determines in low survival probability setThe second thread for whether surviving of the corresponding network equipment of IP address and determine survival the network equipment type third thread,Relative in such a way that serial manner carries out discovering network topology, a large amount of waiting time can be saved, so as to bigThe big efficiency for promoting discovering network topology.
Detailed description of the invention
Fig. 1 is a kind of flow chart of method for discovering network topology shown in the application;
Fig. 2 is the flow chart of the S13 shown in the application;
Fig. 3 is a kind of structural schematic diagram of network topology discovery device shown in the application.
Specific embodiment
Example embodiments are described in detail here, and the example is illustrated in the accompanying drawings.Following description is related toWhen attached drawing, unless otherwise indicated, the same numbers in different drawings indicate the same or similar elements.Following exemplary embodimentDescribed in embodiment do not represent all embodiments consistent with the application.On the contrary, they be only with it is such as appendedThe example of the consistent device and method of some aspects be described in detail in claims, the application.
It is only to be not intended to be limiting the application merely for for the purpose of describing particular embodiments in term used in this application.It is also intended in the application and the "an" of singular used in the attached claims, " " and "the" including most shapesFormula, unless the context clearly indicates other meaning.It is also understood that term "and/or" used herein refers to and includesOne or more associated any or all of project listed may combine.
It will be appreciated that though various information, but this may be described using term first, second, third, etc. in the applicationA little information should not necessarily be limited by these terms.These terms are only used to for same type of information being distinguished from each other out.For example, not departing fromIn the case where the application range, the first information can also be referred to as the second information, and similarly, the second information can also be referred to asOne information.Depending on context, word as used in this " if " can be construed to " ... when " or " when ...When " or " in response to determination ".
In view of the above technical problems, inventor it has been investigated that, be all made of in above-mentioned method for discovering network topology serialMode, which is handled, executes each step, this will greatly increase the time-consuming of discovering network topology.For example, if being wrapped in the network segment of local area networkThe IP address included is more, and after asking message to the network equipment of survival transmission ICMP, the time for receiving ICMP response message is generalFor a few tens of milliseconds, and after sending ICMP request message to the network equipment that do not survive, the time-out time of wait-for-response is generally20 seconds, that is to say, not receiving ICMP response message just after sending ICMP request message 20 seconds can determine that the network equipment is not depositedIt is living, if the network equipment quantity that do not survive in the corresponding network equipment of IP address in the network segment of local area network is more, the mistake of detectionJourney can be grown very much.Based on this, the net whether corresponding network equipment of all IP address survives with determine survival can be detected simultaneouslyThe type of network equipment improves the efficiency of discovering network topology so as to greatly save the time-consuming of discovering network topology.
To solve the above-mentioned problems, the embodiment of the invention provides a kind of method for discovering network topology, to greatly promote netThe efficiency of network Topology Discovery.Referring to Figure 1, Fig. 1 is a kind of flow chart of method for discovering network topology shown in the application, applicationIn each network equipment that local area network includes.
S11: broadcast is for obtaining address resolution protocol (Address Resolution Protocol, ARP) table and routingSimple Network Management Protocol (Simple Network Management Protocol, SNMP) request message of table, so that officeThe SNMP that other network equipments that SNMP request message is received in the net of domain return to the ARP table and routing table that carry itself storage is rungAnswer message.
After the network equipment broadcasts SNMP request message, other network equipments that SNMP is disposed in local area network can be returnedSNMP response message, and the carrying ARP table and routing table that itself is stored in SNMP response message.
S12: it is general that the IP address for including in the ARP table carried in received each SNMP response message is added to high survivalIn rate set, and the IP in all IP address for including by the network segment of local area network in addition to the IP address in high survival probability setAddress is added in low survival probability set.
It can be set two set: high survival probability set and low probability survival set, due to the IP that is saved in ARP tableLocation and MAC Address are the IP address and MAC Address for the network equipment that latest activities are crossed, and the probability of these network equipments survival is veryThe IP address for including in ARP table can be added in high survival probability set by height, correspondingly, include by the network segment of local area networkAll IP address in IP address in addition to the IP address in high survival probability set be added in low survival probability set.
S13: while starting and determining whether the corresponding network equipment of IP address in high survival probability set survives firstThread determines the second thread and determine survival that whether the corresponding network equipment of IP address in low survival probability set survivesThe third thread of the type of the network equipment.
S14: the type list of the network equipment of the routing table and survival that are carried in each SNMP response message based on the receivedDetermine the connection relationship of the network equipment of survival.
It can be routed comprising many in the routing table for other network equipments that the network equipment obtains, generally include port in routingConnection relationship, can be determined according to the connection relationship of the port of the routing in routing table between each network equipment of survivalConnection relationship.
It is assured that out the network topological information of entire local area network by S11-S14, network topological information can be usedLocal area network carries out subsequent processing.
By the above technical solution provided by the present application as it can be seen that can will be carried in received each SNMP response messageThe IP address for including in ARP table is added in high survival probability set, and in all IP address for including by the network segment of local area networkIP address in addition to the IP address in high survival probability set is added in low survival probability set, then starts determination simultaneouslyFirst thread that whether the corresponding network equipment of IP address in high survival probability set survives determines in low survival probability setThe second thread for whether surviving of the corresponding network equipment of IP address and determine survival the network equipment type third thread,Relative in such a way that serial manner carries out discovering network topology, a large amount of waiting time can be saved, so as to bigThe big efficiency for promoting discovering network topology.
Refer to Fig. 2, Fig. 2 is the flow chart of S13, and starting determines in high survival probability set while in above-mentioned S13First thread that whether the corresponding network equipment of IP address survives determines the corresponding network of IP address in low survival probability setThe third thread of the type of the network equipment of the second thread and determining survival that whether equipment survives, realization process specifically include:
S131: it is purpose IP that starting first thread sends each IP address for carrying and including in high survival probability set respectivelyThe ICMP request message of address determines whether receive the corresponding ICMP response report of each ICMP request message within the set durationText determines the corresponding network equipment survival of the source IP address of the ICMP response message received, by the IP of the network equipment of survivalAddress transfer is into survival set.
A kind of optional embodiment, S131 further include: starting first thread determines not to be received couple within the set durationThe corresponding network equipment of purpose IP address of the ICMP request message for the ICMP response message answered is not survived, from high survival probability collectionThe IP address for the network equipment that do not survive is deleted in conjunction.For not receiving the ICMP request message of corresponding ICMP response messageIn purpose IP address, which is contained within the IP address in high survival probability set, illustrate the IP address forThe network equipment do not survive, can directly be deleted.
A kind of optional embodiment, the IP address that the network equipment that do not survive is deleted from high survival probability set itBefore, starting first thread will not receive the corresponding company of purpose IP address of the ICMP request message of corresponding ICMP response messageContinuous detection number adds 1, determines whether the continuous detection number after adding 1 reaches setting value, however, it is determined that the continuous detection number after adding 1Reach setting value, then executes the step of deleting the IP address for the network equipment that do not survive from high survival probability set.In order to trueProtect the network equipment for not missing survival, the purpose IP address of the ICMP request message for not being connected to corresponding ICMP response messageICMP request message is repeatedly sent, reaches setting value until continuously detecting number, can just delete from high survival probability set shouldIP address, no longer determines whether the corresponding network equipment of the IP address survives.Correspondingly, a kind of optional embodiment, will depositIt, can be corresponding continuous by the IP address after the IP address of the network equipment living moves to survival set or deletes IP addressDetection number is set as zero, no longer counts the corresponding continuous detection number of the IP address.
Wherein, setting duration can be set according to actual needs, for example, it can be set to being 20 seconds, 15 seconds, 25 seconds etc.Deng;Setting value can also be set according to actual needs, such as may be set to 10,15,5 etc..
S132: it is purpose IP that the second thread of starting sends each IP address for carrying and including in low survival probability set respectivelyThe ICMP request message of address determines whether receive the corresponding ICMP response report of each ICMP request message within the set durationText determines the corresponding network equipment survival of the source IP address of the ICMP response message received, by the IP of the network equipment of survivalAddress transfer is into survival set.
A kind of optional embodiment, the second thread of starting determines does not receive corresponding ICMP response within the set durationThe corresponding network equipment of purpose IP address of the ICMP request message of message is not survived, by the IP address for the network equipment that do not surviveIt moves in high survival probability set.The destination IP in ICMP request message for not receiving corresponding ICMP response messageAddress, the purpose IP address are contained within the IP address in low survival probability set, illustrate the corresponding network equipment of the IP addressIt does not survive, can directly be moved in high survival probability set, further determine that the IP address pair again by first threadWhether the network equipment answered survives.
S133: the equipment class in routing table where each IP address for including in starting third thread acquisition survival setType obtains the type of the corresponding network equipment of each IP address in survival set.
It can include device type in the routing table for other network equipments that the network equipment obtains, directly can therefrom obtain and setStandby type, so that it may obtain the type of the corresponding network equipment of each IP address, e.g. router, interchanger, host etc..
It should be noted that S131, S132, S133 are performed simultaneously, it is intended merely to facilitate illustrates these hereStep is numbered, and number order does not represent the sequence of execution.
Fig. 3 is referred to, Fig. 3 is a kind of structural schematic diagram of network topology discovery device shown in the application, is applied to officeIn the network equipment that domain net includes, which includes:
Broadcast module 31, for broadcasting the SNMP request message for obtaining ARP table and routing table, so as to be connect in local area networkOther network equipments for receiving SNMP request message, which return, carries itself ARP table of storage and the SNMP response message of routing table;
Adding module 32, the internet protocol for that will include in the ARP table that carried in received each SNMP response messageExcept high survival probability in all IP address that view IP address is added in high survival probability set, and includes by the network segment of local area networkThe IP address except IP address in set is added in low survival probability set;
Starting module 33, for whether starting the corresponding network equipment of IP address in determining high survival probability set simultaneouslyThe first thread of survival, determine the second thread that whether the corresponding network equipment of IP address in low survival probability set survives andDetermine the third thread of the type of the network equipment of survival;
The network of determining module 34, routing table and survival for carrying in each SNMP response message based on the received is setStandby type list determines the connection relationship of the network equipment of survival.
By the above technical solution provided by the present application as it can be seen that can will be carried in received each SNMP response messageThe IP address for including in ARP table is added in high survival probability set, and in all IP address for including by the network segment of local area networkIP address in addition to the IP address in high survival probability set is added in low survival probability set, then starts determination simultaneouslyFirst thread that whether the corresponding network equipment of IP address in high survival probability set survives determines in low survival probability setThe second thread for whether surviving of the corresponding network equipment of IP address and determine survival the network equipment type third thread,Relative in such a way that serial manner carries out discovering network topology, a large amount of waiting time can be saved, so as to bigThe big efficiency for promoting discovering network topology.
Specifically, above-mentioned starting module 33, determines that the IP address in high survival probability set is corresponding for starting simultaneouslyFirst thread that whether network equipment survives determines whether the corresponding network equipment of IP address in low survival probability set survivesThe second thread and determine survival the network equipment type third thread, be specifically used for:
It is purpose IP address that starting first thread sends each IP address for carrying and including in high survival probability set respectivelyInternet Control Message agreement ICMP request message, determination whether receive each ICMP request message pair within the set durationThe ICMP response message answered determines the corresponding network equipment survival of the source IP address of the ICMP response message received, will surviveThe network equipment IP address move to survival set in;
Starting the second thread to send each IP address for carrying and including in low survival probability set respectively is purpose IP addressICMP request message, determination whether receive the corresponding ICMP response message of each ICMP request message within the set duration,The corresponding network equipment survival of the source IP address of the ICMP response message received is determined, by the IP address of the network equipment of survivalIt moves in survival set;
The device type in routing table where each IP address for including in starting third thread acquisition survival set, obtainsTo the type of the corresponding network equipment of each IP address in survival set.
Optionally, above-mentioned starting module 33, is also used to:
Starting first thread determines the ICMP request message for not receiving corresponding ICMP response message within the set durationThe corresponding network equipment of purpose IP address do not survive, the IP for the network equipment that do not survive is deleted from high survival probability setLocation.
Optionally, above-mentioned starting module 33, is also used to:
Starting first thread will not receive the purpose IP address pair of the ICMP request message of corresponding ICMP response messageThe continuous detection number answered adds 1, determines whether the continuous detection number after adding 1 reaches setting value, however, it is determined that the continuous inspection after adding 1It surveys number and reaches setting value, then execute the step of deleting the IP address for the network equipment that do not survive from high survival probability set.
Optionally, above-mentioned starting module 33, is also used to:
Start the second thread and determines the ICMP request message for not receiving corresponding ICMP response message within the set durationThe corresponding network equipment of purpose IP address do not survive, the IP address for the network equipment that do not survive is moved into high survival probability collectionIn conjunction.
For device embodiment, since it corresponds essentially to embodiment of the method, so related place is referring to method realityApply the part explanation of example.The apparatus embodiments described above are merely exemplary, wherein described be used as separation unitThe unit of explanation may or may not be physically separated, and component shown as a unit can be or can also be withIt is not physical unit, it can it is in one place, or may be distributed over multiple network units.It can be according to actualThe purpose for needing to select some or all of the modules therein to realize application scheme.Those of ordinary skill in the art are not payingOut in the case where creative work, it can understand and implement.
The foregoing is merely the preferred embodiments of the application, not to limit the application, all essences in the applicationWithin mind and principle, any modification, equivalent substitution, improvement and etc. done be should be included within the scope of the application protection.

Claims (10)

CN201910764105.7A2019-08-192019-08-19Method for discovering network topology and devicePendingCN110535694A (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CN201910764105.7ACN110535694A (en)2019-08-192019-08-19Method for discovering network topology and device

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN201910764105.7ACN110535694A (en)2019-08-192019-08-19Method for discovering network topology and device

Publications (1)

Publication NumberPublication Date
CN110535694Atrue CN110535694A (en)2019-12-03

Family

ID=68663898

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN201910764105.7APendingCN110535694A (en)2019-08-192019-08-19Method for discovering network topology and device

Country Status (1)

CountryLink
CN (1)CN110535694A (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
US5793975A (en)*1996-03-011998-08-11Bay Networks Group, Inc.Ethernet topology change notification and nearest neighbor determination
CN101764709A (en)*2009-12-292010-06-30福建星网锐捷网络有限公司Network physical topology discovering method and network management server based on SNMP
CN102271350A (en)*2011-03-302011-12-07东方通信股份有限公司Automatic discovery method of network topology in wireless cluster network management
CN103905314A (en)*2012-12-282014-07-02上海斐讯数据通信技术有限公司Comprehensive network topology discovery method
CN104219100A (en)*2014-09-302014-12-17迈普通信技术股份有限公司Information acquiring method and device
CN104618128A (en)*2014-06-302015-05-13北京阅联信息技术有限公司Multi-thread based node network detecting and analyzing method and system

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
US5793975A (en)*1996-03-011998-08-11Bay Networks Group, Inc.Ethernet topology change notification and nearest neighbor determination
CN101764709A (en)*2009-12-292010-06-30福建星网锐捷网络有限公司Network physical topology discovering method and network management server based on SNMP
CN102271350A (en)*2011-03-302011-12-07东方通信股份有限公司Automatic discovery method of network topology in wireless cluster network management
CN103905314A (en)*2012-12-282014-07-02上海斐讯数据通信技术有限公司Comprehensive network topology discovery method
CN104618128A (en)*2014-06-302015-05-13北京阅联信息技术有限公司Multi-thread based node network detecting and analyzing method and system
CN104219100A (en)*2014-09-302014-12-17迈普通信技术股份有限公司Information acquiring method and device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
张明剑 等: "一种基于多线程的网络拓扑发现方法", 《第一届中国高校通信类院系学术研讨会论文集》*

Similar Documents

PublicationPublication DateTitle
CN110661669B (en)Network topology automatic discovery method of network equipment based on ICMP, TCP and UDP protocols
US6205122B1 (en)Automatic network topology analysis
CN101459534B (en)Network topology collecting method for tree shaped network and network equipment
CN101588265B (en)Method and device for obtaining network information
CN102710811B (en)Realize method and the switch of dhcp address safety distribution
CN108259215B (en)Equipment management method and device
CN101330405A (en)Method for discovering network topology and related equipment
CN101771604B (en)Routing detection method, system and intermediate routing device
CN103905251A (en)Network topology obtaining method and device
CN104283802A (en)Neighbor discovery method and device
CN105163071A (en)System for obtaining monitoring video of monitoring platform, and method thereof
CN106230658B (en)A kind of method and apparatus monitoring the network equipment
CN105635335B (en) Social resource access method, device and system
CN101345657A (en)Method and system for cluster management of multiple network elements based on simple network management protocol
CN102437960B (en)Detection processing method and system of cluster mode, and network equipment
CN107465621A (en)A kind of router finds method, SDN controllers, router and network system
WO2016061974A1 (en)Method for processing application software in san storage system, server, host and system
CN110535694A (en)Method for discovering network topology and device
CN103384988B (en)Communication system, switch hub, router and communication means
CN111049697A (en)Network link quality monitoring method and device
CN106506716B (en)A kind of connection method of SDN controller in-band management and device
CN106161124A (en)The test processing method of message and device
CN102474422B (en)For detecting the method and apparatus of anycast group configuring condition in communication network
CN104158735A (en)Network data package distribution method and device
CN113872783B (en)Method, apparatus and computer readable storage medium for network configuration

Legal Events

DateCodeTitleDescription
PB01Publication
PB01Publication
SE01Entry into force of request for substantive examination
SE01Entry into force of request for substantive examination
RJ01Rejection of invention patent application after publication

Application publication date:20191203

RJ01Rejection of invention patent application after publication

[8]ページ先頭

©2009-2025 Movatter.jp