Data transmission method, device, equipment and medium

By encrypting only the inner IP packets in the VXLAN network, the problem of conflict between VXLAN encapsulation and routing matching under the standard IPsec mechanism is solved, and normal interconnection and data security between subnets in the VXLAN network are achieved.

CN115766063BActive Publication Date: 2024-09-27NO 30 INST OF CHINA ELECTRONIC TECH GRP CORP
View PDF 8 Cites 0 Cited by

Patent Information

Application Number
CN202211172634.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-09-26
Publication Date
2024-09-27
Estimated Expiration
2042-09-26

AI Technical Summary

Technical Problem

In a VXLAN network, after the standard IPsec mechanism encrypts VXLAN-encapsulated IP packets, the inner IP header and VXLAN header are encrypted, resulting in the failure of normal decapsulation and route matching, resulting in service forwarding failure.

Method used

A new encapsulation mode is proposed, which only encrypts the inner IP packet after VXLAN encapsulation. The outer IP header, UDP header, VXLAN header and inner IP header are not encrypted. Decapsulation and route matching are performed through the VXLAN gateway, and Decryption occurs on the receiving side.

Benefits of technology

It solves the problem of VXLAN decapsulation and route matching failure after IPsec encryption, ensures the interconnection and interoperability between subnets in the VXLAN network, and ensures the security of data transmission.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115766063B
    Figure CN115766063B
Patent Text Reader

Abstract

The present invention discloses a data transmission method, device, equipment and medium, which is applied to the superposition network environment of a VXLAN network host, and the method comprises: sending an IP data packet, performing VXLAN encapsulation on the IP data packet and then encrypting the inner IP packet of the IP data packet, and sending the encrypted IP data packet to a VXLAN gateway, wherein the inner IP header of the inner IP packet is not encrypted; the VXLAN gateway performs VXLAN decapsulation on the IP data packet, performs VXLAN encapsulation again after determining the sending address of the IP data packet, and forwards the IP data packet according to the IP address; decrypts the IP data packet and then performs VXLAN decapsulation, and transmits the decapsulated IP data packet to a receiver. The present invention can solve the conflict problem between VXLAN encapsulation and IPsec.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of network security technology, and in particular relates to a data transmission method, device, equipment and medium. Background Art

[0002] VXLAN (Virtual Extended Local Area Network) is a commonly used encapsulation protocol that is widely used in cloud data centers to achieve extended interconnection of large Layer 2 networks. There are two application deployment modes for VXLAN, namely centralized gateway and distributed gateway.

[0003] After the network is interconnected, the security of data transmission needs to be considered. IPsec (Internet Protocol Security) is a collection of protocols and services that provide security for IP networks. It protects the network transmission protocol cluster of IP protocols by encrypting and authenticating IP protocol data.

[0004] In the VXLAN network host overlay environment, after the standard IPsec mechanism is used to provide encryption protection for the VXLAN-encapsulated IP packets, the inner IP header and VXLAN header are encrypted. When the ciphertext packet passes through the VTEP (VXLAN tunnel endpoint) gateway, it is impossible to perform normal VXLAN decapsulation and obtain the inner IP address information for route matching, resulting in service forwarding failure. Summary of the invention

[0005] The purpose of the present invention is to overcome the defects of the prior art and provide a data transmission method, device, equipment and medium. Compared with the transmission and tunnel encapsulation modes supported by standard IPsec, the present invention proposes a new encapsulation mode to realize transmission mode encryption of the inner IP packet after VXLAN encapsulation, and the outer IP header, UDP header, VXLAN header and inner IP header are not encrypted, which solves the problem of VXLAN decapsulation and route matching failure after IPsec encryption, and ensures the interconnection between subnets in the VXLAN network.

[0006] The object of the present invention is achieved through the following technical solutions:

[0007] A data transmission method, the method being applied to an overlay network environment of a VXLAN network host, the method comprising:

[0008] Sending an IP data packet, performing VXLAN encapsulation on the IP data packet, encrypting the inner IP packet of the IP data packet, and sending the encrypted IP data packet to the VXLAN gateway, wherein the inner IP header of the inner IP packet is not encrypted;

[0009] After the VXLAN gateway performs VXLAN decapsulation to determine the sending address of the IP data packet, it performs VXLAN encapsulation on the IP data packet again and forwards the IP data packet;

[0010] The IP data packet is decrypted and then VXLAN decapsulated, and the decapsulated IP data packet is transmitted to the receiver.

[0011] Furthermore, the IP data packet includes an outer IP header, a UDP header, a VXLAN header and an inner IP packet, and the encrypted IP data packet includes an outer IP header, a UDP header, a VXLAN header, an inner IP header, an ESP header, a ciphertext payload and an ESP tail.

[0012] Furthermore, the IP data packet sent by the sender is VXLAN encapsulated through the first VTEP gateway, and the IP data packet received by the receiver is VXLAN decapsulated through the second VTEP gateway.

[0013] Further, after the VXLAN gateway determines the sending address of the IP data packet, forwarding the IP data packet specifically includes:

[0014] Perform VXLAN decapsulation on the encrypted IP data packet to obtain an inner IP packet, and perform route matching on the IP data packet;

[0015] After the inner IP packet is again encapsulated by VXLAN according to the route matching result, the IP data packet is sent to the second security gateway to decrypt the IP data packet.

[0016] Further, performing route matching on the IP data packet includes:

[0017] Route matching is performed based on the inner IP address contained in the inner IP header.

[0018] Furthermore, the encryption of the IP data packet is implemented through the first security gateway, and the decryption of the IP data packet is implemented through the second security gateway.

[0019] On the other hand, the present invention further provides a data transmission device, the device is used to implement the above-mentioned data transmission method, the device comprises:

[0020] A data packet sending module sends an IP data packet, performs VXLAN encapsulation on the IP data packet, encrypts the inner IP packet of the IP data packet, and sends the encrypted IP data packet to the VXLAN gateway, wherein the inner IP header of the inner IP packet is not encrypted;

[0021] A data packet forwarding module, which performs VXLAN decapsulation on an IP data packet and performs VXLAN encapsulation again after determining the IP address, and is used to forward the IP data packet after determining the sending address of the IP data packet;

[0022] The data packet delivery module is used to decrypt the IP data packet and then perform VXLAN decapsulation, and transmit the decapsulated IP data packet to the receiver.

[0023] On the other hand, the present invention further provides a computer device, comprising a processor and a memory, wherein the memory stores a computer program, and the computer program is loaded and executed by the processor to implement any one of the above-mentioned data transmission methods.

[0024] On the other hand, the present invention further provides a computer-readable storage medium, wherein the storage medium stores a computer program, and the computer program is loaded and executed by a processor to implement any one of the above-mentioned data transmission methods.

[0025] The beneficial effects of the present invention are:

[0026] The present invention improves the encryption mode of IPsec, and changes the way of directly encrypting IP data packets to encrypting the inner IP packets in transmission mode, and the outer IP header, UDP header, VXLAN header and inner IP header are not encrypted, so as to achieve the purpose of not affecting the interconnection between subnets under the premise of ensuring the security of IP data. The conflict between VXLAN encapsulation and IPsec can be solved. The VTEP nodes located between IPsec gateways can normally perform VXLAN decapsulation, route matching and re-encapsulation on the encrypted packets. BRIEF DESCRIPTION OF THE DRAWINGS

[0027] Figure 1 It is a schematic diagram of a data transmission method provided by an embodiment of the present invention;

[0028] Figure 2 This is a typical deployment diagram of a centralized gateway according to an embodiment of the present invention;

[0029] Figure 3 This is a schematic diagram of the IP data packet structure before and after encryption in standard IPsec transport mode;

[0030] Figure 4 It is a schematic diagram of the structure before and after the IP data packet is encrypted according to an embodiment of the present invention;

[0031] Figure 5 It is a structural block diagram of a data transmission device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0032] The following describes the embodiments of the present invention by specific examples, and those skilled in the art can easily understand other advantages and effects of the present invention from the contents disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present invention. It should be noted that the following embodiments and features in the embodiments can be combined with each other without conflict.

[0033] Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in the field without making any creative work shall fall within the scope of protection of the present invention.

[0034] In the VXLAN network host overlay environment, after the standard IPsec mechanism is used to provide encryption protection for the VXLAN-encapsulated IP packets, the inner IP header and VXLAN header are encrypted. When the ciphertext packet passes through the VTEP (VXLAN tunnel endpoint) gateway, it is impossible to perform normal VXLAN decapsulation and obtain the inner IP address information for route matching, resulting in service forwarding failure.

[0035] In order to solve the above technical problems, the following embodiments of the data transmission method, device, equipment and medium of the present invention are proposed.

[0036] Example 1

[0037] In view of the problem that IPsec affects VXLAN encapsulation and route matching, this embodiment proposes an IPsec encapsulation method in a VXLAN network host overlay environment. Compared with the transmission and tunnel encapsulation modes supported by standard IPsec, the present invention proposes a new encapsulation mode to implement transmission mode encryption of the inner IP packet after VXLAN encapsulation, while not encrypting the outer IP header, UDP header, VXLAN header and inner IP header. This solves the problem of VXLAN decapsulation and route matching failure after IPsec encryption, and ensures the interconnection between subnets in the VXLAN network.

[0038] Reference Figure 2 ,like Figure 2The figure shows a typical deployment diagram of the centralized gateway of this embodiment. After the IPsec gateway is deployed in the VXLAN environment in the figure, when different subnets communicate with each other, if the encapsulation mode defined by the standard IPsec is used to directly encrypt and encapsulate the outer IP, when subnet 1 sends a data packet to subnet 2, first, the IPsec gateway at the exit of subnet 1 captures the data packet and encrypts it into ciphertext; then, after the encrypted data packet passes through the VXLAN gateway, the VXLAN gateway needs to perform VXLAN decapsulation first, and then perform routing lookup based on the inner IP address. Since both the VXLAN header and the inner IP header are encrypted, VTEP3 cannot perform VXLAN decapsulation on the ciphertext packet, which will cause service failure. Figure 3 ,like Figure 3 The figure shows the structure of IP data packets before and after encryption in the transport mode of standard IPsec. After encryption, the UDP header, VXLAN header, and the entire inner IP packet become ciphertext. VTEP3 cannot extract the fields in the VXLAN header and the inner IP header for VXLAN decapsulation and routing lookup.

[0039] This embodiment analyzes IP data packets and proposes an improved IPsec encapsulation method. This embodiment sends the outer IP header, UDP header, VXLAN header, and inner IP header in plain text. The VXLAN gateway can directly perform VXLAN decapsulation and route lookup forwarding on the ciphertext packet.

[0040] Reference Figure 1 ,like Figure 1 FIG. 1 is a flow chart of a data transmission method provided by this embodiment, and the method specifically includes:

[0041] An IP data packet is sent out, the inner IP packet of the IP data packet is encrypted after VXLAN encapsulation, and the encrypted IP data packet is sent to the VXLAN gateway, wherein the inner IP header of the inner IP packet is not encrypted.

[0042] In this embodiment, the IP data of subnet 1 will first be encapsulated by VXLAN through VTEP1, and then pass through IPsec gateway 1, which encrypts the data packet. The inner IP packet is encrypted in transport mode, and the outer IP header, UDP header, VXLAN header and inner IP header are not encrypted.

[0043] Forward the IP data packet after determining the sending address of the IP data packet.

[0044] After the ciphertext packet reaches the VXLAN gateway, it is first decapsulated by VXLAN. Since the outer IP header, UDP header, and VXLAN header are not encrypted, the VXLAN gateway can normally decapsulate the ciphertext packet by VXLAN to obtain the inner IP packet. Then, route matching is performed based on the inner IP address. Since the inner IP header is also not encrypted, route matching can be completed normally. Finally, based on the route matching result, the inner IP packet is again encapsulated by VXLAN and sent to VTEP2.

[0045] After decrypting the IP data packet, VXLAN decapsulation is performed and the decapsulated IP data packet is transmitted to the receiver.

[0046] After receiving the encrypted data packet forwarded by the VXLAN gateway, IPsec gateway 2 can decrypt the data packet. IPsec gateway 2 sends the decrypted data packet to VTEP2, which decapsulates the VXLAN packet and sends it to the host on subnet 2. At this point, data transmission ends. Figure 4 ,like Figure 4 Shown is a schematic diagram of the structure before and after the IP data packet is encrypted in this embodiment.

[0047] The data transmission method provided in this embodiment improves the encryption mode of IPsec, and changes the method of directly encrypting IP data packets to encrypting the inner IP packets in transmission mode, and the outer IP header, UDP header, VXLAN header and inner IP header are not encrypted, so as to achieve the purpose of not affecting the interconnection between subnets while ensuring the security of IP data. The conflict between VXLAN encapsulation and IPsec can be solved. The VTEP nodes located between IPsec gateways can normally perform VXLAN decapsulation, route matching and re-encapsulation on the encrypted packets.

[0048] Example 2

[0049] Reference Figure 5 ,like Figure 5 FIG. 1 is a data transmission device provided in this embodiment, and the device is used to implement the aforementioned data transmission method. The device includes:

[0050] The data packet sending module sends out an IP data packet, performs VXLAN encapsulation on the IP data packet, encrypts the inner IP packet of the IP data packet, and sends the encrypted IP data packet to the VXLAN gateway, wherein the inner IP header of the inner IP packet is not encrypted;

[0051] The data packet forwarding module performs VXLAN decapsulation on the IP data packet and performs VXLAN encapsulation again after determining the IP address, so as to forward the IP data packet after determining the sending address of the IP data packet;

[0052] The data packet delivery module is used to decrypt the IP data packet and then perform VXLAN decapsulation, and transmit the decapsulated IP data packet to the receiver.

[0053] The beneficial effects of the data transmission device provided by this embodiment are detailed in the previous embodiments and will not be described again here.

[0054] Example 3

[0055] This preferred embodiment provides a computer device, which can implement the steps in any embodiment of the data transmission method provided in the embodiments of the present application. Therefore, the beneficial effects of the data transmission method provided in the embodiments of the present application can be achieved. Please refer to the previous embodiments for details and will not be repeated here.

[0056] Example 4

[0057] Those skilled in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructions, or by controlling related hardware through instructions, and the instructions can be stored in a computer-readable storage medium and loaded and executed by a processor. To this end, an embodiment of the present invention provides a storage medium, which stores multiple instructions, and the instructions can be loaded by a processor to execute the steps of any embodiment of the data transmission method provided in the embodiment of the present invention.

[0058] The storage medium may include: a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.

[0059] Since the instructions stored in the storage medium can execute the steps in any data transmission method embodiment provided in the embodiments of the present invention, the beneficial effects that can be achieved by any data transmission method provided in the embodiments of the present invention can be achieved. Please refer to the previous embodiments for details and will not be repeated here.

[0060] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the present invention.

Claims

1. A data transmission method, the method is applied to the overlay network environment of a VXLAN network host, characterized in that: The method comprises: Sending an IP data packet, performing VXLAN encapsulation on the IP data packet, encrypting the inner IP packet of the IP data packet, and sending the encrypted IP data packet to the VXLAN gateway, wherein the inner IP header of the inner IP packet is not encrypted; The VXLAN gateway performs VXLAN decapsulation on the IP data packet, determines the sending address of the IP data packet, performs VXLAN encapsulation again, and forwards the IP data packet according to the IP address, specifically including: Perform VXLAN decapsulation on the encrypted IP data packet to obtain an inner IP packet, and perform route matching on the IP data packet according to the inner IP address contained in the inner IP header; After VXLAN encapsulation of the inner IP packet again according to the route matching result, the IP data packet is sent to the second security gateway for decryption; The IP data packet is decrypted and then VXLAN decapsulated, and the decapsulated IP data packet is transmitted to the receiver.

2. The data transmission method according to claim 1, characterized in that: The IP data packet includes an outer IP header, a UDP header, a VXLAN header and an inner IP packet, and the encrypted IP data packet includes an outer IP header, a UDP header, a VXLAN header, an inner IP header, an ESP header, a ciphertext payload and an ESP tail.

3. The data transmission method according to claim 1, characterized in that: The IP data packet sent by the sender is VXLAN encapsulated through the first VTEP gateway, and the IP data packet received by the receiver is VXLAN decapsulated through the second VTEP gateway.

4. The data transmission method according to claim 1, characterized in that: The encryption of IP data packets is implemented through the first security gateway, and the decryption of IP data packets is implemented through the second security gateway.

5. A data transmission device, characterized in that: The device is used to implement the data transmission method according to claim 1, and the device includes: A data packet sending module sends an IP data packet, performs VXLAN encapsulation on the IP data packet, encrypts the inner IP packet of the IP data packet, and sends the encrypted IP data packet to the VXLAN gateway, wherein the inner IP header of the inner IP packet is not encrypted; The data packet forwarding module performs VXLAN decapsulation on the IP data packet and performs VXLAN encapsulation again after determining the IP address, and is used to forward the IP data packet after determining the sending address of the IP data packet, specifically including: Perform VXLAN decapsulation on the encrypted IP data packet to obtain an inner IP packet, and perform route matching on the IP data packet according to the inner IP address contained in the inner IP header; After VXLAN encapsulation of the inner IP packet again according to the route matching result, the IP data packet is sent to the second security gateway for decryption; The data packet delivery module is used to decrypt the IP data packet and then perform VXLAN decapsulation, and transmit the decapsulated IP data packet to the receiver.

6. A computer device, characterized in that: The computer device comprises a processor and a memory, wherein a computer program is stored in the memory, and the computer program is loaded and executed by the processor to implement the data transmission method according to any one of claims 1 to 4.

7. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, which is loaded and executed by a processor to implement the data transmission method according to any one of claims 1 to 4.

Citation Information

Patent Citations

  • Flow rate security detection method, equipment and system

    CN102347870A

  • Method, device and system for processing VXLAN (Virtual Extensible Local Area Network) message

    CN106161225A

  • Power information intranet message encryption release method based on VXLAN technology

    CN107294711A

  • Method, device and system for processing vxlan packet

    CN108028748A

  • Message forwarding method and VXLAN gateway

    CN108183919A