CN106789146A - A kind of topological preparation method and device - Google Patents

A kind of topological preparation method and device Download PDF

Info

Publication number
CN106789146A
CN106789146A CN201610234824.4A CN201610234824A CN106789146A CN 106789146 A CN106789146 A CN 106789146A CN 201610234824 A CN201610234824 A CN 201610234824A CN 106789146 A CN106789146 A CN 106789146A
Authority
CN
China
Prior art keywords
network equipment
address
network
mac address
management system
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201610234824.4A
Other languages
Chinese (zh)
Other versions
CN106789146B (en
Inventor
李友
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
New H3C Technologies Co Ltd
Original Assignee
New H3C 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 New H3C Technologies Co Ltd filed Critical New H3C Technologies Co Ltd
Priority to CN201610234824.4A priority Critical patent/CN106789146B/en
Publication of CN106789146A publication Critical patent/CN106789146A/en
Application granted granted Critical
Publication of CN106789146B publication Critical patent/CN106789146B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/12Discovery or management of network topologies

Landscapes

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

Abstract

The embodiment of the present application discloses a kind of topological preparation method and device, is related to communication technical field, is applied to first network equipment, wherein, the above method includes:Determine corresponding second network equipment of the first IP address of the next-hop network equipment of indirectly connected type example in the IP route table of first network equipment;According to first IP address, the first MAC Address of second network equipment is obtained from network management system;When multiple first MAC Address are obtained, will there is corresponding second network equipment of the first MAC Address of corresponding relation in the ARP table of the first network equipment with first IP address, be defined as the network equipment that there is direct connected link with first network equipment;According to the identified network equipment, the topology of first network equipment is obtained.Topology is obtained using the embodiment of the present application so that IP address still can correctly obtain topology in the case of repeating.

Description

A kind of topological preparation method and device
Technical field
The application is related to communication technical field, more particularly to a kind of topological preparation method and device.
Background technology
Because topology can in real time be presented network operation situation so that user can intuitively catch the source of failure, And then for user carries out network management provides convenient, therefore, obtaining topology becomes NMS (letter Claim network management system) an indispensable function.
For three-layer network, due to being in the net of IP (Internet Protocol, procotol) Internet Network equipment is usually the router with forwarding capability, and it is not belonging to any subnet, bridge is belonged between subnet Relation is connect, based on this, what three etale topologies were represented is the annexation and route between router and router Annexation between device and subnet.
In the prior art, three layers of destination network device can be obtained according to the IP route table of destination network device Topology, wherein, IP route table is typically made up of one or more examples, is included and the network in each example There is information and link information of the network equipment of link relation etc. in equipment.
Specifically, following information can be included in above-mentioned IP route table:IpRouteDest (the purposes to be connected Address), ipRouteIfIndex (routing interface index), ipRouteNextHop (next-hop network equipment IP address), ipRouteType (route-type), ipRouteMask (route mask) etc..
Wherein, ipRouteType can be divided into direct linkage type and indirectly connected type.
IP route table according to destination network device is obtained thirdly during etale topology, first can be obtained from IP route table Obtain the IP address that ipRouteType is the next-hop network equipment described in the example of indirectly connected type, Ran Hougen According to the corresponding network equipment of the IP address for being obtained, the topology of destination network device is obtained.
The topology of target network equipment can be accurately obtained using aforesaid way under normal circumstances, but it is actual May there is the situation that IP address is repeated in, the corresponding network of so above-mentioned obtained IP address sets It is standby all to there is the network equipment of direct connected link with destination network device, and then the target for being obtained May there is mistake in the topology of the network equipment.
The content of the invention
The embodiment of the present application discloses a kind of method and device for obtaining topology, with situation about being repeated in IP address Under, obtain correct topology.
To reach above-mentioned purpose, the embodiment of the present application discloses a kind of topological preparation method, is applied to the first net Network equipment, methods described includes:
Determine the of the next-hop network equipment of indirectly connected type example in the IP route table of the first network equipment Corresponding second network equipment of one IP address;
According to first IP address, the first MAC Address of second network equipment is obtained from network management system;
When multiple first MAC Address are obtained, by the ARP table of the first network equipment with described the One IP address has corresponding second network equipment of the first MAC Address of corresponding relation, is defined as and described There is the network equipment of direct connected link in one network equipment, wherein, the ARP table, for recording and described There is the IP address of the network equipment of direct connected link and the corresponding relation of MAC Address in one network equipment;
According to the identified network equipment, the topology of the first network equipment is obtained.
In a kind of specific implementation of the application, in the IP route table for determining the first network equipment Corresponding second network equipment of first IP address of the indirectly connected type next-hop network equipment of storage, including:
The example that route-type is indirectly connected type is searched from the IP route table of the first network equipment;
Example to finding carries out filtration treatment, filters out the example that destination address is default gateway;
An IP of the corresponding next-hop network equipment of the example after filtration treatment is obtained from the IP route table Address;
Determine corresponding second network equipment of first IP address.
It is described to determine corresponding second network of first IP address in a kind of specific implementation of the application Equipment, including:
Network device registration information in the network management system, determines first IP address corresponding second The network equipment, wherein, the network device registration information is:Each network equipment is in the network management system When carrying out facility registration, to the facility information that the network management system is reported.
It is described according to first IP address in a kind of specific implementation of the application, from network management system The first MAC Address of second network equipment is obtained, including:
According to first IP address, from the network device registration information in network management system obtaining the second network sets The first standby MAC Address, wherein, the network device registration information is:Each network equipment is in the net When carrying out facility registration in guard system, to the facility information that the network management system is reported.
It is described by the ARP table of the first network equipment in a kind of specific implementation of the application There is corresponding second network equipment of the first MAC Address of corresponding relation with first IP address, be defined as With the network equipment that the first network equipment has direct connected link, including:
The corresponding 2nd MAC ground of first IP address is obtained from the ARP table of the first network equipment Location;
Obtain the 3rd MAC Address overlapped with second MAC Address in first MAC Address;
By corresponding second network equipment of the 3rd MAC Address, it is defined as being deposited with the first network equipment In the network equipment of direct connected link.
To reach above-mentioned purpose, the embodiment of the present application discloses a kind of topology and obtains device, is applied to the first net Network equipment, described device includes:
First network equipment determining module, for indirectly connected type in the IP route table for determining the first network equipment Corresponding second network equipment of first IP address of the next-hop network equipment of example;
MAC Address obtains module, for according to first IP address, the second net being obtained from network management system First MAC Address of network equipment;
Second network equipment determining module, for when obtain multiple first MAC Address when, will be described first There is the first MAC Address of corresponding relation corresponding in the ARP table of the network equipment with first IP address Two network equipments, are defined as the network equipment that there is direct connected link with the first network equipment, wherein, institute State ARP table, for record the IP address of the network equipment that there is direct connected link with the first network equipment with The corresponding relation of MAC Address;
Topology obtains module, for the network equipment according to determined by, obtains opening up for the first network equipment Flutter.
In a kind of specific implementation of the application, the first network equipment determining module, including:
Example searches submodule, is non-for searching route-type from the IP route table of the first network equipment The example of direct linkage type;
Example filter submodule, for carrying out filtration treatment to the example for finding, filtering out destination address is The example of default gateway;
IP address obtain submodule, for obtained from the IP route table example after filtration treatment it is corresponding under One the first IP address for jumping the network equipment;
First network equipment determination sub-module, for determining corresponding second network equipment of first IP address.
In a kind of specific implementation of the application, the first network equipment determination sub-module is specific to use In the network device registration information in the network management system, corresponding second net of first IP address is determined Network equipment, wherein, the network device registration information is:Each network equipment enters in the network management system During row facility registration, to the facility information that the network management system is reported.
In a kind of specific implementation of the application, the MAC Address obtains module, specifically for basis First IP address, the first of second network equipment is obtained from the network device registration information in network management system MAC Address, wherein, the network device registration information is:Each network equipment is in the network management system When carrying out facility registration, to the facility information that the network management system is reported.
In a kind of specific implementation of the application, second network equipment determining module, including:
First MAC Address obtains submodule, for when multiple first MAC Address are obtained, from described first Corresponding second MAC Address of first IP address is obtained in the ARP table of the network equipment;
Second MAC Address obtains submodule, for obtain in first MAC Address with the 2nd MAC The 3rd MAC Address that address overlaps;
Second network equipment determination sub-module, for by corresponding second network equipment of the 3rd MAC Address, It is defined as the network equipment that there is direct connected link with the first network equipment.
As seen from the above, in the scheme that the embodiment of the present application is provided, first network equipment is it is determined that IP route table The MAC ground of second network equipment corresponding to the IP address of the indirectly connected type next-hop network equipment of middle storage Location is multiple, that is, second network equipment for it is multiple when, determine from second network equipment with reference to ARP table With the network equipment that first network equipment has direct connected link, then the network equipment obtains mesh according to determined by Mark the topology of the network equipment.Because the information recorded in ARP table is there is direct chain with first network equipment The IP address of the network equipment on road and the corresponding relation of MAC Address, so, even if above-mentioned second network sets Standby is multiple network equipments, it is also possible to therefrom find the network equipment that there is direct connected link with first network equipment, And then ensure that the topologically correct property of obtained first network equipment.
Brief description of the drawings
In order to illustrate more clearly of the embodiment of the present application or technical scheme of the prior art, below will be to implementing Example or the accompanying drawing to be used needed for description of the prior art are briefly described, it should be apparent that, describe below In accompanying drawing be only some embodiments of the present application, for those of ordinary skill in the art, do not paying On the premise of going out creative work, other accompanying drawings can also be obtained according to these accompanying drawings.
The schematic flow sheet of a kind of topological preparation method that Fig. 1 is provided for the embodiment of the present application;
A kind of IP route table of first network equipment that Fig. 2 a are provided for the embodiment of the present application;
A kind of IP address information schematic diagram of second network equipment that Fig. 2 b are provided for the embodiment of the present application;
The IP address information schematic diagram of another second network equipment that Fig. 2 c are provided for the embodiment of the present application;
Fig. 2 d are a kind of schematic diagram of the topology obtained according to prior art;
The ARP table of the first network equipment that Fig. 3 a are provided for the embodiment of the present application;
A kind of mac address information of second network equipment that Fig. 3 b are provided for the embodiment of the present application;
The mac address information of another second network equipment that Fig. 3 c are provided for the embodiment of the present application;
A kind of topological schematic diagram that Fig. 3 d are provided for the embodiment of the present application;
A kind of structural representation of topology acquisition device that Fig. 4 is provided for the embodiment of the present application.
Specific embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present application, the technical scheme in the embodiment of the present application is carried out clearly Chu, it is fully described by, it is clear that described embodiment is only some embodiments of the present application, rather than Whole embodiments.Based on the embodiment in the application, those of ordinary skill in the art are not making creation Property work under the premise of the every other embodiment that is obtained, belong to the scope of the application protection.
The schematic flow sheet of a kind of topological preparation method that Fig. 1 is provided for the embodiment of the present application, the method is applied to First network equipment,
Specifically, above-mentioned first network equipment can add a network equipment in network management system.
Above topology preparation method includes:
S101:Determine the next-hop network equipment of indirectly connected type example in the IP route table of first network equipment Corresponding second network equipment of first IP address.
Generally, an IP route table for equipment is made up of one or more example, each example Middle record is with the presence of with the information and link information of the network equipment of the network equipment link relation etc..Tool Body, referring to Fig. 2 a, 6 examples are included in the routing table, respectively (will comprising ipRouteDest in each example The destination address of connection), ipRouteIfIndex (routing interface index), ipRouteNextHop (next-hops The IP address of the network equipment), the information such as ipRouteType (route-type).
For the example in IP route table, if its route-type is indirectly connected type, example correspondence is illustrated Destination address be not local address, but distal end routing address or subnet address, also just explanation next-hop net Network equipment belongs to three-layer network appliance.
In a kind of specific implementation of the application, indirectly connected type in the IP route table of first network equipment is determined During corresponding second network equipment of the first IP address of the next-hop network equipment of example, first from first network equipment IP route table in search route-type be indirectly connected type example, then the example for finding is carried out at filtering Reason, filters out the example that destination address is default gateway, then after obtaining filtration treatment from above-mentioned IP route table First IP address of the corresponding next-hop network equipment of example, and determine that corresponding second network of the first IP address sets It is standby.
Above-mentioned default gateway can be 0.0.0.0 etc., and the application is defined not to this.
By description above it is known that above-mentioned first network equipment can add in network management system The individual network equipment, and network management system will be managed to the network equipment, it is necessary first to the network that will be managed sets It is standby to be added to the system, that is, can be understood as:The network equipment is registered in network management system. When the network equipment is registered in network management system, generally require and report its relevant information, for example, network sets Standby IP address, MAC (Media Access Control, media access control) address, device identification etc. Deng.
In view of the foregoing, when determining corresponding second network equipment of the first IP address, can be according to network management system In network device registration information, determine corresponding second network equipment of the first IP address.
Wherein, above-mentioned network device registration information is:Each network equipment carries out equipment note in network management system Volume when, the facility information reported to network management system, the said equipment information can include IP address, MAC Address, Device identification etc., the application is defined not to this.
Specifically, the network device registration information in network management system, determines the first IP address corresponding second During the network equipment, can first judge whether to be stored with the network device registration information in network management system above-mentioned One IP address, if being stored with above-mentioned first IP address, further from the corresponding information record of the first IP address Second network equipment is obtained, in this case, illustrates that above-mentioned second network equipment has added network management system, The chain that needs are set up between above-mentioned second network equipment and first network equipment in topology as the case may be Road;If not being stored with above-mentioned first IP address, illustrate that the corresponding network equipment of the first IP address does not add net also In guard system, it is therefore not necessary to set up the corresponding network equipment of the first IP address and first network equipment in topology Between link.
It should be noted that due to multiple examples may be included in IP route table, so above-mentioned first IP address can With correspondence multiple IP address, and due to that may there is the phenomenon that IP address is repeated in practical application, that is, One IP address may correspond to multiple network equipments, so, above-mentioned second network equipment is likely to correspondence multiple The network equipment.
S102:According to the first IP address, the first MAC Address of second network equipment is obtained from network management system.
In a kind of optional implementation of the application, when obtaining the first MAC Address of second network equipment, Can be according to above-mentioned first IP address, from the network device registration information in network management system obtaining the second network sets The first standby MAC Address, wherein, above-mentioned network device registration information is:Each network equipment is in webmaster system When carrying out facility registration in system, the facility information reported to network management system.
S103:When multiple first MAC Address are obtained, by the ARP table of first network equipment with first IP address has corresponding second network equipment of the first MAC Address of corresponding relation, is defined as and first network There is the network equipment of direct connected link in equipment.
Wherein, above-mentioned ARP table, the IP for recording the network equipment that there is direct connected link with first network equipment Address and the corresponding relation of MAC Address.
Due to a network equipment generally one MAC Address of correspondence, when the first IP address correspondence multiple network sets When standby, above-mentioned the first MAC Address obtained according to the first IP address is typically also multiple.
Specifically, the first of corresponding relation will be had in the ARP table of first network equipment with the first IP address Corresponding second network equipment of MAC Address, the network for being defined as there is direct connected link with first network equipment sets When standby, corresponding second MAC Address of the first IP address can be first obtained from the ARP table of first network equipment, Then, the 3rd MAC Address that is overlapped with the second MAC Address in the first MAC Address is obtained, then by the 3rd Corresponding second network equipment of MAC Address, the network for being defined as there is direct connected link with first network equipment sets It is standby.
S104:According to the identified network equipment, the topology of first network equipment is obtained.
As seen from the above, in the scheme that above-mentioned each embodiment is provided, first network equipment is it is determined that IP route table The MAC Address of second network equipment corresponding to the IP address of the indirectly connected type next-hop network equipment of middle storage Be multiple, that is, second network equipment for it is multiple when, determines from second network equipment with reference to ARP table and There is the network equipment of direct connected link in first network equipment, then the network equipment obtains target according to determined by The topology of the network equipment.Because the information recorded in ARP table is there is direct link with first network equipment The network equipment IP address and MAC Address corresponding relation, so, even if above-mentioned second network equipment is Multiple network equipments, it is also possible to therefrom find the network equipment that there is direct connected link with first network equipment, enter And ensure that the topologically correct property of obtained first network equipment.
With reference to instantiation, the embodiment of the present application offer is obtained from the angle being compared with the prior art The method of topology describes in detail.
It is assumed that an actual environment networking includes:Network equipment A, network equipment B and network equipment C, its In, the IP address of network equipment A is:10.153.89.103, the IP address of network equipment B is:10.153.89.120, The IP address of network equipment C is:10.153.88.120.Network equipment A and network equipment B in actual environment networking, The link condition of network equipment C is as follows:There is direct connected link, network between network equipment A and network equipment B Do not exist direct connected link between device A and network equipment C.
Referring to Fig. 2 a, wherein, the IP ground of the next-hop network equipment of an example in the IP route table of network equipment A Location is:10.153.89.120, the topology that the IP address obtains network equipment A is directed to below.
Network equipment B and network equipment C are had been added in network management system, referring to Fig. 2 b and Fig. 2 c, there is provided The IP address information of network equipment B and network equipment C each interface, network equipment B and network equipment C are above-mentioned When being registered in network management system, its IP address information has been reported.
Using prior art obtain network equipment A it is topological when, obtained down from the IP route table of network equipment A One jump the network equipment IP address be:10.153.89.120 after, the information that can be shown with reference to Fig. 2 b and Fig. 2 c is obtained Know, the IP address of the IP address of 16771 interfaces of network equipment B and 468 interfaces of network equipment C is: 10.153.89.120, it is possible to think that network equipment B and network equipment C have direct-connected chain with network equipment A Road, based on this, the topology of the network equipment A of acquisition compares with actual conditions as shown in Figure 2 d, it is seen that figure Topology shown in 2d is not inconsistent with actual conditions, there is mistake.
The scheme provided using the embodiment of the present application obtain network equipment A it is topological when, from the IP of network equipment A The IP address of acquisition next-hop network equipment is in routing table:10.153.89.120 after, Fig. 2 b and figure can be combined The information that 2c shows learns, the IP address of 16771 interfaces of network equipment B and 468 interfaces of network equipment C IP address is:10.153.89.120, so, network equipment B and network equipment C are likely to be and network There is the network equipment of direct connected link in device A.
Shown in the ARP table of the network equipment A shown in Fig. 3 a, IP address is:10.153.89.120 network sets It is for corresponding MAC Address:5C:DD:70:18:1B:AC.
In having been added to network management system due to network equipment B and network equipment C, referring to Fig. 3 b and Fig. 3 c, carry The mac address information of network equipment B and network equipment C is supplied, network equipment B and network equipment C are above-mentioned When being registered in network management system, its mac address information has been reported.So, at this moment can be from network management system The MAC Address of middle acquisition network equipment B and network equipment C, the network equipment can be learnt with reference to Fig. 3 b and Fig. 3 c The MAC Address of B is:5C:DD:70:18:1B:AC, the MAC Address of network equipment C is: 00:00:12:34:12:01。
The MAC Address that contrast is obtained in above-mentioned two situations, it is seen that the MAC Address of network equipment C is not in net In the ARP table of network device A, so, be present direct link in only network equipment B and network equipment A, be based on This, the topology of the network equipment A of acquisition is contrasted, it is seen that opening up shown in Fig. 3 d with actual conditions as shown in Figure 3 d Flutter and be consistent with actual conditions, in the absence of mistake.
Corresponding with above topology preparation method, the embodiment of the present application additionally provides a kind of topology and obtains device.
A kind of structural representation of topology acquisition device that Fig. 4 is provided for the embodiment of the present application, the device is applied to First network equipment, including:
First network equipment determining module 401, for non-straight in the IP route table for determining the first network equipment Connect corresponding second network equipment of the first IP address of the next-hop network equipment of type example;
MAC Address obtains module 402, for according to first IP address, second being obtained from network management system First MAC Address of the network equipment;
Second network equipment determining module 403, for when multiple first MAC Address are obtained, will be described the Have the first MAC Address of corresponding relation corresponding with first IP address in the ARP table of one network equipment Second network equipment, is defined as the network equipment that there is direct connected link with the first network equipment, wherein, The ARP table, for record the IP address of the network equipment that there is direct connected link with the first network equipment with The corresponding relation of MAC Address;
Topology obtains module 404, for the network equipment according to determined by, obtains the first network equipment Topology.
Specifically, the first network equipment determining module 401 can include:
Example searches submodule, is non-for searching route-type from the IP route table of the first network equipment The example of direct linkage type;
Example filter submodule, for carrying out filtration treatment to the example for finding, filtering out destination address is The example of default gateway;
IP address obtain submodule, for obtained from the IP route table example after filtration treatment it is corresponding under One the first IP address for jumping the network equipment;
First network equipment determination sub-module, for determining corresponding second network equipment of first IP address.
Optionally, the first network equipment determination sub-module, specifically for according in the network management system Network device registration information, determines corresponding second network equipment of first IP address, wherein, the network Facility registration information is:When each network equipment carries out facility registration in the network management system, to the net The facility information that guard system is reported.
Optionally, the MAC Address obtains module, specifically for according to first IP address, from webmaster The first MAC Address of second network equipment is obtained in network device registration information in system, wherein, it is described Network device registration information is:When each network equipment carries out facility registration in the network management system, to institute State the facility information that network management system is reported.
Specifically, second network equipment determining module 403 can include:
First MAC Address obtains submodule, for when multiple first MAC Address are obtained, from described first Corresponding second MAC Address of first IP address is obtained in the ARP table of the network equipment;
Second MAC Address obtains submodule, for obtain in first MAC Address with the 2nd MAC The 3rd MAC Address that address overlaps;
Second network equipment determination sub-module, for corresponding second network of the 3rd MAC Address to be set It is standby, it is defined as the network equipment that there is direct connected link with the first network equipment.
As seen from the above, in the scheme that above-mentioned each embodiment is provided, first network equipment is it is determined that IP route The MAC of second network equipment corresponding to the IP address of the indirectly connected type next-hop network equipment stored in table Address is multiple, that is, second network equipment for it is multiple when, with reference to ARP table from second network equipment really There is the network equipment of direct connected link in fixed and first network equipment, then the network equipment is obtained according to determined by The topology of destination network device.Because the information recorded in ARP table is exist directly with first network equipment The IP address of the network equipment of link and the corresponding relation of MAC Address, so, even if above-mentioned second network Equipment is multiple network equipments, it is also possible to therefrom finds the network that there is direct connected link with first network equipment and sets It is standby, and then ensure that the topologically correct property of obtained first network equipment.
For device embodiment, because it is substantially similar to embodiment of the method, so the comparing of description is simple Single, the relevent part can refer to the partial explaination of embodiments of method.
It should be noted that herein, such as first and second or the like relational terms be used merely to by One entity or operation make a distinction with another entity or operation, and not necessarily require or imply these There is any this actual relation or order between entity or operation.And, term " including ", "comprising" Or any other variant thereof is intended to cover non-exclusive inclusion, so that a series of mistake including key elements Journey, method, article or equipment not only include those key elements, but also other including being not expressly set out Key element, or it is this process, method, article or the intrinsic key element of equipment also to include.Do not having In the case of more limitations, the key element limited by sentence "including a ...", it is not excluded that wanted including described Also there is other identical element in process, method, article or the equipment of element.
One of ordinary skill in the art will appreciate that realizing all or part of step in above method implementation method Program be can be by instruct the hardware of correlation to complete, described program can be stored in computer-readable In taking storage medium, storage medium designated herein, such as:ROM/RAM, magnetic disc, CD etc..
The preferred embodiment of the application is the foregoing is only, the protection domain of the application is not intended to limit. All any modification, equivalent substitution and improvements made within spirit herein and principle etc., are all contained in In the protection domain of the application.

Claims (10)

1. a kind of topological preparation method, is applied to first network equipment, it is characterised in that methods described includes:
Determine the of the next-hop network equipment of indirectly connected type example in the IP route table of the first network equipment Corresponding second network equipment of one IP address;
According to first IP address, the first MAC Address of second network equipment is obtained from network management system;
When multiple first MAC Address are obtained, by the ARP table of the first network equipment with described the One IP address has corresponding second network equipment of the first MAC Address of corresponding relation, is defined as and described There is the network equipment of direct connected link in one network equipment, wherein, the ARP table, for recording and described There is the IP address of the network equipment of direct connected link and the corresponding relation of MAC Address in one network equipment;
According to the identified network equipment, the topology of the first network equipment is obtained.
2. method according to claim 1, it is characterised in that the determination first network equipment IP route table in corresponding second network of the first IP address of indirectly connected type next-hop network equipment that stores set It is standby, including:
The example that route-type is indirectly connected type is searched from the IP route table of the first network equipment;
Example to finding carries out filtration treatment, filters out the example that destination address is default gateway;
An IP of the corresponding next-hop network equipment of the example after filtration treatment is obtained from the IP route table Address;
Determine corresponding second network equipment of first IP address.
3. method according to claim 2, it is characterised in that determination the first IP address correspondence Second network equipment, including:
Network device registration information in the network management system, determines first IP address corresponding second The network equipment, wherein, the network device registration information is:Each network equipment is in the network management system When carrying out facility registration, to the facility information that the network management system is reported.
4. method according to claim 1, it is characterised in that described according to first IP address, from The first MAC Address of second network equipment is obtained in network management system, including:
According to first IP address, from the network device registration information in network management system obtaining the second network sets The first standby MAC Address, wherein, the network device registration information is:Each network equipment is in the net When carrying out facility registration in guard system, to the facility information that the network management system is reported.
5. the method according to any one of claim 1-4, it is characterised in that it is described will be described first There is the first MAC Address of corresponding relation corresponding in the ARP table of the network equipment with first IP address Two network equipments, are defined as the network equipment that there is direct connected link with the first network equipment, including:
The corresponding 2nd MAC ground of first IP address is obtained from the ARP table of the first network equipment Location;
Obtain the 3rd MAC Address overlapped with second MAC Address in first MAC Address;
By corresponding second network equipment of the 3rd MAC Address, it is defined as being deposited with the first network equipment In the network equipment of direct connected link.
6. a kind of topology obtains device, is applied to first network equipment, it is characterised in that described device includes:
First network equipment determining module, for indirectly connected type in the IP route table for determining the first network equipment Corresponding second network equipment of first IP address of the next-hop network equipment of example;
MAC Address obtains module, for according to first IP address, the second net being obtained from network management system First MAC Address of network equipment;
Second network equipment determining module, for when obtain multiple first MAC Address when, will be described first There is the first MAC Address of corresponding relation corresponding in the ARP table of the network equipment with first IP address Two network equipments, are defined as the network equipment that there is direct connected link with the first network equipment, wherein, institute State ARP table, for record the IP address of the network equipment that there is direct connected link with the first network equipment with The corresponding relation of MAC Address;
Topology obtains module, for the network equipment according to determined by, obtains opening up for the first network equipment Flutter.
7. device according to claim 6, it is characterised in that the first network equipment determining module, Including:
Example searches submodule, is non-for searching route-type from the IP route table of the first network equipment The example of direct linkage type;
Example filter submodule, for carrying out filtration treatment to the example for finding, filtering out destination address is The example of default gateway;
IP address obtain submodule, for obtained from the IP route table example after filtration treatment it is corresponding under One the first IP address for jumping the network equipment;
First network equipment determination sub-module, for determining corresponding second network equipment of first IP address.
8. device according to claim 7, it is characterised in that
The first network equipment determination sub-module, specifically for the network equipment in the network management system Log-on message, determines corresponding second network equipment of first IP address, wherein, the network device registration Information is:When each network equipment carries out facility registration in the network management system, in the network management system The facility information of report.
9. device according to claim 6, it is characterised in that
The MAC Address obtains module, specifically for according to first IP address, from network management system The first MAC Address of second network equipment is obtained in network device registration information, wherein, the network equipment Log-on message is:When each network equipment carries out facility registration in the network management system, to the webmaster system The facility information that system is reported.
10. the device according to any one of claim 6-9, it is characterised in that second network sets Standby determining module, including:
First MAC Address obtains submodule, for when multiple first MAC Address are obtained, from described first Corresponding second MAC Address of first IP address is obtained in the ARP table of the network equipment;
Second MAC Address obtains submodule, for obtain in first MAC Address with the 2nd MAC The 3rd MAC Address that address overlaps;
Second network equipment determination sub-module, for by corresponding second network equipment of the 3rd MAC Address, It is defined as the network equipment that there is direct connected link with the first network equipment.
CN201610234824.4A 2016-04-15 2016-04-15 Topology obtaining method and device Active CN106789146B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610234824.4A CN106789146B (en) 2016-04-15 2016-04-15 Topology obtaining method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610234824.4A CN106789146B (en) 2016-04-15 2016-04-15 Topology obtaining method and device

Publications (2)

Publication Number Publication Date
CN106789146A true CN106789146A (en) 2017-05-31
CN106789146B CN106789146B (en) 2021-04-02

Family

ID=58972206

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610234824.4A Active CN106789146B (en) 2016-04-15 2016-04-15 Topology obtaining method and device

Country Status (1)

Country Link
CN (1) CN106789146B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111143319A (en) * 2018-11-06 2020-05-12 顺丰科技有限公司 Method and device for detecting instance topology
CN111245662A (en) * 2020-03-09 2020-06-05 杭州迪普科技股份有限公司 Method and device for displaying network topology
CN115297027A (en) * 2022-08-02 2022-11-04 上海海得控制系统股份有限公司 Method, system, storage medium and network management server for identifying link between island network devices

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101616015A (en) * 2009-07-24 2009-12-30 中兴通讯股份有限公司 A kind of method and apparatus that obtains multicast topology information in the IP network
CN102158407A (en) * 2011-03-31 2011-08-17 华为技术有限公司 Address resolution protocol (ARP) table entry configuration method and device
CN102739433A (en) * 2011-03-30 2012-10-17 大势至(北京)软件工程有限公司 Control method of local area network computer through network management software allocation based on multi-net environment of three-layer switch
CN103139071A (en) * 2011-11-29 2013-06-05 华为技术有限公司 Method, device and system of message transmitting
CN104092576A (en) * 2014-07-30 2014-10-08 浙江宇视科技有限公司 Network topology calculation method and device
US20140369183A1 (en) * 2012-11-19 2014-12-18 International Business Machines Corporation Performing Failover in a Redundancy Group
CN105376163A (en) * 2015-10-14 2016-03-02 山东超越数控电子有限公司 Discovery method and device of network topological structure

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101616015A (en) * 2009-07-24 2009-12-30 中兴通讯股份有限公司 A kind of method and apparatus that obtains multicast topology information in the IP network
CN102739433A (en) * 2011-03-30 2012-10-17 大势至(北京)软件工程有限公司 Control method of local area network computer through network management software allocation based on multi-net environment of three-layer switch
CN102158407A (en) * 2011-03-31 2011-08-17 华为技术有限公司 Address resolution protocol (ARP) table entry configuration method and device
CN103139071A (en) * 2011-11-29 2013-06-05 华为技术有限公司 Method, device and system of message transmitting
US20140369183A1 (en) * 2012-11-19 2014-12-18 International Business Machines Corporation Performing Failover in a Redundancy Group
CN104092576A (en) * 2014-07-30 2014-10-08 浙江宇视科技有限公司 Network topology calculation method and device
CN105376163A (en) * 2015-10-14 2016-03-02 山东超越数控电子有限公司 Discovery method and device of network topological structure

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111143319A (en) * 2018-11-06 2020-05-12 顺丰科技有限公司 Method and device for detecting instance topology
CN111245662A (en) * 2020-03-09 2020-06-05 杭州迪普科技股份有限公司 Method and device for displaying network topology
CN111245662B (en) * 2020-03-09 2023-01-24 杭州迪普科技股份有限公司 Method and device for displaying network topology
CN115297027A (en) * 2022-08-02 2022-11-04 上海海得控制系统股份有限公司 Method, system, storage medium and network management server for identifying link between island network devices
CN115297027B (en) * 2022-08-02 2023-08-25 上海海得控制系统股份有限公司 Method, system, storage medium and network management server for identifying links between island network devices

Also Published As

Publication number Publication date
CN106789146B (en) 2021-04-02

Similar Documents

Publication Publication Date Title
US9203743B2 (en) Packet forwarding system, control device, forwarding device and method and program for preparing processing rules
CN102801567B (en) Method for automatically discovering hierarchical network topology and method for establishing hierarchical network topology
US9450779B2 (en) Edge link discovery
CN111934921B (en) Network topology discovery method and device, equipment and storage medium
CN102143007A (en) Distribution-based hierarchical network topology discovery method
CN107026791A (en) VPN vpn service optimization method and equipment
CN101917434B (en) Method for verifying intra-domain Internet protocol (IP) source address
CN106789146A (en) A kind of topological preparation method and device
CN102611619B (en) The method and routing device of a kind of forwarding data packets
CN107800623A (en) Heterogeneous network communication method and system and SDN controllers
CN102811227A (en) Administration mechanism for standard way access control list (ACL) rule under internet protocol security (IPsec) protocol
CN101702656A (en) Discovery method of network topology based on MPLS-VPN
CN109818858A (en) For realizing the methods, devices and systems of topological relation automatic Mosaic between domain
CN107124297A (en) SNMP method for discovering network topology and device based on zabbix
CN107104809B (en) A kind of method and system generating network topological diagram
CN105637806A (en) Method and apparatus for determining network topology, and centralized network state information storage device
CN104579979A (en) Network topology discovery method based on MAC information
CN105812168B (en) A kind of method and apparatus for drawing network topological diagram
CN107547676A (en) A kind of address processing method and device
CN103607350A (en) Method and device for generating route
CN114244763B (en) Dynamic network topology management method and system based on rule engine
CN112243010B (en) SRv 6-based traffic collection method and device, computer equipment and storage medium
CN105634944A (en) Routing loop determination method and equipment
CN106789757A (en) A kind of access control method and device
CN106411748B (en) The dynamic topology maintaining method of across a network

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant