Message forwarding method and device based on cloud network
By replacing the Ethernet protocol header with a private extension protocol header, setting up each field in the private extension protocol header according to business needs, encapsulate it through the VXLAN protocol, and generating a second message, thereby transmitting more service information between the computing node and the network element, the problem of insufficient reserved fields of the VXLAN protocol in the prior art is solved, and more efficient service information carrying is achieved.
Patent Information
- Application Number
- CN202410870053.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-28
- Publication Date
- 2025-03-18
- Estimated Expiration
- 2044-06-28
AI Technical Summary
In the prior art, the reserved fields defined by the VXLAN protocol are only 32 bits, which leads to limited expansion when traffic transmission between computing nodes and network elements, and cannot effectively carry and store sufficient service information.
By replacing the Ethernet protocol header with a private extension protocol header, setting up each field in the private extension protocol header according to business needs, encapsulate it through the VXLAN protocol, and generating a second message, thereby transmitting more service information between the computing node and the network element.
This increases the amount of service information that the packet can carry, and solves the problem of expansion restriction caused by insufficient reserved fields of the tunnel protocol header (VXLAN).
Smart Images

Figure CN118740550B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present disclosure relate to the field of computer and network communication technology, and in particular to a cloud network-based message forwarding method and device. Background Art
[0002] In the current implementation of cloud networks, tenants' business traffic is usually isolated and encapsulated using the VXLAN (Virtual Extensible Local Area Network, network virtualization technology) protocol, and then transmitted between different computing nodes and network elements.
[0003] In the process of traffic transmission between computing nodes and network elements, there are usually some business information that needs to be identified or carried. In the existing technical methods, the reserved field of the VXLAN protocol is usually used for identification, but the reserved field defined by the VXLAN protocol is only 32 bits, and the amount of information that can be stored is small. When transmitting traffic between computing nodes and network elements, there is often a technical problem of insufficient reserved fields leading to limited expansion. Summary of the invention
[0004] The embodiments of the present disclosure provide a cloud network-based message forwarding method and device, which can increase the amount of business information that can be carried by the message.
[0005] In a first aspect, an embodiment of the present disclosure provides a cloud network-based message forwarding method, including:
[0006] Receive a first message sent by a source virtual machine to a destination virtual machine, where the first message is generated by encapsulating target traffic based on an Ethernet protocol;
[0007] Parse the first message, replace the Ethernet protocol header of the first message with a preset private extended protocol header, set each field in the private extended protocol header according to business requirements, and encapsulate it through the virtual extensible local area network VXLAN protocol to generate a second message;
[0008] The target traffic is forwarded based on the second message.
[0009] In a second aspect, an embodiment of the present disclosure provides a cloud network-based message forwarding device, including:
[0010] A receiving unit, configured to receive a first message sent by a source virtual machine to a destination virtual machine, wherein the first message is generated by encapsulating target traffic based on an Ethernet protocol;
[0011] A parsing unit, configured to parse the first message, replace the Ethernet protocol header of the first message with a preset private extended protocol header, set each field in the private extended protocol header according to business requirements, and encapsulate the first message through a virtual extensible local area network (VXLAN) protocol to generate a second message;
[0012] A forwarding unit, used to forward the target traffic based on the second message.
[0013] In a third aspect, an embodiment of the present disclosure provides an electronic device, including: a processor and a memory;
[0014] The memory stores computer-executable instructions;
[0015] The processor executes the computer-executable instructions stored in the memory, so that the at least one processor executes the cloud network-based message forwarding method as described in the first aspect and various possible designs of the first aspect.
[0016] In a fourth aspect, an embodiment of the present disclosure provides a computer-readable storage medium, in which computer execution instructions are stored. When a processor executes the computer execution instructions, the cloud network-based message forwarding method described in the first aspect and various possible designs of the first aspect is implemented.
[0017] In a fifth aspect, an embodiment of the present disclosure provides a computer program product, including a computer program, which, when executed by a processor, implements the cloud network-based message forwarding method as described in the first aspect and various possible designs of the first aspect.
[0018] The cloud network-based message forwarding method and device provided in this embodiment include: receiving a first message sent by a source virtual machine to a destination virtual machine, the first message is generated by encapsulating the target traffic based on the Ethernet protocol; parsing the first message, replacing the Ethernet protocol header of the first message with a preset private extension protocol header and setting each field in the private extension protocol header according to business requirements, and encapsulating and generating a second message through the virtual extensible local area network VXLAN protocol; forwarding the target traffic based on the second message. In this technical solution, since the Ethernet protocol header of the first message is replaced with a preset private extension protocol header, and the fields in the private extension protocol header can store business information, more business information can be stored when forwarding the target traffic based on the second message, thereby increasing the amount of business information that can be carried by the message, thereby solving the technical problem of limited expansion due to insufficient reserved fields in the tunnel protocol header (VXLAN) in the prior art. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] In order to more clearly illustrate the embodiments of the present disclosure or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0020] Figure 1 A schematic diagram of an application scenario of a cloud network-based message forwarding method provided in an embodiment of the present disclosure;
[0021] Figure 2 The process of the cloud network-based message forwarding method provided in the embodiment of the present disclosure Figure 1 ;
[0022] Figure 3 Schematic diagram of a cloud network-based message forwarding method provided in an embodiment of the present disclosure Figure 1 ;
[0023] Figure 4 Schematic diagram of a cloud network-based message forwarding method provided in an embodiment of the present disclosure Figure 2 ;
[0024] Figure 5 Schematic diagram of the second message provided in the embodiment of the present disclosure Figure 1 ;
[0025] Figure 6 A schematic diagram of the structure of a cloud network-based message forwarding device provided in an embodiment of the present disclosure;
[0026] Figure 7 A schematic diagram of the structure of an electronic device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION
[0027] In order to make the purpose, technical solution and advantages of the embodiments of the present disclosure clearer, the technical solution in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are part of the embodiments of the present disclosure, not all of the embodiments. Based on the embodiments in the present disclosure, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present disclosure.
[0028] The technical terms and technical background involved in the embodiments of the present disclosure are described as follows:
[0029] In the current implementation of cloud networks, tenants' business traffic is usually isolated and encapsulated using the VXLAN (Virtual Extensible Local Area Network, network virtualization technology) protocol, and then transmitted between different computing nodes and network elements. Among them, the tenant's business traffic is called overlay traffic, and the network to which the tenant belongs is called the overlay network. The overlay traffic is encapsulated and transmitted between computing nodes and network elements using the VXLAN protocol. The encapsulated traffic is called underlay traffic, and the network between computing nodes and network elements is called the underlay network.
[0030] In a VXLAN-based underlay network, a node that supports VXLAN protocol encapsulation and decapsulation and can exchange traffic with other computing nodes or network elements through the VXLAN protocol is called a VTEP (VXLAN Tunnel Endpoint).
[0031] In the overlay network, the TCP / IP protocol stack based on the Ethernet protocol is usually running, and the outermost layer of all service traffic is the Ethernet protocol. In the traditional physical network, the Ethernet protocol belongs to the second layer of the OSI (Open Systems Interconnection) network model. The network protocol stack performs neighbor discovery based on the ARP / ND protocol. After finding the route, the message is sent to the switch by specifying the next hop by the MAC address (Media Access Control Address, Ethernet address), and the switch forwards the traffic based on the MAC address in the Ethernet protocol. In the public cloud scenario, the implementation of the virtual switch (vSwitch) mostly omits the logic of Layer 2 forwarding, and uses the control message proxy technology to replace the neighbor discovery function of ARP / ND, and directly uses the Layer 3 IP address of the service traffic for traffic forwarding. Among them, the ARP / ND proxy technology will use a virtual MAC to answer all ARP / ND requests from the virtual machine, which will enable all service traffic in the virtual machine to be sent out normally from the protocol stack and finally forwarded to the computing node. At this time, the computing node will perform VXLAN encapsulation on the service traffic according to the routing information, and then send the traffic to the destination VTEP.
[0032] In complex scenarios of cloud networks, there is usually some business information that needs to be identified or carried between VTEPs. In existing technical methods, the reserved field of the VXLAN protocol is usually used for identification, but the reserved field defined by the VXLAN protocol is only 32 bits, which can store less information. When transmitting traffic between computing nodes and network elements, there is often a technical problem of insufficient reserved fields leading to limited expansion.
[0033] In view of the technical problem of insufficient reserved fields in the prior art, the inventor's technical concept is as follows: After the Ethernet protocol message is sent from the virtual machine to the vSwitch, the source MAC of the message is parsed by the vSwitch, and then the message is transmitted between VTEPs. During this transmission process, the Ethernet protocol header does not participate in the traffic forwarding decision and does not affect the traffic forwarding process. Therefore, by replacing the Ethernet protocol header, the Ethernet protocol message can be converted into a private extended protocol message, and more business information can be carried through the private extended protocol message.
[0034] Accordingly, the specific steps may include: first, receiving a first message sent by a source virtual machine to a destination virtual machine, wherein the first message is generated by encapsulating the target traffic based on the Ethernet protocol; then, parsing the first message, replacing the Ethernet protocol header of the first message with a preset private extension protocol header and setting each field in the private extension protocol header according to business requirements, and encapsulating and generating a second message through the virtual extensible local area network VXLAN protocol; finally, forwarding the target traffic based on the second message.
[0035] In this technical solution, since the Ethernet protocol header of the first message is replaced by a preset private extended protocol header, and the fields in the private extended protocol header can store business information, more business information can be stored when forwarding the target traffic based on the second message, thereby increasing the amount of business information that the message can carry, thereby solving the technical problem in the prior art that the expansion is limited due to insufficient reserved fields in the tunnel protocol header (VXLAN).
[0036] The application scenarios of the embodiments of the present disclosure are explained below:
[0037] The cloud network-based message forwarding method provided in the embodiments of the present disclosure can be applied to business information transmission scenarios between various network nodes. Figure 1 Schematic diagram of an application scenario of a cloud network-based message forwarding method provided in an embodiment of the present disclosure. Figure 1As shown, virtual machine A sends a first message to a virtual switch (vSwitch) based on the Ethernet protocol, and vSwitch replaces the Ethernet protocol header of the first message with a preset private extended protocol header, configures each field of the private extended protocol header according to the business demand information, and encapsulates it through the VXLAN protocol to obtain a second message. The second message including the private extended protocol header is forwarded between multiple network nodes, and more business information can be carried by the private extended protocol header in the second message, which solves the technical problem of limited expansion due to insufficient reserved fields of the tunnel protocol header (VXLAN) between multiple network nodes. Afterwards, the last network node 3 forwards the second message to the virtual switch, unpacks the VXLAN protocol of the second message through the virtual switch, and replaces the private extended protocol header in the second message with the Ethernet protocol header to obtain a third message, and sends the third message to virtual machine B. Network communication between virtual machine A and virtual machine B is realized.
[0038] The following is a specific implementation process of the cloud network-based message forwarding method and device involved in the embodiments of the present disclosure. Some examples are for illustrative purposes only and are not intended to be limiting. The execution subject of the cloud network-based message forwarding method involved in the embodiments of the present disclosure is an electronic device, which can be a computer, a mobile phone, a tablet, a server, etc.
[0039] Figure 2 Schematic diagram of the process of the cloud network-based message forwarding method provided in the embodiment of the present disclosure Figure 1 ,like Figure 2 As shown, the cloud network-based message forwarding method may include:
[0040] S201. Receive a first message sent by a source virtual machine to a destination virtual machine, where the first message is generated by encapsulating target traffic based on an Ethernet protocol.
[0041] In the disclosed embodiment, the first message may be isolated and encapsulated through a VXLAN (Virtual Extensible Local Area Network, network virtualization technology) protocol and then transmitted between different computing nodes and network elements.
[0042] Optionally, the source virtual machine may be a virtual machine in the first computing node, and the destination virtual machine may be a virtual machine in the second computing node. The first computing node and the second computing node are different computing nodes. For example, Figure 3 As shown, the source virtual machine is the first virtual machine in computing node A, and the destination virtual machine is the second virtual machine in computing node B.
[0043] S202. Parse the first message, replace the Ethernet protocol header of the first message with a preset private extension protocol header, set each field in the private extension protocol header according to business requirements, and encapsulate it through the virtual extensible local area network VXLAN protocol to generate a second message.
[0044] In the disclosed embodiment, the first message can be parsed by the virtual switch in the first computing node, the Ethernet protocol header of the first message is replaced by the preset private extension protocol header, and the fields in the private extension protocol header are set according to business requirements, thereby achieving the coverage of the first message of the Ethernet protocol by the second message of the private extension protocol, and then the second message of the private extension protocol can be transmitted between multiple network nodes.
[0045] Optionally, the private extended protocol header includes a protocol identifier, a protocol version identifier, a traffic type identifier, a service identifier, and a storable field for storing service information.
[0046] It should be noted that the length of the private extended protocol header (bytes included) is the same as the length of the Ethernet protocol header. Exemplary, the length of the Ethernet protocol header is 14 bytes, and the length of the private extended protocol header is also 14 bytes (112 bits). Among them, the protocol identifier in the private extended protocol header includes 8 bits, the protocol version identifier includes 4 bits, the type identifier includes 8 bits, the multiple business information identifiers in the business identifier include 12 bits, and the storable field includes 80 bits.
[0047] In some embodiments, the service identifier includes multiple service information identification bits. Exemplarily, the service identifier may include 12 bits of information, that is, 12 service information identification bits. The 12 service information identification bits are, in order: CLGRRRVMRRRR. Among them, R is a reserved field, and any service information identification bit related to the service to be expanded can be added. Among them, C is the service information identification bit corresponding to the computing node, which can be expressed as 0x800 (hexadecimal). L is the service information identification bit corresponding to the load balancing node, which can be expressed as 0x400 (hexadecimal). G is the service information identification bit corresponding to the gateway node, which can be expressed as 0x200 (hexadecimal). V is the service information identification bit corresponding to VNI, which can be expressed as 0x20 (hexadecimal); M is the service information identification bit corresponding to MAC, which can be expressed as 0x10 (hexadecimal).
[0048] In the embodiment of the present disclosure, more service information can be carried through the private extended protocol header of the second message.
[0049] S203: forward the target traffic based on the second message.
[0050] In the disclosed embodiment, the second message can be forwarded to the next VTEP based on the forwarding path topology. On each forwarding path, the VTEP is configured to parse the message to obtain a private extended protocol header and support changing the fields in the private extended protocol header or executing business logic according to its own business needs.
[0051] In some embodiments, each VTEP may parse the first message to obtain routing information corresponding to the first message, and then determine the next VTEP that receives the first message based on the routing information, so as to forward the second message to the next VTEP based on the forwarding path topology.
[0052] In some embodiments, on each forwarding path, the VTEP is configured to support changing the service information identification bit corresponding to the node identifier in the private extended protocol header according to its own node identifier.
[0053] Optionally, the VTEP on the forwarding path can be a network node. Accordingly, on each forwarding path, the VTEP is configured to parse the message to obtain a private extended protocol header and support changing the fields in the private extended protocol header or executing business logic according to its own business needs, including: on each forwarding path, the VTEP is configured to set the business information identifier corresponding to the node identifier of the network node in the business identifier to 1, and reset the business information identifier corresponding to the node identifier of the previous network node in the business identifier to 0, and, according to the VNI corresponding to the first virtual machine, set the business information identifier corresponding to the VNI to 1, and store the VNI in a storable field of the private extended protocol header; and, according to the MAC corresponding to the second virtual machine, set the business information identifier corresponding to the MAC to 1, and store the MAC in a storable field of the private extended protocol header.
[0054] For example, Figure 3 As shown, VTEP is a network node on the forwarding path between computing node A and computing node B. Computing node A includes a first virtual machine for data processing and a virtual switch for data transmission. The computing node forwards the second message to the first network node (gateway node) through the virtual switch. The gateway node resets the identification field (0x800) corresponding to the computing node in the private extended protocol header to 0, and sets the identification field (0x200) corresponding to the gateway node in the private extended protocol header to 1.
[0055] The gateway node forwards the second message to the next network node (load balancing node), and the load balancing node sets the identification field (0x200) corresponding to the gateway node in the private extended protocol header to 0, and sets the identification field (0x400) corresponding to the load balancing node in the private extended protocol header to 1.
[0056] It should be noted that each computing node can also receive and parse the third message of the private extended protocol, replace the private extended protocol header in the third message with an Ethernet protocol header, set the source MAC to the virtual MAC of the virtual switch and the destination MAC to the MAC of the tenant network card to generate a fourth message, and forward the fourth message to the destination virtual machine.
[0057] The third message of the private extended protocol may be any message based on the private extended protocol. For example, the third message of the private extended protocol may be Figure 3 The second message in the embodiment. For example, Figure 3 As shown, when the last network node sends the second message to the computing node B, the second message is replaced with a message of the Ethernet protocol through the virtual switch in the computing node B, and is sent to the second virtual machine in the computing node B. Optionally, the virtual switch of the computing node B can obtain the MAC address of the second virtual machine from the local configuration on the computing node B, and send the message of the Ethernet protocol to the second virtual machine through the MAC address of the second virtual machine.
[0058] The cloud network-based message forwarding method provided by the embodiment of the present disclosure includes: receiving a first message sent by a source virtual machine to a destination virtual machine, the first message is generated by encapsulating the target traffic based on the Ethernet protocol; parsing the first message, replacing the Ethernet protocol header of the first message with a preset private extension protocol header and setting each field in the private extension protocol header according to business requirements, and encapsulating and generating a second message through the virtual extensible local area network VXLAN protocol; forwarding the target traffic based on the second message. In this technical solution, since the Ethernet protocol header of the first message is replaced with a preset private extension protocol header, and the fields in the private extension protocol header can store business information, more business information can be stored when forwarding the target traffic based on the second message, thereby increasing the amount of business information that can be carried by the message, thereby solving the technical problem of limited expansion due to insufficient reserved fields in the tunnel protocol header (VXLAN) in the prior art.
[0059] Figure 4 Schematic diagram of the process of the cloud network-based message forwarding method provided in the embodiment of the present disclosure Figure 2 In the embodiment of the present disclosure, the specific method of setting each field in the private extension protocol header according to business requirements in step S202 is described. Figure 4 As shown, the method includes:
[0060] S401. Configure the protocol identifier in the private extended protocol header to be a preset fixed value, where the preset fixed value is used to identify the private protocol.
[0061] For example, Figure 5As shown, the protocol identifier of the private extension protocol is 0xEE, indicating the private extension protocol. The protocol version identifier is 0x0, indicating version number 0.
[0062] S402: Configure the protocol version number in the private extended protocol header to be the version of the private protocol; and configure the service type identifier in the private extended protocol header to be the service type corresponding to the target traffic.
[0063] In some embodiments, the traffic type identifier includes multiple values within a preset value range, and one value corresponds to one traffic type identifier. In the embodiments of the present disclosure, the preset value range is not specifically limited. Optionally, the preset value range is determined by the size of the type identifier field. Exemplarily, the size of the type identifier field is 8 bits, and the preset value range is [0, 0xFF].
[0064] Optionally, the service type identifier in the private extended protocol header is configured as the service type corresponding to the target traffic, including: if the service type corresponding to the target traffic is no type, the service type identifier in the private extended protocol header is configured as 0x00; if the service type corresponding to the target traffic is a traffic mirroring type, the service type identifier in the private extended protocol header is configured as 0x01; if the service type corresponding to the target traffic is a cross-network traffic type, the service type identifier in the private extended protocol header is configured as 0x02, wherein the cross-network traffic type includes a cross-virtual private cloud VPC network traffic type.
[0065] For example, Figure 5 As shown, the type identifier in the private extended protocol header is 0x02, indicating the cross-network traffic type.
[0066] S403: Configure the service information identification bit in the private extended protocol header so that the service information identification bit carries the node information that the target traffic forwarding process depends on.
[0067] In the embodiment of the present disclosure, each service information identification bit corresponds to a type of service information. The virtual switch in the computing node or each VTEP in the forwarding process can configure the service information identification bit in the private extended protocol header according to the node information that the forwarding process depends on.
[0068] Optionally, the node information that computing node A relies on in the forwarding process includes: the node identifier of computing node A, the VNI (VXLAN Network Identifier) corresponding to the first virtual machine in computing node A, and the Ethernet address MAC corresponding to the second virtual machine in computing node B.
[0069] Accordingly, this step may include: according to the node identifier of the first computing node, setting the business information identifier corresponding to the first computing node in the business identifier to 1, and, according to the VNI corresponding to the first virtual machine, setting the business information identifier corresponding to the VNI to 1, and storing the VNI in a storable field of the private extended protocol header; and, according to the MAC corresponding to the second virtual machine, setting the business information identifier corresponding to the MAC to 1, and storing the MAC in a storable field of the private extended protocol header.
[0070] For example, Figure 5 As shown in the figure, the service identifier is 0x810. At this time, the service information identifier corresponding to the computing node is 1, indicating that the traffic comes from the computing node; the service information identifier corresponding to the MAC is 1, indicating that the MAC address information needs to be transmitted. Among them, the MAC address information that needs to be transmitted is: 66:55:44:33:22:11, which is stored in the first 6 bytes of the storable field.
[0071] Figure 6 A schematic diagram of a cloud network-based message forwarding device provided in an embodiment of the present disclosure, such as Figure 6 As shown, the cloud network-based message forwarding device includes:
[0072] A receiving unit 601 is configured to receive a first message sent by a source virtual machine to a destination virtual machine, where the first message is generated by encapsulating target traffic based on an Ethernet protocol;
[0073] A parsing unit 602 is used to parse the first message, replace the Ethernet protocol header of the first message with a preset private extension protocol header and set each field in the private extension protocol header according to business requirements, and encapsulate it through a virtual extensible local area network VXLAN protocol to generate a second message;
[0074] The forwarding unit 603 is used to forward the target traffic based on the second message.
[0075] According to one or more embodiments of the present disclosure, the private extended protocol header includes a protocol identifier, a protocol version identifier, a traffic type identifier, a service identifier, and a storable field for storing service information.
[0076] According to one or more embodiments of the present disclosure, the parsing unit 602 sets each field in the private extended protocol header according to business requirements, specifically including: configuring the protocol identifier in the private extended protocol header to be a preset fixed value, and the preset fixed value is used to identify the private protocol; configuring the protocol version number in the private extended protocol header to be the version of the private protocol; configuring the service type identifier in the private extended protocol header to be the service type corresponding to the target traffic; configuring the service information identifier in the private extended protocol header so that the service information identifier carries the node information on which the target traffic forwarding process depends.
[0077] According to one or more embodiments of the present disclosure, the parsing unit 602 is also used to receive and parse a third message, replace the private extended protocol header in the third message with an Ethernet protocol header, and set the source MAC to the virtual MAC of the virtual switch and the destination MAC to the MAC of the tenant network card to generate a fourth message, and forward the fourth message to the destination virtual machine.
[0078] According to one or more embodiments of the present disclosure, the forwarding unit 603 forwards the target traffic based on the second message, including: based on the forwarding path topology, forwarding the second message to the next VXLAN protocol-based traffic switching node VTEP, and on each forwarding path VTEP is configured to parse the message to obtain a private extended protocol header and support changing the fields in the private extended protocol header or executing business logic according to its own business needs.
[0079] According to one or more embodiments of the present disclosure, the forwarding unit is also used to configure the VTEP on each forwarding path as follows: the VTEP on each forwarding path is configured to support changing the business information identification bit corresponding to the node identifier in the private extended protocol header according to its own node identifier.
[0080] According to one or more embodiments of the present disclosure, the traffic type identifier includes multiple numerical values within a preset value range, and one numerical value corresponds to one traffic type identifier; accordingly, the parsing unit 602 configures the business type identifier in the private extended protocol header to the business type corresponding to the target traffic, specifically including: if the business type corresponding to the target traffic is typeless, then the business type identifier in the private extended protocol header is configured to be 0x00; if the business type corresponding to the target traffic is a traffic mirroring type, then the business type identifier in the private extended protocol header is configured to be 0x01; if the business type corresponding to the target traffic is a cross-network traffic type, then the business type identifier in the private extended protocol header is configured to be 0x02, wherein the cross-network traffic type includes a cross-virtual private cloud VPC network traffic type.
[0081] refer to Figure 7, which shows a schematic diagram of the structure of an electronic device 700 suitable for implementing the embodiment of the present disclosure, and the electronic device 700 may be a terminal device or a server. The terminal device may include but is not limited to mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, personal digital assistants (PDAs), tablet computers (Portable Android Devices, PADs), portable multimedia players (PMPs), vehicle terminals (such as vehicle navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 7 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0082] like Figure 7 As shown, the electronic device 700 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 701, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 702 or a program loaded from a storage device 708 to a random access memory (RAM) 703. Various programs and data required for the operation of the electronic device 700 are also stored in the RAM 703. The processing device 701, the ROM 702, and the RAM 703 are connected to each other via a bus 704. An input / output (I / O) interface 705 is also connected to the bus 704.
[0083] Typically, the following devices may be connected to the I / O interface 705: input devices 706 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; output devices 707 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; storage devices 708 including, for example, a magnetic tape, a hard disk, etc.; and communication devices 709. The communication devices 709 may allow the electronic device 700 to communicate with other devices wirelessly or by wire to exchange data. Although Figure 7 The electronic device 700 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead.
[0084] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication device 709, or installed from the storage device 708, or installed from the ROM 702. When the computer program is executed by the processing device 701, the above-mentioned functions defined in the method of the embodiment of the present disclosure are executed.
[0085] It should be noted that the computer-readable medium disclosed above may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in combination with an instruction execution system, device or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried. This propagated data signal may take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. The computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.
[0086] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.
[0087] The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device executes the method shown in the above embodiment.
[0088] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages or a combination thereof, including object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as an independent software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0089] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0090] The units involved in the embodiments described in the present disclosure may be implemented by software or hardware, wherein the name of a unit does not, in some cases, limit the unit itself.
[0091] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.
[0092] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0093] In a first aspect, according to one or more embodiments of the present disclosure, a cloud network-based message forwarding method is provided, comprising:
[0094] Receive a first message sent by a source virtual machine to a destination virtual machine, where the first message is generated by encapsulating target traffic based on an Ethernet protocol;
[0095] Parse the first message, replace the Ethernet protocol header of the first message with a preset private extended protocol header, set each field in the private extended protocol header according to business requirements, and encapsulate it through the virtual extensible local area network VXLAN protocol to generate a second message;
[0096] The target traffic is forwarded based on the second message.
[0097] According to one or more embodiments of the present disclosure, the private extended protocol header includes a protocol identifier, a protocol version identifier, a traffic type identifier, a service identifier, and a storable field for storing service information.
[0098] According to one or more embodiments of the present disclosure, the fields in the private extended protocol header are set according to business requirements, including: configuring the protocol identifier in the private extended protocol header to be a preset fixed value, wherein the preset fixed value is used to identify the private protocol; configuring the protocol version number in the private extended protocol header to be the version of the private protocol; configuring the service type identifier in the private extended protocol header to be the service type corresponding to the target traffic; configuring the service information identifier in the private extended protocol header so that the service information identifier carries the node information on which the target traffic forwarding process depends.
[0099] According to one or more embodiments of the present disclosure, the method also includes: receiving and parsing a third message, replacing a private extended protocol header in the third message with an Ethernet protocol header, and setting the source MAC therein to the virtual MAC of the virtual switch and the destination MAC to the MAC of the tenant network card to generate a fourth message, and forwarding the fourth message to the destination virtual machine.
[0100] According to one or more embodiments of the present disclosure, the forwarding of the target traffic based on the second message includes: based on the forwarding path topology, forwarding the second message to the next VXLAN protocol-based traffic switching node VTEP, and on each forwarding path VTEP is configured to parse the message to obtain a private extended protocol header and support changing the fields in the private extended protocol header or executing business logic according to its own business needs.
[0101] According to one or more embodiments of the present disclosure, the method further includes: on each forwarding path, the VTEP is configured to support changing the service information identification bit corresponding to the node identifier in the private extended protocol header according to its own node identifier.
[0102] According to one or more embodiments of the present disclosure, the traffic type identifier includes multiple numerical values within a preset value range, and one numerical value corresponds to one traffic type identifier; accordingly, the configuration of the business type identifier in the private extended protocol header is the business type corresponding to the target traffic, including: if the business type corresponding to the target traffic is typeless, then the business type identifier in the private extended protocol header is configured as 0x00; if the business type corresponding to the target traffic is a traffic mirroring type, then the business type identifier in the private extended protocol header is configured as 0x01; if the business type corresponding to the target traffic is a cross-network traffic type, then the business type identifier in the private extended protocol header is configured as 0x02, wherein the cross-network traffic type includes a cross-virtual private cloud VPC network traffic type.
[0103] In a second aspect, according to one or more embodiments of the present disclosure, a cloud network-based message forwarding device is provided, including:
[0104] A receiving unit, configured to receive a first message sent by a source virtual machine to a destination virtual machine, wherein the first message is generated by encapsulating target traffic based on an Ethernet protocol;
[0105] A parsing unit, configured to parse the first message, replace the Ethernet protocol header of the first message with a preset private extended protocol header, set each field in the private extended protocol header according to business requirements, and encapsulate the first message through a virtual extensible local area network (VXLAN) protocol to generate a second message;
[0106] A forwarding unit, used to forward the target traffic based on the second message.
[0107] According to one or more embodiments of the present disclosure, the private extended protocol header includes a protocol identifier, a protocol version identifier, a traffic type identifier, a service identifier, and a storable field for storing service information.
[0108] According to one or more embodiments of the present disclosure, the parsing unit sets each field in the private extended protocol header according to business requirements, specifically including: configuring the protocol identifier in the private extended protocol header to be a preset fixed value, and the preset fixed value is used to identify the private protocol; configuring the protocol version number in the private extended protocol header to be the version of the private protocol; configuring the service type identifier in the private extended protocol header to be the service type corresponding to the target traffic; configuring the service information identifier in the private extended protocol header so that the service information identifier carries the node information on which the target traffic forwarding process depends.
[0109] According to one or more embodiments of the present disclosure, the parsing unit is also used to receive and parse a third message, replace the private extended protocol header in the third message with an Ethernet protocol header, and set the source MAC to the virtual MAC of the virtual switch and the destination MAC to the MAC of the tenant network card to generate a fourth message, and forward the fourth message to the destination virtual machine.
[0110] According to one or more embodiments of the present disclosure, the forwarding unit forwards the target traffic based on the second message, including: based on the forwarding path topology, forwarding the second message to the next VXLAN protocol-based traffic switching node VTEP, and on each forwarding path VTEP is configured to parse the message to obtain a private extended protocol header and support changing the fields in the private extended protocol header or executing business logic according to its own business needs.
[0111] According to one or more embodiments of the present disclosure, the forwarding unit is also used to configure the VTEP on each forwarding path as follows: the VTEP on each forwarding path is configured to support changing the business information identification bit corresponding to the node identifier in the private extended protocol header according to its own node identifier.
[0112] According to one or more embodiments of the present disclosure, the traffic type identifier includes multiple numerical values within a preset value range, and one numerical value corresponds to one traffic type identifier; accordingly, the parsing unit configures the business type identifier in the private extended protocol header to the business type corresponding to the target traffic, specifically including: if the business type corresponding to the target traffic is typeless, then the business type identifier in the private extended protocol header is configured to be 0x00; if the business type corresponding to the target traffic is a traffic mirroring type, then the business type identifier in the private extended protocol header is configured to be 0x01; if the business type corresponding to the target traffic is a cross-network traffic type, then the business type identifier in the private extended protocol header is configured to be 0x02, wherein the cross-network traffic type includes a cross-virtual private cloud VPC network traffic type.
[0113] In a third aspect, according to one or more embodiments of the present disclosure, there is provided an electronic device, comprising: at least one processor and a memory;
[0114] The memory stores computer-executable instructions;
[0115] The at least one processor executes the computer-executable instructions stored in the memory, so that the at least one processor executes the cloud network-based message forwarding method described in the first aspect and various possible designs of the first aspect.
[0116] In a fourth aspect, according to one or more embodiments of the present disclosure, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer execution instructions. When a processor executes the computer execution instructions, the cloud network-based message forwarding method described in the first aspect and various possible designs of the first aspect is implemented.
[0117] In a fifth aspect, according to one or more embodiments of the present disclosure, a computer program product is provided, including a computer program, wherein when the computer program is executed by a processor, the cloud network-based message forwarding method described in the first aspect and various possible designs of the first aspect is implemented.
[0118] The above description is only a preferred embodiment of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solutions formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above disclosed concept. For example, the above features are replaced with the technical features with similar functions disclosed in the present disclosure (but not limited to) by each other to form a technical solution.
[0119] In addition, although each operation is described in a specific order, this should not be understood as requiring these operations to be performed in the specific order shown or in a sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although some specific implementation details are included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Some features described in the context of a separate embodiment can also be implemented in a single embodiment in combination. On the contrary, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination mode.
[0120] Although the subject matter has been described in language specific to structural features and / or methodological logical actions, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. On the contrary, the specific features and actions described above are merely example forms of implementing the claims.
Claims
1. A message forwarding method based on a cloud network, characterized in that: include: Receive a first message sent by a source virtual machine to a destination virtual machine, where the first message is generated by encapsulating target traffic based on an Ethernet protocol; Parse the first message, replace the Ethernet protocol header of the first message with a preset private extended protocol header, set each field in the private extended protocol header according to business requirements, and encapsulate through the virtual extensible local area network VXLAN protocol to generate a second message; forwarding the target traffic based on the second message; Among them, the setting of each field in the private extended protocol header according to business needs includes: configuring the protocol identifier in the private extended protocol header to a preset fixed value, and the preset fixed value is used to identify the private protocol; configuring the protocol version number in the private extended protocol header to be the version of the private protocol; configuring the service type identifier in the private extended protocol header to be the service type corresponding to the target traffic; configuring the service information identifier in the private extended protocol header so that the service information identifier carries the node information on which the target traffic forwarding process depends, wherein the service type identifier includes multiple numerical values within a preset value range, and one numerical value corresponds to one service type identifier, and the service types corresponding to the target traffic are typeless, traffic mirroring type, and cross-network traffic type.
2. The method according to claim 1, characterized in that The private extended protocol header includes a protocol identifier, a protocol version identifier, a flow type identifier, a service identifier, and a storable field for storing service information.
3. The method according to claim 1, characterized in that The method further comprises: Receive and parse the third message, replace the private extended protocol header in the third message with an Ethernet protocol header, set the source MAC to the virtual MAC of the virtual switch and the destination MAC to the MAC of the tenant network card to generate a fourth message, and forward the fourth message to the destination virtual machine.
4. The method according to claim 1, characterized in that: The forwarding of the target traffic based on the second message includes: Based on the forwarding path topology, the second message is forwarded to the next VXLAN protocol-based traffic switching node VTEP. On each forwarding path, VTEP is configured to parse the message to obtain a private extended protocol header and support changing the fields in the private extended protocol header or executing business logic according to its own business needs.
5. The method according to claim 4, characterized in that Also includes: On each forwarding path, the VTEP is configured to support changing the service information identification bit corresponding to the node identifier in the private extended protocol header according to its own node identifier.
6. The method according to claim 1, characterized in that The configuring the service type identifier in the private extended protocol header as the service type corresponding to the target traffic includes: If the service type corresponding to the target traffic is no type, the service type identifier in the private extended protocol header is configured to be 0x00; If the service type corresponding to the target traffic is a traffic mirroring type, the service type identifier in the private extended protocol header is configured to be 0x01; If the service type corresponding to the target traffic is a cross-network traffic type, the service type identifier in the private extended protocol header is configured to be 0x02, wherein the cross-network traffic type includes a cross-virtual private cloud VPC network traffic type.
7. A cloud network-based message forwarding device, characterized in that: include: A receiving unit, configured to receive a first message sent by a source virtual machine to a destination virtual machine, wherein the first message is generated by encapsulating target traffic based on an Ethernet protocol; A parsing unit, configured to parse the first message, replace the Ethernet protocol header of the first message with a preset private extended protocol header, set each field in the private extended protocol header according to business requirements, and encapsulate the first message through a virtual extensible local area network (VXLAN) protocol to generate a second message; A forwarding unit, configured to forward the target traffic based on the second message; Among them, the setting of each field in the private extended protocol header according to business needs includes: configuring the protocol identifier in the private extended protocol header to a preset fixed value, and the preset fixed value is used to identify the private protocol; configuring the protocol version number in the private extended protocol header to be the version of the private protocol; configuring the service type identifier in the private extended protocol header to be the service type corresponding to the target traffic; configuring the service information identifier in the private extended protocol header so that the service information identifier carries the node information on which the target traffic forwarding process depends, wherein the service type identifier includes multiple numerical values within a preset value range, and one numerical value corresponds to one service type identifier, and the service types corresponding to the target traffic are typeless, traffic mirroring type, and cross-network traffic type.
8. An electronic device, characterized in that: include: Processor and memory; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory, so that the processor executes the cloud network-based message forwarding method as described in any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions. When the processor executes the computer-executable instructions, the cloud network-based message forwarding method as described in any one of claims 1 to 6 is implemented.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the cloud network-based message forwarding method as described in any one of claims 1 to 6 is implemented.
Citation Information
Patent Citations
IPSEC (internet protocol security) VPN (virtual private network) device, isolation method thereof and isolation system thereof
CN103812861A
Extended dual-mode communication using method, multi-protocol conversion device, equipment and medium
CN116634034A