A network simulation method and device

By extracting protocol models and feature information based on network protocols, combined with HPLV technology, network simulation under mirrorless and complex systems is realized, which solves the problems of limited simulation range and insufficient verification in the existing technology, and improves the stability of the simulation system. Unification and verification capabilities.

CN113315647BActive Publication Date: 2024-10-15ALIBABA GROUP HOLDING LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202010962089.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-09-14
Publication Date
2024-10-15
Estimated Expiration
2040-09-14

AI Technical Summary

Technical Problem

Existing network simulation technology is limited by the simulation images provided by manufacturers and cannot effectively simulate without images or complex systems. Moreover, formal verification cannot reflect device characteristics, handle incremental configurations, limited verification scope, and data plane characteristics. Insufficient verification problem.

Method used

Using protocol model generation and feature information extraction based on network protocols, network simulation is achieved by replacing the feature information of the simulated device and the simulated device with logical equivalence. It combines HPLV technology to simplify model establishment and rule verification, and supports data plane feature simulation.

Benefits of technology

It expands the scope of simulation applications, realizes network simulation under mirrorless and complex systems, simplifies model establishment and configuration processing, improves the unification and standardization of simulation systems, and enhances the ability to verify control and data plane characteristics.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113315647B_ABST
    Figure CN113315647B_ABST
Patent Text Reader

Abstract

The embodiment of the present application provides a network simulation method and device, the method comprising: obtaining a protocol model; extracting characteristic information of a preset simulated device according to the protocol model; obtaining a substitute simulated device, and performing network simulation according to the substitute simulated device and the characteristic information. The simulated devices of different manufacturers are unified and standardized by using a protocol model generated based on a network protocol, and the simulated devices can be logically equivalent through the extracted characteristic information of the simulated device and the obtained substitute simulated device, thereby expanding the scope of simulation application, and the simulation of the simulated device can be realized without mirroring and complex systems.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of communication technology, and in particular to a network simulation method and a network simulation device. Background Art

[0002] Cloud computing is a type of distributed computing technology, which means breaking down huge data computing programs into countless small programs through the network "cloud", and then processing and analyzing these small programs through a system composed of multiple servers to obtain results and return them to users. The rise of cloud computing has made the network a basic resource, and has made the network more and more concentrated in the hands of cloud computing service providers. However, operating and maintaining a super-large network brings challenges to cloud computing service providers.

[0003] First, as the complexity of the network increases, new architectures emerge one after another, but the old architectures are not eliminated, resulting in the coexistence of new and old architectures; and in order to reduce costs and reduce single risks, multiple vendors and multiple OSes coexist; second, due to the widespread use of network automation tools, while improving the efficiency of network operation and maintenance, it also puts higher requirements on the security of operations; third, the rise of chaos engineering makes fault drills possible, but due to the particularity of network fault drills, it is very expensive and very dangerous to conduct fault drills in a production environment.

[0004] Network simulation is increasingly being used by network vendors and network operators, and has become an important tool for network R&D and architecture operation and maintenance. Important network operation and maintenance tools include network formal verification and simulation methods. An important condition for high-fidelity simulation is the gap between the simulated device and the real device, which requires the simulated device and the real device to run the same OS and the same software. However, in some cases, such as when the vendor cannot provide a simulation image, or a complex system consisting of several systems, these limit the scope of application of simulation. Summary of the invention

[0005] In view of the above problems, embodiments of the present application are proposed to provide a network simulation method and a corresponding network simulation device that overcome the above problems or at least partially solve the above problems.

[0006] In order to solve the above problems, the present application discloses a network simulation method, which includes:

[0007] Acquire a protocol model; the protocol model is generated according to the network protocol used by the network device;

[0008] Extracting characteristic information of a preset simulated device according to the protocol model;

[0009] A substitute simulation device is obtained, and network simulation is performed according to the substitute simulation device and the characteristic information.

[0010] Optionally, the protocol model is generated in the following manner:

[0011] Obtaining production configuration information of the preset simulated device;

[0012] The production configuration information is parsed to obtain network protocol features, and a protocol model is generated according to the network protocol features.

[0013] Optionally, extracting characteristic information of a preset simulated device according to the protocol model includes:

[0014] The production configuration information of the simulated device is extracted through the protocol model to obtain characteristic information for the simulated device; the characteristic information is information related to the network protocol in the production configuration information.

[0015] Optionally, the acquiring of a substitute simulation device and performing network simulation according to the substitute simulation device and the characteristic information includes:

[0016] generating configuration information of the replacement simulation device according to the characteristic information;

[0017] Loading configuration information of the substitute simulation device into the substitute simulation device;

[0018] Run the preset change plan to complete the simulation of the preset simulated device.

[0019] Optionally, the generating of configuration information for the replacement simulation device according to the characteristic information of the preset simulated device includes:

[0020] Obtaining a configuration template for the alternative simulation device;

[0021] The characteristic information of the preset simulated device is loaded into the configuration template of the substitute simulated device to obtain the configuration information for the simulated substitute device.

[0022] The present application also discloses a network simulation method, which includes:

[0023] Extracting characteristic information of a preset simulated device according to a preset protocol model;

[0024] Network simulation is performed according to the characteristic information of the preset substitute simulation device and the preset simulated device.

[0025] Optionally, the performing network simulation according to the characteristic information of the preset substitute simulation device and the preset simulated device includes:

[0026] According to the characteristic information of the preset simulated device, obtaining configuration information for the preset simulated substitute device;

[0027] Loading the configuration information of the preset replacement simulation device into the preset replacement simulation device;

[0028] A simulation network for connecting a preset simulation device and the preset substitute simulation device is obtained, and the simulation network is started so as to implement network simulation for the preset simulated device through the simulation network.

[0029] The present application also discloses a network simulation device, which includes:

[0030] A protocol model acquisition module, used to acquire a protocol model; the protocol model is generated according to the network protocol used by the network device;

[0031] A feature information extraction module, used to extract feature information of a preset simulated device according to the protocol model;

[0032] The network simulation module is used to obtain a substitute simulation device and perform network simulation according to the substitute simulation device and the characteristic information.

[0033] Optionally, the device further comprises:

[0034] A production configuration information acquisition module, used to acquire the production configuration information of the preset simulated device;

[0035] The protocol model generation module is used to parse the production configuration information to obtain network protocol features, and generate a protocol model according to the network protocol features.

[0036] Optionally, the feature information extraction module includes:

[0037] The feature information extraction submodule is used to extract the production configuration information of the simulated device through the protocol model to obtain feature information for the simulated device; the feature information is information related to the network protocol in the production configuration information.

[0038] Optionally, the network simulation module includes:

[0039] A configuration information generating submodule, used to generate configuration information of the replacement simulation device according to the characteristic information;

[0040] A configuration information loading submodule, used to load the configuration information of the replacement simulation device into the replacement simulation device;

[0041] The change scheme running submodule is used to run the preset change scheme to complete the simulation of the preset simulated device.

[0042] Optionally, the configuration information generation submodule includes:

[0043] A configuration template acquisition unit, used to acquire the configuration template of the replacement simulation device;

[0044] The configuration information unit is used to generate a configuration template for loading the characteristic information of the preset simulated device into the substitute simulated device to obtain configuration information for the simulated substitute device.

[0045] The present application also discloses a network simulation device, which includes:

[0046] A feature information extraction module is used to extract feature information of a preset simulated device;

[0047] The network simulation module is used to perform network simulation according to the characteristic information of the preset replacement simulation device and the preset simulated device.

[0048] Optionally, the network simulation module includes:

[0049] A configuration information generation submodule, used to obtain configuration information for the preset simulation replacement device according to the characteristic information of the preset simulated device;

[0050] A configuration information loading submodule, used to load the configuration information of the preset replacement simulation device into the preset replacement simulation device;

[0051] The network simulation submodule is used to obtain a simulation network for connecting a preset simulation device and the preset replacement simulation device, and start the simulation network so as to implement network simulation for the preset simulated device through the simulation network.

[0052] An embodiment of the present application also discloses an electronic device, including: a processor, a memory, and a computer program stored in the memory and capable of running on the processor, wherein the computer program implements any step of the network simulation method when executed by the processor.

[0053] The embodiment of the present application further discloses a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of any one of the network simulation methods are implemented.

[0054] The embodiments of the present application include the following advantages:

[0055] In an embodiment of the present application, a protocol model can be generated based on a preset network protocol of a simulated device, and characteristic information of the preset simulated device can be extracted according to the generated protocol model, and a substitute simulation device adapted to the characteristic information of the preset simulated device can be obtained, so as to perform network simulation according to the characteristic information of the substitute simulation device and the simulated device. By unifying and standardizing simulated devices of different manufacturers through a protocol model generated based on a network protocol, and logical equivalence of the simulated device can be completed through the extracted characteristic information of the simulated device and the obtained substitute simulation device, the scope of simulation application can be expanded, and simulation of the simulated device can be realized without mirroring and complex systems. BRIEF DESCRIPTION OF THE DRAWINGS

[0056] Figure 1 is a flowchart of the steps of an embodiment of a network simulation method of the present application;

[0057] Figure 2 It is a flowchart of network simulation in an embodiment of the present application;

[0058] Figure 3 is a flowchart of another network simulation method embodiment of the present application;

[0059] Figure 4 is a schematic diagram of a scenario of a network simulation method in an embodiment of the present application;

[0060] Figure 5 It is a structural block diagram of an embodiment of a network simulation device of the present application;

[0061] Figure 6 It is a structural block diagram of another network simulation device embodiment of the present application. DETAILED DESCRIPTION

[0062] In order to make the above-mentioned objects, features and advantages of the present application more obvious and easy to understand, the present application is further described in detail below in conjunction with the accompanying drawings and specific implementation methods.

[0063] From the perspective of network simulation, network simulation is limited by the manufacturer's ability to provide simulation images that simulate the manufacturer's equipment (i.e., the simulated device). If there is no image, the simulated device cannot be simulated, which limits the scope of the simulation.

[0064] In related technologies, formal verification can be used to replace the simulated device, which is formal verification. This method uses mathematical methods to prove that the system is defect-free. Specifically, the first step is to describe the problem to be solved in mathematical language, and then establish a mathematical model for the problem to be solved to define the state that the system should have at different times, and the state that it should not have, and then use these mathematical rules to limit the design and implementation of the system.

[0065] However, this pure software formal verification method may have the following disadvantages:

[0066] First, it is impossible to verify the problems caused by the characteristics of the manufacturer's equipment. Since formal verification uses a unified model to replace the equipment, it cannot reflect the problems caused by the characteristics of the equipment. For example, manufacturer A's processing of remove-private-as is to remove all private as, while manufacturer B's processing is to remove private as until the first one is not private as. If formal verification uses the same model, it cannot handle such a situation well. Of course, formal verification can also improve its accuracy by revising it according to the characteristics of the manufacturer, but such revisions are time-consuming and labor-intensive: revisions need to be made according to different manufacturers and different versions. It can be imagined that the accuracy of formal verification will drop immediately after each equipment upgrade, and it must be constantly revised to improve accuracy;

[0067] Second, the existing formal verification requires full configuration for verification. Network changes usually issue incremental configurations, and the existing methods cannot accurately generate the model changes required for formal verification from incremental configurations. That is, there is no configuration analysis tool that can accurately generate the full configuration of each manufacturer through incremental configuration and original configuration. Therefore, the full configuration needs to be generated manually, which sets up obstacles for fully automated verification;

[0068] Third, formal verification requires the establishment of models for each protocol used in the network and rules for each model. The establishment of each rule also needs to take into account the differences between the characteristics of various manufacturers. The introduction of new protocols requires the addition of models and rules.

[0069] Fourth, formal verification can only verify the control plane and cannot verify some features of the data plane, such as ACL, QoS, ECMP, etc.

[0070] Based on the shortcomings of the above-mentioned pure software formal verification, one of the core ideas of this application is to propose a network simulation technology between pure software formal verification and simulation, namely HPLV (Hybrid Protocol Logical Verification) technology. Like formal verification, it can build a model of the object by abstracting the characteristics of the simulated object, and inject the model into an object that can be simulated, so as to achieve the effect of equivalent replacement. This technology has both the advantages of formal verification in reflecting the characteristics of objects and the advantages of simulation intuition.

[0071] The network simulation method and device of the present application are described below through specific embodiments.

[0072] Reference Figure 1 , shows a flowchart of a network method embodiment of the present application, which may specifically include the following steps:

[0073] Step 101, obtaining a protocol model; the protocol model is generated according to the network protocol used by the network device;

[0074] In one embodiment of the present application, by performing network simulation on a simulated network, a protocol model generated according to a network protocol used by a network device can be obtained, so as to extract characteristic information of the simulated device through the protocol model.

[0075] Network simulation can refer to extracting important features from real devices and replacing them with equivalent ones by using some kind of substitutes. In network simulation, there are two situations in which substitutes are selected. The first situation is that there is no substitute. For example, if you need to simulate a switch of manufacturer A, if manufacturer A does not have the OS and software image of the switch, then replacement and simulation cannot be performed. The second situation is that the replacement can be performed through the formal verification of pure software. At this time, it is necessary to establish a model for the behavior of the network device and use software to calculate the state of the network device after the configuration changes, such as the propagation path of BGP, so as to verify the expectation of a network configuration change.

[0076] However, in the formal verification of pure software, the model established for the behavior of network devices not only needs to establish a protocol model for the network protocol of the network device, but also needs to establish a rule model for the rules of interaction between protocols. In other words, it is necessary to establish multiple models for each protocol used by the network device and the different interaction rules of each protocol. This makes it difficult to easily adjust according to the characteristics of equipment from different manufacturers.

[0077] In a preferred embodiment, the acquired protocol model can be generated by obtaining the production configuration information of the preset simulated device, then parsing the production configuration information to obtain the network protocol characteristics, and generating the protocol model based on the network protocol characteristics. That is, the protocol model generated in the embodiment of the present application is different from the model established in the formal verification. The protocol model only needs to establish a topology and protocol model for the network protocol used by the network device, and there is no need to establish a model of the rules for interaction between protocols.

[0078] The acquired protocol model is determined according to the protocol, and the protocol model can unify and standardize the characteristic differences of different manufacturers for the simulated devices.

[0079] In practical applications, the source of the production configuration information required to generate the protocol model can be specified by the user. A general source of acquisition can be the production configuration stored in a database (such as OSS), that is, the required production configuration can be obtained through the user's own data center.

[0080] Step 102, extracting characteristic information of a preset simulated device according to the protocol model;

[0081] In one embodiment of the present application, after obtaining a protocol model generated according to a network protocol used by a network device, the protocol model can be used to extract feature information of a preset simulated device so as to search for or obtain an adapted replacement simulated device based on the extracted feature information.

[0082] In one embodiment of the present application, step 102 may include the following sub-steps:

[0083] Sub-step S11, extracting the production configuration information of the simulated device through the protocol model to obtain characteristic information for the simulated device; the characteristic information is information related to the network protocol in the production configuration information.

[0084] Specifically, after obtaining the production configuration information of the simulated device, not only can the network protocol used by the device be parsed from the obtained production configuration information and a protocol model can be generated for the network protocol, but the production configuration information can also be extracted to obtain feature information of the simulated device. The extracted feature information may be information related to the parsed network protocol.

[0085] Among them, the production configuration information of the simulated device may include device ports, network protocols (such as BGP, ISIS, OSPF, and Static Route, etc.), routing policies, ACLs, etc. As an example, assuming that the network protocol used by the simulated device is the BGP protocol, since the configurations of the BGP protocol in different manufacturers are different, a protocol model can be first generated for the BGP protocol, that is, the BGP configurations of different manufacturers are abstracted through the generated protocol model, and then the important characteristics of the BGP configuration are extracted through the protocol model, such as the BGP AS, BGP neighbors, and the IP and attributes (EBGP / IBGP) of each neighbor required to describe BGP. After extracting the above characteristics, the above characteristics can be used to express the role of the simulated device in the network without having to worry about which manufacturer the simulated device is from.

[0086] Step 103: Acquire a substitute simulation device, and perform network simulation according to the substitute simulation device and the characteristic information.

[0087] After extracting the characteristic information of the simulated device using the generated protocol model, a substitute simulated device that replaces the simulated device can be obtained, so as to perform network simulation according to the characteristic information of the substitute simulated device and the simulated device.

[0088] Among them, the alternative simulation device can be used to replace the simulated device without an image. In this case, the alternative simulation device must have a simulation image. In addition to having a simulation image, the following conditions must also be met. For example, the alternative simulation device has a sufficient number of ports and can provide a number of ports that is equivalent to the order of magnitude of the original device ports; the routing protocol used by the alternative simulation device is mature and rich, and can cover the protocol used by the simulated device; the alternative simulation device takes up less resources (referring to CPU or memory) and can simulate the most devices with the least servers.

[0089] In one embodiment of the present application, step 103 may include the following sub-steps:

[0090] Sub-step S21, generating configuration information of the replacement simulation device according to the characteristic information;

[0091] Specifically, network simulation is performed based on the acquired characteristic information of the alternative simulation device and the simulated device, which is mainly manifested in loading the characteristic information of the simulated device into the alternative simulation device to obtain a substitute simulation device that is logically equivalent to the simulated device, so as to replace the simulated device without a mirror with the alternative simulation device with a mirror for network simulation.

[0092] In order to obtain a substitute simulated device that is logically equivalent to the simulated device, it is necessary to generate configuration information for the substitute simulated device based on the feature information of the simulated device.

[0093] In actual applications, the feature information of the simulated device extracted through the protocol model can be saved as a json file, and the configuration template of the alternative simulated device can be obtained, and the feature information of the preset simulated device can be loaded into the configuration template of the alternative simulated device to obtain the configuration information for the simulated alternative device.

[0094] As an example, assuming that Arista VEOS is used as a substitute simulation device to replace the simulated device, you can first obtain the json file that extracts and stores the feature information of the protocol model, and then you can insert the parameters of the json file into the Arista configuration template to generate the configuration of Arista VEOS. Among them, the parameters of the json file refer to the instantiation of the model. Taking BGP as an example, the parameters in the json file can include BGP AS: 15169, neighbor 1 is EBGP, IP address is 10.1.1.1, etc.

[0095] Sub-step S22, loading the configuration information of the replacement simulation device into the replacement simulation device;

[0096] After generating the configuration information of the substitute simulation device based on the characteristic information of the simulated device, the configuration information of the substitute simulation device can be loaded into the substitute simulation device. As an example, any simulation network for simulation can be selected, and a common method can be used to network the simulation device and the substitute simulation device. After the network connection is completed, the selected simulation network can be started, and then the configuration information can be loaded into the simulation network so as to perform network simulation on the simulated device through the simulation network.

[0097] Among them, the simulation device can be located in the network simulation system or the network grayscale operation and maintenance system, and can refer to the container docker or virtual machine VM used by the simulation system, which is used to replace the real physical device being simulated. The simulation device can be from a different manufacturer than the original physical device (i.e. the simulated device). For example, if the original manufacturer B cannot provide the simulation image due to various reasons, the simulation can be replaced by the simulation image of manufacturer A. The configuration of B needs to be converted to the configuration of A before the configuration can be imported. The purpose of sending the configuration information of the replacement simulation device is to achieve equivalent replacement of the protocol.

[0098] Sub-step S23, running the preset change plan to complete the simulation of the preset simulated device.

[0099] In one embodiment of the present application, after selecting a simulation network and networking the replacement simulation device with the simulation device, a preset change plan can be run to verify the logical interactions at multiple protocol levels, that is, the verification work required by the user can be performed in the simulation environment, such as running the change plan.

[0100] As an example, the running change plan can be a routing upgrade plan. Assuming that there is a router device running an old OS version, in order to avoid security risks, the router device OS needs to be upgraded. Since there is a large amount of traffic passing through, the traffic needs to be exported first. When there is no traffic, the protocol with other devices is disconnected before the upgrade can be performed safely. After the upgrade, a protocol connection and traffic diversion need to be established.

[0101] It should be noted that the change plan can be the entire operation for routing upgrade mentioned above, or it can be any change plan that needs to be verified or the impact assessment for various fault scenarios by inputting device configuration and network topology information, and simulating routing protocols to calculate forwarding tables. The change plan can be determined according to actual conditions, and the embodiments of the present application are not limited to this.

[0102] Specifically, refer to Figure 2 , shows a flow chart of network simulation in an embodiment of the present application. The technology used in the network simulation is HPLV. First, the production configuration information of the simulated network can be obtained so as to establish a topology and protocol model through the network protocol in the production configuration information. Then, the configuration of the substitute simulation device can be generated according to the protocol model, and the simulation device in the network simulation system can be started, and the configuration of the substitute simulation device can be issued. Finally, the change plan can be run to verify any change plan or evaluate the impact of various failure scenarios. When the network products are relatively complex and the manufacturers have a large gap in virtualization capabilities, resulting in some devices not having simulation images provided by the manufacturers, in order to prevent the failure of the entire network simulation project due to the lack of the OS image of the device manufacturer, the network device model can be abstracted from the manufacturer's device without an image, and then replaced with a device with a simulation image and logically equivalent, that is, by extracting the characteristics of the simulated device and finding a substitute simulation device, the simulated device can be equivalently simulated, and through simulation and HPLV technology, the coverage ratio of network grayscale or drill equipment can reach 100%.

[0103] It should be noted that if the simulated device has a mirror, there is no need to establish a protocol model for the simulated device, extract the characteristics of the simulated device according to the protocol model, and generate the configuration of the replacement simulated device. That is, the simulated device can be directly started to verify the change plan.

[0104] In a preferred embodiment, the above-mentioned HPLV technology can be applied to a network simulation system or a network grayscale operation and maintenance system. The network simulation system can be put into the cloud and provide SAAS services, or a hybrid mode can be used to use the user's own data center to realize the productization of HPLV technology.

[0105] In the embodiment of the present application, HPLV, a network simulation technology between pure software formal verification and simulation, is adopted. The protocol model and feature information extraction established based on the protocol of the network device can, to a certain extent, reflect the characteristics of equipment from different manufacturers. Because HPLV is only used when there is no simulation image, in most cases the image provided by the manufacturer is used, so the advantage of high-fidelity simulation can also be retained.

[0106] In the embodiment of the present application, for the formal verification of pure software, each step requires providing a complete full configuration of the device. For the HPLV technology between the formal verification of pure software and simulation, its network simulation system only needs a full configuration during the initial configuration initialization. Subsequently, whether it is a full configuration or an incremental configuration, it can be issued according to the original habits of network engineers, that is, there is no requirement for full configuration.

[0107] In the embodiment of the present application, for the formal verification of pure software, it is necessary not only to establish a model of the protocol, but also to establish a model of the rules for interaction between protocols, while HPLV only needs to parse the configuration to establish a model, that is, only need to establish a model of the protocol, no need to establish a model of the rules, because only one configuration analysis is required, which greatly simplifies the difficulty of model establishment. For example, for a two-node BGP network, HPLV only needs to establish the topology of the two nodes, the BGP model, and the interaction between protocols is performed by the simulation device; formal verification not only needs to establish the topology of the two nodes and the BGP model, but also needs to establish routing rules, such as the route from node A cannot be propagated to node B.

[0108] In the embodiment of the present application, the simulation device used by the network simulation system in the HPLV technology is a vendor VM / Docker with data plane functions, which can simulate some characteristics of the data plane to a certain extent, such as ACL, QOS, ECMP, etc. When the user verifies the solution, in addition to checking the functions of the control plane (routing protocol), the functions of the data plane (ACL, QOS) can also be checked, so that the user can operate the simulated network completely according to their own operations in the real environment, and whether it is manual operation or automated operation, network engineers can use the same manual operation in the real network or the same peripheral support system online to operate the simulated network.

[0109] In an embodiment of the present application, a protocol model can be generated based on a preset network protocol of a simulated device, and characteristic information of the preset simulated device can be extracted according to the generated protocol model, and a substitute simulation device adapted to the characteristic information of the preset simulated device can be obtained, so as to perform network simulation according to the characteristic information of the substitute simulation device and the simulated device. By unifying and standardizing simulated devices of different manufacturers through a protocol model generated based on a network protocol, and logical equivalence of the simulated device can be completed through the extracted characteristic information of the simulated device and the obtained substitute simulation device, the scope of simulation application can be expanded, and simulation of the simulated device can be realized without mirroring and complex systems.

[0110] Reference Figure 3 , shows a flowchart of another network simulation method embodiment of the present application, which may specifically include the following steps:

[0111] Step 301, extracting characteristic information of a preset simulated device according to a preset protocol model;

[0112] In one embodiment of the present application, feature information of a preset simulated device can be extracted according to a preset protocol model, wherein the preset protocol model can be a protocol model generated according to the network protocol used by the network device. Specifically, the preset protocol model can be a protocol model generated according to the network protocol features obtained by parsing the production configuration information of the preset simulated device, and there is no need to establish rules for interaction between protocols.

[0113] Step 302: Perform network simulation according to the characteristic information of the preset replacement simulation device and the preset simulated device.

[0114] In one embodiment of the present application, a protocol model may be used to extract characteristic information of a preset simulated device, so as to search or obtain an adapted substitute simulated device according to the extracted characteristic information, and perform network simulation according to the adapted substitute simulated device and the preset simulated device.

[0115] In one embodiment of the present application, step 302 may include the following sub-steps:

[0116] Sub-step S31, obtaining configuration information for the preset simulation substitute device according to the characteristic information of the preset simulated device;

[0117] Sub-step S32, loading the configuration information of the preset replacement simulation device into the preset replacement simulation device;

[0118] In actual applications, the characteristic information of the preset simulated device can be loaded into the configuration template of the preset replacement simulation device. After obtaining the configuration information for the preset simulation replacement device, the obtained configuration information can be loaded into the preset replacement simulation device, and the change plan can be run through any simulation network used to connect the preset simulation device and the preset replacement simulation device. After the simulated device without a mirror is replaced with the replacement simulation device, the verification work required by the user can be performed in the simulation environment corresponding to the started simulation network.

[0119] Sub-step S33, obtaining a simulation network for connecting a preset simulation device and the preset substitute simulation device, and starting the simulation network, so as to implement network simulation for the preset simulated device through the simulation network.

[0120] Among them, the above-mentioned started simulation network can be any simulation network that can be used to connect the preset simulation device and the preset replacement simulation device and complete the verification work, or it can be a reconstructed simulation network used to connect the preset simulation device and the preset replacement simulation device and complete the verification work, so as to realize logical interaction at multiple protocol levels through the simulation network and the networking connection between the preset simulation device and the preset replacement simulation device.

[0121] In actual applications, the process of realizing logical interaction at multiple protocol levels can be to obtain a simulation image of a simulation device and an alternative image of a substitute simulation device, and then set a first device virtual sandbox for the simulation device and a second device virtual sandbox for the substitute simulation device according to the simulation image and the alternative image, and then construct a simulation network for connecting the first device virtual sandbox and the second device virtual sandbox.

[0122] In one embodiment of the present application, in order to perform network simulation on a non-mirrored preset simulated device and verify the change plan, after using HPLV technology to equivalently replace the non-mirrored simulated device with an alternative simulated device, the simulated device and the alternative simulated device can be connected to the constructed virtual simulation network through the network simulation system.

[0123] Reference Figure 4 , shows a scenario diagram of the network simulation method in the embodiment of the present application. The scenario can be that there is a router device running an outdated OS version. In order to avoid potential safety hazards, the OS of the router device needs to be upgraded. Since a large amount of traffic passes through, the traffic needs to be exported first. When there is no traffic, the protocol with other devices is disconnected before the upgrade can be performed safely. After the upgrade, a protocol connection and traffic diversion need to be established.

[0124] It can be assumed that the device that needs to be upgraded is R3 from manufacturer B, while the manufacturer of other devices in the network (i.e., R1, R2, and R4) is A, and R3 from manufacturer B has a mirror image, while the device from manufacturer A does not have a mirror image. In order to simulate this change plan, manufacturer C with a mirror image can be used to equivalently replace manufacturer A, and the mirror image of manufacturer B can be used to simulate R3 to establish a simulated network that is the same as the original physical network. That is, the simulated devices can be routers R1, R2, and R4 without mirror images, and the obtained replacement simulated devices can be router devices from manufacturer C with mirror images.

[0125] In a specific implementation, the HPLV process may include obtaining the production configuration information of R1, R2, R3 and R4. Since the manufacturer of R1, R2 and R4 is A and there is no image, the configuration of the simulated devices R1, R2 and R4 can be parsed at this time, and the topology and protocol models of R1, R2 and R4 can be established; then the parameters of the characteristic information can be extracted from the production configuration information of R1, R2 and R4 through the established protocol model, and the configuration information of the logically equivalent manufacturer C can be generated through the protocol model to obtain the replacement simulation devices R1', R2' and R4'; at this time, the simulation network composed of the simulation images of manufacturers B and C can be started, and after upgrading the simulation device R3 of manufacturer B, the protocol status before and after the upgrade can be checked in R1, R2 and R4 to verify whether it meets the expectations, so as to verify the change plan of the upgraded router. Among them, the simulation network composed of the simulation images of manufacturers B and C can realize the virtual network connection of the simulation network through the connection technology based on TCP, and the simulation images of manufacturers B and C can be connected according to the general networking.

[0126] In an embodiment of the present application, a protocol model can be generated based on a preset network protocol of a simulated device, and characteristic information of the preset simulated device can be extracted according to the generated protocol model, and a substitute simulation device adapted to the characteristic information of the preset simulated device can be obtained, so as to perform network simulation according to the characteristic information of the substitute simulation device and the simulated device. By unifying and standardizing simulated devices of different manufacturers through a protocol model generated based on a network protocol, and logical equivalence of the simulated device can be completed through the extracted characteristic information of the simulated device and the obtained substitute simulation device, the scope of simulation application can be expanded, and simulation of the simulated device can be realized without mirroring and complex systems.

[0127] It should be noted that, for the method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the embodiments of the present application are not limited by the described order of actions, because according to the embodiments of the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily required by the embodiments of the present application.

[0128] Reference Figure 5 , shows a structural block diagram of an embodiment of a network simulation device of the present application, which may specifically include the following modules:

[0129] The production configuration information acquisition module 501 is used to acquire the production configuration information of the preset simulated device;

[0130] The protocol model generating module 502 is used to parse the production configuration information to obtain network protocol features, and generate a protocol model according to the network protocol features;

[0131] The protocol model acquisition module 503 is used to acquire a protocol model; the protocol model is generated according to the network protocol used by the network device;

[0132] A feature information extraction module 504 is used to extract feature information of a preset simulated device according to the protocol model;

[0133] The network simulation module 505 is used to obtain a substitute simulation device and perform network simulation according to the substitute simulation device and the feature information. In one embodiment of the present application, the feature information extraction module 504 may include the following submodules:

[0134] The feature information extraction submodule is used to extract the production configuration information of the simulated device through the protocol model to obtain feature information for the simulated device; the feature information is information related to the network protocol in the production configuration information.

[0135] In one embodiment of the present application, the network simulation module 505 may include the following submodules:

[0136] A configuration information generating submodule, used to generate configuration information of the replacement simulation device according to the characteristic information;

[0137] A configuration information loading submodule, used to load the configuration information of the replacement simulation device into the replacement simulation device;

[0138] The change scheme running submodule is used to run the preset change scheme to complete the simulation of the preset simulated device.

[0139] In one embodiment of the present application, the configuration information generation submodule may include the following units:

[0140] A configuration template acquisition unit, used to acquire the configuration template of the replacement simulation device;

[0141] The configuration information unit is used to generate a configuration template for loading the characteristic information of the preset simulated device into the substitute simulated device to obtain configuration information for the simulated substitute device.

[0142] Reference Figure 6 , shows a structural block diagram of another network simulation device embodiment of the present application, which may specifically include the following modules:

[0143] The feature information extraction module 601 is used to extract the feature information of the preset simulated device;

[0144] The network simulation module 602 is used to perform network simulation according to the characteristic information of the preset replacement simulation device and the preset simulated device.

[0145] In one embodiment of the present application, the network simulation module 502 may include the following submodules:

[0146] A configuration information generation submodule, used to obtain configuration information for the preset simulation replacement device according to the characteristic information of the preset simulated device;

[0147] A configuration information loading submodule, used to load the configuration information of the preset replacement simulation device into the preset replacement simulation device;

[0148] The network simulation submodule is used to obtain a simulation network for connecting a preset simulation device and the preset replacement simulation device, and start the simulation network so as to implement network simulation for the preset simulated device through the simulation network.

[0149] As for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0150] The present application also provides an electronic device, including:

[0151] It includes a processor, a memory, and a computer program stored in the memory and capable of running on the processor. When the computer program is executed by the processor, the various processes of the above-mentioned network simulation method embodiment are implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.

[0152] The embodiment of the present application also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the various processes of the above-mentioned network simulation method embodiment are implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.

[0153] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.

[0154] Those skilled in the art will appreciate that the embodiments of the present application can be provided as methods, devices, or computer program products. Therefore, the present application can adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application can adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0155] The embodiments of the present application are described with reference to the flowcharts and / or block diagrams of the methods, terminal devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing terminal device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing terminal device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0156] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing terminal device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured product including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0157] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal device so that a series of operating steps are executed on the computer or other programmable terminal device to produce a computer-implemented process, thereby providing instructions for executing on the computer or other programmable terminal device to implement the process. Figure 1A process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.

[0158] Although the preferred embodiments of the present application have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the embodiments of the present application.

[0159] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or terminal device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or terminal device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or terminal device including the elements.

[0160] The network simulation method and the network simulation device provided by the present application are introduced in detail above. The principles and implementation methods of the present application are explained in detail using specific examples. The description of the above embodiments is only used to help understand the method of the present application and its core idea. At the same time, for those skilled in the art, according to the idea of ​​the present application, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.

Claims

1. A network simulation method, characterized in that: The method comprises: Acquire a protocol model; the protocol model is generated according to the network protocol used by the network device; Extracting characteristic information of a preset simulated device according to the protocol model; Acquire a substitute simulation device, and perform network simulation according to the substitute simulation device and the characteristic information; The step of obtaining a substitute simulation device and performing network simulation according to the substitute simulation device and the characteristic information includes: generating configuration information of the replacement simulation device according to the characteristic information; Loading configuration information of the substitute simulation device into the substitute simulation device; Run the preset change plan to complete the simulation of the preset simulated device.

2. The method according to claim 1, characterized in that: The protocol model is generated in the following way: Obtaining production configuration information of the preset simulated device; The production configuration information is parsed to obtain network protocol features, and a protocol model is generated according to the network protocol features.

3. The method according to claim 2, characterized in that The extracting characteristic information of the preset simulated device according to the protocol model includes: The production configuration information of the simulated device is extracted through the protocol model to obtain characteristic information for the simulated device; the characteristic information is information related to the network protocol in the production configuration information.

4. The method according to claim 1, characterized in that: The generating of configuration information for the replacement simulation device according to the characteristic information of the preset simulated device includes: Obtaining a configuration template for the alternative simulation device; The characteristic information of the preset simulated device is loaded into the configuration template of the substitute simulated device to obtain the configuration information for the substitute simulated device.

5. A network simulation method, characterized in that: The method comprises: Extracting characteristic information of a preset simulated device according to a preset protocol model; Performing network simulation according to the characteristic information of the preset substitute simulation device and the preset simulated device; The performing of network simulation according to the characteristic information of the preset substitute simulation device and the preset simulated device includes: According to the characteristic information of the preset simulated device, configuration information for the preset substitute simulated device is obtained; Loading the configuration information of the preset replacement simulation device into the preset replacement simulation device; A simulation network for connecting a preset simulation device and the preset substitute simulation device is obtained, and the simulation network is started so as to implement network simulation for the preset simulated device through the simulation network.

6. A network simulation device, characterized in that: The device comprises: A protocol model acquisition module, used to acquire a protocol model; the protocol model is generated according to the network protocol used by the network device; A feature information extraction module, used to extract feature information of a preset simulated device according to the protocol model; A network simulation module, used for acquiring a substitute simulation device and performing network simulation according to the substitute simulation device and the characteristic information; Wherein, the network simulation module includes: A configuration information generating submodule, used to generate configuration information of the replacement simulation device according to the characteristic information; A configuration information loading submodule, used to load the configuration information of the replacement simulation device into the replacement simulation device; The change scheme running submodule is used to run the preset change scheme to complete the simulation of the preset simulated device.

7. The device according to claim 6, characterized in that The device also includes: A production configuration information acquisition module, used to acquire the production configuration information of the preset simulated device; The protocol model generation module is used to parse the production configuration information to obtain network protocol features, and generate a protocol model according to the network protocol features.

8. The device according to claim 6, characterized in that The feature information extraction module comprises: The feature information extraction submodule is used to extract the production configuration information of the simulated device through the protocol model to obtain feature information for the simulated device; the feature information is information related to the network protocol in the production configuration information.

9. The device according to claim 6, characterized in that The configuration information generation submodule includes: A configuration template acquisition unit, used to acquire the configuration template of the replacement simulation device; The configuration information unit is used to generate a configuration template for loading the characteristic information of the preset simulated device into the substitute simulated device to obtain configuration information for the substitute simulated device.

10. A network simulation device, characterized in that: The device comprises: A feature information extraction module is used to extract feature information of a preset simulated device; A network simulation module, used for performing network simulation according to the characteristic information of the preset substitute simulation device and the preset simulated device; Wherein, the network simulation module includes: A configuration information generating submodule, used to obtain configuration information for the preset replacement simulation device according to the characteristic information of the preset simulated device; A configuration information loading submodule, used to load the configuration information of the preset replacement simulation device into the preset replacement simulation device; The network simulation submodule is used to obtain a simulation network for connecting a preset simulation device and the preset replacement simulation device, and start the simulation network so as to implement network simulation for the preset simulated device through the simulation network.

11. An electronic device, characterized in that: include: A processor, a memory, and a computer program stored in the memory and capable of running on the processor, wherein the computer program implements the steps of the network simulation method according to any one of claims 1 to 5 when executed by the processor.

12. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the network simulation method according to any one of claims 1 to 5 are implemented.