Data forwarding method and apparatus, communication device, and storage medium
By encapsulating data packets in the PPPoE and Internet Protocol tunnel headers during data transmission between the PPPoE client and server, traffic-driven tunnel establishment is achieved, solving the network resource consumption problem caused by control plane interaction and improving communication efficiency and reliability.
Patent Information
- Application Number
- CN202311285409.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-28
- Publication Date
- 2025-11-07
- Estimated Expiration
- 2043-09-28
AI Technical Summary
The establishment of control plane interaction between the PPPoE client and the PPPoE server leads to excessive consumption of network resources.
By encapsulating user data packets using the PPPoE header and Internet Protocol tunnel header in a traffic-based manner and transmitting them through the Internet Protocol tunnel, data transmission between the PPPoE server and client is achieved, eliminating the need for additional control plane interaction.
It saves network resources consumed by control plane signaling interaction and improves communication quality and network establishment efficiency.
Smart Images

Figure CN119728515B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of communication, and in particular to a data forwarding method and device, a communication device, a storage medium and a computer program product. BACKGROUND
[0002] With the development of communication technology, in the scene of establishing a VPN (Virtual Private Network) through PPPoE (Point-to-Point Protocol over Ethernet) dialing and accessing the VPN, a PPPoE client and a PPPoE server are required to be two-layer networked.
[0003] In the related art, an additional control plane needs to be established between a PPPoE client and a PPPoE server to realize the interaction between the two, which leads to the consumption of a large amount of network resources in control plane signaling interaction. SUMMARY
[0004] The embodiments of the present application provide a data forwarding method and device, a communication device, a storage medium and a computer program product, which can realize data interaction based on traffic and save network resources consumed by the control plane.
[0005] In a first aspect, the present application provides a data forwarding method applied to a PPPoE server, and the method comprises the following steps:
[0006] receiving a user data packet, determining an address of a target PPPoE client corresponding to a destination address of the user data packet based on a preset correspondence between the destination address and the address of the client;
[0007] encapsulating the user data packet based on a PPPoE header and an Internet protocol tunnel header to obtain an encapsulated data packet;
[0008] sending the encapsulated data packet to the target PPPoE client through an Internet protocol tunnel based on the address of the target PPPoE client, so that the target PPPoE client processes the encapsulated data packet.
[0009] In one of the embodiments, the receiving a user data packet comprises:
[0010] receiving a user data packet through a VPN channel.
[0011] In one of the embodiments, the encapsulating the user data packet based on a PPPoE header and an Internet protocol tunnel header to obtain an encapsulated data packet comprises:
[0012] Encapsulate the user data packet based on the PPPoE header to obtain a first data packet;
[0013] Encapsulate the first data packet through an Internet protocol tunnel header to obtain an encapsulated data packet.
[0014] In one embodiment, the sending of the encapsulated data packet to the target PPPoE client through the Internet protocol tunnel based on the address of the target PPPoE client comprises:
[0015] Determining a source address of the Internet protocol tunnel based on a local address, and determining a destination address of the Internet protocol tunnel based on the address of the target PPPoE client;
[0016] The sending of the encapsulated data packet to the target PPPoE client through the Internet protocol tunnel, the address of the target PPPoE client comprising a segment identification operation code, the segment identification operation code being used to instruct the target PPPoE client to process the packet.
[0017] In one embodiment, the segment identification operation code is End.DX3PPPoE.
[0018] In a second aspect, the application provides a data forwarding method applied to a PPPoE client, the method comprising:
[0019] Receiving an encapsulated data packet sent by a PPPoE server;
[0020] If it is determined that a destination address of an Internet protocol tunnel corresponding to the encapsulated data packet is a local address, then performing a decapsulation process on the encapsulated data packet based on a segment identification operation code in the destination address to obtain a user data packet;
[0021] Forwarding the user data packet to a device connected to the PPPoE client.
[0022] In one embodiment, the performing of the decapsulation process on the encapsulated data packet based on the segment identification operation code in the destination address to obtain a user data packet comprises:
[0023] Performing a removal process on an Internet protocol tunnel header and a PPPoE header contained in the encapsulated data packet to obtain a user data packet.
[0024] In one embodiment, the segment identification operation code is End.DX3PPPoE.
[0025] In a third aspect, the application further provides a data forwarding device applied to a PPPoE server, the device comprising:
[0026] The first receiving module is used to receive user data packets and determine the address of the target PPPoE client corresponding to the destination address of the user data packet based on the preset correspondence between the destination address and the client address.
[0027] The encapsulation module is used to encapsulate the user data packet based on the PPPoE header and the Internet Protocol tunnel header to obtain the encapsulated data packet.
[0028] The first sending module is configured to send the encapsulated data packet to the target PPPoE client via an Internet Protocol tunnel based on the address of the target PPPoE client, so that the target PPPoE client can process the encapsulated data packet.
[0029] In one embodiment, the first receiving module is specifically used for:
[0030] Receive user data packets through a VPN tunnel.
[0031] In one embodiment, the encapsulation module is specifically used for:
[0032] The user data packet is encapsulated based on the PPPoE header to obtain the first data packet;
[0033] The first data packet is encapsulated using the Internet Protocol tunnel header to obtain the encapsulated data packet.
[0034] In one embodiment, the first sending module is specifically used for:
[0035] The source address of the Internet Protocol tunnel is determined based on the local address, and the destination address of the Internet Protocol tunnel is determined based on the address of the target PPPoE client.
[0036] The encapsulated data packet is sent to the target PPPoE client via an Internet Protocol tunnel. The address of the target PPPoE client contains a segment identifier opcode, which is used to instruct the target PPPoE client to process the packet.
[0037] Fourthly, this application also provides a data forwarding apparatus for use in a PPPoE client, the apparatus comprising:
[0038] The second receiving module is used to receive encapsulated data packets sent by the PPPoE server;
[0039] An encapsulation module is configured to, if it is determined that the destination address of the Internet Protocol tunnel corresponding to the encapsulated data packet is a local address, perform encapsulation processing on the encapsulated data packet based on a segment identifier operation code in the destination address to obtain a user data packet.
[0040] A second sending module is configured to forward the user data packet to a device connected with the PPPoE client.
[0041] In one embodiment, the encapsulation module is specifically configured to:
[0042] perform removal processing on an Internet Protocol tunnel header and a PPPoE header contained in the encapsulated data packet to obtain a user data packet.
[0043] In a fifth aspect, the present application further provides a communication device, comprising a transmitter, a processor and a receiver;
[0044] The receiver is configured to receive a user data packet, and determine an address of a target PPPoE client corresponding to a destination address of the user data packet based on a preset correspondence between the destination address and the address of the client.
[0045] The processor is configured to encapsulate the user data packet based on a PPPoE header and an Internet Protocol tunnel header to obtain an encapsulated data packet.
[0046] The processor is further configured to send the encapsulated data packet to the target PPPoE client through an Internet Protocol tunnel and the transmitter based on the address of the target PPPoE client, so that the target PPPoE client performs processing based on the encapsulated data packet.
[0047] In a sixth aspect, the present application further provides a computer readable storage medium. The computer readable storage medium has a computer program stored thereon, and the computer program is executed by a processor to implement the following steps:
[0048] receive a user data packet, and determine an address of a target PPPoE client corresponding to a destination address of the user data packet based on a preset correspondence between the destination address and the address of the client.
[0049] encapsulate the user data packet based on a PPPoE header and an Internet Protocol tunnel header to obtain an encapsulated data packet.
[0050] send the encapsulated data packet to the target PPPoE client through an Internet Protocol tunnel based on the address of the target PPPoE client, so that the target PPPoE client performs processing based on the encapsulated data packet.
[0051] In a seventh aspect, the present application provides a computer program product. The computer program product comprises a computer program which, when executed by a processor, implements the following steps:
[0052] receiving a user data packet, determining an address of a target PPPoE client corresponding to a destination address of the user data packet based on a preset correspondence between destination addresses and addresses of clients;
[0053] performing encapsulation on the user data packet based on a PPPoE header and an Internet protocol tunnel header to obtain an encapsulated data packet;
[0054] sending the encapsulated data packet to the target PPPoE client through an Internet protocol tunnel based on the address of the target PPPoE client, so that the target PPPoE client performs processing based on the encapsulated data packet.
[0055] The data forwarding method, device, communication device and storage medium described above comprise: receiving a user data packet, determining an address of a target PPPoE client corresponding to a destination address of the user data packet based on a preset correspondence between destination addresses and addresses of clients; performing encapsulation on the user data packet based on a PPPoE header and an Internet protocol tunnel header to obtain an encapsulated data packet; and sending the encapsulated data packet to the target PPPoE client through an Internet protocol tunnel based on the address of the target PPPoE client, so that the target PPPoE client performs processing based on the encapsulated data packet. By using the method, tunnel establishment between a PPPoE server and a client can be implemented, network resources consumed by control plane signaling interaction are saved, and communication quality is improved. BRIEF DESCRIPTION OF DRAWINGS
[0056] Figure 1 FIG. 1 is a diagram of an application environment of a data forwarding method in an embodiment;
[0057] Figure 2 FIG. 2 is a flowchart of a data forwarding method in an embodiment;
[0058] Figure 3 FIG. 3 is a flowchart of an encapsulation step in an embodiment;
[0059] Figure 4 FIG. 4 is a flowchart of a step of sending a packet in an embodiment;
[0060] Figure 5 FIG. 5 is a flowchart of a data forwarding method in another embodiment;
[0061] Figure 6A flow chart of a data forwarding method in an embodiment;
[0062] Figure 7 A signaling diagram of a data forwarding method in an embodiment;
[0063] Figure 8 A structure block diagram of a data forwarding apparatus in an embodiment;
[0064] Figure 9 A structure block diagram of a data forwarding apparatus in an embodiment;
[0065] Figure 10 An internal structure diagram of a communication device in an embodiment. DETAILED DESCRIPTION
[0066] In order to make the purposes, technical solutions and advantages of the present application clearer, the present application will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and not intended to limit the present application.
[0067] Figure 1 An application scenario diagram of a data forwarding method provided by an embodiment of the present application. As shown in Figure 1 the figure, the scenario includes a PPPoE client 100 and a PPPoE server 200. The PPPoE client 100 and the PPPoE server 200 perform data transmission through a network.
[0068] The PPPoE client 100 can be a wireless terminal, which can be a device that provides voice and / or other service data connectivity to a user, or a handheld device with a wireless connection capability, or other processing device connected to a wireless modem. The wireless terminal can communicate with one or more core networks via a Radio Access Network (RAN). The wireless terminal can be a mobile terminal, such as a mobile telephone (also known as a "cellular" telephone) and a computer with a mobile termination, e.g., a portable, pocket, handheld, computer-embedded, or car-mounted mobile apparatus which exchanges language and / or data with a radio access network. The wireless terminal can also be referred to as a system, a subscriber unit, a subscriber station, a mobile station, a mobile, a remote station, a remote terminal, an access terminal, a user terminal, a user agent, a user device, or user equipment, without limitation.
[0069] In the prior art, in the scenario of establishing a VPN through PPPoE dialing, a large two-layer network is required to be established between the PPPoE client and the PPPoE server. Based on this, the related art has many problems such as complex configuration, difficult cutting, two-layer broadcast storm hidden danger, and the like in the process of network access through PPPoE. In addition, in the prior art, the network needs to be deployed and configured in advance on the enterprise side before the VPN can be opened, which has a complex implementation process, high cost, low opening efficiency, and low communication efficiency.
[0070] The data forwarding method provided in the embodiment can establish an SRV6 tunnel based on traffic driving, implement three-layer VPN through PPPoE over SRV6, and establish an outer SRV6 tunnel in a traffic driving manner. After the PPPoE server receives the uplink traffic of the PPPoE client, the PPPoE server internally establishes a binding relationship between a source SID and a destination SID, and the backhaul traffic is forwarded according to the binding relationship, so that the tunnel can be established between the PPPoE server and the PPPoE client without additional control plane interaction, the capability of the PPPoE client is simplified, and the network resources consumed by control plane signaling interaction are saved.
[0071] It should be noted that the beneficial effects or technical problems solved by the embodiments of the present application are not limited to this, but can also be other implicit or related problems. For details, please refer to the description of the following embodiments.
[0072] The technical solutions of the present application and how the technical solutions solve the above technical problems will be described in detail below with specific examples. The following specific examples can be combined with each other, and the same or similar concepts or processes can not be described again in some examples. The embodiments of the present application will be described below with reference to the accompanying drawings.
[0073] In one embodiment, as shown in Figure 2 , a data forwarding method is provided, which is described below by taking the PPPoE server 200 in Figure 1 as an example, including the following steps:
[0074] Step 202, receiving a user data packet, determining the address of the target PPPoE client corresponding to the destination address of the user data packet based on the preset correspondence between the destination address and the address of the client.
[0075] Among them, the user data packet can be a data packet of a virtual private network; the target address can be the destination address of the user data packet, that is, the destination address carried by the user data packet; the address of the client can be the address of the remote sid, and the remote corresponding to the PPPoE server can be the PPPoE client; the address of the client can be the MAC address of the PPPoE client, or 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, or an IPV6 address, etc.
[0076] Specifically, the PPPoE server can receive a user data packet, and after receiving the user data packet, the user data packet can be parsed to determine the destination address of the user data packet; the PPPoE server can pre-store a mapping relationship table of the destination address and the address of the client, based on which the PPPoE server can query the mapping relationship table of the destination address and the address of the client to determine the address of the target PPPoE client corresponding to the destination address.
[0077] In one example, the address of the target PPPoE client can be a mac address, an IP address, etc., and the IP address can be an IPV4 address, or an IPV6 address, etc.
[0078] Step 204, encapsulating the user data packet based on the PPPoE header and the Internet protocol tunnel header to obtain an encapsulated data packet.
[0079] The PPPoE header can be a header field that indicates data transmission via the PPPoE protocol and can be added to the header of a data packet. The Internet Protocol Tunnel header can be a field from the IPv6 header or an IPv4 header, used to indicate that the packet is transmitted via an Internet Protocol tunnel. An Internet Protocol tunnel can be a communication tunnel based on the Internet Protocol, such as an IPv4 tunnel or an IPv6 tunnel, etc.
[0080] Specifically, after determining the address of the target PPPoE client corresponding to the destination address of the user data packet, the PPPoE server can encapsulate the user data packet to be transmitted based on the PPPoE header and the Internet Protocol tunnel header, and determine the user data packet encapsulated with the PPPoE header and the Internet Protocol tunnel header as the encapsulated data packet.
[0081] Step 206: Based on the address of the target PPPoE client, send an encapsulated data packet to the target PPPoE client through an Internet Protocol tunnel, so that the target PPPoE client can process the encapsulated data packet.
[0082] Specifically, after receiving the encapsulated data packet, the PPPoE server can transmit the encapsulated data packet, after processing it, through an Internet Protocol tunnel. In other words, the PPPoE server can transmit the encapsulated data packet to the target PPPoE client via an Internet Protocol tunnel corresponding to an IPv4 network; the PPPoE server can also transmit the encapsulated data packet to the target PPPoE client via an Internet Protocol tunnel corresponding to an IPv6 network. After receiving the encapsulated data packet, the target PPPoE client can process it.
[0083] The aforementioned data forwarding method receives user data packets, determines the target PPPoE client address corresponding to the destination address of the user data packet based on a preset mapping between destination and client addresses, encapsulates the user data packet based on the PPPoE header and the Internet Protocol tunnel header, obtaining an encapsulated data packet, and sends the encapsulated data packet to the target PPPoE client through the Internet Protocol tunnel based on the target PPPoE client address, enabling the target PPPoE client to process the data packet. By employing this method, a tunnel can be established between the PPPoE server and client, saving network resources consumed by control plane signaling interaction and improving communication quality.
[0084] In one embodiment, the specific processing procedure for step 202, "receiving user data packets," includes:
[0085] The user data packet is received through the VPN channel.
[0086] The user data packet can be a data packet transmitted in a downlink direction, and the downlink direction can be a direction in which data is transmitted from the PPPoE server to the PPPoE client.
[0087] Specifically, the PPPoE server can receive the user data packet through a VPN channel corresponding to the virtual private network.
[0088] In this embodiment, the efficiency of network establishment and the reliability of network data transmission can be improved.
[0089] In one embodiment, as shown in FIG. 2, the specific processing procedure of step 204 “encapsulating the user data packet based on the PPPoE header and the Internet protocol tunnel header to obtain an encapsulated data packet” includes: Figure 3
[0090] Step 302: encapsulating the user data packet based on the PPPoE header to obtain a first data packet.
[0091] Specifically, after receiving the user data packet, the PPPoE server acquires the PPPoE header and encapsulates the user data packet based on the PPPoE header to obtain a first data packet. The specific encapsulation process can be that the PPPoE server adds fields of the PPPoE header to a header position of the user data packet, or adds multiple bytes to the header position of the user data packet and writes data corresponding to the PPPoE header into the multiple bytes added to the user data packet to obtain the first data packet.
[0092] Step 304: encapsulating the first data packet based on the Internet protocol tunnel header to obtain an encapsulated data packet.
[0093] Specifically, the PPPoE server can add fields of the Internet protocol tunnel header to a header position of the first data packet, or add multiple bytes to the header position of the first data packet and write data corresponding to the Internet protocol tunnel header into the multiple bytes added to the first data packet to obtain the encapsulated data packet.
[0094] In one example, the process of the PPPoE server encapsulating the received user data packet based on the PPPoE header and the Internet Protocol tunnel header can be: after receiving the user data packet, the PPPoE server obtains the Internet Protocol tunnel header and encapsulates the user data packet through the Internet Protocol tunnel header to obtain a first data packet. The specific encapsulation process can be that the PPPoE server can add the fields of the Internet Protocol tunnel header to the header position of the user data packet, or can also add multiple bytes to the header position of the user data packet and write the corresponding data of the Internet Protocol tunnel header into the multiple bytes added to the user data packet to obtain the first data packet. The PPPoE server can encapsulate the first data packet based on the PPPoE header. The specific encapsulation process can be that the PPPoE server can add the fields of the PPPoE header to the header position of the first data packet, or can also add multiple bytes to the header position of the first data packet and write the corresponding data of the PPPoE header into the multiple bytes added to the first data packet to obtain the encapsulated data packet.
[0095] In this embodiment, the user data packet is encapsulated by the PPPoE header and the Internet Protocol tunnel header, which can realize the communication of PPPoE over SRv6, improve the efficiency of network establishment and the reliability of network transmission data.
[0096] In one of the embodiments, as shown in FIG. 6, the specific processing process of step 206 "sending the encapsulated data packet to the target PPPoE client through the Internet Protocol tunnel based on the address of the target PPPoE client" includes: Figure 4
[0097] Step 402: determining the source address of the Internet Protocol tunnel based on the local address and determining the destination address of the Internet Protocol tunnel based on the address of the target PPPoE client.
[0098] The local address can be the communication address of the PPPoE server, 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. The IP address can be an IPV4 address or an IPV6 address, etc. The source address of the Internet Protocol tunnel can be the address of the communication device sending data packets to other devices through the Internet tunnel.
[0099] Specifically, the PPPoE server can obtain a local address of the PPPoE server, determine the obtained local address as a source address of the Internet protocol tunnel, and determine an address of a target PPPoE client corresponding to a destination address of the user data packet based on a preset correspondence between the destination address and the address of the client, and determine the determined address of the target PPPoE client as the destination address of the Internet protocol tunnel.
[0100] At step 404, the encapsulated data packet is sent to the target PPPoE client through the Internet protocol tunnel.
[0101] The address of the target PPPoE client includes a segment identifier operation code, and the segment identifier operation code is used to instruct the target PPPoE client to process the packet.
[0102] Specifically, the PPPoE server can transmit the encapsulated data packet to the PPPoE client via the Internet protocol tunnel corresponding to the ipv4 network based on the determined source address of the Internet protocol tunnel and the destination address of the Internet protocol tunnel, or the PPPoE server can also transmit the encapsulated data packet to the PPPoE client via the Internet protocol tunnel corresponding to the ipv6 network. In this way, after receiving the encapsulated data packet, the PPPoE client can perform decapsulation processing on the encapsulated data packet to obtain the user data packet if the destination address of the encapsulated data packet includes the segment identifier operation code, and forward the obtained user data packet to a communication device connected to the PPPoE client, thereby realizing data transmission between the PPPoE client and the PPPoE server based on traffic.
[0103] In this embodiment, the encapsulated data packet is sent to the PPPoE server through the Internet protocol tunnel, so that the PPPoE server processes based on the encapsulated data packet, simplifies the configuration process of the data transmission tunnel, realizes the communication of PPPoE over SRv6, and improves the communication efficiency.
[0104] In one of the embodiments, the segment identifier operation code is End.DX3PPPoE.
[0105] Specifically, one specific embodiment of the segment identifier operation code carried in the destination address of the user data packet can be End.DX3PPPoE (Decapsulation and PPPoE L3VPN table lookup, supporting decapsulation packet). The segment identifier operation code can be split into END+D+X3PPPOE, D indicates that decapsulation processing is supported, and X3PPPOE indicates cross connection.
[0106] In this embodiment, by carrying the segment identifier operation code in the destination address of the packet, the received PPPoE client can perform decapsulation processing on the received packet based on the indication of the segment identifier operation code, realize the communication of PPPoE over SRv6, and improve the efficiency of network establishment and the reliability of network transmission data.
[0107] In one embodiment, as shown in Figure 5 A data forwarding method is provided, and in this embodiment, the method is applied to a PPPoE client. The data forwarding method comprises the following steps.
[0108] Step 502, receiving an encapsulated data packet sent by a PPPoE server.
[0109] Specifically, the PPPoE server can send the encapsulated data packet to the PPPoE client through an Internet protocol tunnel, and the PPPoE client can receive the encapsulated data packet sent by the PPPoE server through the Internet protocol tunnel.
[0110] Step 504, if it is determined that the destination address of the Internet protocol tunnel corresponding to the encapsulated data packet is a local address, performing decapsulation processing on the encapsulated data packet based on the segment identifier operation code in the destination address to obtain a user data packet.
[0111] The segment identifier operation code is used to instruct the PPPoE client to process the packet, that is, the segment identifier operation code is used to instruct the PPPoE client to perform decapsulation processing on the encapsulated data packet to obtain user data plane information, and to forward the obtained user data packet based on the user data plane information.
[0112] Specifically, the PPPoE client performs decapsulation processing on the received encapsulated data packet to remove the Internet protocol tunnel header and the PPPoE header included in the encapsulated data packet to obtain a user data packet and user data plane information, in the case that it is determined that the destination address of the Internet protocol tunnel corresponding to the encapsulated data packet is a local address, that is, in the case that it is determined that the destination address of the encapsulated data packet is consistent with the local address of the PPPoE client, and in the case that it is determined that the destination address includes the segment identifier operation code.
[0113] Step 506, forwarding the user data packet to a device connected to the PPPoE client.
[0114] Specifically, after obtaining the user data packet, the PPPoE client can determine the communication device connected with the PPPoE client, and forward the user data packet to the plurality of communication devices connected with the PPPoE client, so as to realize the data transmission between the PPPoE client and the PPPoE server.
[0115] In the embodiment, by carrying the segment identifier operation code in the destination address, the PPPoE client receiving the packet can perform decapsulation processing on the received packet based on the indication of the segment identifier operation code, so as to realize the PPPoE over SRv6 communication, and improve the efficiency of network establishment and the reliability of network transmission data. That is, the establishment of the data transmission tunnel between the PPPoE server and the PPPoE client does not require additional control plane interaction, greatly simplifying the PPPoE client capability and saving network resources consumed by control plane signaling interaction.
[0116] In one of the embodiments, the specific processing process of the step 504 "performing decapsulation processing on the encapsulated data packet based on the segment identifier operation code in the destination address to obtain the user data packet" includes:
[0117] The Internet protocol tunnel header and the PPPoE header included in the encapsulated data packet are removed to obtain the user data packet.
[0118] The PPPoE header can be a header field representing data transmission through the PPPoE protocol, which can be added to the header position of the data packet. The Internet protocol tunnel header can be a field of the ipv6 header or a field of the IPV4 header, which is used to represent the transmission of the packet through the Internet protocol tunnel.
[0119] Specifically, the process of the PPPoE client performing decapsulation processing on the encapsulated data packet can be that the PPPoE client removes the Internet protocol tunnel header included in the encapsulated data packet and removes the PPPoE header included in the user data packet to obtain the user data packet and the user data plane information.
[0120] In the embodiment, by the indication of the segment identifier operation code, the encapsulated data packet can be decapsulated, the PPPoE over SRv6 communication can be realized, and the communication quality and the efficiency of network establishment can be improved.
[0121] In one of the embodiments, the segment identifier operation code is End.DX3PPPoE.
[0122] Specifically, one specific embodiment of the segment identifier operation code carried in the destination address of the user data packet can be End.DX3PPPoE (Decapsulation and PPPoE L3VPN table lookup, supporting decapsulation packets). Wherein, the segment identifier operation code can be split into END+D+X3PPPOE, D represents supporting decapsulation processing, and X3PPPOE represents cross connection.
[0123] In this embodiment, by carrying the segment identifier operation code in the destination address of the user data packet, the PPPoE client receiving the packet can perform decapsulation processing on the received packet based on the indication of the segment identifier operation code, implement PPPoE over SRv6 communication, and improve the efficiency of network establishment and the reliability of network transmission data.
[0124] In one embodiment, as Figure 6 shown, it can be a data processing process in the downlink direction, for example, it can be a process of transmitting a data packet from a PPPoE server to a PPPoE client: a user data packet can be transmitted to a PPPoE server (PPPoE server) through a network, and the PPPoE server can transmit a data packet containing the user data packet to a plurality of different PPPoE clients through the network. Wherein, the plurality of different PPPoE clients can be respectively connected with the management platform+AAA.
[0125] Specifically, the PPPoE server communicates with the PPPoE client through PPPoE over IPV6; the PPPoE server can encapsulate the ipv4 / ipv6 form of user data packet payload, PPPoE header and Internet protocol tunnel header (IPv6 header) to obtain an encapsulated data packet, wherein the destination address DA=PPPoE server END.PPPoE.X SID; the source address SA=PPPoE client IPv6.
[0126] The PPPoE server can receive a user data packet based on a VPN channel of a virtual private network, process the user data packet to obtain an encapsulated data packet, and send the encapsulated data packet to the PPPoE client through the network. The PPPoE client performs decapsulation processing on the encapsulated data packet to obtain an ipv4 / ipv6 form of user data packet payload, and sends the user data packet to other communication devices connected with the PPPoE client.
[0127] In one embodiment, Figure 7 An interactive flowchart of a data forwarding method is provided. As Figure 7As shown, the method comprises the following steps:
[0128] Step 1, after the PPPoE client is authenticated by the operator network, the local SID and the SID of the PPPoE server are obtained, which can be the data interaction between the PPPoE client and the management platform + AAA to realize the authentication of the operator network.
[0129] Step 2, the PPPoE client encapsulates the message in the IPv6 tunnel message, initiates the PPPoE authentication, establishes the PPPoE session, and obtains the service address.
[0130] Step 3, the PPPoE client initiates the VPN traffic, and encapsulates the message in the IPv6 tunnel message.
[0131] Step 4, the PPPoE server records the binding relationship of the local record remote SID (or IPv6 address), inner IP address, PPPoE session, etc.
[0132] Step 5, the PPPoE server finds that the destination SID is itself, then based on the opcode carried in the target SID, the IPv6 header and the PPPoE header are stripped, and forwarded to the corresponding VPN channel.
[0133] Step 6, the backhaul traffic reaches the PPPoE server, that is, the other communication devices send the backhaul traffic to the PPPoE server through the network.
[0134] Step 7, the PPPoE server encapsulates the remote SID and sends it to the PPPoE client.
[0135] Step 8, the PPPoE client removes the IPv6 tunnel header and the PPPoE header, and sends the data packet to the inner network terminal.
[0136] The data forwarding method provided by the embodiment can expand the original UP pool / MSE large two-layer VPN establishment mode to support three-layer VPN establishment, and realize the establishment of the outer SRV6 tunnel based on the traffic-driven mode. After receiving the uplink traffic of the PPPoE client, the PPPoE server end can internally establish the binding relationship of the remote SID (that is, the SID of the PPPoE client) and the PPPoE session, IP address, etc., so that the tunnel can be established between the PPPoE server end and the client without additional control plane interaction, greatly simplifying the PPPoE client capability and saving the network resources consumed by the control plane signaling interaction.
[0137] It should be understood that, although Figures 1-7The steps in the flowchart of FIG. 1 are displayed in sequence according to the arrows, but the steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified herein, the execution of the steps is not strictly limited in sequence, and the steps can be executed in other orders. Moreover, Figures 1-7 At least a part of the steps in the flowchart of FIG. 1 can include multiple steps or multiple stages, which are not necessarily executed at the same time, but can be executed at different times, and the execution order of the steps or stages is not necessarily sequential, but can be executed alternately or alternately with at least a part of other steps or steps or stages in other steps.
[0138] In one embodiment, as shown in FIG. 8, a data forwarding apparatus 800 is provided, applied to a PPPoE server end, comprising: a first receiving module 802, an encapsulation module 804 and a first sending module 806, wherein: Figure 8
[0139] The first receiving module 802 is configured to receive a user data packet, and determine an address of a target PPPoE client corresponding to a destination address of the user data packet based on a preset correspondence between the destination address and the address of the client.
[0140] The encapsulation module 804 is configured to encapsulate the user data packet based on a PPPoE header and an Internet protocol tunnel header to obtain an encapsulated data packet.
[0141] The first sending module 806 is configured to send the encapsulated data packet to the target PPPoE client through an Internet protocol tunnel based on the address of the target PPPoE client, so that the target PPPoE client processes based on the encapsulated data packet.
[0142] In one embodiment, the first receiving module is specifically configured to:
[0143] Receive the user data packet through a VPN channel.
[0144] In one embodiment, the encapsulation module is specifically configured to:
[0145] Encapsulate the user data packet based on the PPPoE header to obtain a first data packet;
[0146] Encapsulate the first data packet through the Internet protocol tunnel header to obtain the encapsulated data packet.
[0147] In one embodiment, the first sending module is specifically configured to:
[0148] determine a source address of the Internet protocol tunnel based on the local address, and determine a destination address of the Internet protocol tunnel based on an address of the target PPPoE client;
[0149] send the encapsulated data packet to the target PPPoE client through the Internet protocol tunnel, the address of the target PPPoE client comprising a segment identification operation code, the segment identification operation code being used to instruct the target PPPoE client to process the data packet.
[0150] In one embodiment, as shown in Figure 9 a data forwarding apparatus 900 applied to a PPPoE client is provided, comprising a second receiving module 902, an encapsulation module 904 and a second sending module 906, wherein:
[0151] The second receiving module 902 is configured to receive an encapsulated data packet sent by a PPPoE server.
[0152] The encapsulation module 904 is configured to, if it is determined that a destination address of an Internet protocol tunnel corresponding to the encapsulated data packet is a local address, perform an encapsulation processing on the encapsulated data packet based on a segment identification operation code in the destination address, to obtain a user data packet.
[0153] The second sending module 906 is configured to forward the user data packet to a device connected with the PPPoE client.
[0154] In one embodiment, the encapsulation module is specifically configured to:
[0155] perform a removal processing on an Internet protocol tunnel header and a PPPoE header contained in the encapsulated data packet, to obtain a user data packet.
[0156] For specific limitations of the data forwarding apparatus, refer to the limitations of the data forwarding method in the foregoing, which will not be repeated here. Each module in the data forwarding apparatus can be realized by software, hardware and combinations thereof in whole or in part. Each module can be embedded in or independent of a processor in a computer device in hardware form, or can be stored in a memory in a computer device in software form, so as to be called and executed by a processor to perform operations corresponding to each module.
[0157] In one embodiment, a communication device is provided, as shown in Figure 10 . Figure 10 is a structural schematic diagram of a terminal device provided by an embodiment of the present application. Figure 10The terminal device 1000 shown includes at least one processor 1001, a memory 1002, at least one network interface 1004, and a user interface 1003. The various components of the terminal device 1000 are coupled together by a bus system 1005. As will be appreciated by those skilled in the art, the bus system 1005 is configured to perform communicative coupling of the components connected thereto. In this regard, the bus system 1005 includes a data bus to facilitate the transfer of data among the components, a control bus to facilitate the transfer of control signals among the components, and a status bus to facilitate the transfer of status information among the components. For the sake of clarity, the various buses are shown as the bus system 1005 in Figure 10 the drawings. Additionally, the embodiments of the present application include a transceiver 1006, which can be multiple elements, i.e., including a transmitter and a receiver, that provides means for communicating with various other apparatus over a transmission medium.
[0158] The user interface 1003 can include a display, a keyboard, or a pointing device (e.g., a mouse, a trackball, a touchpad, or a touchscreen).
[0159] It is to be understood that the memory 1002 of the embodiments of the present application can be volatile or nonvolatile memory, or can include both volatile and nonvolatile memory. In this regard, the nonvolatile memory can be read-only memory (ROM), programmable ROM (PROM), erasable programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. The volatile memory can be random access memory (RAM), which acts as external cache. By way of example, and not limitation, many forms of RAM are available, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous dynamic RAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), Synchlink DRAM (SLDRAM), and direct Rambus RAM (DRRAM). The memory 1002 of the system and method of the embodiments of the present application is intended to include, without being limited to, these and any other suitable types of memory.
[0160] In some embodiments, the memory 1002 stores an operating system 10021 and an application program 10022, or a subset or an extension thereof, including the following elements.
[0161] The operating system 10021 includes various system programs, such as a framework layer, a core library layer, a driver layer, etc., for implementing various basic services and processing hardware-based tasks. The application program 10022 includes various application programs, such as a media player (MediaPlayer), a browser (Browser), etc., for implementing various application services. The program for implementing the method of the embodiments of the present application can be included in the application program 10022.
[0162] In the embodiments of the present application, by invoking the program or instruction stored in the memory 1002, specifically, the program or instruction stored in the application program 10022, the receiver is configured to receive a user data packet, determine the address of a target PPPoE client corresponding to the destination address of the user data packet based on the correspondence between the preset destination address and the address of the client; the processor is configured to encapsulate the user data packet based on the PPPoE header and the Internet protocol tunnel header to obtain an encapsulated data packet; and the processor is further configured to send the encapsulated data packet to the target PPPoE client through the Internet protocol tunnel and the transmitter based on the address of the target PPPoE client, so that the target PPPoE client processes the encapsulated data packet.
[0163] Part or all of the methods disclosed in the embodiments of the present application can also be applied to the processor 1001, or implemented by the processor 1001, or implemented by the processor 1001 in cooperation with other elements (for example, a transceiver). The processor 1001 can be an integrated circuit chip having a processing capability. In the implementation process, each step of the above method can be completed by integrated logic circuits or instructions in the form of software in the processor 1001. The processor 1001 described above can be a general processor, a digital signal processor (Digital Signal Processor, DSP), an application specific integrated circuit (Application Specific Integrated Circuit, ASIC), a field programmable gate array (Field Programmable Gate Array, FPGA) or other programmable logic device, a discrete gate or transistor logic device, a discrete hardware component. Each method, step and logic block disclosed in the embodiments of the present application can be implemented or executed. The general processor can be a microprocessor or the processor can also be any conventional processor. The steps of the method disclosed in combination with the embodiments of the present application can be directly embodied as a hardware code processor for execution, or a combination of hardware and software modules in the code processor for execution. The software module can be located in a random access memory, a flash memory, a read only memory, a programmable read only memory or an electrically erasable programmable memory, a register or other mature storage medium in the art. The storage medium is located in the memory 1002, and the processor 1001 reads the information in the memory 1002, and combines the hardware to complete the steps of the above method.
[0164] It can be understood that the embodiments described in the embodiments of the present application can be realized by hardware, software, firmware, middleware, microcode or a combination thereof. For hardware implementation, the processing unit can be realized in one or more application specific integrated circuits (Application Specific Integrated Circuits, ASIC), digital signal processors (Digital Signal Processing, DSP), digital signal processing devices (DSP Device, DSPD), programmable logic devices (Programmable Logic Device, PLD), field programmable gate arrays (Field-Programmable Gate Array, FPGA), general processors, controllers, microcontrollers, microprocessors, other electronic units for executing functions described in the present application or a combination thereof.
[0165] For software implementation, the techniques described in the embodiments of the present application can be implemented by means of a module (for example, procedures, functions, and so on) for performing the functions described in the embodiments of the present application. Software codes can be stored in the memory and executed by the processor 1001. The memory can be implemented in the processor 1001 or outside the processor 1001.
[0166] In one of the embodiments, the receiver is further configured to receive the user data packet through the VPN channel.
[0167] In one of the embodiments, the processor 1001 is further configured to encapsulate the user data packet based on the PPPoE header to obtain a first data packet, and encapsulate the first data packet through an Internet protocol tunnel header to obtain an encapsulated data packet.
[0168] In one of the embodiments, the processor 1001 is further configured to determine a source address of the Internet protocol tunnel based on the local address, and determine a destination address of the Internet protocol tunnel based on the address of the target PPPoE client, and send the encapsulated data packet to the target PPPoE client through the Internet protocol tunnel, wherein the address of the target PPPoE client comprises a segment identification operation code, and the segment identification operation code is used to instruct the target PPPoE client to process the packet.
[0169] In the embodiments of the present application, the program or instruction stored in the memory 1002 is called, and specifically, the program or instruction stored in the application program 10022 can be called. The receiver is configured to receive the encapsulated data packet sent by the PPPoE server. The processor 1001 is further configured to, if it is determined that the destination address of the Internet protocol tunnel corresponding to the encapsulated data packet is a local address, perform decapsulation processing on the encapsulated data packet based on the segment identification operation code in the destination address to obtain a user data packet. The transmitter is further configured to forward the user data packet to the device connected with the PPPoE client.
[0170] In one of the embodiments, the processor 1001 is further configured to remove the Internet protocol tunnel header and the PPPoE header included in the encapsulated data packet to obtain a user data packet.
[0171] In one of the embodiments, a computer readable storage medium is provided, and the computer readable storage medium stores a computer program. When the computer program is executed by a processor, the following steps are implemented:
[0172] The user data packet is received, and the address of the target PPPoE client corresponding to the destination address of the user data packet is determined based on the preset correspondence between the destination address and the address of the client.
[0173] encapsulate the user data packet based on the PPPoE header and the Internet protocol tunnel header to obtain an encapsulated data packet;
[0174] send the encapsulated data packet to the target PPPoE client through the Internet protocol tunnel based on the address of the target PPPoE client, so that the target PPPoE client processes based on the encapsulated data packet.
[0175] In one embodiment, the computer program, when executed by the processor, further implements the following steps:
[0176] receive a user data packet through a VPN channel.
[0177] In one embodiment, the computer program, when executed by the processor, further implements the following steps:
[0178] encapsulate the user data packet based on the PPPoE header to obtain a first data packet;
[0179] encapsulate the first data packet through the Internet protocol tunnel header to obtain an encapsulated data packet.
[0180] In one embodiment, the computer program, when executed by the processor, further implements the following steps:
[0181] determine a source address of the Internet protocol tunnel based on a local address, and determine a destination address of the Internet protocol tunnel based on an address of a target PPPoE client;
[0182] send the encapsulated data packet to the target PPPoE client through the Internet protocol tunnel, the address of the target PPPoE client containing a segment identification operation code, the segment identification operation code being used to instruct the target PPPoE client to process the packet.
[0183] In one embodiment, a computer readable storage medium is provided, and the computer readable storage medium stores a computer program, and the computer program, when executed by a processor, implements the following steps:
[0184] receive an encapsulated data packet sent by a PPPoE server;
[0185] if it is determined that a destination address of an Internet protocol tunnel corresponding to the encapsulated data packet is a local address, then perform decapsulation processing on the encapsulated data packet based on a segment identification operation code in the destination address to obtain a user data packet;
[0186] forward the user data packet to a device connected with the PPPoE client.
[0187] In one embodiment, the computer program, when executed by the processor, further implements the following steps:
[0188] The Internet protocol tunnel header and the PPPoE header contained in the encapsulated data packet are removed to obtain a user data packet.
[0189] The embodiments of the present application further provide a computer program product containing instructions, which, when executed on a computer, cause the computer to perform the following steps:
[0190] The user data packet is received, and based on a preset correspondence between a destination address and an address of the client, an address of a target PPPoE client corresponding to the destination address of the user data packet is determined;
[0191] The user data packet is encapsulated based on the PPPoE header and the Internet protocol tunnel header to obtain an encapsulated data packet;
[0192] Based on the address of the target PPPoE client, the encapsulated data packet is sent to the target PPPoE client through an Internet protocol tunnel, so that the target PPPoE client processes based on the encapsulated data packet.
[0193] The embodiments of the present application further provide a computer program product containing instructions, which, when executed on a computer, cause the computer to perform the following steps:
[0194] The encapsulated data packet sent by the PPPoE server is received;
[0195] If it is determined that a destination address of an Internet protocol tunnel corresponding to the encapsulated data packet is a local address, the encapsulated data packet is decapsulated based on a segment identifier operation code in the destination address to obtain a user data packet;
[0196] The user data packet is forwarded to a device connected with the PPPoE client.
[0197] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a non-volatile computer readable storage medium, and when executed, can include the processes of the above-mentioned embodiment methods. Any reference to memory, storage, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory or optical memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration but not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM).
[0198] Any combination of the technical features of the above embodiments can be made. In order to make the description simple, all possible combinations of the technical features in the above embodiments are not described, but as long as the combination of the technical features does not exist, it should be considered as the scope of the present application.
[0199] The above embodiments only express several implementation manners of the present application, and the description is more specific and detailed, but it should not be understood as a limitation on the scope of the patent. It should be pointed out that for those skilled in the art, without departing from the concept of the present application, some modifications and improvements can be made, which are all within the protection scope of the present application. Therefore, the protection scope of the patent of the present application should be subject to the appended claims.
Claims
1. A data forwarding method, characterized by, The method is applied to a PPPoE server, and the method comprises the following steps: receiving a user data packet, determining an address of a target PPPoE client corresponding to a destination address of the user data packet based on a preset corresponding relationship between the destination address and the address of the client; performing encapsulation on the user data packet based on a PPPoE header and an Internet protocol tunnel header to obtain an encapsulated data packet; sending the encapsulated data packet to the target PPPoE client through an Internet protocol tunnel based on the address of the target PPPoE client, so that the target PPPoE client performs processing based on the encapsulated data packet; the address of the target PPPoE client comprises a segment identification operation code, and the segment identification operation code is used to instruct the target PPPoE client to perform packet processing.
2. The method of claim 1, wherein, The receiving of the user data packet comprises the following steps: receiving the user data packet through a VPN channel.
3. The method of claim 1, wherein, The encapsulation of the user data packet based on the PPPoE header and the Internet protocol tunnel header to obtain the encapsulated data packet comprises the following steps: performing encapsulation on the user data packet based on the PPPoE header to obtain a first data packet; performing encapsulation on the first data packet through the Internet protocol tunnel header to obtain the encapsulated data packet.
4. The method of claim 1, wherein, The sending of the encapsulated data packet to the target PPPoE client through the Internet protocol tunnel based on the address of the target PPPoE client comprises the following steps: determining a source address of the Internet protocol tunnel based on a local address and determining a destination address of the Internet protocol tunnel based on the address of the target PPPoE client; sending the encapsulated data packet to the target PPPoE client through the Internet protocol tunnel.
5. The method of claim 4, wherein, The segment identification operation code is End.DX3PPPoE.
6. A data forwarding method characterized by, The method is applied to a PPPoE client, and the method comprises the following steps: receiving an encapsulated data packet sent by a PPPoE server; the encapsulated data packet is obtained by performing encapsulation on a user data packet based on a PPPoE header and an Internet protocol tunnel header; if it is determined that a destination address of an Internet protocol tunnel corresponding to the encapsulated data packet is a local address, performing decapsulation processing on the encapsulated data packet based on a segment identification operation code in the destination address to obtain a user data packet; the segment identification operation code is used to instruct a target PPPoE client to perform packet processing; forwarding the user data packet to a device connected to the PPPoE client.
7. The method of claim 6, wherein, The decapsulation processing of the encapsulated data packet based on the segment identification operation code in the destination address to obtain the user data packet comprises the following steps: performing removal processing on an Internet protocol tunnel header and a PPPoE header contained in the encapsulated data packet to obtain the user data packet.
8. The method according to claim 6 or 7, characterized in that, The segment identification operation code is End.DX3PPPoE.
9. A data forwarding apparatus, characterized by comprising: The device is applied to a PPPoE server, and the device comprises the following steps: The first receiving module is configured to receive a user data packet, and determine an address of a target PPPoE client corresponding to a destination address of the user data packet based on a preset correspondence between the destination address and the address of the client. The encapsulating module is configured to encapsulate the user data packet based on a PPPoE header and an Internet protocol tunnel header to obtain an encapsulated data packet. The first sending module is configured to send the encapsulated data packet to the target PPPoE client through an Internet protocol tunnel based on the address of the target PPPoE client, so that the target PPPoE client processes the encapsulated data packet. The address of the target PPPoE client contains a segment identification operation code, and the segment identification operation code is used to instruct the target PPPoE client to process the data packet.
10. A data forwarding apparatus characterized by comprising: The device is applied to a PPPoE client and includes: The second receiving module is configured to receive an encapsulated data packet sent by a PPPoE server. The encapsulated data packet is obtained by encapsulating a user data packet based on a PPPoE header and an Internet protocol tunnel header. The decapsulating module is configured to, if it is determined that a destination address of an Internet protocol tunnel corresponding to the encapsulated data packet is a local address, perform decapsulation processing on the encapsulated data packet based on a segment identification operation code in the destination address to obtain a user data packet. The segment identification operation code is used to instruct a target PPPoE client to process the data packet. The second sending module is configured to forward the user data packet to a device connected to the PPPoE client.
11. A communication device, characterized by The device includes: a transmitter, a processor and a receiver; The receiver is configured to receive a user data packet, and determine an address of a target PPPoE client corresponding to a destination address of the user data packet based on a preset correspondence between the destination address and the address of the client. The processor is configured to encapsulate the user data packet based on a PPPoE header and an Internet protocol tunnel header to obtain an encapsulated data packet. The processor is further configured to send the encapsulated data packet to the target PPPoE client through an Internet protocol tunnel and the transmitter based on the address of the target PPPoE client, so that the target PPPoE client processes the encapsulated data packet. The address of the target PPPoE client contains a segment identification operation code, and the segment identification operation code is used to instruct the target PPPoE client to process the data packet.
12. A computer readable storage medium having stored thereon a computer program, characterized in that, The computer program is executed by the processor to implement the steps of the method in any one of claims 1 to 8.
13. A computer program product comprising a computer program, characterized in that, The computer program is executed by the processor to implement the steps of the method in any one of claims 1 to 8.
Citation Information
Patent Citations
PPPOE (point-to-point protocol over Ethernet) message forwarding method and BRAS (broadband remote access server)
CN105099898A
Path establishment method, data transmission method and device, network node and storage medium
CN113382452A