IP network simulation method, device, equipment, medium and program product
By reusing virtual LAN sub-interfaces and optimizing routing, network elements with the same device role are aggregated to the same simulation instrument, solving the problem of limited large-scale IP network simulation equipment and achieving high-fidelity simulation effects.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-18
- Publication Date
- 2026-04-14
AI Technical Summary
Existing IP network simulation methods cannot perform high-fidelity simulations of large-scale IP networks when simulation equipment is limited.
By reusing virtual LAN sub-interfaces, multiple network elements with the same device role are aggregated to the same simulation instrument, and different virtual LAN sub-interfaces are assigned to multiple links sharing the same simulation device port. Combined with routing optimization and service traffic reconstruction, a twin simulation network description is generated to drive the simulation bed simulation.
It enables high-fidelity simulation of large-scale IP networks with limited simulation equipment, reduces the number of simulation instruments required, and ensures traffic isolation at the logic level.
Smart Images

Figure CN121864609A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of IP network simulation, specifically to an IP network simulation method, apparatus, device, medium, and program product. Background Technology
[0002] IP network simulation refers to the analysis, diagnosis, simulation, and control of IP networks using a simulation bed to achieve intelligent network decision-making and efficient innovation. Related IP network simulation methods typically include the following steps: First, data preparation is performed, specifically: collecting network data from the target IP network and converting it into a digital twin description according to the twin data interface specification; and obtaining the physical resource description of the simulation bed. The digital twin description includes link information, protocol information, routing information, service traffic information, and network element information (such as name, device role, port, etc.) of the target IP network; the physical resource description includes the simulation devices (such as physical devices and simulation instruments) of the simulation bed and their connections. Second, the mapping relationship between each network element / link in the digital twin description and each simulation device / connection relationship in the physical resource description is specified, thereby generating a topology mapping relationship between the target IP network and the physical resources of the simulation bed. Then, other information in the digital twin description (such as protocol information, routing information, service traffic information, etc.) is used to generate a twin simulation network description for the simulation bed. Finally, the twin simulation network description is used to drive the simulation bed to simulate the target IP network.
[0003] With the development of computer technology, IP networks are becoming increasingly large-scale, containing more and more network elements. However, the simulation equipment in simulation beds is limited. Therefore, IP network simulation methods in related technologies cannot simulate large-scale IP networks due to the limited simulation equipment available in simulation beds. Summary of the Invention
[0004] This application provides an IP network simulation method, apparatus, device, medium, and program product. By reusing virtual LAN sub-interfaces, network elements belonging to the same device role in the IP network can be simulated by the same simulation instrument in the simulation bed. Furthermore, through routing optimization and service traffic reconstruction, high-fidelity simulation of large-scale IP networks is achieved even with limited simulation equipment in the simulation bed.
[0005] In a first aspect, embodiments of this application provide a method for IP network emulation, the method comprising: Obtain a digital twin description of the target IP network, and a physical resource description of the simulation bed used for simulating the target IP network; Based on the digital twin description and physical resource description, the simulation equipment used when each network element in the target IP network is simulated is determined, and the simulation equipment port corresponding to each link in the target IP network is determined, so as to obtain the initial topology mapping relationship between the target IP network and the simulation bed. Based on the initial topology mapping relationship, for the target network element simulated by physical devices, the simulation instruments used by multiple network elements interconnected with the target network element and belonging to the same device role are aggregated into the same simulation instrument, and different virtual LAN sub-interfaces are assigned to multiple links that need to share the same simulation device port due to aggregation, so as to obtain the target topology mapping relationship between the target IP network and the simulation bed. Based on the protocol information, routing information, and service traffic information of the target IP network in the digital twin description, as well as the target topology mapping relationship, a twin simulation network description is generated. A twin emulation network is used to describe and drive the emulation bed, enabling the emulation bed to emulate the target IP network.
[0006] In some embodiments, based on digital twin descriptions and physical resource descriptions, the simulation devices used when simulating each network element in the target IP network are determined, and the simulation device ports corresponding to each link in the target IP network are determined, including: Based on the device roles of each network element in the target IP network described in the digital twin, the target network element whose simulation device is a physical device and which needs to undergo network change operations is identified, as well as the non-target network element whose simulation device is a simulation instrument. Based on the physical resource description, and the target network element and non-target network element, the simulation equipment used when the target network element and non-target network element are simulated are determined respectively; Based on the simulation devices used when simulating the target network element and non-target network elements, and the link information of the target IP network in the digital twin description, the simulation device ports corresponding to each link in the target IP network are determined.
[0007] In some embodiments, based on the initial topology mapping relationship, for a target network element simulated by a physical device, the simulation instruments used when simulating multiple network elements interconnected with the target network element and belonging to the same device role are aggregated into a single simulation instrument, including: For the target network element, based on the link information of the target IP network in the digital twin description, determine the first non-target network element interconnected with the target network element and the device role of the first non-target network element; Based on the device role of the first non-target network element, the simulation instruments used by multiple first non-target network elements belonging to the same device role in the initial topology mapping relationship are aggregated into the same simulation instrument.
[0008] In some embodiments, different virtual LAN sub-interfaces are assigned to multiple links that need to share the same emulation device port due to aggregation, including: Identify the target links and assign a virtual LAN sub-interface to each link in the target links; the target links refer to multiple links that need to share the same emulation device port due to aggregation; Assign an initial VLAN sub-interface port number to the first link in the target link, and assign a VLAN sub-interface port number to the nth link in the target link after incrementing the initial VLAN sub-interface port number by n-1. In this case, the local port and the virtual LAN sub-interface port number of the same link in the target link are the same.
[0009] In some embodiments, a digital twin simulation network description is generated based on the protocol information, routing information, and service traffic information of the target IP network in the digital twin description, as well as the target topology mapping relationship, including: For each target network element, based on the boundary gateway protocol session and target topology mapping relationship in the protocol information, the protocol information is rewritten to obtain the twin simulation network protocol configuration. For each target network element, based on the device role and the boundary gateway protocol neighbor relationship in the routing information of the network element, the routing information is rewritten to obtain the twin simulation network routing configuration. For each target network element, the service traffic information is rewritten to obtain the twin simulation network traffic configuration of public network service traffic and virtual private network service traffic; Based on the target topology mapping relationship, twin network protocol configuration, twin network routing configuration, and twin network traffic configuration, a twin network description is obtained.
[0010] In some embodiments, for each target network element, based on the boundary gateway protocol session and target topology mapping relationship in the protocol information, the protocol information is rewritten to obtain the twin network protocol configuration, including: For each border gateway protocol session in the protocol information, based on the target topology mapping relationship, determine the simulation device used when the network elements of both parties in the border gateway protocol session are simulated; If the emulation device used when the peer network element is emulated in both parties of the session is also a physical device, then the corresponding border gateway protocol session is determined to be the first border gateway protocol session; if the emulation device used when the peer network element is emulated in both parties of the session is an emulation instrument, then the corresponding border gateway protocol session is determined to be the second border gateway protocol session. Based on the target topology mapping relationship, the first border gateway protocol session and the second border gateway protocol session are rewritten to obtain the configuration of the first border gateway protocol session and the configuration of the second border gateway protocol session. Based on the first and second border gateway protocol session configurations, the twin simulation network protocol configuration is obtained.
[0011] In some embodiments, based on the target topology mapping relationship, the first border gateway protocol session is rewritten to obtain the first border gateway protocol session configuration, including: Based on the target topology mapping relationship, determine the first simulated device port corresponding to the link carrying the first border gateway protocol session; Based on the port of the first simulation device, the first border gateway protocol session is rewritten to obtain the configuration of the first border gateway protocol session.
[0012] In some embodiments, based on the target topology mapping relationship, the second border gateway protocol session is rewritten to obtain the second border gateway protocol session configuration, including: Based on the target topology mapping relationship, determine the first virtual LAN sub-interface corresponding to the link carrying the second border gateway protocol session; Based on the first virtual LAN sub-interface, the second border gateway protocol session is rewritten to obtain the second border gateway protocol session configuration.
[0013] In some embodiments, for each target network element, based on the device role and border gateway protocol neighbor relationship in the routing information, the routing information is rewritten to obtain the twin network routing configuration, including: For each target network element, determine the set of simulated neighbor devices that are simulated instruments in the target topology mapping relationship and have a border gateway protocol neighbor relationship with the target network element; Based on whether the target network element's device role is a route reflector and whether the simulated neighbor devices in the simulated neighbor device set are route reflectors, the routing information is rewritten to obtain the twin simulation network routing configuration.
[0014] In some embodiments, routing information is rewritten based on whether the target network element's device role is a route reflector and whether the emulated neighbor devices in the emulated neighbor device set are route reflectors, to obtain the twin network routing configuration, including: If the target network element's device role is a route reflector, then based on the routing information, determine the routing information published by each simulated neighbor device in the simulated neighbor device set; and write the routing information published by the simulated neighbor devices into the twin network routing configuration. If the target network element's device role is not a route reflector, then determine whether the simulated neighbor device in the simulated neighbor device set is a route reflector; if the simulated neighbor device is a route reflector or a VPN route reflector, then write the routing information published by the simulated neighbor device into the twin network routing configuration; if the simulated neighbor device is not a route reflector or a VPN route reflector, then rewrite the advertiser device identifier in the routing information published by the simulated neighbor device; after deduplication, write the rewritten routing information into the twin network routing configuration.
[0015] In some embodiments, the advertiser device identifier in the routing information published by the emulated neighbor device is rewritten, including: Based on the address family identifier in the routing information published by the simulated neighbor device, the advertiser device identifier in the routing information is rewritten to the preset route reflector device identifier; If the address family identifier in the routing information is a public network unicast address family, then the advertiser device identifier in the routing information will be rewritten as a Type I route reflector device identifier. If the address family identifier in the routing information is a Virtual Private Network (VPN) address family, then the advertiser device identifier in the routing information will be rewritten as a Type II route reflector device identifier.
[0016] In some embodiments, for each target network element, rewriting the service traffic information to obtain the twin simulation network traffic configuration of public network service traffic and virtual private network service traffic includes: For each target network element, extract the public network service traffic information and virtual private network service traffic information associated with each target network element from the service traffic information; Based on the target topology mapping relationship, the public network service traffic information and the virtual private network service traffic information are rewritten to obtain the twin simulation network traffic configuration of the public network service traffic and the twin simulation network traffic configuration of the virtual private network service traffic.
[0017] In some embodiments, based on the target topology mapping relationship, public network service traffic information is rewritten to obtain a twin simulation network traffic configuration for public network service traffic, including: Determine the first link associated with each target network element; the first link refers to the hybrid link of physical device and simulation instrument associated with the target network element; From the public network service traffic information, filter out the first public network service traffic information corresponding to the first link; rewrite the sending destination of the first public network service traffic information to the simulation instrument port of the corresponding first link to obtain the twin simulation network traffic configuration of the public network service traffic.
[0018] In some embodiments, based on the target topology mapping relationship, the VPN service traffic information is rewritten to obtain the twin network traffic configuration of the VPN service traffic, including: From the VPN service traffic information, extract the first VPN service traffic information with the target network element as the site; and from the routing information, filter out the routing information whose address family identifier is a VPN address family and is consistent with the VPN service identifier of the first VPN service traffic information, and use it as the matching routing information. Based on the target topology mapping relationship, the simulated device port corresponding to the site of the first virtual private network service traffic information is determined, and the simulated device port corresponding to the destination of the matching routing information is determined as the destination of the first virtual private network service traffic information, so as to obtain the twin simulation network traffic configuration of the virtual private network service traffic.
[0019] In some embodiments, a Virtual Private Network (VPN) service is identified as a routing target.
[0020] Secondly, embodiments of this application provide an IP network emulation device, the device comprising: The acquisition module is used to acquire a digital twin description of the target IP network and a physical resource description of the simulation bed used for simulating the target IP network. The initial topology mapping relationship generation module is used to determine the simulation equipment used when each network element in the target IP network is simulated, and to determine the simulation equipment port corresponding to each link in the target IP network, based on the digital twin description and physical resource description, so as to obtain the initial topology mapping relationship between the target IP network and the simulation bed. The target topology mapping relationship generation module is used to aggregate the simulation instruments used by multiple network elements belonging to the same device role into the same simulation instrument based on the initial topology mapping relationship, and to allocate different virtual LAN sub-interfaces for multiple links that need to share the same simulation device port due to aggregation, so as to obtain the target topology mapping relationship between the target IP network and the simulation bed. The twin simulation network description generation module is used to generate a twin simulation network description based on the protocol information, routing information, and service traffic information of the target IP network in the digital twin description, as well as the target topology mapping relationship. The simulation module is used to drive the simulation bed using a twin simulation network description, so that the simulation bed can simulate the target IP network.
[0021] Thirdly, embodiments of this application provide an electronic device, including: a processor, a memory, and a program stored in the memory and executable on the processor, wherein when the program is executed by the processor, it implements the steps of the method described in any embodiment of the first aspect.
[0022] Fourthly, embodiments of this application provide a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of the method described in any embodiment of the first aspect.
[0023] Fifthly, embodiments of this application provide a computer program product including computer instructions that, when executed by a processor, implement the steps of the method as described in any embodiment of the first aspect.
[0024] This application provides an IP network simulation method. After establishing an initial topology mapping relationship between the target IP network and the simulation bed based on the digital twin description of the target IP network and the physical resource description of the simulation bed, multiple network elements with the same device role in the target IP network, which originally needed to be simulated by different simulation instruments, are aggregated and mapped to the same simulation instrument. For multiple logical links that need to be carried on the same physical port of the simulation bed due to aggregation, a unique virtual LAN sub-interface is automatically allocated to each link, thereby achieving port multiplexing at the physical layer and ensuring traffic isolation of each link at the logical layer. Based on this, the digital twin description (including protocol information, routing information, and service traffic information) is adapted and optimized into the compressed target topology mapping relationship to generate a twin simulation network description, which ultimately drives the simulation bed to perform simulation. Therefore, the simulation resource requirements of large-scale IP networks can be compressed to a scale that matches the limited physical resources of the simulation bed, thereby achieving high-fidelity simulation of large-scale IP networks with limited simulation equipment in the simulation bed.
[0025] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and do not limit this application. Attached Figure Description
[0026] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are merely embodiments of this application. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort, and this application can be applied to other similar scenarios based on the provided drawings.
[0027] Figure 1 A flowchart illustrating an IP network simulation method provided in this application embodiment; Figure 2 A schematic diagram illustrating the architecture of the IP network simulation method provided in the embodiments of this application; Figure 3 A flowchart illustrating the method for determining initial topological mapping relationships provided in an embodiment of this application; Figure 4 A flowchart illustrating the method for determining a target topology mapping relationship provided in an embodiment of this application; Figure 5 A flowchart illustrating the method for determining a twin simulation network description provided in an embodiment of this application; Figure 6 A flowchart illustrating the method for determining the configuration of a twin emulation network protocol provided in an embodiment of this application; Figure 7 A flowchart illustrating the method for determining the routing configuration of a twin network provided in an embodiment of this application; Figure 8 A flowchart illustrating the method for determining the traffic configuration of a twin network service provided in an embodiment of this application; Figure 9 This is a schematic diagram of the structure of an IP network simulation device provided in an embodiment of this application; Figure 10 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation
[0028] The present application will now be described in further detail with reference to the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and not intended to limit it. The described embodiments are only a part of the embodiments of this application, and not all of them. All other embodiments obtained by those skilled in the art based on the embodiments of this application without inventive effort are within the scope of protection of this application.
[0029] It should be noted that the terms "system," "device," "unit," and / or "module" used in this application are methods of distinguishing different components, elements, parts, sections, or assemblies at different levels. However, if other terms can achieve the same purpose, they can be replaced by other expressions.
[0030] Hereinafter, the terms "first," "second," and "third" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first," "second," or "third" may explicitly or implicitly include one or more of that feature.
[0031] Internet Protocol (IP) network simulation refers to the use of a simulation bed to analyze, diagnose, simulate, and control IP networks in order to achieve intelligent decision-making and high-efficiency innovation in IP networks.
[0032] With the development of computer technology, IP networks are becoming increasingly large-scale, containing more and more network elements. However, the simulation equipment in simulation beds is limited. Therefore, IP network simulation methods in related technologies cannot simulate large-scale IP networks due to the limited simulation equipment available in simulation beds.
[0033] To address the aforementioned issues, this application provides an IP network simulation method, apparatus, device, medium, and program product. By reusing virtual LAN sub-interfaces, network elements belonging to the same device role in an IP network can be simulated by the same simulation instrument in the simulation bed. Furthermore, through routing optimization and service traffic reconstruction, high-fidelity simulation of large-scale IP networks is achieved even with limited simulation equipment in the simulation bed.
[0034] The IP network simulation method provided in this application will be described in detail below with reference to the accompanying drawings.
[0035] Figure 1 This is a flowchart illustrating an IP network simulation method provided in an embodiment of this application.
[0036] like Figure 1 As shown, the method includes the following steps: Step 101: Obtain the digital twin description of the target IP network and the physical resource description of the simulation bed used for simulating the target IP network; In one embodiment, the target IP network is any IP network, such as a carrier-grade metropolitan area network, backbone network, or large enterprise network. It is understood that the target IP network typically contains a large number of interconnected network elements, far exceeding the physical resource capacity of a typical simulation bed.
[0037] In one embodiment, the digital twin description of the target IP network is a structured digital mirror formed after collecting network data from the target IP network. The digital twin description includes, but is not limited to, network element information, link information, protocol information, routing information, and service traffic information for each network element in the target IP network. Specifically, network element information defines each independent network element in the target IP network, including its name, device role (referring to the functional classification of the network element in the network architecture, such as core forwarding device, border access device, route reflector, etc.), physical or logical port list and its status, and unique identifier. Link information describes the connection relationships between network elements, indicating the starting and ending network elements and their corresponding ports. Protocol information mainly includes the border gateway protocol session and status data of the target IP network, reflecting the peer-to-peer relationship established between network elements for exchanging routing information. Routing information includes reachability information in the target IP network, specifically including the routing prefix, next-hop address, path attributes, and address family identifiers used to distinguish routing types (e.g., address family identifiers for public network routes or virtual private network routes). Traffic information is used to indicate the characteristics of the data actually transmitted in the target IP network. It can be divided into public network traffic information that reflects ordinary Internet access and virtual private network traffic information that reflects isolated communication channels. Virtual private network traffic information is usually associated with specific service identifiers (such as routing targets).
[0038] In one embodiment, the digital twin description can be generated by converting network data collected from the target IP network into a digital twin description according to the twin data interface specification. Specifically, for the target IP network, network data can be collected using network management systems, configuration backups, protocol packet capture, and traffic sampling tools.
[0039] In one embodiment, the physical resource description of the simulation bed is a complete definition of all available physical resources and their connections within the simulation experimental platform. The physical resource description includes the physical devices and simulation instruments of the simulation bed, and a description of the interconnection relationships between these physical devices and simulation instruments via cables. Here, physical devices refer to real network device hardware (such as routers and switches) in the simulation bed capable of running complete network protocol stacks, which can be used to simulate the network behavior of key network elements with high fidelity. Simulation instruments refer to dedicated hardware or software platforms with capabilities for network traffic generation, protocol simulation, and performance testing, used to simulate the network behavior of a large number of homogeneous or minor network elements.
[0040] Step 102: Based on the digital twin description and physical resource description, determine the simulation equipment used when each network element in the target IP network is simulated, and determine the simulation equipment port corresponding to each link in the target IP network, so as to obtain the initial topology mapping relationship between the target IP network and the simulation bed. In one embodiment, the type of simulation equipment (physical device, simulation instrument) used when simulating network elements with different device roles can be determined first according to preset rules and the device roles of each network element. For example, the preset rule can be that core network elements in an IP network must be simulated using physical devices. Specifically, taking a metropolitan area network (MAN) as an example, a MAN typically includes network elements such as the MAN core device (Metro Backbone, MB), core network device (Provincial Backbone, PB), backbone network device (Backbone, BB), and Broadband Remote Access Server (BRAS). The MB is the core device in the MAN, so for a MAN, the preset rule can be that the MB must be simulated using physical devices. After determining the type of simulation equipment used when simulating network elements with different device roles, simulation equipment can be assigned to each network element according to the device roles and physical resource descriptions of each network element in the target IP network in the digital twin description.
[0041] In one embodiment, after determining the simulation device used when each network element in the target IP network is simulated, the idle or designated ports on the corresponding simulation device can be allocated to the network elements at both ends of each link according to the network elements at both ends of the link information. This forms a binding relationship between "network element-simulation device" and a correspondence between "link-port pair", which are then recorded in a structured manner. This yields the initial topology mapping relationship between the target IP network and the simulation bed.
[0042] In one embodiment, since the number of network elements in the target IP network may far exceed the number of simulation devices, there may be some network elements in the initial topology mapping relationship where no simulation instruments can be assigned. In this case, in the initial topology mapping relationship, specific simulation instruments may not be assigned to these network elements. Instead, the simulation instruments corresponding to these network elements may be directly set to empty, or the allocation may continue downward according to the sequence number of the simulation instrument assigned to the previous network element (without caring whether the simulation instrument exists in the simulation bed), and then waiting for subsequent processing.
[0043] Step 103: Based on the initial topology mapping relationship, for the target network element simulated by physical devices, the simulation instruments used by multiple network elements interconnected with the target network element and belonging to the same device role are aggregated into the same simulation instrument, and different virtual LAN sub-interfaces are assigned to multiple links that need to share the same simulation device port due to aggregation, so as to obtain the target topology mapping relationship between the target IP network and the simulation bed. In one embodiment, the target network element refers to the network element that is simulated by physical devices during the simulation and requires network modification operations. There can be one or more target network elements. Taking a metropolitan area network (MAN) as an example, the target network element can be a single MB (Medium-Level Network), or multiple MBs within the MAN, provided the physical devices of the simulation bed meet the requirements.
[0044] In one embodiment, different network elements belonging to the same device role typically exhibit similar network behaviors. For example, in a metropolitan area network (MAN), different BRAS network elements share the same core functions. When performing IP network simulation on a MAN, the focus is on how BRAS network elements interact with MBs, rather than how a specific BRAS network element interacts with an MB. Simultaneously, the simulation instrument, as a simulation device, can simulate a certain type of network behavior. For instance, the simulation instrument's software can instantiate multiple logical virtual devices, each capable of independently running a protocol stack, possessing its own routing table and forwarding logic. Based on this, a single simulation instrument can simultaneously simulate the network behavior of multiple network elements with the same device role.
[0045] In one embodiment, target network elements to be simulated by physical devices can be first selected from the initial topology mapping relationship. Then, for the target network element, all network elements interconnected with the target network element are determined. Furthermore, from all network elements interconnected with the target network element, multiple network elements belonging to the same device role and simulated by a simulation instrument are selected, and the simulation instruments corresponding to these network elements are aggregated into a single simulation instrument, thereby effectively reducing the number of simulation instruments required for IP network simulation. Specifically, aggregating the simulation instruments used by multiple network elements belonging to the same device role into a single simulation instrument includes multiplexing the ports of the simulation instruments used by multiple network elements to the same simulation instrument, and / or multiplexing the instances used by multiple network elements to the same simulation instrument.
[0046] Based on this, network elements requiring network modification operations refer to those network elements belonging to the same device role whose ports of the simulation instrument are reused due to aggregation, or / and those network elements whose instances used during simulation reuse instances of the same simulation instrument, thus requiring network modification during simulation. Specifically, examples include MB1 and MB2.
[0047] In one embodiment, before aggregation, different network elements use different simulation instruments when being simulated, and the simulation device ports of their associated links are also different. However, after aggregation, since the simulation instruments of different network elements are aggregated into the same simulation instrument, multiple links associated with different network elements need to share the same simulation device port due to aggregation. To resolve the conflict of multiple links needing to share the same simulation device port due to aggregation, and to logically maintain communication isolation between different links, it is necessary to allocate a different Virtual Local Area Network (VLAN) sub-interface to each of the multiple links sharing the same simulation device port pair. After allocating different VLAN sub-interfaces to the multiple links that need to share the same simulation device port due to aggregation, the target IP network and the target topology mapping relationship of the simulation bed can be obtained.
[0048] Step 104: Based on the protocol information, routing information, and service traffic information of the target IP network in the digital twin description, as well as the target topology mapping relationship, generate a twin simulation network description; In one embodiment, based on the target topology mapping relationship, specifically based on the binding relationship between "network element-simulation device" and the correspondence between "link-port pair" in the target topology mapping relationship, the protocol information, routing information and service traffic information can be rewritten to generate the twin simulation network protocol configuration corresponding to the protocol information, the twin simulation network routing configuration corresponding to the routing information and the twin simulation network traffic configuration corresponding to the service traffic information.
[0049] In one embodiment, the most important part of the protocol information is the Border Gateway Protocol (BGP) session. Therefore, based on the BGP session in the protocol information, the devices of both sides of the BGP session in the protocol information can be rewritten according to the binding relationship of "network element-emulated device" and the correspondence of "link-port pair" in the target topology mapping relationship. That is, the two sides of the BGP session are rewritten from network elements to the corresponding emulated devices and emulated device ports / VLAN sub-interfaces.
[0050] For routing information, a preset routing optimization algorithm is executed based on the target network element's device role and its BGP neighbor relationships within the routing information. This routing optimization algorithm can normalize and rewrite the announcement source (determined by the announcer's device identifier) of routing information from non-target network elements in a massive amount of routing information.
[0051] For service traffic information, since service traffic is divided into public network service traffic and Virtual Private Network (VPN) service traffic, the public network service traffic information and VPN service traffic information can be rewritten separately. For public network service traffic information, the sampling points of public network service traffic are redirected to the corresponding simulation device ports according to the target topology mapping relationship. For VPN service traffic, a logical traffic binding relationship is established by matching the VPN service identifier with the optimized routing information to generate a twin simulation network traffic configuration that can be executed by the simulation instrument.
[0052] Step 105: Use the twin simulation network description to drive the simulation bed so that the simulation bed can simulate the target IP network.
[0053] In one embodiment, the simulation control engine of the simulation bed can automatically load and parse the twin simulation network description file to drive the simulation bed to simulate the target IP network.
[0054] In summary, the IP network simulation method provided in this application establishes an initial topology mapping relationship between the target IP network and the simulation bed based on the digital twin description of the target IP network and the physical resource description of the simulation bed. Then, according to the device roles of each network element in the target IP network, multiple network elements with the same device roles that originally needed to be simulated by different simulation instruments are aggregated and mapped to the same simulation instrument. For multiple logical links that need to be carried on the same physical port of the simulation bed due to aggregation, a unique virtual LAN sub-interface is automatically allocated to each link, thereby achieving port multiplexing at the physical layer and ensuring traffic isolation of each link at the logical layer. Based on this, the digital twin description (including protocol information, routing information, and service traffic information) is adapted and optimized into the compressed target topology mapping relationship to generate a twin simulation network description, ultimately driving the simulation bed to perform simulation. Therefore, the simulation resource requirements of large-scale IP networks can be compressed to a scale that matches the limited physical resources of the simulation bed, thus achieving high-fidelity simulation of large-scale IP networks even with limited simulation equipment on the simulation bed.
[0055] To facilitate a further understanding of the IP network simulation method provided in the embodiments of this application, the following description uses an application scenario as an example. It should be noted that the following embodiments are all illustrated using this application scenario.
[0056] In this example, such as Figure 2 As shown, Figure 2This is a schematic diagram illustrating the architecture of the IP network simulation method provided in this application embodiment. The target IP network is a metropolitan area network (MAN). The MAN mainly includes multiple MB network elements (such as MB1, MB2), multiple PB network elements (such as PB1, PB2), multiple BB network elements (such as BB1, BB2), multiple BRAS network elements (such as BRAS1, BRAS2, ..., BRASn), and other network elements (...). Figure 2 (Not shown in the image). The topology of each network element in the metropolitan area network is as follows: Figure 2 As shown. When designing simulation scenarios, considering their versatility (they can be used across IP networks in different regions, such as simulating MB network elements in different provincial networks), the device connection relationships and virtual-physical relationships within the simulation scenario can be planned in advance, such as... Figure 2 MB1, MB2, and BRAS1 in the simulation bed simulate network behavior using physical devices, while other network elements (including those not shown in the figure) are simulated by simulation instruments, forming a virtual-real combined simulation scenario design.
[0057] Based on this Figure 3 This is a flowchart illustrating the method for determining the initial topological mapping relationship provided in an embodiment of this application. Figure 3 As shown, step 102 includes the following steps: Step 301: Based on the device roles of each network element in the target IP network described in the digital twin, determine the target network element whose simulation device is a physical device and which needs to undergo network change operations, and the non-target network element whose simulation device is a simulation instrument. In one embodiment, network elements belonging to the core device role in the target IP network can be designated as target network elements, while other network elements can be designated as non-target network elements.
[0058] In one embodiment, the physical devices can highly replicate the network behavior of network elements. Therefore, the more network elements the physical devices used to simulate when simulating an IP network, the more reliable the simulation results. If the number of physical devices in the simulation bed is greater than the number of target network elements, the extra physical devices can be used to simulate any one or more non-target network elements.
[0059] In one embodiment, as described above, since MB1 and MB2 have the device role of MB, and MB is a core network element of the metropolitan area network, MB1 and MB2 can be identified as the target network elements of the physical devices used for simulation. Other network elements, such as PB1 and PB2 with the device role of PB, BB1 and BB2 with the device role of BB, and BRAS1, BRAS2, ..., BRASn with the device role of BRAS, are all considered as non-target network elements used as simulation instruments for simulation. This is to prepare for the aggregation of simulation instruments used by network elements with the same device role into a single simulation instrument. It should be noted that in this application scenario, assuming the simulation bed includes three physical devices, MB1 and MB2 with the device role of MB occupy two physical devices. There is still one idle physical device, so any of the non-target network elements can also be simulated using a physical device. For example, BRAS1 can also be simulated using a physical device, or it could be BRAS2, PB1, or BB2, etc. This application uses BRAS1 being simulated using a physical device as an example for illustration.
[0060] In one embodiment, target network elements and non-target network elements can be stored in the form of a simulation scenario design table (equipment section) as shown in Table 1.
[0061] Table 1 Simulation Scenario Design Table (Equipment Section)
[0062] In Table 1, the value of the Abstract Device Name field indicates the name of the corresponding network element in the simulation scenario; the value of the Device Role field indicates the device role to which the corresponding network element belongs; and the value of the Simulation Device field indicates the simulation device used when the corresponding network element is simulated.
[0063] Correspondingly, such as Figure 2 As shown, the links between each network element are stored in the form of a simulation scenario design table (link section) as shown in Table 2.
[0064] Table 2 shows the simulation scenario design table (link section).
[0065] In Table 2, the value of the Link abstract name field indicates the name of the corresponding link in the simulation scenario; the LocalDevice abstract device name and PeerDevice abstract device name indicate the network elements of the local and peer devices in the simulation scenario, respectively; and the Link simulation type indicates the simulation type of the corresponding link in the simulation scenario. Specifically, the Link simulation type for links between physical devices (both the local and peer devices are physical devices) is Physical, and the Link simulation type for links between physical devices and simulation instruments is Half-Physical.
[0066] Step 302: Based on the physical resource description and the target network element and non-target network element, determine the simulation equipment used when the target network element and non-target network element are simulated; In one embodiment, after determining the target network element to be simulated using physical equipment and the non-target network element to be simulated using simulation instruments, the target network element and the non-target network element can be mapped to physical resource descriptions to determine the simulation equipment used when the target network element and the non-target network element are simulated.
[0067] In one embodiment, the simulation equipment used when simulating the target network element and the non-target network element can also be stored in the form of a data table, as shown in Table 3.
[0068] Table 3 Simulation Scenario - Simulation Bed Resource Mapping Table (Equipment Section)
[0069] In Table 3, for PB1, PB2, BB1, BB2, BRAS2, etc., which are simulated by simulation instruments, since the number of network elements in the target IP network may far exceed the number of simulation devices, there may be situations where some network elements do not have simulation instruments available for allocation. In this case, the simulation instruments corresponding to the non-target network elements can be directly arranged downwards by serial number. For example, instruments 4 and 5 may not exist in the simulation bed, but they can be processed later.
[0070] Step 303: Based on the simulation devices used when the target network element and non-target network element are simulated, and the link information of the target IP network in the digital twin description, determine the simulation device port corresponding to each link in the target IP network.
[0071] In one embodiment, the simulated device ports corresponding to each link in the target IP network can also be stored in the form of a data table, as shown in Table 4.
[0072] Table 4 Simulation Scenario - Simulation Bed Resource Mapping Table (Link Section)
[0073] It should be noted that Table 4 only uses Links 1-5 as examples, and does not represent all links in the target IP network.
[0074] The scheme shown in steps 301 to 303 avoids the inefficiency and arbitrariness of manually specifying the simulation devices used when simulating network elements one by one by using the device role-driven initial classification of network elements. It not only provides a clear operation boundary for the subsequent aggregation of simulation instruments used when simulating multiple non-target network elements belonging to the same device role into the same instrument, but also improves the simulation efficiency of the target IP network.
[0075] In one embodiment, different network elements belonging to the same device role typically exhibit similar network behaviors. Furthermore, the simulation instrument's software can instantiate multiple logical virtual devices, each capable of independently running a protocol stack, possessing its own routing table and forwarding logic. Based on this, a single simulation instrument can simultaneously simulate the network behavior of multiple network elements with the same device role.
[0076] Based on this, based on this, Figure 4 This is a flowchart illustrating the method for determining a target topology mapping relationship provided in an embodiment of this application. Figure 4 As shown, step 103 includes the following steps: Step 401: For each target network element, based on the link information of the target IP network in the digital twin description, determine the first non-target network element interconnected with the target network element and the device role of the first non-target network element. In one embodiment, such as Figure 2 As shown in Tables 3 and 4, the target network elements are MB1, MB2 and BRAS1.
[0077] The first non-target network elements interconnected with target network elements MB1, MB2, and BRAS1 are PB1, PB2, BB1, BB2, BRAS2, BRAS3, and BRAS4. It should be noted that BRAS3 and BRAS4 are... Figure 2 And not shown in Tables 3 and 4.
[0078] The device roles of PB1 and PB2 belong to PB, the device roles of BB1 and BB2 belong to BB, and the device roles of BRAS2, BRAS3, and BRAS4 belong to BRAS.
[0079] Step 402: Based on the device role of the first non-target network element, aggregate the simulation instruments used by multiple first non-target network elements belonging to the same device role in the initial topology mapping relationship into the same simulation instrument. In one embodiment, as in step 401, the simulation instruments used when PB1 and PB2 are simulated can be aggregated into the same simulation instrument, such as instrument 1; the simulation instruments used when BB1 and BB2 are simulated can be aggregated into the same simulation instrument, such as instrument 2; the simulation instruments used when BRAS2, BRAS3, and BRAS4 are simulated can be aggregated into the same simulation instrument, such as instrument 3. As shown in Table 5 below.
[0080] Table 5. Mapping Table between Digital Twins and Physical Resource Descriptions (Equipment Section)
[0081] Step 403: Determine the target links and assign a virtual LAN sub-interface to each link in the target links; In one embodiment, the target link refers to multiple links that need to share the same emulation device port due to aggregation.
[0082] Step 404: Assign an initial VLAN sub-interface port number to the first link in the target link, and assign a VLAN sub-interface port number to the nth link in the target link after incrementing the initial VLAN sub-interface port number by n-1.
[0083] In one embodiment, as shown in Table 6 below.
[0084] Table 6. Mapping Table between Digital Twins and Physical Resource Descriptions (Link Section)
[0085] In one embodiment, the local port and the peer port of the same link in the target link have the same virtual LAN sub-interface port number.
[0086] In one embodiment, after obtaining the target topology mapping relationship, the simulation type of each network element is determined based on the target topology mapping relationship.
[0087] For example, for MB1, its device role is MB, and the simulation device is physical device R1. In this case, the simulation type of MB1 is determined to be the first type (such as Physical); the simulation types of MB2 and BRAS1 are also Physical.
[0088] For example, for PB1, its device role is PB, and its simulation device is simulation instrument. When PB1 is simulating, it is directly connected to the physical device R1. In this case, the simulation type of MB1 is determined to be the second type (such as Simulated). The simulation type of PB2, BB1, BB2, BRAS2, BRAS3, etc. is also Simulated.
[0089] For network elements whose simulation devices are simulation instruments and which are not directly connected to physical devices during simulation, the simulation type is the third type (such as Emulated).
[0090] That is, for each network element in the target IP network, if physical device simulation is used, its simulation type is determined to be Physical; if simulation instrument simulation is used and it is directly connected to physical device during simulation, its simulation type is determined to be Simulated; if simulation instrument simulation is used and it is not directly connected to physical device during simulation, its simulation type is determined to be Emulated.
[0091] It should be noted that for network elements with simulation type "Simulated" and simulation type "Emulated", the simulation equipment used during simulation is a simulation instrument.
[0092] Specifically, it can be seen in Table 7 below.
[0093] Table 7. Twin Scenario Data Model (Device Section)
[0094] In one embodiment, after obtaining the target topology mapping relationship, the simulation type of each link is determined based on the target topology mapping relationship.
[0095] For each link in the target IP network, if both the local device and the peer device are physical devices when being simulated, the simulation type of the corresponding link is type 1 (e.g., Physical); if either the local device or the peer device is a physical device when being simulated, the simulation type of the corresponding link is type 2 (e.g., Half-Physical); if both the local device and the peer device are simulation instruments when being simulated, the simulation type of the corresponding link is type 3 (e.g., Simulated).
[0096] Specifically, it can be seen in Table 8 below.
[0097] Table 8. Twin Scenario Data Model (Link Part)
[0098] Based on the foregoing description, this application's embodiments determine the target topology mapping relationship for a logical topology carrying a large-scale IP network on limited physical resources. This target topology mapping relationship not only clarifies the mapping between network elements of the target IP network and simulation devices, but more importantly, by aggregating simulation instruments and VLAN sub-interface allocation through device roles, port multiplexing is achieved at the physical layer while maintaining the independence of the original links at the logical layer. However, a runnable simulation environment requires not only a correct topology structure but also dynamic network behavior carried on that topology. Therefore, based on the determined target topology mapping relationship, this application's embodiments further adapt, optimize, and reconstruct the protocol information, routing information, and service traffic information in the digital twin description to generate a twin simulation network description that can drive the simulation bed to perform high-fidelity simulation.
[0099] Based on this Figure 5 This is a flowchart illustrating the method for determining a twin simulation network description provided in an embodiment of this application. Figure 5 As shown, step 104 includes the following steps: Step 501: For each target network element, based on the boundary gateway protocol session and target topology mapping relationship in the protocol information, rewrite the protocol information to obtain the twin simulation network protocol configuration. In one embodiment, BGP session data recorded in the protocol information can be read, and the two parties (network elements and addresses) of the recorded BGP sessions can be mapped and replaced with the corresponding emulation devices and their logical interfaces (emulation device ports or VLAN sub-interfaces) according to the target topology mapping relationship. Specifically, for BGP sessions where the session peers are aggregated to the same emulation instrument, they are bound to the specified physical port (emulation device port) and VLAN sub-interface according to the target topology mapping relationship. Through this process, a twin emulation network protocol configuration that is fully adapted to the target topology mapping relationship and defines all necessary peer connections is generated.
[0100] Step 502: For each target network element, based on the device role and the boundary gateway protocol neighbor relationship in the routing information of the network element, rewrite the routing information to obtain the twin simulation network routing configuration; In one embodiment, firstly, the BGP neighbor set of the target network element in the simulation environment is determined based on the target topology mapping relationship. Secondly, based on the device role of the target network element itself and the device roles of its BGP neighbors, a differentiated routing processing strategy is executed: when the target network element is a route reflector, the routing information published by its BGP neighbors is collected; when the target network element is not a route reflector, the advertiser device identifier rewriting operation is performed on the routing information from BGP neighbors that are not route reflectors, and it is uniformly normalized into a virtual identifier representing the route reflector. Finally, the processed routing information is deduplicated and aggregated to generate a twin simulation network routing configuration with significantly reduced data volume but retained key reachability information.
[0101] Step 503: For each target network element, rewrite the service traffic information to obtain the twin simulation network traffic configuration of public network service traffic and virtual private network service traffic; In one embodiment, for public network service traffic, based on the target topology mapping relationship, traffic sampling records are matched and redirected to the corresponding simulation instrument port of the physical device-simulation instrument hybrid link to generate background traffic configuration. For VPN service traffic, the VPN service identifier is extracted, associated with the matching VPN routing information in the routing information, and the service logic is mapped to a specific traffic binding instruction from the source simulation instrument port to the destination simulation instrument port based on the target topology mapping relationship, thereby generating test traffic configuration for verifying VPN service connectivity.
[0102] Step 504: Based on the target topology mapping relationship, twin network protocol configuration, twin network routing configuration, and twin network traffic configuration, obtain the twin network description.
[0103] It is understandable that steps 501, 502 and 503 can be executed in any order, or they can be executed in parallel to improve simulation efficiency.
[0104] Specifically, Figure 6 This is a flowchart illustrating the method for determining the configuration of a twin emulation network protocol provided in an embodiment of this application. Figure 6 As shown, step 501 includes the following steps: Step 601: For each border gateway protocol session in the protocol information, based on the target topology mapping relationship, determine the simulation device used when the network elements of both parties in the border gateway protocol session are simulated. In one embodiment, a BGP session is a BGP peering relationship between network elements in a target IP network, recorded in the protocol information. The protocol information includes at least the following key fields: DeviceName (local network element name), AttachedDevice (peer network element name), AFI / SAFI (address family / sub-address family identifier), and SessionIPv4 / RemoteSessionIPv4 (IPv4 session address / remote IPv4 session address), etc.
[0105] In one embodiment, by traversing each BGP session in the protocol information and querying the target topology mapping relationship based on the local and remote network element names recorded in the session, the simulation devices used by the network elements of both parties in the session can be obtained.
[0106] For example, in a BGP session "MB1-BB1", querying the target topology mapping relationship shows that MB1 is mapped to physical device R1, while BB1 is mapped to simulation instrument 2. Therefore, it can be determined that the local simulation device of this BGP session is R1, and the remote simulation device is instrument 2.
[0107] Step 602: If the simulation device used when the peer network element in the session is simulated is also a physical device, then the corresponding border gateway protocol session is determined to be the first border gateway protocol session; if the simulation device used when the peer network element in the session is simulated is a simulation instrument, then the corresponding border gateway protocol session is determined to be the second border gateway protocol session. In one embodiment, this step performs key classification of the BGP session based on the type of emulation device used by the peer network element in the BGP session, so as to facilitate subsequent differentiated processing. The implementation method is as follows: after determining the emulation devices of both parties in step 601, the type of emulation device corresponding to the peer network element is determined.
[0108] If the emulated device used by the peer network element is also a physical device, then this BGP session is classified as a first BGP session. A first BGP session represents a direct peer-to-peer connection between two physical devices in the emulated environment.
[0109] If the emulation device used by the peer network element is an emulation instrument, then this BGP session is classified as a second BGP session. A second BGP session represents a peer-to-peer connection between a physical device and an emulation instrument.
[0110] Step 603: Based on the target topology mapping relationship, rewrite the first border gateway protocol session and the second border gateway protocol session to obtain the configuration of the first border gateway protocol session and the configuration of the second border gateway protocol session. Specifically, step 603 includes: Step 6031: Based on the target topology mapping relationship, determine the first emulation device port corresponding to the link carrying the first border gateway protocol session; In one embodiment, based on the link portion of the target topology mapping relationship, the link between the two physical devices connecting the two parties of the first border gateway protocol session is found, and the specific simulation device port pair used by the link on the simulation bed is obtained, that is, the first simulation device port is obtained.
[0111] Step 6032: Based on the port of the first simulation device, rewrite the first border gateway protocol session to obtain the configuration of the first border gateway protocol session.
[0112] In one embodiment, the original protocol record corresponding to the BGP session can be obtained, including its DeviceName, AttachedDevice, AFI / SAFI, and other BGP session information such as SessionIPv4 / RemoteSessionIPv4. Based on the physical interface IP address associated with the first emulated device port determined in step 6031, the IP addresses of the local and peer emulated devices in the SessionIPv4 / RemoteSessionIPv4 field are rewritten. The DeviceName and AttachedDevice fields are replaced with the corresponding physical device identifiers (e.g., R1, R2). The AFI / SAFI field remains unchanged. After rewriting, a new BGP configuration record that can be directly sent to the physical device is generated, namely the first border gateway protocol session configuration.
[0113] Step 6033: Based on the target topology mapping relationship, determine the first virtual LAN sub-interface corresponding to the link carrying the second border gateway protocol session; In one embodiment, similar to step 6031, the link connecting the local physical device and the peer simulation instrument corresponding to the second BGP session can be found based on the target topology mapping relationship. Since peer network elements may be aggregated into the same simulation instrument when being simulated, this link is logically distinguished through a virtual LAN sub-interface. Thus, the VLAN sub-interface of the link corresponding to the second BGP session, i.e., the first virtual LAN sub-interface, can be determined.
[0114] Step 6034: Based on the first virtual LAN sub-interface, rewrite the second border gateway protocol session to obtain the second border gateway protocol session configuration.
[0115] In one embodiment, on the local physical device side, the local address in the SessionIPv4 / RemoteSessionIPv4 field is rewritten to the IP address of the first VLAN sub-interface. On the peer simulation instrument side, RemoteSessionIPv4 is rewritten to the IP address of the simulation instrument's first VLAN sub-interface. The DeviceName field is rewritten to the local physical device, and the AttachedDevice field is rewritten to the peer simulation instrument. The AFI / SAFI fields remain unchanged. After rewriting, a new BGP configuration record is generated, namely the Second Border Gateway Protocol Session Configuration, which is used to establish a BGP session between the sub-interface of the physical device and the logical port of the simulation instrument.
[0116] It is understood that there is no specific order of execution between steps 6031 to 6032 and steps 6033 to 6034. Preferably, steps 6031 to 6032 and steps 6033 to 6034 can be executed simultaneously in parallel to improve simulation efficiency.
[0117] Step 604: Based on the first border gateway protocol session configuration and the second border gateway protocol session configuration, obtain the twin simulation network protocol configuration.
[0118] Specifically, the twin emulation network protocol configuration is shown in Table 9 below.
[0119] Table 9. Description of Twin Networks (Protocol Information)
[0120] Specifically, Figure 7 This is a flowchart illustrating the method for determining the routing configuration of a twin network provided in an embodiment of this application. Figure 7 As shown, step 502 includes the following steps: Step 701: For each target network element, determine the set of simulated neighbor devices that are simulated instruments in the target topology mapping relationship and have a border gateway protocol neighbor relationship with the target network element; In one embodiment, firstly, a list of all neighboring network elements that have BGP neighbor relationships with the current target network element is obtained from the protocol information. Then, the target topology mapping relationship is queried, and network elements whose simulation devices used during simulation are simulation instruments (i.e., network elements with the above simulation type of Simulated or Emulated) are selected from the list of neighboring network elements. These selected network elements constitute the simulation neighbor device set Dev. bgpFor example, taking the target network element as MB1, the network elements that have BGP neighbor relationships with MB1 include MB2, BB1, PB1, BRAS1, BRAS2, etc. After querying the target topology mapping relationship, it is determined that the simulation device used by BB1, PB1, and BRAS2 when they are simulated is a simulation instrument. Then, BB1, PB1, and BRAS2 are added to the set of simulation neighbor devices of MB1.
[0121] Step 702: Determine whether the target network element's device role is a route reflector; In one embodiment, the device role of the target network element can be determined based on the device role contained in the digital twin description.
[0122] Understandably, taking MB1 as an example, the device role of MB1 can be either MB or RR.
[0123] If the judgment result is yes, proceed to step 703; If the judgment result is negative, proceed to step 705; Step 703: Based on the routing information, determine the routing information published by each simulated neighbor device in the simulated neighbor device set; In one embodiment, when the target network element is RR, its Dev bgp The simulated neighbor device in the routing information can be considered a "client" that needs to be routed by the RR reflection. Therefore, the Dev can be found from the routing information. bgp This includes all routing information published by each simulated neighbor device. Each routing information entry contains DeviceName (the network element name that advertises this route, i.e., AttachedDevice in Table 9), StartPrefix (routing prefix), NhopAddr (next-hop address), SAFI (routing subclass, identified as unicast or VPN), and other path attributes (such as ASPath (Autonomous System Path), RT (Route Target), etc.).
[0124] Specifically, the routing configuration for the twin simulation network is shown in Table 10 below.
[0125] Table 10. Description of the twin network (routing information)
[0126] Step 704: Write the routing information published by the simulated neighbor devices into the twin network routing configuration; In one embodiment, for a twin emulator (RR), its routing configuration is a collection of routing information advertised by all its emulated neighbor devices. Therefore, the routing information advertised by the emulated neighbor devices can be directly written into the twin emulator network routing configuration.
[0127] Step 705: Determine whether the simulated neighbor devices in the simulated neighbor device set are route reflectors; In one embodiment, the method for determining whether a simulated neighbor device in the simulated neighbor device set is an RR is the same as the method for determining whether the target network element is an RR, and can be referred to step 702, which will not be repeated here.
[0128] It is understandable that when the device role of the simulated neighbor device is RR, it can be divided into RR / RRVPN.
[0129] If the judgment result is yes, proceed to step 706; If the result is negative, proceed to step 707; Step 706: Write the routing information published by the simulated neighbor devices into the twin network routing configuration; In one embodiment, similar to step 704, for an RR, its routing configuration is a collection of routing information published by all its emulated neighbor devices. Therefore, when the device role of an emulated neighbor device is RR (or RRVPN), the routing information published by the emulated neighbor device can be directly written into the twin network routing configuration.
[0130] Step 707: Rewrite the advertiser device identifier in the routing information published by the simulated neighbor device; write the rewritten routing information into the twin network routing configuration after deduplication.
[0131] In one embodiment, when the device role of the emulated neighbor device is not RR (or RRVPN), the advertiser device identifier in the routing information published by the emulated neighbor device needs to be rewritten. Specifically, as shown in Table 10, the rewriting mainly targets the advertiser device identifier in the routing information, while keeping its StartPrefix, NhopAddr, SAFI, and other path attributes unchanged. The advertiser device identifier (i.e., the DeviceName field in Table 10) is rewritten. The rewriting rules are based on the SAFI (Address Family Identifier) field of the routing information. Specifically, rewriting the advertiser device identifier in the routing information published by the emulated neighbor device includes: Based on the address family identifier in the routing information published by the simulated neighbor device, the advertiser device identifier in the routing information is rewritten to the preset route reflector device identifier; If the address family identifier in the routing information is a public unicast address family, then the advertiser device identifier in the routing information will be rewritten as a Type I route reflector device identifier. In one embodiment, if the SAFI identifier is unicast (i.e., SAFI=[1,1] / [2,1], i.e., public network unicast address family), then the DeviceName (announcing device identifier) of the routing information is rewritten to a preset device identifier representing the public network routing reflection function, i.e., the first type of route reflector device identifier (e.g., the name of a certain actual RR device in the IP network).
[0132] If the address family identifier in the routing information is a Virtual Private Network (VPN) address family, then the advertiser device identifier in the routing information will be rewritten as a Type 2 route reflector device identifier.
[0133] In one embodiment, if the SAFI identifier is vpn (i.e., SAFI=[1,128] / [2,128], i.e., virtual private network address family), then the DeviceName (announcing device identifier) of the routing information is rewritten to a preset device identifier representing the VPN route reflection function, i.e., the second type route reflector device identifier (e.g., the name of an actual RRVPN device in the IP network).
[0134] This rewrite rule abstracts a large amount of specific and scattered routing information from different ordinary neighbor devices into a unified system published by a few routing reflectors, thereby compressing and aggregating routing information while maintaining the integrity of routing reachability information.
[0135] Specifically, Figure 8 This is a flowchart illustrating the method for determining the service traffic configuration of a twin network provided in an embodiment of this application. Figure 8 As shown, step 503 includes the following steps: Step 801: For each target network element, extract the public network service traffic information and virtual private network service traffic information associated with each target network element from the service traffic information. In one embodiment, step 801 is the starting point for determining the twin network service traffic configuration, aiming to separate different service traffic data related to the current target network element. The service traffic information includes raw service traffic information collected from the target IP network. This is implemented by using the current target network element as the filtering anchor point and processing the following: Public network service traffic information: Extract traffic records from the network traffic sampling data (such as Netflow information) contained in the service traffic information, where the sampling point device name (SampleNodeName) is the current target network element or its related port.
[0136] VPN service traffic information: Extract VPN service records whose PEName (the network element PE (Provider Edge) node of the VPN site) is the current target network element from the VPN service data contained in the service traffic information.
[0137] Step 802: Based on the target topology mapping relationship, rewrite the public network service traffic information and the virtual private network service traffic information to obtain the twin simulation network traffic configuration of the public network service traffic and the twin simulation network traffic configuration of the virtual private network service traffic.
[0138] Specifically, in step 802, based on the target topology mapping relationship, the public network service traffic information is rewritten to obtain the twin simulation network traffic configuration of the public network service traffic, including: Step 8021: Determine the first link associated with each target network element; the first link refers to the physical device-simulation instrument hybrid link associated with the target network element; In one embodiment, based on the target topology mapping relationship, all first links with the current target network element (the simulated device being the physical device) as one end and the simulated instrument as the other end are found. As shown above, the simulation type of the first link is HalfPhysical (physical device-simulation instrument hybrid link). The first link is the key channel for public network service traffic to enter or leave the simulation core (physical device).
[0139] Step 8022: Filter the first public network service traffic information corresponding to the first link from the public network service traffic information; rewrite the sending destination of the first public network service traffic information to the simulation instrument port of the corresponding first link to obtain the twin simulation network traffic configuration of the public network service traffic.
[0140] In one embodiment, the public network service traffic information extracted in step 801 is traversed. For each public network service traffic record, its SampleNodeName and SamplePortName (device port) fields are checked. If the "device-port" pair completely matches the "LocalDevice-LocalPort" of any first link on the physical device side, then the public network service traffic record is filtered as the first public network service traffic information.
[0141] Each selected first public network service traffic entry is rewritten. Other characteristic information such as SourceIp (traffic source address), DestIp (traffic destination address), and Load / Framesize (load / frame size) remains unchanged. The SourcePort (traffic sending port) field is rewritten to the port on the peer end (simulation instrument side) of the first link, i.e., the PeerPort instrument port in Table 11 below. After rewriting, the public network service traffic entry is transformed into a traffic sending command executable by the simulation instrument. All rewritten records are summarized to obtain the twin simulation network traffic configuration for public network service traffic. Specifically, it is shown in Table 11 below: Table 11. Description of Twin Network (Public Network Service Traffic Information)
[0142] Specifically, in step 802, based on the target topology mapping relationship, the VPN service traffic information is rewritten to obtain the twin simulation network traffic configuration of the VPN service traffic, including: Step 8023: Extract the first virtual private network service traffic information with the target network element as the site from the virtual private network service traffic information; and filter out the routing information from the routing information that the address family identifier is a virtual private network address family and is consistent with the virtual private network service identifier of the first virtual private network service traffic information, and use it as the matching routing information; In one embodiment, step 801 has extracted VPN service information with the current target network element as the PEName, namely the first virtual private network service traffic information VPN. Local VPN Local Key fields include Name (VPN leased line site name), VpnInstance (VPN leased line name), RT (Route Target), and CEName (the CE (Customer Edge) network element included in this VPN). Specifically, as shown in Table 12 below, Table 12. Description of the twin network (VPN service traffic information section)
[0143] In one embodiment, based on VPN Local The Virtual Private Network Service Identifier (RT) in the configuration is used to filter out VPNs from the twin network routing configuration. Local All SAFIs in the middle are VPNs, and RT and VPN are also available. Local Routing information consistent with RT is used as the matching routing information for RouteVPN. Peer .
[0144] Step 8024: Based on the target topology mapping relationship, determine the simulation device port corresponding to the site of the first virtual private network service traffic information, and determine the simulation device port corresponding to the destination of the matching routing information as the destination of the first virtual private network service traffic information, thereby obtaining the twin simulation network traffic configuration of the virtual private network service traffic.
[0145] In one embodiment, the VPN is mapped according to the target topology mapping relationship. Local The CEName in the URL is mapped to its corresponding simulation instrument logic port, which is the VPN port. Local SourcePort.
[0146] In one embodiment, for each matching route information filtered in step 804, its DeviceName identifies the remote destination PE device. Based on the target topology mapping relationship, the logical port of the simulation instrument mapped to the destination PE device is determined. Based on this, a traffic binding record is created: with CEName as the SourceBinding (source device information), and the matching RouteVPN... Peer (That is, matching the remote destination indicated by the routing information) is DestBinding (destination device information), and SourcePort is specified. After generating all bound traffic records for all relevant VPN service traffic of the current target network element, the virtual private network service traffic twin simulation network traffic configuration is obtained.
[0147] Specifically, as shown in Table 11 below, Table 11. Twin Network Description (VPN Service Traffic Bound to Traffic)
[0148] The following application scenario will be used to verify the IP network simulation method provided in the embodiments of this application.
[0149] In this application scenario, using data collected from a provincial network as a prototype, a digital twin is created through a digital twin simulation platform to describe and reconstruct the network information. The specific details are as follows: The digital twin description contains 549 network devices and 4916 links or port connections. After twin simulation reconstruction, 3 physical devices and 9 port connections are required. The entire twin network is then reconstructed using these 9 ports. Taking the network device HBXYA-MB-CMNET-RT01-ZYL-NE5000E, abbreviated as MB-RT01, as an example, this device is simulated using physical devices. Network link mapping and compression are performed based on the topology connected to this device. A link compression processing method is adopted for physical devices connected to devices with the same device role. MBRT01 has a large number of connections with the BRAS device (simulated by the simulation instrument). Since they are simulation instruments corresponding to the same device role, they can be mapped to a single physical port and separated by VLAN sub-interfaces, achieving a topology compression ratio of 0.4%.
[0150] In twin networks, it is also necessary to optimize the routing information simulation algorithm. Taking the public network routing table as an example, there are currently 2,331,739 routing entries for IPv4 and 1,326,363 for IPv6. After algorithm optimization, the number of routing entries is reduced to 225,414 and 229,342 respectively, which reduces the number of routes by about 90% (IPv4) and 83% (IPv6), respectively, greatly improving the capability and efficiency of routing twin simulation. Using a public network routing reconstruction algorithm, the public network service traffic associated with the three twin network elements MB1 / MB2 / BRAS1 is reconstructed. The public network service traffic entries are distributed as follows: IPv4-2536 / 2536 / 891 and IPv6-1027 / 1027 / 227. VPN service traffic is bound traffic based on the twin network element devices as the local endpoint and the remote VPN route as the foundation. The specific VPN service constructed consists of 29 VPN groups.
[0151] Therefore, the IP network simulation method provided in this application can realize the reconstruction of the network topology, routing and key traffic of ultra-large-scale live networks using a small number of real physical devices and simulation instruments, improve the efficiency of IP network simulation, and provide a platform environment for subsequent feedback of real network behavior and state changes.
[0152] To implement the IP network simulation method provided in the embodiments of this application, this application also provides an IP network simulation device. Figure 9 This is a schematic diagram of the structure of an IP network simulation device provided in an embodiment of this application. Figure 9 As shown, the IP network simulation device includes: The acquisition module 901 is used to acquire the digital twin description of the target IP network and the physical resource description of the simulation bed used for simulating the target IP network. The initial topology mapping relationship generation module 902 is used to determine the simulation equipment used when each network element in the target IP network is simulated, and to determine the simulation equipment port corresponding to each link in the target IP network, based on the digital twin description and physical resource description, so as to obtain the initial topology mapping relationship between the target IP network and the simulation bed. The target topology mapping relationship generation module 903, based on the initial topology mapping relationship, aggregates the simulation instruments used by multiple network elements that are interconnected with the target network elements and belong to the same device role into the same simulation instrument when they are simulated, and assigns different virtual local area network sub-interfaces to multiple links that need to share the same simulation device port due to aggregation, thereby obtaining the target topology mapping relationship between the target IP network and the simulation bed. The twin simulation network description generation module 904 is used to generate a twin simulation network description based on the protocol information, routing information, and service traffic information of the target IP network in the digital twin description, as well as the target topology mapping relationship. Simulation module 905 is used to drive the simulation bed using a twin simulation network description so that the simulation bed can simulate the target IP network.
[0153] In one embodiment, the initial topology mapping relationship generation module 902 is specifically used for: Based on the device roles of each network element in the target IP network described in the digital twin, the target network element whose simulation device is a physical device and which needs to undergo network change operations is identified, as well as the non-target network element whose simulation device is a simulation instrument. Based on the physical resource description, and the target network element and non-target network element, the simulation equipment used when the target network element and non-target network element are simulated are determined respectively; Based on the simulation devices used when simulating the target network element and non-target network elements, and the link information of the target IP network in the digital twin description, the simulation device ports corresponding to each link in the target IP network are determined.
[0154] In one embodiment, the target topology mapping relationship generation module 903 is specifically used for: For the target network element, based on the link information of the target IP network in the digital twin description, determine the first non-target network element interconnected with the target network element and the device role of the first non-target network element; Based on the device role of the first non-target network element, the simulation instruments used by multiple first non-target network elements belonging to the same device role in the initial topology mapping relationship are aggregated into the same simulation instrument.
[0155] In one embodiment, the target topology mapping relationship generation module 903 is specifically used for: Identify the target links and assign a virtual LAN sub-interface to each link in the target links; the target links refer to multiple links that need to share the same emulation device port due to aggregation; Assign an initial VLAN sub-interface port number to the first link in the target link, and assign a VLAN sub-interface port number to the nth link in the target link after incrementing the initial VLAN sub-interface port number by n-1. In this case, the local port and the virtual LAN sub-interface port number of the same link in the target link are the same.
[0156] In one embodiment, the twin simulation network description generation module 904 is specifically used for: For each target network element, based on the boundary gateway protocol session and target topology mapping relationship in the protocol information, the protocol information is rewritten to obtain the twin simulation network protocol configuration. For each target network element, based on the device role and the boundary gateway protocol neighbor relationship in the routing information of the network element, the routing information is rewritten to obtain the twin simulation network routing configuration. For each target network element, the service traffic information is rewritten to obtain the twin simulation network traffic configuration of public network service traffic and virtual private network service traffic; Based on the target topology mapping relationship, twin network protocol configuration, twin network routing configuration, and twin network traffic configuration, a twin network description is obtained.
[0157] In one embodiment, the twin simulation network description generation module 904 is specifically used for: For each border gateway protocol session in the protocol information, based on the target topology mapping relationship, determine the simulation device used when the network elements of both parties in the border gateway protocol session are simulated; If the emulation device used when the peer network element is emulated in both parties of the session is also a physical device, then the corresponding border gateway protocol session is determined to be the first border gateway protocol session; if the emulation device used when the peer network element is emulated in both parties of the session is an emulation instrument, then the corresponding border gateway protocol session is determined to be the second border gateway protocol session. Based on the target topology mapping relationship, the first border gateway protocol session and the second border gateway protocol session are rewritten to obtain the configuration of the first border gateway protocol session and the configuration of the second border gateway protocol session. Based on the first and second border gateway protocol session configurations, the twin simulation network protocol configuration is obtained.
[0158] In one embodiment, the twin simulation network description generation module 904 is specifically used for: Based on the target topology mapping relationship, determine the first simulated device port corresponding to the link carrying the first border gateway protocol session; Based on the port of the first simulation device, the first border gateway protocol session is rewritten to obtain the configuration of the first border gateway protocol session.
[0159] In one embodiment, the twin simulation network description generation module 904 is specifically used for: Based on the target topology mapping relationship, determine the first virtual LAN sub-interface corresponding to the link carrying the second border gateway protocol session; Based on the first virtual LAN sub-interface, the second border gateway protocol session is rewritten to obtain the second border gateway protocol session configuration.
[0160] In one embodiment, the twin simulation network description generation module 904 is specifically used for: For each target network element, determine the set of simulated neighbor devices that are simulated instruments in the target topology mapping relationship and have a border gateway protocol neighbor relationship with the target network element; Based on whether the target network element's device role is a route reflector and whether the simulated neighbor devices in the simulated neighbor device set are route reflectors, the routing information is rewritten to obtain the twin simulation network routing configuration.
[0161] In one embodiment, the twin simulation network description generation module 904 is specifically used for: If the target network element's device role is a route reflector, then based on the routing information, determine the routing information published by each simulated neighbor device in the simulated neighbor device set; and write the routing information published by the simulated neighbor devices into the twin network routing configuration. If the target network element's device role is not a route reflector, then determine whether the simulated neighbor device in the simulated neighbor device set is a route reflector; if the simulated neighbor device is a route reflector or a VPN route reflector, then write the routing information published by the simulated neighbor device into the twin network routing configuration; if the simulated neighbor device is not a route reflector or a VPN route reflector, then rewrite the advertiser device identifier in the routing information published by the simulated neighbor device; after deduplication, write the rewritten routing information into the twin network routing configuration.
[0162] In one embodiment, the twin simulation network description generation module 904 is specifically used for: Based on the address family identifier in the routing information published by the simulated neighbor device, the advertiser device identifier in the routing information is rewritten to the preset route reflector device identifier; If the address family identifier in the routing information is a public network unicast address family, then the advertiser device identifier in the routing information will be rewritten as a Type I route reflector device identifier. If the address family identifier in the routing information is a Virtual Private Network (VPN) address family, then the advertiser device identifier in the routing information will be rewritten as a Type II route reflector device identifier.
[0163] In one embodiment, the twin simulation network description generation module 904 is specifically used for: For each target network element, extract the public network service traffic information and virtual private network service traffic information associated with each target network element from the service traffic information; Based on the target topology mapping relationship, the public network service traffic information and the virtual private network service traffic information are rewritten to obtain the twin simulation network traffic configuration of the public network service traffic and the twin simulation network traffic configuration of the virtual private network service traffic.
[0164] In one embodiment, the twin simulation network description generation module 904 is specifically used for: Determine the first link associated with each target network element; the first link refers to the hybrid link of physical device and simulation instrument associated with the target network element; From the public network service traffic information, filter out the first public network service traffic information corresponding to the first link; rewrite the sending destination of the first public network service traffic information to the simulation instrument port of the corresponding first link to obtain the twin simulation network traffic configuration of the public network service traffic.
[0165] In one embodiment, the twin simulation network description generation module 904 is specifically used for: From the VPN service traffic information, extract the first VPN service traffic information with the target network element as the site; and from the routing information, filter out the routing information whose address family identifier is a VPN address family and is consistent with the VPN service identifier of the first VPN service traffic information, and use it as the matching routing information. Based on the target topology mapping relationship, the simulated device port corresponding to the site of the first virtual private network service traffic information is determined, and the simulated device port corresponding to the destination of the matching routing information is determined as the destination of the first virtual private network service traffic information, so as to obtain the twin simulation network traffic configuration of the virtual private network service traffic.
[0166] In one embodiment, the Virtual Private Network (VPN) service is identified as the routing target.
[0167] The methods and apparatus provided in the embodiments of this application have been described above. To implement the functions of the methods provided in the embodiments of this application, the IP network simulation apparatus may include hardware structures and software modules, and may implement the above functions in the form of hardware structures, software modules, or a combination of hardware structures and software modules. One of the above functions may be executed in the form of hardware structures, software modules, or a combination of hardware structures and software modules.
[0168] Figure 10 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application; the electronic device is used to implement the above-described IP network emulation method. For example, the electronic device 1000 may be a computer, a personal digital assistant, etc.
[0169] Reference Figure 10 The electronic device 1000 may include a communication interface 1001, capable of interacting with other devices; a processor 1002, connected to the communication interface 1001 to interact with other devices, used to execute the methods provided by one or more of the above-described technical solutions when running a computer program; and a memory 1003, on which the computer program is stored. Specifically, the specific processing operations of the processor 1002 can refer to the IP network simulation method described in the above embodiments of this disclosure.
[0170] Of course, in practical applications, the various components in electronic device 1000 are coupled together through bus system 1004. It can be understood that bus system 1004 is used to realize the connection and communication between these components. In addition to a data bus, bus system 1004 also includes a power bus, a control bus, and a status signal bus. However, for the sake of clarity, in... Figure 10 The general labeled all buses as Bus System 1004.
[0171] The memory 1003 in this embodiment is used to store various types of data to support the operation of the electronic device 1000. Examples of such data include any computer program used to operate on the electronic device 1000.
[0172] The methods disclosed in the embodiments of this application can be applied to processor 1002, or implemented by processor 1002. Processor 1002 may be an integrated circuit chip with signal processing capabilities. In implementation, each step of the above method can be completed by the integrated logic circuit of the hardware in processor 1002 or by instructions in software form. The processor 1002 may be a general-purpose processor, a digital signal processor (DSP), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Processor 1002 can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this application. A general-purpose processor may be a microprocessor or any conventional processor, etc. The steps of the methods disclosed in the embodiments of this application can be directly manifested as being executed by a hardware decoding processor, or being executed by a combination of hardware and software modules in the decoding processor. The software modules may be located in a storage medium, which is located in memory 1003. Processor 1002 reads information from memory 1003 and, in conjunction with its hardware, completes the steps of the aforementioned method.
[0173] In an exemplary embodiment, the electronic device 1000 may be implemented by one or more application-specific integrated circuits (ASICs), DSPs, programmable logic devices (PLDs), complex programmable logic devices (CPLDs), field-programmable gate arrays (FPGAs), general-purpose processors, controllers, microcontrollers (MCUs), microprocessors, or other electronic components to perform the aforementioned method.
[0174] Embodiments of this disclosure also provide a computer-readable storage medium storing a computer program, wherein the computer program, when executed by a processor, is used to cause a computer to perform the IP network emulation method described in the above embodiments of this disclosure.
[0175] Embodiments of this disclosure also provide a computer program product, including computer instructions that, when executed by a processor, perform the IP network emulation method described in the above embodiments of this disclosure.
[0176] Embodiments of this disclosure also propose a chip including one or more interface circuits and one or more processors; the interface circuits are used to receive signals from the memory of an electronic device and send signals to the processors, the signals including computer instructions stored in the memory, which, when executed by the processor, cause the electronic device to perform the IP network emulation method described in the above embodiments of this disclosure.
[0177] It should be noted that the terms "first," "second," etc., used in the specification, claims, and accompanying drawings of this disclosure are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this disclosure described herein can be implemented in orders other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this disclosure. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this disclosure as detailed in the appended claims.
[0178] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "illustrative embodiment," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with an embodiment or example is included in at least one embodiment or example of the present invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.
[0179] Any description of operation or method in the flowchart or otherwise described herein can be understood as representing a module, segment, or portion of code comprising one or more executable instructions for implementing a particular logical function or operation, and the scope of the preferred embodiments of the invention includes additional implementations in which functions may be performed not in the order shown or discussed, including substantially simultaneously or in reverse order depending on the functions involved, as will be understood by those skilled in the art to which embodiments of the invention pertain.
[0180] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus, or device (such as a computer-based system, a system including a processing module, or other system that can fetch and execute instructions from, an instruction execution system, apparatus, or device). For the purposes of this specification, "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transmit programs for use by, or in conjunction with, an instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of computer-readable media include: an electrical connection having one or more wires (control method), a portable computer disk drive (magnetic device), random access memory (RAM), read-only memory (ROM), erasable and editable read-only memory (EPROM or flash memory), fiber optic device, and portable optical disc read-only memory (CDROM). Furthermore, computer-readable media can even be paper or other suitable media on which programs can be printed, because programs can be obtained electronically, for example, by optically scanning the paper or other media, followed by editing, interpreting, or otherwise processing as necessary, and then stored in computer memory.
[0181] It should be understood that various parts of the embodiments of the present invention can be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, it can be implemented using any one or a combination of the following techniques known in the art: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.
[0182] Those skilled in the art will understand that all or part of the steps of the methods in the above embodiments can be implemented by instructing related hardware through an operation sequence, and the program can be stored in a computer-readable storage medium. When the program is executed, it includes one or a combination of the steps of the method embodiments.
[0183] Furthermore, the functional units in the various embodiments of the present invention can be integrated into a processing module, or each unit can exist physically separately, or two or more units can be integrated into a module. The integrated module can be implemented in hardware or as a software functional module. If the integrated module is implemented as a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. The storage medium mentioned above can be a read-only memory, a disk, or an optical disk, etc.
[0184] Although embodiments of the present invention have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present invention. Those skilled in the art can make changes, modifications, substitutions and variations to the above embodiments within the scope of the present invention.
Claims
1. An IP network simulation method, characterized in that, The method includes: Obtain a digital twin description of the target IP network and a physical resource description of the simulation bed used for simulating the target IP network; Based on the digital twin description and the physical resource description, the simulation device used when each network element in the target IP network is simulated is determined, and the simulation device port corresponding to each link in the target IP network is determined, so as to obtain the initial topology mapping relationship between the target IP network and the simulation bed. Based on the initial topology mapping relationship, for the target network element simulated by physical devices, the simulation instruments used by multiple network elements interconnected with the target network element and belonging to the same device role when being simulated are aggregated into the same simulation instrument, and different virtual local area network sub-interfaces are allocated to multiple links that need to share the same simulation device port due to the aggregation, so as to obtain the target topology mapping relationship between the target IP network and the simulation bed. Based on the protocol information, routing information, and service traffic information of the target IP network in the digital twin description, and the target topology mapping relationship, a twin simulation network description is generated. The twin network description is used to drive the simulation bed, so that the simulation bed can simulate the target IP network.
2. The method according to claim 1, characterized in that, The step of determining the simulation device used when simulating each network element in the target IP network, based on the digital twin description and the physical resource description, and determining the simulation device port corresponding to each link in the target IP network, includes: Based on the device roles of each network element in the target IP network described in the digital twin, the target network element whose simulation device is a physical device and which needs to undergo network change operations is identified, as well as the non-target network element whose simulation device is a simulation instrument. Based on the physical resource description, and the target network element and the non-target network element, determine the simulation equipment used when the target network element and the non-target network element are simulated; Based on the simulation devices used when the target network element and the non-target network element are simulated, and the link information of the target IP network in the digital twin description, the simulation device ports corresponding to each link in the target IP network are determined.
3. The method according to claim 2, characterized in that, Based on the initial topology mapping relationship, for a target network element simulated by physical devices, the simulation instruments used when simulating multiple network elements interconnected with the target network element and belonging to the same device role are aggregated into a single simulation instrument, including: For the target network element, based on the link information of the target IP network in the digital twin description, the first non-target network element interconnected with the target network element and the device role of the first non-target network element are determined; Based on the device role of the first non-target network element, the simulation instruments used by multiple first non-target network elements belonging to the same device role in the initial topology mapping relationship are aggregated into the same simulation instrument.
4. The method according to claim 3, characterized in that, The above refers to the allocation of different virtual LAN sub-interfaces for multiple links that need to share the same simulation device port due to the aggregation, including: Identify target links and assign a virtual LAN sub-interface to each of the target links; the target links refer to multiple links that need to share the same emulation device port due to the aggregation; Assign an initial virtual local area network (VLAN) sub-interface port number to the first link in the target link, and assign a VLAN sub-interface port number to the nth link in the target link after incrementing the initial VLAN sub-interface port number by n-1. In the target link, the local port and the peer port of the same link have the same virtual LAN sub-interface port number.
5. The method according to claim 1, characterized in that, The process of generating a twin simulation network description based on the protocol information, routing information, and service traffic information of the target IP network in the digital twin description, and the target topology mapping relationship, includes: For each target network element, the protocol information is rewritten based on the border gateway protocol session and the target topology mapping relationship in the protocol information to obtain the twin simulation network protocol configuration; For each target network element, based on the device role of the network element and the border gateway protocol neighbor relationship in the routing information, the routing information is rewritten to obtain the twin simulation network routing configuration; For each target network element, the service traffic information is rewritten to obtain the twin simulation network traffic configuration of public network service traffic and virtual private network service traffic; Based on the target topology mapping relationship, the twin network protocol configuration, the twin network routing configuration, and the twin network traffic configuration, the twin network description is obtained.
6. The method according to claim 5, characterized in that, For each target network element, based on the border gateway protocol session and the target topology mapping relationship in the protocol information, the protocol information is rewritten to obtain the twin network protocol configuration, including: For each border gateway protocol session in the protocol information, based on the target topology mapping relationship, determine the simulation device used when the network elements of both sides of the border gateway protocol session are simulated; If the emulation device used when the peer network element is emulated in both parties of the session is also a physical device, then the corresponding border gateway protocol session is determined to be the first border gateway protocol session; if the emulation device used when the peer network element is emulated in both parties of the session is an emulation instrument, then the corresponding border gateway protocol session is determined to be the second border gateway protocol session. Based on the target topology mapping relationship, the first border gateway protocol session and the second border gateway protocol session are rewritten to obtain the first border gateway protocol session configuration and the second border gateway protocol session configuration; Based on the first border gateway protocol session configuration and the second border gateway protocol session configuration, the twin emulation network protocol configuration is obtained.
7. The method according to claim 6, characterized in that, The step of rewriting the first border gateway protocol session based on the target topology mapping relationship to obtain the first border gateway protocol session configuration includes: Based on the target topology mapping relationship, determine the first emulation device port corresponding to the link carrying the first border gateway protocol session; Based on the port of the first simulation device, the first border gateway protocol session is rewritten to obtain the configuration of the first border gateway protocol session.
8. The method according to claim 6, characterized in that, The step of rewriting the second border gateway protocol session based on the target topology mapping relationship to obtain the second border gateway protocol session configuration includes: Based on the target topology mapping relationship, determine the first virtual local area network sub-interface corresponding to the link carrying the second border gateway protocol session; Based on the first virtual LAN sub-interface, the second border gateway protocol session is rewritten to obtain the second border gateway protocol session configuration.
9. The method according to claim 5, characterized in that, For each target network element, based on the device role of the network element and the border gateway protocol neighbor relationship in the routing information, the routing information is rewritten to obtain the twin network routing configuration, including: For each target network element, a set of simulated neighbor devices is determined, which are simulated instruments in the target topology mapping relationship and have a border gateway protocol neighbor relationship with the target network element. Based on whether the target network element's device role is a route reflector and whether the simulated neighbor devices in the simulated neighbor device set are route reflectors, the routing information is rewritten to obtain the twin network routing configuration.
10. The method according to claim 9, characterized in that, The step of rewriting the routing information based on whether the target network element's device role is a route reflector and whether the simulated neighbor devices in the simulated neighbor device set are route reflectors, to obtain the twin network routing configuration, includes: If the target network element's device role is a route reflector, then based on the routing information, determine the routing information published by each simulated neighbor device in the simulated neighbor device set; and write the routing information published by the simulated neighbor devices into the twin network routing configuration; If the target network element's device role is not a route reflector, then determine whether the simulated neighbor device in the simulated neighbor device set is a route reflector; if the simulated neighbor device is a route reflector or a VPN route reflector, then write the routing information published by the simulated neighbor device into the twin network routing configuration; if the simulated neighbor device is not a route reflector or a VPN route reflector, then rewrite the advertiser device identifier in the routing information published by the simulated neighbor device; after deduplication processing, write the rewritten routing information into the twin network routing configuration.
11. The method according to claim 10, characterized in that, The step of rewriting the advertiser device identifier in the routing information published by the simulated neighbor device includes: Based on the address family identifier in the routing information published by the simulated neighbor device, the advertiser device identifier in the routing information is rewritten to a preset route reflector device identifier; If the address family identifier in the routing information is a public network unicast address family, then the advertiser device identifier in the routing information is rewritten as a first type of route reflector device identifier. If the address family identifier in the routing information is a Virtual Private Network (VPN) address family, then the advertiser device identifier in the routing information will be rewritten as a Type II route reflector device identifier.
12. The method according to claim 5, characterized in that, The process of rewriting the service traffic information for each target network element to obtain the twin simulation network traffic configuration for public network service traffic and virtual private network service traffic includes: For each target network element, public network service traffic information and virtual private network service traffic information associated with each target network element are extracted from the service traffic information; Based on the target topology mapping relationship, the public network service traffic information and virtual private network service traffic information are rewritten to obtain the twin simulation network traffic configuration of public network service traffic and the twin simulation network traffic configuration of virtual private network service traffic.
13. The method according to claim 12, characterized in that, The step of rewriting the public network service traffic information based on the target topology mapping relationship to obtain the twin simulation network traffic configuration of the public network service traffic includes: Determine the first link associated with each of the target network elements; the first link refers to the physical device-simulation instrument hybrid link associated with the target network element; From the public network service traffic information, filter out the first public network service traffic information corresponding to the first link; rewrite the sending destination of the first public network service traffic information to the simulation instrument port of the corresponding first link to obtain the twin simulation network traffic configuration of the public network service traffic.
14. The method according to claim 12, characterized in that, The step of rewriting the VPN service traffic information based on the target topology mapping relationship to obtain the twin simulation network traffic configuration of the VPN service traffic includes: From the VPN service traffic information, extract the first VPN service traffic information with the target network element as the site; and from the routing information, filter out the routing information whose address family identifier is a VPN address family and is consistent with the VPN service identifier of the first VPN service traffic information, as the matching routing information; Based on the target topology mapping relationship, the simulated device port corresponding to the site of the first virtual private network service traffic information is determined, and the simulated device port corresponding to the destination of the matching routing information is determined as the destination of the first virtual private network service traffic information, so as to obtain the twin simulation network traffic configuration of the virtual private network service traffic.
15. The method according to claim 14, characterized in that, The VPN service identifier is the routing target.
16. An IP network simulation device, characterized in that, include: The acquisition module is used to acquire a digital twin description of the target IP network and a physical resource description of the simulation bed used for simulating the target IP network. The initial topology mapping relationship generation module is used to determine the simulation device used when each network element in the target IP network is simulated based on the digital twin description and the physical resource description, and to determine the simulation device port corresponding to each link in the target IP network, so as to obtain the initial topology mapping relationship between the target IP network and the simulation bed. The target topology mapping relationship generation module, based on the initial topology mapping relationship, aggregates the simulation instruments used by multiple network elements interconnected with the target network element and belonging to the same device role when they are simulated into the same simulation instrument, and assigns different virtual local area network sub-interfaces to multiple links that need to share the same simulation device port due to the aggregation, thereby obtaining the target topology mapping relationship between the target IP network and the simulation bed; The twin simulation network description generation module is used to generate a twin simulation network description based on the protocol information, routing information, and service traffic information of the target IP network in the digital twin description, as well as the target topology mapping relationship; A simulation module is used to drive the simulation bed using the twin simulation network description, so that the simulation bed can simulate the target IP network.
17. An electronic device, characterized in that, include: A processor, a memory, and a program stored in the memory and executable on the processor, wherein the program, when executed by the processor, implements the steps of the IP network emulation method as described in any one of claims 1 to 15.
18. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the steps of the IP network emulation method as described in any one of claims 1 to 15.
19. A computer program product, characterized in that, It includes computer instructions that, when executed by a processor, implement the steps of the IP network emulation method as described in any one of claims 1 to 15.