IP unvarnished transmission method and device and computer readable medium

By inserting source IP information into the IP packet option field of the SD-WAN network, and using a three-layer network to achieve source IP transmission, the complex and cost-effective solutions in the existing technology are solved, and efficient and stable source IP information is achieved. transfer.

CN118972366APending Publication Date: 2024-11-15GUIZHOU BAISHANCLOUD TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411155055.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-21
Publication Date
2024-11-15

AI Technical Summary

Technical Problem

The existing technology has complex solutions when implementing the transmissible transmission of source IP addresses, requiring the deployment of layer four or layer seven proxy components, resulting in complex system implementation and maintenance, high cost, and may lead to inaccurate transmission of source IP information.

Method used

By inserting source IP information into the IP packet option field of the SD-WAN network, the source IP information is transmitted through the three-layer network. There is no need for additional proxy components or modifying domain name resolution, and the source IP information is directly written to the IP packet. In the Options field, ensure accurate delivery.

Benefits of technology

It simplifies system implementation and network configuration, reduces maintenance costs, improves data transmission efficiency and stability, and ensures accurate transmission of source IP information.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118972366A_ABST
    Figure CN118972366A_ABST
Patent Text Reader

Abstract

The invention provides an IP unvarnished transmission method and device and a computer readable medium, in the scheme, a first CPE obtains traffic from a sending end device, after source IP information of the traffic is inserted into an option field of an IP packet of the traffic, the traffic is sent to a second CPE through an SD-WAN network according to a destination IP address, so that the second CPE can send the traffic to the second CPE through the SD-WAN network according to the destination IP address of the traffic. And forwarding the traffic to a receiving end device, analyzing the IP packet of the traffic by the receiving end device, and obtaining the source IP information of the traffic from the option field of the IP packet. According to the scheme, in the flow transmission process of the SD-WAN network, the source IP information is written into the option field of the IP packet of the three-layer network, unvarnished transmission of the source IP information is carried out through the three-layer network, and the receiving end equipment can obtain the source IP information of the flow without deploying functional components in the fourth layer or the seventh layer, so that the system implementation is greatly simplified, and the flow transmission efficiency is improved. The complexity of network configuration and maintenance is reduced, and the efficiency and stability of data transmission are remarkably improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of information technology, and in particular to an IP transparent transmission method, device and computer-readable medium. Background Art

[0002] With the development of information technology, the application of SD-WAN (Software-Defined WAN) is becoming more and more widespread. SD-WAN is a rapidly deployable, low-cost, and highly flexible wide area network solution that can be used to achieve network interconnection between various branches of an enterprise. After the SD-WAN network is established, due to the IP (Internet Protocol) address conflicts between some organizations, after the SD-WAN tunnel uses SNAT (Source Network Address Translation) technology, the receiving device of the branch at the other end will be unable to obtain the source IP address of the initiator device.

[0003] Although there are solutions in the prior art that can achieve source IP address transparent transmission, such as the TOA (TCP OptionAddress) solution and the XFF (X-Forwarded-For) solution. Among them, TOA is a solution based on the four-layer TCP (Transmission Control Protocol) to achieve source IP address transparent transmission, and XFF is a solution based on the seven-layer HTTP (Hypertext Transfer Protocol) to achieve source IP address transparent transmission. However, these solutions must deploy a four-layer or seven-layer proxy component, process through the proxy component, and modify the domain name resolution to achieve IP transparent transmission, which makes the solution implementation complicated.

[0004] Therefore, there are demands and challenges in the prior art for implementing source IP address transparent transmission. Summary of the invention

[0005] One purpose of the present application is to provide an IP transparent transmission method, device and computer-readable medium, at least to solve the problem of complex solutions in the prior art when implementing source IP address transparent transmission.

[0006] To solve the above problem, an embodiment of the present application provides an IP transparent transmission method, which is applied to a first CPE device and includes:

[0007] Get traffic from the sending device;

[0008] Inserting source IP information of the traffic into an option field of an IP packet of the traffic, wherein the source IP information includes at least an original IP address of the sending end device;

[0009] According to the destination IP address of the traffic, the traffic is sent to the second CPE device through the SD-WAN network, so that the second CPE device forwards the traffic to the receiving device according to the destination IP address of the traffic, and the receiving device parses the IP packet of the traffic and obtains the source IP information of the traffic from the option field of the IP packet.

[0010] The embodiment of the present application further provides an IP transparent transmission method, which is applied to a second CPE device, and the method includes:

[0011] Receive traffic sent by a first CPE device via an SD-WAN network, where the first CPE device obtains the traffic from a sending device, inserts source IP information of the traffic into an option field of an IP packet of the traffic, and sends the traffic to a second CPE device via the SD-WAN network according to a destination IP address of the traffic, where the source IP information includes at least an original IP address of the sending device;

[0012] According to the destination IP address of the traffic, the traffic is forwarded to a receiving device, so that the receiving device parses the IP packet of the traffic and obtains the source IP information of the traffic from the option field of the IP packet of the traffic.

[0013] The embodiment of the present application also provides an IP transparent transmission method, which is applied to a receiving end device, and the method includes:

[0014] Obtaining traffic from a second CPE device, after the traffic is obtained by the first CPE device from the sending end device, inserting source IP information of the traffic into the option field of the IP packet of the traffic, and sending the traffic to the second CPE device through the SD-WAN network according to the destination IP address of the traffic, so that the second CPE device forwards the traffic to the receiving end device according to the destination IP address of the traffic, and the source IP information at least includes the original IP address of the sending end device;

[0015] The IP packet of the traffic is parsed, and the source IP information of the traffic is obtained from the option field of the IP packet of the traffic.

[0016] The embodiment of the present application further provides a first CPE device for implementing IP transparent transmission, wherein the first CPE device includes:

[0017] A traffic receiving module is used to obtain traffic from a sending device;

[0018] A traffic processing module, configured to insert source IP information of the traffic into an option field of an IP packet of the traffic, wherein the source IP information at least includes an original IP address of the sending end device;

[0019] The traffic forwarding module is used to send the traffic to the second CPE device through the SD-WAN network according to the destination IP address of the traffic, so that the second CPE device forwards the traffic to the receiving device according to the destination IP address of the traffic, and the receiving device parses the IP packet of the traffic and obtains the source IP information of the traffic from the option field of the IP packet.

[0020] The embodiment of the present application further provides a second CPE device for implementing IP transparent transmission, wherein the second CPE device includes:

[0021] A traffic receiving module, configured to receive traffic sent by a first CPE device via an SD-WAN network, wherein after the traffic is obtained by the first CPE device from a sending end device, source IP information of the traffic is inserted into an option field of an IP packet of the traffic, and according to a destination IP address of the traffic, the traffic is sent to a second CPE device via the SD-WAN network, wherein the source IP information includes at least an original IP address of the sending end device;

[0022] The traffic forwarding module is used to forward the traffic to a receiving device according to the destination IP address of the traffic, so that the receiving device parses the IP packet of the traffic and obtains the source IP information of the traffic from the option field of the IP packet of the traffic.

[0023] The embodiment of the present application further provides a receiving end device for implementing IP transparent transmission, the receiving end device comprising:

[0024] A traffic receiving module, configured to obtain traffic from a second CPE device, wherein after the traffic is obtained by the first CPE device from a sending end device, the source IP information of the traffic is inserted into an option field of an IP packet of the traffic, and according to a destination IP address of the traffic, the traffic is sent to the second CPE device through an SD-WAN network, so that the second CPE device forwards the traffic to a receiving end device according to the destination IP address of the traffic, and the source IP information at least includes an original IP address of the sending end device;

[0025] A traffic analysis module is used to analyze the IP packets of the traffic and obtain the source IP information of the traffic from the option field of the IP packets of the traffic.

[0026] In addition, an embodiment of the present application also provides a computing device, which includes a memory for storing computer program instructions and a processor for executing computer program instructions, wherein when the computer program instructions are executed by the processor, the device is triggered to execute the IP transparent transmission method.

[0027] The embodiment of the present application also provides a computer-readable medium on which computer program instructions are stored. The computer program instructions can be executed by a processor to implement the IP transparent transmission method.

[0028] Compared with the prior art, in the IP transparent transmission solution provided in the embodiment of the present application, the first CPE device obtains traffic from the sending end device, and then inserts the source IP information of the traffic into the option field of the IP packet of the traffic, and then sends the traffic to the second CPE device through the SD-WAN network according to the destination IP address of the traffic. When the second CPE device receives the traffic from the SD-WAN network, it can forward the traffic to the receiving end device according to the destination IP address of the traffic, and the receiving end device parses the IP packet of the traffic and obtains the source IP information of the traffic from the option field of the IP packet. During the traffic transmission process of the SD-WAN network, this solution writes the source IP information into the option field of the IP packet of the three-layer network, and transparently transmits the source IP information through the three-layer network. There is no need to deploy additional proxy components at the fourth or seventh layer or modify the domain name resolution, etc., so that the receiving end device can know the source IP information of the traffic, which reduces the cost of implementation and maintenance, and the solution is simpler to implement. At the same time, by writing the source IP information into the option field of the IP packet of the three-layer network, the accurate transmission of the source IP information can be ensured, and no errors will be caused by proxy components or domain name resolution, etc. Therefore, this solution not only greatly simplifies the system implementation and reduces the complexity of network configuration and maintenance, but also significantly improves the efficiency and stability of data transmission. BRIEF DESCRIPTION OF THE DRAWINGS

[0029] Figure 1 A schematic diagram of the topological structure of an IP transparent transmission solution provided in an embodiment of the present application;

[0030] Figure 2 An interactive flow chart of an IP transparent transmission method provided in an embodiment of the present application;

[0031] Figure 3 A schematic diagram of the interaction process when IP transparent transmission is implemented using the solution in the embodiment of the present application;

[0032] Figure 4 A schematic diagram of the structure of a first CPE device for implementing IP transparent transmission provided in an embodiment of the present application;

[0033] Figure 5A schematic diagram of the structure of a second CPE device for implementing IP transparent transmission provided in an embodiment of the present application;

[0034] Figure 6 A schematic diagram of the structure of a receiving device for implementing IP transparent transmission provided in an embodiment of the present application;

[0035] Figure 7 A schematic diagram of the structure of a computing device for implementing IP transparent transmission in an embodiment of the present application. DETAILED DESCRIPTION

[0036] 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 this application.

[0037] In a typical configuration of the present application, the terminal and the equipment of the service network each include one or more processors (CPU), input / output interface, network interface and memory.

[0038] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.

[0039] Computer readable media include permanent and non-permanent, removable and non-removable media, and can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, modules of programs or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, read-only compact disk (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape disk storage or other magnetic storage devices or any other non-transmission medium that can be used to store information that can be accessed by a computing device.

[0040] The embodiment of the present application provides an IP transparent transmission method for transparently transmitting the original IP address of the sending end device to the receiving end device. During the traffic transmission process, the first CPE device obtains the traffic from the sending end device, and then inserts the source IP information of the traffic into the option field of the IP packet of the traffic, and then sends the traffic to the second CPE device through the SD-WAN network according to the destination IP address of the traffic. After the second CPE device receives the traffic from the SD-WAN network, it can forward the traffic to the receiving end device according to the destination IP address of the traffic, and the receiving end device parses the IP packet of the traffic and obtains the source IP information of the traffic from the option field of the IP packet. During the traffic transmission process of the SD-WAN network, this solution writes the source IP information into the option field of the IP packet of the three-layer network, and transparently transmits the source IP information through the three-layer network. It does not need to deploy functional components at the fourth or seventh layer, so that the receiving end device can know the original IP address of the sending end device of the traffic, which not only greatly simplifies the system implementation, reduces the complexity of network configuration and maintenance, but also significantly improves the efficiency and stability of data transmission.

[0041] The sending device is a device that sends this traffic, and the receiving device is a device that receives this traffic. The sending device and the receiving device are located in two different branch networks of the SD-WAN. The specific implementation of the sending device and the receiving device may include a user device, a network device, or a device formed by integrating a user device and a network device through a network, or it may also be an application running on the above-mentioned device. The user device includes but is not limited to various terminal devices such as computers, mobile phones, and tablet computers; the network device includes but is not limited to implementations such as network hosts, single network servers, multiple network server sets, or computer sets based on cloud computing. Here, the cloud is composed of a large number of hosts or network servers based on cloud computing (Cloud Computing), wherein cloud computing is a type of distributed computing, a virtual computer composed of a group of loosely coupled computer sets.

[0042] Figure 1The topology diagram of IP transparent transmission between the sending end device 100, the receiving end device 200, the first CPE device 300 and the second CPE device 400 in the SD-WAN networking environment is shown. The sending end device 100 and the receiving end device 200 are respectively located in two different branch networks of the SD-WAN, namely, branch network 1 and branch network 2. The first CPE (Customer Premises Equipment) device 300 and the sending end device 100 are located in the same branch network 1 of the SD-WAN, and the second CPE device 400 and the receiving end device 200 are located in the same branch network 2 of the SD-WAN. Secure communication is achieved between the first CPE device 300 and the second CPE device 300 through the tunnel of the SD-WAN.

[0043] Figure 2 The interactive process of an IP transparent transmission method provided by the present application is shown. During the execution of the method, the method may at least include the following processing steps:

[0044] Step S201: The first CPE device obtains traffic from a transmitting device.

[0045] When the sending device needs to initiate an access request to the receiving device, the traffic corresponding to the access request can be forwarded to the first CPE device through the gateway in the branch network, so that the first CPE device obtains the traffic from the sending device. For example, in an actual scenario, the sending device can be a PC (Personal Computer) located in branch network 1, and the IP address of the PC is 192.168.0.2. When the PC needs to send an access request to a Server located in branch network 2, if the IP address of the Server is 172.16.0.2, the quintuple corresponding to the traffic corresponding to the access request is as follows: the source IP address is 192.168.0.2, the source port is sport1, the destination IP address is 172.16.0.2, the destination port is dport1, and the transmission protocol is pro1. The traffic corresponding to the access request will be forwarded to the LAN port of the first CPE device via the gateway in the branch network, so that the first CPE device can obtain the traffic.

[0046] In step S202, the first CPE device inserts the source IP information of the traffic into the option field of the IP packet of the traffic. In RFC 791, the option field of the IP packet is called "Option Field" or "Options". The source IP information at least includes the original IP address of the sending device, so that when the source IP information is transmitted to the receiving device, the original IP address of the sending device can be transparently transmitted. In addition to the original IP address of the sending device, the source IP information can also include other additional information, so as to transmit more information related to the source of the traffic and realize more transparent transmission functions. The source IP information can also include the version and port of the IP protocol.

[0047] The following is a specific form of the source IP information inserted in the option field in this embodiment, which may include data within 20 bytes, including a message type of 4 bits, a network type of 4 bits, a data length of 1 byte, and data content of 4-18 bytes. Specifically, the 4-bit message type may include a SIP type or a SIP+SPORT type, the SIP type indicates the source IP address, the SIP+SPORT type indicates the source IP address + source port, the 4-bit network type includes IPv4 and IPv6 to indicate the version of the IP protocol, the 1-byte data length indicates the length of the data content, and the 4-18-byte data content indicates the specific content of the source IP information written. For example, in this embodiment, if the specific content of the source IP information written in this embodiment is the original IP address of the PC in the IPv4 version, the source IP information inserted in the option field may include: 0004c0a80002, wherein the first 0 indicates that the message type is the SIP type, the second 0 indicates that the network type is IPv4, and the subsequent 04 indicates that the length of the data content is 4 bytes, and c0a80002 is the hexadecimal representation of the specific value in the PC's IP address "192.168.0.2".

[0048] In actual scenarios, since multiple IP packets may be transmitted during the transmission of a group of traffic, when an IP packet has already passed the source IP information of the traffic to the receiving device, if the subsequent IP packets of the group of traffic still repeat the source IP information, it will waste related resources. Therefore, in some embodiments of the present application, if the first CPE device inserts the source IP information of the traffic into the option field of the IP packet of the traffic, the data record of the traffic can be written into the traffic tag database, so that the traffic that has the source IP information inserted in the IP packet can be queried in the traffic tag database.

[0049] Therefore, before the first CPE device inserts the source IP information of the traffic into the option field of the IP packet of the traffic, it can first query the data record of the traffic in the traffic tag database. If the data record of the traffic is found in the traffic tag database, it means that there is no need to carry the source IP information repeatedly, so the first CPE device does not insert the source IP information of the traffic into the option field of the IP packet of the traffic, and directly executes subsequent processing. If the data record of the traffic is not found in the traffic tag database, it means that no IP packet has carried the source IP information of the group of traffic, so it is necessary to insert the source IP information of the traffic into the option field of the IP packet of the traffic, and write the data record of the traffic in the traffic tag database at the same time, so as to facilitate query when processing subsequent traffic.

[0050] Among them, in order to better realize the matching query of data records in the traffic tag database, tag information about the traffic, such as traffic type, source device, etc., can be generated in advance, so as to distinguish different traffic, better support traffic forwarding and parsing, and improve the matching query efficiency. At the same time, when writing the data record of the traffic in the traffic tag database, the first CPE device can write the tag information of the traffic into the database of the traffic tag database as the unique identifier of the data record of the traffic in the traffic tag database. When querying the data record of the traffic in the traffic tag database, the first CPE device can query the data record of the traffic in the traffic tag database according to the tag information of the traffic.

[0051] In this embodiment, the first CPE device can generate the tag information of the traffic according to the five-tuple information of the traffic, so that different tag information will be generated for traffic with different five-tuple information. In actual scenarios, the five-tuple information of the traffic can be encoded using a specific algorithm. For example, in this embodiment, a hash algorithm such as md5 (Message-Digest Algorithm 5) can be used. After calculating the five-tuple information, the tag information corresponding to the five-tuple can be obtained, and the tag information can be used as the unique identification information of the traffic. For example, for the aforementioned traffic sent from the PC to the Server, the corresponding five-tuple is as follows: the source IP address is 192.168.0.2, the source port is sport1, the destination IP address is 172.16.0.2, the destination port is dport1, and the transmission protocol is pro1. Therefore, the above five-tuple information can be spliced ​​in a preset order and calculated using the md5 algorithm to obtain the tag information "A" corresponding to the traffic, and the original IP address of the PC 192.168.0.2 can be marked as "AIP".

[0052] After the first CPE device obtains the traffic sent to the Server from the PC through the gateway, it can query whether there is a data record with tag information "A" in the traffic tag database DB1. If the tag information "A" matches a data record in the traffic tag database DB1, there is no need to process the IP packet of the traffic, and there is no need to insert the source IP information of the traffic in the option field of the IP packet of the traffic. If the tag information "A" does not match a data record in the traffic tag database DB1, the first CPE device inserts the source IP information of the traffic in the option field of the IP packet of the traffic, and writes the tag information "A" into the traffic tag database DB1 as the unique identifier of the data record of the traffic in the traffic tag database.

[0053] In actual scenarios, when the same sending device initiates multiple different access requests to the same receiving device, the following situation may occur: since the sending device and the receiving device are the same, the tag information corresponding to the traffic of the two different requests may be the same. For example, access request Req1 and access request Req2 are two access requests initiated by the sending device PC to the receiving device Server, and their source IP address and destination IP address are the same. If the two access requests use the same transmission protocol and port, the traffic of the two access requests will have the same five-tuple information, and thus the first CPE device will generate the same tag information "A" for the two traffic. However, if different connections are used to transmit the traffic of the two access requests (the connection used for the first access request is disconnected after the traffic transmission is completed, and a new connection is established to transmit the traffic of the second access request), when the first CPE device obtains the traffic of the second access request Req2 from the sending device, because its marking information is the same as the traffic of the first access request Req1, the first CPE device will mistakenly believe that there is already an IP packet carrying the source IP information of the second access request Req2, and thus will not write the source IP information in the IP packet of this traffic, making it possible for the receiving device on the other end to not obtain the source IP information of the second access request initiated based on the new connection.

[0054] In order to avoid this problem, in the scheme of the embodiment of the present application, when writing the data record of the traffic into the traffic mark database, an expiration condition can be set for the data record of the traffic, and when the expiration condition is met, the data record of the traffic is deleted from the traffic mark database. The expiration condition can be set according to the needs of the actual scenario. For example, for the scenario of two access requests under different connections mentioned above, the expiration condition can be set to be related to the event of connection disconnection or establishment, such as setting the expiration condition to: the end of the connection sending the current traffic, or the first syn packet (handshake packet) of the three-way handshake when a new connection is detected, etc., thereby avoiding the problem that the traffic based on the new connection may not be able to achieve IP transparent transmission after the connection is disconnected, making the scheme more perfect and able to avoid the possibility of transparent transmission failure while saving resource overhead.

[0055] Step S203: The first CPE device sends the traffic to the second CPE device through the SD-WAN network according to the destination IP address of the traffic.

[0056] In this embodiment, since the traffic is sent from an initiating device in a branch network of the SD-WAN to a receiving device in another branch network, the first CPE device needs to perform SNAT and other related processing on the traffic before sending it to the second CPE device through the SD-WAN. Among them, when the first CPE device forwards the traffic to the receiving device according to the destination IP address of the traffic, it can first determine the first TUN network card required for forwarding according to the destination IP address of the traffic. Taking the aforementioned scenario as an example, for the first CPE device, after receiving the traffic sent from the PC to the Server, it can perform a routing table query. According to the query result of the routing table, it can be determined that the traffic sent to the destination IP address 172.16.0.2 needs to pass through the first TUN network card to reach it.

[0057] Then, the first CPE device can replace the source IP address of the traffic with the first TUN port IP address of the first TUN network card. In this embodiment, the current source IP address of the traffic is the original IP address of the PC, that is, 192.168.0.2. If the first TUN port IP address of the first TUN network card is 169.255.255.254, the source IP address of the traffic needs to be replaced from 192.168.0.2 to 169.255.255.254. At this time, the source IP address of the traffic will become 169.255.255.254.

[0058] After modifying the source IP address of the traffic, the first CPE device sends the traffic to the second CPE device through the SD-WAN network. In actual scenarios, since the traffic is forwarded through the SD-WAN network, the first CPE device will also encapsulate the traffic with an SD-WAN forwarding header before forwarding, so that the traffic can be smoothly forwarded in the SD-WAN network to the second CPE device of another branch network, and the second CPE device will perform subsequent processing.

[0059] Step S204, the second CPE device receives the traffic sent by the first CPE device via the SD-WAN network. In actual scenarios, since the traffic sent via the SD-WAN network is encapsulated by the first CPE device with an SD-WAN forwarding header before forwarding, the second CPE device can decapsulate the traffic when receiving it, and write the IP packet of the traffic to the second TUN network card of the second CPE device, so that the second CPE device receives the traffic through the second TUN network card.

[0060] Step S205: The second CPE device forwards the traffic to a receiving device according to the destination IP address of the traffic.

[0061] After the second CPE device receives the traffic, it can forward the traffic to the receiving device in the following manner, specifically including: first, forward the traffic to the second LAN network card of the second CPE device according to the destination IP address of the traffic, perform SNAT processing on the second LAN network card, and replace the source IP address of the traffic with the second LAN port IP address of the second LAN network card. Taking the above scenario as an example, the source IP address of the traffic should be the first TUN port IP address, that is, 169.255.255.254. If the second LAN port IP address of the second LAN network card is 172.16.0.1, the second CPE device will replace the source IP address of the traffic from 169.255.255.254 to 172.16.0.1 when performing SNAT processing, so that the current source IP address of the traffic will become 172.16.0.1. After completing the SNAT processing, the traffic can be forwarded to the receiving device through the second LAN network card.

[0062] Step S206: The receiving device obtains traffic from the second CPE device.

[0063] In step S207, the receiving device parses the IP packet of the traffic and obtains the source IP information of the traffic from the option field of the IP packet of the traffic. Since the source IP information of the traffic is inserted into the option field of the IP packet of the traffic by the first CPE device, the source IP information at least includes the original IP address of the sending device. Therefore, the original IP address of the sending device can be carried to the receiving device through the IP packet of the traffic, so that the receiving device can obtain the source IP information including at least the original IP address of the sending device through the specific content in the option field in the IP packet, thereby realizing IP transparent transmission based on the three-layer network in the SD-WAN networking environment.

[0064] The receiving device can parse and process the IP packets of the traffic through a pre-deployed kernel plug-in, that is, the IP packets of the traffic are parsed through a pre-deployed kernel plug-in, and the source IP information of the traffic is obtained from the option field of the IP packets of the traffic, which can improve the parsing efficiency and accuracy. Therefore, the plug-in can reduce the changes to the existing configuration of the receiving device, simplify the implementation process of the solution, and reduce the complexity of the solution implementation.

[0065] Corresponding to the processing method when the first CPE device inserts the source IP information of the traffic into the option field of the IP packet of the traffic, in order to avoid repeatedly carrying the source IP information and reduce resource overhead, the first CPE device may not insert the source IP information into the option field of the IP packet under certain circumstances. Therefore, for the receiving end device, the received IP packet may also have two situations, namely, the source IP information exists in the option field, and the source IP information does not exist in the option field.

[0066] In this scenario, when the receiving device parses the IP packet of the traffic, it can first determine whether there is source IP information in the option field of the IP packet. If there is source IP information in the option field of the IP packet, the source IP information is extracted from the option field of the IP packet of the traffic. For example, for the aforementioned traffic sent from the PC to the Server, the source IP information in the option field of the IP packet includes the original IP address of the sending device, that is, 192.168.0.2. The receiving device can obtain the original IP address of the sending device from the source IP information in the option field, thereby realizing IP transparent transmission based on the three-layer network.

[0067] In some embodiments of the present application, after the receiving device obtains the source IP information of the traffic from the option field of the IP packet of the traffic, the receiving device can replace the source IP address of the traffic with the original IP address of the sending device according to the source IP information, and then provide the replaced source IP address to the application layer program that processes the traffic, so that the application layer program processes the access request and forwards the response data to the sending device through the corresponding path. Taking the above scenario as an example, when the traffic received by the receiving device, the source IP address of the traffic should be the second LAN port address of the second LAN network card, that is, 172.16.0.1, and the source IP information of the option field of the IP packet includes the original IP address of the sending device, that is, 192.168.0.2, so the source IP address of the traffic can be replaced from 172.16.0.1 to 192.168.0.2, and then provided to the application layer program that processes the traffic, so that the application layer program can know the original IP address of the source of the traffic, thereby realizing the corresponding business logic.

[0068] From the above content, it can be seen that during the traffic transmission process of the SD-WAN network, this solution writes the source IP information into the option field of the IP packet of the three-layer network, and transparently transmits the source IP information through the three-layer network. There is no need to deploy functional components at the fourth or seventh layer, so that the receiving device can know the source IP information of the traffic. This not only greatly simplifies the system implementation and reduces the complexity of network configuration and maintenance, but also significantly improves the efficiency and stability of data transmission.

[0069] Figure 3 The interactive process when the solution in the embodiment of the present application is used to implement IP transparent transmission is shown. The topological structure between the various devices in this interactive process is as follows:

[0070] CPE1 and CPE2 are connected through the SD-WAN tunnel, and each of them generates a TUN network card, namely TUN1 network card and TUN2 network card;

[0071] The PC and the LAN1 network card of CPE1 are in the same branch network, the network segment is 192.168.0.0 / 24, the IP address of the PC is 192.168.0.2, and the IP address of the LAN1 network card is 192.168.0.1;

[0072] The IP address of the TUN1 network card on CPE1 is 169.255.255.254, and the IP address of the TUN2 network card generated on CPE2 is 169.255.255.255;

[0073] The server and CPE2's LAN1 network card are in the same branch network, the network segment is 172.16.0.0 / 24, the server's IP address is 172.16.0.2, and the LAN2 network card's IP address is 172.16.0.1;

[0074] On CPE1, the traffic coming from the LAN network card is forwarded through the TUN1 network card, and the source IP address is converted to the IP address of the TUN1 network card;

[0075] On CPE2, the traffic coming from the TUN2 network card is forwarded through the LAN2 network card, and the source IP address is converted to the IP address of the LAN2 network card address.

[0076] Based on the above topology, the interactive process of IP transparent transmission between the sending device PC and the receiving device Server is as follows:

[0077] Step 1: PC (IP address is 192.168.0.2) sends an access request to Server (IP address is 172.16.0.2), and the access request is forwarded to LAN1 network card (IP address is 192.168.0.1) of CPE1 through the gateway.

[0078] Step 2: After receiving the traffic, CPE1 queries the routing table and finds that the traffic sent to 172.16.0.2 must pass through CPE1's TUN1 network card (IP address is 169.255.255.254) to reach.

[0079] Step 3: The TUN network card managed by CPE1 is responsible for monitoring the traffic. The quintuple information of the received traffic is encoded on the TUN network card using a preset algorithm to generate a tag information "A" as the unique identifier of the traffic. At the same time, the original IP address of the PC (192.168.0.2) is marked as "AIP".

[0080] Step 4, CPE1 matches the tag information "A" with the traffic tag database DB1. If the tag information "A" is matched with a data record in the database DB1, the IP packet of the traffic will not be processed; if the tag information "A" is not matched with a data record in the traffic tag database DB1, CPE1 writes the tag information "A" into the traffic tag database DB1, sets the corresponding expiration condition, and prepares to modify the option field of the option field of the IP packet.

[0081] Step 5, CPE1 modifies the option field of the IP packet and inserts less than 20 bytes of source IP information in the option field, which may specifically include 4 bits of message type, 4 bits of network type, 1 byte of data length, and 4-18 bytes of data content. In this embodiment, the specific content inserted may be 0004c0a80002, where the first 0 indicates that the message type is SIP type, the second 0 indicates that the network type is IPv4, and the subsequent 04 indicates that the length of the data content is 4 bytes, and c0a80002 is the hexadecimal representation of the specific value in the PC's IP address "192.168.0.2".

[0082] In step 6, CPE1 passes the IP packet through the TUN1 network card, performs SNAT processing, modifies the current source IP address 192.168.0.2 to the IP address 169.255.255.254 of the TUN1 network card, and then performs SD-WAN forwarding header encapsulation and forwards it to the SD-WAN network.

[0083] Step 7: CPE2 receives the IP packet from the SD-WAN network, decapsulates it, writes the decapsulated IP packet to the TUN network card, and forwards it through the system routing of CPE2 according to the destination IP address 172.16.0.2.

[0084] Step 8: The system router of CPE2 forwards the IP packet with the destination IP address of 172.16.0.2 to the LAN2 network card of CPE2, performs SNAT processing, modifies the current source IP address from 169.255.255.254 to the IP address of LAN2 network card 172.16.0.1, and forwards it to the Server.

[0085] Step 9: Deploy the corresponding kernel plug-in on the Server, and parse the IP packet obtained from CPE2. If there is no source IP information in the option field of the IP packet, no processing will be performed; if there is source IP information in the option field of the IP packet, the original IP address "192.168.0.2" of the PC in the source IP information will be taken out, and the source IP address 172.16.0.1 at this time will be replaced with the original IP address IP192.168.0.2 of the PC. As a result, the Server, as a receiving device, can obtain the original IP address of the initiating device when initiating the access request through the IP packet, thereby realizing the IP transparent transmission solution based on the three-layer network.

[0086] At the same time, at the receiving end, the server can also consider using the database DB2 to record the results of IP transparent transmission. Specifically, the server can also use the five-tuple information and use the preset algorithm to generate the tag information "A1", and mark the source IP address at this time as "AIP1: 192.168.0.2", and determine whether there is a data record matching "A1" in the database DB2. If so, it will no longer be written to the database DB2. If not, "A1" will be recorded in the database DB2 through the kernel interface, and a new data record will be added. At the same time, the source IP address AIP1: 192.168.0.2 can also be given to the application layer program, so that the application layer program can implement related business logic based on the source IP address.

[0087] Step 10: After processing the access request for the traffic, the server forwards the response data to CPE2, and forwards it back to the PC via the LAN1 network card of CPE1 through the SD-WAN network, completing the processing of an access request.

[0088] In the implementation process of the above IP transparent transmission, CPE1 on the initiating device side writes the source IP information into the option field of the IP packet of the three-layer network, and transparently transmits the source IP information through the three-layer network, so that the receiving device Server can know the source IP information of the traffic. Compared with other implementation methods, it is necessary to deploy a four-layer or seven-layer proxy component, and the PC of the source IP can achieve IP transparent transmission through the proxy component on the router in the same LAN by modifying the domain name resolution, etc. The implementation of the solution is relatively complicated, while the solution of the embodiment of the present application can be implemented without deploying a proxy component, and the implementation of the solution is simpler. This solution has significant value in many practical application scenarios.

[0089] In the operation of cross-border e-commerce platforms, servers located in different countries and regions need to frequently interact with data. For example, the headquarters of an e-commerce platform is located in the United States, and multiple data centers are set up in Europe, Asia and other places. These data centers need to perform operations such as order processing, inventory updates and user information synchronization in a secure manner. By adopting the IP transparent transmission solution in the embodiment of the present application, efficient and transparent data transmission can be achieved between data centers without the need to deploy additional complex four-layer or seven-layer proxy components. In this way, data centers located in different regions can directly obtain source IP addresses to ensure the integrity and accuracy of data transmission, while reducing the operating costs and technical difficulties of cross-border data transmission.

[0090] In an intelligent manufacturing factory, various types of production equipment and sensors need to synchronize data in real time to achieve automation and optimization of the production process. For example, each production line and monitoring system of a manufacturing plant needs to upload data to a central control system for unified management and analysis. By adopting the IP transparent transmission solution in the embodiment of the present application, data synchronization and real-time transmission between various devices in an intelligent manufacturing factory can be achieved. This solution implements IP transparent transmission based on a three-layer network by inserting source IP information in the option field of the IP packet, simplifies network configuration and management, and ensures that the data of each production equipment can be accurately and real-time transmitted to the central control system. This not only improves the automation level and production efficiency of the production process, but also supports the continuous innovation and development of intelligent manufacturing factories.

[0091] The embodiment of the present application also provides a first CPE device for implementing IP transparent transmission. The structure of the first CPE device is as follows: Figure 4 As shown, it at least includes a traffic receiving module 410, a traffic processing module 420 and a traffic forwarding module 430. Among them, the traffic receiving module 410 is used to obtain traffic from the sending end device; the traffic processing module 420 is used to insert the source IP information of the traffic into the option field of the IP packet of the traffic, and the source IP information at least includes the original IP address of the sending end device; the traffic forwarding module 430 is used to send the traffic to the second CPE device through the SD-WAN network according to the destination IP address of the traffic, so that the second CPE device forwards the traffic to the receiving end device according to the destination IP address of the traffic, and the receiving end device parses the IP packet of the traffic and obtains the source IP information of the traffic from the option field of the IP packet.

[0092] The embodiment of the present application also provides a second CPE device for implementing IP transparent transmission. The structure of the second CPE device is as follows: Figure 5 As shown, it at least includes a traffic receiving module 510 and a traffic forwarding module 520. The traffic receiving module 510 is used to receive traffic sent by the first CPE device via the SD-WAN network. After the traffic is obtained by the first CPE device from the sending end device, the source IP information of the traffic is inserted into the option field of the IP packet of the traffic, and the traffic is sent to the second CPE device through the SD-WAN network according to the destination IP address of the traffic. The source IP information at least includes the original IP address of the sending end device. The traffic forwarding module 520 is used to forward the traffic to the receiving end device according to the destination IP address of the traffic, so that the receiving end device parses the IP packet of the traffic and obtains the source IP information of the traffic from the option field of the IP packet of the traffic.

[0093] The embodiment of the present application also provides a receiving end device for implementing IP transparent transmission, the structure of the receiving end device is as follows Figure 6 As shown, it at least includes a traffic receiving module 610 and a traffic parsing module 620. The traffic receiving module 610 is used to obtain traffic from the second CPE device. After the traffic is obtained by the first CPE device from the sending end device, the source IP information of the traffic is inserted into the option field of the IP packet of the traffic, and the traffic is sent to the second CPE device through the SD-WAN network according to the destination IP address of the traffic, so that the second CPE device forwards the traffic to the receiving end device according to the destination IP address of the traffic, and the source IP information at least includes the original IP address of the sending end device. The traffic parsing module 620 is used to parse the IP packet of the traffic and obtain the source IP information of the traffic from the option field of the IP packet of the traffic.

[0094] In addition, the present application also provides a computing device, the structure of which is as follows: Figure 7 As shown, it includes a memory 710 for storing computer program instructions and a processor 720 for executing computer program instructions, wherein when the computer program instructions are executed by the processor, the processor is triggered to execute the IP transparent transmission method.

[0095] The methods and / or embodiments in the embodiments of the present application may be implemented as computer software programs. For example, the embodiments of the present disclosure include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes program code for executing the method shown in the flowchart. When the computer program is executed by the processing unit, the above functions defined in the method of the present application are executed.

[0096] It should be noted that the computer-readable medium described in the present application may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable 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 application, a computer-readable medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device.

[0097] In the present application, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A 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, device, or device. The program code contained on the computer-readable medium may be transmitted using any suitable medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.

[0098] Computer program code for performing the operations of the present application 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 a separate 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 through 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).

[0099] The flow chart or block diagram in the accompanying drawings shows the possible architecture, function and operation of the equipment, method and computer program product according to various embodiments of the present application. 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 system for hardware that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0100] As another aspect, the embodiments of the present application further provide a computer-readable medium, which may be included in the device described in the above embodiments; or may exist independently without being assembled into the device. The above computer-readable medium carries one or more computer program instructions, which may be executed by a processor to implement the steps of the methods and / or technical solutions of the above multiple embodiments of the present application.

[0101] In addition, an embodiment of the present application also provides a computer program, which is stored in a computer device, so that the computer device executes the IP transparent transmission method.

[0102] It should be noted that the present application can be implemented in software and / or a combination of software and hardware, for example, can be implemented using an application specific integrated circuit (ASIC), a general purpose computer or any other similar hardware device. In certain embodiments, the software program of the present application can be executed by a processor to implement the above steps or functions. Similarly, the software program of the present application (including related data structures) can be stored in a computer-readable recording medium, for example, a RAM memory, a magnetic or optical drive or a floppy disk and similar devices. In addition, some steps or functions of the present application can be implemented using hardware, for example, as a circuit that cooperates with a processor to perform each step or function.

[0103] It is obvious to those skilled in the art that the present application is not limited to the details of the above exemplary embodiments, and that the present application can be implemented in other specific forms without departing from the spirit or basic features of the present application. Therefore, from any point of view, the embodiments should be regarded as exemplary and non-restrictive, and the scope of the present application is limited by the attached claims rather than the above description, so it is intended to include all changes that fall within the meaning and scope of the equivalent elements of the claims in the present application. Any figure mark in the claims should not be regarded as limiting the claims involved. In addition, it is obvious that the word "comprising" does not exclude other units or steps, and the singular does not exclude the plural. Multiple units or devices stated in the device claim can also be implemented by one unit or device through software or hardware. The words first, second, etc. are used to indicate names, and do not indicate any particular order.

Claims

1. An IP transparent transmission method, characterized in that: The method is applied to a first CPE device, and the method includes: Get traffic from the sending device; Inserting source IP information of the traffic into an option field of an IP packet of the traffic, wherein the source IP information includes at least an original IP address of the sending end device; According to the destination IP address of the traffic, the traffic is sent to the second CPE device through the SD-WAN network, so that the second CPE device forwards the traffic to the receiving device according to the destination IP address of the traffic, and the receiving device parses the IP packet of the traffic and obtains the source IP information of the traffic from the option field of the IP packet.

2. The method according to claim 1, characterized in that Inserting source IP information of the traffic into an option field of an IP packet of the traffic, including: Querying a traffic mark database for data records of the traffic; If no data record of the flow is found in the flow mark database, write the data record of the flow into the flow mark database, and insert the source IP information of the flow into the option field of the IP packet of the flow; If the data record of the flow is found in the flow mark database, the source IP information of the flow is not inserted into the option field of the IP packet of the flow.

3. The method according to claim 2, characterized in that The method further comprises: Generate tag information of the traffic according to the quintuple information of the traffic; Writing the data record of the traffic into the traffic mark database includes: Writing the mark information of the flow into the flow mark database as a unique identifier of the data record of the flow in the flow mark database; Querying the data record of the traffic in the traffic mark database includes: According to the mark information of the flow, the data record of the flow is searched in the flow mark database.

4. The method according to claim 2, characterized in that: The method further comprises: When writing the data record of the flow into the flow mark database, setting an expiration condition for the data record of the flow; When the expiration condition is met, the data record of the traffic is deleted from the traffic mark database.

5. The method according to claim 1, characterized in that According to the destination IP address of the traffic, sending the traffic to the second CPE device through the SD-WAN network includes: Determine the first TUN network card to be used for forwarding according to the destination IP address of the traffic; Replace the source IP address of the traffic with the first TUN port IP address of the first TUN network card; The traffic is sent to the second CPE device through the SD-WAN network.

6. An IP transparent transmission method, characterized in that: The method is applied to a second CPE device, and the method includes: Receive traffic sent by a first CPE device via an SD-WAN network, where the first CPE device obtains the traffic from a sending device, inserts source IP information of the traffic into an option field of an IP packet of the traffic, and sends the traffic to a second CPE device via the SD-WAN network according to a destination IP address of the traffic, where the source IP information includes at least an original IP address of the sending device; According to the destination IP address of the traffic, the traffic is forwarded to a receiving device, so that the receiving device parses the IP packet of the traffic and obtains the source IP information of the traffic from the option field of the IP packet of the traffic.

7. The method according to claim 6, characterized in that Forwarding the traffic to a receiving device according to the destination IP address of the traffic, including: forwarding the traffic to the second LAN network card of the second CPE device according to the destination IP address of the traffic; Replace the source IP address of the traffic with the second LAN port IP address of the second LAN network card; The traffic is forwarded to the receiving device through the second LAN network card.

8. An IP transparent transmission method, characterized in that: The method is applied to a receiving end device, and the method comprises: Obtaining traffic from a second CPE device, after the traffic is obtained by the first CPE device from the sending end device, inserting source IP information of the traffic into the option field of the IP packet of the traffic, and sending the traffic to the second CPE device through the SD-WAN network according to the destination IP address of the traffic, so that the second CPE device forwards the traffic to the receiving end device according to the destination IP address of the traffic, and the source IP information at least includes the original IP address of the sending end device; The IP packet of the traffic is parsed, and the source IP information of the traffic is obtained from the option field of the IP packet of the traffic.

9. The method according to claim 8, characterized in that Parsing the IP packet of the traffic, and obtaining source IP information of the traffic from the option field of the IP packet of the traffic, including: The IP packet of the flow is parsed through a pre-deployed kernel plug-in, and the source IP information of the flow is obtained from the option field of the IP packet of the flow.

10. The method according to claim 8, characterized in that Parsing the IP packet of the traffic, and obtaining source IP information of the traffic from the option field of the IP packet of the traffic, including: Parsing the IP packet of the traffic to determine whether source IP information exists in the option field of the IP packet; If the option field of the IP packet contains source IP information, the source IP information is extracted from the option field of the IP packet of the traffic.

11. The method according to claim 8, characterized in that After parsing the IP packet of the flow and obtaining the source IP information of the flow from the option field of the IP packet of the flow, the method further includes: and, based on the source IP information, replacing the source IP address of the traffic with the original IP address of the sending end device; The replaced source IP address is provided to the application layer program that processes the traffic.

12. A first CPE device for implementing IP transparent transmission, characterized in that: The first CPE device comprises: A traffic receiving module is used to obtain traffic from a sending device; A traffic processing module, configured to insert source IP information of the traffic into an option field of an IP packet of the traffic, wherein the source IP information at least includes an original IP address of the sending end device; The traffic forwarding module is used to send the traffic to the second CPE device through the SD-WAN network according to the destination IP address of the traffic, so that the second CPE device forwards the traffic to the receiving device according to the destination IP address of the traffic, and the receiving device parses the IP packet of the traffic and obtains the source IP information of the traffic from the option field of the IP packet.

13. A second CPE device for implementing IP transparent transmission, characterized in that: The second CPE device includes: A traffic receiving module, configured to receive traffic sent by a first CPE device via an SD-WAN network, wherein after the traffic is obtained by the first CPE device from a sending end device, source IP information of the traffic is inserted into an option field of an IP packet of the traffic, and according to a destination IP address of the traffic, the traffic is sent to a second CPE device via the SD-WAN network, wherein the source IP information includes at least an original IP address of the sending end device; The traffic forwarding module is used to forward the traffic to a receiving device according to the destination IP address of the traffic, so that the receiving device parses the IP packet of the traffic and obtains the source IP information of the traffic from the option field of the IP packet of the traffic.

14. A receiving device for implementing IP transparent transmission, characterized in that: The receiving end device comprises: A traffic receiving module, configured to obtain traffic from a second CPE device, wherein after the traffic is obtained by the first CPE device from a sending end device, the source IP information of the traffic is inserted into an option field of an IP packet of the traffic, and according to a destination IP address of the traffic, the traffic is sent to the second CPE device through an SD-WAN network, so that the second CPE device forwards the traffic to a receiving end device according to the destination IP address of the traffic, and the source IP information at least includes an original IP address of the sending end device; The traffic analysis module is used to analyze the IP packets of the traffic and obtain the source IP information of the traffic from the option field of the IP packets of the traffic.

15. A computing device comprising a memory for storing computer program instructions and a processor for executing the computer program instructions, wherein: When the computer program instructions are executed by the processor, the device is triggered to execute the method according to any one of claims 1 to 11.

16. A computer readable medium having computer program instructions stored thereon, wherein the computer program instructions can be executed by a processor to implement the method according to any one of claims 1 to 11.