A method and device for dynamically accessing physical devices in a network range
By using SDN switches and controllers in network shooting ranges, the connection mode between physical devices and SDN switches is dynamically changed, and the problem of complex physical devices access in the prior art is solved and the problem of multi-scenario sharing cannot be met, realizing automatic access and complex network simulation of physical devices in different simulation environments.
Patent Information
- Application Number
- CN202211412734.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-11
- Publication Date
- 2025-04-08
- Estimated Expiration
- 2042-11-11
AI Technical Summary
The access method of physical equipment in existing network shooting ranges cannot meet the sharing of multiple scenarios, and the processes and operations are complex, which can easily affect forwarding performance.
By obtaining the connection status of the physical device and the SDN switch, if it is connected, the SDN controller is controlled to connect to the shooting range system, and when the shooting range environment is created, the SDN switch interface is programmed based on the SDN controller to change the connection method between the physical device and the SDN switch.
It realizes automatic access of physical devices in different simulation environments without changing the physical connection status of physical devices, simplifying the wiring process, improving operational flexibility and complex network simulation capabilities.
Smart Images

Figure CN116192654B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of communication technology, and in particular to a method and device for dynamically accessing physical devices in a network target range. Background Art
[0002] Under the background of Internet+, the Internet has developed rapidly and been widely used in various industries, which has not only improved the efficiency of life and production, but also brought challenges to the economy and security. In response to various security issues, the network range can train network security talents, simulate real environments to discover potential risks, and research and evaluate new network technologies and tools, so that people can find problems in advance and respond quickly when problems arise.
[0003] The cyberspace range system can provide a cyberspace that is close to the real thing, on which scenario reproduction, attack and defense drills, decision-making evaluation, etc. are carried out. The basis for all business operations is to quickly build a simulated network environment. On the one hand, it is necessary to quickly connect physical devices to the network and simulate the connection according to the real physical topology. On the other hand, it is necessary to simulate the complex network relationship of the real topology environment. In traditional network deployment, the access of physical devices requires manual wiring by professionals. It is likely that rewiring will be required after the environmental topology changes, which is cumbersome. In the real physical topology, there are many types of devices connected to the network. At the business level, they usually include physical routers, physical switches, business equipment, etc. At the same time, in order to simulate real attack and defense scenarios, there will also be physical attack devices, penetration devices, etc., as well as defense equipment such as firewalls, IPS, IDS, etc.
[0004] However, the existing access methods for real devices in network target range scenarios cannot meet the needs of multi-scenario sharing, and the processes and operations are relatively complicated, which can easily affect forwarding performance.
[0005] Therefore, the prior art still needs to be improved and enhanced. Summary of the invention
[0006] The technical problem to be solved by the present invention is that, in view of the above-mentioned defects of the prior art, a method and device for dynamic access of physical devices in a network target range is provided, aiming to provide a solution to the problem that the prior art cannot meet the needs of multi-scenario sharing, and the processes and operations are relatively complicated and easily affect the forwarding performance.
[0007] In a first aspect, the present invention provides a method for dynamically accessing a physical device in a network target range, wherein the method comprises:
[0008] Obtaining the connection status between the physical device and the SDN switch, and if the connection status is connected, controlling the SDN controller to connect to the range system;
[0009] The target range environment creation state of the target range system is obtained, and when the creation state indicates that the target range environment has been created, the interface on the SDN switch is programmed based on the SDN controller to change the connection mode between the physical device and the SDN switch.
[0010] In one implementation, the obtaining of the connection status between the entity device and the SDN switch includes:
[0011] Monitoring the interface on the SDN switch;
[0012] When it is monitored that the physical device is connected to the interface, the connection state is determined to be connected.
[0013] In one implementation, the programming of the interface on the SDN switch based on the SDN controller includes:
[0014] Obtaining interface distribution information and interface numbering information on the SDN switch;
[0015] The interfaces on the SDN switch are programmed and controlled according to the interface distribution information and the interface numbering information.
[0016] In one implementation, the programming and controlling of the interface on the SDN switch according to the interface distribution information and the interface numbering information includes:
[0017] Obtaining the interface occupancy status of the SDN switch, and determining the remaining interfaces on the SDN switch based on the interface distribution information;
[0018] Based on the interface number information, determine the numbers corresponding to the remaining interfaces;
[0019] Programming is performed according to the numbers corresponding to the remaining interfaces to simulate the connection between the physical device and the remaining interfaces.
[0020] In one implementation, the programming according to the numbers corresponding to the remaining interfaces to simulate the connection between the physical device and the remaining interfaces includes:
[0021] Obtaining a topology map drawn by a user, and outputting control instructions based on the topology map;
[0022] According to the control instruction, the numbers corresponding to the remaining interfaces are programmed to simulate the connection between the physical device and the remaining interfaces.
[0023] In one implementation, the method further includes:
[0024] If the creation status is that the shooting range environment has not been created, the process ends.
[0025] In one implementation, the method further includes:
[0026] The connection state after the connection mode between the physical device and the SDN switch is changed is obtained, and a traffic forwarding test is performed.
[0027] In a second aspect, an embodiment of the present invention further provides a device for dynamically accessing physical devices in a network target range, wherein the device comprises:
[0028] A connection status acquisition module is used to obtain the connection status between the physical device and the SDN switch, and if the connection status is connected, control the SDN controller to connect to the range system;
[0029] The connection mode changing module is used to obtain the target range environment creation status of the target range system, and when the creation status is that the target range environment has been created, program the interface on the SDN switch based on the SDN controller to change the connection mode between the physical device and the SDN switch.
[0030] In one implementation, the connection status acquisition module includes:
[0031] An interface status monitoring unit, used to monitor the interface on the SDN switch;
[0032] The connection status determining unit is used to determine that the connection status is connected after monitoring that the physical device is connected to the interface.
[0033] In one implementation, the connection mode changing module includes:
[0034] An interface information acquisition unit, used to acquire interface distribution information and interface number information on the SDN switch;
[0035] The interface programming control unit is used to program and control the interface on the SDN switch according to the interface distribution information and the interface numbering information.
[0036] In one implementation, the interface programming control unit includes:
[0037] A remaining interface determination subunit, configured to obtain the interface occupancy status of the SDN switch and determine the remaining interfaces on the SDN switch based on the interface distribution information;
[0038] A remaining interface number determination subunit, used to determine the numbers corresponding to the remaining interfaces based on the interface number information;
[0039] The connection status simulation subunit is programmed according to the numbers corresponding to the remaining interfaces to simulate the connection status between the physical device and the remaining interfaces.
[0040] In one implementation, the connection situation simulation subunit includes:
[0041] A control instruction output subunit, used to obtain a topology map drawn by a user and output a control instruction based on the topology map;
[0042] The simulation connection subunit is used to program the numbers corresponding to the remaining interfaces according to the control instructions, and simulate the connection between the physical device and the remaining interfaces.
[0043] In one implementation, the device includes:
[0044] The process ending module is used to end the process if the creation status is that the shooting range environment has not been created.
[0045] In one implementation, the device includes:
[0046] The traffic forwarding test module is used to obtain the connection state after the connection mode between the physical device and the SDN switch is changed, and perform a traffic forwarding test.
[0047] In the third aspect, an embodiment of the present invention further provides a terminal device, wherein the terminal device is a commercial display terminal or a projection terminal, and the terminal device includes a memory, a processor, and a dynamic access program for physical devices in a network target range that is stored in the memory and can be run on the processor. When the processor executes the dynamic access program for physical devices in the network target range, the steps of the dynamic access method for physical devices in the network target range of any one of the above-mentioned schemes are implemented.
[0048] In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium, wherein a program for dynamic access of physical devices in a network target range is stored on the computer-readable storage medium, and when the program for dynamic access of physical devices in a network target range is executed by a processor, the steps of the method for dynamic access of physical devices in a network target range described in any one of the above-mentioned schemes are implemented.
[0049] Beneficial effect: Compared with the prior art, the present invention provides a method for dynamically accessing physical devices in a network range. The present invention first obtains the connection status between the physical device and the SDN switch. If the connection status is connected, the SDN controller is controlled to connect to the range system. Then the range environment creation status of the range system is obtained, and when the creation status is that the range environment has been created, the interface on the SDN switch is programmed based on the SDN controller to change the connection mode between the physical device and the SDN switch. The present invention uses the SDN switch as an interface device for unified access of physical devices, and controls the connection mode of the physical device interface through the SDN controller, so as to achieve automatic access in different simulation environments for different network topologies without changing the physical connection status of the physical device every time. The wiring of the present invention is simple and convenient. After one wiring, the interface connection mode can be changed by SDN programming to realize the simulation of complex networks, and the physical device is connected by the SDN switch, and the device connection interface is controlled by the SDN controller, which is convenient for the addition and replacement of physical devices, etc. The connection mode of the interface is controlled by software programming, which is more flexible and can better simulate complex networks. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the description of the embodiments or the prior art are briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0051] Figure 1 A schematic diagram of a flow chart of a method for dynamic access of physical devices in a network target range provided in an embodiment of the present invention.
[0052] Figure 2 An overall topology diagram of dynamic access of physical devices used in a network target range provided in an embodiment of the present invention.
[0053] Figure 3 An operational flow chart of a method for dynamically accessing physical devices in a network target range provided by an embodiment of the present invention.
[0054] Figure 4 A physical network topology diagram provided for an embodiment of the present invention.
[0055] Figure 5 A functional schematic diagram of a device for dynamically accessing physical devices in a network target range provided in an embodiment of the present invention.
[0056] Figure 6 It is a principle block diagram of the terminal device in the present invention. DETAILED DESCRIPTION
[0057] In order to make the purpose, technical solution and effect of the present invention clearer and more specific, the present invention is further described in detail with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.
[0058] This embodiment provides a method for dynamic access of physical devices in a network range, through which the automatic access of physical devices in different simulation environments can be achieved without changing the physical connection state of the physical devices. The present invention is composed of four parts, namely, a range system, an SDN controller, an SDN switch, and various physical devices. In specific implementation, the present invention first obtains the connection state between the physical device and the SDN switch, and when the connection state is connected, controls the SDN controller to connect the range system and the SDN switch; then, obtains the range environment creation state of the range system, and when the creation state is that the range environment has been created, programs the interface on the SDN switch based on the SDN controller to change the connection mode between the physical device and the SDN switch. The present invention uses the SDN switch as an interface device for unified access of physical devices, and uses the SDN controller to program and control the connection mode of the physical devices connected to the SDN switch interface, so as to achieve the effect of changing the connection mode of the physical device for different network topologies without changing the physical connection every time to simulate the complex network.
[0059] For example, first, both ends of the physical connection of all physical devices are connected to the unified access interface of the SDN switch, and by monitoring the interface of the SDN switch, it is determined that the physical device connections have been connected, and the SDN controller connects the range system and the SDN switch. Then, the range environment creation status of the range system is obtained. When the range environment is created, the SDN controller sets the interface connection mode of the physical device on the SDN switch by programming according to the topology diagram, so that the physical connection mode of the physical device connected to the SDN switch interface is changed by programming the SDN controller without changing the physical connection mode of the physical device.
[0060] Exemplary Methods
[0061] This embodiment provides a method for dynamically accessing physical devices in a network target range, which can be applied to various network environment simulations. Figure 1 As shown in , the method includes:
[0062] Step S100: obtaining the connection status between the physical device and the SDN switch, and if the connection status is connected, controlling the SDN controller to connect to the range system.
[0063] In this embodiment, all physical devices need to be connected to the network range, so it is necessary to obtain the current access status of various physical devices. Figure 2 The figure shows the overall topology of the dynamic access of physical devices in the network range. Figure 2 (b) Figure 2(a) Interface end diagram. First, the unified access interface on the SDN switch is monitored to determine whether the physical connection of each entity device has been connected to the unified access interface of the SDN switch. Then the connection status is determined to be connected. At the same time, the SDN controller provides a Restful interface to the north to connect to the target range system, and to the south to connect to the SDN switch to control the port of the SDN switch. The entity device is a device that needs to access the target range system, which can be a computer, a physical router, a physical switch, various business equipment, etc. The SDN switch is a hardware device for the unified access interface of the entity device. The SDN switch can monitor network congestion in real time, monitor message forwarding delay, and report to the administrator in time to execute the corresponding traffic management strategy; the SDN switch also supports the OpenFlow protocol. The firmware of traditional network switches is matched, fixed and controlled by the equipment manufacturer, which causes hardware restrictions on the network architecture. The SDN switch based on SDN technology separates network control from the physical network topology, so that the network architecture can be directly modified, which is convenient for adjusting, expanding or upgrading the entire website architecture, and the underlying switches, routers and other hardware do not need to be replaced, saving a lot of costs while greatly shortening the iteration cycle of the network architecture; the SDN switches can be high-compatibility three-layer SDN switches, low-latency three-layer SDN switches and managed three-layer SDN switches; the high-compatibility three-layer SDN switch adopts Broadcom switching chips and ICOS operating system, and its open installation environment allows users to choose more freely; the low-latency three-layer SDN switch provides excellent low latency and power efficiency for a clean PHY-free design, while providing high functional reliability, such as redundant and hot-swappable power supplies and fans in forward and reverse airflow configurations; the managed three-layer SDN switch supports high-end functions such as IPv6, VxLAN / NVGRE, MPLS, QinQ, VPC, sFLOW, etc., supports hardware-based advanced VXLAN functions, and supports virtual networks of more than 16M. The SDN controller changes the interconnection relationship between physical interfaces by programming the SDN switch, and can also control the direction of specific data flows as needed, thereby simulating a real topological environment; the SDN controller is an application in the software-defined network, responsible for traffic control to ensure an intelligent network. The SDN controller is based on protocols such as OpenFlow, allowing the server to tell the switch where to send data packets. The SDN controller is an operating system for the network. The controller does not control the network hardware but runs as software, which is conducive to network automation management. Software-based network control makes it easier to integrate business applications and networks.The range system is a technology or product based on virtualization technology that simulates and reproduces the operating status and operating environment of network architecture, system equipment, and business processes in real cyberspace, so as to more effectively realize learning, research, testing, competition, exercises, and other behaviors related to network security, thereby improving the network security confrontation level of personnel and institutions. The network range includes an online network attack and defense learning environment, a network security competition package platform, a network security technology evaluation and research platform, and a city-level or even national-level network attack and defense drill platform. By uniformly connecting physical devices to the unified access interface of the SDN switch, complex network simulation can be realized after only one access connection, and physical devices can be added or deleted at any time.
[0064] Step S200, obtaining a target range environment creation state of the target range system, and when the creation state indicates that the target range environment has been created, programming an interface on the SDN switch based on the SDN controller to change a connection mode between the physical device and the SDN switch.
[0065] In this embodiment, it is necessary to change the connection status of various physical devices connected to the SDN switch interface by programming control without changing the physical connection status of various physical devices. In the specific implementation, first ensure that the range environment of the range system is in the created state; then obtain the interface distribution information, interface number information and interface occupancy on the SDN switch, thereby determining the numbers corresponding to the remaining interfaces on the SDN switch; finally, output control instructions according to the topology diagram drawn by the user, program the numbers corresponding to the remaining interfaces according to the control instructions, simulate the connection status between the physical device and the remaining interfaces, so as to change the connection mode between the physical device and the SDN switch.
[0066] In one implementation, the target range environment creation status of the target range system is obtained. When the target range creation environment is created, it means that all physical devices have been connected to the target range system, and the preparation work for programming through the SDN controller has been completed. The interface of the SDN switch can be further programmed through the SDN controller to realize the change of the connection status of the physical device.
[0067] In another implementation, if the creation status is that the range environment is not created, it means that the current range environment does not meet the conditions for changing the connection mode of the physical device, so the connection process is terminated. Figure 3 As shown in , end the process and report the error information.
[0068] In one implementation, programming the interface on the SDN switch based on the SDN controller includes:
[0069] Step S201, obtaining interface distribution information and interface number information on the SDN switch;
[0070] Step S202: programming and controlling the interfaces on the SDN switch according to the interface distribution information and the interface numbering information.
[0071] In this embodiment, the interface distribution information and interface numbering information on the SDN switch are first obtained. The interface distribution information and interface numbering information on the SDN switch are as follows: Figure 2 (a), then obtain the interface occupancy status, that is, obtain which interfaces are occupied, so as to obtain the distribution of the remaining interfaces, and determine the numbering information of the remaining interfaces according to the interface numbering information; finally obtain the topology map drawn by the user, such as Figure 4 In the topology diagram shown, PC1 and PC2 are connected to the physical switch SW through connection line 1 and connection line 2 respectively, the physical switch SW is connected to the physical router R through connection line 3, and the physical router R is connected to PC3 through connection line 4; after obtaining the topology diagram, the range system translates the topology diagram drawn by the user into control instructions, and passes it to the SDN controller through the northbound Restful interface, and the SDN controller translates the control instructions into switch control instructions and sends them to the SDN switch, thereby completing the construction of the physical environment. After the present invention is wired once, it only needs to change the interface connection mode through SDN programming to realize the simulation of complex networks, and connect physical devices through SDN switches, and control the device connection interface through SDN controllers, which is convenient for adding and replacing physical devices, etc. The connection mode of the interface controlled by software programming is more flexible, and can better simulate complex networks.
[0072] In another implementation, the connection state after the connection mode between the physical device and the SDN switch is changed is obtained, and a traffic forwarding test is performed.
[0073] Exemplary Devices
[0074] Based on the above embodiments, the present invention also provides a device for dynamically accessing physical devices in a network target range, such as Figure 5 As shown, the device in this embodiment includes a connection status acquisition module 10 and a connection status change module 20. Specifically, the connection status acquisition module 10 is used to obtain the connection status between the entity device and the SDN switch, and if the connection status is connected, control the SDN controller to connect to the range system. The connection mode change module 20 is used to obtain the range environment creation status of the range system, and when the creation status is that the range environment has been created, program the interface on the SDN switch based on the SDN controller to change the connection mode between the entity device and the SDN switch.
[0075] In one implementation, the device includes a connection status acquisition module, and the connection status acquisition module includes:
[0076] An interface status monitoring unit, used to monitor the interface on the SDN switch;
[0077] The connection status determining unit is used to determine that the connection status is connected after monitoring that the physical device is connected to the interface.
[0078] In one implementation, the device includes a connection mode changing module, and the connection mode changing module includes:
[0079] An interface information acquisition unit, used to acquire interface distribution information and interface number information on the SDN switch;
[0080] The interface programming control unit is used to program and control the interface on the SDN switch according to the interface distribution information and the interface numbering information.
[0081] In one implementation, the programming and control unit includes:
[0082] A remaining interface determination subunit, configured to obtain the interface occupancy status of the SDN switch and determine the remaining interfaces on the SDN switch based on the interface distribution information;
[0083] A remaining interface number determination subunit, used to determine the numbers corresponding to the remaining interfaces based on the interface number information;
[0084] The connection status simulation subunit is programmed according to the numbers corresponding to the remaining interfaces to simulate the connection status between the physical device and the remaining interfaces.
[0085] In one implementation, the connection situation simulation subunit includes:
[0086] A control instruction output subunit, used to obtain a topology map drawn by a user and output a control instruction based on the topology map;
[0087] The simulation connection subunit is used to program the numbers corresponding to the remaining interfaces according to the control instructions, and simulate the connection between the physical device and the remaining interfaces.
[0088] In one implementation, the device includes:
[0089] The process ending module is used to end the process if the creation status is that the shooting range environment has not been created.
[0090] In one implementation, the device includes:
[0091] The traffic forwarding test module is used to obtain the connection state after the connection mode between the physical device and the SDN switch is changed, and perform a traffic forwarding test.
[0092] The working principles of each template in the dynamic access system of physical devices in the network target range applied in this embodiment are the same as the principles of each step in the above method embodiment, and will not be repeated here.
[0093] Based on the above embodiments, the present invention further provides a terminal device, the principle block diagram of the terminal device can be as follows: Figure 6 As shown, the terminal device is the host computer in the above embodiment, such as a computer device. The terminal device may include one or more processors 100 ( Figure 6 Only one is shown), a memory 101 and a computer program 102 stored in the memory 101 and executable on one or more processors 100, for example, a program for dynamic access of physical devices in a network range. When one or more processors 100 execute the computer program 102, the various steps in the method embodiment for dynamic access of physical devices in a network range can be implemented. Alternatively, when one or more processors 100 execute the computer program 102, the functions of the various templates / units in the apparatus embodiment for dynamic access of physical devices in a network range can be implemented, which is not limited here.
[0094] In one embodiment, the processor 100 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.
[0095] In one embodiment, the memory 101 may be an internal storage unit of an electronic device, such as a hard disk or memory of the electronic device. The memory 101 may also be an external storage device of the electronic device, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the electronic device. Further, the memory 101 may also include both an internal storage unit of the electronic device and an external storage device. The memory 101 is used to store computer programs and other programs and data required by the terminal device. The memory 101 may also be used to temporarily store data that has been output or is to be output.
[0096] Those skilled in the art will understand that Figure 6 The principle block diagram shown is only a block diagram of a partial structure related to the solution of the present invention, and does not constitute a limitation on the terminal device to which the solution of the present invention is applied. The specific terminal device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0097] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be implemented by instructing related hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, operating database or other media used in the embodiments provided by the present invention may include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double operational data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
[0098] In summary, the present invention discloses a method and device for dynamic access of physical devices in a network range, the method comprising: obtaining the connection status between the physical device and the SDN switch, and if the connection status is connected, controlling the SDN controller to connect to the range system; obtaining the range environment creation status of the range system, and when the creation status is that the range environment has been created, programming the interface on the SDN switch based on the SDN controller to change the connection mode between the physical device and the SDN switch. The present invention can monitor the interface on the SDN switch to determine that the physical device is connected and the range environment of the range system has been created, and then control the SDN controller to program and control the interface according to the interface information, so as to achieve automatic access of the physical device in different simulation environments without changing the physical connection of the physical device. The structure of the present invention is simple and clear, which is convenient for adding, reducing and replacing physical devices. The programming method of the SDN controller is more flexible, which is convenient for better simulation of various complex networks.
[0099] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for dynamic access of physical devices in a network range, characterized in that: The method comprises: The physical device is uniformly connected to the unified access interface of the SDN switch, and the connection status between the physical device and the SDN switch is obtained. If the connection status is connected, the SDN controller is controlled to connect to the range system; Acquire a target range environment creation state of the target range system, and when the creation state indicates that the target range environment has been created, program an interface on the SDN switch based on the SDN controller to change a connection mode between the physical device and the SDN switch; The programming of the interface on the SDN switch based on the SDN controller includes: Obtaining interface distribution information and interface numbering information on the SDN switch; Programming and controlling the interfaces on the SDN switch according to the interface distribution information and the interface numbering information; The programming and controlling of the interface on the SDN switch according to the interface distribution information and the interface numbering information includes: Obtaining the interface occupancy status of the SDN switch, and determining the remaining interfaces on the SDN switch based on the interface distribution information; Based on the interface number information, determine the numbers corresponding to the remaining interfaces; Programming is performed according to the numbers corresponding to the remaining interfaces to simulate the connection between the physical device and the remaining interfaces; The programming according to the numbers corresponding to the remaining interfaces to simulate the connection between the entity device and the remaining interfaces includes: Obtaining a topology map drawn by a user, and outputting control instructions based on the topology map; According to the control instruction, the numbers corresponding to the remaining interfaces are programmed to simulate the connection between the physical device and the remaining interfaces.
2. The method for dynamic access of physical devices in a network target range according to claim 1 is characterized in that: The obtaining of the connection status between the physical device and the SDN switch includes: Monitoring the interface on the SDN switch; When it is monitored that the physical device is connected to the interface, the connection state is determined to be connected.
3. The method for dynamic access of physical devices in a network target range according to claim 1 is characterized in that: The method further comprises: If the creation status is that the shooting range environment has not been created, the process ends.
4. The method for dynamic access of physical devices in a network target range according to claim 1 is characterized in that: The method further comprises: The connection state after the connection mode between the physical device and the SDN switch is changed is obtained, and a traffic forwarding test is performed.
5. A device for dynamically accessing physical devices in a network range, characterized in that: The device comprises: A connection status acquisition module is used to obtain the connection status between the physical device and the SDN switch, and if the connection status is connected, control the SDN controller to connect to the range system; The connection status acquisition module is further used for: Connect physical devices to the unified access interface of the SDN switch; A connection mode changing module, used for obtaining a target range environment creation state of the target range system, and when the creation state is that the target range environment has been created, programming an interface on the SDN switch based on the SDN controller to change a connection mode between the physical device and the SDN switch; The connection mode changing module is specifically used for: Obtaining interface distribution information and interface numbering information on the SDN switch; Programming and controlling the interfaces on the SDN switch according to the interface distribution information and the interface numbering information; The programming and controlling of the interface on the SDN switch according to the interface distribution information and the interface numbering information includes: Obtaining the interface occupancy status of the SDN switch, and determining the remaining interfaces on the SDN switch based on the interface distribution information; Based on the interface number information, determine the numbers corresponding to the remaining interfaces; Programming is performed according to the numbers corresponding to the remaining interfaces to simulate the connection between the physical device and the remaining interfaces; The programming according to the numbers corresponding to the remaining interfaces to simulate the connection between the entity device and the remaining interfaces includes: Obtaining a topology map drawn by a user, and outputting control instructions based on the topology map; According to the control instruction, the numbers corresponding to the remaining interfaces are programmed to simulate the connection between the physical device and the remaining interfaces.
6. A terminal device, characterized in that: The terminal device includes a memory, a processor, and a dynamic access program for physical devices in a network target range that is stored in the memory and can be run on the processor. When the processor executes the dynamic access program for physical devices in a network target range, the steps of the dynamic access method for physical devices in a network target range as described in any one of claims 1-5 are implemented.
7. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a program for dynamic access of physical devices in a network target range. When the program for dynamic access of physical devices in a network target range is executed by a processor, the steps of the method for dynamic access of physical devices in a network target range as described in any one of claims 1 to 5 are implemented.
Citation Information
Patent Citations
Network range attack and defense scene real equipment self-adaptive access method and system
CN111600913A