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

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

Info

Publication number
CN113507398B
CN113507398B CN202110774231.8A CN202110774231A CN113507398B CN 113507398 B CN113507398 B CN 113507398B CN 202110774231 A CN202110774231 A CN 202110774231A CN 113507398 B CN113507398 B CN 113507398B
Authority
CN
China
Prior art keywords
network
networking
local area
topology
virtual local
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202110774231.8A
Other languages
Chinese (zh)
Other versions
CN113507398A (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 network topology state detection method, a device, a computing device and a storage medium, 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 belonging to the same virtual local area network as each network equipment according to networking information respectively corresponding to the plurality of network equipment, and initiating access to the plurality of network equipment by utilizing 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 successful in networking according to the state of each network device. According to the scheme, the detection efficiency can be improved.

Description

Network topology state detection method, 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 device, computing equipment and a storage medium.
Background
A network topology refers to a network structure made up of a plurality of network devices. In a network environment, to facilitate management of network devices, it is necessary to partition multiple network devices into different virtual local area networks. After networking is completed, whether a plurality of network devices in the network topology are successfully networked according to a networking scheme or not can be determined by manually inquiring network configuration information on the network devices in the related art.
Disclosure of Invention
Based on the problem of low detection efficiency in the prior art, the embodiment of the invention provides a network topology state detection method, a device, a computing device and a storage medium, which can rapidly detect whether the network topology after networking is completed is successfully networked according to a networking scheme.
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 belonging to the same virtual local area network as each network equipment according to networking information respectively corresponding to the plurality of network equipment, and initiating access to the plurality of network equipment by utilizing 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 successful in networking according to the state of each network device.
Preferably, a virtual detection device is created;
the initiating access to the plurality of network devices using the virtual detection device 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 an undetected virtual local area network exists in the at least one virtual local area network, and if so, executing step S3; if not, the detection is ended;
s3: selecting one 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: distributing 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 utilizing 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 the 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 by one;
the initiating access to the plurality of network devices using the virtual detection device 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 distributing 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 utilizing 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: the state of the network equipment corresponding to the successful access initiation result is determined to be online, and the state of the network equipment corresponding to the failed access initiation result is determined to be offline;
and/or the number of the groups of groups,
the method for initiating the access comprises the following steps: at least one of a ping mode, a web server mode, a simple file transfer protocol TFTP mode and a ssh telnet mode.
Preferably, before the determining the entity network topology to be detected, the method further includes:
determining networking schemes to be realized by the plurality of network devices; at least one switch is included in the plurality of network devices;
Acquiring a simulated network topology corresponding to the networking scheme; the simulated network topology comprises simulated connection relations among the plurality of network devices and networking information of the network devices;
generating a networking password according to the simulated connection relation and networking information of each network device included in the simulated network topology;
and sending the networking port command to the at least one switch, so that the at least one switch executes the networking password to network 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 simulation connection relationship.
Preferably, the physical network topology to be detected is mapped from the simulated network topology.
Preferably, the obtaining a simulated network topology corresponding to the networking scheme includes:
on a pre-established topology editing page, obtaining device packages respectively corresponding to the plurality of network devices, and connecting the device packages to obtain an analog connection relation between the network devices; wherein the device package comprises a graphical element for characterizing the corresponding network device and/or an interface element for characterizing an interface comprised by the corresponding network device; the simulated connection relationship comprises any one or more of the following connection relationships: the connection relation between the graphic elements, the connection relation between the graphic elements and the interface elements and the connection relation between the interface elements;
According to the information of the virtual local area network to which each network device is respectively divided in the networking scheme, each device package on the topology editing page is configured with networking information;
determining the network topology formed on the topology editing page as a simulated network topology corresponding to the networking scheme;
and/or the number of the groups of groups,
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 of the target switch connected with the at least one network device;
determining attribute information of the target switch and information of a virtual local area network to which the at least one network device belongs according to networking information of each network device;
determining a 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 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;
The sending the networking port command to the at least one switch includes: and sending the networking port command of the corresponding switch to the corresponding switch.
In a second aspect, an embodiment of the present invention further provides a network topology status detection apparatus, including:
the topology determining unit is used for determining the entity network topology 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;
the state detection unit is used for creating virtual detection equipment belonging to the same virtual local area network as each network equipment according to networking information respectively corresponding to the plurality of network equipment, and initiating access to the plurality of network equipment by utilizing the virtual detection equipment so as to determine the state of each network equipment 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 implements a method according to any embodiment of the present specification when executing the computer program.
In a fourth aspect, embodiments of the present invention also provide a computer-readable storage medium having stored thereon a computer program which, when executed in a computer, causes the computer to perform a method according to any of the embodiments of the present specification.
The embodiment of the invention provides a network topology state detection method, a device, a computing device and a storage medium, wherein after networking is completed, an entity network topology can be accessed among devices belonging to the same virtual local area network, and the virtual detection device is created to enable the virtual detection device and each network device to belong to the same virtual local area network, so that the virtual detection device can be utilized to initiate 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 entity network topology is successful in networking or not can be determined. Therefore, the scheme can automatically complete detection without artificial participation, so that 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 that are required in the embodiments or the description of the prior art will be briefly described, and it is obvious that the drawings in the following description are some embodiments of the present invention, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a flowchart of a network topology status 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 obtaining a simulated network topology according to an embodiment of the present invention;
FIG. 4 is a flowchart of another method for obtaining a simulated network topology according to an embodiment of the present invention;
FIG. 5 is a flow chart of an access initiation method according to an embodiment of the present invention;
FIG. 6 is a flow chart of another access initiation method provided by an embodiment of the present invention;
FIG. 7 is a hardware architecture diagram of a computing device according to one embodiment of the invention;
fig. 8 is a diagram of a network topology status detection apparatus according to an embodiment of the present invention;
fig. 9 is a block diagram of another network topology status detection apparatus according to an embodiment of the present invention.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is apparent that the described embodiments are some embodiments of the present invention, but not all embodiments, and all other embodiments obtained by those skilled in the art without making any inventive effort based on the embodiments of the present invention are within the scope of protection of the present invention.
As described above, in the related art, it is necessary to divide a plurality of network devices into different virtual local area networks (Virtual Local Area Network, VLANs) in order to facilitate management of the network devices. For example, an enterprise includes 20 hosts, 2 hosts for financial work, 3 hosts for administrative work, and 15 hosts for research and development work. The 20 hosts can be respectively divided into different virtual local area networks according to the different operation types to perform networking, such as VLAN1, VLAN2 and VLAN3. However, if the network topology formed by the network devices is successfully networked according to the networking scheme, in the related art, whether the networking is successful can be determined by manually inquiring the network configuration information on the network devices, so that the detection efficiency is low. In consideration of that network access can be realized between network devices in the same virtual local area network after networking is completed, the network devices in the same virtual local area network as the network devices can be considered to initiate access, and the state of the network devices, such as on-line or off-line, can be determined according to the access result to determine whether the network devices are successfully networked.
Specific implementations of the above concepts are described below.
Referring to fig. 1, an embodiment of the present invention provides a network topology state detection method, which includes:
step 100, determining an entity network topology 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 belonging to the same virtual local area network as each network equipment according to networking information respectively corresponding to the plurality of network equipment, and initiating access to the plurality of network equipment by utilizing the virtual detection equipment so as to determine the state of each network equipment according to the access result;
and step 106, determining whether the entity network topology is successful in networking according to the state of each network device.
In the embodiment of the invention, because the entity network topology can access among the devices belonging to the same virtual local area network after the networking is completed, the virtual detection device and each network device belong to the same virtual local area network by creating the virtual detection device, thereby the virtual detection device can be utilized to initiate 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 further whether the entity network topology is successful in networking can be determined. Therefore, the scheme can automatically complete detection without artificial participation, so that the detection efficiency can be improved.
The manner in which the individual steps shown in fig. 1 are performed is described below.
First, for step 100, determining an entity network topology to be detected; the physical network topology includes a plurality of network devices.
For convenience in describing the present embodiment, two concepts are introduced here:
physical network topology: and the network topology is formed by physically connecting the plurality of network devices after networking. In the physical network topology, the connection relationship between the plurality of network devices is called an entity connection relationship.
Simulating network topology: in the drawing software for drawing the topological graph, the network devices are added to the topological editing page of the drawing software in a corresponding graph mode, and then the graphs of the network devices are connected by using a connecting wire to form the network topology. In the analog network topology, the connection relationship between the plurality of network devices is called an analog connection relationship.
In the embodiment of the invention, after the entity network topology is networked according to the set networking scheme, in order to determine whether the entity network topology is successful in networking, the state of each network device in the entity network topology needs to be detected.
Where 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 building technology that can partition multiple network devices 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. The hosts are connected to the switch, and may be one switch or multiple switches. In VLAN classification, this is required to be achieved by at least one switch connecting the hosts.
In one embodiment of the present invention, in order to implement fast networking and manage the physical network topology after networking, before this step 100, please refer to fig. 2, the physical network topology may be networked according to a set networking scheme in the following manner, which specifically includes:
step 200, determining networking schemes required to be realized by the plurality of network devices; at least one switch is included in the plurality of network devices.
Step 202, obtaining a simulated network topology corresponding to the networking scheme. The simulated network topology includes simulated connection relationships between 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:
first case: there is no physical network topology at this time.
Second case: at this point there is already a physical network topology.
The requirements for the simulated network topology are different when corresponding to the different situations.
In the first case, no physical network topology exists, which indicates that the network device has not been physically connected. At this time, a connection mode that the connection relation is simpler for the plurality of network devices according to the networking scheme so as to facilitate the physical connection can be obtained, and a simulated connection relation in the simulated 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.
In the second case, since the physical network topology already exists at this time, the physical network topology may also include two cases: in the case A, the entity network topology has performed networking on 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 the case B, the entity network topology does not network the network equipment. However, in the case a or the case B, the physical connection relationship of the physical network topology is not changed, and when networking or replacing networking is performed, a switch is required to complete a networking scheme to be implemented. Therefore, in 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, so as to form the simulated connection relationship in the simulated network topology.
In summary, whether corresponding to the first case or the second case, it is necessary to ensure that the analog connection relationship in the analog network topology is the same as the entity connection relationship in the entity network topology.
In one embodiment of the present invention, the method for obtaining the simulated network topology corresponding to the networking scheme includes at least two modes:
the first way is: the simulated network topology is newly drawn.
The second way is: and obtaining the simulated network topology by using the stored template.
The following description will be made for the above two modes, respectively.
This step 202 uses the first approach to obtain a simulated network topology.
Referring to fig. 3, this step may include:
and 300, obtaining device packages corresponding to the plurality of network devices respectively on a pre-created topology editing page, and connecting the device packages to obtain the simulated connection relation 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 the feature set of the corresponding network device. The device package may include graphic elements and text elements, and may also include interface elements.
The graphic elements are graphics used for representing corresponding network equipment, different types of network equipment can use different graphic elements, and a user can determine the type of the equipment package corresponding to the network equipment according to the graphic elements of the equipment package displayed on the topology editing page. For example, the type of network device is a desktop host, a notebook, a router, a switch, a firewall, a camera, etc. The created graphic elements may be stored in a graphic library.
The interface element is used to characterize each interface included on the network device, for example, a control interface, an optical interface, a USB interface, a Type-C interface, a universal asynchronous receiver Transmitter (Universal Asynchronous Receiver/Transmitter, UART) interface, a high-definition multimedia interface (High Definition Multimedia Interface, HDMI), a serial peripheral interface (Serial Peripheral Interface, SPI), and the like. In this embodiment, the interface element may be edited, for example, add delete or change interfaces. The created interface elements may be stored in an interface library.
The text element is used for recording encapsulation information of the network device, and the encapsulation information may include: hardware information and software information. The hardware information may include: device type, device identification, interface type, interface identification, device itself parameter information (such as processor model, frequency, hard disk capacity, memory size, etc.), operating system information, etc., the software may include: IP address, MAC address, vendor information, vendor ID, network device login information, etc. All text description information of the network equipment corresponding to the equipment package can be stored into package information through editing text elements, the package information is a part of the equipment package, and the package information can be displayed or hidden on a topology editing page according to different configurations. For example, when the package information is not checked or edited, the package information is in a hidden state, and when the package information needs to be checked or edited, the package information can be displayed. The display modes can comprise: in the form of a display window or by copying the encapsulated information to other video display units for display, etc.
The device package may be a package for one network device, or may be a package for a connection relationship between a plurality of network devices.
The device packages may be pre-generated and stored in a package library. The encapsulation library can perform operations such as import, export, selection, editing, calling, deletion and the like through the data interface.
In the 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 included in the equipment packaging is more abundant and comprehensive, and 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 rapidly edited, and the editing speed of the network topology is improved.
The method for obtaining the device packages corresponding to the plurality of network devices on the topology editing page in the step at least comprises the following three modes: 1. importing from a packaging library; 2. editing or creating on a topology editing page; 3. and copying and pasting the device package obtained on the topology editing page.
The device package can be deleted, moved, rotated and the like on the topology editing page. The operations such as movement and rotation may be performed in a two-dimensional coordinate system on the topology editing page.
In this step 300, the device packages are connected, specifically: connection elements may be used to effect connection of the respective device packages. The connection element may be a straight line, a curved line, a straight line with an arrow, a curved line with an arrow, etc., and may be used to characterize different types of links when the connection element corresponds to different types.
In one embodiment of the invention, when the device packages are connected by using the connection element, the corresponding relation between the device packages and the connection element can be stored, so that the analog connection relation between the network devices can be conveniently identified later. The detection script may be deployed in the device package in advance, and is configured to detect whether a connection element is connected to the device package, and when detecting that the device package has a connection element connected to the device package, obtain identification information of the connection element, determine a target element for the device package to establish connection with the connection element, and store a correspondence 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 graphic 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 of S01-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 for establishing connection with the connection element is interface element S01001, so that the corresponding relationship of S01001-L001 is stored.
When stored, the correspondence relationship may be stored in package information of the device package.
Step 302, according to the information of the virtual local area network to which each network device is respectively divided in the networking scheme, configuring networking information for each device package on the topology editing page.
In this step 302, the configuration method of the networking information for each device package may at least include the following two modes:
and (3) manually configuring networking information on the equipment package in the mode A.
And B, automatically encapsulating and configuring networking information for the equipment.
Taking the example of the plurality of network devices comprising a switch and 10 hosts, the 10 hosts are connected to the switch. The information of the VLAN may be VLAN numbers, for example, dividing the 10 hosts into VLAN1, VLAN2 and VLAN3, respectively.
Then in mode a, the device package configuration networking information may be implemented by editing the text elements of the device package. The networking information may include, among other things, VLAN numbers, IP addresses assigned thereto, etc.
Then in mode B, this step may specifically include: creating a boundary frame of a corresponding virtual local area network on the topology editing page; and when the target equipment package is detected to be positioned in the boundary box, configuring networking information for the target equipment package according to the information of the virtual local area network corresponding to the boundary box.
The bounding box created may be a closed box, which 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 configuration networking information for the target device package.
By utilizing the mode B, the equipment packages of the network equipment belonging to the same VLAN can be quickly moved into the boundary box corresponding to the VLAN, and the equipment packages of the network equipment belonging to the same VLAN are automatically configured with networking information, so that the networking scheme which is needed to be realized by a plurality of network equipment can be intuitively displayed, and the configuration speed of the networking information can be improved when more network equipment are used for networking.
And 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 present invention, after step 304, the generated simulated network topology corresponding to the networking scenario may be stored in a library of simulated network topologies for subsequent use.
This step 202 uses a second approach to obtain a simulated network topology.
The simulated network topology obtained using the first approach may be stored, for example, in a library of simulated network topologies, which may then include a plurality of simulated network topologies 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 one embodiment of the present invention, when the simulated network topology is stored in the simulated network topology library, the networking scheme corresponding to the simulated network topology can be stored together. For example, the number, type, networking division, etc. of network devices in the networking scheme are stored. So that the user can quickly learn whether the required analog network topology exists in the analog network topology.
If changes to the networking are required frequently within an enterprise, and the scope of the changes includes a fixed number of networking schemes, then the simulated network topology for each networking scheme may be stored in a library of simulated network topologies. When each time of change, 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 library.
Step 404, generating a simulated network topology corresponding to the networking scheme.
In step 404, a simulated network topology corresponding to the networking scheme is generated, which is the same as the first mode described above and will not be described in detail herein.
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 simulated network topology can be identified, the content related in the simulated network topology can be identified, such as the simulated connection relation, networking information of each network device and the like, and then a networking password which can be identified by the switch is generated according to the identified content.
In one embodiment of the present invention, the identifying manner of the networking information of the network device may include: directly acquiring text elements of equipment encapsulation, and extracting networking information of corresponding network equipment of the equipment encapsulation from the text elements.
In one embodiment of the present invention, the identifying manner of the analog connection relationship may include: acquiring the corresponding relation between each equipment package and the connection element; determining a connection relationship between a plurality of device packages according to the correspondence relationship; the connection relationship between the plurality of device packages is determined as the analog connection relationship.
For example, if the device package S01001 interface has a correspondence relationship with the connection element L001 and the device package S02001 interface also has a correspondence 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 correspondence between each device package and the connection element is obtained, the correspondence may be directly obtained from the package information of the device package (the correspondence is stored in the package information in step 300). The detection method in step 300 may also be used to detect the device package, so as to obtain the correspondence between the device package and the connection element.
Examples of a portion of the identified content are given below:
device type: switch board
Identification information of the device: s01
Identification information of interface 1: s01001
Identification information of the device to which the interface 1 is connected: d01001
Type of device to which interface 1 is connected: computer with a memory for storing data
Type of interface of the device to which the 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 for storing data
Type of interface of the device to which the interface 2 is connected: net mouth
Device type: computer with a memory for storing data
Identification information of the device: d01
Identification information of the device to which the interface 1 is connected: s01001
Type of device to which interface 1 is connected: switch board
Type of interface of the device to which the interface 1 is connected: optical port
VLAN information to which the device belongs: VLAN1
IP address of device: 168.192.0.1
Login account number of device: 111111
Login password of device: 222222
……
In one embodiment of the invention, since the identifiable networking passwords are different when the types 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: according to the simulated connection relationship, determining at least one network device connected with a target switch in the at least one switch, 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 a device D01 and a device D02, and the device D01 is connected using the S01001 interface of the switch, and the device D02 is connected using the S01002 interface of the switch.
S2: and determining attribute information of the target switch and information of a virtual local area network to which the at least one network device belongs according to 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, the information of the virtual local area network to which the device D01 belongs may be determined by the networking information of the network device, 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 VLAN2.
S3: and determining the password type which can be identified by the target switch according to the attribute information of the target switch.
Wherein, a correspondence between the switch attribute information and the identifiable password type may be established in advance, and after the attribute information of the target switch is determined in S2, the identifiable password type of the target switch may be determined directly according to the correspondence.
S4: 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 determining the networking scheme, the content of generating the networking password for the switch may be implemented by existing schemes, which are not described in detail herein.
In the embodiment of the invention, the identifiable password types of the switches can be determined according to the attribute information of the switches in consideration of the fact that the identifiable password types of different switches possibly can be identified, so as to generate the identifiable networking password aiming at the interaction machine, thereby ensuring the successful networking.
And step 206, the networking port command is sent to the at least one switch, so that the at least one switch executes the networking password to network the entity network topology formed by the plurality of network devices according to the networking scheme, wherein the entity connection relationship between the plurality of network devices in the entity network topology is the same as the simulated connection relationship.
When more than two switches are included in the plurality of network devices, the generated networking port command corresponding to the switch can be sent to the corresponding switch. When the switch receives the networking password, the networking password may be executed, thereby completing networking.
The above steps 200-206 complete the networking of the physical network topology.
It should be noted that, other networking modes besides the networking mode described in fig. 2 may 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 one embodiment of the present invention, the physical network topology in step 100 may be mapped from the above-described simulated network topology. For example, the entity network topology after networking in steps 200 to 206 is the entity network topology to be detected in step 100.
Then, for step 102, networking information corresponding to each of the plurality of network devices is obtained.
In step 102, in order to implement 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, where the networking information may be input by an operation and maintenance personnel; the networking information of each network device in the entity network topology can be stored in advance, and the networking information can be directly read 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 realized by the entity network topology.
When the network device is acquired through a simulated network topology corresponding to a networking scheme realized by an entity network topology, specifically, the packaging information of the device packages corresponding to the network devices is acquired from the simulated network topology, the packaging information comprises networking information, and the networking information of the network device is extracted from the packaging information.
Finally, for step 104, according to the networking information respectively corresponding to the plurality of network devices, creating a virtual detection device belonging to the same virtual local area network as each network device, and initiating access to the plurality of network devices by using the virtual detection device 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 two cases:
case one: a virtual detection device is created.
And a second case: at least two virtual detection devices are created.
The implementation process of this step will be described below for the above two cases, respectively.
In a first case, referring to fig. 5, the initiating access to the plurality of network devices by the virtual detection device in step 104 may include:
and 500, determining at least one virtual local area network corresponding to the plurality of network devices according to networking information of each network device.
Step 502, determining whether there is an undetected virtual local area network in the at least one virtual local area network, and if so, executing step 504; if not, the detection is ended.
In step 504, a virtual lan is selected from the undetected virtual lans as a target virtual lan, and at least one network device belonging to the target virtual lan and the IP address corresponding to the at least one network device are determined.
Step 506, an IP address belonging to the target virtual lan is allocated 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 address 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 502.
For example, 10 hosts belonging to different VLANs can be known from the networking information, wherein hosts 1 to 3 belong to VLAN1, hosts 4 to 6 belong to VLAN2, and hosts 7 to 10 belong to VLAN3. Firstly, VLAN1 is determined as a target VLAN, network equipment belonging to the VLAN1 is determined as hosts 1-3, IP addresses of the hosts 1-3 can be determined, the IP addresses belonging to the VLAN1 are allocated to virtual network equipment, and at the moment, the virtual network equipment and the hosts 1-3 belong to the VLAN1, so that the virtual network equipment 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, VLAN2 is determined as the target VLAN and VLAN3 is determined as the target VLAN, and the processing after VLAN2 and VLAN3 are determined as the target VLAN is the same as that of VLAN 1. Finally, access results corresponding to the hosts 1 to 10 can be obtained.
It should be noted that, in step 502, it may be determined whether an undetected virtual lan exists in the at least one virtual lan by means of an identifier or the like. For example, the detected virtual local area networks are marked with a special identifier, and a virtual local area network which is not marked with the identifier in the at least one virtual local area network is determined as an undetected virtual local area network. For another example, the determination may be made by packet format, where the codes of each VLAN are added to a packet before access is not initiated to any network device in the VLAN, for example, VLAN1, VLAN2 and VLAN3 are added to the same packet, the VLAN in the packet is an undetected VLAN, and a VLAN is randomly extracted from the packet and is used as a target VLAN until the VLAN is not included in the packet.
By using the virtual detection device created in the first case to detect the plurality of network devices, the virtual detection device is convenient to manage, and the detection cost is low.
In the second case, 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 by one.
Referring to fig. 6, in step 104, when the virtual detection apparatus is used to initiate access to the plurality of network apparatuses, the method 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 a 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 address respectively corresponding to the at least one network device.
For example, 10 hosts belonging to different VLANs can be known from the networking information, wherein hosts 1 to 3 belong to VLAN1, hosts 4 to 6 belong to VLAN2, and hosts 7 to 10 belong to VLAN3. Then 3 virtual detection devices are created, namely virtual detection device a, virtual detection device B, virtual detection device C, wherein virtual detection device a corresponds to VLAN1, virtual detection device B corresponds to VLAN2, and virtual detection device C corresponds to VLAN3. Since the execution mode is the same for each of VLANs 1 to 3, VLAN1 will be described as an example. The network equipment belonging to VLAN1 is host 1-3, obtain the IP address of host 1-3, then assign the IP address belonging to VLAN1 for virtual detection equipment A, and utilize virtual detection equipment A to initiate access to host 1-3 respectively, so as to obtain the access result of host 1-3.
By creating at least two virtual detection devices in the second case, the at least two virtual detection devices are in one-to-one correspondence with at least two virtual local area networks, and each virtual detection device is used for detecting network devices in the corresponding virtual local area network, detection efficiency can be improved.
It should be noted that, whether the above case one or the case two, the obtaining manner of the IP address of the network device may be an IP address configured when performing the configuration of the networking information for each network device in the simulated network topology when the simulated network topology is generated, and then directly obtaining the IP address of each network device according to the networking information; the IP address may also be obtained from the switch after networking.
In one embodiment of the present invention, the determining the status 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 successful access initiation result as online, and determining the state of the network equipment corresponding to the failed access initiation result as offline.
In one embodiment of the present invention, after determining the state of each network device, the virtual detection device may send the state of each network device to the detection platform (the detection platform may create the virtual detection device and initiate a detection instruction to the virtual detection device, so that the virtual detection device completes the platform end of the detection process according to the detection instruction), and the detection platform may automatically fill the state of each network device into the encapsulation information of the device packages corresponding to each network device in the simulated network topology, so that the user may view the state of the corresponding network device according to the encapsulation information of the device packages.
In one embodiment of the present invention, the method for initiating the access includes: at least one of a ping mode, a web server mode, a simple file transfer protocol TFTP mode and a ssh telnet mode.
The virtual detection device initiates an access to the host 1, and the method of initiating an access is described by taking a ping method as an example. The virtual detection device sends a ping packet to the host 1, and if the host 1 returns information for the ping packet, the virtual detection device indicates that the access initiation is successful, and the host 1 is online; if host 1 is unresponsive, then this indicates that the initiating access failed, and host 1 is offline.
Preferably, the maximum access times can be set when the access is initiated, for example, the maximum access times are set to 3 times, if no reaction is caused when the access is initiated to the same network device for 3 times, the network device is determined to be offline, so that the accuracy of the access result can be improved.
For step 106, it is determined whether the physical network topology is successful in networking according to the status of each network device.
And when the states of the plurality of network devices are all online, determining that the entity network topology is successful in networking according to the networking scheme, otherwise, determining that the entity network topology is failed in networking according to the networking scheme. For example, in the hosts 1 to 10, the hosts 1 to 9 are all on-line, and the host 10 is off-line, indicating a networking failure.
In one embodiment of the present invention, the types of the network devices may include: physical network devices and/or virtual network devices.
The physical network topology may be configured by only physical network devices, may be configured by only virtual network devices, or may include both physical network devices and virtual network devices.
As shown in fig. 7 and 8, the embodiment of the invention provides a network topology state detection device. The apparatus embodiments may be implemented by software, or may be implemented by hardware or a combination of hardware and software. In terms of hardware, as shown in fig. 7, a hardware architecture diagram of a computing device where a network topology state detection apparatus provided by an embodiment of the present invention is located, where in addition to a processor, a memory, a network interface, and a nonvolatile memory shown in fig. 7, the computing device where the embodiment is located may generally include other hardware, such as a forwarding chip responsible for processing a packet, and so on. Taking a software implementation as an example, as shown in fig. 8, as a device in a logic sense, the device is formed by reading a corresponding computer program in a nonvolatile memory into a memory by a CPU of a computing device where the device is located. The network topology state detection device provided in this embodiment includes:
A topology determining unit 801, configured to determine an entity network topology 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 plurality of network devices;
a state detection unit 803, configured to create a virtual detection device that belongs to the same virtual local area network as each network device according to networking information corresponding to each of the plurality of network devices, and initiate access to the plurality of network devices by using the virtual detection device, so as to determine a state of each network device according to an access result;
a networking result determining unit 804, configured to determine whether the physical network topology is successful according to the status of each network device.
In one embodiment of the present invention, the state detection unit 803 creates a virtual detection device; and the state detection unit 803 is specifically configured to perform the following steps when using the virtual detection device to initiate access to the plurality of network devices:
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 an undetected virtual local area network exists in the at least one virtual local area network, and if so, executing step S3; if not, the detection is ended;
S3: selecting one 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: distributing 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 utilizing 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 the step S2.
In one embodiment of the present invention, the state detection unit 803 creates at least two virtual detection devices, where the plurality of network devices corresponds 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 state detection unit 803 is specifically configured to perform, when access is initiated to the plurality of network devices by using the virtual detection device, 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 distributing 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 utilizing the IP address of the target virtual detection equipment and the IP address respectively corresponding to the at least one network equipment.
In one embodiment of the present invention, when determining the state of each network device according to the access result, the state detection unit 803 is specifically configured to determine that the state of the network device corresponding to the access result that the access initiation succeeds is online, and determine that the state of the network device corresponding to the access result that the access initiation fails is offline;
and/or the number of the groups of groups,
in one embodiment of the present invention, the method for initiating the access includes: at least one of a ping mode, a web server mode, a simple file transfer protocol TFTP mode and a ssh telnet mode.
In one embodiment of the present invention, referring to fig. 9, the network topology status detection apparatus may further include:
a networking unit 805, configured to determine a networking scheme required to be implemented by the plurality of network devices; at least one switch is included in the plurality of network devices; acquiring a simulated network topology corresponding to the networking scheme; the simulated network topology comprises simulated connection relations among the plurality of network devices and networking information of the network devices; generating a networking password according to the simulated connection relation and networking information of each network device included in the simulated network topology; and sending the networking port command to the at least one switch, so that the at least one switch executes the networking password to network 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 simulation connection relationship.
In one embodiment of the invention, the physical network topology to be detected is mapped from the simulated network topology.
In one embodiment of the present invention, when obtaining the simulated network topology corresponding to the networking scheme, the networking unit 805 is specifically configured to obtain device packages corresponding to the plurality of network devices on a pre-created topology editing page, and connect the device packages to obtain a simulated connection relationship between the network devices; wherein the device package comprises a graphical element for characterizing the corresponding network device and/or an interface element for characterizing an interface comprised by the corresponding network device; the simulated connection relationship comprises any one or more of the following connection relationships: the connection relation between the graphic elements, the connection relation between the graphic elements and the interface elements and the connection relation between the interface elements; according to the information of the virtual local area network to which each network device is respectively divided in the networking scheme, each device package on the topology editing page is configured with networking information; and 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 present invention, when generating a networking password according to the simulated connection relationship and networking information of each network device included in the simulated network topology, the networking unit 804 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 determine information of an interface where the target switch is connected to the at least one network device; determining attribute information of the target switch and information of a virtual local area network to which the at least one network device belongs according to networking information of each network device; determining a 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 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;
the networking unit 804 is specifically configured to send the networking port command of the corresponding switch to the corresponding switch when sending the networking port command to the at least one switch.
It should be understood that the structure illustrated in the embodiments of the present invention does not constitute a specific limitation on a network topology state detection apparatus. In other embodiments of the invention, a network topology state detection device may include more or fewer components than shown, or may combine certain components, or may split certain components, or may have a different arrangement of components. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
The content of information interaction and execution process between the modules in the device is based on the same conception as the embodiment of the method of the present invention, and specific content can be referred to the description in the embodiment of the method of the present invention, which is not repeated here.
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 realizes the network topology state detection method in any embodiment of the invention when executing the computer program.
The embodiment of the invention also provides a computer readable storage medium, and the computer readable storage medium stores a computer program, and when the computer program is executed by a processor, the processor is caused to execute the network topology state detection method in any embodiment of the invention.
Specifically, a system or apparatus provided with a storage medium on which a software program code realizing the functions of any of the above embodiments is stored, and a computer (or CPU or MPU) of the system or apparatus may be caused to read out and execute the program code stored in the storage medium.
In this case, the program code itself read from the storage medium may realize the functions of any of the above-described embodiments, and thus the program code and the storage medium storing the program code form part of the present invention.
Examples of the storage medium for providing 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 by a communication network.
Further, it should be apparent that the functions of any 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 part or all of the actual operations based on the instructions of the program code.
Further, it is understood that the program code read out by the storage medium is written into a memory provided in an expansion board inserted into a computer or into a memory provided in an expansion module connected to the computer, and then a CPU or the like mounted on the expansion board or the expansion module is caused to perform part and all of actual operations based on instructions of the program code, thereby realizing the functions of any of the above embodiments.
The embodiments of the invention have at least the following beneficial effects:
1. in one embodiment of the invention, because the entity network topology can access between devices belonging to the same virtual local area network after networking is completed, the virtual detection device is created to ensure that the virtual detection device and each network device belong to the same virtual local area network, thereby initiating access to the network devices belonging to the same virtual local area network by using the virtual detection device, determining the state of each network device according to the access result, and further determining whether the entity network topology is successful in networking. Therefore, the scheme can automatically complete detection without artificial participation, so that the detection efficiency can be improved.
2. In one embodiment of the invention, the virtual detection equipment is created to detect the plurality of network equipment, so that the virtual detection equipment is convenient to manage, and the detection cost is low.
3. In one embodiment of the invention, by creating at least two virtual detection devices, which are in one-to-one correspondence with at least two virtual local area networks, and using each virtual detection device to detect the network device in the corresponding virtual local area network, the detection efficiency can be improved.
4. In one embodiment of the invention, the simulated connection relation among the plurality of network devices can be realized in the simulated network topology, the simulated connection relation is the same as the entity connection relation of the plurality of network devices in the entity network topology, and the acquired simulated network topology can comprise 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, the switch is not required to be manually configured, and the networking of the entity network topology can be quickly realized according to the simulated network topology, thereby improving the 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 included in the equipment packaging is more abundant and comprehensive, and 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 rapidly edited, and the editing speed of the network topology is improved.
6. In one embodiment of the invention, the equipment packages of the network equipment belonging to the same VLAN can be quickly moved to the boundary box corresponding to the VLAN by utilizing the mode of automatically configuring the networking information for the equipment packages of the equipment, and the configuration of the networking information for the equipment packages of the network equipment belonging to the same VLAN can be automatically performed, so that the networking scheme which is needed to be realized by a plurality of network equipment can be intuitively displayed, and the configuration speed of the networking information can be improved when the networking network equipment is more.
7. In one embodiment of the invention, after the simulated network topology is generated, the simulated network topology can be stored in a simulated network topology library, when the simulated network topology is required to be generated, whether the required simulated network topology exists or not can be firstly 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 can be quickly obtained, so that the acquisition speed of the simulated network topology is improved, and the time cost is reduced.
8. In one embodiment of the invention, since the types of passwords which can be identified by different switches are different, the type of the password which can be identified by the switch can be determined according to the attribute information of the switch so as to generate the identifiable networking password for the interaction machine, thereby ensuring the successful networking.
It is noted that relational terms such as first and second, and the like, are 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. Moreover, 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 one …" does not exclude the presence of additional identical elements in a process, method, article or apparatus that comprises the element.
Those of ordinary skill in the art will appreciate that: all or part of the steps for implementing the above method embodiments may be implemented by hardware related to program instructions, and the foregoing program may be stored in a computer readable storage medium, where the program, when executed, performs steps including the above method embodiments; and the aforementioned storage medium includes: various media in which program code may be stored, such as ROM, RAM, magnetic or optical disks.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solution of the present invention, and are not limiting; although the 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 scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims (10)

1. A method for detecting a network topology state, comprising:
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 belonging to the same virtual local area network as each network equipment according to networking information respectively corresponding to the plurality of network equipment, and initiating access to the plurality of network equipment by utilizing 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 successful in networking according to the state of each network device.
2. The method of claim 1, wherein a virtual detection appliance is created;
the initiating access to the plurality of network devices using the virtual detection device 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 an undetected virtual local area network exists in the at least one virtual local area network, and if so, executing step S3; if not, the detection is ended;
s3: selecting one 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: distributing 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 utilizing 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 the step S2.
3. The method of claim 1, wherein at least two virtual detection devices are created, the plurality of network devices corresponding to at least two virtual local area networks, the at least two virtual detection devices corresponding one-to-one to the at least two virtual local area networks;
the initiating access to the plurality of network devices using the virtual detection device 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 distributing 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 utilizing the IP address of the target virtual detection equipment and the IP address respectively corresponding to the at least one network equipment.
4. A method according to any one of claims 1 to 3, wherein,
the determining the state of each network device according to the access result comprises the following steps: the state of the network equipment corresponding to the successful access initiation result is determined to be online, and the state of the network equipment corresponding to the failed access initiation result is determined to be offline;
And/or the number of the groups of groups,
the method for initiating the access comprises the following steps: at least one of a ping mode, a web server mode, a simple file transfer protocol TFTP mode and a ssh telnet mode.
5. The method of claim 1, further comprising, prior to said determining the physical network topology to be detected:
determining networking schemes to be realized by the plurality of network devices; at least one switch is included in the plurality of network devices;
acquiring a simulated network topology corresponding to the networking scheme; the simulated network topology comprises simulated connection relations among the plurality of network devices and networking information of the network devices;
generating a networking password according to the simulated connection relation and networking information of each network device included in the simulated network topology;
and sending the networking port command to the at least one switch, so that the at least one switch executes the networking password to network 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 simulation connection relationship.
6. The method of claim 5, wherein the physical network topology to be detected is mapped from the simulated network topology.
7. The method of claim 5, wherein the step of determining the position of the probe is performed,
the obtaining the simulated network topology corresponding to the networking scheme includes:
on a pre-established topology editing page, obtaining device packages respectively corresponding to the plurality of network devices, and connecting the device packages to obtain an analog connection relation between the network devices; wherein the device package comprises a graphical element for characterizing the corresponding network device and/or an interface element for characterizing an interface comprised by the corresponding network device; the simulated connection relationship comprises any one or more of the following connection relationships: the connection relation between the graphic elements, the connection relation between the graphic elements and the interface elements and the connection relation between the interface elements;
according to the information of the virtual local area network to which each network device is respectively divided in the networking scheme, each device package on the topology editing page is configured with networking information;
determining the network topology formed on the topology editing page as a simulated network topology corresponding to the networking scheme;
And/or the number of the groups of groups,
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 of the target switch connected with the at least one network device;
determining attribute information of the target switch and information of a virtual local area network to which the at least one network device belongs according to networking information of each network device;
determining a 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 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;
the sending the networking port command to the at least one switch includes: and sending the networking port command of the corresponding switch to the corresponding switch.
8. A network topology status detection apparatus, comprising:
The topology determining unit is used for determining the entity network topology 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;
the state detection unit is used for creating virtual detection equipment belonging to the same virtual local area network as each network equipment according to networking information respectively corresponding to the plurality of network equipment, and initiating access to the plurality of network equipment by utilizing the virtual detection equipment so as to determine the state of each network equipment 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 and a processor, the memory having stored therein a computer program, the processor implementing the method of any of claims 1-7 when the computer program is executed.
10. A computer readable storage medium having stored thereon a computer program which, when executed in a computer, causes the computer to perform the method of any 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 CN113507398A (en) 2021-10-15
CN113507398B true 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)

Families Citing this family (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 (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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
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
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

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7703018B2 (en) * 2003-05-22 2010-04-20 International Business Machines Corporation Apparatus and method for automating the diagramming of virtual local area networks
JP2006033275A (en) * 2004-07-14 2006-02-02 Fujitsu Ltd Loop frame detector and loop frame detection method
US8619579B1 (en) * 2013-03-15 2013-12-31 Extrahop Networks, Inc. De-duplicating of packets in flows at layer 3
TWI647934B (en) * 2017-04-21 2019-01-11 思銳科技股份有限公司 Method and system for simulating a network topology with a physical machine

Patent Citations (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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
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
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
虚拟计算机网络组网平台的设计与实现;李华;孙智勇;吴中福;;计算机应用研究(第08期);全文 *

Also Published As

Publication number Publication date
CN113507398A (en) 2021-10-15

Similar Documents

Publication Publication Date Title
US20220103452A1 (en) Tracing logical network packets through physical network
US9602375B2 (en) Tracing host-originated logical network packets
CN104718723B (en) For the networking in virtual network and the frame of security service
CN107170474A (en) Expansible the storage box, computer implemented method and computer readable storage means
JP2005006303A (en) Virtual network address
US10833952B2 (en) Introducing latency and delay for test or debug purposes in a SAN environment
CN101924699B (en) Message forwarding method, system and provider edge equipment
US20140334498A1 (en) Layer 2 packet switching without look-up table for ethernet switches
US8321559B2 (en) Transparent mode
US10992526B1 (en) Hyper-converged infrastructure networking configuration system
US20170124231A1 (en) Introducing Latency and Delay in a SAN Environment
CN104660469A (en) Layer-2 network connectivity detecting method and associated equipment
CN113507398B (en) Network topology state detection method, device, computing equipment and storage medium
CN110855457A (en) Method and device for generating network model and configuring network
CN108833472B (en) System is established in the connection of cloud host
CN111294268B (en) Method and device for avoiding IP address conflict
CN108089910A (en) The method and apparatus for configuring virtual machine IP address
US20070223530A1 (en) Method and apparatus for managing network configuration, and computer product
CN108768849A (en) Message processing method and device
JP6760086B2 (en) Setting program, setting method, and setting device
US11811609B2 (en) Storage target discovery in a multi-speed and multi-protocol ethernet environment
CN113452567B (en) Networking method and device, computing equipment and storage medium
CN113328897B (en) Method, device, equipment and medium for acquiring running state of network equipment
EP4290819A1 (en) Service deployment method, apparatus, and system
US11182181B2 (en) Virtual environments generator

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