Nothing Special   »   [go: up one dir, main page]

CN113507398A - Network topology state detection method and device, computing equipment and storage medium - Google Patents

Network topology state detection method and device, computing equipment and storage medium Download PDF

Info

Publication number
CN113507398A
CN113507398A CN202110774231.8A CN202110774231A CN113507398A CN 113507398 A CN113507398 A CN 113507398A CN 202110774231 A CN202110774231 A CN 202110774231A CN 113507398 A CN113507398 A CN 113507398A
Authority
CN
China
Prior art keywords
network
networking
topology
local area
determining
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202110774231.8A
Other languages
Chinese (zh)
Other versions
CN113507398B (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.)
Antiy Technology Group Co Ltd
Original Assignee
Antiy Technology Group 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 Antiy Technology Group Co Ltd filed Critical Antiy Technology Group Co Ltd
Priority to CN202110774231.8A priority Critical patent/CN113507398B/en
Publication of CN113507398A publication Critical patent/CN113507398A/en
Application granted granted Critical
Publication of CN113507398B publication Critical patent/CN113507398B/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
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/50Testing arrangements
    • 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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0805Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability
    • H04L43/0817Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability by checking functioning

Landscapes

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

Abstract

The embodiment of the invention provides a method, a device, a computing device and a storage medium for detecting a network topology state, wherein the method comprises the following steps: determining an entity network topology to be detected; the physical network topology includes a plurality of network devices; acquiring networking information corresponding to the plurality of network devices respectively; creating virtual detection equipment which belongs to the same virtual local area network with each network equipment according to the networking information respectively corresponding to the plurality of network equipment, and initiating access to the plurality of network equipment by using the virtual detection equipment so as to determine the state of each network equipment according to the access result; and determining whether the entity network topology is successfully networked according to the state of each network device. This scheme can improve detection efficiency.

Description

Network topology state detection method and device, computing equipment and storage medium
Technical Field
The embodiment of the invention relates to the technical field of networks, in particular to a network topology state detection method, a network topology state detection device, a computing device and a storage medium.
Background
Network topology refers to a network structure made up of a plurality of network devices. In a network environment, in order to facilitate management of network devices, it is necessary to divide a plurality of network devices into different virtual local area networks. After networking is completed, whether the networking of the plurality of network devices in the network topology is successful or not is determined by manually inquiring network configuration information on the network devices in the related technology.
Disclosure of Invention
Based on the problem of low detection efficiency in the prior art, embodiments of the present invention provide a method and an apparatus for detecting a network topology state, a computing device, and a storage medium, which can quickly detect whether a network topology is successfully networked according to a networking scheme after networking is completed.
In a first aspect, an embodiment of the present invention provides a method for detecting a network topology state, including:
determining an entity network topology to be detected; the physical network topology includes a plurality of network devices;
acquiring networking information corresponding to the plurality of network devices respectively;
creating virtual detection equipment which belongs to the same virtual local area network with each network equipment according to the networking information respectively corresponding to the plurality of network equipment, and initiating access to the plurality of network equipment by using the virtual detection equipment so as to determine the state of each network equipment according to an access result;
and determining whether the entity network topology is successfully networked according to the state of each network device.
Preferably, a virtual detection device is created;
the initiating, with the virtual detection device, access to the plurality of network devices includes:
s1: determining at least one virtual local area network corresponding to the plurality of network devices according to networking information of each network device;
s2: determining whether there is a virtual local area network that is not detected in the at least one virtual local area network, and if so, executing step S3; if not, the detection is finished;
s3: selecting a virtual local area network from undetected virtual local area networks as a target virtual local area network, and determining at least one network device belonging to the target virtual local area network and IP addresses respectively corresponding to the at least one network device;
s4: allocating an IP address belonging to the target virtual local area network to the virtual detection equipment;
s5: and respectively initiating access to the at least one network device by using the IP address of the virtual detection device and the IP address respectively corresponding to the at least one network device, determining the target virtual local area network as the detected virtual local area network after initiating access to the at least one network device, and returning to step S2.
Preferably, at least two virtual detection devices are created, the plurality of network devices correspond to at least two virtual local area networks, and the at least two virtual detection devices correspond to the at least two virtual local area networks one to one;
the initiating, with the virtual detection device, access to the plurality of network devices includes:
determining at least one network device belonging to a target virtual local area network in the at least two virtual local area networks and IP addresses respectively corresponding to the at least one network device;
and allocating an IP address belonging to the target virtual local area network to target virtual detection equipment corresponding to the target virtual local area network, and respectively initiating access to the at least one network equipment by using the IP address of the target virtual detection equipment and the IP address respectively corresponding to the at least one network equipment.
Preferably, the determining the state of each network device according to the access result includes: determining the state of the network equipment corresponding to the access result of successful access initiation as online, and determining the state of the network equipment corresponding to the access result of failed access initiation as offline;
and/or the presence of a gas in the gas,
the manner of initiating access includes: at least one of a ping mode, a web server mode, a TFTP mode and a ssh remote login mode.
Preferably, before the determining the topology of the entity network to be detected, the method further includes:
determining a networking scheme required to be realized by the plurality of network devices; the plurality of network devices comprise at least one switch;
acquiring a simulated network topology corresponding to the networking scheme; the simulation network topology comprises simulation connection relations among the plurality of network devices and networking information of each network device;
generating a networking password according to the simulated connection relation and networking information of each network device in the simulated network topology;
sending the networking password to the at least one switch, so that the at least one switch executes the networking password, and networking an entity network topology formed by the plurality of network devices according to the networking scheme, wherein the entity connection relationship among the plurality of network devices in the entity network topology is the same as the simulated connection relationship.
Preferably, the physical network topology to be detected is mapped by the simulated network topology.
Preferably, the acquiring a simulated network topology corresponding to the networking scheme includes:
obtaining device packages respectively corresponding to the plurality of network devices on a pre-created topology editing page, and connecting the device packages to obtain a simulated connection relationship between the network devices; wherein the device package comprises graphical elements for characterizing the corresponding network devices and/or interface elements for characterizing the interfaces comprised by the corresponding network devices; the simulated connection relation comprises any one or more of the following connection relations: the connection relation between the graphic elements and the graphic elements, the connection relation between the graphic elements and the interface elements and the connection relation between the interface elements and the interface elements;
configuring networking information for each equipment package on the topology editing page according to the information of the virtual local area network to which each network equipment is divided in the networking scheme;
determining the network topology formed on the topology editing page as a simulated network topology corresponding to the networking scheme;
and/or the presence of a gas in the gas,
generating a networking password according to the simulated connection relation and networking information of each network device included in the simulated network topology, including:
determining at least one network device connected with a target switch in the at least one switch according to the simulated connection relation, and determining information of an interface between the target switch and the at least one network device;
according to the networking information of each network device, determining the attribute information of the target switch and the information of the virtual local area network to which the at least one network device belongs;
determining the password type which can be identified by the target switch according to the attribute information of the target switch;
generating a networking password corresponding to the target switch according to the information of the interface between the target switch and the at least one network device, the information of the virtual local area network to which the at least one network device belongs and the password type which can be identified by the target switch;
the sending the networking password to the at least one switch comprises: and sending the networking password of the corresponding switch to the corresponding switch.
In a second aspect, an embodiment of the present invention further provides a device for detecting a network topology state, including:
the topology determining unit is used for determining the topology of the entity network to be detected; the physical network topology includes a plurality of network devices;
an obtaining unit, configured to obtain networking information corresponding to each of the plurality of network devices;
a state detection unit, configured to create a virtual detection device that belongs to the same virtual local area network as each network device according to networking information respectively corresponding to the multiple network devices, and initiate access to the multiple network devices by using the virtual detection device, so as to determine a state of each network device according to an access result;
and the networking result determining unit is used for determining whether the entity network topology is successfully networked according to the state of each network device.
In a third aspect, an embodiment of the present invention further provides a computing device, including a memory and a processor, where the memory stores a computer program, and the processor, when executing the computer program, implements the method described in any embodiment of this specification.
In a fourth aspect, the present invention further provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed in a computer, the computer program causes the computer to execute the method described in any embodiment of the present specification.
The embodiment of the invention provides a method, a device, a computing device and a storage medium for detecting the state of a network topology, wherein after the physical network topology is completed networking, devices belonging to the same virtual local area network can be accessed, and the virtual detection device and each network device belong to the same virtual local area network by creating the virtual detection device, so that the virtual detection device can be used for initiating access to the network devices belonging to the same virtual local area network, the state of each network device can be determined according to an access result, and whether the physical network topology is successfully networked or not can be determined. Therefore, the scheme can automatically complete detection without human participation, and therefore, the detection efficiency can be improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to these drawings without creative efforts.
Fig. 1 is a flowchart of a network topology state detection method according to an embodiment of the present invention;
fig. 2 is a flowchart of a networking method according to an embodiment of the present invention;
fig. 3 is a flowchart of a method for acquiring a simulated network topology according to an embodiment of the present invention;
fig. 4 is a flowchart of another method for acquiring a simulated network topology according to an embodiment of the present invention;
fig. 5 is a flowchart of an access initiation method according to an embodiment of the present invention;
fig. 6 is a flowchart of another access initiation method provided by an embodiment of the present invention;
FIG. 7 is a diagram of a hardware architecture of a computing device according to an embodiment of the present invention;
fig. 8 is a structural diagram of a network topology state detection apparatus according to an embodiment of the present invention;
fig. 9 is a structural diagram of another network topology state detection apparatus according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer and more complete, the technical solutions in the embodiments of the present invention will be described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention, and based on the embodiments of the present invention, all other embodiments obtained by a person of ordinary skill in the art without creative efforts belong to the scope of the present invention.
As described above, in the related art, a plurality of Network devices need to be divided into different Virtual Local Area Networks (VLANs) to facilitate management of the Network devices. For example, an enterprise may include 20 hosts, 2 for financial, 3 for administrative, and 15 for research and development. The 20 hosts can be divided into different virtual local area networks according to different work types for networking, such as VLAN1, VLAN2 and VLAN 3. However, whether the network topology formed by the network devices is successfully networked according to the networking scheme or not can be determined by manually inquiring the network configuration information on the network devices in the related art, and the detection efficiency is low. In view of the fact that network access can be achieved among network devices in the same virtual local area network after networking is completed, it is considered that a device in the same virtual local area network as the network device initiates access to the network device, and the state of the network device, such as online or offline, is determined according to an access result to determine whether networking of the network device is successful.
Specific implementations of the above concepts are described below.
Referring to fig. 1, an embodiment of the present invention provides a method for detecting a network topology state, where the method includes:
step 100, determining the topology of an entity network to be detected; the physical network topology includes a plurality of network devices;
102, acquiring networking information corresponding to the plurality of network devices respectively;
104, creating virtual detection equipment which belongs to the same virtual local area network as each network equipment according to the networking information respectively corresponding to the plurality of network equipment, and initiating access to the plurality of network equipment by using the virtual detection equipment so as to determine the state of each network equipment according to an access result;
and step 106, determining whether the entity network topology is successfully networked according to the state of each network device.
In the embodiment of the invention, after the entity network topology is networked, the devices belonging to the same virtual local area network can be accessed, and the virtual detection device and each network device belong to the same virtual local area network by creating the virtual detection device, so that the virtual detection device can be used for initiating access to the network devices which belong to the same virtual local area network, the state of each network device can be determined according to the access result, and whether the entity network topology is successfully networked or not can be determined. Therefore, the scheme can automatically complete detection without human participation, and therefore, the detection efficiency can be improved.
The manner in which the various steps shown in fig. 1 are performed is described below.
Firstly, aiming at step 100, determining the topology of an entity network to be detected; the physical network topology includes a plurality of network devices.
For the purpose of describing the present embodiment, two concepts are introduced here:
entity network topology: the network topology is a network topology formed by physically connecting the plurality of network devices after networking. In the physical network topology, the connection relationship among the plurality of network devices is referred to as a physical connection relationship.
Simulating a network topology: the network topology is formed by adding the plurality of network devices to a topology editing page of drawing software in a corresponding graph mode in drawing software which can be used for drawing a topology graph, and then connecting the graphs of the network devices by using connecting lines. In the simulated network topology, the connection relationship between the plurality of network devices is referred to as a simulated connection relationship.
In the embodiment of the present invention, after the entity network topology is networked according to the set networking scheme, in order to determine whether the entity network topology is successfully networked, the states of each network device in the entity network topology need to be detected.
A network device is a physical entity connected to a network, such as a computer, hub, router, switch, firewall, bridge, gateway, printer, camera, etc.
Networking is a network construction technology, and a plurality of network devices can be divided into different VLANs. For example, the set networking scheme is to divide 10 hosts into 3 VLANs, wherein hosts 1 to 3 are divided into VLAN1, hosts 4 to 6 are divided into VLAN2, and hosts 7 to 10 are divided into VLAN 3. These hosts are all connected to a switch, which may be one switch or a plurality of switches. When VLAN partitioning is performed, it needs to be performed by at least one switch connecting these hosts.
In an embodiment of the present invention, in order to implement fast networking and manage a networked entity network topology, before this step 100, please refer to fig. 2, which may utilize one of the following manners to network the entity network topology according to a set networking scheme, specifically including:
step 200, determining a networking scheme required to be realized by the plurality of network devices; the plurality of network devices includes at least one switch.
Step 202, obtaining a simulated network topology corresponding to the networking scheme. The simulated network topology includes simulated connection relationships among the plurality of network devices and networking information of each network device.
In this step 202, when obtaining the simulated network topology corresponding to the networking scheme, the following two cases are included:
in the first case: there is no physical network topology at this time.
In the second case: there is now a physical network topology.
The requirements for simulating the network topology are different when the different situations are met.
In the case of the first case, since there is no physical network topology, it indicates that the network device has not been physically connected. At this time, a connection relation can be obtained for the plurality of network devices according to the networking scheme, so that a connection mode of physical connection is simple, and a simulation connection relation in the simulation network topology is formed. After obtaining the simulated connection relationship in the simulated network topology, the plurality of physical devices need to be physically connected according to the simulated connection relationship to form the physical network topology.
When the second case is used, the entity network topology exists at this time, and the entity network topology may include two cases: in the case A, the entity network topology already networks the network equipment, but the networking scheme is different from the networking scheme required to be realized at this time, namely the networking scheme needs to be changed; and in case B, the entity network topology does not carry out networking on the network equipment. However, in the case a or the case B, the entity connection relationship of the entity network topology does not need to be changed, and when networking is performed or networking is changed, a switch needs to be used to complete a networking scheme to be implemented. Therefore, in response to the second case, the simulated network topology needs to connect the plurality of network devices on the topology editing page according to the entity connection relationship in the entity network topology to form the simulated connection relationship in the simulated network topology.
In summary, whether the first case or the second case is used, it needs to be ensured that the simulated connection relationship in the simulated network topology is the same as the entity connection relationship in the entity network topology.
In an embodiment of the present invention, the manner of obtaining the simulated network topology corresponding to the networking scheme at least includes the following two ways:
the first mode is as follows: the simulated network topology is newly drawn.
The second mode is as follows: and obtaining the simulated network topology by utilizing the stored template.
The following describes the above two modes, respectively.
This step 202 uses the first approach to obtain a simulated network topology.
Referring to fig. 3, the present step may include:
step 300, obtaining device packages respectively corresponding to the plurality of network devices on a pre-created topology editing page, and connecting the device packages to obtain a simulated connection relationship between the network devices.
In one embodiment of the present invention, the mapping software may provide a topology editing function, and in response to an operation instruction input by a user, the mapping software may obtain a plurality of device packages on a topology editing page, and connect the device packages to obtain a simulated connection relationship between a plurality of network devices.
Wherein the device package is used to characterize a feature set of the corresponding network device. The device package may include graphical elements and textual elements, and may also include interface elements.
The graphic elements are used for representing the graphs of the corresponding network devices, different types of network devices can use different graphic elements, and a user can determine the type of the network device corresponding to the device package according to the graphic elements of the device package displayed on the topology editing page. For example, the network device is of the type desktop, laptop, router, switch, firewall, camera, etc. The created graphic elements may be stored in a graphic library.
The Interface elements are used to represent each Interface included in the network device, for example, the network device includes a console Interface, an optical port, a USB Interface, a Type-C Interface, a Universal Asynchronous Receiver/Transmitter (UART) Interface, a High-Definition Multimedia Interface (HDMI), a Serial Peripheral Interface (SPI), and the like. In this embodiment, the interface element may be edited, for example, by adding a delete or change interface. The created interface elements may be stored in an interface library.
The text element is used for recording the packaging information of the network device, and the packaging information may include: hardware information and software information. The hardware information may include: device type, device identifier, interface type, interface identifier, device self parameter information (such as processor model, frequency, hard disk capacity, memory size, etc.), operating system information, etc., and the software may include: IP address, MAC address, vendor information, vendor ID, network device login information, etc. All the text description information of the network equipment corresponding to the equipment package can be stored in the package information through the edited text elements, and the package information is a part of the equipment package and can be displayed or hidden on a topology editing page according to different configurations. For example, when the packaged information is not viewed or edited, the packaged information is in a hidden state, and when viewing or editing is required, the packaged information can be displayed. The display mode can include: and displaying in a display window form or copying the packaging information to other video display units for displaying and the like.
The device package may be a package for one network device, or may be a package for connection relationships between a plurality of network devices.
Device packages may be pre-generated and stored in a package library. The packaging library can perform import, export, selection, editing, calling, deleting and other operations through the data interface.
In the embodiment of the invention, the graphic elements, the interface elements and the character elements of the network equipment are packaged together in an equipment packaging mode, so that the information in the equipment packaging is richer and more comprehensive, and when the simulated connection relation among a plurality of network equipment is drawn on the topology editing page, the graphic elements, the interface elements and the character elements in the equipment packaging can be quickly edited, thereby improving the editing speed of the network topology.
In this step, the manner of obtaining device packages corresponding to the plurality of network devices on the topology editing page may include at least the following three manners: 1. importing from a packaging library; 2. editing or creating on the topology editing page; 3. and copying and pasting the device package obtained on the topology editing page.
And the device package can be deleted, moved, rotated and the like on the topology editing page. The operations such as moving and rotating may be performed in a two-dimensional coordinate manner on the topology editing page.
In this step 300, the device packages are connected, specifically: the connection of the device packages may be accomplished using a connection element. The connection elements can be straight lines, curved lines, straight lines with arrows, curved lines with arrows and the like, and when the connection elements correspond to different types, the connection elements can be used for representing different types of links.
In an embodiment of the present invention, when the device packages are connected by using the connection element, the correspondence between the device packages and the connection element may be stored, which facilitates subsequent identification of the simulated connection relationship between the network devices. The method includes deploying a detection script in an equipment package in advance for detecting whether a connection element is connected with the equipment package, acquiring identification information of the connection element when the connection element is detected to be packaged in the equipment package and connected with the equipment package, determining a target element for the connection between the equipment package and the connection element, and storing a corresponding relation between the identification information of the target element and the identification information of the connection element.
When the device package does not include an interface element, the target element is a graphical element of the device package. For example, if the identification information of the graphic element is S01 and the identification information of the connection element is L001, the correspondence relationship between S01 and L001 is stored.
When the device package includes interface elements, the target element is one of the interface elements of the device package. For example, the device package includes two interface elements, the identification information of the two interface elements is S01001 and S01002, the identification information of the connection element is L001, and the target element establishing connection with the connection element is the interface element S01001, so that the corresponding relationship between S01001 and L001 is stored.
In storing, the correspondence may be stored in package information of the device package.
Step 302, configuring networking information for each device package on the topology editing page according to the information of the virtual local area network to which each network device is divided in the networking scheme.
In this step 302, the configuration manner of networking information for each device package may at least include the following two manners:
mode a, manually configuring networking information on the device package.
And B, automatically packaging and configuring networking information for the equipment.
Taking the example that the plurality of network devices includes a switch and 10 hosts, the 10 hosts are all connected to the switch. The information of the virtual lan may be VLAN numbers, for example, the 10 hosts are divided into VLAN1, VLAN2 and VLAN3, respectively.
In the method a, the networking information may be configured for the device package by editing the text elements of the device package. The networking information may include a VLAN number, an IP address assigned to the VLAN number, and the like.
Then, in the mode B, the step may specifically include: creating a boundary frame corresponding to the virtual local area network on the topology editing page; and when the target equipment package is detected to be positioned in the boundary frame, configuring networking information for the target equipment package according to the information of the virtual local area network corresponding to the boundary frame.
The created bounding box may be a closed box, and the bounding box may be configured to correspond to a virtual local area network. For example, the bounding box is configured to correspond to VLAN1, and when it is detected that a target device package is moved into the bounding box, text elements of the target device package may be automatically edited according to the information VLAN1 of the virtual local area network corresponding to the bounding box, so as to implement configuring networking information for the target device package.
By using the mode B, the device encapsulation of the network device belonging to the same VLAN can be rapidly moved to the boundary frame corresponding to the VLAN, and the configuration of networking information is automatically carried out on the device encapsulation of the network device belonging to the same VLAN, so that not only can the networking scheme required to be realized by a plurality of network devices be visually shown, but also the configuration speed of the networking information can be improved when more network devices are used for networking.
And step 304, determining the network topology formed on the topology editing page as a simulated network topology corresponding to the networking scheme.
In one embodiment of the invention, after step 304, the generated simulated network topology corresponding to the networking scheme may be stored in a simulated network topology library for subsequent use.
This step 202 uses a second approach to obtain a simulated network topology.
The simulated network topology obtained in the first way may be stored, for example, in a simulated network topology library, and then a plurality of simulated network topologies may be included in the simulated network topology library for selection.
Referring to fig. 4, the step 202 may include:
step 400, determining whether a simulated network topology corresponding to the networking scheme exists in a pre-generated simulated network topology library, and if so, executing step 402; if not, go to step 404.
In an embodiment of the present invention, when the simulated network topology is stored in the simulated network topology library, the networking schemes corresponding to the simulated network topology may be stored together. For example, the number, type, networking division condition, etc. of the network devices in the storage networking scheme. So that the user can quickly know whether the required simulated network topology exists in the simulated network topology.
If networking needs to be changed frequently in an enterprise, and the change range comprises several fixed networking schemes, the simulated network topology of each networking scheme can be stored in the simulated network topology library. When the network is changed, the simulated network topology corresponding to the networking scheme can be directly exported from the simulated network topology library, so that the networking change efficiency can be improved, and the networking change cost can be saved.
Step 402, deriving the simulated network topology corresponding to the networking scheme from the simulated network topology base.
Step 404, generating a simulated network topology corresponding to the networking scheme.
This step 404 generates a simulated network topology corresponding to the networking scheme, which is the same as the first method described above and is not described herein again.
Step 204, generating a networking password according to the simulated connection relation included in the simulated network topology and networking information of each network device.
In the embodiment of the invention, after the simulated network topology is formed, a user can initiate an instruction for mapping the simulated network topology to the entity network topology, after the system receives the instruction, the system can identify the simulated network topology, identify the contents related to the simulated network topology, such as the simulated connection relationship, networking information of each network device and the like, and then generate the networking password which can be identified by the switch according to the identified contents.
In an embodiment of the present invention, the identification manner of the networking information of the network device may include: directly obtaining the character elements of the equipment package, and extracting networking information of the network equipment corresponding to the equipment package from the character elements.
In an embodiment of the present invention, the identification manner of the simulated connection relationship may include: acquiring the corresponding relation between each equipment package and each connecting element; determining the connection relation among a plurality of equipment packages according to the corresponding relation; determining a connection relationship between the plurality of device packages as the simulated connection relationship.
For example, if the device package S01001 interface has a corresponding relationship with the connection element L001 and the device package S02001 interface also has a corresponding relationship with the connection element L001, it may be determined that the device package S01001 interface has a connection relationship with the device package S02001 interface according to the connection element L001.
When the corresponding relationship between each device package and the connection element is obtained, the corresponding relationship may be directly obtained from the package information of the device package (the corresponding relationship is stored in the package information in step 300). The device package may also be detected by using the detection method in step 300, so as to obtain the corresponding relationship between the device package and the connection element.
An example of a portion of the identifying content is given below:
the device type: switch
Identification information of the device: s01
Identification information of interface 1: s01001
Identification information of the device to which interface 1 is connected: d01001
Type of device to which interface 1 is connected: computer with a memory card
Type of interface of the device to which interface 1 is connected: net mouth
Identification information of interface 2: s01002
Identification information of the device to which the interface 2 is connected: d02001
Type of device to which interface 2 is connected: computer with a memory card
Type of interface of the device to which interface 2 is connected: net mouth
The device type: computer with a memory card
Identification information of the device: d01
Identification information of the device to which interface 1 is connected: s01001
Type of device to which interface 1 is connected: switch
Type of interface of the device to which interface 1 is connected: light port
VLAN information to which the device belongs: VLAN1
IP address of device: 168.192.0.1
The login account of the device: 111111
Login password of device: 222222
……
In an embodiment of the present invention, since the recognizable networking passwords are different when the models of the switches are different, different networking passwords need to be generated for different switches when generating the networking passwords. Specifically, this step 204 may include:
s1: and determining at least one network device connected with a target switch in the at least one switch according to the simulated connection relation, and determining information of an interface of the target switch connected with the at least one network device.
For example, the switch S01, the network devices connected thereto include device D01 and device D02, and device D01 is connected using the S01001 interface of the switch and device D02 is connected using the S01002 interface of the switch.
S2: and determining the attribute information of the target switch and the information of the virtual local area network to which the at least one network device belongs according to the networking information of each network device.
The attribute information of the target switch may include vendor information, model information, and the like.
When determining the information of the virtual local area network to which the at least one network device belongs, it may be determined from the networking information of the network devices, for example, the information of the virtual local area network to which the device D01 belongs is VLAN1, and the information of the virtual local area network to which the device D02 belongs is VLAN 2.
S3: and determining the password type which can be identified by the target switch according to the attribute information of the target switch.
In S2, after the attribute information of the target switch is determined, the password type that can be recognized by the target switch can be determined directly according to the corresponding relationship.
S4: and generating a networking password corresponding to the target switch according to the information of the interface of the target switch and the at least one network device, the information of the virtual local area network to which the at least one network device belongs and the password type which can be identified by the target switch.
After the networking scheme is determined, the generation of the networking password for the switch may be implemented by an existing scheme, which is not described in detail herein.
In the embodiment of the invention, the password types which can be possibly identified by different exchangers are considered to be different, and the password types which can be identified by the exchangers can be determined according to the attribute information of the exchangers so as to generate the networking passwords which can be identified by the interaction machine, thereby ensuring the successful networking.
Step 206, sending the networking password to the at least one switch, so that the at least one switch executes the networking password, so as to perform networking on an entity network topology formed by the plurality of network devices according to the networking scheme, wherein an entity connection relationship between the plurality of network devices in the entity network topology is the same as the simulated connection relationship.
When two or more switches are included in the plurality of network devices, the generated networking password corresponding to the switch may be transmitted to the corresponding switch. After the switch receives the networking password, the networking password can be executed, so that networking is completed.
The above steps 200 to 206 complete the networking of the entity network topology.
It should be noted that, besides the networking mode described in fig. 2, other networking modes may also be used, for example, a manual networking mode, that is, after the networking scheme is determined, the operation and maintenance personnel directly and manually configure the switch to implement networking.
In an embodiment of the present invention, the physical network topology in step 100 may be mapped from the simulated network topology. For example, the entity network topology after networking in step 200 to step 206 is the entity network topology to be detected in step 100.
Then, in step 102, networking information corresponding to each of the plurality of network devices is obtained.
In step 102, in order to implement the state detection of each network device in the entity network topology, networking information of each network device in the entity network topology needs to be acquired, and the networking information may be input by operation and maintenance personnel; or storing networking information of each network device in the entity network topology in advance, and directly reading the networking information from a storage position when the networking information is needed; in addition, the network topology can be obtained through a simulated network topology corresponding to a networking scheme implemented by the entity network topology.
When the network device is obtained through the simulated network topology corresponding to the networking scheme implemented by the entity network topology, specifically, encapsulation information that each network device respectively corresponds to device encapsulation is obtained from the simulated network topology, the encapsulation information includes networking information, and the networking information of the network device is extracted from the encapsulation information.
Finally, in step 104, according to the networking information respectively corresponding to the plurality of network devices, a virtual detection device belonging to the same virtual local area network as each network device is created, and the virtual detection device is used to initiate access to the plurality of network devices, so as to determine the state of each network device according to the access result.
In the embodiment of the present invention, the number of created virtual detection devices may correspond to the following two cases:
the first condition is as follows: a virtual detection device is created.
Case two: at least two virtual detection devices are created.
The following describes the implementation of this step for the above two cases.
In a first case, referring to fig. 5, initiating access to the multiple network devices by using the virtual detection device in this step 104 may include:
step 500, determining at least one virtual local area network corresponding to the plurality of network devices according to the networking information of each network device.
Step 502, determining whether there is a virtual local area network that is not detected in the at least one virtual local area network, if yes, executing step 504; if not, the detection is finished.
Step 504, selecting a virtual local area network from the undetected virtual local area networks as a target virtual local area network, and determining at least one network device belonging to the target virtual local area network and the IP addresses respectively corresponding to the at least one network device.
Step 506, allocating an IP address belonging to the target virtual local area network to the virtual detection device;
step 508, respectively initiating access to the at least one network device by using the IP address of the virtual detection device and the IP addresses respectively corresponding to the at least one network device, determining the target vlan as the detected vlan after initiating access to the at least one network device, and returning to step 502.
For the first case, for example, it can be known from the networking information that 10 hosts belong to different VLANs, where hosts 1 to 3 belong to VLAN1, hosts 4 to 6 belong to VLAN2, and hosts 7 to 10 belong to VLAN 3. Firstly, determining the VLAN1 as a target VLAN, determining the network devices belonging to the VLAN1 as hosts 1-3, determining the IP addresses of the hosts 1-3, allocating the IP addresses belonging to the VLAN1 to the virtual network devices, and at the moment, the virtual network devices and the hosts 1-3 belong to the same VLAN1, so that the virtual network devices can respectively initiate access to the hosts 1-3, and the states of the hosts 1-3 can be determined according to access results. Then, the processing method after determining VLAN2 as a target VLAN and determining VLAN3 as a target VLAN, and determining VLANs 2 and 3 as target VLANs is the same as that of VLAN 1. And finally, obtaining access results corresponding to the hosts 1-10 respectively.
It should be noted that, in step 502, it may be determined whether there is any undetected virtual local area network in the at least one virtual local area network by means of an identifier or the like. For example, the detected virtual local area networks are marked with special identifiers, and the virtual local area network which is not marked with the identifier in the at least one virtual local area network is determined as the undetected virtual local area network. For another example, it may be determined by a packet format, before initiating access to any network device in the VLAN, add the codes of the VLANs to a packet, for example, add VLAN1, VLAN2, and VLAN3 to the same packet, where the VLANs in the packet are all undetected VLANs, randomly take out a VLAN from the packet, and use the VLAN as a target VLAN until the packet does not include the VLAN.
The virtual detection equipment is created to detect the plurality of network equipment in the first condition, so that the virtual detection equipment is convenient to manage, and the detection cost is low.
In case two, the plurality of network devices correspond to at least two virtual local area networks, and the at least two virtual detection devices correspond to the at least two virtual local area networks one to one.
Referring to fig. 6, the step 104 of initiating access to the plurality of network devices by using the virtual detection device may include:
step 600, determining at least one network device belonging to a target virtual local area network of the at least two virtual local area networks, and IP addresses corresponding to the at least one network device respectively.
Step 602, allocating an IP address belonging to the target virtual local area network to the target virtual detection device corresponding to the target virtual local area network, and respectively initiating access to the at least one network device by using the IP address of the target virtual detection device and the IP addresses respectively corresponding to the at least one network device.
For the second case, for example, it can be known from the networking information that 10 hosts belong to different VLANs, where hosts 1 to 3 belong to VLAN1, hosts 4 to 6 belong to VLAN2, and hosts 7 to 10 belong to VLAN 3. Then 3 virtual inspection devices are created, respectively virtual inspection device a, virtual inspection device B, virtual inspection device C, where virtual inspection device a corresponds to VLAN1, virtual inspection device B corresponds to VLAN2, and virtual inspection device C corresponds to VLAN 3. Since the same operation is performed for each of VLANs 1 to 3, VLAN1 will be described as an example. The network equipment belonging to the VLAN1 is the host computers 1-3, the IP addresses of the host computers 1-3 are obtained, then the IP addresses belonging to the VLAN1 are distributed to the virtual detection equipment A, the virtual detection equipment A is used for respectively initiating access to the host computers 1-3, and therefore the access results of the host computers 1-3 can be obtained.
By creating at least two virtual detection devices in the second case, the at least two virtual detection devices correspond to the at least two virtual local area networks one to one, and each virtual detection device is used for detecting the network device in the corresponding virtual local area network, so that the detection efficiency can be improved.
It should be noted that, regardless of the first or second case, the manner of acquiring the IP address of the network device may be an IP address configured when networking information is configured for each network device in the simulated network topology when the simulated network topology is generated, and then the IP address of each network device is directly acquired according to the networking information; or the IP address may be obtained from the switch after networking.
In an embodiment of the present invention, the determining the state of each network device according to the access result in step 104 may include: and determining the state of the network equipment corresponding to the access result of successful access initiation as online, and determining the state of the network equipment corresponding to the access result of failed access initiation as offline.
In an embodiment of the present invention, after determining the states of the network devices, the virtual detection device may send the states of the network devices to a detection platform (the detection platform may be a platform end that creates the virtual detection device and initiates a detection instruction to the virtual inspection device, so that the virtual detection device completes the detection process according to the detection instruction), and the detection platform may automatically fill the states of the network devices into encapsulation information of device encapsulations corresponding to the network devices in the simulated network topology, so that a user may view the states of the corresponding network devices according to the encapsulation information of the device encapsulations.
In an embodiment of the present invention, the manner of initiating access includes: at least one of a ping mode, a web server mode, a TFTP mode and a ssh remote login mode.
The virtual detection device initiates an access to the host 1, and the manner of initiating the access is described as a ping manner. The virtual detection equipment sends a ping packet to the host 1, if the host 1 returns information aiming at the ping packet, the successful access is indicated, and the host 1 is on line; if host 1 does not react, this indicates that the initiation of access failed and host 1 goes offline.
Preferably, the maximum access frequency may be set when initiating access, for example, the maximum access frequency is set to 3 times, and if no response is found when initiating access to the same network device for 3 times, it is determined that the network device is offline, so that accuracy of an access result can be improved.
With respect to step 106, it is determined whether the entity network topology is successfully networked according to the status of each network device.
And if not, determining that the entity network topology fails to be networked according to the networking scheme. For example, in the hosts 1 to 10, the states of the hosts 1 to 9 are all online, and the state of the host 10 is offline, indicating that networking fails.
In an embodiment of the present invention, the types of the network devices may include: a physical network device and/or a virtual network device.
The physical network topology may be formed by only physical network devices, may be formed by only virtual network devices, or may include both physical network devices and virtual network devices.
As shown in fig. 7 and 8, an embodiment of the present invention provides a network topology state detection apparatus. The device embodiments may be implemented by software, or by hardware, or by a combination of hardware and software. From a hardware aspect, as shown in fig. 7, for a hardware architecture diagram of a computing device in which a network topology state detection apparatus according to an embodiment of the present invention is located, in addition to the processor, the memory, the network interface, and the nonvolatile memory shown in fig. 7, the computing device in which the apparatus is located in the embodiment may also include other hardware, such as a forwarding chip responsible for processing a packet. Taking a software implementation as an example, as shown in fig. 8, as a logical means, the device is formed by reading a corresponding computer program in a non-volatile memory into a memory by a CPU of a computing device where the device is located and running the computer program. The present embodiment provides a network topology state detection apparatus, including:
a topology determining unit 801, configured to determine a topology of an entity network to be detected; the physical network topology includes a plurality of network devices;
an obtaining unit 802, configured to obtain networking information corresponding to each of the multiple network devices;
a state detecting unit 803, configured to create, according to networking information respectively corresponding to the multiple network devices, a virtual detection device that belongs to the same virtual local area network as each network device, and initiate access to the multiple network devices by using the virtual detection device, so as to determine states of each network device according to an access result;
a networking result determining unit 804, configured to determine whether the entity network topology is successfully networked according to the state of each network device.
In an embodiment of the present invention, the state detection unit 803 creates a virtual detection device; and when the state detection unit 803 initiates access to the plurality of network devices by using the virtual detection device, it is specifically configured to execute the following steps:
s1: determining at least one virtual local area network corresponding to the plurality of network devices according to networking information of each network device;
s2: determining whether there is a virtual local area network that is not detected in the at least one virtual local area network, and if so, executing step S3; if not, the detection is finished;
s3: selecting a virtual local area network from undetected virtual local area networks as a target virtual local area network, and determining at least one network device belonging to the target virtual local area network and IP addresses respectively corresponding to the at least one network device;
s4: allocating an IP address belonging to the target virtual local area network to the virtual detection equipment;
s5: and respectively initiating access to the at least one network device by using the IP address of the virtual detection device and the IP address respectively corresponding to the at least one network device, determining the target virtual local area network as the detected virtual local area network after initiating access to the at least one network device, and returning to step S2.
In an embodiment of the present invention, the state detection unit 803 creates at least two virtual detection devices, where the plurality of network devices correspond to at least two virtual local area networks, and the at least two virtual detection devices correspond to the at least two virtual local area networks one to one;
when the virtual detection device is used to initiate access to the multiple network devices, the state detection unit 803 is specifically configured to execute the following:
determining at least one network device belonging to a target virtual local area network in the at least two virtual local area networks and IP addresses respectively corresponding to the at least one network device;
and allocating an IP address belonging to the target virtual local area network to target virtual detection equipment corresponding to the target virtual local area network, and respectively initiating access to the at least one network equipment by using the IP address of the target virtual detection equipment and the IP address respectively corresponding to the at least one network equipment.
In an embodiment of the present invention, when determining the state of each network device according to the access result, the state detecting unit 803 is specifically configured to determine the state of the network device corresponding to the access result that the access is successful as online, and determine the state of the network device corresponding to the access result that the access is failed as offline;
and/or the presence of a gas in the gas,
in an embodiment of the present invention, the manner of initiating access includes: at least one of a ping mode, a web server mode, a TFTP mode and a ssh remote login mode.
In an embodiment of the present invention, referring to fig. 9, the network topology state detecting apparatus may further include:
a networking unit 805, configured to determine a networking scheme that needs to be implemented by the plurality of network devices; the plurality of network devices comprise at least one switch; acquiring a simulated network topology corresponding to the networking scheme; the simulation network topology comprises simulation connection relations among the plurality of network devices and networking information of each network device; generating a networking password according to the simulated connection relation and networking information of each network device in the simulated network topology; sending the networking password to the at least one switch, so that the at least one switch executes the networking password, and networking an entity network topology formed by the plurality of network devices according to the networking scheme, wherein the entity connection relationship among the plurality of network devices in the entity network topology is the same as the simulated connection relationship.
In an embodiment of the present invention, the physical network topology to be detected is mapped from the simulated network topology.
In an embodiment of the present invention, when acquiring the simulated network topology corresponding to the networking scheme, the networking unit 805 is specifically configured to obtain, on a pre-created topology editing page, device packages respectively corresponding to the plurality of network devices, and connect the device packages to obtain a simulated connection relationship between the network devices; wherein the device package comprises graphical elements for characterizing the corresponding network devices and/or interface elements for characterizing the interfaces comprised by the corresponding network devices; the simulated connection relation comprises any one or more of the following connection relations: the connection relation between the graphic elements and the graphic elements, the connection relation between the graphic elements and the interface elements and the connection relation between the interface elements and the interface elements; configuring networking information for each equipment package on the topology editing page according to the information of the virtual local area network to which each network equipment is divided in the networking scheme; and determining the network topology formed on the topology editing page as a simulated network topology corresponding to the networking scheme.
In an embodiment of the present invention, when the networking unit 804 generates the networking password according to the simulated connection relationship included in the simulated network topology and networking information of each network device, the networking unit is specifically configured to determine, according to the simulated connection relationship, at least one network device connected to a target switch in the at least one switch, and information of an interface between the target switch and the at least one network device; according to the networking information of each network device, determining the attribute information of the target switch and the information of the virtual local area network to which the at least one network device belongs; determining the password type which can be identified by the target switch according to the attribute information of the target switch; generating a networking password corresponding to the target switch according to the information of the interface between the target switch and the at least one network device, the information of the virtual local area network to which the at least one network device belongs and the password type which can be identified by the target switch;
the networking unit 804 is specifically configured to send the networking password of the corresponding switch to the corresponding switch when sending the networking password to the at least one switch.
It is to be understood that the illustrated structure of the embodiment of the present invention does not specifically limit a network topology state detection apparatus. In other embodiments of the present invention, a network topology state detection apparatus may include more or fewer components than shown, or combine certain components, or split certain components, or a different arrangement of components. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
Because the content of information interaction, execution process, and the like among the modules in the device is based on the same concept as the method embodiment of the present invention, specific content can be referred to the description in the method embodiment of the present invention, and is not described herein again.
The embodiment of the invention also provides a computing device, which comprises a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to realize the network topology state detection method in any embodiment of the invention.
An embodiment of the present invention further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the computer program causes the processor to execute a network topology state detection method in any embodiment of the present invention.
Specifically, a system or an apparatus equipped with a storage medium on which software program codes that realize the functions of any of the above-described embodiments are stored may be provided, and a computer (or a CPU or MPU) of the system or the apparatus is caused to read out and execute the program codes stored in the storage medium.
In this case, the program code itself read from the storage medium can realize the functions of any of the above-described embodiments, and thus the program code and the storage medium storing the program code constitute a part of the present invention.
Examples of the storage medium for supplying the program code include a floppy disk, a hard disk, a magneto-optical disk, an optical disk (e.g., CD-ROM, CD-R, CD-RW, DVD-ROM, DVD-RAM, DVD-RW, DVD + RW), a magnetic tape, a nonvolatile memory card, and a ROM. Alternatively, the program code may be downloaded from a server computer via a communications network.
Further, it should be clear that the functions of any one of the above-described embodiments may be implemented not only by executing the program code read out by the computer, but also by causing an operating system or the like operating on the computer to perform a part or all of the actual operations based on instructions of the program code.
Further, it is to be understood that the program code read out from the storage medium is written to a memory provided in an expansion board inserted into the computer or to a memory provided in an expansion module connected to the computer, and then causes a CPU or the like mounted on the expansion board or the expansion module to perform part or all of the actual operations based on instructions of the program code, thereby realizing the functions of any of the above-described embodiments.
The embodiments of the invention have at least the following beneficial effects:
1. in an embodiment of the present invention, after the physical network topology completes networking, devices belonging to the same virtual local area network can access each other, and the virtual detection device is created, so that the virtual detection device and each network device belong to the same virtual local area network, and thus, the virtual detection device can be used to initiate access to the network devices belonging to the same virtual local area network, and the state of each network device can be determined according to the access result, so as to determine whether the physical network topology succeeds in networking. Therefore, the scheme can automatically complete detection without human participation, and therefore, the detection efficiency can be improved.
2. In an embodiment of the present invention, one virtual detection device is created to detect the plurality of network devices, which is not only convenient for managing the virtual detection device, but also has low detection cost.
3. In an embodiment of the present invention, by creating at least two virtual detection devices, where the at least two virtual detection devices correspond to at least two virtual local area networks one to one, and using each virtual detection device to detect a network device in the corresponding virtual local area network, detection efficiency can be improved.
4. In an embodiment of the present invention, a simulated connection relationship among a plurality of network devices can be realized in a simulated network topology, the simulated connection relationship is the same as an entity connection relationship among the plurality of network devices in an entity network topology, and the obtained simulated network topology can include networking information of each network device, so that a networking password can be automatically generated according to the simulated network topology and sent to at least one switch to realize networking, and the switch does not need to be manually configured, and networking of the entity network topology can be quickly realized according to the simulated network topology, thereby improving networking efficiency.
5. In one embodiment of the invention, the graphic elements, the interface elements and the text elements of the network equipment are packaged together in an equipment packaging mode, so that the information in the equipment packaging is richer and more comprehensive, when the simulated connection relation among a plurality of network equipment is drawn on a topology editing page, the graphic elements, the interface elements and the text elements in the equipment packaging can be quickly edited, and the editing speed of the network topology is improved.
6. In an embodiment of the present invention, a mode of automatically encapsulating and configuring networking information for devices by using a boundary frame is utilized, so that the device encapsulation of the network device belonging to the same VLAN can be quickly moved to the boundary frame corresponding to the VLAN, and the configuration of the networking information is automatically performed for the device encapsulation of the network device belonging to the same VLAN.
7. In an embodiment of the present invention, after the simulated network topology is generated, the simulated network topology may be stored in the simulated network topology library, when the simulated network topology needs to be generated, whether the required simulated network topology exists may be first searched from the simulated network topology library, and when the required simulated network topology is stored in the simulated network topology library, the simulated network topology may be quickly obtained, thereby increasing the speed of obtaining the simulated network topology and reducing the time cost.
8. In an embodiment of the present invention, since different switches may have different password types that can be identified, according to the attribute information of the switch, the password type that the switch can identify can be determined, so as to generate an identifiable networking password for the interactive machine, thereby ensuring smooth networking.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an …" does not exclude the presence of other similar elements in a process, method, article, or apparatus that comprises the element.
Those of ordinary skill in the art will understand that: all or part of the steps for realizing the method embodiments can be completed by hardware related to program instructions, the program can be stored in a computer readable storage medium, and the program executes the steps comprising the method embodiments when executed; and the aforementioned storage medium includes: various media that can store program codes, such as ROM, RAM, magnetic or optical disks.
Finally, it should be noted that: the above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.

Claims (10)

1. A method for detecting a network topology state is characterized by comprising the following steps:
determining an entity network topology to be detected; the physical network topology includes a plurality of network devices;
acquiring networking information corresponding to the plurality of network devices respectively;
creating virtual detection equipment which belongs to the same virtual local area network with each network equipment according to the networking information respectively corresponding to the plurality of network equipment, and initiating access to the plurality of network equipment by using the virtual detection equipment so as to determine the state of each network equipment according to an access result;
and determining whether the entity network topology is successfully networked according to the state of each network device.
2. The method of claim 1, wherein a virtual detection device is created;
the initiating, with the virtual detection device, access to the plurality of network devices includes:
s1: determining at least one virtual local area network corresponding to the plurality of network devices according to networking information of each network device;
s2: determining whether there is a virtual local area network that is not detected in the at least one virtual local area network, and if so, executing step S3; if not, the detection is finished;
s3: selecting a virtual local area network from undetected virtual local area networks as a target virtual local area network, and determining at least one network device belonging to the target virtual local area network and IP addresses respectively corresponding to the at least one network device;
s4: allocating an IP address belonging to the target virtual local area network to the virtual detection equipment;
s5: and respectively initiating access to the at least one network device by using the IP address of the virtual detection device and the IP address respectively corresponding to the at least one network device, determining the target virtual local area network as the detected virtual local area network after initiating access to the at least one network device, and returning to step S2.
3. The method according to claim 1, wherein at least two virtual detection devices are created, the plurality of network devices correspond to at least two virtual local area networks, and the at least two virtual detection devices correspond to the at least two virtual local area networks one to one;
the initiating, with the virtual detection device, access to the plurality of network devices includes:
determining at least one network device belonging to a target virtual local area network in the at least two virtual local area networks and IP addresses respectively corresponding to the at least one network device;
and allocating an IP address belonging to the target virtual local area network to target virtual detection equipment corresponding to the target virtual local area network, and respectively initiating access to the at least one network equipment by using the IP address of the target virtual detection equipment and the IP address respectively corresponding to the at least one network equipment.
4. The method according to any one of claims 1 to 3,
the determining the state of each network device according to the access result includes: determining the state of the network equipment corresponding to the access result of successful access initiation as online, and determining the state of the network equipment corresponding to the access result of failed access initiation as offline;
and/or the presence of a gas in the gas,
the manner of initiating access includes: at least one of a ping mode, a web server mode, a TFTP mode and a ssh remote login mode.
5. The method according to claim 1, further comprising, before said determining the topology of the physical network to be detected:
determining a networking scheme required to be realized by the plurality of network devices; the plurality of network devices comprise at least one switch;
acquiring a simulated network topology corresponding to the networking scheme; the simulation network topology comprises simulation connection relations among the plurality of network devices and networking information of each network device;
generating a networking password according to the simulated connection relation and networking information of each network device in the simulated network topology;
sending the networking password to the at least one switch, so that the at least one switch executes the networking password, and networking an entity network topology formed by the plurality of network devices according to the networking scheme, wherein the entity connection relationship among the plurality of network devices in the entity network topology is the same as the simulated connection relationship.
6. The method according to claim 5, wherein the physical network topology to be detected is mapped from the simulated network topology.
7. The method of claim 5,
the acquiring of the simulated network topology corresponding to the networking scheme includes:
obtaining device packages respectively corresponding to the plurality of network devices on a pre-created topology editing page, and connecting the device packages to obtain a simulated connection relationship between the network devices; wherein the device package comprises graphical elements for characterizing the corresponding network devices and/or interface elements for characterizing the interfaces comprised by the corresponding network devices; the simulated connection relation comprises any one or more of the following connection relations: the connection relation between the graphic elements and the graphic elements, the connection relation between the graphic elements and the interface elements and the connection relation between the interface elements and the interface elements;
configuring networking information for each equipment package on the topology editing page according to the information of the virtual local area network to which each network equipment is divided in the networking scheme;
determining the network topology formed on the topology editing page as a simulated network topology corresponding to the networking scheme;
and/or the presence of a gas in the gas,
generating a networking password according to the simulated connection relation and networking information of each network device included in the simulated network topology, including:
determining at least one network device connected with a target switch in the at least one switch according to the simulated connection relation, and determining information of an interface between the target switch and the at least one network device;
according to the networking information of each network device, determining the attribute information of the target switch and the information of the virtual local area network to which the at least one network device belongs;
determining the password type which can be identified by the target switch according to the attribute information of the target switch;
generating a networking password corresponding to the target switch according to the information of the interface between the target switch and the at least one network device, the information of the virtual local area network to which the at least one network device belongs and the password type which can be identified by the target switch;
the sending the networking password to the at least one switch comprises: and sending the networking password of the corresponding switch to the corresponding switch.
8. A network topology state detection apparatus, comprising:
the topology determining unit is used for determining the topology of the entity network to be detected; the physical network topology includes a plurality of network devices;
an obtaining unit, configured to obtain networking information corresponding to each of the plurality of network devices;
a state detection unit, configured to create a virtual detection device that belongs to the same virtual local area network as each network device according to networking information respectively corresponding to the multiple network devices, and initiate access to the multiple network devices by using the virtual detection device, so as to determine a state of each network device according to an access result;
and the networking result determining unit is used for determining whether the entity network topology is successfully networked according to the state of each network device.
9. A computing device comprising a memory having stored therein a computer program and a processor that, when executing the computer program, implements the method of any of claims 1-7.
10. A computer-readable storage medium, on which a computer program is stored which, when executed in a computer, causes the computer to carry out the method of any one of claims 1-7.
CN202110774231.8A 2021-07-08 2021-07-08 Network topology state detection method, device, computing equipment and storage medium Active CN113507398B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110774231.8A CN113507398B (en) 2021-07-08 2021-07-08 Network topology state detection method, device, computing equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110774231.8A CN113507398B (en) 2021-07-08 2021-07-08 Network topology state detection method, device, computing equipment and storage medium

Publications (2)

Publication Number Publication Date
CN113507398A true CN113507398A (en) 2021-10-15
CN113507398B CN113507398B (en) 2023-07-11

Family

ID=78012242

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110774231.8A Active CN113507398B (en) 2021-07-08 2021-07-08 Network topology state detection method, device, computing equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113507398B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114430385A (en) * 2022-01-17 2022-05-03 锐捷网络股份有限公司 Network equipment detection method and device and electronic equipment

Citations (19)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040233234A1 (en) * 2003-05-22 2004-11-25 International Business Machines Corporation Appparatus and method for automating the diagramming of virtual local area networks
US20060013141A1 (en) * 2004-07-14 2006-01-19 Fujitsu Limited Loop frame detecting device and method for detecting loop frame
JP2008244632A (en) * 2007-03-26 2008-10-09 Oki Electric Ind Co Ltd System, method, and program for setting object to be monitored, network monitoring system, management device, and collection device
JP2012080217A (en) * 2010-09-30 2012-04-19 Nec Corp Terminal detection device, server device, terminal detection method, and program
CN102711140A (en) * 2012-05-07 2012-10-03 南京物联传感技术有限公司 Zigbee network signal detection device and detection method
CN103188102A (en) * 2011-12-29 2013-07-03 中国移动通信集团广东有限公司 Method, device and system achieving communication equipment networking
US20140280908A1 (en) * 2013-03-15 2014-09-18 ExtraHop Networks, Inc De-duplicating of packets in flows at layer 3
CN104468219A (en) * 2014-12-11 2015-03-25 杭州华三通信技术有限公司 Virtual networking network topology discovery method and device
CN105261254A (en) * 2015-11-09 2016-01-20 中国民航大学 A remote open-type airplane electronic line semi-physical virtual testing teaching platform
CN106789403A (en) * 2016-11-30 2017-05-31 国网安徽省电力公司宣城供电公司 A kind of intelligent substation relay protection network pressure automatic testing equipment and method
CN107528744A (en) * 2016-06-21 2017-12-29 中兴通讯股份有限公司 A kind of detection method and device of device port
WO2018013301A1 (en) * 2016-07-12 2018-01-18 Keysight Technologies Singapore (Holdings) Pte. Ltd. Methods, systems, and computer readable media for network test configuration using virtual local area network (vlan) scanning
CN108092834A (en) * 2016-11-22 2018-05-29 迈普通信技术股份有限公司 A kind of test activates the system and method for detection performance more
US20180309641A1 (en) * 2017-04-21 2018-10-25 Estinet Technologies Inc. Method and system for simulating a network topology using a physical machine
CN109327558A (en) * 2018-10-30 2019-02-12 新华三技术有限公司合肥分公司 Address management method and device
CN110365552A (en) * 2019-07-09 2019-10-22 山石网科通信技术股份有限公司 Test method, device, storage medium and processor
CN211018853U (en) * 2019-12-23 2020-07-14 深圳市国电科技通信有限公司 Performance detection system for dual mode communication device
CN111817844A (en) * 2020-07-20 2020-10-23 西安电子科技大学 Double-link wireless ad hoc network and security defense method in emergency scene
CN112333011A (en) * 2020-10-23 2021-02-05 苏州浪潮智能科技有限公司 Network topological graph generation method and device, electronic equipment and storage medium

Patent Citations (19)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040233234A1 (en) * 2003-05-22 2004-11-25 International Business Machines Corporation Appparatus and method for automating the diagramming of virtual local area networks
US20060013141A1 (en) * 2004-07-14 2006-01-19 Fujitsu Limited Loop frame detecting device and method for detecting loop frame
JP2008244632A (en) * 2007-03-26 2008-10-09 Oki Electric Ind Co Ltd System, method, and program for setting object to be monitored, network monitoring system, management device, and collection device
JP2012080217A (en) * 2010-09-30 2012-04-19 Nec Corp Terminal detection device, server device, terminal detection method, and program
CN103188102A (en) * 2011-12-29 2013-07-03 中国移动通信集团广东有限公司 Method, device and system achieving communication equipment networking
CN102711140A (en) * 2012-05-07 2012-10-03 南京物联传感技术有限公司 Zigbee network signal detection device and detection method
US20140280908A1 (en) * 2013-03-15 2014-09-18 ExtraHop Networks, Inc De-duplicating of packets in flows at layer 3
CN104468219A (en) * 2014-12-11 2015-03-25 杭州华三通信技术有限公司 Virtual networking network topology discovery method and device
CN105261254A (en) * 2015-11-09 2016-01-20 中国民航大学 A remote open-type airplane electronic line semi-physical virtual testing teaching platform
CN107528744A (en) * 2016-06-21 2017-12-29 中兴通讯股份有限公司 A kind of detection method and device of device port
WO2018013301A1 (en) * 2016-07-12 2018-01-18 Keysight Technologies Singapore (Holdings) Pte. Ltd. Methods, systems, and computer readable media for network test configuration using virtual local area network (vlan) scanning
CN108092834A (en) * 2016-11-22 2018-05-29 迈普通信技术股份有限公司 A kind of test activates the system and method for detection performance more
CN106789403A (en) * 2016-11-30 2017-05-31 国网安徽省电力公司宣城供电公司 A kind of intelligent substation relay protection network pressure automatic testing equipment and method
US20180309641A1 (en) * 2017-04-21 2018-10-25 Estinet Technologies Inc. Method and system for simulating a network topology using a physical machine
CN109327558A (en) * 2018-10-30 2019-02-12 新华三技术有限公司合肥分公司 Address management method and device
CN110365552A (en) * 2019-07-09 2019-10-22 山石网科通信技术股份有限公司 Test method, device, storage medium and processor
CN211018853U (en) * 2019-12-23 2020-07-14 深圳市国电科技通信有限公司 Performance detection system for dual mode communication device
CN111817844A (en) * 2020-07-20 2020-10-23 西安电子科技大学 Double-link wireless ad hoc network and security defense method in emergency scene
CN112333011A (en) * 2020-10-23 2021-02-05 苏州浪潮智能科技有限公司 Network topological graph generation method and device, electronic equipment and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
李华;孙智勇;吴中福;: "虚拟计算机网络组网平台的设计与实现", 计算机应用研究 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114430385A (en) * 2022-01-17 2022-05-03 锐捷网络股份有限公司 Network equipment detection method and device and electronic equipment

Also Published As

Publication number Publication date
CN113507398B (en) 2023-07-11

Similar Documents

Publication Publication Date Title
US20220103452A1 (en) Tracing logical network packets through physical network
US10680961B2 (en) Using headerspace analysis to identify flow entry reachability
US10331973B2 (en) System and method for deploying graphical diagram topologies
CN112165532B (en) Node access method, device, equipment and computer readable storage medium
CN104718723B (en) For the networking in virtual network and the frame of security service
US9270523B2 (en) Reconfiguring interrelationships between components of virtual computing networks
US9674275B1 (en) Providing a file system interface to network-accessible computing resources
Doug Lowe Networking All-in-one for Dummies
WO2017113201A1 (en) Network service lifecycle management method and device
CN103036703A (en) Configuration management method of logical topology in virtual network and management server
CN115225508B (en) Internet shooting range scene construction method
CN110855457B (en) Method and equipment for generating network model and configuring network
CN108206750A (en) The configuration method and device of virtual machine network interface card
CN110855458A (en) Configuration command generation method and equipment
CN113452567B (en) Networking method and device, computing equipment and storage medium
CN113507398B (en) Network topology state detection method, device, computing equipment and storage medium
US7903678B2 (en) Internet protocol address management system and method
US9716631B2 (en) End host physical connection on a switch port using multiple ethernet frames
US20070223530A1 (en) Method and apparatus for managing network configuration, and computer product
CN108768849A (en) Message processing method and device
CN110730093B (en) Metropolitan area network topology mapping method and device
CN113328897B (en) Method, device, equipment and medium for acquiring running state of network equipment
CN117155875A (en) Method and device for applying virtual switch based on Openstack
CN108768807A (en) A kind of method and device of cloud platform actual situation interconnection
CN113468700B (en) Topology information identification method, device, computing equipment and storage medium

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