Communication method and device in virtualized storage system, equipment and medium
By setting up storage proxy services in the virtualized storage system, the request and response packets of access storage are converted according to the underlying network protocol stack type of the computing node, and the high-performance access storage problem of the Underlay network protocol stack and the virtual machine Overlay network protocol stack are solved, achieving efficient and compatible storage access.
Patent Information
- Application Number
- CN202411770696.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-04
- Publication Date
- 2025-04-11
AI Technical Summary
When the Underlay network protocol stack is different from the virtual machine Overlay network protocol stack, how to access storage with high performance becomes a challenge.
By setting up storage proxy services on the computing node, receiving the original request message from the virtual machine to access the storage node, obtaining the underlying network protocol stack type of the computing node, and changing the Internet protocol address type of the request message according to this type, and obtaining the target request message. Then the target request message is sent to the storage node, the response message is received and the corresponding address type conversion is performed, and the converted response message is finally sent back to the virtual machine.
This method reduces the number of intermediate nodes, avoids performance bottlenecks through centralized gateways, improves the efficiency of accessing storage, and realizes unified management of IPv4 and IPv6 virtual machines, solving the compatibility problem between different protocols.
Smart Images

Figure CN119814721A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of cloud scene access storage technology, and in particular to a communication method, device, equipment and medium in a virtualized storage system. Background Art
[0002] As IPv4 (Internet Protocol Version 4) addresses are exhausted, the lack of IP (Internet Protocol) addresses has become a global problem that needs to be solved urgently. IPv6 (Internet Protocol Version 6) came into being, but the transition from IPv4 to IPv6 requires a gradual process. There will be a long period of time when IPv4 and IPv6 need to coexist, but IPv4 and IPv6 are not compatible with each other.
[0003] In the current public cloud environment, the Underlay network (bottom layer network) is almost all IPv4 network. In order to support the Overlay (overlapping network) virtual machine IPv6 access to storage, the current method is to encapsulate the IPv6 storage message in the IPv4 network and send it to the intranet gateway. After the intranet gateway removes the outer IPv4 encapsulation, it sends the IPv6 message to the storage node. Since all traffic accessing storage needs to pass through the centralized intranet gateway, there is a performance bottleneck.
[0004] In order to solve the performance bottleneck problem of accessing storage through a centralized intranet gateway, the current method is to use the CT (Connection Tracking) function of OVS (Open Vswitch) to convert the packets accessing storage locally, perform SNAT (Source Address Translation) conversion on the packets, and send them directly to the storage through the Underlay network without encapsulating vxlan (Virtual Extensible Local Area Network). However, since the Underlay network is IPv4, it can only support IPv4 virtual machines to access storage, and the existing infrastructure needs to be replaced from IPv4 to support IPv6, or replaced with dual-stack deployment, which requires a lot of manpower and material resources, as well as a lot of capital investment. Summary of the invention
[0005] In view of the above problems, the present invention aims to propose a communication method, apparatus, device and medium in a virtualized storage system to solve the problem of how to perform high-performance access to storage when the Underlay network protocol stack and the virtual machine Overlay network protocol stack are different.
[0006] According to a first aspect of the present invention, a communication method in a virtualized storage system is first provided, wherein the virtualized storage system includes at least one computing node and at least one storage node, wherein the computing node is provided with a storage proxy service object and at least one virtual machine, wherein the method includes:
[0007] Receiving an original request message for accessing a storage node sent by the virtual machine;
[0008] Obtaining the underlying network protocol stack type of the computing node;
[0009] Changing the Internet Protocol address type of the original request message according to the underlying network protocol stack type to obtain a target request message;
[0010] Sending the target request message to the storage node, and receiving an original response message returned by the storage node in response to the target request message;
[0011] The Internet Protocol address type of the original response message is changed to obtain a target response message, and the target response message is sent to the virtual machine.
[0012] Optionally, the computing node is further deployed with a virtual switch, and the virtual switch is used for communication between the virtual machine and the storage proxy service;
[0013] The receiving a request message sent by the virtual machine to access a storage node includes:
[0014] A first request message sent by the virtual switch is received; the first request message is a message in which the virtual switch changes the source Internet Protocol address of the original request message to information of the port through which the virtual machine is connected to the virtual switch.
[0015] Optionally, the changing the Internet Protocol address type of the original request message according to the underlying network protocol stack type to obtain the target request message includes:
[0016] Obtaining Internet Protocol header information of the first request message;
[0017] Determine the protocol stack type of the first request message according to the version field in the internet protocol header information;
[0018] If the protocol stack type of the first request message is the same as the protocol stack type of the underlying network, changing the source Internet Protocol address of the first request message to the Internet Protocol address of the underlying network to obtain a target request message;
[0019] If the protocol stack type of the first request message is different from the protocol stack type of the underlying network, the source Internet Protocol address of the first request message is changed to the Internet Protocol address of the underlying network, and the type of the destination Internet Protocol address of the first request message is converted to obtain the target request message.
[0020] Optionally, the converting the type of the destination Internet Protocol address of the first request message includes:
[0021] If the protocol stack type of the first request message is Internet Protocol version 4 and the underlying network protocol stack type is Internet Protocol version 6, converting the destination Internet Protocol address type of the first request message to Internet Protocol version 6;
[0022] If the protocol stack type of the first request message is Internet Protocol version 6 and the underlying network protocol stack type is Internet Protocol version 4, the destination Internet Protocol address type of the first request message is converted to Internet Protocol version 4.
[0023] Optionally, sending the target request message to the storage node, and receiving an original response message returned by the storage node in response to the target request message, includes:
[0024] Obtaining a destination Internet Protocol address of the target request message;
[0025] Sending the target request message to the storage node via the destination Internet Protocol address;
[0026] Receive an original response message returned by the storage node in response to the target request message.
[0027] Optionally, the changing the Internet Protocol address type of the original response message to obtain a target response message, and sending the target response message to the virtual machine includes:
[0028] Obtaining Internet protocol header information of the original response message and a protocol stack type of the virtual machine;
[0029] Determining the protocol stack type of the original response message according to the version field in the internet protocol header information;
[0030] Converting the destination Internet Protocol address type of the original response message according to the protocol stack type of the original response message and the protocol stack type of the virtual machine to obtain a target response message;
[0031] The target response message is sent to the virtual machine.
[0032] Optionally, the method further comprises:
[0033] According to the frequency of the virtual machine accessing the target data in the storage node, storing the target data in the local cache of the storage proxy service;
[0034] When the virtual machine accesses the storage node to obtain target data, if the target data is stored in the local cache, the target data in the local cache is directly returned to the virtual machine.
[0035] According to a second aspect of the present invention, there is further provided a communication device in a virtualized storage system, characterized in that the device comprises:
[0036] A receiving module, used to receive an original request message for accessing a storage node sent by the virtual machine;
[0037] A protocol stack type acquisition module, used to obtain the underlying network protocol stack type of the computing node;
[0038] A target request message acquisition module, used to change the Internet protocol address type of the original request message according to the underlying network protocol stack type to obtain a target request message;
[0039] A sending module, used to send the target request message to the storage node, and receive an original response message returned by the storage node in response to the target request message;
[0040] The target response message acquisition module is used to change the Internet Protocol address type of the original response message, obtain the target response message, and send the target response message to the virtual machine.
[0041] According to the third aspect of the present invention, there is also provided an electronic device, characterized in that it comprises a processor, a memory and a computer program stored in the memory and capable of running on the processor, wherein when the computer program is executed by the processor, the communication method in the virtualized storage system as described above is implemented.
[0042] According to a fourth aspect of the present invention, there is further provided a computer-readable storage medium, characterized in that a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the communication method in the virtualized storage system as described above is implemented.
[0043] The communication method in the virtualized storage system provided by the embodiment of the present invention receives the original request message for accessing the storage node sent by the virtual machine; obtains the underlying network protocol stack type of the computing node; changes the Internet Protocol address type of the original request message according to the underlying network protocol stack type to obtain the target request message; sends the target request message to the storage node, and receives the original response message returned by the storage node in response to the target request message; changes the Internet Protocol address type of the original response message to obtain the target response message, and sends the target response message to the virtual machine. The storage proxy service of the embodiment of the present invention parses the message, determines whether to perform distributed NAT46 or NAT64 conversion on the destination IP according to the underlying network protocol stack and the received message protocol stack, and directly forwards the converted message to the storage node, reducing intermediate nodes, not passing through the centralized gateway, and reducing network delay. The customer's virtual machine does not need to perceive the underlying Underlay network protocol stack type, and both IPv4 or IPv6 virtual machines can access the storage node in a local distributed manner, no longer limited by the Underlay network, improve access to storage efficiency, and avoid compatibility issues caused by different protocols. It can realize the unified management of IPv4 and IPv6 storage data in a virtualized environment, unify the processing scheme, and improve the efficiency and accuracy of management. It realizes the communication and interconnection between different protocols, avoids the need to modify the client or server software, and improves the efficiency and reliability of data transmission.
[0044] The above description is only an overview of the technical solution of the present invention. In order to more clearly understand the technical means of the present invention, it can be implemented according to the contents of the specification. In order to make the above and other purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are listed below. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present application. In the drawings:
[0046] Figure 1 It is a flow chart of the steps of a communication method in a virtualized storage system provided by one embodiment of the present invention;
[0047] Figure 2 It is a schematic diagram of a virtual machine accessing a storage node provided by an embodiment of the present invention;
[0048] Figure 3This is a message conversion flow chart provided by an embodiment of the present invention;
[0049] Figure 4 It is a communication schematic diagram in a virtualized storage system provided by an embodiment of the present invention;
[0050] Figure 5 It is a structural diagram of a communication device in a virtualized storage system provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0051] In order to make the purpose, technical scheme and advantages of the embodiments of the present invention clearer, the embodiments of the present invention will be described in detail below in conjunction with the accompanying drawings. However, it can be understood by those skilled in the art that in the embodiments of the present invention, many technical details are proposed in order to enable readers to better understand the present invention. However, even without these technical details and various changes and modifications based on the following embodiments, the technical scheme claimed in the present invention can also be implemented. The division of the following embodiments is for the convenience of description and should not constitute any limitation on the specific implementation of the present invention. The various embodiments can be combined and referenced with each other without contradiction.
[0052] SDN: Software Defined Network.
[0053] OVS: Open Vswitch, virtual switch.
[0054] Underlay network: The Underlay network is a real entity and is a traditional IT infrastructure network composed of devices such as switches and routers. It is the underlying network of the Overlay network and provides data communication services for the Overlay network.
[0055] Overlay network: Overlay network is a logical network built on the physical network. For the terminal systems connected to the Overlay network, the Underlay physical network is transparent.
[0056] NAT46 (Network Address Translation 4to 6) is a network address translation (NAT) technology used to achieve mutual conversion between IPv6 and IPv4. Its working principle is to convert IPv6 addresses to IPv4 addresses, or convert IPv4 addresses to IPv6 addresses, so as to communicate between two networks with different protocols.
[0057] SDN is an architecture that abstracts the network into control planes and forwarding planes, making the network agile and flexible. With the rise of cloud, SDN provides flexible network support for various cloud services and application loads. At the same time, the differences in details brought about by various virtualization technologies have led to huge challenges for SDN in terms of the asymmetry of information stored in each virtualization control plane, how to synchronize and uniformly manage information on multiple control planes, and how to implement cross-regional routing.
[0058] SDN centralized controller means that the control plane is centrally deployed on several fixed control nodes, not computing nodes.
[0059] OpenFlow (Open Flow Protocol) is a network communication protocol that belongs to the data link layer and can control the forwarding plane of network switches or routers. Therefore, it is widely used in SDN architecture. SDN controls the forwarding plane of OVS through OpenFlow, thereby changing the network path taken by network data packets.
[0060] Currently, there are three technologies for compatibility between IPv4 and IPv6: the first is to enable the virtual machine to support the configuration of both IPv4 and IPv6 protocol stacks; the second is to encapsulate IPv6 packets in IPv4 packets through tunneling technology; the third is to convert IPv6 packets into IPv4 packets, or convert IPv4 packets into IPv6 packets, through network address translation technology, namely NAT46. When a device needs to access another network, it sends the target address and port number to the NAT46 device (usually a router or switch. The NAT46 device checks the target address and port number and converts them into the address and port number of another protocol according to the conversion rules; then, the NAT46 device sends the converted address and port number back to the original device, so that the original device can establish a connection with the target device through the new address and port number.
[0061] Reference Figure 2 , shows a schematic diagram of a virtual machine accessing a storage node provided by an embodiment of the present invention. In the current public cloud environment, the underlying Underlay network is almost all IPv4 network. In order to support Overlay virtual machine IPv6 access to storage, the IPv6 storage message is encapsulated in the IPv4 network and sent to the intranet gateway. After the intranet gateway removes the outer IPv4 encapsulation, the IPv6 message is sent to the storage node. The defect of this solution is that all traffic accessing storage needs to pass through the centralized intranet gateway, which has a performance bottleneck.
[0062] In view of the problems that the original centralized solution has poor storage access performance, the original distributed solution is limited by the underlying Underlay network, and cannot support IPv4 and IPv6 virtual machines to access storage resources at the same time. This application provides a new distributed storage access method that can simultaneously meet the high-performance access to storage resources by IPv4 and IPv6 virtual machines, solve the problems existing in the existing storage access technology, realize communication and interconnection between different protocols, avoid the need to modify the client or server software, and improve the efficiency and reliability of data transmission.
[0063] Reference Figure 1 , shows a flow chart of a communication method in a virtualized storage system provided by an embodiment of the present invention, which may specifically include the following steps:
[0064] Step 101: Receive an original request message for accessing a storage node sent by the virtual machine.
[0065] In a large-scale cloud platform environment, tens of thousands of virtual machine instances are running in the virtualized storage system. These virtual instances are distributed on thousands of computing nodes. The networks of these computing nodes all use the IPv4 protocol stack, and IPv4 can communicate between computing nodes and storage nodes.
[0066] When a customer's virtual machine mounts a storage node, it is generally assigned an intranet address of the storage node. When the virtual machine needs to access the storage node, it accesses the assigned intranet address, which is a universal network segment. Specifically, in this application, IPv4 is assumed to be the 100.0.0.0 / 16 network segment, and IPv6 is assumed to be the 100:: / 16 network segment. In order to simultaneously satisfy the IPv4 and IPv6 virtual machines to access the storage node, a dual-stack address (i.e., both IPv4 and IPv6 addresses are supported), and NAT46 conversion can be performed between the IPv4 address and the IPv6 address. For example: if the assigned IPv4 address is 100.0.0.1, then the corresponding assigned IPv6 address is 100::100.0.0.1.
[0067] A storage proxy service is started on the computing node. The main function of this service is to act as an administrator for virtual machines to access storage nodes. As an intermediate layer, the storage proxy service is responsible for managing virtual machines' access requests to storage (storage nodes). Virtual machines access storage nodes through the storage proxy service instead of communicating directly with storage nodes. The storage proxy service can also receive storage access requests from virtual machines, and convert the original request message corresponding to the storage access request according to the current Underlay protocol stack (the protocol stack of the underlying network of the computing node), so that when the Underlay is a single-stack IPv4 or IPv6 protocol stack, both IPv4 and IPv6 virtual machines can directly access the destination storage node locally.
[0068] The computing node is also provided with a virtual switch, which is a software component that simulates a physical switch in a virtualized environment. It allows virtual machines (VMs) to communicate with each other and with external networks. The virtual switch connects the virtual machine and the storage proxy service, which receives the original request message of the virtual machine, processes the original request message, and sends it to the storage proxy service (proxy).
[0069] Step 102: Obtain the underlying network protocol stack type of the computing node.
[0070] The underlying network protocol stack type of the computing node is known, and it is the basic configuration of the network device.
[0071] Step 103: Change the Internet Protocol address type of the original request message according to the underlying network protocol stack type to obtain a target request message.
[0072] When the storage proxy service receives a request message for accessing storage, it processes the received request message according to the current underlying network protocol stack type, and sends it directly to the storage node after processing.
[0073] After the storage proxy service (proxy) receives the request message for accessing the storage, it needs to first parse the IP header of the request message, obtain the IP version field (such as the version field of IPv4 is 4, and the version field of IPv6 is 6), and determine the protocol stack type of the request message based on the version field. When the message protocol stack is the same as the Underlay protocol stack, the source IP of the request message (the IP address used by the virtual machine when sending the request message, that is, the IP address of the virtual machine) is modified to the Underlay address of the computing node, and forwarded from the storage intranet (the intranet address allocated to the storage node) directly to the storage node.
[0074] When the message protocol stack is different from the Underlay protocol stack, the request message is parsed and then re-encapsulated. The source IP is encapsulated into the Underlay address, and the destination address (the intranet address assigned to the storage node) is changed to the converted address.
[0075] The storage proxy service analyzes the message, decides whether to convert the destination IP according to the Underlay protocol stack and the received message protocol stack, and directly forwards the converted message to the storage node, reducing intermediate nodes and not passing through a centralized gateway, thus reducing network latency. At the same time, the customer's virtual machine does not need to be aware of the underlying Underlay network protocol stack type, and both IPv4 and IPv6 virtual machines can access the storage node in a local distributed manner, no longer restricted by the Underlay network.
[0076] Step 104: Send the target request message to the storage node, and receive an original response message returned by the storage node in response to the target request message.
[0077] After the storage proxy service decides whether to convert the destination IP according to the Underlay protocol stack and the received message protocol stack, if conversion is not required, the request message can be directly sent to the storage node through the storage intranet (the intranet address assigned to the storage node); if conversion is required, the request message is sent to the storage node through the converted destination address. The destination address of the request message is actually the URL of the storage intranet, that is, the intranet address assigned to the storage node.
[0078] After the storage proxy service sends the request message to the storage node, it also receives a response message returned by the storage node in response to the request message.
[0079] Step 105: Change the Internet Protocol address type of the original response message to obtain a target response message, and send the target response message to the virtual machine.
[0080] After the storage proxy service (proxy) receives the response message returned by the storage node in response to the request message, it needs to perform reverse conversion according to the protocol stack of the received response message and the protocol stack of the virtual machine.
[0081] After receiving the response message, the proxy parses the received message, extracts the IP header and data part, determines the protocol stack type of the message according to the version field in the IP header, and then performs reverse conversion according to the protocol stack type of the message and the protocol stack type of the virtual machine, and decides whether to convert the destination IP according to the virtual machine protocol stack and the received response message protocol stack. The source IP of the response message is the intranet address of the storage node that sends the response message. The converted target response message is sent to the virtual machine through the converted destination address.
[0082] Through the above method, when the IPv6 virtual machine is in an IPv4 network under the Underlay network, or when the IPv4 virtual machine is in an IPv6 under the Underlay network, it can directly access the storage node from the computing node, and can quickly access the storage node, reducing network delay. At the same time, since there is no need to transfer through a centralized network element node, nor does it require centralized NAT46 conversion, there is no centralized performance bottleneck, which improves the speed of big data storage and acquisition of network bandwidth, and improves efficiency. In addition, the client virtual machine does not need to perceive the type of the underlying Underlay network protocol stack, and both IPv4 or IPv6 virtual machines can access the storage node locally (computing node) in a distributed manner, and are no longer restricted by the Underlay network. During the current transition period from IPv4 to IPv6, it not only improves the access storage efficiency, but also avoids compatibility issues caused by different protocols. At the same time, it can also achieve unified management of IPv4 and IPv6 storage data in a virtualized environment, with a unified processing solution, to improve management efficiency and accuracy.
[0083] In an embodiment of the present invention, an original request message for accessing a storage node sent by a virtual machine is received; the underlying network protocol stack type of the computing node is obtained; the Internet protocol address type of the original request message is changed according to the underlying network protocol stack type to obtain a target request message; the target request message is sent to the storage node, and the original response message returned by the storage node in response to the target request message is received; the Internet protocol address type of the original response message is changed to obtain a target response message, and the target response message is sent to the virtual machine. The storage proxy service of the embodiment of the present invention parses the message, and decides whether to perform distributed NAT46 or NAT64 conversion on the destination IP according to the underlying network protocol stack and the received message protocol stack, and directly forwards the converted message to the storage node, reducing intermediate nodes, not passing through a centralized gateway, and reducing network delay. The customer's virtual machine does not need to perceive the underlying Underlay network protocol stack type, and both IPv4 or IPv6 virtual machines can access storage nodes in a local distributed manner, no longer limited by the Underlay network, improve access to storage efficiency, and avoid compatibility issues caused by different protocols. It can realize the unified management of IPv4 and IPv6 storage data in a virtualized environment, unify the processing scheme, and improve the efficiency and accuracy of management. It realizes the communication and interconnection between different protocols, avoids the need to modify the client or server software, and improves the efficiency and reliability of data transmission.
[0084] In an optional embodiment of the present invention, step 101 further includes the following steps:
[0085] S1011, receiving a first request message sent by a virtual switch; the first request message is a message in which the virtual switch changes the source Internet Protocol address of the original request message to information about the port through which the virtual machine is connected to the virtual switch.
[0086] A virtual switch (OVS) is also deployed in the computing node. The virtual switch connects the virtual machine and the storage proxy service. There is an Openflow flow table in the virtual machine. The Openflow flow table is one of the core components of the OpenFlow protocol, which is used to define and manage the packet processing rules of network devices (such as switches and routers). The flow table allows network administrators to dynamically configure the forwarding behavior of network devices through the software-defined network (SDN) controller, thereby achieving flexible network management and control.
[0087] An OpenFlow flow table usually consists of multiple flow entries, each of which defines a set of matching conditions and corresponding actions.
[0088] The request message sent by the virtual machine to access the storage node first reaches the virtual switch, and the message for the virtual machine to access the storage is modified through the OpenFlow flow table. Specifically, the message for the virtual machine to access the storage is modified through the Openflow flow table, and all the traffic (messages) whose purpose is to store the general intranet segment are redirected, and the source IP is modified to the local address + port number, where the local address is determined according to the IP address type of the message, and the port number is the access port number of the virtual machine on the virtual switch.
[0089] Assuming that the access port of the virtual machine on OVS is 75, the corresponding redirection flow table for IPv6 packets is:
[0090] ovs-ofctl-Oopenflow13
[0091] add-flow br-int"table=222,priority=1000,tcp,nw_dst=100.0.0.0 / 16
[0092] actions = move:NXM_OF_IN_PORT
[0093] []->NXM_OF_IP_SRC[],set_field:128.1.0.0 / 16->ip_src,output:proxy"
[0094] This command uses the ovs-ofctl tool to add an Oopenflow flow entry to the br-int bridge of ovs. Its function is to redirect the TCP (Transmission Control Protocol) traffic (messages) with the destination IP address of the 100.0.0.0 / 16 network segment, modify the source IP address to the access port information, and send it to the storage proxy port proxy.
[0095] ovs-ofctl: is a command line tool for Open vSwitch (OVS) used to manage and configure the flow table of the OVS switch;
[0096] -Oopenflow13: specifies the use of OpenFlow 1.3 protocol version;
[0097] add-flow: adds a new flow entry to the specified OVS switch;
[0098] br-int: specifies the name of the target OVS switch, here is br-int;
[0099] table=222: specifies that the flow table number of the flow entry is 222;
[0100] priority=1000: specifies the priority of the flow entry as 1000. The higher the priority, the higher the matching priority of the flow entry;
[0101] tcp: specifies the matching condition as TCP protocol;
[0102] nw_dst=100.0.0.0 / 16: specifies the matching condition as the destination IP address of the data packet (message) is within the 100.0.0.0 / 16 network segment;
[0103] actions=: specifies the list of actions to be executed after a successful match;
[0104] move:NXM_NX_INPORT[]->NXM_OF_IP_SRC[],set_field:128.1.0.0 / 16->ip_src means putting the access port into the lower 16 bits of the source IP of the message, and putting 128.1 into the upper 16 bits of ip_src. For a virtual machine with access port 75, after passing through this flow table, its source IP will be modified to 128.1.0.75.
[0105] output:proxy means sending the message to the port where the proxy is located, that is, the port where the proxy is connected to OVS.
[0106] This flow table is used to convert the source IP of the message accessing the storage from the virtual machine into the access port information, and then send it to the proxy.
[0107] For IPv6 packets, the redirection flow table is as follows:
[0108] ovs-ofctl-Oopenflow13
[0109] add-flow br-int"table=222,priority=1000,tcp6,ipv6_dst=100:: / 64
[0110] actions=move:NXM_OF_IN_PORT[]->NXM_NX_IPV6_SRC
[0111] [],set_field:fe80:: / 16->ipv6_src,output:proxy"
[0112] For a virtual machine with access port 75, after the IPv6 traffic accessing the storage passes through this flow table, its source IP address will be modified to fe80::4b, where 4b is the hexadecimal number of 75.
[0113] Redirection can prevent address conflicts in the computing node network.
[0114] In an optional embodiment of the present invention, step 103 further includes the following steps:
[0115] S1031, obtaining Internet protocol header information of the first request message;
[0116] S1032, determining a protocol stack type of the first request message according to a version field in the internet protocol header information;
[0117] S1033, if the protocol stack type of the first request message is the same as the protocol stack type of the underlying network, changing the source Internet Protocol address of the first request message to the Internet Protocol address of the underlying network to obtain a target request message;
[0118] S1034: If the protocol stack type of the first request message is different from the protocol stack type of the underlying network, the source Internet Protocol address of the first request message is changed to the Internet Protocol address of the underlying network, and the type of the destination Internet Protocol address of the first request message is converted to obtain a target request message.
[0119] When the storage proxy service receives the request message redirected by the virtual switch, it first parses the IP header, obtains the IP version field to determine the protocol stack type of the request message, and then processes the received request message according to the known Underlay protocol stack type.
[0120] If the IPv4 address of the storage node is 100.0.0.1, then the IPv6 address can be 100::100.0.0.1. After the storage proxy service receives the message, it finds that it is an IPv6 message, which is inconsistent with the protocol stack of the computing node's underlying network. It then strips the IPv6 header from the message and re-encapsulates the message into an IPv4 message. Specifically, the source IP encapsulation is the IP address of the computing node, and the destination IP is converted from the original message's destination IPv6 address to take the lower 32 bits, that is, 100.0.0.1. The message is then sent from the computing node through the modified destination address. Since the IP between the computing node and 100.0.0.1 is reachable, the message can be correctly sent to the storage node.
[0121] If the storage proxy service receives the message and finds that it is an IPv4 message, which is consistent with the protocol stack of the computing node's underlying network, it will directly encapsulate the source IP address into the IP address of the computing node, forward it from the destination address, and send it directly to the storage node even if it is sent out through the storage intranet.
[0122] In an optional embodiment of the present invention, S1034 further includes the following sub-steps:
[0123] S1034-1, if the protocol stack type of the first request message is Internet Protocol version 4 and the underlying network protocol stack type is Internet Protocol version 6, convert the destination Internet Protocol address type of the first request message to Internet Protocol version 6;
[0124] S1034-2: If the protocol stack type of the first request message is Internet Protocol version 6 and the underlying network protocol stack type is Internet Protocol version 4, convert the destination Internet Protocol address type of the first request message to Internet Protocol version 4.
[0125] When the protocol stack of the request message is different from the Underlay protocol stack, the destination address of the message needs to be converted and the destination address is changed to the converted address: when the received message is an IPv4 message but the Underlay is IPv6, the destination address is converted to IPv6 by NAT46; when the received message is an IPv6 message but the Underlay is IPv4, the destination address is converted to IPv4 by NAT64.
[0126] For example, when the destination IP of the received request message is 100.0.0.1, after receiving the message, NAT46 conversion is directly performed and becomes 100::100.0.0.1; when the destination IP of the received request message is the IPv6 address 100::100.0.0.1, it is converted to 100.0.0.1 through NAT64.
[0127] In an optional embodiment of the present invention, step 104 further includes the following sub-steps:
[0128] S1041, obtaining a destination Internet Protocol address of a target request message;
[0129] S1042, sending the target request message to the storage node via the destination Internet Protocol address;
[0130] S1043, receiving an original response message returned by the storage node in response to the target request message.
[0131] The storage proxy service decides whether to convert the destination IP according to the Underlay protocol stack and the received message protocol stack. If the Underlay protocol stack is the same as the received message protocol stack, there is no need to convert the destination address, and the request message can be directly sent to the storage node through the destination address (storage intranet, storage node's intranet address); if the Underlay protocol stack is different from the received message protocol stack, the destination address of the message needs to be converted, and the request message is sent to the storage node through the converted destination address.
[0132] In addition to sending the request message to the storage node, the storage proxy service also receives the response message returned by the storage node in response to the request message.
[0133] In an optional embodiment of the present invention, step 105 further includes the following steps:
[0134] S1051, obtaining the Internet protocol header information of the original response message and the protocol stack type of the virtual machine;
[0135] S1052, determining the protocol stack type of the original response message according to the version field in the internet protocol header information;
[0136] S1053, converting the destination Internet Protocol address type of the original response message according to the protocol stack type of the original response message and the protocol stack type of the virtual machine to obtain a target response message;
[0137] S1054: Send the target response message to the virtual machine.
[0138] Once the Proxy receives the response from the storage node, it reverse-converts the message and forwards it to the virtual machine.
[0139] Specifically, after receiving the response information, the Proxy parses the received message, extracts the IP header and data part, determines the protocol stack type of the message according to the version field in the IP header, and then performs reverse conversion according to the protocol stack type of the message and the protocol stack type of the virtual machine.
[0140] If the protocol stack type of the message is the same as the protocol stack type of the virtual machine (for example, both are IPv4 or both are IPv6), there is no need to perform reverse conversion, and the message is directly forwarded to the virtual machine.
[0141] If the protocol stack type of the message is different from the protocol stack type of the virtual machine, a reverse conversion is required; if the message is IPv6 and the virtual machine is IPv4, a reverse NAT46 conversion is performed on the message, the IPv6 header is stripped from the message, and the message is re-encapsulated into an IPv4 message. Specifically, the destination IP is converted from the original response message destination IPv6 address to an IPv4 address.
[0142] If the message is IPv4 and the virtual machine is IPv6, the message is reversed by NAT64 conversion, the IPv4 header is stripped from the message, and the message is re-encapsulated into an IPv6 message. Specifically, the destination IP is converted from the original response message destination IPv4 address to an IPv6 address.
[0143] The re-encapsulated response message is sent to the virtual machine.
[0144] In an optional embodiment of the present invention, the following steps are also included:
[0145] S1, stores the target data in the local cache of the storage proxy service according to the frequency of the virtual machine accessing the target data in the storage node.
[0146] S2: When the virtual machine accesses the storage node to obtain target data, if the target data is stored in the local cache, the target data in the local cache is directly returned to the virtual machine.
[0147] The storage proxy service maintains a cache locally (on the compute node) to store data that is frequently accessed by virtual machines. When a virtual machine requests access to storage, the proxy service first checks whether the required data exists in the local cache. If the required data is in the cache, the data in the cache can be directly returned. If the data is not in the cache, the proxy service obtains the data from the actual storage node and stores it in the local cache for quick access next time.
[0148] Since the proxy is deployed on the computing node, which is the location closest to the user's virtual machine, caching some data here can effectively reduce the time and delay of data transmission. Porxy can select the data to be cached according to the frequency of data access, so as to avoid frequently obtaining data from the storage node. Similarly, because the local data is cached, the cache needs to be updated to avoid data inconsistency. Since a long TCP connection is established between the proxy and the storage node. When the storage node finds that the data has been updated, it notifies all connected nodes that the original data is invalid. The proxy will delete the local data, and the next time the virtual machine obtains the storage data, it will go directly to the storage node to obtain the latest data. This ensures the efficiency and accuracy of storage in a virtualized environment.
[0149] At the same time, the Proxy can combine data processing strategies to perform local cache compression on stored data, remove sensitive information, and then send it to the storage node. This can reduce network bandwidth usage and protect personal privacy.
[0150] Reference Figure 3 , shows a message conversion flow chart provided by an embodiment of the present invention, which is as follows:
[0151] When the Proxy (storage proxy service) receives a request message for accessing storage, it processes the received request message according to the current Underlay (underlying network) protocol stack type. When the message protocol stack is the same as the Underlay protocol stack, the source IP address is directly modified to the Underlay address of the computing node, and the message is forwarded from the storage intranet and directly sent to the storage node.
[0152] When the message protocol stack is different from the Underlay protocol stack, the storage proxy service receives the message and finds that it is an IPv6 message, which is inconsistent with the Underlay (underlying network) protocol stack. It strips the IPv6 header from the message and re-encapsulates the message into an IPv4 message. The source IP encapsulates the IP address of the cost computing node, and the destination IP is converted from the original message destination IPv6 address to take the lower 32 bits. If the storage proxy service receives the message and finds that it is an IPv4 message, which is inconsistent with the Underlay (underlying network) protocol stack, it decapsulates the IPv4 message header, encapsulates the source IP into the IP address of the computing node, and the destination is the IPv6 address after the original IPv4 message destination IP is converted according to the agreed format. It is forwarded from the modified destination address (storage intranet) and sent directly to the storage node.
[0153] Reference Figure 4 , shows a communication schematic diagram in a virtualized storage system provided by an embodiment of the present invention, which is as follows:
[0154] In a large-scale cloud platform environment, tens of thousands of virtual machine instances are running. These virtual machine instances are distributed on thousands of computing nodes. The networks of these computing nodes are all IPv4 protocol stacks, and IPv4 can communicate between computing nodes and storage nodes.
[0155] First, a storage proxy service is started on each computing node. This proxy acts as an intermediate proxy for virtual machines to access storage and is responsible for processing storage requests from virtual machines. When a customer creates a storage service, the system allocates two IP addresses to the storage node, an IPv4 address and an IPv6 address converted from the IPv4 address, for subsequent virtual machine access with IPv4 and IPv6 addresses. For example, if the IPv4 address of the storage is 100.0.0.1, then the IPv6 address can be 100::100.0.0.1. Currently, all computing nodes are single IPv4 protocol stacks and are reachable to the storage node 100.0.0.1 address.
[0156] On the computing node, the Openflow flow table is pre-issued to modify the source IP of all outbound IPv4 traffic (messages) and IPv6 traffic to the local address (128.1 for IPv4 and fe80::4b for IPv6) and forward it to the storage proxy service proxy. This is done to prevent address conflicts in the local network.
[0157] Create a virtual machine with an IPv6 protocol stack in the environment. This virtual machine needs to access the storage node. Since this virtual machine only has an IPv6 protocol stack, it can only access the storage node through the IPv6 address. The message sent by the virtual machine is TCP6, the source IP is its own IPv6 address, and the destination IP is the address of the storage node (100::100.0.0.1). After the message is sent out from the virtual port, it matches the pre-delivered Openflow flow table, and the source IP is modified to fe80::4b and forwarded to the local storage agent.
[0158] After receiving the message, the storage proxy service finds that it is an IPv6 message, which is inconsistent with the underlying network protocol stack. It strips the IPv6 header from the message and re-encapsulates the message into an IPv4 message. The source IP encapsulates the IP address of the cost computing node, and the destination IP is converted from the original message destination IPv6 address to take the lower 32 bits, that is, 100.0.0.1. Then the message is sent from the computing node. Since the IP between the computing node and 100.0.0.1 is reachable, the message can be correctly sent to the storage node.
[0159] Reference Figure 5 , shows a schematic diagram of the structure of a communication device in a virtualized storage system provided by an embodiment of the present invention, the device comprising:
[0160] The receiving module 201 is used to receive an original request message for accessing a storage node sent by the virtual machine;
[0161] The protocol stack type acquisition module 202 is used to acquire the underlying network protocol stack type of the computing node;
[0162] A target request message acquisition module 203, configured to change the Internet protocol address type of the original request message according to the underlying network protocol stack type to obtain a target request message;
[0163] The sending module 204 is used to send the target request message to the storage node, and receive the original response message returned by the storage node in response to the target request message;
[0164] The target response message acquisition module 205 is used to change the Internet Protocol address type of the original response message, obtain the target response message, and send the target response message to the virtual machine.
[0165] In an optional embodiment of the present invention, the receiving module 201 includes:
[0166] The first receiving module is used to receive a first request message sent by the virtual switch; the first request message is a message in which the virtual switch changes the source Internet Protocol address of the original request message to the information of the port through which the virtual machine is connected to the virtual switch.
[0167] In an optional embodiment of the present invention, the target request message acquisition module 203 includes:
[0168] A first acquisition module, used to acquire Internet protocol header information of the first request message;
[0169] A first determining module, configured to determine a protocol stack type of the first request message according to a version field in the internet protocol header information;
[0170] A first judgment module is used to change the source Internet Protocol address of the first request message to the Internet Protocol address of the underlying network if the protocol stack type of the first request message is the same as the protocol stack type of the underlying network, so as to obtain a target request message;
[0171] The second judgment module is used to change the source Internet Protocol address of the first request message to the Internet Protocol address of the underlying network if the protocol stack type of the first request message is different from the protocol stack type of the underlying network, and convert the type of the destination Internet Protocol address of the first request message to obtain a target request message.
[0172] In an optional embodiment of the present invention, the second judgment module further includes:
[0173] a first conversion module, configured to convert a destination Internet Protocol address type of the first request message into Internet Protocol version 6 if the protocol stack type of the first request message is Internet Protocol version 4 and the underlying network protocol stack type is Internet Protocol version 6;
[0174] The second conversion module is used to convert the destination Internet Protocol address type of the first request message into Internet Protocol version 4 if the protocol stack type of the first request message is Internet Protocol version 6 and the underlying network protocol stack type is Internet Protocol version 4.
[0175] In an optional embodiment of the present invention, the sending module 204 includes:
[0176] A second acquisition module, used to acquire a destination Internet Protocol address of the target request message;
[0177] A first sending module, configured to send the target request message to the storage node via the destination Internet Protocol address;
[0178] A second receiving module is configured to receive an original response message returned by the storage node in response to the target request message.
[0179] In an optional embodiment of the present invention, the target response message acquisition module 205 includes:
[0180] A third acquisition module, used to obtain the Internet protocol header information of the original response message and the protocol stack type of the virtual machine;
[0181] A third judgment module, used for judging the protocol stack type of the original response message according to the version field in the Internet protocol header information;
[0182] A third conversion module, used to convert the destination Internet Protocol address type of the original response message according to the protocol stack type of the original response message and the protocol stack type of the virtual machine to obtain a target response message;
[0183] The second sending module is used to send the target response message to the virtual machine.
[0184] In an optional embodiment of the present invention, the device further comprises:
[0185] A storage module, used for storing the target data in the local cache of the storage proxy service according to the frequency of the virtual machine accessing the target data in the storage node;
[0186] The access module is used for directly returning the target data in the local cache to the virtual machine when the virtual machine accesses the storage node to obtain the target data if the target data is stored in the local cache.
[0187] In an embodiment of the present invention, an original request message for accessing a storage node sent by a virtual machine is received; the underlying network protocol stack type of the computing node is obtained; the Internet protocol address type of the original request message is changed according to the underlying network protocol stack type to obtain a target request message; the target request message is sent to the storage node, and the original response message returned by the storage node in response to the target request message is received; the Internet protocol address type of the original response message is changed to obtain a target response message, and the target response message is sent to the virtual machine. The storage proxy service of the embodiment of the present invention parses the message, and decides whether to perform distributed NAT46 or NAT64 conversion on the destination IP according to the underlying network protocol stack and the received message protocol stack, and directly forwards the converted message to the storage node, reducing intermediate nodes, not passing through a centralized gateway, and reducing network delay. The customer's virtual machine does not need to perceive the underlying Underlay network protocol stack type, and both IPv4 or IPv6 virtual machines can access storage nodes in a local distributed manner, no longer limited by the Underlay network, improve access to storage efficiency, and avoid compatibility issues caused by different protocols. It can realize the unified management of IPv4 and IPv6 storage data in a virtualized environment, unify the processing scheme, and improve the efficiency and accuracy of management. It realizes the communication and interconnection between different protocols, avoids the need to modify the client or server software, and improves the efficiency and reliability of data transmission.
[0188] An embodiment of the present invention further provides an electronic device, comprising a processor, a memory, and a computer program stored in the memory and capable of running on the processor, wherein when the computer program is executed by the processor, the communication method in the virtualized storage system as described above is implemented.
[0189] The memory may include a random access memory (RAM) or a non-volatile memory, such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.
[0190] The processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
[0191] An embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the communication method in the virtualized storage system as described above is implemented.
[0192] As for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0193] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented by software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present invention is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website site, computer, server or data center to another website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state hard disk Solid State Disk (SSD)), etc.
[0194] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0195] Each embodiment in this specification is described in a related manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0196] The above description is only a preferred embodiment of the present invention and is not intended to limit the protection scope of the present invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention are included in the protection scope of the present invention.
Claims
1. A communication method in a virtualized storage system, the virtualized storage system comprising at least one computing node and at least one storage node, the computing node being provided with a storage proxy service object and at least one virtual machine, the method comprising: Receiving an original request message for accessing a storage node sent by the virtual machine; Obtaining the underlying network protocol stack type of the computing node; Changing the Internet Protocol address type of the original request message according to the underlying network protocol stack type to obtain a target request message; Sending the target request message to the storage node, and receiving an original response message returned by the storage node in response to the target request message; The Internet Protocol address type of the original response message is changed to obtain a target response message, and the target response message is sent to the virtual machine.
2. The method according to claim 1, characterized in that The computing node is also deployed with a virtual switch, and the virtual switch is used for communication between the virtual machine and the storage proxy service; The receiving a request message sent by the virtual machine to access a storage node includes: Receiving a first request message sent by the virtual switch; The first request message is a message in which the virtual switch changes the source Internet Protocol address of the original request message to information of the port through which the virtual machine is connected to the virtual switch.
3. The method according to claim 1 or 2, characterized in that: The step of changing the Internet Protocol address type of the original request message according to the underlying network protocol stack type to obtain a target request message includes: Obtaining Internet Protocol header information of the first request message; Determine the protocol stack type of the first request message according to the version field in the internet protocol header information; If the protocol stack type of the first request message is the same as the protocol stack type of the underlying network, changing the source Internet Protocol address of the first request message to the Internet Protocol address of the underlying network to obtain a target request message; If the protocol stack type of the first request message is different from the protocol stack type of the underlying network, the source Internet Protocol address of the first request message is changed to the Internet Protocol address of the underlying network, and the type of the destination Internet Protocol address of the first request message is converted to obtain the target request message.
4. The method according to claim 3, characterized in that: The converting the type of the destination Internet Protocol address of the first request message includes: If the protocol stack type of the first request message is Internet Protocol version 4 and the underlying network protocol stack type is Internet Protocol version 6, converting the destination Internet Protocol address type of the first request message to Internet Protocol version 6; If the protocol stack type of the first request message is Internet Protocol version 6 and the underlying network protocol stack type is Internet Protocol version 4, the destination Internet Protocol address type of the first request message is converted to Internet Protocol version 4.
5. The method according to claim 1 or 4, characterized in that: The sending of the target request message to the storage node and receiving an original response message returned by the storage node in response to the target request message comprises: Obtaining a destination Internet Protocol address of the target request message; Sending the target request message to the storage node via the destination Internet Protocol address; Receive an original response message returned by the storage node in response to the target request message.
6. The method according to claim 1, characterized in that The changing the Internet Protocol address type of the original response message to obtain a target response message, and sending the target response message to the virtual machine includes: Obtaining Internet protocol header information of the original response message and a protocol stack type of the virtual machine; Determining the protocol stack type of the original response message according to the version field in the internet protocol header information; Converting the destination Internet Protocol address type of the original response message according to the protocol stack type of the original response message and the protocol stack type of the virtual machine to obtain a target response message; The target response message is sent to the virtual machine.
7. The method according to claim 1, characterized in that The method further comprises: According to the frequency of the virtual machine accessing the target data in the storage node, storing the target data in the local cache of the storage proxy service; When the virtual machine accesses the storage node to obtain target data, if the target data is stored in the local cache, the target data in the local cache is directly returned to the virtual machine.
8. A communication device in a virtualized storage system, characterized in that: The device comprises: A receiving module, used to receive an original request message for accessing a storage node sent by the virtual machine; A protocol stack type acquisition module, used to obtain the underlying network protocol stack type of the computing node; A target request message acquisition module, used to change the Internet protocol address type of the original request message according to the underlying network protocol stack type to obtain a target request message; A sending module, used to send the target request message to the storage node, and receive an original response message returned by the storage node in response to the target request message; The target response message acquisition module is used to change the Internet Protocol address type of the original response message, obtain the target response message, and send the target response message to the virtual machine.
9. An electronic device, characterized in that: The invention comprises a processor, a memory and a computer program stored in the memory and capable of running on the processor, wherein when the computer program is executed by the processor, the communication method in the virtualized storage system according to any one of claims 1 to 7 is implemented.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the communication method in the virtualized storage system according to any one of claims 1 to 7 is implemented.
Citation Information
Cited By
Portal authentication method based on virtual IP, gateway device and system
CN120567513A
Intercommunication method and system for IPV4 network and IPV6 network, and storage medium
CN120915759A