CN110247784B - Method and device for determining network topology structure - Google Patents
Method and device for determining network topology structure Download PDFInfo
- Publication number
- CN110247784B CN110247784B CN201810185945.3A CN201810185945A CN110247784B CN 110247784 B CN110247784 B CN 110247784B CN 201810185945 A CN201810185945 A CN 201810185945A CN 110247784 B CN110247784 B CN 110247784B
- Authority
- CN
- China
- Prior art keywords
- network
- data
- determining
- physical address
- host
- 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
- 238000000034 method Methods 0.000 title claims abstract description 40
- 230000000694 effects Effects 0.000 claims description 35
- 238000004590 computer program Methods 0.000 claims description 9
- 238000001914 filtration Methods 0.000 claims description 6
- 238000004088 simulation Methods 0.000 claims 1
- 238000001514 detection method Methods 0.000 abstract description 5
- 238000012423 maintenance Methods 0.000 abstract description 5
- 238000010586 diagram Methods 0.000 description 13
- 238000004891 communication Methods 0.000 description 7
- 230000006870 function Effects 0.000 description 7
- 238000012545 processing Methods 0.000 description 6
- 230000003287 optical effect Effects 0.000 description 4
- 230000008569 process Effects 0.000 description 4
- 238000012986 modification Methods 0.000 description 3
- 230000004048 modification Effects 0.000 description 3
- 230000008901 benefit Effects 0.000 description 2
- 230000005540 biological transmission Effects 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 239000000835 fiber Substances 0.000 description 2
- 230000000644 propagated effect Effects 0.000 description 2
- 239000004065 semiconductor Substances 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000010276 construction Methods 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 238000013507 mapping Methods 0.000 description 1
- 230000007246 mechanism Effects 0.000 description 1
- 238000012544 monitoring process Methods 0.000 description 1
- 239000013307 optical fiber Substances 0.000 description 1
- 239000000523 sample Substances 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 238000012360 testing method Methods 0.000 description 1
- 238000012546 transfer Methods 0.000 description 1
Classifications
-
- 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
-
- 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
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D30/00—Reducing energy consumption in communication networks
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
The invention discloses a method and a device for determining a network topology structure, and relates to the technical field of computers. One embodiment of the method comprises the following steps: acquiring first data related to a link layer discovery protocol to determine a connection relationship between network devices; acquiring second data related to an address resolution protocol and third data related to a medium access control protocol to determine a connection relationship between the network device and the host; and determining a network topology structure based on the connection relation between the network devices and the host. The embodiment can detect the network topology structure in real time, has higher precision and easy maintenance, does not generate extra network detection messages, and does not influence the forwarding of the messages by the equipment in the machine room.
Description
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a method and apparatus for determining a network topology.
Background
With the rapid development of internet technology, the number of network devices in the data centers of the internet and cloud computing companies is increased, the network topology structure is also more and more complex, and the network topology discovery is used as the most basic part of network monitoring and network obstacle removing, so that the network obstacle removing speed can be increased, and the connection relation between networks is provided for operation and maintenance personnel. The network topology refers to a layout of various devices interconnected by a transmission medium, i.e. a specific physical, i.e. real, or logical, i.e. virtual, arrangement among members forming a network.
Currently, the common network topology discovery method includes: a network topology discovery method based on a snmp protocol and a network topology discovery method based on a routing protocol. Wherein, the snmp protocol: simple Network Management Protocol a simple network management protocol consists of a set of network management standards, including an application layer protocol, database model and a set of resource objects.
In the process of implementing the present invention, the inventor finds that at least the following problems exist in the prior art:
because many probe data of the machine room are already grabbed based on the snmp protocol (such as port traffic), grabbing the device with high frequency through the snmp protocol easily causes too high usage rate of the CPU of the device, and affects the forwarding of the message by the device. In addition, the snmp protocol message is operated based on UDP, the condition of losing possibly occurs, and the precision is lower, so that the network topology discovery method based on the snmp protocol has poor effect on the machine room topology data with higher precision requirements. Among them, UDP (User Datagram Protocol ) is a connectionless transport layer protocol in the open system interconnection reference model, providing a transaction-oriented simple unreliable information transfer service. Although the network topology discovery method based on the routing protocol can also discover the link connection relationship, routing entries on most devices exist in the form of network segments, the topology cannot be completely detected, the precision is low, and the effect is poor for machine room topology data with high precision requirements.
Disclosure of Invention
In view of the above, the embodiment of the invention provides a method and a device for determining a network topology structure, which can detect the network topology structure in real time, have higher precision and are easy to maintain, and do not generate additional network detection messages and do not influence the forwarding of machine room equipment to the messages.
To achieve the above object, according to one aspect of the embodiments of the present invention, there is provided a method for determining a network topology, including: acquiring first data related to a link layer discovery protocol to determine a connection relationship between network devices; acquiring second data related to an address resolution protocol and third data related to a medium access control protocol to determine a connection relationship between the network device and the host; and determining a network topology structure based on the connection relation between the network devices and the host.
Optionally, the method further comprises: acquiring the IP of network equipment with full network activity; based on the IP, the network device with the whole network activity is simulated to be logged in, so that first data related to a link layer discovery protocol, second data related to an address resolution protocol and third data related to a medium access control protocol are acquired from the network device with the whole network activity.
Optionally, the method further comprises: acquiring configuration information of network equipment of whole network activity;
acquiring first data related to a link layer discovery protocol to determine a connection relationship between network devices includes: based on the configuration information and the first data, determining local port information of local network equipment and remote port information of remote network equipment connected with the local port; and determining the connection relation between the network devices according to the local port information of the local network device and the remote port information of the remote network device connected with the local port.
Optionally, determining the connection relationship between the network device and the host includes: analyzing the second data to determine a first physical address and a host corresponding to the first physical address; analyzing the third data to determine a second physical address, a network device corresponding to the second physical address, and a port of the network device; judging whether the first physical address and the second physical address are the same, and if so, determining that the host is connected with the port.
Optionally, parsing the second data to determine the first physical address and the host corresponding to the first physical address includes: analyzing the second data to obtain a first physical address and IP information; determining whether the IP information is the IP of the host based on the acquired IP of the network equipment with the whole network activity; if yes, determining a host corresponding to the first physical address.
To achieve the above object, according to one aspect of the embodiments of the present invention, there is provided an apparatus for determining a network topology, including: a first obtaining module, configured to obtain first data related to a link layer discovery protocol, so as to determine a connection relationship between network devices; a second obtaining module, configured to obtain second data related to an address resolution protocol and third data related to a medium access control protocol, so as to determine a connection relationship between the network device and the host; the topology structure determining module is used for determining a network topology structure based on the connection relation between the network devices and the host.
Optionally, the device further comprises an analog login module for: acquiring the IP of network equipment with full network activity; based on the IP, the network device with the whole network activity is simulated to be logged in, so that first data related to a link layer discovery protocol, second data related to an address resolution protocol and third data related to a medium access control protocol are acquired from the network device with the whole network activity.
Optionally, the device further comprises a configuration information acquisition module, configured to acquire configuration information of network equipment of the whole network activity; the first acquisition module is further configured to: based on the configuration information and the first data, determining local port information of local network equipment and remote port information of remote network equipment connected with the local port; and determining the connection relation between the network devices according to the local port information of the local network device and the remote port information of the remote network device connected with the local port.
Optionally, the second acquisition module is further configured to: analyzing the second data to determine a first physical address and a host corresponding to the first physical address; analyzing the third data to determine a second physical address, a network device corresponding to the second physical address, and a port of the network device; judging whether the first physical address and the second physical address are the same, and if so, determining that the host is connected with the port.
Optionally, the second acquisition module is further configured to: analyzing the second data to obtain a first physical address and IP information; determining whether the IP information is the IP of the host based on the acquired IP of the network equipment with the whole network activity; if yes, determining a host corresponding to the first physical address.
To achieve the above object, according to an aspect of an embodiment of the present invention, there is provided an electronic device including: one or more processors; and the storage device is used for storing one or more programs, and when the one or more programs are executed by the one or more processors, the one or more processors are enabled to realize the method for determining the network topology structure according to the embodiment of the invention.
To achieve the above object, according to one aspect of the embodiments of the present invention, there is provided a computer-readable medium having stored thereon a computer program which, when executed by a processor, implements a method of determining a network topology of an embodiment of the present invention.
One embodiment of the above invention has the following advantages or benefits: as determining a connection relationship between network devices based on the first data associated with the link layer discovery protocol; determining a connection relationship between the network device and the host according to the second data related to the address resolution protocol and the third data related to the medium access control protocol; based on the connection relation between the network devices and the host, the technical means of determining the network topology structure can detect the network topology structure in real time, the precision is high, the maintenance is easy, no additional network detection message is generated, and the forwarding of the message by the machine room device is not affected.
Further effects of the above-described non-conventional alternatives are described below in connection with the embodiments.
Drawings
The drawings are included to provide a better understanding of the invention and are not to be construed as unduly limiting the invention. Wherein:
FIG. 1 is a schematic diagram of the main flow of a method of determining network topology according to an embodiment of the present invention;
FIG. 2 is a network logic diagram of an embodiment of the present invention;
FIG. 3 is a schematic diagram of the main modules of an apparatus for determining network topology according to an embodiment of the present invention;
FIG. 4 is an exemplary system architecture diagram in which embodiments of the present invention may be applied;
fig. 5 is a schematic diagram of a computer system suitable for use in implementing an embodiment of the invention.
Detailed Description
Exemplary embodiments of the present invention will now be described with reference to the accompanying drawings, in which various details of the embodiments of the present invention are included to facilitate understanding, and are to be considered merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the invention. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
Fig. 1 is a schematic diagram of a main flow of a method for determining a network topology according to an embodiment of the present invention. As shown in fig. 1, the method includes:
step S101: acquiring first data related to a link layer discovery protocol to determine a connection relationship between network devices;
step S102: acquiring second data related to an address resolution protocol and third data related to a medium access control protocol to determine a connection relationship between the network device and the host;
step S103: and determining a network topology structure based on the connection relation between the network devices and the host.
In this method embodiment, the equipment in the machine room or the data center may be abstracted into a network logic diagram according to a logic relationship, as shown in fig. 2. The devices of the whole network (i.e. the devices of the machine room or the data center) refer to the devices flowing in the network data transmission process, and may be gateways, switches, routers, hosts and other machines in the network. In fig. 2, the core device layer may include a gateway; the Tor device layer may include routers or switches that access in a Tor (top of rank) manner.
Prior to step S101, the method further comprises:
acquiring the IP of network equipment with full network activity;
based on the IP, the network device with the whole network activity is simulated to be logged in, so that first data related to a link layer discovery protocol, second data related to an address resolution protocol and third data related to a medium access control protocol are acquired from the network device with the whole network activity.
The network device refers to a device having a network forwarding function, such as a switch, a route, and a gateway, that is, a device of the core device layer and a device of the Tor device layer in fig. 2. An active network device means that the network device is in a power-on state. The IP network segment of the network device in the general machine room or the data center of the machine room is preset, and then the preset network segment can be scanned in an active manner to obtain the IP of the network device with full network activity, for example, the IP of the network device with full network activity is obtained through a Ping command (PacketInternet Groper, internet packet explorer, program for testing network connection quantity, application format: ping space IP address). The IP of a network device may be referred to as a management IP, which is an IP address that can log in to the device and manage the device. Based on the obtained IP, each active network device is simulated to log in through ssh (Secure Shell protocol), and first data related to a link layer discovery protocol, second data related to an address resolution protocol and third data related to a medium access control protocol are acquired from the network devices which are active in the whole network.
Specifically, the first data related to the link layer discovery protocol, the second data related to the address resolution protocol, and the third data related to the medium access control protocol may be acquired from the device by means of Netconf (The Network Configuration Protocol, event notification mechanism of Netconf) or ssh analog execution command, etc.
The Link layer discovery Protocol (LLDP, link La6er Discover6 Protocol) provides a standard Link layer discovery manner, and may organize information such as main capability, management address, device identifier, interface identifier of the local network device into different TLVs (T6 pe/Length/Value), and package the TLVs in the LLDPDU (Link La6er Discover6 Protocol Data Unit, link layer discovery Protocol data unit) to issue a neighbor directly connected to the local network device.
Further, after logging on to the active network device, configuration information of the network device that is active on the whole network may be obtained, where the configuration information may include brand information, version information, and a name of the network device. A mapping relationship between the IP of the network device and the name of the network device may be obtained.
Since there may be multiple brands of network devices in a data center, the relevant commands of known brands may all be written into a program to obtain the brand and version information of the device. The storage form of the first data (hereinafter referred to as LLDP table entry data) related to the link layer discovery protocol can be determined according to the brand and version information, and the LLDP table entry data can be further analyzed.
The step of obtaining first data related to a link layer discovery protocol to determine a connection relationship between network devices includes:
determining local port information of a local network device and remote port information of a remote network device connected with the local port based on the configuration information and the first data related to the link layer discovery protocol;
and determining the connection relation between the network devices according to the local port information of the local network device and the remote port information of the remote network device connected with the local port. The network devices include local network devices and remote network devices.
Although the LLDP table entry data of different brands of network devices are stored in different forms, the data includes the name of the local port, the name of the remote port and the name of the remote network device.
Since the LLDP table entry data indicates a neighbor relation and is a mutual record relation, the name of the remote network device in the LLDP table entry data can be converted into the IP of the remote network device. As a specific example, logging in the network device a through the IP (hereinafter referred to as ip_a) of the network device a, there is one piece of data in the LLDP table entry data of the network device a: IFA-B-IFB, where IFA represents a local port ip_a, B represents a name of a remote network device B to which the local port ip_a is connected, and IFB represents a port of the remote network device B. Logging in the network device B through the IP (hereinafter referred to as ip_b) of the network device B, there is one piece of data in the LLDP table entry data of the network device B: IFB-a-IFA, where IFB represents the local port ip_b, a represents the name of the remote network device a to which the local port ip_b is connected, and IFA represents the port of the remote network device a. The connection relationship between the network device a and the network device B can be determined according to the LLDP table entry data of the two devices: port ip_a of network device a is connected to port ip_b of network device B.
In practical network applications, the host rarely opens the LLDP protocol, and even if the host opens the LLDP protocol, for the host running a docker (container) or virtual machine, the internal docker or virtual machine is hard to be perceived by the LLDP protocol. And for the network device, it can perform header learning on all data packets flowing through the port, so the connection relationship between the network device and the host can be detected by using the second data related to the address resolution protocol and the third data related to the medium access control protocol learned by the network device.
Among them, the address resolution protocol (ARP, address Resolution Protocol) is a TCP/IP protocol that obtains a physical address from an IP address. Broadcasting an ARP request containing a target IP address to all hosts on a network when the hosts send information, and receiving a return message so as to determine the physical address of the target; after receiving the return message, the IP address and the physical address are stored in the local ARP cache and kept for a certain time, and the ARP cache is directly inquired when the request is next time so as to save resources. The medium access control protocol (MAC, media Access Control) defines how data frames are transmitted over a medium. In links sharing the same bandwidth, access to the connection medium is "first come first served". The MAC address is called a physical address and is used to define the location of the network device. For convenience of description, the second data related to the address resolution protocol will be abbreviated as ARP entry data, and the third data related to the medium access control protocol will be abbreviated as MAC entry data.
For step S102, the step of acquiring ARP entry data and MAC entry data to determine a connection relationship between the network device and the host includes:
analyzing the acquired MAC table item data to determine a second physical address, network equipment corresponding to the second physical address and ports of the network equipment;
analyzing the acquired ARP table entry data to determine a first physical address and a host corresponding to the first physical address;
judging whether the first physical address and the second physical address are the same, and if so, determining that the host is connected with the port.
In some networks, there is a need to assign IP and physical addresses to a virtual local area network (vlan), so that filtering of MAC entry data is required to filter out the IP and physical addresses assigned to the virtual local area network (vlan), and specifically, filtering may be performed according to attribute information of a local port obtained by parsing the obtained MAC entry data.
The IP information stored in some ARP entry data is the IP of the network device, but not the IP of the host, so the IP information in the ARP entry data needs to be filtered, and specifically can be filtered according to the following process:
analyzing the acquired ARP table entry data to acquire a first physical address and IP information;
based on the acquired IP of the network equipment with the whole network activity, whether the IP information is the IP of the host computer or not;
if yes, determining the host corresponding to the first physical address
Wherein the IP information is the IP of the active network device or the IP of the host. And determining whether the IP information is the IP of the host or not based on the acquired IP of the network equipment with the whole network activity. When the IP information in the ARP table entry data is determined to be the IP of the host, the host corresponding to the second physical address can be determined.
Comparing the first physical address with the second physical address, and if the first physical address and the second physical address are the same, determining that the host in the ARP table entry data is connected with the port in the MAC table entry data.
Because the ARP entry data may be stored in the core device layer or in the Tor device layer, in order to make the determined network topology more complete and accurate, in the embodiment of the present invention, ARP entry data is obtained from the network device that is active in the whole network.
For step S103, a network topology is determined according to the determined connection relationship between the network devices and the host.
The method of the embodiment of the invention determines the connection relation between network devices according to the first data related to the link layer discovery protocol; determining a connection relationship between the network device and the host according to the second data related to the address resolution protocol and the third data related to the medium access control protocol; based on the connection relation between the network devices and the host, the technical means of determining the network topology structure can detect the network topology structure in real time, the precision is high, the maintenance is easy, no additional network detection message is generated, and the forwarding of the message by the machine room device is not affected.
Fig. 3 is a schematic diagram of main modules of an apparatus for determining a network topology according to an embodiment of the present invention. As shown in fig. 3, the apparatus 300 includes: a first obtaining module 301, configured to obtain first data related to a link layer discovery protocol, so as to determine a connection relationship between network devices; a second obtaining module 302, configured to obtain second data related to an address resolution protocol and third data related to a medium access control protocol, so as to determine a connection relationship between the network device and the host; the topology structure determining module 303 is configured to determine a network topology structure based on a connection relationship between the network devices and a host.
Optionally, the device further comprises an analog login module for: acquiring the IP of network equipment with full network activity; based on the IP, the network device with the whole network activity is simulated to be logged in, so that first data related to a link layer discovery protocol, second data related to an address resolution protocol and third data related to a medium access control protocol are acquired from the network device with the whole network activity.
Optionally, the device further comprises a configuration information acquisition module, configured to acquire configuration information of network equipment of the whole network activity;
the first acquisition module 301 is further configured to: determining local port information of a local network device and remote port information of a remote network device connected with the local port based on the configuration information and the first data related to the link layer discovery protocol; and determining the connection relation between the network devices according to the local port information of the local network device and the remote port information of the remote network device connected with the local port.
Optionally, the second obtaining module 302 is further configured to: analyzing the acquired second data related to the address analysis protocol to determine a first physical address and a host corresponding to the first physical address; analyzing the acquired third data related to the medium access control protocol to determine a second physical address, a network device corresponding to the second physical address and a port of the network device; judging whether the first physical address and the second physical address are the same, and if so, determining that the host is connected with the port.
Optionally, the second obtaining module 302 is further configured to: analyzing the acquired second data related to the address analysis protocol to acquire a first physical address and IP information; determining whether the IP information is the IP of the host based on the acquired IP of the network equipment with the whole network activity; if yes, determining a host corresponding to the first physical address.
The device can execute the method provided by the embodiment of the invention, and has the corresponding functional modules and beneficial effects of the execution method. Technical details not described in detail in this embodiment may be found in the methods provided in the embodiments of the present invention.
Fig. 4 illustrates an exemplary system architecture 400 of a method of determining a network topology or an apparatus of determining a network topology to which embodiments of the invention may be applied.
As shown in fig. 4, the system architecture 400 may include terminal devices 401, 402, 403, a network 404, and a server 405. The network 404 is used as a medium to provide communication links between the terminal devices 401, 402, 403 and the server 405. The network 404 may include various connection types, such as wired, wireless communication links, or fiber optic cables, among others.
A user may interact with the server 405 via the network 404 using the terminal devices 401, 402, 403 to receive or send messages or the like. Various communication client applications, such as shopping class applications, web browser applications, search class applications, instant messaging tools, mailbox clients, social platform software, etc., may be installed on the terminal devices 401, 402, 403.
The terminal devices 401, 402, 403 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smartphones, tablets, laptop and desktop computers, and the like.
The server 405 may be a server providing various services, such as a background management server providing support for shopping-type websites browsed by the user using the terminal devices 401, 402, 403. The background management server can analyze and other processing on the received data such as the product information inquiry request and the like, and feed back processing results (such as target push information and product information) to the terminal equipment.
It should be noted that, the method for determining a network topology according to the embodiment of the present invention is generally performed by the server 405, and accordingly, the device for determining a network topology is generally disposed in the server 405.
It should be understood that the number of terminal devices, networks and servers in fig. 4 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
Referring now to FIG. 5, there is illustrated a schematic diagram of a computer system 500 suitable for use in implementing an embodiment of the present invention. The terminal device shown in fig. 5 is only an example, and should not impose any limitation on the functions and the scope of use of the embodiment of the present invention.
As shown in fig. 5, the computer system 500 includes a Central Processing Unit (CPU) 501, which can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM) 502 or a program loaded from a storage section 508 into a Random Access Memory (RAM) 503. In the RAM 503, various programs and data required for the operation of the system 500 are also stored. The CPU 501, ROM 502, and RAM 503 are connected to each other through a bus 504. An input/output (I/O) interface 505 is also connected to bus 504.
The following components are connected to the I/O interface 505: an input section 506 including a keyboard, a mouse, and the like; an output portion 507 including a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker, and the like; a storage portion 508 including a hard disk and the like; and a communication section 509 including a network interface card such as a LAN card, a modem, or the like. The communication section 509 performs communication processing via a network such as the internet. The drive 510 is also connected to the I/O interface 505 as needed. A removable medium 511 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 510 as needed so that a computer program read therefrom is mounted into the storage section 508 as needed.
In particular, according to embodiments of the present disclosure, the processes described above with reference to flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method shown in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network via the communication portion 509, and/or installed from the removable media 511. The above-described functions defined in the system of the present invention are performed when the computer program is executed by a Central Processing Unit (CPU) 501.
The computer readable medium shown in the present invention may be a computer readable signal medium or a computer readable storage medium, or any combination of the two. The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples of the computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present invention, however, the computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, with the computer-readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The modules involved in the embodiments of the present invention may be implemented in software or in hardware. The described modules may also be provided in a processor, for example, as: a processor includes a sending module, an obtaining module, a determining module, and a first processing module. The names of these modules do not constitute a limitation on the unit itself in some cases, and for example, the transmitting module may also be described as "a module that transmits a picture acquisition request to a connected server".
As another aspect, the present invention also provides a computer-readable medium that may be contained in the apparatus described in the above embodiments; or may be present alone without being fitted into the device. The computer readable medium carries one or more programs which, when executed by a device, cause the device to include:
acquiring first data related to a link layer discovery protocol to determine a connection relationship between network devices;
acquiring second data related to an address resolution protocol and a data table related to a storage medium access control protocol to determine a connection relationship between the network device and the host;
and determining a network topology structure based on the connection relation between the network devices and the host.
According to the technical scheme of the embodiment of the invention, the connection relation between network devices is determined according to the first data related to the link layer discovery protocol; determining a connection relationship between the network device and the host according to the second data related to the address resolution protocol and the third data related to the medium access control protocol; based on the connection relation between the network devices and the host, the technical means of determining the network topology structure can detect the network topology structure in real time, the precision is high, the maintenance is easy, no additional network detection message is generated, and the forwarding of the message by the machine room device is not affected.
The above embodiments do not limit the scope of the present invention. It will be apparent to those skilled in the art that various modifications, combinations, sub-combinations and alternatives can occur depending upon design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the scope of the present invention.
Claims (10)
1. A method of determining a network topology, comprising:
acquiring first data related to a link layer discovery protocol to determine a connection relationship between network devices;
acquiring second data related to an address resolution protocol and third data related to a medium access control protocol, filtering out network equipment in the second data through IP information, and filtering out IP and physical addresses distributed for a virtual local area network in the third data through attribute information of a local port, so as to determine the connection relation between the network equipment and a host according to the filtered second data and the filtered third data;
determining a network topology structure based on the connection relationship between the network devices and the host;
further comprises:
acquiring the IP of network equipment with full network activity;
based on the IP, the network device with the whole network activity is simulated to be logged in, so that first data related to a link layer discovery protocol, second data related to an address resolution protocol and third data related to a medium access control protocol are acquired from the network device with the whole network activity.
2. The method according to claim 1, wherein the method further comprises:
acquiring configuration information of network equipment of whole network activity;
acquiring first data related to a link layer discovery protocol to determine a connection relationship between network devices includes:
based on the configuration information and the first data, determining local port information of local network equipment and remote port information of remote network equipment connected with the local port;
and determining the connection relation between the network devices according to the local port information of the local network device and the remote port information of the remote network device connected with the local port.
3. The method of claim 1, wherein determining the connection relationship between the network device and the host comprises:
analyzing the second data to determine a first physical address and a host corresponding to the first physical address;
analyzing the third data to determine a second physical address, a network device corresponding to the second physical address, and a port of the network device;
judging whether the first physical address and the second physical address are the same, and if so, determining that the host is connected with the port.
4. The method of claim 3, wherein parsing the second data to determine the first physical address and the host corresponding to the first physical address comprises:
analyzing the second data to obtain a first physical address and IP information;
determining whether the IP information is the IP of the host based on the acquired IP of the network equipment with the whole network activity;
if yes, determining a host corresponding to the first physical address.
5. An apparatus for determining a network topology, comprising:
a first obtaining module, configured to obtain first data related to a link layer discovery protocol, so as to determine a connection relationship between network devices;
the second acquisition module is used for acquiring second data related to the address resolution protocol and third data related to the medium access control protocol, filtering out network equipment in the second data through IP information, and filtering out IP and physical addresses distributed for the virtual local area network in the third data through attribute information of a local port, so as to determine the connection relation between the network equipment and the host according to the filtered second data and the filtered third data;
the topology structure determining module is used for determining a network topology structure based on the connection relation between the network devices and the host;
the simulation login module is used for: acquiring the IP of network equipment with full network activity; based on the IP, the network device with the whole network activity is simulated to be logged in, so that first data related to a link layer discovery protocol, second data related to an address resolution protocol and third data related to a medium access control protocol are acquired from the network device with the whole network activity.
6. The apparatus of claim 5, wherein the device comprises a plurality of sensors,
the device also comprises a configuration information acquisition module, a configuration information acquisition module and a configuration information acquisition module, wherein the configuration information acquisition module is used for acquiring configuration information of network equipment with full network activity;
the first acquisition module is further configured to: based on the configuration information and the first data, determining local port information of local network equipment and remote port information of remote network equipment connected with the local port;
and determining the connection relation between the network devices according to the local port information of the local network device and the remote port information of the remote network device connected with the local port.
7. The apparatus of claim 5, wherein the second acquisition module is further configured to:
analyzing the second data to determine a first physical address and a host corresponding to the first physical address;
analyzing the third data to determine a second physical address, a network device corresponding to the second physical address, and a port of the network device;
judging whether the first physical address and the second physical address are the same, and if so, determining that the host is connected with the port.
8. The apparatus of claim 7, wherein the second acquisition module is further configured to:
analyzing the second data to obtain a first physical address and IP information;
determining whether the IP information is the IP of the host based on the acquired IP of the network equipment with the whole network activity;
if yes, determining a host corresponding to the first physical address.
9. An electronic device, comprising:
one or more processors;
storage means for storing one or more programs,
when executed by the one or more processors, causes the one or more processors to implement the method of any of claims 1-4.
10. A computer readable medium, on which a computer program is stored, characterized in that the program, when being executed by a processor, implements the method according to any of claims 1-4.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201810185945.3A CN110247784B (en) | 2018-03-07 | 2018-03-07 | Method and device for determining network topology structure |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201810185945.3A CN110247784B (en) | 2018-03-07 | 2018-03-07 | Method and device for determining network topology structure |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN110247784A CN110247784A (en) | 2019-09-17 |
| CN110247784B true CN110247784B (en) | 2023-09-26 |
Family
ID=67882450
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201810185945.3A Active CN110247784B (en) | 2018-03-07 | 2018-03-07 | Method and device for determining network topology structure |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN110247784B (en) |
Families Citing this family (15)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN111343021B (en) * | 2020-02-27 | 2022-08-12 | 中国移动通信集团江苏有限公司 | Method, device, device and medium for generating network topology |
| CN113542192B (en) * | 2020-04-14 | 2023-09-05 | 中国移动通信集团浙江有限公司 | Illegal network device access detection method, device, computing device and storage medium |
| CN111817911B (en) * | 2020-06-23 | 2023-08-08 | 腾讯科技(深圳)有限公司 | Method, device, computing equipment and storage medium for detecting network quality |
| CN111756756B (en) * | 2020-06-28 | 2022-08-05 | 深圳市信锐网科技术有限公司 | Terminal network control method and device, electronic equipment and storage medium |
| CN111917609B (en) * | 2020-08-12 | 2022-02-11 | 中国工商银行股份有限公司 | Network equipment connectivity monitoring method and system |
| CN112615750A (en) * | 2020-12-28 | 2021-04-06 | 广州西麦科技股份有限公司 | Backbone network flow granularity adjusting system and method based on SDN |
| CN112953774B (en) * | 2021-02-25 | 2023-05-16 | 山东英信计算机技术有限公司 | Network topology generation method, system, equipment and computer storage medium |
| CN113194004B (en) * | 2021-05-20 | 2023-04-07 | 中国工商银行股份有限公司 | Network topology construction method and device, and network change processing method and device |
| CN113746704A (en) * | 2021-09-08 | 2021-12-03 | 迈普通信技术股份有限公司 | Fault monitoring method and device, electronic equipment and computer readable storage medium |
| CN114389982B (en) * | 2022-01-04 | 2024-04-09 | 北京全路通信信号研究设计院集团有限公司 | Network quality assessment method, device, equipment and medium |
| CN114374614B (en) * | 2022-03-03 | 2023-12-26 | 中国工商银行股份有限公司 | Network topology configuration method and device |
| CN114726909B (en) * | 2022-03-15 | 2024-12-31 | 阿里云计算有限公司 | Cloud service migration information processing method, device, equipment, medium and product |
| CN115022180B (en) * | 2022-05-18 | 2024-05-28 | 浪潮思科网络科技有限公司 | Topology management method, device, equipment and medium based on RoCE-SAN |
| CN115277437B (en) * | 2022-07-29 | 2023-12-01 | 湖南大学 | Network topology construction method, device, computer equipment and storage medium |
| CN116094990B (en) * | 2023-01-19 | 2024-06-14 | 重庆长安汽车股份有限公司 | Software optimization method and device based on MAC address forwarding table and electronic equipment |
Citations (14)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN101170445A (en) * | 2007-11-20 | 2008-04-30 | 中兴通讯股份有限公司 | Topology method and system for IP network management cluster in simple network management |
| CN101764709A (en) * | 2009-12-29 | 2010-06-30 | 福建星网锐捷网络有限公司 | Network physical topology discovering method and network management server based on SNMP |
| CN101873230A (en) * | 2010-07-05 | 2010-10-27 | 北京星网锐捷网络技术有限公司 | Method and device for discovering physical network topology |
| CN102143007A (en) * | 2011-05-03 | 2011-08-03 | 中国南方电网有限责任公司 | Distribution-based hierarchical network topology discovery method |
| WO2013033457A1 (en) * | 2011-08-30 | 2013-03-07 | Qualcomm Atheros, Inc. | Topology discovery in a hybrid network |
| CN103036725A (en) * | 2012-12-17 | 2013-04-10 | 华为技术有限公司 | Network administration device and method for discovery of network topology |
| CN103281248A (en) * | 2013-06-09 | 2013-09-04 | 北京星网锐捷网络技术有限公司 | Network topology discovering method, device and system |
| WO2014183519A1 (en) * | 2013-05-14 | 2014-11-20 | 中兴通讯股份有限公司 | Network topology discovery method and system |
| CN105227383A (en) * | 2015-11-06 | 2016-01-06 | 广东电网有限责任公司电力科学研究院 | A kind of device of network topology investigation |
| CN105847023A (en) * | 2015-01-14 | 2016-08-10 | 北京神州泰岳信息安全技术有限公司 | Service system network topology relationship obtaining method and device |
| CN105897490A (en) * | 2016-06-24 | 2016-08-24 | 深圳市风云实业有限公司 | Automatic network topology discovery method |
| CN105991334A (en) * | 2015-02-28 | 2016-10-05 | 中国移动通信集团广西有限公司 | Network topology self-discovering method and device |
| CN107634842A (en) * | 2016-07-18 | 2018-01-26 | 阿里巴巴集团控股有限公司 | Method for discovering network topology and device |
| CN107733713A (en) * | 2017-10-18 | 2018-02-23 | 北京德塔精要信息技术有限公司 | The acquisition methods of network topology, system, equipment and storage medium in hybrid network |
Family Cites Families (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US9369375B2 (en) * | 2013-12-10 | 2016-06-14 | Red Hat, Inc. | Link-layer level link aggregation autoconfiguration |
| US9973390B2 (en) * | 2015-05-08 | 2018-05-15 | Fixstream Networks Inc. | Method of discovering network topology |
-
2018
- 2018-03-07 CN CN201810185945.3A patent/CN110247784B/en active Active
Patent Citations (14)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN101170445A (en) * | 2007-11-20 | 2008-04-30 | 中兴通讯股份有限公司 | Topology method and system for IP network management cluster in simple network management |
| CN101764709A (en) * | 2009-12-29 | 2010-06-30 | 福建星网锐捷网络有限公司 | Network physical topology discovering method and network management server based on SNMP |
| CN101873230A (en) * | 2010-07-05 | 2010-10-27 | 北京星网锐捷网络技术有限公司 | Method and device for discovering physical network topology |
| CN102143007A (en) * | 2011-05-03 | 2011-08-03 | 中国南方电网有限责任公司 | Distribution-based hierarchical network topology discovery method |
| WO2013033457A1 (en) * | 2011-08-30 | 2013-03-07 | Qualcomm Atheros, Inc. | Topology discovery in a hybrid network |
| CN103036725A (en) * | 2012-12-17 | 2013-04-10 | 华为技术有限公司 | Network administration device and method for discovery of network topology |
| WO2014183519A1 (en) * | 2013-05-14 | 2014-11-20 | 中兴通讯股份有限公司 | Network topology discovery method and system |
| CN103281248A (en) * | 2013-06-09 | 2013-09-04 | 北京星网锐捷网络技术有限公司 | Network topology discovering method, device and system |
| CN105847023A (en) * | 2015-01-14 | 2016-08-10 | 北京神州泰岳信息安全技术有限公司 | Service system network topology relationship obtaining method and device |
| CN105991334A (en) * | 2015-02-28 | 2016-10-05 | 中国移动通信集团广西有限公司 | Network topology self-discovering method and device |
| CN105227383A (en) * | 2015-11-06 | 2016-01-06 | 广东电网有限责任公司电力科学研究院 | A kind of device of network topology investigation |
| CN105897490A (en) * | 2016-06-24 | 2016-08-24 | 深圳市风云实业有限公司 | Automatic network topology discovery method |
| CN107634842A (en) * | 2016-07-18 | 2018-01-26 | 阿里巴巴集团控股有限公司 | Method for discovering network topology and device |
| CN107733713A (en) * | 2017-10-18 | 2018-02-23 | 北京德塔精要信息技术有限公司 | The acquisition methods of network topology, system, equipment and storage medium in hybrid network |
Non-Patent Citations (1)
| Title |
|---|
| 数据链路层拓扑发现关键技术研究;王旭阳;《中国优秀硕士学位论文全文数据库》;20090615;全文 * |
Also Published As
| Publication number | Publication date |
|---|---|
| CN110247784A (en) | 2019-09-17 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN110247784B (en) | Method and device for determining network topology structure | |
| US11477097B2 (en) | Hierarchichal sharding of flows from sensors to collectors | |
| US10212041B1 (en) | Traffic pattern detection and presentation in container-based cloud computing architecture | |
| US9973390B2 (en) | Method of discovering network topology | |
| CN104718723B (en) | For the networking in virtual network and the frame of security service | |
| US9898317B2 (en) | Physical path determination for virtual network packet flows | |
| CN107094090B (en) | Physical path determination for virtual network packet flows | |
| CN107528862B (en) | Domain name resolution method and device | |
| US9100298B2 (en) | Host visibility as a network service | |
| WO2020135575A1 (en) | System and method for obtaining network topology, and server | |
| US9473369B2 (en) | Application topology based on network traffic | |
| CN112511660B (en) | Management system, method and device of edge terminal equipment and storage medium | |
| US20150256413A1 (en) | Network system with live topology mechanism and method of operation thereof | |
| CN107579876A (en) | A method and device for automatic detection and analysis of asset increment | |
| TW201543243A (en) | Capability monitoring in a service oriented architecture | |
| CN107181681B (en) | SDN two-layer forwarding method and system | |
| US20250280015A1 (en) | Blocking and alerting with domain fronting intelligence | |
| CN113364681A (en) | Network path determination method, network path determination device, electronic apparatus, network path determination medium, and program product | |
| CN113098776B (en) | A method, device, device and storage medium for determining network topology | |
| CN120499072B (en) | Routing-based directional forwarding method, equipment, medium and product | |
| US11563640B2 (en) | Network data extraction parser-model in SDN | |
| US20240236118A1 (en) | Detecting and alerting on domain fronting within a network | |
| CN116032995A (en) | Data communication method and device, electronic equipment and computer readable storage medium | |
| KR20160062686A (en) | SDN network system by a host abstraction and implemented method therefor | |
| Zhang et al. | High-Efficiency Automatic Discovery of Optical Communication Device Based on MDNS |
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 |