Method and apparatus for traffic path visualization of SDN-based virtual switch
Patent Information
- Application Number
- CN202310255707.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-10
- Publication Date
- 2026-09-08
- Estimated Expiration
- 2043-03-10
AI Technical Summary
[0005]本发明克服了现有技术的不足之一,提供了一种基于SDN的虚拟交换机的流量路径可视化方法及相关设备,能够解决当前SDN网络中无法直观观察OVS中流量路径的轨迹问题,显著提高OVS中流量路径的可维护性,及流量直观性
[0029]This disclosure discloses a traffic path visualization method for SDN-based virtual switches. The method involves adding a virtual switch to the controller in the SDN network; inputting source and destination virtual host information connected to the virtual switch via a web module, and statistically analyzing the traffic path trajectory between the source and destination virtual hosts; reading virtual switch information, virtual machine information, and gateway information stored in a storage module; calculating the detection configuration for sending traffic path trajectories to the virtual switch based on the virtual switch information, virtual machine information, gateway information, and the source and destination virtual host information; analyzing the detection configuration results of the traffic path trajectories sent by the virtual switch using the OVSDB protocol module, and returning the detection configuration results to the web module for displaying the traffic path trajectory results. This method solves the problem of not being able to intuitively observe the traffic path trajectory in the virtual switch's OVS in current SDN networks, significantly improving the maintainability and intuitiveness of traffic paths in OVS.
Smart Images

Figure CN116389296B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of traffic path visualization technology in OVS, and specifically relates to a traffic path visualization method and device for SDN-based virtual switches. Background Technology
[0002] SDN (software-defined networking) technology separates the control plane and data plane of a network, providing a new solution for developing new network applications and future Internet technologies.
[0003] OVS (Open VSwitch) is a high-quality virtual switch that supports multi-layer data forwarding. Primarily deployed on servers, it offers superior programmability compared to traditional switches, while retaining the network isolation and data forwarding capabilities of traditional switches. It runs on each virtualized physical machine and provides remote management. OVS offers two protocols for remote management in virtualized environments: the OpenFlow control protocol, which controls switch behavior through flow tables; and the OVSDB management protocol, an SDN management protocol for programmable access and configuration management of virtual switches.
[0004] In current SDN networks, it is not possible to intuitively observe the trajectory of traffic paths in OVS. There is an urgent need for a method that can directly observe the trajectory of traffic paths in OVS. Summary of the Invention
[0005] This invention overcomes one of the shortcomings of the prior art by providing a traffic path visualization method and related equipment based on SDN virtual switches. It can solve the problem that the trajectory of traffic paths in OVS cannot be intuitively observed in current SDN networks, and significantly improve the maintainability and intuitiveness of traffic paths in OVS.
[0006] According to one aspect of this disclosure, a method for visualizing traffic paths of an SDN-based virtual switch is proposed, the method comprising:
[0007] Add virtual switches to the controllers in the SDN network;
[0008] The web module is used to input the source virtual host information and destination virtual host information connected to the virtual switch, and the traffic path trajectory between the source virtual host and the destination virtual host is statistically analyzed.
[0009] Read information about the virtual switch, virtual machine, and gateway stored in the storage module;
[0010] The detection configuration for sending traffic path trajectories to the virtual switch is calculated based on the information of the virtual switch, virtual machine, gateway, source virtual host, and destination virtual host.
[0011] The OVSDB protocol module is used to analyze the detection configuration results of the traffic path trajectory sent by the virtual switch, and the detection configuration results are returned to the web module to display the traffic path trajectory results.
[0012] In one possible implementation, the step of using a web module to input the source and destination virtual hosts connected to the virtual switch, and to statistically analyze the traffic path between the source and destination virtual hosts, includes:
[0013] When the source virtual host, destination virtual host, and protocol type, protocol version, protocol source port, and protocol destination port of the source virtual host and destination virtual host are input through the web module, the east-west traffic path trajectory between the source virtual host and the destination virtual host is statistically analyzed.
[0014] In one possible implementation, the step of using a web module to input the source and destination virtual hosts connected to the virtual switch and calculating the traffic path between the source and destination virtual hosts further includes:
[0015] When the web module is used to input the virtual source host that is bound to the public network, as well as the protocol type, protocol version, protocol source port, and protocol destination port of the virtual source host, the north-south traffic path trajectory between the source virtual host and the destination virtual host is statistically analyzed.
[0016] In one possible implementation, the step of using a web module to input the source and destination virtual hosts connected to the virtual switch and calculating the traffic path between the source and destination virtual hosts further includes:
[0017] When the management IP, packet source IP, packet destination IP, packet source MAC, packet destination MAC, protocol type, protocol version, direction of the source virtual host and destination virtual host, protocol source port, and protocol destination port of the virtual switch are input using the web module, the traffic path traces of the packet matching between the source virtual host and the destination virtual host in some switches are statistically analyzed.
[0018] According to one aspect of this disclosure, a traffic path visualization device for an SDN-based storage virtual switch is proposed, the device comprising: a web module, a storage module, a computing module, and an OVSDB protocol module;
[0019] The web module is used to input and display the source and destination information of the traffic path trajectory of the virtual switch, as well as the traffic path trajectory results returned by the OVSDB module.
[0020] The storage module is used to store information about the virtual switch, virtual machine information, and gateway information;
[0021] The calculation module is used to calculate the detection configuration for sending traffic path trajectories to the virtual switch based on the information of the virtual switch, virtual machine information, gateway information, and source and destination information of the traffic path trajectory of the virtual switch.
[0022] The OVSDB protocol module is used to analyze the detection configuration results of the traffic path trajectory sent by the virtual switch, and return the detection configuration results to the web module to display the traffic path trajectory results.
[0023] In one possible implementation, the detection configuration is used to statistically analyze the north-south traffic path trajectory between intranet hosts and destination extranet user network devices;
[0024] Alternatively, it can be used to statistically analyze the east-west traffic paths between the internal network hosts.
[0025] In one possible implementation, the source information includes a source virtual host and a source virtual switch; the destination information includes a destination virtual host and a destination virtual switch.
[0026] In one possible implementation, the traffic path trajectory represents the input and output directions of the virtual host.
[0027] According to one aspect of this disclosure, an electronic device is proposed, the device including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the method described above.
[0028] According to one aspect of this disclosure, a computer-readable storage medium is provided that stores a computer program, which, when executed by a processor, implements the method described above.
[0029] This disclosure discloses a traffic path visualization method for SDN-based virtual switches. The method involves adding a virtual switch to the controller in the SDN network; inputting source and destination virtual host information connected to the virtual switch via a web module, and statistically analyzing the traffic path trajectory between the source and destination virtual hosts; reading virtual switch information, virtual machine information, and gateway information stored in a storage module; calculating the detection configuration for sending traffic path trajectories to the virtual switch based on the virtual switch information, virtual machine information, gateway information, and the source and destination virtual host information; analyzing the detection configuration results of the traffic path trajectories sent by the virtual switch using the OVSDB protocol module, and returning the detection configuration results to the web module for displaying the traffic path trajectory results. This method solves the problem of not being able to intuitively observe the traffic path trajectory in the virtual switch's OVS in current SDN networks, significantly improving the maintainability and intuitiveness of traffic paths in OVS. Attached Figure Description
[0030] The accompanying drawings are used to provide a further understanding of the technical solutions of this application or the prior art, and constitute a part of the specification. The drawings illustrating embodiments of this application, together with the embodiments of this application, are used to explain the technical solutions of this application, but do not constitute a limitation on the technical solutions of this application.
[0031] Figure 1 A flowchart of a traffic path visualization method for an SDN-based virtual switch according to an embodiment of the present disclosure is shown;
[0032] Figure 2 A schematic diagram of the structure of an SDN network according to an embodiment of the present disclosure is shown;
[0033] Figure 3 A traffic path visualization system architecture diagram of an SDN-based virtual switch according to an embodiment of the present disclosure is shown;
[0034] Figure 4 A schematic diagram of the structure of an electronic device according to an embodiment of the present disclosure is shown. Detailed Implementation
[0035] The embodiments of the present invention will be described in detail below with reference to the accompanying drawings and examples, so that the process of how the present invention uses technical means to solve technical problems and achieve corresponding technical effects can be fully understood and implemented accordingly. The embodiments of this application and the various features in the embodiments can be combined with each other without conflict, and the resulting technical solutions are all within the protection scope of the present invention.
[0036] Furthermore, the steps illustrated in the flowcharts of the accompanying drawings can be executed in a computer, such as a set of computer-executable instructions. Also, although a logical order is shown in the flowcharts, in some cases the steps shown or described may be performed in a different order than that presented here.
[0037] Figure 1 A flowchart illustrating a traffic path visualization method for an SDN-based virtual switch according to an embodiment of this disclosure is shown. Figure 1 As shown, the method may include:
[0038] Step S1: Add a virtual switch to the controller in the SDN network.
[0039] Figure 2 A schematic diagram of the structure of an SDN network according to an embodiment of the present disclosure is shown.
[0040] like Figure 2 As shown, an SDN network includes a Controller, Virtual Switches (OVS), and one or more Virtual Machines (VMs) connected to each OVS. Each OVS establishes a VXLAN (Virtual Extensible Local Area Network) tunnel with the Gateway (GW), and each VM accesses the ISP (Internet Service Provider) network through the GW.
[0041] The network switching devices managed by the controller can generally include routers, switches, and other similar devices.
[0042] By adding a virtual switch (OVS) to the controller in the SDN network, a connection can be established with the virtual switch OVS via the OVSDB protocol (Open VSwitch Database Management Protocol). Through programmable access to the virtual switch OVS, the trajectory of packets matching traffic paths in the virtual switch OVS can be simulated, and the data can be collected and analyzed to understand the path of traffic in the virtual switch OVS and visualize it.
[0043] Step S2: Use the web module to input the source virtual host information and destination virtual host information connected to the virtual switch, and count the traffic path trajectory between the source virtual host and the destination virtual host.
[0044] Based on the differences between the source and destination virtual host information, we can statistically analyze the different traffic path trajectories between the source and destination virtual hosts.
[0045] In one example, the web module is used to input the source and destination virtual hosts connected to the virtual switch, and the traffic path between the source and destination virtual hosts is statistically analyzed, including:
[0046] When the source virtual host, destination virtual host, and protocol type, protocol version, protocol source port, and protocol destination port of the source virtual host and destination virtual host are input through the web module, the east-west traffic path trajectory between the source virtual host and the destination virtual host is statistically analyzed.
[0047] In one example, the web module is used to input the source and destination virtual hosts connected to the virtual switch, and to analyze the traffic path between the source and destination virtual hosts. This may also include:
[0048] When the web module is used to input the virtual source host that is bound to the public network, as well as the protocol type, protocol version, protocol source port, and protocol destination port of the virtual source host, the north-south traffic path trajectory between the source virtual host and the destination virtual host is statistically analyzed.
[0049] In one example, the web module is used to input the source and destination virtual hosts connected to the virtual switch, and to analyze the traffic path between the source and destination virtual hosts. This may also include:
[0050] When the management IP, packet source IP, packet destination IP, packet source MAC, packet destination MAC, protocol type, protocol version, direction of the source virtual host and destination virtual host, protocol source port, and protocol destination port of the virtual switch are input using the web module, the traffic path traces of the packet matching between the source virtual host and the destination virtual host in some switches are statistically analyzed.
[0051] East-west traffic generally refers to traffic between network devices within a data center, i.e., traffic between internal network hosts. North-south traffic generally refers to traffic between network devices within a data center and the ISP network outside the data center, i.e., traffic between internal network hosts and destination external network user network devices.
[0052] By analyzing the different traffic paths between the source and destination virtual hosts, it is possible to determine the direction of traffic output and input between them.
[0053] Step S3: Read the information of the virtual switch, virtual machine and gateway stored in the storage module.
[0054] Step S4: Calculate the detection configuration for the traffic path trajectory sent to the virtual switch based on the information of the virtual switch, virtual machine, gateway, and the source and destination virtual host information. This detection configuration can be used to statistically analyze the east-west traffic path trajectories between internal network hosts; or to statistically analyze the north-south traffic path trajectories between internal network hosts and user network edge devices reaching the external network.
[0055] Step S5: Analyze the detection configuration results of the traffic path trajectory sent by the virtual switch using the OVSDB protocol module, and return the detection configuration results to the web module to display the traffic path trajectory results.
[0056] The following are embodiments of the apparatus described in this application, which can be used to execute the embodiments of the method described in this application. For details not disclosed in the apparatus embodiments of this application, please refer to the embodiments of the method described in this application.
[0057] Figure 3 A traffic path visualization system architecture diagram of an SDN-based virtual switch according to an embodiment of the present disclosure is shown.
[0058] like Figure 3 As shown, the system may include: web module 301, storage module 302, computing module 303, and OVSDB protocol module 304.
[0059] The web module 301 is used to input and display the source and destination information of the traffic path trajectory of the virtual switch, as well as the traffic path trajectory results returned by the OVSDB module. The source information includes the source virtual host and the source virtual switch; the destination information includes the destination virtual host and the destination virtual switch; and the traffic path trajectory shows the input and output directions of the virtual host.
[0060] Storage module 302 is used to store information about the virtual switch, virtual machine information, and gateway information.
[0061] The calculation module 303 is used to calculate the detection configuration for sending traffic path trajectories to the virtual switch based on the information of the virtual switch, virtual machine information, gateway information, and source and destination information of the traffic path trajectory of the virtual switch.
[0062] The OVSDB protocol module 304 is used to analyze the detection configuration results of the traffic path trajectory sent by the virtual switch and return the detection configuration results to the web module 301 for display of the traffic path trajectory results.
[0063] This disclosure discloses a traffic path visualization method and system for SDN-based virtual switches. The method involves adding virtual switches to the controller in the SDN network; using a web module to input source and destination virtual host information connected to the virtual switches, and statistically analyzing the traffic path trajectory between the source and destination virtual hosts; reading virtual switch information, virtual machine information, and gateway information stored in a storage module; calculating the detection configuration for sending traffic path trajectories to the virtual switches based on the virtual switch, virtual machine, gateway, source, and destination virtual host information; analyzing the detection configuration results of the traffic path trajectories sent by the virtual switches using the OVSDB protocol module; and returning the detection configuration results to the web module for displaying the traffic path trajectory results. This enables intuitive observation of the traffic path trajectory in the virtual switch's OVS, provides a convenient method for troubleshooting traffic problems, and significantly improves the maintainability and intuitiveness of traffic paths in the virtual switch's OVS.
[0064] It should be understood that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.
[0065] Figure 4 This is a schematic diagram of the structure of the electronic device 3 provided in an embodiment of this application. Figure 4 As shown, the electronic device 3 of this embodiment includes a processor 301, a memory 302, and a computer program 303 stored in the memory 302 and executable on the processor 301. When the processor 301 executes the computer program 303, it implements the steps in the various method embodiments described above. Alternatively, when the processor 301 executes the computer program 303, it implements the functions of each module / unit in the various device embodiments described above.
[0066] For example, computer program 303 may be divided into one or more modules / units, which are stored in memory 302 and executed by processor 301 to complete this application. The one or more modules / units may be a series of computer program instruction segments capable of performing a specific function, which describe the execution process of computer program 303 in electronic device 3.
[0067] Electronic device 3 can be a desktop computer, laptop, handheld computer, cloud server, or other electronic device. Electronic device 3 may include, but is not limited to, processor 301 and memory 302. Those skilled in the art will understand that... Figure 3This is merely an example of electronic device 3 and does not constitute a limitation on electronic device 3. It may include more or fewer components than shown, or combine certain components, or different components. For example, electronic device may also include input / output devices, network access devices, buses, etc.
[0068] Processor 301 can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor can be a microprocessor or any conventional processor.
[0069] The memory 302 can be an internal storage unit of the electronic device 3, such as a hard disk or RAM. The memory 302 can also be an external storage device of the electronic device 3, such as a plug-in hard disk, Smart Media Card (SMC), Secure Digital (SD) card, or Flash Card. Furthermore, the memory 302 can include both internal and external storage units of the electronic device 3. The memory 302 is used to store computer programs and other programs and data required by the electronic device. The memory 302 can also be used to temporarily store data that has been output or will be output.
[0070] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is merely an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiments can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit. Furthermore, the specific names of the functional units and modules are only for easy differentiation and are not intended to limit the scope of protection of this application. The specific working process of the units and modules in the above system can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.
[0071] In the above embodiments, the descriptions of each embodiment have different focuses. For parts that are not described in detail or recorded in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0072] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments claimed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0073] In the embodiments provided in this application, it should be understood that the disclosed apparatus / computer devices and methods can be implemented in other ways. For example, the apparatus / computer device embodiments described above are merely illustrative. For instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. Multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces, and the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.
[0074] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0075] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0076] If an integrated module / unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments can also be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program may include computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium may include: any entity or device capable of carrying computer program code, recording media, USB flash drives, portable hard drives, magnetic disks, optical disks, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media, etc. It should be noted that the content included in the computer-readable medium may be appropriately added to or subtracted according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, the computer-readable medium does not include electrical carrier signals and telecommunication signals.
[0077] The above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application, and should all be included within the protection scope of this application.
Claims
1. A method for visualizing traffic paths in a virtual switch based on SDN, characterized in that, The method includes: Add virtual switches to the controllers in the SDN network; The web module is used to input the source virtual host information and destination virtual host information connected to the virtual switch, and the traffic path trajectory between the source virtual host and the destination virtual host is statistically analyzed. Read information about the virtual switch, virtual machine, and gateway stored in the storage module; Based on the information of the virtual switch, virtual machine information, gateway information, and the source virtual host information and destination virtual host information, a detection configuration for sending traffic path trajectories to the virtual switch is calculated. The detection configuration is used to count the traffic path trajectories of east-west traffic between internal network hosts; or to count the traffic path trajectories of north-south traffic between internal network hosts and user network edge devices reaching the external network. The OVSDB protocol module is used to analyze the detection configuration results of the traffic path trajectory sent by the virtual switch, and the detection configuration results are returned to the web module to display the traffic path trajectory results.
2. The traffic path visualization method according to claim 1, characterized in that, The step of using the web module to input the source and destination virtual hosts connected to the virtual switch, and calculating the traffic path between the source and destination virtual hosts, includes: When the source virtual host, destination virtual host, and protocol type, protocol version, protocol source port, and protocol destination port of the source virtual host and destination virtual host are input through the web module, the east-west traffic path trajectory between the source virtual host and the destination virtual host is statistically analyzed.
3. The traffic path visualization method according to claim 1, characterized in that, The step of using a web module to input the source and destination virtual hosts connected to the virtual switch and calculating the traffic path between the source and destination virtual hosts also includes: When the web module is used to input the virtual source host that is bound to the public network, as well as the protocol type, protocol version, protocol source port, and protocol destination port of the virtual source host, the north-south traffic path trajectory between the source virtual host and the destination virtual host is statistically analyzed.
4. The traffic path visualization method according to claim 1, characterized in that, The step of using a web module to input the source and destination virtual hosts connected to the virtual switch, and calculating the traffic path between the source and destination virtual hosts, also includes: When the management IP, packet source IP, packet destination IP, packet source MAC, packet destination MAC, protocol type, protocol version, direction of the source virtual host and destination virtual host, protocol source port, and protocol destination port are input using the web module, the traffic path traces of packet matching between the source virtual host and the destination virtual host in the virtual switch are statistically analyzed.
5. A traffic path visualization device for a storage virtual switch based on SDN, characterized in that, The device includes: a web module, a storage module, a computing module, and an OVSDB protocol module; The web module is used to input and display the source and destination information of the traffic path trajectory of the virtual switch, as well as the traffic path trajectory results returned by the OVSDB module. The storage module is used to store information about the virtual switch, virtual machine information, and gateway information; The calculation module is used to calculate the detection configuration for sending traffic path trajectories to the virtual switch based on the information of the virtual switch, virtual machine information, gateway information, and source and destination information of the traffic path trajectory of the virtual switch. The detection configuration is used to count the traffic path trajectory of east-west traffic between internal network hosts; or to count the traffic path trajectory of north-south traffic between internal network hosts and user network edge devices reaching the external network. The OVSDB protocol module is used to analyze the detection configuration results of the traffic path trajectory sent by the virtual switch, and return the detection configuration results to the web module to display the traffic path trajectory results.
6. The traffic path visualization device according to claim 5, characterized in that, The detection configuration is used to statistically analyze the north-south traffic path trajectory between internal network hosts and destination external network user network devices; Alternatively, it can be used to statistically analyze the east-west traffic paths between the internal network hosts.
7. The traffic path visualization device according to claim 5, characterized in that, The source information includes the source virtual host and the source virtual switch; the destination information includes the destination virtual host and the destination virtual switch.
8. The traffic path visualization device according to claim 6, characterized in that, The traffic path trajectory represents the input and output directions of the virtual host.
9. An electronic device, characterized in that, The device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the method as described in any one of claims 1 to 4.
10. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it implements the method as described in any one of claims 1 to 4.
Citation Information
Patent Citations
Software defined networking (SDN) network topology flow visual monitoring method and control terminal
CN106130796A
Method and system for monitoring flow of virtual switch and virtual switch
CN106254181A