CN106713042B - Method and device for determining network topology - Google Patents

Method and device for determining network topology Download PDF

Info

Publication number
CN106713042B
CN106713042B CN201611249811.0A CN201611249811A CN106713042B CN 106713042 B CN106713042 B CN 106713042B CN 201611249811 A CN201611249811 A CN 201611249811A CN 106713042 B CN106713042 B CN 106713042B
Authority
CN
China
Prior art keywords
server
network topology
switch
physical server
virtual
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
Application number
CN201611249811.0A
Other languages
Chinese (zh)
Other versions
CN106713042A (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.)
China Unionpay Co Ltd
Original Assignee
China Unionpay 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 China Unionpay Co Ltd filed Critical China Unionpay Co Ltd
Priority to CN201611249811.0A priority Critical patent/CN106713042B/en
Publication of CN106713042A publication Critical patent/CN106713042A/en
Application granted granted Critical
Publication of CN106713042B publication Critical patent/CN106713042B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

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)
  • Computer And Data Communications (AREA)

Abstract

The invention provides a method and a device for determining network topology, wherein the method comprises the following steps: acquiring configuration parameters of a switch; generating a calling instruction according to the configuration parameters; sending a calling instruction to the switch and receiving a first network topology fed back by the switch, wherein the first network topology is a calling relation between the switch and a physical server connected with the switch; sending a detection instruction to a physical server, wherein the detection instruction is used for indicating the physical server to run a virtual machine detection program; the virtual machine detection program provides interfaces corresponding to at least two virtualization technologies; acquiring a detection result returned by the virtual machine detection program, and determining a second network topology according to the detection result, wherein the second network topology is a call relation between a virtual server and a switch loaded in a physical server; and determining the network topology of the current network according to the first network topology and the second network topology. And a more complete network topology is obtained, and the operation and maintenance requirements of cluster management of the large-scale switch and the physical server are met.

Description

Method and device for determining network topology
Technical Field
The invention relates to the technical field of computer networks, in particular to a method and a device for determining network topology.
Background
Server virtualization is a virtualized operating environment in which multiple Virtual Machines (VMs) are implemented on a physical server by means of virtualization software. The physical resources of the server are abstracted into the logical resources, one server becomes several or even hundreds of virtual servers which are isolated from each other, the physical limit is not limited, but hardware such as a CPU, a memory, a disk, an I/O and the like becomes a resource pool which can be dynamically managed, so that the utilization rate of the resources is improved, the system management is simplified, the integration of the server is realized, and the IT has higher adaptability to the change of the business.
With the rapid growth of business, the number of physical servers is increasing. Particularly, in the current cloud environment, more and more businesses are placed on virtual servers by enterprises, the physical servers and the virtual servers are added into different networks according to different purposes, so that the network scale is continuously enlarged, and the virtual servers can automatically migrate to available physical servers when the physical servers fail, so that the network topology changes, which increases the difficulty of network maintenance.
However, in the prior art, the network topology acquisition automation degree is low, the virtual server network topology connected with the switch cannot be given or only a Xen virtual server network topology graph can be obtained, the flexibility is poor, and the technical requirement of efficient operation and maintenance in a cloud environment cannot be met.
Disclosure of Invention
The invention provides a method and a device for determining network topology, which are used for solving the problems that in the prior art, the network topology of a virtual server connected with a switch cannot be given or only a Xen virtual server network topology graph can be obtained, the flexibility is poor, and the high-efficiency operation and maintenance under a cloud environment cannot be met.
The embodiment of the invention provides a method for determining network topology, which comprises the following steps:
acquiring configuration parameters of a switch;
generating a calling instruction according to the configuration parameters;
sending the calling instruction to a switch and receiving a first network topology fed back by the switch, wherein the first network topology is a calling relation between the switch and a physical server connected with the switch;
sending a detection instruction to the physical server, wherein the detection instruction is used for instructing the physical server to run a virtual machine detection program; the virtual machine detection program provides interfaces corresponding to at least two virtualization technologies;
acquiring a detection result returned by the virtual machine detection program, and determining a second network topology according to the detection result, wherein the second network topology is a call relation between a virtual server loaded in the physical server and the switch;
and determining the network topology of the current network according to the first network topology and the second network topology.
In the embodiment of the invention, the call instruction can be sent to the switch, the first network topology can be determined according to the content fed back after the switch receives the call instruction, the detection instruction is sent to the physical server, the virtual machine detection program is operated in the physical server, the call relation between the virtual server borne in the physical server and the switch is obtained, the second network topology is determined, and the network topology of the current network is determined according to the first network topology and the second network topology. In the embodiment of the invention, the second network topology relation can acquire the topology relation of the virtual servers corresponding to at least two virtualization technologies, and compared with the prior art, the method can acquire a more complete network topology in the network, thereby meeting the operation and maintenance requirements of cluster management of a large-scale switch and a physical server in a cloud environment.
Further, the determining a second network topology according to the detection result includes:
acquiring attribute information of the virtual server in the detection result;
determining a switch matched with the attribute information of the virtual server;
and determining a second network topology according to the matched switch and the virtual server.
In the embodiment of the invention, the switch matched with the attribute information is searched according to the attribute information of the virtual server in the obtained detection result, and the second network topology is determined according to the calling relationship between the matched switch and the virtual server.
Further, before sending the probe instruction to the physical server, the method further includes:
determining whether the physical server is a physical server bearing a virtual server;
and if the physical server is determined to be the physical server bearing the virtual server, calling a virtual machine detection program, and pushing the virtual machine detection program to the physical server.
In the embodiment of the invention, the detection instruction is sent only when the physical server is determined to be the physical server bearing the virtual server, so that the network resource is saved.
Further, the air conditioner is provided with a fan,
the obtaining of the configuration parameters of the switch includes:
acquiring configuration parameters of the switch from a database server; or the like, or, alternatively,
the determining the switch matched with the attribute information of the virtual server includes:
determining an exchanger matched with the attribute information of the virtual server according to the matching relationship between the attribute information of the virtual server and the exchanger acquired from the database server; or the like, or, alternatively,
determining whether the physical server is a physical server bearing a virtual server, comprising:
and determining whether the physical server is the physical server bearing the virtual server or not according to the information of whether the physical server bears the virtual server or not acquired from the database server.
In the embodiment of the invention, the configuration parameters of the switch, the information whether the physical server is a physical server bearing the virtual server or not and the attribute information of the switch are stored in the database server, so that the distributed layout of the servers in the network is realized, and the load pressure of the servers in the two networks is reduced.
Further, after determining the network topology of the current network according to the first network topology and the second network topology, the method further includes:
and sending the current network topology to a front-end display server so that the front-end display server displays the current network topology.
In the embodiment of the invention, the latest topological relation is pushed to the front-end display server to display the latest network topology map, so that the real-time acquisition and accuracy of the network topology are ensured.
The invention provides a network isolation device, comprising:
the acquisition unit is used for acquiring configuration parameters of the switch;
the generating unit is used for generating a calling instruction according to the configuration parameters;
the first network topology determining unit is used for sending the calling instruction to a switch and receiving a first network topology fed back by the switch, wherein the first network topology is a calling relation between the switch and a physical server connected with the switch;
a probe instruction sending unit, configured to send a probe instruction to the physical server, where the probe instruction is used to instruct the physical server to run a virtual machine probe program; the virtual machine detection program provides interfaces corresponding to at least two virtualization technologies;
a second network topology determining unit, configured to obtain a detection result returned by the virtual machine detection program, and determine a second network topology according to the detection result, where the second network topology is a call relationship between a virtual server loaded in the physical server and the switch;
and the network topology determining unit is used for determining the network topology of the current network according to the first network topology and the second network topology.
In the embodiment of the invention, the call instruction can be sent to the switch, the first network topology can be determined according to the content fed back after the switch receives the call instruction, the detection instruction is sent to the physical server, the virtual machine detection program is operated in the physical server, the call relation between the virtual server borne in the physical server and the switch is obtained, the second network topology is determined, and the network topology of the current network is determined according to the first network topology and the second network topology. In the embodiment of the invention, the second network topology relation can acquire the topology relation of the virtual servers corresponding to at least two virtualization technologies, and compared with the prior art, the method can acquire a more complete network topology in the network, thereby meeting the operation and maintenance requirements of cluster management of a large-scale switch and a physical server in a cloud environment.
Further, the second network topology determining unit is specifically configured to:
acquiring attribute information of the virtual server in the detection result;
determining a switch matched with the attribute information of the virtual server;
and determining a second network topology according to the matched switch and the virtual server.
Further, the probe instruction sending unit is further configured to:
determining whether the physical server is a physical server bearing a virtual server;
and if the physical server is determined to be the physical server bearing the virtual server, calling a virtual machine detection program, and pushing the virtual machine detection program to the physical server.
Further, the obtaining unit is specifically configured to:
acquiring configuration parameters of the switch from a database server; or the like, or, alternatively,
the second network topology determining unit is specifically configured to:
determining an exchanger matched with the attribute information of the virtual server according to the matching relationship between the attribute information of the virtual server and the exchanger acquired from the database server; or the like, or, alternatively,
the detection instruction sending unit is specifically configured to:
and determining whether the physical server is the physical server bearing the virtual server or not according to the information of whether the physical server bears the virtual server or not acquired from the database server.
Further, the apparatus further comprises:
and the display unit is used for sending the current network topology to a front-end display server so as to enable the front-end display server to display the current network topology.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without inventive exercise.
Fig. 1 is a schematic structural diagram of a system for determining a network topology according to an embodiment of the present invention;
fig. 2 is a schematic diagram illustrating a connection between a switch and a physical server, and a connection between the physical server and a virtual server according to an embodiment of the present invention;
fig. 3 is a schematic diagram illustrating a connection between a switch and a physical server and a connection between a physical server and a virtual server according to an embodiment of the present invention;
fig. 4 is a schematic diagram of a connection between a physical server and a switch according to an embodiment of the present invention;
fig. 5 is a schematic diagram of a second network topology according to an embodiment of the present invention;
fig. 6 is a schematic flowchart of a method for determining a network topology according to an embodiment of the present invention;
fig. 7 is a schematic structural diagram of an apparatus for determining a network topology according to an embodiment of the present invention;
fig. 8 is a schematic flowchart of a method for determining a network topology according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention clearer, the present invention will be described in further detail with reference to the accompanying drawings, and it is apparent that the described embodiments are only a part of the embodiments of the present invention, not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The invention provides a system for determining network topology, as shown in fig. 1, comprising:
the system comprises an automatic acquisition server 101, a switch 102, a physical server 103, a virtual server 104 carried by the physical server 103, a database server 105 and a front-end display server 106.
In the embodiment of the present invention, when the automatic acquisition server 101 needs to determine the current network topology, the automatic acquisition server 101 obtains the configuration parameters of the switch 102.
Optionally, the automatic acquisition server 101 may periodically determine the current network topology, that is, a countdown clock may be set in the automatic acquisition server 101, and when the period arrives, the configuration parameters of the switch 102 are obtained; the automatic acquisition server 101 may further determine the network topology of the current network through an update message sent by the database server 105, and when determining that the number of switches 102 in the current network changes or the physical server 103 changes, or the virtual server 104 migrates, the data block server 105 sends an update request to the automatic acquisition server 101.
In the embodiment of the present invention, since a plurality of switches 102 are arranged in a network, manufacturers of each switch 102 are different, and parameters of each switch 102 are also different, before a call instruction is sent to the switch 102, configuration parameters of each switch 102 in the network also need to be obtained, for example, 4 switches 102 are arranged in the current network, which are respectively a switch 1, a switch 2, a switch 3, and a switch 4, the switch 1 and the switch 2 are produced by the same manufacturer, the configuration parameters of the switch 1 and the switch 2 are the same and are the configuration parameters 1, manufacturers of the switch 3 and the switch 1, the switch 2, and the switch 4 are different, the configuration parameter of the switch 3 is the configuration parameter 2, manufacturers of the switch 4 and the switches 1, 2, and 3 are different, and the configuration parameter of the switch 4 is the configuration parameter 3.
In the embodiment of the present invention, the automatic acquisition server 101 generates a call instruction according to the acquired configuration parameter of each switch 102, where the call instruction refers to a command that the switch 102 can acquire a first network topology relationship of the physical server 103 connected to or called by the switch 102 according to the call instruction.
Optionally, in the embodiment of the present invention, the call instruction is an SNMP (Simple Network management protocol) command, and the switch 102 can obtain, according to the SNMP command, a Network topology of the physical server 103 called by the switch 102 and set the Network topology as the first Network topology.
Optionally, in this embodiment of the present invention, when the call instruction is an SNMP instruction, the configuration parameter of the switch 102 is an SNMP parameter of each switch.
Optionally, in the embodiment of the present invention, the SNMP parameters of each switch 102 acquired by the automatic acquisition server 101 may be stored in the automatic acquisition server 101 or acquired from the database server 105.
After the automatic acquisition server 101 acquires the SNMP parameters of each switch 102, it generates SNMP call instructions according to the SNMP parameters and sends the SNMP call instructions to the corresponding switches 102.
For example, in the embodiment of the present invention, after the SNMP commands are executed by 3 switches 102, the connection relationship between the port of each switch 102 and the switch 1 is fed back. As shown in fig. 1, there are 3 switches 102 in the current network, which are switch 1, switch 2, and switch 3; the switch 1 is connected with the physical server 1 and the physical server 2, and the switch 2 is connected with the physical server 3 and the physical server 4; the switch 3 is connected to a physical server 5.
Optionally, in the embodiment of the present invention, each switch 102 acquires a correspondence table between a port of the switch 102 and a MAC address of the physical server 103, for example, as shown in table 1, the above-mentioned topological relationship is represented by a correspondence table between a port of the switch 103 and a MAC address of the physical server 103:
Figure BDA0001197819110000081
table 1: correspondence table of ports of switch and MAC addresses of physical servers
In the embodiment of the present invention, the correspondence between the MAC address of the physical server 103 and the identification information of the physical server 103 is stored in the automatic acquisition server 101, and the identification information of the physical server 103 is determined by the correspondence.
Alternatively, in order to reduce the load in the automatic acquisition server 101, the automatic acquisition server 101 may acquire the correspondence between the MAC address of the physical machine 103 and the identification information of the physical server 103 from the database server 105, and then determine the first network topology of the switch 102 and the physical server 103 connected in the port of the switch 102.
In the embodiment of the present invention, after the first network topology is obtained, the call relationship between the virtual server 104 and the switch 101 needs to be determined.
In the embodiment of the present invention, the automatic acquisition server 101 sends a detection instruction to the physical server 103, where the detection instruction is a virtual machine detection program running in the physical server 103. The virtual machine detection program detects the call relationship between the virtual server 104 carried in the physical server 103 and the switch 101.
Optionally, in the embodiment of the present invention, in order to obtain the topology of the virtual server 104 of two virtualization technologies commonly used in the prior art, the virtual machine probe can provide at least two interfaces corresponding to the two virtualization technologies.
Optionally, in the embodiment of the present invention, in the prior art, two common virtualization technologies are Xen and KVM, the virtual machine detection program is libvert, libvirt is a set of free and open-source main stream virtualization tool API under Linux, libvirt may provide a set of convenient and reliable programming interfaces for various virtualization tools including Xen and KVM, support binding with programming languages such as C, C + +, Python, and the like, and may rapidly develop and manage KVM and Xen virtual server programs based on libvirt library, that is, obtain a topological relationship between Xen and KVM by using libvert.
Optionally, in the embodiment of the present invention, in order to reduce the problem of resource occupation in the current network, before sending the detection instruction to the physical server 103, the automatic acquisition server 101 first determines whether the physical server 103 is the physical server 103 bearing the virtual server 104.
Optionally, in the embodiment of the present invention, after the automatic acquisition server 101 acquires the physical server 103 connected to the switch 102, the automatic acquisition server 101 stores information whether each physical server 103 is the physical server 103 bearing the virtual server 104, and determines whether the physical server 103 is the physical server 103 bearing the virtual server 104 according to the acquired identification information of the physical server 103 in the first network topology.
Optionally, in the embodiment of the present invention, after acquiring the physical server 103 connected to the switch 102, the automatic acquisition server 101 acquires, from the database server 105, information on whether each physical server 103 is the physical server 103 bearing the virtual server 104, and determines whether the physical server 103 is the physical server 103 bearing the virtual server 104 according to the acquired identification information of the physical server 103 in the first network topology.
When the automatic acquisition server 101 determines that the physical server 103 connected to the switch 101 is the physical server 103 carrying the virtual server 104, a virtual machine detection program is called, and the virtual machine detection program is pushed to the physical server 103.
For example, as shown in fig. 2, there are two physical servers 103 connected to the switch 101, which are a physical server a and a physical server B, respectively, where the automatic acquisition server 101 determines that the physical server a is the physical server 103 carrying the virtual server 104, and then the automatic acquisition server 101 calls the virtual machine detection program and sends the virtual machine detection program to the physical server a.
The automatic acquisition server 101 sends a detection instruction to the physical server a, and after receiving the detection instruction, the physical server a runs a virtual machine detection program, optionally libvert, in the physical virtual server a.
When the physical server a runs the virtual machine detection program, a detection result is obtained. Optionally, in this embodiment of the present invention, the detection result includes attribute information of each virtual server 104 carried in the physical server a.
Optionally, the attribute information of each virtual server 104 may be an IP address or a domain name of each virtual server 104, or may be network card information of each virtual server 104, and the like.
When the switch 102 returns the detection result to the automatic acquisition server 101, the automatic acquisition server 101 determines the second network topology of the virtual servers 104 according to the attribute information of each virtual server 104 in the detection result.
Optionally, the automatic acquisition server 101 stores attribute information of the switch 102 and the physical server 103 in the current network, and if it is determined that the attribute information of the virtual server 104 matches the attribute information of the switch 102 or the physical server 103, it is determined that a topological relationship exists between the two.
Optionally, the automatic acquisition server 101 acquires the attribute information of the switch 102 and the physical server 103 in the previous network from the database server 105, and determines the switch 102 or the physical server 103 that matches the attribute information of the virtual server 104 according to the acquired attribute information and the attribute information of the virtual server 104.
For example, in the embodiment of the present invention, after the virtual machine detection program is run in the physical server a, the obtained detection result includes the IP addresses of the virtual server 1, the virtual server 2, and the virtual server 3, which correspond to the IP address 1, the IP address 2, and the IP address 3, respectively.
The automatic acquisition server 101 determines the switch 102 and the physical server 101 matched with the three IP addresses according to the three IP addresses, determines that the virtual server 1 is matched with the physical server a, and determines that the virtual server 2 and the virtual server 3 are matched with the switch 102, so that the second network topology is as shown in fig. 3.
Optionally, in this embodiment of the present invention, if there are other switches 102, for example, the switch 1 in fig. 3, and there is also a switch 2 in the current network, and the first network topology of the switch 2 is shown in fig. 4, and the physical server 4 is not the physical server 103 carrying the virtual server 104, then the network topology of the current network is shown in fig. 5.
In the embodiment of the present invention, optionally, when the automatic acquisition server 101 determines the network topology of the current network, for example, the network topology in fig. 5, the network topology is sent to the front-end presentation server 106, and the front-end presentation server 106 presents the latest topology of the current network, so that the real-time acquisition and accuracy of the network topology are ensured.
Optionally, in the embodiment of the present invention, the automatic acquisition server 101 may further send the network topology of the current network to the database server 105, and the database server 105 stores the network topology of the current network and sends the stored network topology to the front-end display server for display.
Optionally, in the embodiment of the present invention, the database server 105 may store the generated time sequence of the network topology, and display the generated time sequence, so that a user can quickly check whether there is a topology change in the current network, and the network maintenance is facilitated.
To facilitate understanding of those skilled in the art, the present invention provides a method for determining a network topology, which is specifically as follows in the embodiment of the present invention, as shown in fig. 6:
601, an automatic acquisition server receives an update message sent by a database server;
step 602, the automatic acquisition server obtains the SNMP parameters of each switch from the database server;
step 603, the automatic acquisition server generates an SNMP command for each switch according to the SNMP parameters of each switch and sends the command to each switch;
step 604, after receiving the SNMP command, the switch obtains a first network topology of a physical server connected to a port of the switch;
step 605, the switch sends the first network topology to the automatic acquisition server;
step 606, the automatic acquisition server determines whether there is a physical server bearing a virtual server in the first network topology according to the first network topology, if so, step 607 is executed; otherwise, go to step 608;
step 607, the automatic acquisition server calls libvert to send to the physical server; step 609 is executed;
step 608, the automatic acquisition server sends the first network topology to the front-end display server for display;
step 609, the automatic acquisition server sends a detection instruction and runs libvert;
step 610, the automatic acquisition server receives a libvert operation result;
step 611, the automatic acquisition server determines a second network topology according to the libvert operation result and the information of the switch and the physical server acquired from the database server;
step 612, the automatic acquisition server determines the network topology of the current network according to the first network topology and the second network topology;
step 613, the automatic acquisition server sends the network topology of the current network to the front-end display server for display.
Based on the same concept, an apparatus for determining a network topology according to an embodiment of the present invention is further provided, as shown in fig. 7, including:
an obtaining unit 701, configured to obtain configuration parameters of a switch;
a generating unit 702, configured to generate a call instruction according to the configuration parameter;
a first network topology determining unit 703, configured to send the call instruction to a switch and receive a first network topology fed back by the switch, where the first network topology is a call relationship between the switch and a physical server connected to the switch;
a probe instruction sending unit 704, configured to send a probe instruction to the physical server, where the probe instruction is used to instruct the physical server to run a virtual machine probe program; the virtual machine detection program provides interfaces corresponding to at least two virtualization technologies;
a second network topology determining unit 705, configured to obtain a detection result returned by the virtual machine detection program, and determine a second network topology according to the detection result, where the second network topology is a call relationship between a virtual server carried in the physical server and the switch;
a network topology determining unit 706, configured to determine a network topology of a current network according to the first network topology and the second network topology.
Further, the second network topology determining unit 705 is specifically configured to:
acquiring attribute information of the virtual server in the detection result;
determining a switch matched with the attribute information of the virtual server;
and determining a second network topology according to the matched switch and the virtual server.
Further, the probing instruction sending unit 704 is further configured to:
determining whether the physical server is a physical server bearing a virtual server;
and if the physical server is determined to be the physical server bearing the virtual server, calling a virtual machine detection program, and pushing the virtual machine detection program to the physical server.
Further, the obtaining unit 701 is specifically configured to:
acquiring configuration parameters of the switch from a database server; or the like, or, alternatively,
the second network topology determining unit 705 is specifically configured to:
determining an exchanger matched with the attribute information of the virtual server according to the matching relationship between the attribute information of the virtual server and the exchanger acquired from the database server; or the like, or, alternatively,
the detection instruction sending unit 704 is specifically configured to:
and determining whether the physical server is the physical server bearing the virtual server or not according to the information of whether the physical server bears the virtual server or not acquired from the database server.
Further, the apparatus further comprises:
a display unit 707, configured to send the current network topology to a front-end display server, so that the front-end display server displays the current network topology.
Based on the same concept, the present invention further provides a method for determining a network topology, as shown in fig. 8, including:
step 801, acquiring configuration parameters of a switch;
step 802, generating a calling instruction according to the configuration parameters;
step 803, sending the call instruction to a switch and receiving a first network topology fed back by the switch, where the first network topology is a call relationship between the switch and a physical server connected to the switch;
step 804, sending a detection instruction to the physical server, wherein the detection instruction is used for indicating the physical server to run a virtual machine detection program; the virtual machine detection program provides interfaces corresponding to at least two virtualization technologies;
step 805, obtaining a detection result returned by the virtual machine detection program, and determining a second network topology according to the detection result, where the second network topology is a call relationship between a virtual server loaded in the physical server and the switch;
step 806, determining a network topology of a current network according to the first network topology and the second network topology.
Further, the determining a second network topology according to the detection result includes:
acquiring attribute information of the virtual server in the detection result;
determining a switch matched with the attribute information of the virtual server;
and determining a second network topology according to the matched switch and the virtual server.
Further, before sending the probe instruction to the physical server, the method further includes:
determining whether the physical server is a physical server bearing a virtual server;
and if the physical server is determined to be the physical server bearing the virtual server, calling a virtual machine detection program, and pushing the virtual machine detection program to the physical server.
Further, the obtaining the configuration parameters of the switch includes:
acquiring configuration parameters of the switch from a database server; or the like, or, alternatively,
the determining the switch matched with the attribute information of the virtual server includes:
determining an exchanger matched with the attribute information of the virtual server according to the matching relationship between the attribute information of the virtual server and the exchanger acquired from the database server; or the like, or, alternatively,
determining whether the physical server is a physical server bearing a virtual server, comprising:
and determining whether the physical server is the physical server bearing the virtual server or not according to the information of whether the physical server bears the virtual server or not acquired from the database server.
Further, after determining the network topology of the current network according to the first network topology and the second network topology, the method further includes:
and sending the current network topology to a front-end display server so that the front-end display server displays the current network topology.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present invention have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all such alterations and modifications as fall within the scope of the invention.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present invention without departing from the spirit and scope of the invention. Thus, if such modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include such modifications and variations.

Claims (8)

1. A method for determining network topology, the method comprising:
acquiring configuration parameters of a switch;
generating a calling instruction according to the configuration parameters;
sending the calling instruction to a switch and receiving a first network topology fed back by the switch, wherein the first network topology is a calling relation between the switch and a physical server connected with the switch;
sending a detection instruction to the physical server, wherein the detection instruction is used for instructing the physical server to run a virtual machine detection program; the virtual machine detection program provides interfaces corresponding to at least two virtualization technologies;
acquiring a detection result returned by the virtual machine detection program, and determining a second network topology according to the detection result, wherein the second network topology is a call relation between a virtual server loaded in the physical server and the switch;
determining the network topology of the current network according to the first network topology and the second network topology;
wherein before sending the probing instruction to the physical server, the method further comprises:
determining whether the physical server is a physical server bearing a virtual server;
and if the physical server is determined to be the physical server bearing the virtual server, calling a virtual machine detection program, and pushing the virtual machine detection program to the physical server.
2. The method of claim 1, wherein determining the second network topology based on the probing comprises:
acquiring attribute information of the virtual server in the detection result;
determining a switch matched with the attribute information of the virtual server;
and determining a second network topology according to the matched switch and the virtual server.
3. The method according to claim 1 or 2,
the obtaining of the configuration parameters of the switch includes:
acquiring configuration parameters of the switch from a database server; or the like, or, alternatively,
the determining the switch matched with the attribute information of the virtual server includes:
determining an exchanger matched with the attribute information of the virtual server according to the matching relationship between the attribute information of the virtual server and the exchanger acquired from the database server; or the like, or, alternatively,
determining whether the physical server is a physical server bearing a virtual server, comprising:
and determining whether the physical server is the physical server bearing the virtual server or not according to the information of whether the physical server bears the virtual server or not acquired from the database server.
4. The method of claim 3, wherein determining the network topology of the current network according to the first network topology and the second network topology further comprises:
and sending the current network topology to a front-end display server so that the front-end display server displays the current network topology.
5. An apparatus for determining network topology, comprising:
the acquisition unit is used for acquiring configuration parameters of the switch;
the generating unit is used for generating a calling instruction according to the configuration parameters;
the first network topology determining unit is used for sending the calling instruction to a switch and receiving a first network topology fed back by the switch, wherein the first network topology is a calling relation between the switch and a physical server connected with the switch;
a probe instruction sending unit, configured to send a probe instruction to the physical server, where the probe instruction is used to instruct the physical server to run a virtual machine probe program; the virtual machine detection program provides interfaces corresponding to at least two virtualization technologies;
a second network topology determining unit, configured to obtain a detection result returned by the virtual machine detection program, and determine a second network topology according to the detection result, where the second network topology is a call relationship between a virtual server loaded in the physical server and the switch;
a network topology determining unit, configured to determine a network topology of a current network according to the first network topology and the second network topology;
wherein, the probing instruction sending unit is further configured to:
determining whether the physical server is a physical server bearing a virtual server;
and if the physical server is determined to be the physical server bearing the virtual server, calling a virtual machine detection program, and pushing the virtual machine detection program to the physical server.
6. The apparatus according to claim 5, wherein the second network topology determining unit is specifically configured to:
acquiring attribute information of the virtual server in the detection result;
determining a switch matched with the attribute information of the virtual server;
and determining a second network topology according to the matched switch and the virtual server.
7. The apparatus of claim 5 or 6,
the obtaining unit is specifically configured to:
acquiring configuration parameters of the switch from a database server; or the like, or, alternatively,
the second network topology determining unit is specifically configured to:
determining an exchanger matched with the attribute information of the virtual server according to the matching relationship between the attribute information of the virtual server and the exchanger acquired from the database server; or the like, or, alternatively,
the detection instruction sending unit is specifically configured to:
and determining whether the physical server is the physical server bearing the virtual server or not according to the information of whether the physical server bears the virtual server or not acquired from the database server.
8. The apparatus of claim 7, further comprising:
and the display unit is used for sending the current network topology to a front-end display server so as to enable the front-end display server to display the current network topology.
CN201611249811.0A 2016-12-29 2016-12-29 Method and device for determining network topology Active CN106713042B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201611249811.0A CN106713042B (en) 2016-12-29 2016-12-29 Method and device for determining network topology

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201611249811.0A CN106713042B (en) 2016-12-29 2016-12-29 Method and device for determining network topology

Publications (2)

Publication Number Publication Date
CN106713042A CN106713042A (en) 2017-05-24
CN106713042B true CN106713042B (en) 2020-05-26

Family

ID=58904087

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201611249811.0A Active CN106713042B (en) 2016-12-29 2016-12-29 Method and device for determining network topology

Country Status (1)

Country Link
CN (1) CN106713042B (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109428824B (en) * 2017-08-28 2021-09-17 中国电信股份有限公司 Host topology generation method and system
CN109831318A (en) * 2018-12-26 2019-05-31 中兴通讯股份有限公司 A kind of system, method and server obtaining network topology
CN110912751A (en) * 2019-12-03 2020-03-24 山东中创软件商用中间件股份有限公司 Network equipment topological graph generation method and related device
CN111654440B (en) * 2020-02-29 2022-05-27 新华三技术有限公司合肥分公司 Intelligent routing method, electronic equipment and storage medium
CN112291097B (en) * 2020-10-30 2023-03-24 绿盟科技集团股份有限公司 Virtual network topology generation method and device
CN112398738B (en) * 2020-11-05 2022-06-28 竞技世界(北京)网络技术有限公司 Method and device for acquiring connection relation, equipment and computer readable storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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
CN104618246A (en) * 2015-02-12 2015-05-13 浪潮电子信息产业股份有限公司 Network topology discovery method for XEN virtualization environment

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103685587B (en) * 2012-09-07 2018-07-17 深圳市腾讯计算机***有限公司 The method and device of allocation medium access control MAC address
US9584377B2 (en) * 2014-11-21 2017-02-28 Oracle International Corporation Transparent orchestration and management of composite network functions
CN104468219B (en) * 2014-12-11 2019-01-08 新华三技术有限公司 Virtual networking method for discovering network topology and equipment

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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
CN104618246A (en) * 2015-02-12 2015-05-13 浪潮电子信息产业股份有限公司 Network topology discovery method for XEN virtualization environment

Also Published As

Publication number Publication date
CN106713042A (en) 2017-05-24

Similar Documents

Publication Publication Date Title
CN106713042B (en) Method and device for determining network topology
CN110489391B (en) Data processing method and related equipment
EP3668009A1 (en) Life cycle management method and device for network service
TWI516059B (en) Setup method and system for client and server environment
US10826768B2 (en) Controlled node configuration
CN108717379B (en) Electronic device, distributed task scheduling method and storage medium
US20180176088A1 (en) Virtualized network function monitoring
US11509505B2 (en) Method and apparatus for operating smart network interface card
US11556369B2 (en) Virtual machine deployment method and OMM virtual machine
WO2015154455A1 (en) Method, device, nms, oss, and ems for alarm processing
US9823942B2 (en) Virtual machine discovery and identification
EP3531280B1 (en) Accelerator loading method and system, and accelerator loading apparatus
US11503109B2 (en) Processing an operation with a plurality of processing steps
CN106886429B (en) Method for loading driver and server
CN110290166B (en) Cross-cluster data interaction method, system and device and readable storage medium
CN106293842B (en) Software installation method and device
CN111190823A (en) UI automation test method, electronic device and computer readable storage medium
CN109408376B (en) Configuration data generation method, device, equipment and storage medium
TWI671640B (en) Task processing method and device in distributed system
CN108965403B (en) Operation and maintenance monitoring connection establishing method and terminal equipment
CN112269588B (en) Algorithm upgrading method, device, terminal and computer readable storage medium
CN113535262A (en) Method, device, equipment and storage medium for controlling starting of proxy node
CN109739518B (en) Method and device for generating offline software resources
CN107025126B (en) Resource scheduling method, NFVO and system
CN108363671B (en) Interface switching method, terminal equipment and storage medium

Legal Events

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