Network simulation method, device, equipment and computer-readable storage medium
By generating a simulated network on the network management device and making changes, and using the simulation engine to evaluate connectivity, the problem of inability to evaluate the impact before the network change is solved, and the impact of pre-evaluation of the change on the business is achieved, avoiding business failures and improving operation and maintenance efficiency is improved .
Patent Information
- Application Number
- CN202010989453.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-09-18
- Publication Date
- 2024-11-15
- Estimated Expiration
- 2040-09-18
AI Technical Summary
During the network operation and maintenance process, it is impossible to accurately evaluate the impact of network changes on existing services, resulting in business failures that may occur after the change, affecting network continuity and operation and maintenance efficiency.
By collecting current network data on the network management device, generating a simulated network, and changing it based on the simulation change instructions, using the simulation engine to obtain connectivity simulation results, pre-evaluate the impact of network changes on services, and ensure that the current network operation is not changed without changing the current network operation Change operation under the circumstances.
It realizes the discovery of the service reachability and message forwarding of the changed service in advance before the network change, avoids business failures, improves operation and maintenance efficiency, and ensures network continuity.
Smart Images

Figure CN114285757B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of network operation and maintenance technology, and in particular to a network simulation method, device, equipment and computer-readable storage medium. Background Art
[0002] During network operation and maintenance, if users need to make certain changes to the network, such as changing device configurations, changing network topology, or taking devices online and offline, they cannot accurately assess the impact of these changes before implementing them, especially whether they affect the mutual access of key services in the network.
[0003] Therefore, a network simulation method is needed to evaluate the impact of network changes on existing network services before the changes are implemented, so as to avoid business failures after the network changes. Summary of the invention
[0004] The present application provides a network simulation method, apparatus, device and computer-readable storage medium to solve the problems provided by related technologies. The technical solutions are as follows:
[0005] In a first aspect, a network simulation method is provided. Taking a network management device executing the method as an example, the network management device collects network data of the current network. Afterwards, the network management device generates a simulated network based on the network data of the current network. When there is a network change requirement, the simulated network can be changed based on the simulation change instruction to obtain the data of the changed simulated network. The network management device obtains a connectivity simulation result based on the data of the changed simulated network and the connectivity simulation input parameters.
[0006] By collecting the network data of the current network, restoring and generating an independent simulation network, implementing changes in the simulation network, and using the data generated by the changed simulation network and the connectivity simulation input parameters for simulation, it is possible to pre-evaluate the impact of network changes on network services without changing the current network operation. In addition, before implementing the network change operation, it is possible to find out in advance whether the forwarding of specific messages in the network after the change is implemented is in line with expectations, and at the same time, it has no impact on the forwarding of normal business messages in the network.
[0007] In one possible implementation, connectivity simulation results are obtained based on the changed data of the simulation network and the connectivity simulation input parameters, including: importing the changed data of the simulation network and the connectivity simulation input parameters into a simulation engine, the simulation engine being used to obtain connectivity simulation results based on the changed data of the simulation network and the connectivity simulation input parameters; and obtaining connectivity simulation results from the simulation engine.
[0008] By importing the data of the changed simulation network and the connectivity simulation input parameters into the simulation engine, the simulation engine obtains the connectivity simulation results, thereby achieving the impact of network changes on network service accessibility without changing the current network operation.
[0009] In one possible implementation, the connectivity simulation input parameters include a source IP address and a destination IP address, and the connectivity simulation results are obtained based on the data of the changed simulation network and the connectivity simulation input parameters, including: generating a routing table entry based on the data of the changed simulation network; and determining the connectivity simulation result between the source address and the destination IP address based on the routing table entry and the device configuration data in the data of the changed simulation network.
[0010] By collecting the network data of the current network, restoring and generating an independent simulation network, implementing changes in the simulation network, and using the network management data generated by the simulation network, that is, the data of the changed simulation network and the connectivity simulation input parameters to import into the simulation engine, the reachability and path between IPs in the network are calculated, so as to achieve the effect of network changes on network service reachability in advance without changing the current network operation. In addition, the method provided in the embodiment of the present application can also find out in advance whether the forwarding of a specific message in the network after the change is implemented is in line with expectations before implementing the network change operation, and at the same time has no effect on the forwarding of normal business messages in the network.
[0011] In a second aspect, a network simulation device is provided, the device comprising:
[0012] The acquisition module is used to collect network data of the current network;
[0013] A generation module, used for generating a simulation network according to the network data of the current network;
[0014] A change module, used to change the simulation network based on the simulation change instruction and obtain data of the changed simulation network;
[0015] The simulation module is used to obtain connectivity simulation results according to the changed simulation network data and connectivity simulation input parameters.
[0016] In one possible implementation, the simulation module is used to import the changed simulation network data and connectivity simulation input parameters into the simulation engine, and the simulation engine is used to obtain connectivity simulation results based on the changed simulation network data and connectivity simulation input parameters; the connectivity simulation results are obtained from the simulation engine.
[0017] In one possible implementation, the connectivity simulation input parameters include a source Internet Protocol IP address and a destination IP address, and the simulation module is used to generate a routing table entry based on the data of the changed simulation network; and determine the connectivity simulation result between the source IP address and the destination IP address based on the routing table entry and the device configuration data in the data of the changed simulation network.
[0018] In a possible implementation of the first aspect or the second aspect, the connectivity simulation result includes a first connectivity simulation result and a mutual access path between a source IP address and a destination IP address, and the first connectivity simulation result is used to indicate that the source IP address and the destination IP address are reachable; or, the connectivity simulation result includes a second connectivity simulation result and interruption location information, and the second connectivity simulation result is used to indicate that the source IP address and the destination IP address are unreachable.
[0019] In a possible implementation of the first aspect or the second aspect, the simulation change instruction includes at least one of an instruction for adding a new network device, an instruction for deleting a network device, an instruction for adding a new link, an instruction for deleting a link, an instruction for modifying the interface of a link, and an instruction for changing a device configuration.
[0020] In a possible implementation of the first aspect or the second aspect, the network data of the current network includes the network topology data, device configuration data and device type data of the current network; the data of the changed simulated network includes the network topology data, device configuration data and device type data of the changed simulated network.
[0021] A network device is also provided, comprising: a memory and a processor, wherein at least one instruction is stored in the memory, and the at least one instruction is loaded and executed by the processor, so that the network device implements any of the above-mentioned network simulation methods.
[0022] A computer-readable storage medium is also provided, wherein at least one instruction is stored in the storage medium, and the instruction is loaded and executed by a processor to implement any of the network simulation methods described above.
[0023] Another communication device is provided, the device comprising: a transceiver, a memory and a processor. The transceiver, the memory and the processor communicate with each other through an internal connection path, the memory is used to store instructions, the processor is used to execute the instructions stored in the memory to control the transceiver to receive signals and control the transceiver to send signals, and when the processor executes the instructions stored in the memory, the processor executes the method in the first aspect or any possible implementation of the first aspect.
[0024] As an exemplary embodiment, the number of the processors is one or more, and the number of the memories is one or more.
[0025] As an exemplary embodiment, the memory may be integrated with the processor, or the memory may be provided separately from the processor.
[0026] In the specific implementation process, the memory can be a non-transitory memory, such as a read-only memory (ROM), which can be integrated with the processor on the same chip or can be set on different chips respectively. The embodiments of the present application do not limit the type of memory and the setting method of the memory and the processor.
[0027] A computer program (product) is provided, the computer program (product) comprising: a computer program code, when the computer program code is executed by a computer, the computer is enabled to execute the methods in the above aspects.
[0028] A chip is provided, comprising a processor, for calling and executing instructions stored in a memory from the memory, so that a communication device equipped with the chip executes the methods in the above aspects.
[0029] Another chip is provided, comprising: an input interface, an output interface, a processor and a memory, wherein the input interface, the output interface, the processor and the memory are connected via an internal connection path, the processor is used to execute the code in the memory, and when the code is executed, the processor is used to execute the methods in the above aspects. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] Figure 1 A schematic diagram of an application scenario provided for an embodiment of the present application;
[0031] Figure 2 A schematic diagram of another application scenario provided for an embodiment of the present application;
[0032] Figure 3 A schematic diagram of the structure of a network device provided in an embodiment of the present application;
[0033] Figure 4 A flow chart of a network simulation method provided in an embodiment of the present application;
[0034] Figure 5 A schematic diagram of the network simulation method flow interaction provided in an embodiment of the present application;
[0035] Figure 6 A schematic diagram of a network simulation process provided in an embodiment of the present application;
[0036] Figure 7 A schematic diagram of the structure of a network simulation device provided in an embodiment of the present application;
[0037] Figure 8 A schematic diagram of the structure of a network device provided in an embodiment of the present application;
[0038] Fig. 9 A schematic diagram of the structure of a network device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0039] The terms used in the implementation section of the present application are only used to explain the embodiments of the present application and are not intended to limit the present application.
[0040] In the process of network operation and maintenance, some network change scenarios are often involved. For example, users need to implement relevant change operations in the network, including device configuration, network topology, and even device online and offline. If certain changes need to be made to the network, it is impossible to accurately assess the impact before implementing these network changes, especially whether it affects the mutual access of key services in the network. Then, after the network change is implemented, some services in the network will be affected, such as services that could access each other before the network change cannot access each other after the network change, the forwarding path is optimal before the network change, and the forwarding path has a detour after the network change, etc.
[0041] In the actual operation and maintenance process, for the scenario of network changes, generally we can only wait until the change is implemented to see whether the business reports a fault to evaluate whether the change is in line with expectations. However, after the business fails and reports a fault, the network administrator will conduct troubleshooting, which will affect the continuous operation of the business. If the problem cannot be solved in the short term, the change needs to be rolled back to check the problem and then re-perform the change operation at an appropriate time, which puts the network operation and maintenance personnel in an extremely passive situation and reduces the operation and maintenance efficiency.
[0042] In this regard, the embodiment of the present application provides a network simulation method, which can evaluate the impact of the change on the current network services before the network change is implemented, and avoid the situation where the service failure occurs after the network change. Figure 1 Take the scenario shown as an example. Figure 1 The network simulation system shown in the figure includes an SDN controller 001 and a forwarder 002. The SDN controller 001 and the forwarder 002 are connected via an interconnection link 003. Figure 1 The physical network shown on the left is the current network, which includes 6 forwarders 002 and 7 interconnection links 003. After generating the simulation network according to the network data of the physical network, the simulation change instruction is executed to obtain Figure 1 The simulation synthesis network shown on the right is the changed simulation network. Figure 1It is not difficult to see from the simulated network shown on the right that a new forwarder 002 is added, VM1 and VM2 are configured for the existing forwarder 002, and one of the existing links is offline.
[0043] Among them, the structure of SDN controller 001 is as follows Figure 2 As shown, the SDN controller 001 includes a central processing unit (CPU), a random access memory (RAM), a FLASH memory, and an Ethernet interface. The CPU is the control unit of the SDN controller 001, and the running program and static configuration parameters are stored in the FLASH. The code and data executed when the program is running are placed in the RAM connected to the CPU. The Ethernet interface completes the Ethernet connection of the optical or electrical port between devices and is responsible for sending and receiving messages.
[0044] Next, the method provided in the embodiment of the present application is described by taking the SDN controller 001 as an example of a network management device for executing the method provided in the embodiment of the present application. Figure 3 The network simulation method provided in the embodiment of the present application includes the following processes.
[0045] 301. The network management device collects network data of the current network.
[0046] Exemplarily, the network data of the current network includes the network topology data, device configuration data and device type data of the current network. The embodiments of the present application do not limit the content of the network topology data, device configuration data and device type data of the current network. Exemplarily, the network topology data of the current network includes but is not limited to the interface state change data of the current network, the network topology identifier, the number of nodes in the network topology and the connection relationship, etc. The device configuration data of the current network includes but is not limited to the interface configuration data, network and protocol configuration, etc. of the devices of the current network. The device type data of the current network includes but is not limited to the device model and device type of the current network, etc.
[0047] The embodiments of the present application also do not limit the manner in which the network device collects network data of the current network. For example, each device in the current network actively reports device configuration data and device type data, and the network device collects the device configuration data and device type data of the current network, and obtains network topology data based on the device configuration data and device type data. Alternatively, the network device issues a data collection instruction to each device in the current network, so that each device in the current network reports device configuration data and device type data based on the data collection instruction.
[0048] Regardless of the method used to collect the network data of the current network, since the network data of the current network belongs to operational data, that is, data being used in the current network, if network changes are required, such as changing device configurations, changing network structures, etc., the services of the current network will be affected. In this regard, the method provided in the embodiment of the present application first evaluates the impact of the changes on the services in the current network before the network changes are implemented. In addition, in order not to affect the services of the current network, the method provided in the embodiment of the present application does not directly change the current network, but copies the network data of the current network to obtain a copy of the network data, thereby performing network simulation based on the copy of the network data.
[0049] In an embodiment of the present application, the network data of the current network and the copy of the network data are stored separately. For example, the network data of the current network is stored in a running database, and the copy of the network data is stored in a simulation database.
[0050] 302. The network management device generates a simulated network according to the network data of the current network.
[0051] Since the copy of the network data is obtained by copying the network data of the current network, the copy of the network data is consistent with the network data of the current network. By generating a simulated network based on the copy of the network data, the network environment of the simulated network is the same as that of the current network, thereby enabling network simulation to be performed in the same network environment.
[0052] The embodiment of the present application does not limit the method of generating a simulated network based on a copy of the network data. Since the network data of the current network includes the network topology data, device configuration data and device type data of the current network, the copy of the network data includes a copy of the network topology data, a copy of the device configuration data and a copy of the device type data. The network device generates a simulated network based on the copy of the network topology data, the copy of the device configuration data and the copy of the device type data.
[0053] 303. The network management device changes the simulated network based on the simulation change instruction to obtain data of the simulated network after the change.
[0054] After the simulation network is generated, network changes can be made in the simulation network according to the network change requirements. For example, the network administrator inputs a simulation change instruction, and the network device changes the simulation network based on the simulation change instruction, thereby obtaining data of the changed simulation network. Exemplarily, the simulation change instruction includes, but is not limited to, at least one of an instruction for adding a new network device, an instruction for deleting a network device, an instruction for adding a new link, an instruction for deleting a link, an instruction for modifying an interface of a link, and an instruction for changing a device configuration.
[0055] by Figure 2 Taking the scenario shown as an example, the simulation change instruction includes an instruction for adding a new network device and an instruction for deleting a link. A new network device is added to the simulated network through the instruction for adding a new network device, and an existing link is deleted in the simulated network through the instruction for deleting a link, so as to obtain a changed simulated network. After that, data collection can be performed on the changed simulated network to obtain data of the changed simulated network. Exemplarily, the data of the changed simulated network includes changed network topology data, changed device configuration data, and changed device type data.
[0056] 304. The network management device obtains connectivity simulation results according to the changed simulated network data and connectivity simulation input parameters.
[0057] After making network changes to the simulated network, in order to evaluate the impact of the changes on the services in the current network before the network changes are implemented, the method provided in the embodiment of the present application can receive connectivity simulation input parameters, and perform network simulation based on the connectivity simulation input parameters and the data of the changed simulated network to obtain connectivity simulation results, thereby analyzing the impact of the network changes.
[0058] The embodiment of the present application does not limit the connectivity simulation input parameters, which can be determined based on the simulation requirements. For example, if network connectivity simulation is required, the connectivity simulation input parameters include but are not limited to the source IP address and destination IP address of the simulated connectivity. In addition, the connectivity simulation input parameters also include but are not limited to parameters such as protocol and port number.
[0059] In an exemplary embodiment, the network device obtains connectivity simulation results according to the changed simulated network data and connectivity simulation input parameters in the following two ways, including but not limited to.
[0060] Method 1: Obtain connectivity simulation results based on the changed data of the simulation network and the connectivity simulation input parameters, including: importing the changed data of the simulation network and the connectivity simulation input parameters into the simulation engine, the simulation engine is used to obtain connectivity simulation results based on the changed data of the simulation network and the connectivity simulation input parameters; obtaining connectivity simulation results from the simulation engine.
[0061] In the first mode, the network device does not directly obtain the connectivity simulation result based on the data of the changed simulation network and the connectivity simulation input parameters, but sends the data of the changed simulation network and the connectivity simulation input parameters to the simulation engine. The simulation engine is a component that can simulate based on network data and has the ability to execute simulation algorithms. Therefore, after the simulation engine receives the data of the changed simulation network and the connectivity simulation input parameters, it can obtain the connectivity simulation result through the simulation algorithm. Exemplarily, the simulation engine is integrated into the network device in the form of a microservice component, and communicates with the network device using an internal interface, and the network device sends the data of the changed simulation network and the connectivity simulation input parameters to the simulation engine through the internal interface. Alternatively, the simulation engine is integrated into other devices outside the network device, and the network device can communicate and connect with other devices integrated with the simulation engine to access the simulation engine, and send the data of the changed simulation network and the connectivity simulation input parameters to the simulation engine.
[0062] Method 2: Connectivity simulation input parameters include source IP address and destination IP address. Connectivity simulation results are obtained based on the data of the changed simulation network and the connectivity simulation input parameters, including: generating routing table entries based on the data of the changed simulation network; determining the connectivity simulation results between the source IP address and the destination IP address based on the routing table entries and the device configuration data in the data of the changed simulation network.
[0063] In the second method, the network device directly obtains the connectivity simulation result based on the data of the changed simulated network and the connectivity simulation input parameters. For example, the network device obtains the connectivity simulation result through the simulation algorithm based on the data of the changed simulated network and the connectivity simulation input parameters. Taking the connectivity simulation input parameters including the source IP address and the destination IP address as an example, the network device generates a routing forwarding table entry based on the data of the changed simulated network. In addition, since the device configuration data includes but is not limited to the interface configuration data, network and protocol configuration of the device, when it is necessary to simulate and calculate the connectivity between the source IP address and the destination IP address, the device configuration data in the data of the changed simulated network is combined with the simulation algorithm to obtain each device through which the path between the source IP address and the destination IP address passes, and the ingress and egress interfaces passed are calculated according to the forwarding table entries matched by the message in each device, and the message will also be calculated whether it will match the configured access control policy in the device, and whether the message will be intercepted, etc., and the connectivity simulation result between the source IP address and the destination IP address is obtained through the judgment result.
[0064] Exemplarily, if the path between the source IP address and the destination IP address is reachable, the connectivity simulation result includes a first connectivity simulation result and a mutual access path between the source IP address and the destination IP address, and the first connectivity simulation result is used to indicate that the source IP address and the destination IP address are reachable. If the path between the source IP address and the destination IP address is unreachable, the connectivity simulation result includes a second connectivity simulation result and interruption location information, and the second connectivity simulation result is used to indicate that the source IP address and the destination IP address are unreachable. Among them, the interruption location information is used to indicate the interruption location, for example, the interruption location information is the address of a certain device, thereby indicating that the interruption occurred at the device. In addition, in the case where the path between the source IP address and the destination IP address is unreachable, the connectivity simulation result also includes the cause of the interruption, for example, because the route is unreachable or because of policy blocking.
[0065] It should be noted that if the path between the source IP address and the destination IP address is reachable, the controller can display the mutual access path. If there are multiple mutual access paths between the source IP address and the destination IP address, the controller can also display all of the multiple mutual access paths. The embodiment of the present application does not limit the method of displaying the mutual access path.
[0066] For example, Figure 3 The network simulation process shown can be Figure 4 As shown. Collect the network data of the current network, and store the network data of the current network in the running network management DB. For example, the network data of the current network includes device configuration data and network topology data. Afterwards, a copy of the network data is obtained by copying the network data of the current network. The copy of the network data can also be called the twin data of the network data. In order to perform network simulation without affecting the current network, a copy of the network data is stored in a DB different from the running network management DB, for example, a copy of the network data is stored in a twin ecological network management DB. When the administrator simulates the change operation, the controller merges the data generated by the operation into the twin network management DB. The updated network management data, that is, the updated simulated network data, is imported into the network simulation engine. The controller receives the source IP address, destination IP address and protocol port input by the administrator to obtain the connectivity simulation input parameters. The connectivity simulation input parameters are input into the network simulation engine, and the network simulation engine outputs the IP reachability results and the mutual access path, or the IP unreachable results and the interruption location / cause and other contents.
[0067] In summary, the method provided in the embodiment of the present application collects the network data of the current network, restores and generates an independent simulation network separately, implements changes in the simulation network, directly performs network simulation based on the data of the changed simulation network and the connectivity simulation input parameters to obtain the connectivity simulation result, or uses the network management data generated by the simulation network, that is, the data of the changed simulation network and the connectivity simulation input parameters to import into the simulation engine, and obtains the connectivity simulation result from the simulation engine. All of these can achieve the effect of network changes on network service accessibility in advance without changing the current network operation. In addition, before implementing the network change operation, it is also possible to find out in advance whether the forwarding of a specific message in the network after the change is implemented is in line with expectations, and at the same time, it has no effect on the forwarding of normal business messages in the network.
[0068] Next, take the network device as an SDN controller, and the SDN controller has an integrated CPV simulation engine as an example. Figure 5 The scenario shown is used to illustrate the method provided in the embodiment of the present application. Figure 5 As shown, the network simulation system includes an SDN controller 41 and six forwarders, and the six forwarders are device 1, device 2, device 3, device 4, device 5 and device 6 respectively. Figure 5 The physical network shown on the left is the current network, in which device 5 is connected to device 1, device 2, and device 4 through interconnection links, and device 6 is connected to device 1, device 2, device 3, and device 4 through interconnection links.
[0069] After generating the simulated network based on the copy of the network data of the current network, the user needs to change the physical network, that is, the current network, including temporarily disconnecting the interconnection link between device 5 and device 4, and modifying part of the configuration of device 6. Therefore, by executing the simulation change instruction, Figure 5 The simulation synthesis network shown on the right is the changed simulation network. Figure 5 As shown on the right, in the simulated network after the change, the configuration of device 6 is modified, and the interconnection link between device 5 and device 4 is deleted. Figure 5 In addition, VM1 is configured on Device 1 and VM2 is configured on Device 4.
[0070] Before the formal implementation of the change, in order to evaluate whether the change will affect the mutual access between VM1 and VM2, the method provided in the embodiment of the present application is used to simulate the change operation on the SDN controller in advance. Taking the simulation of the connectivity between VM1 and VM2 as an example, the network simulation method provided in the embodiment of the present application is as follows: Figure 6 As shown, including but not limited to the following processes.
[0071] 601, the SDN controller collects network data of the current network, and stores the network data of the current network in a running network management data database (DB), wherein the network data of the current network includes configuration data of devices and network topology data.
[0072] 602, the SDN controller copies (clones) the running state data to obtain a copy of the network data, and stores the copy of the network data in the simulation state network management data DB.
[0073] Based on a copy of this network data, the SDN controller can generate a simulated network.
[0074] 603, based on the administrator modifying the device configuration, network topology, etc. in the simulation state, the SDN controller obtains a network change instruction.
[0075] 604, the SDN controller merges the network management data modified by the user into the simulated network management data BD.
[0076] It should be noted that the network management data generated by user modification involves the update of simulation state data. The SDN controller can obtain the updated simulation network data, and the updated simulation network data will not affect the running state data, that is, the updated simulation network data will not affect the network data of the current network, thereby ensuring the normal operation of the services in the current network.
[0077] 605, the SDN controller receives a network simulation start instruction.
[0078] 606 , the SDN controller imports the simulation state data, ie, the updated simulation network data, into the CPV simulation engine for simulation according to the network simulation start instruction.
[0079] For example, the CPV simulation engine communicates with the SDN controller through an internal interface, and the SDN controller sends updated simulation network data to the CPV simulation engine through the internal interface.
[0080] 607, the CPV simulation engine receives connectivity simulation input parameters, for example, the connectivity simulation input parameters are the source IP address, destination IP address and protocol port input by the user.
[0081] like Figure 5 In the scenario shown, the source IP address input by the user is the address of VM1, and the destination IP address is the address of VM2. The SDN controller may first receive the source IP address, destination IP address, and protocol port input by the user, and then transmit the source IP address, destination IP address, and protocol port to the CPV simulation engine through the internal interface.
[0082] 608, the CPV simulation engine performs connectivity simulation based on the simulation state data, that is, the data of the changed simulation network and the connectivity simulation input parameters to obtain a connectivity simulation result.
[0083] Exemplarily, the CPV simulation engine generates a routing forwarding table entry based on the data of the changed simulation network, and then calculates whether VM1 and VM2 are reachable through a simulation algorithm. For example, when the CPV simulation engine simulates and calculates the connectivity between the source IP address of VM1 and the destination IP address of VM2, since the device configuration data includes but is not limited to the interface configuration data, network and protocol configuration of the device, etc., the device configuration data in the data of the changed simulation network is combined with the device configuration data in the simulation algorithm to obtain each device through which the path between the source IP address and the destination IP address passes, and the entry and exit interfaces passed are calculated based on the forwarding table entries matched by the message in each device, and at the same time, it will also calculate whether the message will match the configured access control policy in the device, determine whether the message will be intercepted, etc., and obtain the connectivity simulation result between the source IP address and the destination IP address through the judgment result.
[0084] For example, if the path between VM1 and VM2 is reachable, the connectivity simulation result includes a first connectivity simulation result and a mutual access path, and the first connectivity simulation result is used to indicate that the path between VM1 and VM2 is reachable, that is, the source IP address and the destination IP address are reachable. Figure 5 In the scenario shown, the path between VM1 and VM2 is reachable, and there are two reachable paths. One of the reachable paths is VM1-->device 1-->device 5-->device 2-->device 6-->device 4-->VM2, and the other reachable path is VM1-->device 1-->device 5-->device 6-->device 4-->VM2.
[0085] If the path between VM1 and VM2 is unreachable, the connectivity simulation result includes a second connectivity simulation result and interruption location information, and the second connectivity simulation result is used to indicate that VM1 and VM2 are unreachable, that is, the source IP address and the destination IP address are unreachable. The interruption location information is used to indicate the interruption location, for example, the interruption location information is the address of a certain device, thereby indicating that the interruption occurred at the device. In addition, in the case where the path between the source IP address and the destination IP address is unreachable, the connectivity simulation result also includes the cause of the interruption, such as because the route is unreachable or because of policy blocking.
[0086] The network simulation method of the embodiment of the present application is introduced above. Corresponding to the above method, the embodiment of the present application also provides a network simulation device.
[0087] The present application provides a network simulation device, which is used to Figure 7The modules shown above perform the Figure 3 or Figure 5 Network simulation method. Figure 7 The network simulation device provided in the embodiment of the present application includes the following modules.
[0088] The acquisition module 701 is used to collect network data of the current network; the functions performed by the acquisition module 701 can be referred to Figure 3 The 301 shown is not repeated here.
[0089] The generation module 702 is used to generate a simulation network according to the network data of the current network; the functions performed by the generation module 702 can be referred to Figure 3 The 302 shown is not repeated here.
[0090] The change module 703 is used to change the simulation network based on the simulation change instruction to obtain the data of the changed simulation network; the function performed by the change module 703 can be referred to Figure 3 The 303 shown is not repeated here.
[0091] The simulation module 704 is used to obtain the connectivity simulation result according to the changed simulation network data and the connectivity simulation input parameters. The functions performed by the simulation module 704 can be referred to Figure 3 The 304 shown is not repeated here.
[0092] In one possible implementation, the simulation module 704 is used to import the changed simulation network data and connectivity simulation input parameters into the simulation engine, and the simulation engine is used to obtain connectivity simulation results based on the changed simulation network data and connectivity simulation input parameters; and obtain connectivity simulation results from the simulation engine.
[0093] In one possible implementation, the connectivity simulation input parameters include a source Internet Protocol IP address and a destination IP address, and the simulation module is used to generate a routing table entry based on the data of the changed simulation network; and determine the connectivity simulation result between the source IP address and the destination IP address based on the routing table entry and the device configuration data in the data of the changed simulation network.
[0094] In a possible implementation, the connectivity simulation result includes a first connectivity simulation result and a mutual access path between the source IP address and the destination IP address, and the first connectivity simulation result is used to indicate that the source IP address and the destination IP address are reachable;
[0095] Alternatively, the connectivity simulation result includes a second connectivity simulation result and interruption location information, and the second connectivity simulation result is used to indicate that the source IP address and the destination IP address are unreachable.
[0096] In one possible implementation, the simulation change instruction includes at least one of an instruction for adding a new network device, an instruction for deleting a network device, an instruction for adding a new link, an instruction for deleting a link, an instruction for modifying an interface of a link, and an instruction for changing a device configuration.
[0097] In a possible implementation, the network data of the current network includes network topology data, device configuration data, and device type data.
[0098] The device provided in the embodiment of the present application collects the network data of the current network, restores and generates an independent simulation network separately, implements changes in the simulation network, and uses the network management data generated by the simulation network, that is, the data of the changed simulation network and the connectivity simulation input parameters to import into the simulation engine, and obtains the connectivity simulation result from the simulation engine, or directly performs network simulation based on the data of the changed simulation network and the connectivity simulation input parameters to obtain the connectivity simulation result, which can achieve the effect of network changes on network service accessibility in advance without changing the current network operation. In addition, before implementing the network change operation, it is also possible to find out in advance whether the forwarding of a specific message in the network after the change is implemented is in line with expectations, and at the same time, it has no effect on the forwarding of normal business messages in the network.
[0099] It should be understood that the above Figure 7 When the device provided realizes its functions, only the division of the above-mentioned functional modules is used as an example for illustration. In practical applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the device and method embodiments provided in the above embodiments belong to the same concept, and their specific implementation process is detailed in the method embodiment, which will not be repeated here.
[0100] See also Figure 8 , Figure 8 A schematic diagram of the structure of a network device 2000 provided by an exemplary embodiment of the present application is shown. Figure 8 The network device 2000 shown is used to perform the above Figure 3 and Figure 5 The network simulation method shown in the figure involves operations. The network device 2000 is, for example, a switch, a router, a controller, etc. The network device 2000 can be implemented by a general bus architecture.
[0101] like Figure 8 As shown, the network device 2000 includes at least one processor 2001 , a memory 2003 , and at least one communication interface 2004 .
[0102] The processor 2001 is, for example, a general-purpose central processing unit (CPU), a digital signal processor (DSP), a network processor (NP), a graphics processing unit (GPU), a neural-network processing units (NPU), a data processing unit (DPU), a microprocessor, or one or more integrated circuits for implementing the scheme of the present application. For example, the processor 2001 includes an application-specific integrated circuit (ASIC), a programmable logic device (PLD) or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. The PLD is, for example, a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), or any combination thereof. It can implement or execute various logic blocks, modules, and circuits described in conjunction with the disclosure of the embodiments of the present invention. The processor may also be a combination that implements a computing function, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, and the like.
[0103] Optionally, the network device 2000 further includes a bus. The bus is used to transmit information between the components of the network device 2000. The bus may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 8 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.
[0104] The memory 2003 is, for example, a read-only memory (ROM) or other types of static storage devices that can store static information and instructions, or a random access memory (RAM) or other types of dynamic storage devices that can store information and instructions, or an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage (including compressed optical disc, laser disc, optical disc, digital versatile disc, Blu-ray disc, etc.), a magnetic disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto. The memory 2003 is, for example, independent and connected to the processor 2001 via a bus. The memory 2003 can also be integrated with the processor 2001.
[0105] The communication interface 2004 uses any transceiver type device for communicating with other devices or communication networks, and the communication network can be Ethernet, radio access network (RAN) or wireless local area network (WLAN), etc. The communication interface 2004 can include a wired communication interface and can also include a wireless communication interface. Specifically, the communication interface 2004 can be an Ethernet interface, a Fast Ethernet (FE) interface, a Gigabit Ethernet (GE) interface, an Asynchronous Transfer Mode (ATM) interface, a wireless local area network (WLAN) interface, a cellular network communication interface or a combination thereof. The Ethernet interface can be an optical interface, an electrical interface or a combination thereof. In an embodiment of the present application, the communication interface 2004 can be used for the network device 2000 to communicate with other devices.
[0106] In a specific implementation, as an embodiment, the processor 2001 may include one or more CPUs, such as Figure 8 0 and CPU1 shown in FIG. Each of these processors may be a single-CPU processor or a multi-CPU processor. A processor herein may refer to one or more devices, circuits, and / or processing cores for processing data (e.g., computer program instructions).
[0107] In a specific implementation, as an embodiment, the network device 2000 may include multiple processors, such as Figure 8 2001 and processor 2005 are shown in FIG. Each of these processors may be a single-core processor (single-CPU) or a multi-core processor (multi-CPU). A processor herein may refer to one or more devices, circuits, and / or processing cores for processing data (such as computer program instructions).
[0108] In a specific implementation, as an embodiment, the network device 2000 may further include an output device and an input device. The output device communicates with the processor 2001 and may display information in a variety of ways. For example, the output device may be a liquid crystal display (LCD), a light emitting diode (LED) display device, a cathode ray tube (CRT) display device, or a projector. The input device communicates with the processor 2001 and may receive user input in a variety of ways. For example, the input device may be a mouse, a keyboard, a touch screen device, or a sensor device.
[0109] In some embodiments, the memory 2003 is used to store the program code 2010 for executing the solution of the present application, and the processor 2001 can execute the program code 2010 stored in the memory 2003. That is, the network device 2000 can implement the network simulation method provided by the method embodiment through the processor 2001 and the program code 2010 in the memory 2003. The program code 2010 may include one or more software modules. Optionally, the processor 2001 itself can also store the program code or instruction for executing the solution of the present application.
[0110] In a specific embodiment, the network device 2000 of the embodiment of the present application may correspond to the network device in the above method embodiment, and the processor 2001 in the network device 2000 reads the instruction in the memory 2003, so that Figure 8 The network device 2000 shown can execute all or part of the operations executed by the network device in the method embodiment.
[0111] The network device 2000 may also correspond to the above Figure 7 The device shown, Figure 7 Each functional module in the apparatus shown is implemented using software of the network device 2000. In other words, Figure 7 The functional modules included in the apparatus shown are generated after the processor 2001 of the network device 2000 reads the program code 2010 stored in the memory 2003 .
[0112] in, Figure 3 Each step of the network simulation method shown is completed by an integrated logic circuit of hardware or software instructions in the processor of the network device 2000. The steps of the method disclosed in conjunction with the embodiment of the present application can be directly embodied as a hardware processor, or a combination of hardware and software modules in the processor. The software module can be located in a mature storage medium in the art such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory, and the processor reads the information in the memory and completes the steps of the above method in conjunction with its hardware. To avoid repetition, it is not described in detail here.
[0113] See also Fig. 9 , Fig. 9 A schematic diagram showing the structure of a network device 2100 provided by another exemplary embodiment of the present application is shown. Fig. 9 The network device 2100 shown is used to perform the above Figure 3 and Figure 5 All or part of the operations involved in the network simulation method shown. The network device 2100 is, for example, a switch, a router, etc. The network device 2100 can be implemented by a general bus architecture.
[0114] like Fig. 9 As shown, the network device 2100 includes: a main control board 2110 and an interface board 2130 .
[0115] The main control board is also called a main processing unit (MPU) or a route processor card. The main control board 2110 is used to control and manage various components in the network device 2100, including routing calculation, device management, device maintenance, and protocol processing functions. The main control board 2110 includes: a central processing unit 2111 and a memory 2112.
[0116] The interface board 2130 is also called a line processing unit (LPU), a line card or a service board. The interface board 2130 is used to provide various service interfaces and realize the forwarding of data packets. The service interface includes but is not limited to an Ethernet interface, a POS (Packet over SONET / SDH) interface, etc., and the Ethernet interface is, for example, a Flexible Ethernet Service Interface (Flexible Ethernet Clients, FlexE Clients). The interface board 2130 includes: a central processing unit 2131, a network processor 2132, a forwarding table entry memory 2134 and a physical interface card (PIC) 2133.
[0117] The central processor 2131 on the interface board 2130 is used to control and manage the interface board 2130 and communicate with the central processor 2111 on the main control board 2110 .
[0118] The network processor 2132 is used to implement the forwarding processing of the message. The network processor 2132 can be in the form of a forwarding chip. The forwarding chip can be a network processor (NP). In some embodiments, the forwarding chip can be implemented by an application-specific integrated circuit (ASIC) or a field programmable gate array (FPGA). Specifically, the network processor 2132 is used to forward the received message based on the forwarding table stored in the forwarding table entry memory 2134. If the destination address of the message is the address of the network device 2100, the message is sent to the CPU (such as the central processor 2131) for processing; if the destination address of the message is not the address of the network device 2100, the next hop and the output interface corresponding to the destination address are found from the forwarding table according to the destination address, and the message is forwarded to the output interface corresponding to the destination address. Among them, the processing of the uplink message may include: processing of the message input interface, forwarding table search; the processing of the downlink message may include: forwarding table search, etc. In some embodiments, the central processor can also perform the function of the forwarding chip, such as implementing software forwarding based on a general-purpose CPU, so that the forwarding chip is not required in the interface board.
[0119] The physical interface card 2133 is used to implement the physical layer docking function, whereby the original traffic enters the interface board 2130, and the processed message is sent out from the physical interface card 2133. The physical interface card 2133, also called a daughter card, can be installed on the interface board 2130, and is responsible for converting the photoelectric signal into a message and forwarding the message to the network processor 2132 for processing after checking the legitimacy of the message. In some embodiments, the central processor 2131 can also perform the functions of the network processor 2132, such as implementing software forwarding based on a general-purpose CPU, so that the network processor 2132 is not required in the physical interface card 2133.
[0120] Optionally, the network device 2100 includes multiple interface boards, for example, the network device 2100 further includes an interface board 2140, and the interface board 2140 includes: a central processor 2141, a network processor 2142, a forwarding table entry memory 2144, and a physical interface card 2143. The functions and implementation methods of the components in the interface board 2140 are the same or similar to those of the interface board 2130, and are not described in detail here.
[0121] Optionally, the network device 2100 further includes a switching fabric board 2120. The switching fabric board 2120 may also be referred to as a switch fabric unit (SFU). When the network device has multiple interface boards, the switching fabric board 2120 is used to complete data exchange between the interface boards. For example, the interface board 2130 and the interface board 2140 may communicate through the switching fabric board 2120.
[0122] The main control board 2110 is coupled to the interface board. For example, the main control board 2110, the interface board 2130, the interface board 2140, and the switching network board 2120 are connected to the system backplane through the system bus to achieve intercommunication. In a possible implementation, an inter-process communication (IPC) channel is established between the main control board 2110 and the interface board 2130 and the interface board 2140, and the main control board 2110 and the interface board 2130 and the interface board 2140 communicate through the IPC channel.
[0123] Logically, the network device 2100 includes a control plane and a forwarding plane. The control plane includes a main control board 2110 and a central processing unit 2111. The forwarding plane includes various components for performing forwarding, such as a forwarding table entry memory 2134, a physical interface card 2133, and a network processor 2132. The control plane performs functions such as a router, generating a forwarding table, processing signaling and protocol messages, and configuring and maintaining the status of the network device. The control plane sends the generated forwarding table to the forwarding plane. On the forwarding plane, the network processor 2132 forwards the message received by the physical interface card 2133 based on the forwarding table sent by the control plane. The forwarding table sent by the control plane can be stored in the forwarding table entry memory 2134. In some embodiments, the control plane and the forwarding plane can be completely separated and not on the same network device.
[0124] It is worth noting that there may be one or more main control boards, and when there are multiple boards, they may include a primary main control board and a backup main control board. There may be one or more interface boards. The stronger the data processing capability of the network device, the more interface boards are provided. There may also be one or more physical interface cards on the interface board. There may be no switching network board, or there may be one or more switching network boards. When there are multiple switching network boards, they can jointly realize load sharing and redundant backup. In a centralized forwarding architecture, network devices may not need switching network boards, and the interface board is responsible for processing the service data of the entire system. In a distributed forwarding architecture, network devices may have at least one switching network board, and data exchange between multiple interface boards is realized through the switching network board, providing large-capacity data exchange and processing capabilities. Therefore, the data access and processing capabilities of network devices with distributed architectures are greater than those of network devices with centralized architectures. Optionally, the network device may have only one board, that is, no switching board, and the functions of the interface board and the main control board are integrated on the board. In this case, the central processor on the interface board and the central processor on the main control board can be combined into one central processor on the board to perform the functions of the two. This type of network device has low data exchange and processing capabilities (for example, low-end switches or routers and other network devices). The specific architecture to be adopted depends on the specific networking deployment scenario, and no limitation is made here.
[0125] In a specific embodiment, the network device 2100 corresponds to the above Figure 7 The network simulation device shown is applied to a network device. In some embodiments, Figure 7 The acquisition module 701 in the network simulation device shown is equivalent to the physical interface card 2133 in the network device 2100 . Figure 7 The generation module 702 , the change module 703 and the simulation module 704 in the network simulation apparatus shown are equivalent to the central processor 2111 or the network processor 2132 in the network device 2100 .
[0126] The present application also provides a communication system, which includes: Figure 8 The network device 2000 or Fig. 9 Network device 2100 is shown.
[0127] The method performed by the network device can be found in the above Figure 3 and Figure 5 The relevant description of the illustrated embodiment will not be repeated here.
[0128] It should be understood that the above processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor, etc. It is worth noting that the processor may be a processor supporting the advanced RISC machines (ARM) architecture.
[0129] Further, in an optional embodiment, the memory may include a read-only memory and a random access memory, and provide instructions and data to the processor. The memory may also include a non-volatile random access memory. For example, the memory may also store information about the device type.
[0130] The memory may be a volatile memory or a nonvolatile memory, or may include both volatile and nonvolatile memory. Among them, the nonvolatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), which is used as an external cache. By way of example but not limitation, many forms of RAM are available. For example, static RAM (SRAM), dynamic random access memory (DRAM), synchronous DRAM (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link DRAM (SLDRAM) and direct memory bus random access memory (DR RAM).
[0131] A computer-readable storage medium is also provided, in which at least one instruction is stored, and the instruction is loaded and executed by a processor to implement any of the network simulation methods described above.
[0132] The present application provides a computer program. When the computer program is executed by a computer, a processor or a computer can be enabled to execute the corresponding steps and / or processes in the above method embodiments.
[0133] A chip is provided, comprising a processor, for calling and executing instructions stored in a memory from the memory, so that a communication device equipped with the chip executes the methods in the above aspects.
[0134] Another chip is provided, comprising: an input interface, an output interface, a processor and a memory, wherein the input interface, the output interface, the processor and the memory are connected via an internal connection path, the processor is used to execute the code in the memory, and when the code is executed, the processor is used to execute the methods in the above aspects.
[0135] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in this application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website site, computer, server or data center to another website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) mode. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integration. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state hard disk Solid State Disk), etc.
[0136] The specific implementation methods described above further illustrate the purpose, technical solutions and beneficial effects of the present application in detail. It should be understood that the above description is only the specific implementation methods of the present application and is not intended to limit the scope of protection of the present application. Any modifications, equivalent substitutions, improvements, etc. made on the basis of the technical solutions of the present application should be included in the scope of protection of the present application.
[0137] Those of ordinary skill in the art will appreciate that, in conjunction with the various method steps and modules described in the embodiments disclosed herein, they can be implemented in software, hardware, firmware, or any combination thereof. In order to clearly illustrate the interchangeability of hardware and software, the steps and components of each embodiment have been generally described in terms of function in the above description. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Those of ordinary skill in the art may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0138] A person skilled in the art will understand that all or part of the steps to implement the above embodiments may be accomplished by hardware or by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a disk or an optical disk, etc.
[0139] When software is used for implementation, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer program instructions. As an example, the method of the embodiment of the present application can be described in the context of a machine executable instruction, and the machine executable instruction is such as included in the program module executed in the device on the real or virtual processor of the target. Generally speaking, a program module includes a routine, a program, a library, an object, a class, a component, a data structure, etc., which performs a specific task or realizes a specific abstract data structure. In various embodiments, the function of the program module can be merged or divided between the described program modules. The machine executable instruction for the program module can be executed in a local or distributed device. In a distributed device, the program module can be located in both a local and a remote storage medium.
[0140] The computer program code for realizing the method for the embodiment of the present application can be written in one or more programming languages. These computer program codes can be provided to the processor of a general-purpose computer, a special-purpose computer or other programmable data processing device, so that the program code, when executed by a computer or other programmable data processing device, causes the function / operation specified in the flow chart and / or block diagram to be implemented. The program code can be executed completely on a computer, partially on a computer, as an independent software package, partially on a computer and partially on a remote computer or completely on a remote computer or server.
[0141] In the context of the embodiments of the present application, computer program codes or related data may be carried by any appropriate carrier to enable a device, apparatus or processor to perform the various processes and operations described above. Examples of carriers include signals, computer readable media, and the like.
[0142] Examples of signals may include electrical, optical, radio, acoustic or other forms of propagated signals, such as carrier waves, infrared signals, etc.
[0143] A machine-readable medium may be any tangible medium that contains or stores a program for or related to an instruction execution system, apparatus, or device. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination thereof. More detailed examples of machine-readable storage media include an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical storage device, a magnetic storage device, or any suitable combination thereof.
[0144] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and modules described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0145] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the module is only a logical function division. There may be other division methods in actual implementation, such as multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or modules, or it can be an electrical, mechanical or other form of connection.
[0146] The modules described as separate components may or may not be physically separated, and the components displayed as modules may or may not be physical modules, that is, they may be located in one place or distributed on multiple network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the embodiments of the present application.
[0147] In addition, each functional module in each embodiment of the present application can be integrated into one processing module, or each module can exist physically separately, or two or more modules can be integrated into one module. The above integrated modules can be implemented in the form of hardware or software functional modules.
[0148] If the integrated module is implemented in the form of a software function module and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk and other media that can store program code.
[0149] In the present application, the terms "first", "second", etc. are used to distinguish between identical or similar items having substantially the same effects and functions. It should be understood that there is no logical or temporal dependency between "first", "second", and "nth", nor is there a limitation on quantity and execution order. It should also be understood that although the following description uses the terms first, second, etc. to describe various elements, these elements should not be limited by the terms. These terms are only used to distinguish one element from another. For example, without departing from the scope of the various described examples, a first image may be referred to as a second image, and similarly, a second image may be referred to as a first image. Both the first image and the second image may be images, and in some cases, may be separate and different images.
[0150] It should also be understood that in the various embodiments of the present application, the size of the serial number of each process does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
[0151] The term "at least one" in this application means one or more, and the term "multiple" in this application means two or more, for example, multiple second messages means two or more second messages. The terms "system" and "network" are often used interchangeably herein.
[0152] It should be understood that the terms used in the description of the various examples herein are only for describing specific examples and are not intended to be limiting. As used in the description of the various examples and the appended claims, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
[0153] It should also be understood that the term “comprise” (also known as “includes,” “including,” “comprises” and / or “comprising”) when used in this specification specifies the presence of stated features, integers, steps, operations, elements, and / or components, but does not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and / or groups thereof.
[0154] It should also be understood that the terms "if" and "if" may be interpreted to mean "when" or "upon" or "in response to determining" or "in response to detecting." Similarly, the phrases "if it is determined that ..." or "if [a stated condition or event] is detected" may be interpreted to mean "upon determining that ..." or "in response to determining that ..." or "upon detecting [a stated condition or event]" or "in response to detecting [a stated condition or event]," depending on the context.
[0155] It should be understood that determining B based on A does not mean determining B only based on A. B can also be determined based on A and / or other information.
[0156] It should also be understood that the references to "one embodiment", "an embodiment", or "a possible implementation" throughout the specification mean that specific features, structures, or characteristics related to the embodiment or implementation are included in at least one embodiment of the present application. Therefore, the references to "in one embodiment" or "in an embodiment", or "a possible implementation" throughout the specification do not necessarily refer to the same embodiment. In addition, these specific features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.
[0157] The above description is only an optional embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the principles of the present application should be included in the protection scope of the present application.
Claims
1. A network simulation method, characterized in that: The method comprises: The network management device collects network data of the current network, the network management device is independent of the current network, and the network data of the current network includes network topology data, device configuration data and device type data of the current network; Generate a simulated network according to the network data of the current network; The simulated network is changed based on the simulation change instruction to obtain data of the changed simulated network, wherein the simulation change instruction includes at least one of an instruction for adding a new network device, an instruction for deleting a network device, an instruction for modifying an interface of a link, and an instruction for changing a device configuration, and the data of the changed simulated network includes network topology data, device configuration data, and device type data of the changed simulated network; According to the changed simulation network data and connectivity simulation input parameters, a connectivity simulation result is obtained through a simulation algorithm.
2. The method according to claim 1, characterized in that The obtaining of connectivity simulation results by using a simulation algorithm according to the changed simulation network data and connectivity simulation input parameters includes: Importing the changed simulation network data and connectivity simulation input parameters into a simulation engine, wherein the simulation engine is used to obtain connectivity simulation results through the simulation algorithm according to the changed simulation network data and connectivity simulation input parameters; The connectivity simulation result is obtained from the simulation engine.
3. The method according to claim 1, characterized in that The connectivity simulation input parameters include a source Internet Protocol IP address and a destination IP address, and the connectivity simulation result is obtained by a simulation algorithm based on the changed simulated network data and the connectivity simulation input parameters, including: Generate a routing forwarding table entry according to the data of the changed simulation network; According to the routing forwarding table entry and the device configuration data in the changed simulated network data, the connectivity simulation result between the source IP address and the destination IP address is determined through the simulation algorithm.
4. The method according to claim 3, characterized in that The connectivity simulation result includes a first connectivity simulation result and a mutual access path between the source IP address and the destination IP address, wherein the first connectivity simulation result is used to indicate that the source IP address and the destination IP address are reachable; Alternatively, the connectivity simulation result includes a second connectivity simulation result and interruption location information, and the second connectivity simulation result is used to indicate that the source IP address and the destination IP address are unreachable.
5. A network simulation device, characterized in that: The device is applied to a network management device, and comprises: An acquisition module, used for collecting network data of the current network, the network management device is independent of the current network, and the network data of the current network includes network topology data, device configuration data and device type data of the current network; A generation module, used for generating a simulation network according to the network data of the current network; a change module, configured to change the simulated network based on a simulation change instruction to obtain data of the simulated network after the change, wherein the simulation change instruction includes at least one of an instruction for adding a new network device, an instruction for deleting a network device, an instruction for modifying an interface of a link, and an instruction for changing a device configuration, and the data of the simulated network after the change includes network topology data, device configuration data, and device type data of the simulated network after the change; The simulation module is used to obtain connectivity simulation results through a simulation algorithm according to the data of the changed simulation network and the connectivity simulation input parameters.
6. The device according to claim 5, characterized in that The simulation module is used to import the changed simulation network data and connectivity simulation input parameters into the simulation engine, and the simulation engine is used to obtain the connectivity simulation result through the simulation algorithm according to the changed simulation network data and connectivity simulation input parameters; The connectivity simulation result is obtained from the simulation engine.
7. The device according to claim 5, characterized in that The connectivity simulation input parameters include a source Internet Protocol IP address and a destination IP address. The simulation module is used to generate a routing table entry based on the data of the changed simulation network; and determine the connectivity simulation result between the source IP address and the destination IP address through the simulation algorithm based on the device configuration data in the routing table entry and the data of the changed simulation network.
8. The device according to claim 7, characterized in that The connectivity simulation result includes a first connectivity simulation result and a mutual access path between the source IP address and the destination IP address, wherein the first connectivity simulation result is used to indicate that the source IP address and the destination IP address are reachable; Alternatively, the connectivity simulation result includes a second connectivity simulation result and interruption location information, and the second connectivity simulation result is used to indicate that the source IP address and the destination IP address are unreachable.
9. A network device, characterized in that: The network equipment includes: A memory and a processor, wherein the memory stores at least one instruction, and the at least one instruction is loaded and executed by the processor so that the network device implements the network simulation method described in any one of claims 1-4.
10. A computer-readable storage medium, characterized in that: The storage medium stores at least one instruction, and the instruction is loaded and executed by the processor to implement the network simulation method as described in any one of claims 1-4.
Citation Information
Cited By
Network simulation method and apparatus, device, and computer readable storage medium
WO2022057431A1
