Data forwarding enhancement method and apparatus, network device, medium and program product

By configuring IPsec policies in the PPPoE client and including decryption operation codes in the encapsulated packets, the problem of IPsec tunnel identification errors in PPPoE over IPv6 was solved, enabling secure data transmission and correct decryption, and improving the security and reliability of network connections.

WO2026232801A1PCT designated stage Publication Date: 2026-11-12CHINA TELECOM CORP LTD TECHNOLOGY INNOVATION CENTER +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2025/141172
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2025-05-09
Filing Date
2025-12-09
Publication Date
2026-11-12

AI Technical Summary

Technical Problem

In PPPoE over IPv6 networks, IPsec tunnels cannot be correctly identified, causing the PPPoE server to be unable to decrypt IPsec packets properly, thus affecting the security of network connections.

Method used

By configuring the IP addresses of the flows of interest in the IPsec policy, the PPPoE client encapsulates the uplink service packets and carries the decryption operation code in the encapsulated packets, ensuring that the PPPoE server can correctly identify and decrypt the IPsec packets.

Benefits of technology

It enables secure data transmission and normal processing in a PPPoE over IPv6 environment, ensuring the security and reliability of network connections.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2025141172_12112026_PF_FP_ABST
    Figure CN2025141172_12112026_PF_FP_ABST
Patent Text Reader

Abstract

The present disclosure relates to the technical field of wireless communications. Provided are a data forwarding enhancement method and apparatus, a network device, a medium and a program product. The data forwarding enhancement method comprises: configuring an IP address for a flow of interest of an IPsec policy; in response to a received uplink service packet sent by a host side, encapsulating the uplink service packet on the basis of a PPPoE header and an Internet Protocol tunnel header to obtain an initial encapsulated packet; determining that the initial encapsulated packet hits the IPsec policy and, on the basis of an IPsec encapsulation mode, encapsulating the initial encapsulated packet to obtain a target encapsulated packet, the target encapsulated packet carrying an opcode of a decryption behavior; and, on the basis of an Internet Protocol tunnel, sending the target encapsulated packet to a PPPoE server side. By means of the technical solution of the present disclosure, PPPoE server sides can correctly identify and normally decrypt IPsec packets, thus ensuring secure transmission and normal processing of data in PPPoE over IPv6 environments.
Need to check novelty before this filing date? Find Prior Art

Description

Data forwarding enhancement methods, apparatus, network equipment, media and program products

[0001] This disclosure claims priority to Chinese Patent Application No. 202510596474.5, filed on May 9, 2025, entitled “Data Forwarding Enhancement Method, Apparatus, Network Device, Media and Program Product”, the entire contents of which are incorporated herein by reference. Technical Field

[0002] This disclosure relates to the field of wireless communication technology, and in particular to a data forwarding enhancement method, a data forwarding enhancement device, a network device, a computer-readable storage medium, and a computer program product. Background Technology

[0003] With the development of network technology, especially the gradual popularization of IPv6 (Internet Protocol Version 6), the combination of PPPoE (Point-to-Point Protocol over Ethernet) and IPv6 has enabled new ways of network connection. However, in practical application scenarios, when the IPsec (Internet Protocol Security) security mechanism is used to protect the above network connection, its defined behavior cannot correctly identify the IPsec tunnel, resulting in the IPsec packets transmitted through the Internet Protocol tunnel provided by the above network connection being unable to be decrypted normally, thus compromising the security of the network connection.

[0004] It should be noted that the information disclosed in the background section above is only used to enhance the understanding of the background of this disclosure, and therefore may include information that does not constitute prior art known to those skilled in the art. Summary of the Invention

[0005] The purpose of this disclosure is to provide a data forwarding enhancement method, enhancement device, network device, storage medium, and computer program product, which at least to some extent overcomes the problem of insufficient security of IPsec packets transmitted through Internet Protocol tunnels obtained by combining PPPoE and IPv6 in related technologies.

[0006] Other features and advantages of this disclosure will become apparent from the following detailed description, or may be learned in part by practice of this disclosure.

[0007] According to one aspect of this disclosure, a data forwarding enhancement method is provided, applied to a PPPoE client, comprising: configuring the IP address of an interested flow according to an IPsec policy; responding to a received uplink service packet sent by a host, encapsulating the uplink service packet based on a PPPoE header and an Internet Protocol tunnel header to obtain an initial encapsulated packet; determining that the initial encapsulated packet matches the IPsec policy based on the IP address, and encapsulating the initial encapsulated packet based on an IPsec encapsulation method to obtain a target encapsulated packet, wherein the target encapsulated packet carries an opcode for decryption, the opcode being used to instruct the corresponding PPPoE server to perform a first decapsulation operation on the target encapsulated packet based on the IPsec encapsulation method; and sending the target encapsulated packet to the PPPoE server via the Internet Protocol tunnel, so that the PPPoE server performs enhancement processing on the target encapsulated packet before forwarding it, the enhancement processing including the first decapsulation operation.

[0008] In one embodiment of this disclosure, configuring the IP address of the flow of interest under the IPsec policy includes: configuring the IP address of the flow of interest under the IPsec policy based on a first extended segment identifier.

[0009] In one embodiment of this disclosure, determining that the initial encapsulated packet hits the IPsec policy based on the IP address includes: the header of the Internet Protocol tunnel includes the destination address of the Internet Protocol tunnel, the destination address is determined based on the second extension segment identifier of the PPPoE server, and if the second extension segment identifier matches the first extension segment identifier, determining that the initial encapsulated packet hits the IPsec policy based on the IP address, wherein the second extension segment identifier in the target encapsulated packet carries the opcode.

[0010] In one embodiment of this disclosure, the initial encapsulation message is encapsulated based on the IPsec encapsulation method, which includes: inserting the IPsec header after the Internet Protocol Tunnel Header and before the PPPoE header to encapsulate the initial encapsulation message, wherein the IPsec encapsulation method includes the Authentication Header (AH) protocol and / or the Encapsulation Security Payload (ESP) protocol, and the IPsec header includes the AH header and / or the ESP header.

[0011] In one embodiment of this disclosure, the opcode is used to instruct the corresponding PPPoE server to perform a first decapsulation operation on the target encapsulated packet based on the IPsec encapsulation method, including: the opcode is used to instruct the PPPoE server to perform a first decapsulation operation on the target encapsulated packet based on the AH protocol and / or the ESP protocol to obtain the initial encapsulated packet.

[0012] In one embodiment of this disclosure, the enhancement process further includes: instructing the PPPoE server, as indicated by the second extended segment identifier, to perform a second decapsulation operation on the initially encapsulated packet to obtain the uplink service packet, and finding the virtual routing forwarding (VRF) instance to which the uplink service packet belongs, so as to send the uplink service packet into the corresponding VPN channel for forwarding based on the VPN parameters pre-configured in the VRF instance.

[0013] In one embodiment of this disclosure, if the target encapsulated message is obtained based on the ESP protocol, the target encapsulated message further includes an ESP trailer and ESP verification data located at the end of the initial encapsulated message. The initial encapsulated message is encapsulated using the IPsec encapsulation method to obtain the target encapsulated message. The method further includes: if encapsulation is based on the AH protocol, authenticating the entire target encapsulated message; if encapsulation is based on the ESP protocol, encrypting the target encapsulated message from the PPPoE header to the ESP trailer, and authenticating the target encapsulated message from the ESP header to the ESP trailer.

[0014] In one embodiment of this disclosure, the method further includes: in response to a downlink encapsulated message sent by the PPPoE server, performing a decapsulation operation on the downlink encapsulated message based on the configured decryption behavior.

[0015] According to another aspect of this disclosure, a data forwarding enhancement method is provided, applied to a PPPoE server, comprising: responding to a target encapsulated packet sent by a PPPoE client; if an opcode for decryption is identified in the target encapsulated packet, performing a first decapsulation operation on the target encapsulated packet based on the IPsec encapsulation method to obtain an initial encapsulated packet; performing a second decapsulation operation on the initial encapsulated packet based on the PPPoE header and the Internet Protocol tunnel header to obtain an uplink service packet; and forwarding the uplink service packet.

[0016] In one embodiment of this disclosure, a first decapsulation operation is performed on the target encapsulated packet based on the IPsec encapsulation method, including: detecting that the number of remaining routing segments of the target encapsulated packet is 0, and identifying that the target encapsulated packet includes an IPsec header; searching for the corresponding IPsec security association record based on the IPsec service parameters carried in the IPsec header and the destination IP address; and removing the IPsec header based on the IPsec security association record.

[0017] In one embodiment of this disclosure, the IPsec header includes an AH header and / or an ESP header, and the IPsec encapsulation method includes the AH protocol and / or the ESP protocol. If the target encapsulated packet is obtained based on the ESP protocol, the first decapsulation operation on the target encapsulated packet based on the IPsec encapsulation method further includes: removing the ESP tail and ESP verification data from the end of the target encapsulated packet based on the IPsec security association record.

[0018] In one embodiment of this disclosure, a second decapsulation operation is performed on the initially encapsulated packet based on the PPPoE header and the Internet Protocol tunnel header to obtain an uplink service packet. This includes: if the initially encapsulated packet is found to carry a second extended segment identifier, a matching VRF instance is searched based on the PPPoE session header and forwarding IP information in the forwarding protocol stack of the uplink service packet to strip the IPv6 header and the PPPoE header to obtain the uplink service packet; a VPN channel is determined based on the VRF instance, and the uplink service packet is forwarded to the VPN channel.

[0019] In one embodiment of this disclosure, the first decapsulation operation on the target encapsulated packet based on the IPsec encapsulation method further includes: performing the first decapsulation operation on the target encapsulated packet based on the configured operation code of the decryption behavior.

[0020] According to another aspect of this disclosure, a data forwarding enhancement apparatus is provided, comprising: a configuration module for configuring the IP addresses of interested flows in an IPsec policy; a first encapsulation module for encapsulating an uplink service packet received from a host based on a PPPoE header and an Internet Protocol tunnel header to obtain an initial encapsulated packet; a second encapsulation module for determining that the initial encapsulated packet matches the IPsec policy based on the IP address, and encapsulating the initial encapsulated packet based on an IPsec encapsulation method to obtain a target encapsulated packet, wherein the target encapsulated packet carries an opcode for decryption, the opcode being used to instruct the corresponding PPPoE server to perform a first decapsulation operation on the target encapsulated packet based on the IPsec encapsulation method; and a sending module for sending the target encapsulated packet to the PPPoE server based on the Internet Protocol tunnel, so that the PPPoE server performs enhancement processing on the target encapsulated packet before forwarding it, the enhancement processing including the first decapsulation operation.

[0021] According to another aspect of this disclosure, a data forwarding enhancement device is provided, comprising: a first decapsulation module, configured to, in response to a target encapsulated packet sent by a PPPoE client, if an opcode for decryption is identified in the target encapsulated packet, perform a first decapsulation operation on the target encapsulated packet based on the IPsec encapsulation method to obtain an initial encapsulated packet; a second decapsulation module, configured to, based on the PPPoE header and the Internet Protocol tunnel header, perform a second decapsulation operation on the initial encapsulated packet to obtain an uplink service packet; and a forwarding module, configured to forward the uplink service packet.

[0022] According to another aspect of this disclosure, a network device is provided, comprising: a processor; and a memory for storing executable instructions of the processor; the processor being configured to perform the data forwarding enhancement method of the first aspect described above by executing the executable instructions.

[0023] According to another aspect of this disclosure, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the above-described data forwarding enhancement method.

[0024] According to another aspect of this disclosure, a computer program product is provided, on which a computer program is stored, which, when executed by a processor, implements the above-described data forwarding enhancement method.

[0025] The data forwarding enhancement scheme provided in the embodiments of this disclosure enables PPPoE clients to accurately identify uplink service packets requiring IPsec protection by configuring the IP addresses of the flows of interest in the IPsec policy. When an uplink service packet is received from the host, it is encapsulated based on the PPPoE header and the Internet Protocol tunnel header to obtain an initial encapsulated packet. After determining that the initial encapsulated packet matches the IPsec policy based on the IP address, IPsec encapsulation is performed and an opcode for decryption is carried to obtain the target encapsulated packet. This ensures the security of the packet during transmission and provides specific instructions for the decapsulation operation of the PPPoE server. When the server receives the target encapsulated packet, it can perform enhanced processing including a first decapsulation operation on the target encapsulated packet according to the opcode before forwarding it. This allows the PPPoE server to correctly identify and decrypt the IPsec packet normally, ensuring the secure transmission and normal processing of data in the PPPoE over IPv6 environment.

[0026] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure. Attached Figure Description

[0027] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure. It is obvious that the drawings described below are merely some embodiments of this disclosure, and those skilled in the art can obtain other drawings based on these drawings without any inventive effort.

[0028] Figure 1 shows a flowchart of a data forwarding enhancement method according to an embodiment of the present disclosure;

[0029] Figure 2 shows a schematic diagram of the structure of the SRv6 SID segment identifier in a data forwarding enhancement scheme according to an embodiment of the present disclosure;

[0030] Figures 3a to 3c show schematic diagrams of IPsec encapsulation in a data forwarding enhancement scheme according to an embodiment of the present disclosure;

[0031] Figure 4 shows a flowchart of another data forwarding enhancement method in an embodiment of this disclosure;

[0032] Figure 5 shows a flowchart of another data forwarding enhancement method in an embodiment of this disclosure;

[0033] Figure 6 shows a schematic diagram of the forwarding protocol stack in another data forwarding enhancement scheme in an embodiment of this disclosure;

[0034] Figure 7 shows a schematic diagram of a data forwarding enhancement device according to an embodiment of the present disclosure;

[0035] Figure 8 shows a schematic diagram of a data forwarding enhancement device according to an embodiment of the present disclosure;

[0036] Figure 9 shows a structural block diagram of a network device according to an embodiment of the present disclosure. Detailed Implementation

[0037] Exemplary embodiments will now be described more fully with reference to the accompanying drawings. However, these exemplary embodiments can be implemented in many forms and should not be construed as limited to the examples set forth herein; rather, they are provided so that this disclosure will be more comprehensive and complete, and will fully convey the concept of the exemplary embodiments to those skilled in the art. The described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.

[0038] Furthermore, the accompanying drawings are merely illustrative of this disclosure and are not necessarily drawn to scale. The same reference numerals in the drawings denote the same or similar parts, and therefore repeated descriptions of them will be omitted. Some block diagrams shown in the drawings are functional entities and do not necessarily correspond to physically or logically independent entities. These functional entities may be implemented in software, in one or more hardware modules or integrated circuits, or in different network and / or processor devices and / or microcontroller devices.

[0039] PPPoE (Point-to-Point Protocol over Ethernet) is a technology that runs the PPP protocol on Ethernet. It encapsulates Ethernet frames within PPP frames, allowing multiple users on an Ethernet network to access the Internet through a single broadband connection. The PPPoE client is responsible for initiating connection requests with the PPPoE server and encapsulating data packets from upper-layer applications within PPPoE frames before sending them to the server over Ethernet. The PPPoE server listens for connection requests from clients on a designated port, receives PPPoE frames from clients, decapsulates and processes them, and then forwards the data to the appropriate destination based on network policies and routing information.

[0040] In some embodiments, devices such as routers and personal computers in a home typically act as PPPoE clients when connected to a broadband network. For example, when a user connects to the Internet via an ADSL modem, the router is configured as a PPPoE client to establish a connection with the service provider's PPPoE server.

[0041] In some embodiments, within an Internet Service Provider (ISP) network, a Broadband Access Server (BRAS) typically acts as a PPPoE server, handling a large number of client connection requests and performing functions such as user management, authentication and authorization, and data forwarding to achieve access control and management of the broadband network.

[0042] In some embodiments, with the development of network technology, PPPoE over IPv6 technology has emerged. By defining a new SRv6 SID opcode behavior on the PPPoE server, PPPoE clients can build VPNs using an overlay layer 3 network, providing a new approach for network connectivity and networking. However, in practical applications, when using IPsec security mechanisms to protect the PPPoE over IPv6 connection between the PPPoE client and the PPPoE server, the newly defined segment identifier opcode behavior in PPPoE over IPv6 cannot correctly identify IPsec tunnels. This causes the PPPoE server to be unable to properly decrypt IPsec packets when processing PPPoE over IPv6 packets, severely affecting the secure transmission effect of the PPPoE over IPv6 connection using IPsec security mechanisms. Consequently, the security of the network connection cannot be guaranteed, limiting the application of PPPoE over IPv6 technology in scenarios with high security requirements.

[0043] To facilitate understanding, the following is an explanation of several terms used in this application.

[0044] IPsec (Internet Protocol Security) is a suite of protocols designed to ensure the security of IP network communications, providing encryption, authentication, and integrity protection for data.

[0045] SRv6 SID opcode (Segment Routing over IPv6 Segment Identifier Operation Code): SRv6 is a segment routing technology based on IPv6. SID opcode is the segment identifier operation code, including END.X (End with Cross-Connect). END.X refers to the cross-connect termination operation code. After the node performs the termination operation, it forwards the data packet to the specified interface or tunnel.

[0046] VRF (Virtual Routing and Forwarding) is a technology implemented on network devices that creates multiple independent virtual routing tables and forwarding instances on a single physical device to provide isolated network spaces for different users, services, or departments.

[0047] VPN (Virtual Private Network): A technology that uses a public network (such as the Internet) to build a secure private network connection.

[0048] The following will describe in more detail the steps of the data forwarding enhancement method in this example embodiment, with reference to the accompanying drawings and embodiments.

[0049] Figure 1 shows a flowchart of a data forwarding enhancement method according to an embodiment of the present disclosure.

[0050] As shown in Figure 1, a data forwarding enhancement method according to an embodiment of the present disclosure, applied to a PPPoE client, includes:

[0051] Step S102: Configure the IP addresses of the flows of interest in the IPsec policy.

[0052] In some embodiments, in a PPPoE over IPv6 network environment, if the defined SRv6 SID opcode behavior cannot correctly identify the IPsec tunnel, making it impossible for the PPPoE server to decrypt IPsec packets normally, by configuring the IP addresses of the interested flows in the IPsec policy, it is possible to clearly identify which traffic needs to be protected by IPsec. By specifying a specific range of IP addresses as the interested flows, the PPPoE client can filter out the packets that need to be encrypted for transmission.

[0053] In some embodiments, in an IPsec policy, the flow of interest refers to the specific traffic that needs to be protected by IPsec, which can be defined by information such as source IP address, destination IP address, and port number.

[0054] Step S104: In response to the received uplink service message sent by the host, the uplink service message is encapsulated based on the PPPoE header and the Internet Protocol Tunneling IPv6 header to obtain the initial encapsulated message.

[0055] In some embodiments, PPPoE over IPv6 requires encapsulation of uplink service packets on the host side to ensure correct transmission in the network. The PPPoE header is used to identify the PPPoE session, allowing the PPPoE server to recognize the session to which the packet belongs. The Internet Protocol Tunneling (IPv6) header provides the necessary information for the routing of the packet in the network, ensuring that the packet can accurately reach the PPPoE server.

[0056] Step S106: Determine if the initial encapsulated packet hits the IPsec policy based on the IP address, and encapsulate the initial encapsulated packet according to the IPsec encapsulation method to obtain the target encapsulated packet. The target encapsulated packet carries the operation code for decryption. The operation code is used to instruct the PPPoE server to perform the first decapsulation operation on the target encapsulated packet according to the IPsec encapsulation method.

[0057] In some embodiments, after configuring the IP addresses of the interested flows for the IPsec policy, it is necessary to determine whether the initially encapsulated packet belongs to the traffic that needs to be protected by IPsec. If the IP address of the packet is within the range of the interested flows, that is, if it hits the IPsec policy, it needs to be encapsulated by IPsec to ensure the security of the packet during transmission.

[0058] In some embodiments, the PPPoE client extracts the source IP address and destination IP address from the initial encapsulated packet and compares them with the IP addresses of the interested flows in the previously configured IPsec policy. If the IP address of the packet is within the range of the interested flows, the packet is considered to have hit the policy.

[0059] In some embodiments, the process of encapsulating the initial encapsulated packet based on the IPsec encapsulation method further includes: adding an opcode for decryption to the target encapsulated packet. This opcode can be a specific field value. After receiving the packet, the PPPoE server will recognize the opcode and perform the first decapsulation operation according to the opcode's indication.

[0060] Step S108: The target encapsulated packet is sent to the PPPoE server based on the Internet Protocol IPv6 tunnel, so that the PPPoE server can perform enhanced processing on the target encapsulated packet before forwarding it. The enhanced processing includes a first decapsulation operation.

[0061] In some embodiments, the target encapsulated packet is sent to the PPPoE server through an Internet Protocol tunnel. The isolation and security of the tunnel ensure that the packet can be securely transmitted to the destination. After receiving the packet, the PPPoE server performs enhancement processing on the packet according to the operation code of the decryption behavior carried in the target encapsulated packet, including a first decapsulation operation, to solve the problem that the IPsec packet could not be decrypted normally.

[0062] In this embodiment, by configuring the IP addresses of the flows of interest in the IPsec policy, the PPPoE client can accurately identify uplink service packets that require IPsec protection. When receiving an uplink service packet sent by the host, it encapsulates it based on the PPPoE header and the Internet Protocol Tunneling (IPv6) header to obtain an initial encapsulated packet. After determining that the initial encapsulated packet matches the IPsec policy based on the IP address, it performs IPsec encapsulation and carries the decryption operation opcode to obtain the target encapsulated packet. This ensures the security of the packet during transmission and provides specific instructions for the decapsulation operation of the PPPoE server. When the server receives the target encapsulated packet, it can perform enhanced processing including the first decapsulation operation on the target encapsulated packet according to the opcode before forwarding it. This enables the PPPoE server to correctly identify and decrypt the IPsec packet normally, ensuring the secure transmission and normal processing of data in the PPPoE over IPv6 environment.

[0063] In one embodiment of this disclosure, configuring the IP address of the flow of interest under the IPsec policy includes: configuring the IP address of the flow of interest under the IPsec policy based on a first extended segment identifier.

[0064] In some embodiments, in a PPPoE over IPv6 environment, the initial SRv6 SID opcode behavior cannot correctly identify the IPsec tunnel, causing problems for the PPPoE server in decrypting IPsec packets. By configuring the IP address of the flow of interest in the IPsec policy based on the first extension segment identifier END.PPPoE.X SID, the range of packets for which the IPsec policy needs to be applied can be specified. The first extension segment identifier typically contains information related to a specific network function or path. Associating it with the IPsec policy allows the PPPoE client to accurately identify the packets that need to be encrypted.

[0065] In some embodiments, the first extended segment identifier END.PPPoE.X SID may be predefined and associated with a specific service or network path.

[0066] In some embodiments, END.PPPoE.X SID is a specific SID used to characterize the endpoint operation in PPPoE service. When a data packet arrives at the node corresponding to this SID, PPPoE-related termination processing will be performed.

[0067] In one embodiment of this disclosure, determining whether an initial encapsulated packet hits an IPsec policy based on an IP address includes: the header of the Internet Protocol tunnel includes the destination address of the Internet Protocol tunnel, the destination address is determined based on the second extension segment identifier of the PPPoE server, and if the second extension segment identifier matches the first extension segment identifier, determining whether the initial encapsulated packet hits an IPsec policy based on the IP address, wherein the second extension segment identifier in the target encapsulated packet carries an opcode.

[0068] In some embodiments, the PPPoE server has specific functions or roles in the network, and its corresponding second extension segment identifier is predefined and unique in the network. When the PPPoE client establishes an Internet Protocol tunnel, it determines the destination address of the Internet Protocol tunnel based on the information from the PPPoE server. This destination address is determined based on the second extension segment identifier of the PPPoE server.

[0069] In some embodiments, the second extension segment identifier matches the first extension segment identifier. This can be determined by the second extension segment identifier being exactly the same as the first extension segment identifier, or by the first extension segment identifier defining an IP address range, and the IP address carried by the second extension segment identifier belonging to this address range.

[0070] In some embodiments, as shown in Figure 2, the second extended segment identifier in the target encapsulated message carries an opcode, which can be represented as END.PPPoE.X with Decryption. Decryption corresponds to the opcode and refers to the action of decrypting the IPsec encapsulation performed on the PPPoE server. The Decryption action needs to be used in conjunction with END.PPPoE.X before executing the corresponding END.PPPoE.X action, and is an additional action attached to END.PPPoE.X.

[0071] As shown in Figure 2, the SRv6 SID (Segment Identifier) ​​is a 128-bit identifier used to indicate specific forwarding behavior and paths in the network. It consists of three parts: Locator, Function, and Argument. END.PPPoE.X with Decryption is a specific function identifier in the Function field.

[0072] In some embodiments, Argument is an optional field that can carry parameters related to IPsec services (such as encrypted streams, SPI identifiers, etc.).

[0073] In this embodiment, by basing the destination address of the Internet Protocol tunnel on the second extension segment identifier of the PPPoE server, when the second extension segment identifier matches the first extension segment identifier, it can be determined that the initial encapsulated packet hits the IPsec policy. This enables the selection of packets that need IPsec protection. The second extension segment identifier in the target encapsulated packet carries an opcode, providing the PPPoE server with clear processing instructions. This allows the PPPoE client to accurately identify packets that need IPsec protection and provides key information for the PPPoE server to correctly decrypt and process these packets, ensuring the secure transmission and normal processing of data in the PPPoE over IPv6 environment.

[0074] In one embodiment of this disclosure, encapsulating an initial encapsulated message based on an IPsec encapsulation method includes: inserting an IPsec header after the Internet Protocol Tunneling IPv6 header and before the PPPoE header to encapsulate the initial encapsulated message, wherein the IPsec encapsulation method includes the Authentication Header (AH) protocol and / or the Encapsulation Security Payload (ESP) protocol, and the IPsec header includes the AH header and / or the ESP header.

[0075] In some embodiments, the three IPsec encapsulation methods configured for PPPoE over IPv6 include: AH encapsulation, ESP encapsulation, and AH+ESP encapsulation.

[0076] In this embodiment, by inserting the IPsec header after the Internet Protocol tunnel IPv6 header and before the PPPoE header, IPsec security protection is provided for the packets without interfering with the normal forwarding of the Internet Protocol tunnel and the identification of PPPoE sessions. If the AH protocol is used, the integrity of the packet data and the authentication of the data source are realized, ensuring that the data is not tampered with during transmission and that the sender's identity can be confirmed. If the ESP protocol is used, data confidentiality is also protected to prevent data from being stolen during transmission. If both the AH and ESP protocols are used simultaneously, the security of the packets is further enhanced. In a PPPoE over IPv6 environment, this IPsec encapsulation method can ensure the security of data transmission and the normal network communication, thereby improving the reliability and security of the network system.

[0077] In one embodiment of this disclosure, if the target encapsulated message is obtained based on the ESP protocol, the target encapsulated message further includes an ESP trailer and ESP verification data located at the end of the initial encapsulated message. The initial encapsulated message is encapsulated based on the IPsec encapsulation method to obtain the target encapsulated message. The method further includes: if encapsulation is based on the AH protocol, authenticating the entire target encapsulated message; if encapsulation is based on the ESP protocol, encrypting the target encapsulated message from the PPPoE header to the ESP trailer, and authenticating the target encapsulated message from the ESP header to the ESP trailer.

[0078] As shown in Figure 3a, the IPsec mechanism provides data integrity and data source authentication services through AH encapsulation. However, AH does not encrypt data. In PPPoE over IPv6 access segment protection, the IPsec operation targets the PPPoE over IPv6 packets between the client and server. In the PPPoE over IPv6 packets, the AH header is inserted after the IPv6 header and before the PPPoE header. When AH is used in conjunction with PPPoE over IPv6, the authentication scope of AH is the entire IPv6 packet except for variable fields. AH protects the packet payload and IPv6 header fields except for Next Header, Hop Limit, destination address, etc. These fields (Next Header, Hop Limit, destination address, etc.) are expected to change during packet forwarding, and AH does not attempt to prevent or detect such normal changes. The SL field of SRH is also a variable field.

[0079] As shown in Figure 3a, AH encapsulation includes IPv6 Header, AH Header, PPPoE Header, Private Network Service IP, and Data.

[0080] As shown in Figure 3b, the IPsec mechanism provides services such as data integrity, data source authentication, and data encryption through ESP encapsulation. However, by default, ESP only protects the payload and its own header information, without including the authentication external IP header. In PPPoE over IPv6 packets, ESP is inserted after the IPv6 header and before the PPPoE header. The scope of ESP encryption is from PPPoE to the ESP Trailer, while the scope of authentication integrity is from ESP to the ESP Trailer. When the packet arrives at the PPPoE over IPv6 server, the server needs to process the ESP header.

[0081] As shown in Figure 3b, the ESP encapsulation includes the IPv6 Header, ESP Header (Encapsulated Security Payload Header), PPPoE Header, Private Network Service IP, Data, ESP Trailer (ESP Tail), and ESPICV (ESP Integrity Check Value).

[0082] As shown in Figure 3c, the IPsec mechanism, through the combined use of AH and ESP, can provide more comprehensive protection. In PPPoE over IPv6 packets, ESP is used to encrypt the data packet, and AH is used to authenticate the entire PPPoE packet encapsulated by ESP. ESP is inserted after the IPv6 header and before the PPPoE header; AH is inserted between the IPv6 header and the ESP header. The scope of ESP encryption is the portion from PPPoE to the ESP Trailer, and the scope of authentication integrity is from ESP to the ESP Trailer. The scope of AH authentication is the entire PPPoE over IPv6 packet except for the variable fields. When the packet arrives at the PPPoE over IPv6 server, the server needs to process the AH and ESP headers.

[0083] As shown in Figure 3c, the AH+ESP encapsulation includes IPv6 Header, AH Header, ESP Header, PPPoE Header, private network service IP, Data, ESP Trailer, and ESPICV.

[0084] In one embodiment of this disclosure, the opcode is used to instruct the PPPoE server to perform a first decapsulation operation on the target encapsulated packet based on the IPsec encapsulation method, including: the opcode is used to instruct the PPPoE server to perform a first decapsulation operation on the target encapsulated packet based on the AH protocol and / or the ESP protocol to obtain an initial encapsulated packet.

[0085] In some embodiments, after receiving the target encapsulated message, the PPPoE server will parse the opcode carried in the message. When the opcode Decryption is identified, the server will clearly indicate that the message needs to be decapsulated based on the AH protocol and / or the ESP protocol.

[0086] In this embodiment, by setting the opcode Decryption in the target encapsulated packet, the PPPoE server can be explicitly instructed to perform the first decapsulation operation on the target encapsulated packet based on the AH protocol and / or the ESP protocol. This achieves the accurate restoration of the encrypted target encapsulated packet to the initial encapsulated packet. Through the precise indication of the opcode, the problem of the PPPoE server being unable to decrypt IPsec packets due to the inability to correctly identify the IPsec tunnel is solved, ensuring the security of data based on the IPsec protocol during transmission.

[0087] In one embodiment of this disclosure, the enhancement process further includes: instructing the PPPoE server, via the second extended segment identifier, to perform a second decapsulation operation on the initially encapsulated packet to obtain the uplink service packet, and finding the virtual routing forwarding (VRF) instance to which the uplink service packet belongs, so as to send the uplink service packet into the corresponding VPN tunnel for forwarding based on the VPN parameters pre-configured in the VRF instance.

[0088] In this embodiment, by using the second extended segment identifier to instruct the PPPoE server to perform a second decapsulation operation, and by finding the VRF instance to which the uplink service packet belongs and forwarding it through the VPN channel according to its pre-configured VPN parameters, the PPPoE server can accurately restore the uplink service packet from the multi-encapsulated packet. Through the isolation and management functions of the VRF instance, independent routing and security policies are provided for different service packets. At the same time, based on the pre-configured VPN parameters in the VRF instance, the packet is sent to the corresponding VPN channel, ensuring the security and privacy of the data during transmission.

[0089] In one embodiment of this disclosure, the method further includes: in response to a downlink encapsulated message sent by a PPPoE server, performing a decapsulation operation on the downlink encapsulated message based on a configured decryption behavior.

[0090] In some embodiments, the PPPoE client listens to the network interface. When it receives a downlink encapsulated packet sent by the PPPoE server, it can also trigger the decapsulation process based on the configured decryption behavior. The client identifies the outermost encapsulation protocol (such as ESP header or AH header) according to the packet header information and removes the outer encapsulation according to the rules of the protocol. If it is ESP encapsulation, the client will look up the corresponding key according to the Security Parameter Index (SPI) in the ESP header, decrypt the encrypted data, and remove the ESP header and trailer. If the downlink encapsulated packet has multiple layers of encapsulation, the client will decapsulate it level by level according to the encapsulation order until the original downlink data is restored.

[0091] In this embodiment, by configuring decryption behavior and performing decapsulation operation when receiving downlink encapsulated packets sent by the PPPoE server, the PPPoE client can securely and accurately receive and process downlink data from the server in the PPPoE over IPv6 network environment. The client can decrypt and decapsulate according to pre-configured rules to recover the original data, ensuring the integrity and availability of the data.

[0092] As shown in Figure 4, a data forwarding enhancement method according to another embodiment of this disclosure, applied to a PPPoE server, includes:

[0093] Step S402: In response to the target encapsulated message sent by the PPPoE client, if the opcode carrying decryption behavior is identified in the target encapsulated message, the first decapsulation operation is performed on the target encapsulated message based on the IPsec encapsulation method to obtain the initial encapsulated message.

[0094] In some embodiments, to ensure data transmission security, the PPPoE client uses IPsec encapsulation to encapsulate the initial encapsulated packet, generating a target encapsulated packet. The target encapsulated packet carries an opcode for decryption. When the PPPoE server receives the target encapsulated packet, it identifies the opcode in the packet. Once the opcode carrying decryption is identified, the server knows that IPsec decapsulation is required. Based on the rules of IPsec encapsulation, the server decrypts the target encapsulated packet and removes the encapsulation header, thereby restoring it to the initial encapsulated packet.

[0095] Step S404: Based on the PPPoE header and the Internet Protocol Tunneling IPv6 header, perform a second decapsulation operation on the initially encapsulated packet to obtain the uplink service packet.

[0096] In some embodiments, the PPPoE server performs a second decapsulation operation on the initially encapsulated packet based on the relevant rules and information of the PPPoE header and the Internet Protocol Tunneling (IPv6) header. For the PPPoE header, the server parses the PPPoE session information according to the PPPoE protocol specification and then removes the PPPoE header. For the IPv6 header, the server removes the tunnel header according to the rules of the tunnel protocol, such as the tunnel establishment method and encapsulation format. Through this series of operations, the most original uplink service packet is finally obtained, which is the service data that the user actually needs to transmit.

[0097] Step S406: Forward the upstream service message.

[0098] In this embodiment, by setting up a first IPsec decapsulation operation based on opcode recognition, a second decapsulation operation based on the PPPoE header and IPv6 header, and forwarding uplink service packets on the PPPoE server, the security of data during transmission is ensured. IPsec encapsulation prevents data from being stolen and tampered with, while ensuring the accuracy of packet processing. Decapsulation according to specific header information can accurately obtain the original service data.

[0099] In one embodiment of this disclosure, a first decapsulation operation is performed on the target encapsulated packet based on the IPsec encapsulation method, including:

[0100] The system detects that the remaining number of routing segments in the target encapsulated packet is 0, and identifies that the target encapsulated packet includes an IPsec header. Based on the IPsec service parameters carried in the IPsec header and the destination IP address, it searches for the corresponding IPsec security association record; and removes the IPsec header based on the IPsec security association record.

[0101] In some embodiments, the processing based on END.PPPoE.X with Decryption includes: when processing SRv6 packets, if Segments Left equals 0, and if the packet contains IPsec header information, i.e., includes (AH header and / or ESP header), the corresponding IPsec SA record is found based on the SPI value, destination IP address, etc. in the IPsec header. The IPsec SA record defines how to process encrypted and decrypted messages. The AH header or ESP header is removed based on the IPsec SA record.

[0102] Segments Left is a field in the SRv6 packet header that indicates the number of segments the packet still needs to pass through.

[0103] Furthermore, based on the actions defined in opcode END.PPPoE.X, the user domain name and VRF, RD, and RT information are correlated and searched through information such as sessionID and IP address carried in the PPPoE session. Then, the IPv6 header and PPPoE header are stripped to find the VRF instance for packet forwarding.

[0104] Among them, RD (Route Distinguisher) is used to distinguish the same IP address in different VRFs to ensure the uniqueness of routes in MPLS (Multi-Protocol Label Switching) networks, and RT (Route Target) is used to control the propagation of routing information between different VRFs and to determine which routes can be imported or exported to a certain VRF.

[0105] In this embodiment, by detecting the remaining number of routing segments in the target encapsulated packet, identifying the IPsec header, finding the security association record based on the service parameters and destination IP address carried in the IPsec header, and removing the IPsec header based on the record, detecting that the number of routing segments is 0 ensures that the packet has reached the predetermined route endpoint, and the decapsulation process can begin. Identifying the IPsec header clearly identifies the key objects for decapsulation, and finding the IPsec security association record based on the header information can provide accurate decryption and authentication parameters for the decapsulation operation, ensuring the security and integrity of the data. Removing the IPsec header completes the initial decapsulation of the packet.

[0106] In one embodiment of this disclosure, the IPsec header includes an AH header and / or an ESP header, and the IPsec encapsulation method includes the AH protocol and / or the ESP protocol. If the target encapsulated packet is obtained based on the ESP protocol, the first decapsulation operation is performed on the target encapsulated packet based on the IPsec encapsulation method, which further includes: removing the ESP tail and ESP verification data from the end of the target encapsulated packet based on the IPsec security association record.

[0107] In one embodiment of this disclosure, a second decapsulation operation is performed on the initially encapsulated packet based on the PPPoE header and the Internet Protocol Tunneling (IPv6) header to obtain an uplink service packet, including:

[0108] If the initial encapsulated packet is found to carry a second extended segment identifier, a matching VRF instance is searched based on the PPPoE session header and forwarding IP information in the forwarding protocol stack of the uplink service packet. After stripping the IPv6 header and PPPoE header, the uplink service packet is obtained. The VPN tunnel is determined based on the VRF instance, and the VPN tunnel through which the uplink service packet is forwarded is then identified.

[0109] In some embodiments, the steps of the second decapsulation operation include:

[0110] After receiving the initial encapsulated message after the first decapsulation, the PPPoE server parses the second extension segment identifier in the message. According to the indication of the second extension segment identifier, the server gradually removes the redundant header information in the initial encapsulated message according to the corresponding encapsulation protocol rules, and finally obtains the uplink business message.

[0111] Furthermore, the server extracts key information from the uplink service packets, such as the session ID, source IP address, destination IP address, and port number carried in the PPPoE session. Based on the extracted key information, it searches and matches in the locally maintained VRF instance database. Each VRF instance corresponds to a specific matching rule and address range. The server determines the VRF instance to which the uplink service packet belongs by comparing the packet information with the rules of each VRF instance.

[0112] Furthermore, after determining the VRF instance to which the uplink service message belongs, the server obtains the pre-configured VPN parameters from the VRF instance, including the destination address of the VPN tunnel, encryption key, authentication method, etc. Based on the obtained VPN parameters, the server performs necessary processing on the uplink service message (such as encryption, encapsulation, etc.) and then sends it to the corresponding VPN channel for forwarding to achieve forwarding enhancement.

[0113] In one embodiment of this disclosure, the first decapsulation operation on the target encapsulated packet based on the IPsec encapsulation method further includes: performing the first decapsulation operation on the target encapsulated packet based on the configured decryption operation code Decryption.

[0114] In some embodiments, when the PPPoE server receives the target encapsulated packet, it identifies the opcode in the packet. Once the opcode is identified as "Decryption," the server retrieves the corresponding decryption rules and keys from its local configuration information based on the information indicated by the opcode. Then, following these rules and keys, the server performs the first decapsulation operation on the target encapsulated packet according to the standard procedure of IPsec encapsulation.

[0115] In this embodiment, by configuring the decryption operation code Decryption in the target encapsulated message and performing the first decapsulation operation on the target encapsulated message based on the operation code, the use of the operation code Decryption ensures that only the server with the correct decryption configuration can decapsulate the message, further enhancing data security.

[0116] As shown in Figure 5, a data forwarding enhancement method according to another embodiment of the present disclosure includes:

[0117] The host sends user service messages to the PPPoE client.

[0118] After receiving user service packets from the Ethernet interface, the PPPoE client encapsulates them according to PPPoE over IPv6.

[0119] The destination address of the outermost IPv6 packet header is PPPoE server END.PPPoE.X SID.

[0120] The IPsec policy of the PPPoE client is set to the IP of the flow of interest of END.PPPoE.X SID. When the PPPoE over IPv6 packet hits the IPsec policy, that is, after matching the IPsec policy, IPSec uses ESP encapsulation to protect the packet with ESP encryption, that is, ESP encapsulation.

[0121] PPPoE clients send data packets based on the IPv6 protocol layer, which is the encapsulated target message.

[0122] The PPPoE server's IPv6 protocol layer receives data packets, identifies the END.PPPoE.X SID carrying the Decryption Opcode, and performs ESP decapsulation on the encrypted traffic.

[0123] The PPPoE server decapsulates the IPv6 using the PPPoE over IPv6 method, locates the VRF instance, enters the pre-configured VPN tunnel, and enables VPN services.

[0124] As shown in Figure 5, a data forwarding enhancement method according to another embodiment of this disclosure includes:

[0125] The VPN tunnel sends service messages to the PPPoE server.

[0126] After receiving the service packet from the Ethernet interface, the PPPoE server encapsulates it according to PPPoE over IPv6.

[0127] The destination address of the outermost IPv6 packet header is PPPoE server END.PPPoE.X SID.

[0128] The IPsec policy of the PPPoE server is set to the IP of the flow of interest END.PPPoE.X SID. When a PPPoE over IPv6 packet hits the IPsec policy, that is, after matching the IPsec policy, IPSec uses ESP encapsulation to protect the packet with ESP encryption, that is, ESP encapsulation.

[0129] The PPPoE server sends data packets based on the IPv6 protocol layer, which is the target encapsulated message obtained by encapsulation.

[0130] The PPPoE client's IPv6 protocol layer receives data packets, identifies the END.PPPoE.X SID carrying the Decryption Opcode, and performs ESP decapsulation on the encrypted traffic.

[0131] The PPPoE client decapsulates the packet according to the PPPoE over IPv6 method and sends the decapsulated packet to the host.

[0132] In some embodiments, taking ESP encapsulation as an example, Figure 6 illustrates a forwarding protocol stack of a data forwarding enhancement scheme according to an embodiment of the present disclosure.

[0133] Among them, Data and private network service IP belong to user service packets, which are transmitted transparently between the PPPoE client and the server and will not be changed.

[0134] PPPoE encapsulation includes PPP, PPPoE Session header, and ETH header, which are encapsulated / decapsulated on the PPPoE client and server sides. ESP is the IPsec secure encapsulation header, which is transmitted between the PPPoE client and server sides and is encapsulated and decapsulated by the client / server.

[0135] Additionally, the source address is the IPv6 address obtained by the PPPoE client during dialing, the destination address is the END.PPPoE.X SID of the PPPoE server, ETH is the data link layer and PHY is the physical layer packet, belonging to OSI L1 and L2 encapsulation.

[0136] When data transmission is involved on the local link, if the IPv6 packet is transmitted over Ethernet, then 0x86DD will be used as its EtherType value. However, if the internet is connected via PPPoE dial-up, data transmission after the session is established will use 0x8864 to indicate that it is a PPPoE session frame.

[0137] In some embodiments, the PPPoE client receives uplink service packets sent by the host, performs PPPoE session-related processing in the PPPoE Session module, adds a PPPoE header, and then enters the ETH (Ethernet) module for Ethernet-related encapsulation processing. It then enters the IPv6 module for IPv6-related encapsulation, and subsequently enters the ESP module. The ESP protocol encapsulates the packets, adds an ESP header, and implements security functions such as encryption and authentication. After that, the packets are sent to the network through the underlying physical layer.

[0138] In some embodiments, on the PPPoE server, packets are received from the network, processed through the physical layer, etc., and first decapsulated in the ESP module to remove the ESP header and restore the data. Then, IPv6-related information is processed in the IPv6 module, Ethernet-related information is processed in the ETH module, and then PPPoE session-related content is processed in the PPPoE Session module to remove the PPPoE header and obtain the original user service packets. The private network service IP in the data is used to find the VRF instance and enter the VPN tunnel.

[0139] In this embodiment, based on the forwarding protocol stack, the network layer (OSI L3) related modules of the PPPoE client and server process IP address information. When configuring IPsec policies, they identify which IP address ranges of traffic belong to the flow of interest, so as to determine whether to apply IPsec policies in the future. The PPPoE Session module of the PPPoE client is responsible for adding PPPoE headers to identify PPPoE session information. The ETH module and IPv6 module perform Ethernet and IPv6 related encapsulation respectively, construct Internet Protocol tunnel header related information, complete the initial encapsulation of service packets, and form initial encapsulated packets. The PPPoE client, through the network layer's processing of IP addresses, determines whether the initial encapsulated packets hit the IPsec policy. If they do, the ESP module performs encryption, adds authentication information, and other operations on the initial encapsulation packets based on the IPsec encapsulation method (ESP protocol) to complete the final encapsulation and obtain the target encapsulated packets, ensuring the security of data during network transmission.

[0140] It should be noted that the above figures are merely illustrative of the processes included in the method according to exemplary embodiments of the present invention, and are not intended to be limiting. It is readily understood that the processes shown in the above figures do not indicate or limit the temporal order of these processes. Furthermore, it is readily understood that these processes may, for example, be executed synchronously or asynchronously in multiple modules.

[0141] The data forwarding enhancement apparatus 700 according to an embodiment of the present invention will now be described with reference to FIG7. The data forwarding enhancement apparatus 700 shown in FIG7 is merely an example and should not be construed as limiting the functionality and scope of the embodiments of the present invention.

[0142] The data forwarding enhancement device 700 is manifested as a hardware module. Components of the data forwarding enhancement device 700 may include, but are not limited to: a configuration module 702, used to configure the IP addresses of the flows of interest under the IPsec policy; a first encapsulation module 704, used to encapsulate the received uplink service packet sent by the host based on the PPPoE header and the Internet Protocol tunnel header to obtain an initial encapsulated packet; a second encapsulation module 706, used to determine that the initial encapsulated packet matches the IPsec policy based on the IP address, and encapsulate the initial encapsulated packet using the IPsec encapsulation method to obtain a target encapsulated packet, the target encapsulated packet carrying an opcode for decryption, the opcode instructing the PPPoE server to perform a first decapsulation operation on the target encapsulated packet using the IPsec encapsulation method; and a sending module 708, used to send the target encapsulated packet to the PPPoE server via the Internet Protocol tunnel, so that the PPPoE server can perform enhancement processing on the target encapsulated packet before forwarding it, the enhancement processing including the first decapsulation operation.

[0143] The data forwarding enhancement apparatus 800 according to an embodiment of the present invention will now be described with reference to FIG8. The data forwarding enhancement apparatus 800 shown in FIG8 is merely an example and should not be construed as limiting the functionality and scope of use of the embodiments of the present invention.

[0144] The data forwarding enhancement device 800 is manifested in the form of a hardware module. Components of the data forwarding enhancement device 800 may include, but are not limited to: a first decapsulation module 802, used to respond to a target encapsulated packet sent by a PPPoE client, and if an opcode for decryption is identified in the target encapsulated packet, perform a first decapsulation operation on the target encapsulated packet based on the IPsec encapsulation method to obtain an initial encapsulated packet; a second decapsulation module 804, used to perform a second decapsulation operation on the initial encapsulated packet based on the PPPoE header and the Internet Protocol tunnel header to obtain an uplink service packet; and a forwarding module 806, used to forward the uplink service packet.

[0145] Those skilled in the art will understand that various aspects of the present invention can be implemented as systems, methods, or program products. Therefore, various aspects of the present invention can be specifically implemented in the following forms: entirely hardware implementations, entirely software implementations (including firmware, microcode, etc.), or implementations combining hardware and software aspects, collectively referred to herein as “circuits,” “modules,” or “systems.”

[0146] The electronic device 900 according to this embodiment of the present invention will now be described with reference to FIG9. It may be a network device or a terminal. The electronic device 900 shown in FIG9 is merely an example and should not be construed as limiting the functionality and scope of use of the embodiments of the present invention.

[0147] As shown in Figure 9, the electronic device 900 is presented in the form of a general-purpose computing device. The components of the electronic device 900 may include, but are not limited to: at least one processing unit 910, at least one storage unit 920, and a bus 930 connecting different system components (including the storage unit 920 and the processing unit 910).

[0148] The storage unit stores program code that can be executed by the processing unit 910, causing the processing unit 910 to perform the steps described in the "Exemplary Methods" section of this specification according to various exemplary embodiments of the present invention. For example, the processing unit 910 can execute the scheme described in FIG1.

[0149] Storage unit 920 may include readable media in the form of volatile storage units, such as random access memory (RAM) 9201 and / or cache memory 9202, and may further include read-only memory (ROM) 9203.

[0150] Storage unit 920 may also include a program / utility 9204 having a set (at least one) program module 9205, such program module 9205 including but not limited to: operating system, one or more application programs, other program modules and program data, each or some combination of these examples may include an implementation of a network environment.

[0151] Bus 930 can represent one or more of several types of bus structures, including a memory cell bus or memory cell controller, a peripheral bus, a graphics acceleration port, a processing unit, or a local bus using any of the various bus structures.

[0152] Electronic device 900 can also communicate with one or more external devices 970 (e.g., keyboard, pointing device, Bluetooth device, etc.), and with one or more devices that enable a user to interact with electronic device 900, and / or with any device that enables electronic device 900 to communicate with one or more other computing devices (e.g., router, modem, etc.). This communication can be performed via input / output (I / O) interface 950. Furthermore, electronic device 900 can also communicate with one or more networks (e.g., local area network (LAN), wide area network (WAN), and / or public networks, such as the Internet) via network adapter 960. As shown, network adapter 960 communicates with other modules of electronic device 900 via bus 930. It should be understood that, although not shown in the figures, other hardware and / or software modules can be used in conjunction with electronic device 900, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.

[0153] From the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein can be implemented by software or by combining software with necessary hardware. Therefore, the technical solutions according to the embodiments of this disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (such as a CD-ROM, USB flash drive, external hard drive, etc.) or on a network, including several instructions to cause a computing device (such as a personal computer, server, terminal device, or network device, etc.) to execute the methods according to the embodiments of this disclosure.

[0154] In exemplary embodiments of this disclosure, a computer-readable storage medium is also provided, on which a program product capable of implementing the methods described above is stored. In some possible embodiments, various aspects of the invention may also be implemented as a program product comprising program code that, when the program product is run on an electronic device, causes the electronic device to perform the steps of the various exemplary embodiments of the invention described in the "Exemplary Methods" section above.

[0155] According to embodiments of the present invention, a program product for implementing the above-described method may employ a portable compact disc read-only memory (CD-ROM) and include program code, and may run on an electronic device, such as a personal computer. However, the program product of the present invention is not limited thereto. In this document, a readable storage medium may be any tangible medium containing or storing a program that may be used by or in conjunction with an instruction execution system, apparatus, or device.

[0156] The program product may employ any combination of one or more readable media. A readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of readable storage media (a non-exhaustive list) include: an electrical connection having one or more wires, a portable disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.

[0157] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, carrying readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A readable signal medium may also be any readable medium other than a readable storage medium, capable of sending, propagating, or transmitting programs for use by or in conjunction with an instruction execution system, apparatus, or device.

[0158] The program code contained on the readable medium may be transmitted using any suitable medium, including but not limited to wireless, wired, optical fiber, RF, etc., or any suitable combination thereof.

[0159] Program code for performing the operations of this invention can be written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Java and C++, and conventional procedural programming languages ​​such as C or similar languages. The program code can execute entirely on the user's computing device, partially on the user's device, as a standalone software package, partially on the user's computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving remote computing devices, the remote computing device can be connected to the user's computing device via any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computing device (e.g., via the Internet using an Internet service provider).

[0160] It should be noted that although several modules or units for the device used to perform actions have been mentioned in the detailed description above, this division is not mandatory. In fact, according to embodiments of this disclosure, the features and functions of two or more modules or units described above can be embodied in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided and embodied by multiple modules or units.

[0161] Furthermore, although the steps of the method in this disclosure are described in a specific order in the accompanying drawings, this does not require or imply that the steps must be performed in that specific order, or that all the steps shown must be performed to achieve the desired result. Additional or alternative steps may be omitted, multiple steps may be combined into one step, and / or a step may be broken down into multiple steps.

[0162] From the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein can be implemented by software or by combining software with necessary hardware. Therefore, the technical solutions according to the embodiments of this disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (such as a CD-ROM, USB flash drive, external hard drive, etc.) or on a network, including several instructions to cause a computing device (such as a personal computer, server, mobile terminal, or network device, etc.) to execute the methods according to the embodiments of this disclosure.

[0163] Other embodiments of this disclosure will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This disclosure is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this disclosure are indicated by the appended claims.

Claims

1. A data forwarding enhancement method, applied to a PPPoE client, comprising: Configure the IP addresses of the flows of interest in the IPsec policy; In response to the received uplink service message sent by the host, the uplink service message is encapsulated based on the PPPoE header and the Internet Protocol tunnel header to obtain an initial encapsulated message. Based on the IP address, it is determined that the initial encapsulated packet hits the IPsec policy. The initial encapsulated packet is then encapsulated using the IPsec encapsulation method to obtain a target encapsulated packet. The target encapsulated packet carries an opcode for decryption. The opcode is used to instruct the corresponding PPPoE server to perform a first decapsulation operation on the target encapsulated packet based on the IPsec encapsulation method. The target encapsulated packet is sent to the PPPoE server based on the Internet Protocol tunnel, so that the PPPoE server can enhance the target encapsulated packet before forwarding it. The enhancement process includes the first decapsulation operation.

2. The data forwarding enhancement method according to claim 1, wherein, Configure the IP addresses of the flows of interest for the IPsec policy, including: The IP address of the flow of interest configured with the IPsec policy based on the first extended segment identifier.

3. The data forwarding enhancement method according to claim 2, wherein, Determining whether the initially encapsulated packet matches the IPsec policy based on the IP address includes: The header of the Internet Protocol tunnel includes the destination address of the Internet Protocol tunnel. The destination address is determined based on the second extension segment identifier of the PPPoE server. If the second extension segment identifier matches the first extension segment identifier, the initial encapsulated packet is determined to hit the IPsec policy based on the IP address. The second extension segment identifier in the target encapsulated packet carries the opcode.

4. The data forwarding enhancement method according to claim 1, wherein, The initial encapsulated packet is encapsulated using the IPsec encapsulation method, including: The initial encapsulated packet is encapsulated by inserting the IPsec header after the Internet Protocol tunnel header and before the PPPoE header. The IPsec encapsulation method includes the Authentication Header (AH) protocol and / or the Encapsulation Security Payload (ESP) protocol, wherein the IPsec header includes the AH header and / or the ESP header.

5. The data forwarding enhancement method according to claim 4, wherein, The opcode is used to instruct the corresponding PPPoE server to perform a first decapsulation operation on the target encapsulated packet based on the IPsec encapsulation method, including: The opcode is used to instruct the PPPoE server to perform a first decapsulation operation on the target encapsulated message based on the AH protocol and / or the ESP protocol to obtain the initial encapsulated message.

6. The data forwarding enhancement method according to claim 3, wherein, The enhancement process also includes: The second extended segment identifier instructs the PPPoE server to perform a second decapsulation operation on the initially encapsulated packet to obtain the uplink service packet, and to find the virtual routing forwarding (VRF) instance to which the uplink service packet belongs, so as to send the uplink service packet into the corresponding VPN channel for forwarding based on the VPN parameters pre-configured in the VRF instance.

7. The data forwarding enhancement method according to claim 4, wherein, If the target encapsulated message is obtained based on the ESP protocol, the target encapsulated message further includes the ESP trailer and ESP verification data located at the end of the initial encapsulated message. The initial encapsulated message is then encapsulated using the IPsec encapsulation method to obtain the target encapsulated message, which further includes: If encapsulation is performed based on the AH protocol, the entire target encapsulated message is authenticated; If encapsulation is performed based on the ESP protocol, the target encapsulated message from the PPPoE header to the ESP tail is encrypted, and the target encapsulated message from the ESP header to the ESP tail is authenticated.

8. The data forwarding enhancement method according to claim 1, wherein, Also includes: In response to a downlink encapsulated message sent by the PPPoE server, the downlink encapsulated message is decapsulated based on the configured decryption behavior.

9. A data forwarding enhancement method, applied to a PPPoE server, comprising: In response to the target encapsulated packet sent by the PPPoE client, if the opcode carrying the decryption behavior is identified in the target encapsulated packet, the first decapsulation operation is performed on the target encapsulated packet based on the IPsec encapsulation method to obtain the initial encapsulated packet. Based on the PPPoE header and the Internet Protocol tunnel header, a second decapsulation operation is performed on the initial encapsulated message to obtain the uplink service message. The uplink service messages are forwarded.

10. The data forwarding enhancement method according to claim 9, wherein, The first decapsulation operation is performed on the target encapsulated packet based on the IPsec encapsulation method, including: The remaining number of routing segments in the target encapsulated packet is detected to be 0, and it is identified that the target encapsulated packet includes an IPsec header. Based on the IPsec service parameters carried in the IPsec header and the destination IP address, the corresponding IPsec security association record is searched. Remove the IPsec header based on the IPsec security association record.

11. The data forwarding enhancement method according to claim 10, wherein, The IPsec header includes an AH header and / or an ESP header, and the IPsec encapsulation method includes the AH protocol and / or the ESP protocol. If the target encapsulated packet is obtained based on the ESP protocol, the first decapsulation operation on the target encapsulated packet based on the IPsec encapsulation method further includes: The ESP trailer and ESP verification data at the end of the target encapsulated packet are removed based on the IPsec security association record.

12. The data forwarding enhancement method according to claim 9, wherein, Based on the PPPoE header and the Internet Protocol tunnel header, a second decapsulation operation is performed on the initially encapsulated message to obtain an uplink service message, including: If the initial encapsulated message is found to carry a second extended segment identifier, a matching VRF instance is searched based on the PPPoE session header and forwarding IP information in the forwarding protocol stack of the uplink service message, so as to obtain the uplink service message after stripping the Internet Protocol tunnel header and the PPPoE header. The VPN tunnel is determined based on the VRF instance, and the uplink service packets are forwarded through the VPN tunnel.

13. The data forwarding enhancement method according to claim 9, wherein, The first decapsulation operation based on the IPsec encapsulation method for the target encapsulated packet also includes: Based on the configured decryption behavior opcode, the target encapsulated message is subjected to a first decapsulation operation.

14. A data forwarding enhancement device, applied to a PPPoE client, comprising: The configuration module is used to configure the IP addresses of the flows of interest in the IPsec policy; The first encapsulation module is used to encapsulate the uplink service message received from the host based on the PPPoE header and the Internet Protocol tunnel header to obtain an initial encapsulated message. The second encapsulation module is used to determine that the initial encapsulated packet hits the IPsec policy based on the IP address, and to encapsulate the initial encapsulated packet based on the IPsec encapsulation method to obtain a target encapsulated packet. The target encapsulated packet carries an operation code for decryption. The operation code is used to instruct the corresponding PPPoE server to perform a first decapsulation operation on the target encapsulated packet based on the IPsec encapsulation method. The sending module is used to send the target encapsulated packet to the PPPoE server based on the Internet Protocol tunnel, so that the PPPoE server can perform enhancement processing on the target encapsulated packet and then forward it. The enhancement processing includes the first decapsulation operation.

15. A data forwarding enhancement device, applied to a PPPoE server, comprising: The first decapsulation module is used to respond to the target encapsulated packet sent by the PPPoE client. If the opcode carrying the decryption behavior is identified in the target encapsulated packet, the first decapsulation operation is performed on the target encapsulated packet based on the IPsec encapsulation method to obtain the initial encapsulated packet. The second decapsulation module is used to perform a second decapsulation operation on the initial encapsulated message based on the PPPoE header and the Internet Protocol tunnel header to obtain the uplink service message. The forwarding module is used to forward the uplink service messages.

16. A network device, comprising: processor; as well as Memory for storing the executable instructions of the processor; The processor is configured to execute the data forwarding enhancement method of any one of claims 1 to 8 or 9 to 13 by executing the executable instructions.

17. A computer-readable storage medium having a computer program stored thereon, said computer program, when executed by a processor, implementing the data forwarding enhancement method according to any one of claims 1 to 13.

18. A computer program product having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the data forwarding enhancement method according to any one of claims 1 to 13.