Data forwarding method and apparatus, and communication device and storage medium
By using segment identification opcodes between the PPPoE client and the server for data forwarding and processing, the problem of complex and low efficiency of forwarding configuration across three-layer routing devices in the prior art is solved, and the effect of simplifying configuration and improving communication efficiency is achieved.
Patent Information
- Application Number
- PCT/CN2024/108768
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-09-28
- Filing Date
- 2024-07-31
- Publication Date
- 2025-06-05
AI Technical Summary
In the new metropolitan area network, the PPPoE server side and the PPPoE client are usually not on the same layer 2 network, resulting in data forwarding of routing devices such as Spine and Leaf across layer 3. The existing technology uses SRV6 technology to realize a large layer 2 network across Leaf and Spine groups, with complex configurations and low communication efficiency.
By defining a new segment identification opcode (such as END.PPPoE.X) between the PPPoE client and the server, this opcode is used to instruct the PPPoE server to perform packet processing and decapsulation, and to process it based on user data surface information and layer 3 VPN forwarding tables to realize PPPoE over SRv6 communication.
The configuration process is simplified and the PPPoE client can form a VPN through the Overlay layer three network, avoiding the hidden danger of broadcast storms, and improving communication efficiency and network networking efficiency.
Smart Images

Figure CN2024108768_05062025_PF_FP_ABST
Abstract
Description
Data forwarding method, device, communication equipment and storage medium
[0001] Related applications
[0002] This application claims priority to Chinese patent application number 2023112850449, filed on September 28, 2023, entitled “Data forwarding method, device, communication equipment and storage medium,” the entire text of which is hereby incorporated by reference. Technical Field
[0003] The present application relates to the field of communication network technology, and in particular to a data forwarding method, apparatus, communication equipment, storage medium, and computer program product. Background Art
[0004] With the rapid development of communications technology, users are increasingly demanding virtual network access. PPPoE (Point-to-Point Protocol Over Ethernet) dial-up VPNs require a Layer 2 network between the PPPoE client and the PPPoE server. However, in modern metropolitan area networks (MANs), the PPPoE server and client are not naturally on the same Layer 2 network, requiring Layer 3 routing devices such as spine and leaf nodes.
[0005] In related technologies, SRV6 (Segment Routing IPv6, segment routing based on the IPv6 forwarding plane) technology is used to implement a large Layer 2 network across Leaf and SPINE groups. The configuration is relatively complex, resulting in low communication efficiency.
[0006] Summary of the Invention
[0007] Based on this, it is necessary to provide a data forwarding method, apparatus, communication equipment, computer-readable storage medium and computer program product to address the above technical issues.
[0008] In a first aspect, the present application provides a data forwarding method, applied to a PPPoE client, the method comprising:
[0009] Determining a source address of an Internet Protocol tunnel based on a local address of the PPPoE client, and determining a destination address of the Internet Protocol tunnel based on an address of a PPPoE server, wherein the address of the PPPoE server includes a segment identification operation code, and the segment identification operation code is used to instruct the PPPoE server to perform message processing;
[0010] Encapsulating the user data message based on the PPPoE header and the Internet Protocol header to obtain an encapsulated data message; and
[0011] The encapsulated data message is sent to the PPPoE server through the Internet Protocol tunnel, so that the PPPoE server performs processing based on the encapsulated data message.
[0012] In one embodiment, the segment identification opcode is further used to:
[0013] Instructing the PPPoE server to decapsulate the encapsulated data message to obtain user data plane information; and
[0014] The user data message is processed based on the user data plane information and the Layer 3 VPN forwarding table.
[0015] In one embodiment, the segment identification operation code is END.PPPoE.X.
[0016] In one embodiment, the segment identification operation code is End.DX3PPPoE.
[0017] In one embodiment, determining the source address of the Internet Protocol tunnel based on the local address of the PPPoE client, and determining the destination address of the Internet Protocol tunnel based on the address of the PPPoE server, includes:
[0018] determining the local address of the PPPoE client as the source address of the Internet Protocol tunnel; and
[0019] The address of the PPPoE server carrying the segment identification operation code is determined to be the destination address of the Internet Protocol tunnel.
[0020] In one embodiment, encapsulating the user data message based on the PPPoE header and the Internet Protocol header to obtain the encapsulated data message includes:
[0021] Encapsulating the user data message based on the PPPoE header to obtain a first data message; and
[0022] The first data message is encapsulated through an Internet Protocol header to obtain the encapsulated data message.
[0023] In one embodiment, encapsulating the user data message based on the PPPoE header to obtain a first data message includes:
[0024] Add the fields of the PPPoE header to the header position of the user data message to obtain the first data message, or
[0025] A plurality of bytes are added to the header position of the user data message, and data corresponding to the PPPoE header are respectively written into the plurality of bytes added to the user data message to obtain the first data message.
[0026] In one embodiment, encapsulating the first data message through an Internet Protocol header to obtain the encapsulated data message includes:
[0027] Add the fields of the Internet Protocol header to the header position of the first data message to obtain the encapsulated data message, or
[0028] A plurality of bytes are added to the header position of the first data message, and the data corresponding to the Internet Protocol header are written into the plurality of bytes added to the first data message, so as to obtain the encapsulated data message.
[0029] In a second aspect, the present application provides a data forwarding method, applied to a PPPoE server, the method comprising:
[0030] Receive encapsulated data packets sent by the PPPoE client;
[0031] When it is determined that the destination address of the Internet Protocol tunnel corresponding to the encapsulated data packet is the local address of the PPPoE server, decapsulating the encapsulated data packet based on the segment identification operation code in the destination address to obtain a user data packet and user data plane information; and
[0032] The user data message is forwarded based on the user data plane information.
[0033] In one embodiment, the decapsulating the encapsulated data message to obtain the user data message includes:
[0034] The Internet Protocol header and the PPPoE header contained in the encapsulated data message are removed to obtain the user data message.
[0035] In one embodiment, the forwarding processing of the user data packet based on the user data plane information includes:
[0036] Determining the VRF instance corresponding to the user data plane information based on a pre-configured correspondence between the user data plane information and the VRF instance; and
[0037] The Layer 3 VPN forwarding table is queried through the VRF instance to determine a target VPN channel, and the user data message is forwarded to the target VPN channel.
[0038] In a third aspect, the present application further provides a data forwarding device, applied to a PPPoE client, the device comprising:
[0039] a first determining module, configured to determine a source address of an Internet Protocol tunnel based on a local address of the PPPoE client, and to determine a destination address of the Internet Protocol tunnel based on an address of a PPPoE server; the address of the PPPoE server including a segment identification operation code; the segment identification operation code being used to instruct the PPPoE server to perform message processing;
[0040] A first encapsulation module is configured to encapsulate the user data message based on the PPPoE header and the Internet Protocol header to obtain an encapsulated data message; and
[0041] The first sending module is used to send the encapsulated data message to the PPPoE server through the Internet Protocol tunnel, so that the PPPoE server processes based on the encapsulated data message.
[0042] In a fourth aspect, the present application further provides a data forwarding device, applied to a PPPoE server, the device comprising:
[0043] A first receiving module, configured to receive an encapsulated data message sent by a PPPoE client;
[0044] a decapsulation module configured to, when determining that the destination address of the Internet Protocol tunnel corresponding to the encapsulated data message is the local address of the PPPoE server, decapsulate the encapsulated data message based on the segment identification operation code in the destination address to obtain a user data message and user data plane information; and
[0045] An access module is used to forward the user data message based on the user data plane information.
[0046] In a fifth aspect, the present application further provides a communication device, including:
[0047] a processor configured to determine a source address of an Internet Protocol tunnel based on a local address of a PPPoE client, and to determine a destination address of the Internet Protocol tunnel based on an address of the PPPoE server; the address of the PPPoE server including a segment identification operation code; the segment identification operation code being configured to instruct the PPPoE server to perform message processing;
[0048] The processor is further configured to encapsulate the user data message based on the PPPoE header and the Internet Protocol header to obtain an encapsulated data message; and
[0049] A transmitter is used to send the encapsulated data message to the PPPoE server through the Internet Protocol tunnel, so that the PPPoE server processes based on the encapsulated data message.
[0050] In a sixth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the following steps:
[0051] The invention relates to a method for determining a source address of an Internet Protocol tunnel based on a local address of a PPPoE client, and a destination address of the Internet Protocol tunnel based on an address of the PPPoE server; wherein the address of the PPPoE server includes a segment identification operation code; wherein the segment identification operation code is used to instruct the PPPoE server to perform message processing; encapsulating a user data message based on a PPPoE header and an Internet Protocol header to obtain an encapsulated data message; and sending the encapsulated data message to the PPPoE server through the Internet Protocol tunnel, so that the PPPoE server performs processing based on the encapsulated data message.
[0052] In a seventh aspect, the present application further provides a computer program product. The computer program product includes a computer program that, when executed by a processor, implements the following steps:
[0053] The invention relates to a method for determining a source address of an Internet Protocol tunnel based on a local address of a PPPoE client, and a destination address of the Internet Protocol tunnel based on an address of the PPPoE server; wherein the address of the PPPoE server includes a segment identification operation code; wherein the segment identification operation code is used to instruct the PPPoE server to perform message processing; encapsulating a user data message based on a PPPoE header and an Internet Protocol header to obtain an encapsulated data message; and sending the encapsulated data message to the PPPoE server through the Internet Protocol tunnel, so that the PPPoE server performs processing based on the encapsulated data message.
[0054] The details of one or more embodiments of the present application are set forth in the accompanying drawings and the description below. Other features, objects, and advantages of the present application will become apparent from the description, drawings, and claims. BRIEF DESCRIPTION OF THE DRAWINGS
[0055] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the conventional technology, the following briefly introduces the drawings required for use in the embodiments or the conventional technology descriptions. Obviously, the drawings described below are merely embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on the disclosed drawings without any creative work.
[0056] FIG1 is a diagram showing an application environment of a data forwarding method according to an embodiment.
[0057] FIG2 is a schematic flow chart of a data forwarding method in one embodiment.
[0058] FIG3 is a flow chart of steps for determining a source address and a destination address in one embodiment.
[0059] FIG4 is a flow chart of message processing steps in one embodiment.
[0060] FIG5 is a flow chart showing steps of forwarding data packets through a VRF instance in one embodiment.
[0061] FIG6 is a schematic structural diagram of a data forwarding method in another embodiment.
[0062] FIG7 is a structural block diagram of a data forwarding device in one embodiment.
[0063] FIG8 is a structural block diagram of a data forwarding device in one embodiment.
[0064] FIG9 is a diagram showing the internal structure of a communication device in one embodiment. DETAILED DESCRIPTION
[0065] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.
[0066] Figure 1 is a schematic diagram of an application scenario of a data forwarding method provided in an embodiment of the present application. As shown in Figure 1, the scenario includes a PPPoE client 100 and a PPPoE server 200. The PPPoE client 100 is connected to the PPPoE server 200, and data can be transmitted between the PPPoE client 100 and the PPPoE server via a network.
[0067] The PPPoE client 100 may be a wireless terminal, which may be a device that provides voice and / or other service data connectivity to a user, or a handheld device with wireless connection capabilities, or other processing devices connected to a wireless modem. The wireless terminal may communicate with one or more core networks via a Radio Access Network (RAN). The wireless terminal may be a mobile terminal, such as a mobile phone (or "cellular" phone) and a computer with a mobile terminal. For example, the wireless terminal may be a portable, pocket-sized, handheld, computer-built-in, or vehicle-mounted mobile device that exchanges voice and / or data with the radio access network. The wireless terminal may also be referred to as a system, subscriber unit, subscriber station, mobile station, mobile station, remote station, remote terminal, access terminal, user terminal, user agent, or user device or user equipment, without limitation herein.
[0068] Traditionally, establishing a VPN through PPPoE dial-up requires the PPPoE client and the PPPoE server to establish a large Layer 2 network. Consequently, the process of network access through PPPoE presents numerous issues, including complex configuration, difficult cutover, and potential Layer 2 broadcast storms.
[0069] Based on the above-mentioned traditional technology, the embodiment of the present application provides a data forwarding method, that is, a method for implementing PPPoE over SRv6. The data forwarding method provided by the embodiment of the present application can newly define a segment identification operation code (which can be recorded as SID opcode, system identifier operation code), and the segment identification operation code can be END.PPPoE.X. The segment identification operation code can indicate the decapsulation processing of the PPPoE over IPv6 / SRV6 message, and based on the VRF (Virtual Routing and Rorwarding, virtual routing forwarding) instance associated with the PPPoE session, forward the message to the interface for VPN processing. Through the above-mentioned message processing method, the original UP pool / MSE large two-layer VPN establishment method can be expanded to support three-layer VPN establishment, and the PPPoE client can be enabled to establish a VPN through the Overlay three-layer network, simplifying the network configuration process, avoiding broadcast storm risks, and improving the communication efficiency with the network.
[0070] It should be noted that the beneficial effects or technical problems solved by the embodiments of the present application are not limited to this one, but may also include other implicit or related problems. For details, please refer to the description of the following embodiments.
[0071] The following specific embodiments describe in detail the technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below in conjunction with the accompanying drawings.
[0072] In one embodiment, as shown in FIG2 , a data forwarding method is provided, which is described by taking the method applied to the PPPoE client in FIG1 as an example, and includes the following steps:
[0073] S202: Determine a source address of the Internet Protocol tunnel based on the local address of the PPPoE client, and determine a destination address of the Internet Protocol tunnel based on the address of the PPPoE server.
[0074] The PPPoE server address includes a segment identification operation code, which is used to instruct the PPPoE server to process the message. The local address can be the communication address of the PPPoE client, which can be the MAC address of the PPPoE client, the IP address of the PPPoE client, or the IP address and port number of the PPPoE client. The IP address can be an IPv4 address, an IPv6 address, or the like. The Internet Protocol tunnel can be a communication tunnel based on the Internet Protocol, such as an IPv4 tunnel, an IPv6 tunnel, or the like. The PPPoE server address can be determined based on the communication address of the PPPoE server and the segment identification operation code, which can be the MAC address of the PPPoE server, the IP address of the PPPoE server, or the IP address and port number of the PPPoE server.
[0075] Specifically, the PPPoE client can obtain the address of the local PPPoE client, determine the obtained local address as the source address of the Internet Protocol tunnel, and obtain the address of the PPPoE server connected to the PPPoE client, and determine the address of the PPPoE server as the destination address of the Internet Protocol tunnel.
[0076] S204: Encapsulate the user data message based on the PPPoE header and the Internet Protocol header to obtain an encapsulated data message.
[0077] Among them, the PPPoE header can be a header field that represents data transmission through the PPPoE protocol, which can be added to the header position of the data message. The Internet Protocol header can be a field of the IPv6 header, or it can also be a field of the IPv4 header, which is used to represent the transmission of the message through the Internet Protocol tunnel.
[0078] Specifically, after the PPPoE client determines the source address and destination address of the Internet Protocol tunnel, the PPPoE client can encapsulate the user data packet to be transmitted based on the PPPoE header and the Internet Protocol header to obtain an encapsulated data packet. In one example, the PPPoE client can receive a user data packet sent by a user device, which can be a data packet for accessing a virtual private network, or a data packet for communicating with a virtual private network.
[0079] S206: Send the encapsulated data message to the PPPoE server through the Internet Protocol tunnel, so that the PPPoE server processes the encapsulated data message.
[0080] Specifically, after receiving the encapsulated data packet, the PPPoE client can transmit the encapsulated data packet through the determined source address and destination address of the Internet Protocol tunnel. The PPPoE client can transmit the encapsulated data packet to the PPPoE server via the Internet Protocol tunnel corresponding to the IPv4 network; the PPPoE client can also transmit the encapsulated data packet to the PPPoE server via the Internet Protocol tunnel corresponding to the IPv6 network. Thus, after receiving the encapsulated data packet, the PPPoE server can, upon determining that the destination address of the encapsulated data packet contains a segment identification operation code, perform message processing to achieve access to the virtual private network.
[0081] In the above-mentioned data forwarding method, the source address of the Internet Protocol tunnel is determined based on the local address of the PPPoE client, and the destination address of the Internet Protocol tunnel is determined based on the address of the PPPoE server. The address of the PPPoE server includes a segment identification operation code, which is used to instruct the PPPoE server to perform message processing. The user data message is encapsulated based on the PPPoE header and the Internet Protocol header to obtain an encapsulated data message. The encapsulated data message is sent to the PPPoE server via the Internet Protocol tunnel, so that the PPPoE server can process the data message based on the encapsulated data message. By adopting this method, the configuration process can be simplified, PPPoE over SRv6 communication can be implemented, and communication efficiency can be improved.
[0082] In one embodiment, the segment identification operation code is further used to instruct the PPPoE server to decapsulate the encapsulated data message, obtain user data plane information, and process the user data message based on the user data plane information and the Layer 3 VPN forwarding table.
[0083] Specifically, if the PPPoE server determines that the destination address corresponding to the encapsulated data packet contains a segment identification operation code, the PPPoE server can decapsulate the received encapsulated data packet, remove the Internet Protocol header and the PPPoE header contained in the encapsulated data packet, and obtain the user data plane information contained in the user data packet. Based on this, the PPPoE server can perform message processing on the user data packet based on the user data plane information and a preset Layer 3 VPN forwarding table.
[0084] In this embodiment, by carrying the segment identification operation code in the destination address of the message, the PPPoE server that receives the message can decapsulate the received message based on the instruction of the segment identification operation code, thereby realizing PPPoE over SRv6 communication, improving the efficiency of network establishment and the reliability of network transmission data.
[0085] In one embodiment, the segment identification opcode is End.DX3PPPoE.
[0086] Specifically, a specific embodiment of the segment identification operation code carried in the destination address of the user data packet may be End.DX3PPPoE (Decapsulation and PPPoE L3VPN table lookup, supporting decapsulation of packets). The segment identification operation code can be broken down into END+D+X3PPPOE, where D indicates support for decapsulation processing and X3PPPOE indicates a cross-connection. The PPPoE server can query the Layer 3 VPN forwarding table based on the PPPoE session information.
[0087] In this embodiment, by carrying the segment identification operation code in the destination address of the message, the PPPoE server that receives the message can decapsulate the received message based on the instruction of the segment identification operation code, thereby realizing PPPoE over SRv6 communication, improving the efficiency of network establishment and the reliability of network transmission data.
[0088] In one embodiment, as shown in FIG3 , the specific processing of S202 “determining the source address of the Internet Protocol tunnel based on the local address of the PPPoE client, and determining the destination address of the Internet Protocol tunnel based on the address of the PPPoE server” includes:
[0089] S302: Determine the local address of the PPPoE client as the source address of the Internet Protocol tunnel.
[0090] Among them, the source address of the Internet Protocol tunnel can be the address of the data sending end of the Internet Protocol tunnel, the local address of the PPPoE client can be the communication address of the PPPoE client, the communication address of the PPPoE client can be the MAC address of the PPPoE client, the IP address of the PPPoE client, or the IP address and port number of the PPPoE client.
[0091] Specifically, when receiving a user data packet, the PPPoE client can determine the local address of the PPPoE client as the source address of the Internet Protocol tunnel, that is, determine the communication address of the PPPoE client as the source address of the Internet Protocol tunnel. In other words, the PPPoE client can use the local address of the PPPoE client as the source address of the Internet Protocol tunnel.
[0092] S304: Determine that the address of the PPPoE server carrying the segment identification operation code is the destination address of the Internet Protocol tunnel.
[0093] The address of the PPPoE server may be a communication address of the PPPoE server, and the communication address of the PPPoE server may be a MAC address of the PPPoE server, an IP address of the PPPoE server, or an IP address and port number of the PPPoE server.
[0094] Specifically, the PPPoE client can obtain the address of the PPPoE server and the segment identification operation code, and add the segment identification operation code to the address of the PPPoE server to obtain the address of the PPPoE server carrying the segment identification operation code. In this way, the PPPoE client can use the PPPoE server address containing the segment identification operation code as the destination address of the Internet Protocol tunnel.
[0095] In this embodiment, the source address of the Internet Protocol tunnel is determined by the address of the PPPoE client, and the destination address of the Internet Protocol tunnel is determined by the address of the PPPoE server and the segment identification operation code. This can realize the transmission of user data packets through the PPPoE protocol and the Internet Protocol tunnel, simplify the configuration process of network access through PPPoE, simplify cutover, avoid problems such as Layer 2 broadcast storms, and improve communication quality.
[0096] In one embodiment, the specific processing of S204 "encapsulating the user data message based on the PPPoE header and the Internet Protocol header to obtain an encapsulated data message" includes:
[0097] The user data message is encapsulated based on the PPPoE header to obtain a first data message, and the first data message is encapsulated through the Internet Protocol header to obtain an encapsulated data message.
[0098] Specifically, after receiving a user data message, the PPPoE client obtains a PPPoE header and encapsulates the user data message using the PPPoE header to obtain a first data message. The specific encapsulation process may be that the PPPoE client may add fields from the PPPoE header to the header of the user data message, or may add multiple bytes to the header of the user data message and write data corresponding to the PPPoE header into the multiple bytes added to the user data message to obtain the first data message. The PPPoE client may encapsulate the first data message based on the Internet Protocol header. The specific encapsulation process may be that the PPPoE client may add fields from the Internet Protocol header to the header of the first data message, or may add multiple bytes to the header of the first data message and write data corresponding to the Internet Protocol header into the multiple bytes added to the first data message to obtain an encapsulated data message.
[0099] In one example, a PPPoE client encapsulates a received user data packet based on a PPPoE header and an Internet Protocol header. The process may include: after receiving the user data packet, the PPPoE client obtains the Internet Protocol header and encapsulates the user data packet using the Internet Protocol header to obtain a first data packet. Specifically, the PPPoE client may add fields from the Internet Protocol header to the header of the user data packet, or may add multiple bytes to the header of the user data packet and write data corresponding to the Internet Protocol header into the multiple bytes added to the user data packet to obtain the first data packet. The PPPoE client may encapsulate the first data packet based on the PPPoE header. Specifically, the PPPoE client may add fields from the PPPoE header to the header of the first data packet, or may add multiple bytes to the header of the first data packet and write data corresponding to the PPPoE header into the multiple bytes added to the first data packet to obtain the encapsulated data packet.
[0100] In this embodiment, the user data message is encapsulated through the PPPoE header and the Internet Protocol header, which can improve the efficiency of network establishment and the reliability of network transmission data by PPPoE over SRv6 communication.
[0101] In one embodiment, the method further comprises:
[0102] Based on the address configuration operation on the PPPoE client, obtain the address of the PPPoE server corresponding to the address configuration operation;
[0103] The address configuration operation on the PPPoE client may be an operation of performing address configuration on the PPPoE client, for example, an operation of configuring the address of the PPPoE server corresponding to the PPPoE client on the PPPoE client.
[0104] Specifically, the user equipment (operation and maintenance personnel) can configure the address of the PPPoE server on the PPPoE client and perform an address configuration operation. In response to the address configuration operation, the PPPoE client can obtain the address information carried by the address configuration operation and determine the address information as the address of the PPPoE server.
[0105] In this embodiment, the address of the PPPoE server is configured by performing an address configuration operation on the PPPoE client, thereby improving the convenience of address configuration.
[0106] In one embodiment, the method further comprises:
[0107] Receive the target address sent by the remote network element, and determine the received target address as the address of the PPPoE server.
[0108] The remote network element may be a functional network element that is connected to the PPPoE client for communication. For example, the remote network element may be a configuration network element for configuring the address of the PPPoE server.
[0109] Specifically, after establishing a communication connection with the PPPoE client, the remote network element may send a message to the PPPoE client containing the address of the PPPoE server corresponding to the PPPoE client, for example, a message containing a target address may be sent to the PPPoE client. Upon receiving the message, the PPPoE client may determine the target address carried in the message as the address of the PPPoE server.
[0110] In this embodiment, the address of the PPPoE server is determined by receiving the address sent by the remote network element, which can enrich the determination method of the PPPoE server and ensure the diversification of the address configuration of the PPPoE server.
[0111] In one embodiment, as shown in FIG4 , a data forwarding method is provided. This embodiment applies the method to a PPPoE server. The data forwarding method includes:
[0112] S402: Receive an encapsulated data message sent by a PPPoE client.
[0113] Specifically, the PPPoE client can send encapsulated data packets to the PPPoE server through the Internet Protocol tunnel, and the PPPoE server can receive the encapsulated data packets sent by the PPPoE client through the Internet Protocol tunnel.
[0114] S404: When it is determined that the destination address of the Internet Protocol tunnel corresponding to the encapsulated data message is the local address of the PPPoE server, the encapsulated data message is decapsulated based on the segment identification operation code in the destination address to obtain the user data message and user data plane information.
[0115] Among them, the segment identification operation code is used to instruct the PPPoE server to perform message processing, that is, the segment identification operation code is used to instruct the PPPoE server to decapsulate the encapsulated data message, obtain user data plane information, and process the user data message based on the user data plane information and the 3-layer VPN forwarding table.
[0116] Specifically, when the PPPoE server determines that the destination address of the Internet Protocol tunnel corresponding to the encapsulated data packet is the local address of the PPPoE server, that is, when the PPPoE server determines that the destination address corresponding to the encapsulated data packet is consistent with the local address of the PPPoE server, the PPPoE server can decapsulate the received encapsulated data packet based on the segment identification operation code included in the destination address, remove the Internet Protocol header and PPPoE header included in the encapsulated data packet, and obtain the user data packet and user data plane information. Based on this, the PPPoE server can perform message processing on the user data packet based on the user data plane information and a preset Layer 3 VPN forwarding table.
[0117] In this embodiment, by carrying the segment identification operation code in the destination address, the PPPoE server that receives the message can decapsulate the received message based on the instruction of the segment identification operation code, thereby realizing PPPoE over SRv6 communication, improving the efficiency of network establishment and the reliability of network transmission data.
[0118] S406: Forward the user data message based on the user data plane information.
[0119] Specifically, after the PPPoE server decapsulates the encapsulated data message, it can obtain user data plane information and user data message. The PPPoE server can forward the user data message based on the user data plane information and the 3-layer VPN forwarding table to access the virtual private network.
[0120] In this embodiment, the configuration process can be simplified, PPPoE over SRv6 communication can be implemented, and communication efficiency can be improved.
[0121] In one embodiment, the specific process of S404 "decapsulating the encapsulated data message to obtain the user data message" includes:
[0122] The Internet Protocol header and the PPPoE header contained in the encapsulated data message are removed to obtain a user data message.
[0123] Among them, the PPPoE header can be a header field that represents data transmission through the PPPoE protocol, which can be added to the header position of the data message. The Internet Protocol header can be a field of the IPv6 header, or it can also be a field of the IPV4 header, which is used to represent the transmission of the message through the Internet Protocol tunnel.
[0124] Specifically, the process of the PPPoE server decapsulating the encapsulated data message may be that the PPPoE server removes the Internet Protocol header and the PPPoE header contained in the encapsulated data message, and removes the encapsulated data message of the Internet Protocol header and the PPPoE header, that is, obtains the user data message and the user data plane information.
[0125] In this embodiment, the encapsulated data message can be decapsulated by the instruction of the segment identification operation code, thereby realizing PPPoE over SRv6 communication and improving the communication quality and the efficiency of network establishment.
[0126] In one embodiment, as shown in FIG5 , the specific processing of S “forwarding the user data message based on the user data plane information” includes:
[0127] S502: Determine the VRF instance corresponding to the user data plane information based on a pre-configured correspondence between the user data plane information and the VRF instance.
[0128] Among them, the user data plane information may include one or more of Session ID (task identification information), MAC address, IP address, and VLAN information. The correspondence between the pre-configured user data plane and the VRF instance may be data pre-stored in the storage space corresponding to the PPPoE server. The correspondence may be a mapping relationship between the user data plane information and the VRF instance.
[0129] Specifically, the PPPoE server can query the pre-configured correspondence between user data plane information and VRF instances to determine whether the user data plane information corresponding to the user data packet exists. If the PPPoE server finds the user data plane information corresponding to the user data packet in the pre-configured correspondence between user data plane information and VRF instances, the PPPoE server determines the VRF instance corresponding to the queried user data plane information as the VRF instance corresponding to the user data packet.
[0130] In one example, during the PPPoE negotiation phase, the Serving GateWay (SGW) authenticates the PPPoE client's username and password. Upon successful authentication, it assigns an IP address to the PPPoE client and queries the VRF instance associated with the PPPoE client. If a VRF instance is found, the SGW creates a mapping table between user data plane information and VRF instances. This user data plane information can include one or more of the following: Session ID, MAC address, IP address, and VLAN information.
[0131] S504: query the Layer 3 VPN forwarding table through the VRF instance, determine the target VPN channel, and forward the user data packet to the target VPN channel.
[0132] The Layer 3 VPN forwarding table may be a data table pre-stored in a storage space of the PPPoE server.
[0133] Specifically, based on the retrieved VRF instance, the PPPoE server can query the Layer 3 VPN forwarding table for the VPN channel corresponding to the VRF instance. The PPPoE server can then determine the VPN channel corresponding to the VRF instance as the target VPN channel. The PPPoE server can then forward the user data packet through the target VPN channel. Specifically, the PPPoE server can forward the user data packet to the target VPN channel, enabling communication between the client corresponding to the user data packet and the virtual private network, thereby enabling the client corresponding to the user data packet to access the virtual private network.
[0134] In this embodiment, the efficiency of establishing a communication network is improved, and the communication quality and efficiency between the client and the virtual private network are guaranteed.
[0135] In one embodiment, the segment identification opcode is End.DX3PPPoE.
[0136] Specifically, a specific embodiment of the segment identification operation code carried in the destination address of the user data packet may be End.DX3PPPoE (Decapsulation and PPPoE L3VPN table lookup, supporting decapsulation of packets). The segment identification operation code can be broken down into END+D+X3PPPOE, where D indicates support for decapsulation processing and X3PPPOE indicates a cross-connection. The PPPoE server can query the Layer 3 VPN forwarding table based on the PPPoE session information.
[0137] In this embodiment, by carrying the segment identification operation code in the destination address of the message, the PPPoE server that receives the message can decapsulate the received message based on the instruction of the segment identification operation code, thereby realizing PPPoE over SRv6 communication, improving the efficiency of network establishment and the reliability of network transmission data.
[0138] In one embodiment, FIG6 provides an interactive flow chart of a data forwarding method. As shown in FIG6 , the method includes a PPPoE client and a PPPoE server, and the method includes the following steps:
[0139] The data forwarding method provided in the embodiment of the present application can be an implementation method of PPPoE over SRv6. In this embodiment, a new SID opcode, namely END.PPPoE.X, is added. This SID opcode can decapsulate the PPPoE over IPV6 / SRV6 message and forward it to the corresponding interface for VPN processing based on the VRF associated with the PPPoE session, thereby supporting three-layer VPN.
[0140] The PPPoE client communicates with the PPPoE server through PPPoE over IPV6, completes PPPoE dial-up and authentication, and obtains a service address. The PPPoE client can encapsulate the user data message payload in the form of IPv4 / IPv6 with the PPPoE header and the Internet Protocol header (IPv6 header) to obtain an encapsulated data message, where the destination address DA = PPPoE server END.PPPoE.XSID; the source address SA = PPPoE client IPv6.
[0141] The PPPoE client can send encapsulated data packets to the PPPoE server through the network, decapsulate the encapsulated data packets, obtain the user data packet payload in the form of IPv4 / IPv6, and find the VRF instance based on the user data plane information, enter the VPN channel, and realize communication with the virtual private network.
[0142] Specifically, the PPPoE client can initiate a VPN service request using the obtained service address. After receiving the request, the PPPoE server finds that the destination SID is a local address, and then performs corresponding operations based on the opcode END.PPPoE.X carried in the destination SID, including: correlating and searching the user domain name and VRF, RD, RT and other information carried by the PPPoE session, stripping the IPV6 header and PPPoE header, searching for the VRF instance, entering the pre-configured VPN channel, and implementing the VPN service.
[0143] The data forwarding method provided in this embodiment proposes a destination address containing a SID opcode. The SID opcode may be END.PPPoE.X. The SID opcode can decapsulate the PPPoE over IPV6 / SRV6 message and forward it to the corresponding interface for VPN processing based on the VRF, RD, and RT values associated with the PPPoE session. This enables the PPPoE client to establish a VPN through the overlay three-layer network.
[0144] It should be understood that, although the various steps in the flowcharts involved in the various embodiments described above are displayed in sequence according to the instructions of the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and these steps can be executed in other orders. Moreover, at least a portion of the steps in the flowcharts involved in the various embodiments described above can include multiple steps or multiple stages, and these steps or stages are not necessarily executed and completed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a portion of steps or stages in other steps.
[0145] Based on the same inventive concept, embodiments of the present application further provide a data forwarding device for implementing the aforementioned data forwarding method. The implementation solution provided by this device is similar to the implementation solution described in the aforementioned method. Therefore, the specific limitations in one or more data forwarding device embodiments provided below can be found in the above-described limitations on the data forwarding method and are not further elaborated here.
[0146] In one embodiment, as shown in FIG. 7 , a data forwarding device 700 is provided, which is applied to a PPPoE client and includes: a first determining module 702 , a first encapsulating module 704 , and a first sending module 706 , wherein:
[0147] a first determining module 702 configured to determine a source address of an Internet Protocol tunnel based on a local address of the PPPoE client, and a destination address of the Internet Protocol tunnel based on an address of the PPPoE server, wherein the address of the PPPoE server includes a segment identification operation code, and the segment identification operation code is used to instruct the PPPoE server to perform message processing;
[0148] A first encapsulation module 704 is configured to encapsulate the user data message based on the PPPoE header and the Internet Protocol header to obtain an encapsulated data message;
[0149] The first sending module 706 is configured to send the encapsulated data message to the PPPoE server through the Internet Protocol tunnel, so that the PPPoE server processes the encapsulated data message.
[0150] In one embodiment, the first determining module is specifically configured to:
[0151] Determining the local address of the PPPoE client as the source address of the Internet Protocol tunnel;
[0152] The address of the PPPoE server carrying the segment identification operation code is determined as the destination address of the Internet Protocol tunnel.
[0153] In one embodiment, the first packaging module is specifically configured to:
[0154] The user data message is encapsulated based on the PPPoE header to obtain a first data message, and the first data message is encapsulated through the Internet Protocol header to obtain an encapsulated data message.
[0155] In one embodiment, as shown in FIG8 , a data forwarding device 800 is provided, which is applied to a PPPoE server and includes: a first receiving module 802 , a decapsulation module 804 , and an access module 806 , wherein:
[0156] A first receiving module 802 is configured to receive an encapsulated data message sent by a PPPoE client;
[0157] a decapsulation module 804 configured to, upon determining that the destination address of the Internet Protocol tunnel corresponding to the encapsulated data packet is the local address of the PPPoE server, decapsulate the encapsulated data packet based on the segment identification operation code in the destination address to obtain a user data packet and user data plane information;
[0158] The access module 806 is configured to process the user data message based on the user data plane information.
[0159] In one embodiment, the decapsulation module is specifically configured to:
[0160] The Internet Protocol header and the PPPoE header contained in the encapsulated data message are removed to obtain a user data message.
[0161] In one embodiment, the access module is specifically configured to:
[0162] Determine the VRF instance corresponding to the user data plane information based on a pre-configured correspondence between the user data plane information and the VRF instance;
[0163] The Layer 3 VPN forwarding table is queried through the VRF instance to determine a target VPN channel, and the user data message is forwarded to the target VPN channel.
[0164] Each module in the above-mentioned data forwarding device can be implemented in whole or in part through software, hardware, or a combination thereof. Each module can be embedded in or independent of the processor in the communication device in hardware form, or can be stored in the memory of the communication device in software form, so that the processor can call and execute the corresponding operations of each module.
[0165] In one embodiment, a communication device is provided, see Figure 9. Figure 9 is a schematic diagram of the structure of a terminal device provided in an embodiment of the present invention. The terminal device 900 shown in Figure 9 includes: at least one processor 901, a memory 902, at least one network interface 904 and a user interface 903. The various components in the terminal device 900 are coupled together through a bus system 905. It can be understood that the bus system 905 is used to achieve connection and communication between these components. In addition to the data bus, the bus system 905 also includes a power bus, a control bus and a status signal bus. However, for the sake of clarity, various buses are labeled as bus system 905 in Figure 9. In addition, in an embodiment of the present invention, a transceiver 906 is also included. The transceiver can be multiple components, that is, including a transmitter and a receiver, providing a unit for communicating with various other devices on a transmission medium.
[0166] The user interface 903 may include a display, a keyboard, or a pointing device, such as a mouse, a trackball, a touchpad, or a touch screen.
[0167] It is understood that the memory 902 in the embodiment of the present invention can be a volatile memory or a non-volatile memory, or can include both volatile and non-volatile memories. Among them, the non-volatile memory can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory can be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), and direct RAM bus random access memory (DRRAM). The memory 902 of the systems and methods described in the embodiments of the present invention is intended to include, but is not limited to, these and any other suitable types of memory.
[0168] In some embodiments, the memory 902 stores the following elements, executable modules or data structures, or a subset thereof, or an extended set thereof: an operating system 9021 and application programs 9022 .
[0169] The operating system 9021 includes various system programs, such as a framework layer, a core library layer, and a driver layer, for implementing various basic services and handling hardware-based tasks. Application programs 9022 include various application programs, such as a media player and a browser, for implementing various application services. Programs implementing the methods of the embodiments of the present invention may be included in application programs 9022.
[0170] In an embodiment of the present invention, by calling a program or instruction stored in the memory 902, specifically, a program or instruction stored in the application 9022, the processor is configured to determine a source address of an Internet Protocol tunnel based on a local address of the PPPoE client, and to determine a destination address of the Internet Protocol tunnel based on an address of the PPPoE server, wherein the address of the PPPoE server includes a segment identification operation code, and the segment identification operation code is configured to instruct the PPPoE server to perform message processing; the processor is further configured to encapsulate a user data message based on a PPPoE header and an Internet Protocol header to obtain an encapsulated data message; and the transmitter is configured to send the encapsulated data message to the PPPoE server through the Internet Protocol tunnel, so that the PPPoE server performs processing based on the encapsulated data message.
[0171] Some or all of the methods disclosed in the above embodiments of the present invention may also be applied to the processor 901, or implemented by the processor 901, or implemented by the processor 901 in conjunction with other components (e.g., a transceiver). The processor 901 may be an integrated circuit chip with signal processing capabilities. During implementation, each step of the above method may be performed by hardware integrated logic circuits in the processor 901 or by software instructions. The processor 901 may be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA), or other programmable logic device, discrete gate or transistor logic device, or discrete hardware component. The methods, steps, and logic block diagrams disclosed in the embodiments of the present invention may be implemented or executed. The general-purpose processor may be a microprocessor or any conventional processor. The steps of the methods disclosed in conjunction with the embodiments of the present invention may be directly implemented and executed by a hardware decoding processor, or by a combination of hardware and software modules in the decoding processor. The software module can be located in a storage medium well-known in the art, such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, etc. The storage medium is located in memory 902, and processor 901 reads information in memory 902 and, in conjunction with its hardware, completes the steps of the above method.
[0172] It is understood that the embodiments described in the embodiments of the present invention can be implemented using hardware, software, firmware, middleware, microcode, or a combination thereof. For hardware implementation, the processing unit can be implemented in one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), general-purpose processors, controllers, microcontrollers, microprocessors, other electronic units for performing the functions described in this application, or a combination thereof.
[0173] For software implementation, the techniques described in the embodiments of the present invention can be implemented through modules (e.g., procedures, functions, etc.) that perform the functions described in the embodiments of the present invention. The software code can be stored in a memory and executed by the processor 901. The memory can be implemented in the processor 901 or external to the processor 901.
[0174] In one embodiment, the processor 901 is further configured to determine the local address of the PPPoE client as the source address of the Internet Protocol tunnel; and determine the address of the PPPoE server carrying the segment identification operation code as the destination address of the Internet Protocol tunnel.
[0175] In one embodiment, the processor 901 is further configured to encapsulate the user data packet based on a PPPoE header to obtain a first data packet, and encapsulate the first data packet through an Internet Protocol header to obtain an encapsulated data packet.
[0176] In an embodiment of the present invention, by calling a program or instruction stored in the memory 902, specifically, a program or instruction stored in the application 9022, the receiver is configured to receive an encapsulated data packet sent by the PPPoE client; the processor 901 is further configured to, when determining that the destination address of the Internet Protocol tunnel corresponding to the encapsulated data packet is the local address of the PPPoE server, decapsulate the encapsulated data packet based on the segment identification operation code in the destination address to obtain a user data packet and user data plane information; and forward the user data packet based on the user data plane information.
[0177] In one embodiment, the processor 901 is further configured to remove the Internet Protocol header and the PPPoE header included in the encapsulated data message to obtain a user data message.
[0178] In one embodiment, the processor 901 is further used to determine the VRF instance corresponding to the user data plane information based on the pre-configured correspondence between the user data plane information and the VRF instance; query the 3-layer VPN forwarding table through the VRF instance to determine the target VPN channel, and forward the user data packet to the target VPN channel through the transmitter.
[0179] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the following steps are implemented:
[0180] Determining a source address of an Internet Protocol tunnel based on a local address of the PPPoE client, and determining a destination address of the Internet Protocol tunnel based on an address of the PPPoE server, wherein the address of the PPPoE server includes a segment identification operation code, and the segment identification operation code is used to instruct the PPPoE server to perform message processing;
[0181] Encapsulating the user data message based on the PPPoE header and the Internet Protocol header to obtain an encapsulated data message;
[0182] The encapsulated data message is sent to the PPPoE server through the Internet Protocol tunnel, so that the PPPoE server performs processing based on the encapsulated data message.
[0183] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented:
[0184] Determining the local address of the PPPoE client as the source address of the Internet Protocol tunnel;
[0185] The address of the PPPoE server carrying the segment identification operation code is determined as the destination address of the Internet Protocol tunnel.
[0186] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented:
[0187] The user data message is encapsulated based on the PPPoE header to obtain a first data message, and the first data message is encapsulated through the Internet Protocol header to obtain an encapsulated data message.
[0188] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the following steps are implemented:
[0189] Receive encapsulated data packets sent by the PPPoE client;
[0190] When it is determined that the destination address of the Internet Protocol tunnel corresponding to the encapsulated data packet is the local address of the PPPoE server, decapsulating the encapsulated data packet based on the segment identification operation code in the destination address to obtain a user data packet and user data plane information; and
[0191] The user data message is forwarded based on the user data plane information.
[0192] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented:
[0193] The Internet Protocol header and the PPPoE header contained in the encapsulated data message are removed to obtain a user data message.
[0194] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented:
[0195] Determine the VRF instance corresponding to the user data plane information based on a pre-configured correspondence between the user data plane information and the VRF instance;
[0196] The Layer 3 VPN forwarding table is queried through the VRF instance to determine a target VPN channel, and the user data message is forwarded to the target VPN channel.
[0197] The present application also provides a computer program product comprising instructions, which, when executed on a computer, causes the computer to perform the following steps:
[0198] Determining a source address of an Internet Protocol tunnel based on a local address of the PPPoE client, and determining a destination address of the Internet Protocol tunnel based on an address of the PPPoE server, wherein the address of the PPPoE server includes a segment identification operation code, and the segment identification operation code is used to instruct the PPPoE server to perform message processing;
[0199] Encapsulating the user data message based on the PPPoE header and the Internet Protocol header to obtain an encapsulated data message;
[0200] The encapsulated data message is sent to the PPPoE server through the Internet Protocol tunnel, so that the PPPoE server performs processing based on the encapsulated data message.
[0201] The present application also provides a computer program product comprising instructions, which, when executed on a computer, causes the computer to perform the following steps:
[0202] Receive encapsulated data packets sent by the PPPoE client;
[0203] When it is determined that the destination address of the Internet Protocol tunnel corresponding to the encapsulated data packet is the local address of the PPPoE server, decapsulating the encapsulated data packet based on the segment identification operation code in the destination address to obtain a user data packet and user data plane information; and
[0204] The user data message is forwarded based on the user data plane information.
[0205] Those skilled in the art will appreciate that all or part of the processes in the above-mentioned embodiment methods can be implemented by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application may include at least one of non-volatile and volatile memory. Non-volatile memory may include read-only memory (ROM), magnetic tape, floppy disk, flash memory or optical memory, etc. Volatile memory may include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM).
[0206] The technical features of the above-mentioned embodiments can be combined arbitrarily. In order to make the description concise, not all possible combinations of the technical features in the above-mentioned embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0207] The above-described embodiments merely represent several implementation methods of the present application. While the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the patent application. It should be noted that a person of ordinary skill in the art may make various modifications and improvements without departing from the spirit of the present application, and these modifications and improvements fall within the scope of protection of the present application. Therefore, the scope of protection of the present patent application shall be determined by the appended claims.
Claims
1. A data forwarding method, applied to a PPPoE client, comprising: Determine a source address of an Internet Protocol tunnel based on a local address of the PPPoE client, and determine a destination address of the Internet Protocol tunnel based on an address of the PPPoE server; The address of the PPPoE server includes a segment identification operation code; The segment identification operation code is used to instruct the PPPoE server to perform message processing; Encapsulating the user data message based on the PPPoE header and the Internet Protocol header to obtain an encapsulated data message; as well as The encapsulated data message is sent to the PPPoE server through the Internet Protocol tunnel, so that the PPPoE server performs processing based on the encapsulated data message.
2. The method according to claim 1, wherein: The segment identification opcode is also used to: Instructing the PPPoE server to decapsulate the encapsulated data message to obtain user data plane information; and The user data message is processed based on the user data plane information and the Layer 3 VPN forwarding table.
3. The method according to claim 1, wherein: The segment identification operation code is END.PPPoE.X.
4. The method according to claim 1, wherein: The segment identification operation code is End.DX3PPPoE.
5. The method according to claim 1, wherein: The step of determining a source address of the Internet Protocol tunnel based on the local address of the PPPoE client, and determining a destination address of the Internet Protocol tunnel based on the address of the PPPoE server, comprises: determining the local address of the PPPoE client as the source address of the Internet Protocol tunnel; and The address of the PPPoE server carrying the segment identification operation code is determined as the destination address of the Internet Protocol tunnel.
6. The method according to claim 1, wherein: The method of encapsulating the user data message based on the PPPoE header and the Internet Protocol header to obtain the encapsulated data message includes: Encapsulating the user data message based on the PPPoE header to obtain a first data message; and The first data message is encapsulated through an Internet Protocol header to obtain the encapsulated data message.
7. The method according to claim 6, wherein: The encapsulating the user data message based on the PPPoE header to obtain a first data message includes: Add the fields of the PPPoE header to the header position of the user data message to obtain the first data message, or A plurality of bytes are added to the header position of the user data message, and the data corresponding to the PPPoE header are respectively written into the plurality of bytes added to the user data message, so as to obtain the first data message.
8. The method according to claim 6, wherein: The step of encapsulating the first data message through an Internet Protocol header to obtain the encapsulated data message includes: Adding the fields of the Internet Protocol header to the header position of the first data message to obtain the encapsulated data message, or A plurality of bytes are added to the header position of the first data message, and the data corresponding to the Internet Protocol header are respectively written into the plurality of bytes added to the first data message to obtain the encapsulated data message.
9. A data forwarding method, applied to a PPPoE server, the method comprising: Receive the encapsulated data message sent by the PPPoE client; When it is determined that the destination address of the Internet Protocol tunnel corresponding to the encapsulated data message is the local address of the PPPoE server, the encapsulated data message is decapsulated based on the segment identification operation code in the destination address to obtain a user data message and user data plane information; as well as The user data message is forwarded based on the user data plane information.
10. The method according to claim 9, wherein: The decapsulating the encapsulated data message to obtain the user data message includes: The Internet Protocol header and the PPPoE header contained in the encapsulated data message are removed to obtain the user data message.
11. The method according to claim 9, wherein: The forwarding processing of the user data message based on the user data plane information includes: Determine the VRF instance corresponding to the user data plane information based on the pre-configured correspondence between the user data plane information and the VRF instance; and The Layer 3 VPN forwarding table is queried through the VRF instance to determine a target VPN channel, and the user data message is forwarded to the target VPN channel.
12. A data forwarding device, applied to a PPPoE client, comprising: A first determination module, configured to determine a source address of an Internet Protocol tunnel based on a local address of the PPPoE client, and to determine a destination address of the Internet Protocol tunnel based on an address of a PPPoE server; the address of the PPPoE server includes a segment identification operation code; the segment identification operation code is used to instruct the PPPoE server to perform message processing; A first encapsulation module is used to encapsulate the user data message based on the PPPoE header and the Internet Protocol header to obtain an encapsulated data message; as well as The first sending module is used to send the encapsulated data message to the PPPoE server through the Internet Protocol tunnel, so that the PPPoE server processes based on the encapsulated data message.
13. A data forwarding device, applied to a PPPoE server, comprising: A first receiving module, used for receiving an encapsulated data message sent by a PPPoE client; a decapsulation module, configured to, when determining that the destination address of the Internet Protocol tunnel corresponding to the encapsulated data message is the local address of the PPPoE server, decapsulate the encapsulated data message based on the segment identification operation code in the destination address to obtain a user data message and user data plane information; as well as An access module is used to forward the user data message based on the user data plane information.
14. A communication device comprising: A processor, configured to determine a source address of an Internet Protocol tunnel based on a local address of a PPPoE client, and to determine a destination address of the Internet Protocol tunnel based on an address of the PPPoE server; the address of the PPPoE server comprising a segment identification operation code; the segment identification operation code is used to instruct the PPPoE server to perform message processing; The processor is further used to encapsulate the user data message based on the PPPoE header and the Internet Protocol header to obtain an encapsulated data message; as well as A transmitter is used to send the encapsulated data message to the PPPoE server through the Internet Protocol tunnel, so that the PPPoE server performs processing based on the encapsulated data message.
15. A computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of the method according to any one of claims 1 to 11.
16. A computer program product, comprising a computer program, which, when executed by a processor, implements the steps of the method according to any one of claims 1 to 11.