Protocol message generation method and device, electronic equipment and computer program product
By adding user line information directly to the target message generated during the Ethernet point-to-point protocol discovery phase on the user terminal, and then having the access device replace the user line information, the risk of user line information being misused is eliminated, thus improving security and testing efficiency.
Patent Information
- Application Number
- CN202510007263.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-02
- Publication Date
- 2025-11-18
- Estimated Expiration
- 2045-01-02
AI Technical Summary
In existing technologies, user line information is easily misused, leading to the risk of account theft. Furthermore, it is highly complex in troubleshooting and business testing, and cannot achieve automated testing that is imperceptible to the tested users.
The user terminal generates a target message for the discovery phase of the Ethernet Point-to-Point Protocol (PPP), directly adds an Ethernet PPP tag to the payload field, includes user line information, and replaces the user line information with the access device to generate a device message for authentication.
This technology enables the direct addition of user line information to the target message generated during the discovery phase on the user terminal, preventing interception and misuse by third-party devices, improving the security of user line information, simplifying fault handling and testing processes, reducing manpower expenditure, and making testing seamless.
Smart Images

Figure CN119652980B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of communication technology, and more specifically, to a method, apparatus, electronic device, and computer program product for generating protocol messages. Background Technology
[0002] With the increasing prevalence of IP-based network construction and the continuous enrichment of user service types, the demand for more refined and flexible control over user service data is growing. Currently, the OLT (Optical Line Terminal) is the primary access device for broadband, but its upstream BRAS (Broadband Access System) cannot or has difficulty obtaining user port information from Ethernet packets of the PPPoE protocol. Therefore, it cannot perform unified authentication management of user ports and cannot effectively prevent user account theft. Thus, it is necessary to strengthen the identification of user ports (also known as user lines). In accordance with the industry standard "Access Network Technical Requirements Broadband—User Access Line (Port) Identification" (YD / T 2275-2011), the mainstream approach uses PPPoE+ technology to identify user ports (also known as user lines) and achieves precise binding and traceability through RADIUS (Radius Indicator). However, existing technologies have significant limitations.
[0003] 1) PPPoE+ is implemented on access devices (OLT, switches, etc.). Under normal circumstances, it can correctly identify users. However, in maintenance work such as fault diagnosis and testing, when using personal terminals to perform dial-up tests on non-user access lines, it is necessary to modify the access devices at the test points, which makes the test very complicated.
[0004] 2) Automated simulation testing requires modifying the user's information in the RADIUS, making it impossible to perform the test without the user's awareness.
[0005] 3) No consideration was given to how to process counterfeit user line information on the access device.
[0006] Therefore, the existing solution requires the access device to identify PADI and PADR data and insert the user line identification attribute field. In this mode, the access device is indispensable and must support PPPoE+. This is very inconvenient in scenarios such as troubleshooting and business testing. It cannot be done without the user being tested being aware of it, and there is a risk that the user line information will be misused, leading to account theft.
[0007] There is currently no effective solution to the problem of user line information being misused in the aforementioned existing technologies. Summary of the Invention
[0008] This invention provides a method, apparatus, electronic device, and computer program product for generating protocol messages, in order to at least solve the technical problem of the risk of user line information being misused in the prior art.
[0009] According to one aspect of the present invention, a method for generating a protocol message is provided, comprising: a user terminal acquiring user line information of the user terminal; and generating an Ethernet Point-to-Point Protocol discovery phase target message based on the user line information, wherein the discovery phase target message includes at least: a payload field, wherein an Ethernet Point-to-Point Protocol tag is added to the payload field, and the Ethernet Point-to-Point Protocol tag is configured with the user line information.
[0010] Optionally, generating a target message for the discovery phase of the Ethernet Point-to-Point Protocol (PPP) based on the user line information includes: generating a preset message for the discovery phase via the user terminal, wherein the preset message for the discovery phase includes at least the payload field; adding the Ethernet PPP tag to the payload field of the preset message for the discovery phase via the user terminal, wherein the Ethernet PPP tag includes at least a value field; and concatenating the user line information to the end of the value field of the Ethernet PPP tag in the preset message for the discovery phase via the user terminal to obtain the target message for the discovery phase.
[0011] Optionally, generating the discovery phase target message of the Ethernet Point-to-Point Protocol based on the user line information includes: generating an active discovery initial message for broadcasting to the network server through the user terminal based on the user line information, wherein the active discovery initial message is the discovery phase target message.
[0012] Optionally, generating an Ethernet Point-to-Point Protocol discovery phase message based on the user line information includes: receiving an active discovery proposal message returned by the network server in response to the active discovery initial message through the user terminal; and generating an active discovery request message in response to the active discovery proposal message through the user terminal, wherein the active discovery request message is the discovery phase target message.
[0013] Optionally, the user terminal obtaining the user line information of the user terminal includes: identifying the terminal information of the user terminal, wherein the terminal information includes at least the following multiple information items: the access node identifier, rack, frame, slot, sub-slot, access port, and optical network identifier of the optical network unit of the user terminal; and arranging the multiple information items in the following order to obtain the user line information: the access node identifier, the rack, the frame, the slot, the sub-slot, the access port, and the optical network identifier.
[0014] Optionally, after generating a discovery phase target message for the Ethernet Point-to-Point Protocol based on the user line information, the method further includes: if the discovery phase target message is an active discovery proposal message, receiving an active discovery confirmation message returned by a network server through the user terminal, wherein the active discovery confirmation message includes at least a session identifier; and generating the Point-to-Point Protocol session based on the session identifier in response to the active discovery confirmation message through the user terminal.
[0015] Optionally, after generating the peer-to-peer protocol session based on the session identifier in response to the active discovery confirmation message via the user terminal, the method further includes: obtaining user account information and password information via the user terminal; and initiating authentication of the user terminal via the peer-to-peer protocol session based on the user account information and the password information.
[0016] According to another aspect of the present invention, a method for generating protocol messages is also provided, comprising: receiving, via an access device, a discovery phase target message of Ethernet Point-to-Point Protocol sent by a user terminal, wherein the discovery phase target message includes at least: a payload field, wherein an Ethernet Point-to-Point Protocol tag is added to the payload field, and the user line information of the user terminal is added to the value field of the Ethernet Point-to-Point Protocol tag; replacing the user line information in the discovery phase target message with the device line information of the access device to obtain a discovery phase device message, wherein the discovery phase device message is sent by the access device to a remote user dial-up authentication system for information authentication.
[0017] Optionally, replacing the user line information in the discovery phase target message with the device line information of the access device to obtain the discovery phase device message includes: obtaining a message replacement command through the user access port of the access device; in response to the message replacement command, obtaining the device line information of the access device, and replacing the user line information in the discovery phase target message with the device line information of the access device to obtain the discovery phase device message.
[0018] According to another aspect of the present invention, a protocol message generation apparatus is also provided, comprising: an acquisition module, configured to control a user terminal to acquire user line information of the user terminal; and a generation module, configured to generate an Ethernet Point-to-Point Protocol discovery phase target message based on the user line information, wherein the discovery phase target message includes at least: a payload field, wherein an Ethernet Point-to-Point Protocol tag is added to the payload field, and the user line information is set in the Ethernet Point-to-Point Protocol tag.
[0019] According to another aspect of the present invention, a protocol message generation apparatus is also provided, comprising: a receiving module, configured to receive, via an access device, a discovery phase target message of an Ethernet Point-to-Point Protocol sent by a user terminal, wherein the discovery phase target message includes at least: a payload field, wherein an Ethernet Point-to-Point Protocol tag is added to the payload field, and the user line information of the user terminal is added to the value field of the Ethernet Point-to-Point Protocol tag; and a replacement module, configured to replace the user line information in the discovery phase target message with the device line information of the access device to obtain a discovery phase device message, wherein the discovery phase device message is sent by the access device to a remote user dial-up authentication system for information authentication.
[0020] According to another aspect of the present invention, an electronic device is also provided, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to execute the above-described protocol message generation method through the computer program.
[0021] According to another aspect of the present invention, a computer program product is also provided, including computer instructions that, when executed by a processor, implement the steps of the above-described protocol message generation method.
[0022] In the above embodiments of this application, the user terminal obtains the user line information of the user terminal; based on the user line information, it generates a discovery phase target message of the Ethernet Point-to-Point Protocol (PPP). The discovery phase target message includes at least: a payload field, an Ethernet PPP tag added to the payload field, and user line information set in the Ethernet PPP tag. This achieves the goal of directly adding the user line information to the discovery phase target message generated by the user terminal. Therefore, after the discovery phase target message is generated by the user terminal and before it is transmitted to the Ethernet access device, it is not necessary to modify the discovery phase target message. This achieves the technical effect of preventing third-party devices from intercepting and misusing the user line information, thereby solving the technical problem of the risk of user line information being misused in the prior art. Attached Figure Description
[0023] The accompanying drawings, which are included to provide a further understanding of the invention and form part of this application, illustrate exemplary embodiments of the invention and, together with their description, serve to explain the invention and do not constitute an undue limitation thereof. In the drawings:
[0024] Figure 1 This is a flowchart of a protocol message generation method according to an embodiment of the present invention. Figure 1 ;
[0025] Figure 2This is a schematic diagram of a conventional PPPoE+ protocol exchange process according to an embodiment of the present invention;
[0026] Figure 3 This is a schematic diagram of a PPPoE frame structure according to an embodiment of the present invention;
[0027] Figure 4 This is a schematic diagram of an Actively Discovered Termination Message (PADT) according to an embodiment of the present invention;
[0028] Figure 5 This is a flowchart of a protocol message generation method according to an embodiment of the present invention. Figure 2 ;
[0029] Figure 6 This is a schematic diagram of a PPPoE+ protocol exchange process according to an embodiment of the present invention;
[0030] Figure 7 This is a schematic diagram of a protocol message generation apparatus according to an embodiment of the present invention. Figure 1 ;
[0031] Figure 8 This is a schematic diagram of a protocol message generation apparatus according to an embodiment of the present invention. Figure 2 ;
[0032] Figure 9 This is a structural block diagram of a computer terminal according to an embodiment of the present invention. Detailed Implementation
[0033] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.
[0034] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0035] First, some nouns or terms that appear in the description of the embodiments of this application shall be interpreted as follows:
[0036] PPPoE: PPP over Ethernet, Ethernet Point-to-Point Protocol, is a network tunneling protocol that encapsulates the Point-to-Point Protocol (PPP) within the Ethernet framework.
[0037] PPPoE+: PPPoE Intermediate Agent, is an extension and enhancement of the traditional PPPoE (Ethernet Point-to-Point Protocol). It is primarily used in Ethernet environments to implement connection authentication and data transmission between user terminals and broadband access servers.
[0038] BRAS: Broadband Remote Access Server, responsible for authenticating, authorizing, and accounting for user access (AAA). It verifies user identity information, determines whether a user is authorized to access the network, and allocates appropriate network resources and permissions to the user.
[0039] RADIUS: Remote Authentication Dial In User Service. The RADIUS server is responsible for authenticating user identities. When a user attempts to connect to the network, the access device (such as a BRAS) sends the user's authentication information to the RADIUS server.
[0040] OLT: Optical Line Terminal. The OLT is mainly responsible for converting optical signals from the upper-layer network into electrical signals and distributing the signals to each ONU (Optical Network Unit) through the optical fiber distribution network.
[0041] PDA: Personal Digital Assistant, which can store a large amount of data and has some office software functions.
[0042] PADI: PPPoE Active Discovery Initiation, is the initial discovery message sent by the client (user device) when establishing a PPPoE connection over Ethernet.
[0043] PADR: PPPoE Active Discovery Request, is an important message in the process of establishing a PPPoE connection over Ethernet. When the client receives a PADO (PPPoE Active Discovery Offer) message from an access device, it selects one of the access devices and sends a PADR message to that device to confirm the connection request.
[0044] According to an embodiment of the present invention, a method for generating protocol messages is provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.
[0045] Figure 1 This is a flowchart of a protocol message generation method according to an embodiment of the present invention. Figure 1 ,like Figure 1 As shown, the method includes the following steps:
[0046] Step S102: The user terminal obtains the user line information of the user terminal;
[0047] Step S104: Based on the user line information, generate a target message for the discovery phase of the Ethernet Point-to-Point Protocol (PPP). The target message for the discovery phase includes at least: a payload field, an Ethernet PPP tag added to the payload field, and user line information set in the Ethernet PPP tag.
[0048] In the above embodiments of this application, the user terminal obtains the user line information of the user terminal; based on the user line information, it generates a discovery phase target message of the Ethernet Point-to-Point Protocol (PPP). The discovery phase target message includes at least: a payload field, an Ethernet PPP tag added to the payload field, and user line information set in the Ethernet PPP tag. This achieves the goal of directly adding the user line information to the discovery phase target message generated by the user terminal. Therefore, after the discovery phase target message is generated by the user terminal and before it is transmitted to the Ethernet access device, it is not necessary to modify the discovery phase target message. This achieves the technical effect of preventing third-party devices from intercepting and misusing the user line information, thereby solving the technical problem of the risk of user line information being misused in the prior art.
[0049] In step S102 above, the user terminal can be a personal terminal, such as a personal computer (PC) or a handheld terminal (PDA), used to request access to Ethernet based on the Ethernet Point-to-Point Protocol (PPPoE).
[0050] It should be noted that PPPoE (Point-to-Point Protocol over Ethernet) does indeed include two main phases: the Discovery Stage and the PPPSession Stage.
[0051] Optionally, the main purpose of the Discovery Stage is to locate an access device in the network and establish an initial connection for a PPPoE session.
[0052] Alternatively, the access device may be a Broadband Remote Access Server (BRAS).
[0053] Optionally, the Discovery Stage includes the following steps:
[0054] PADI (PPPoE Active Discovery Initiation): A user terminal broadcasts a PADI message to search for available access devices.
[0055] PADO (PPPoE Active Discovery Offer): After receiving a PADI message, if the access device is able to provide the required service, it will unicast a PADO message in response.
[0056] PADR (PPPoE Active Discovery Request): The user terminal selects one of the multiple PADO messages it may receive and sends a PADR message to the selected access device to request the establishment of a session.
[0057] PADS (PPPoE Active Discovery Session-confirmation): After receiving the PADR message, the access device generates a unique session ID and sends this session ID to the user terminal through the PADS message to confirm the establishment of the session.
[0058] After completing these steps, the user terminal and the access device establish a PPPoE session and learn each other's Ethernet address and session identifier.
[0059] Optionally, the PPP Session Stage is the standard PPP procedure performed on the basis of the PPPoE session established during the discovery phase. This stage includes the following steps:
[0060] LCP (Link Control Protocol) negotiation: Both parties establish, configure, and test data link connections through LCP negotiation. This includes negotiating parameters such as the working mode (e.g., single-link or multi-link connection) and maximum receiver unit (MRU).
[0061] Authentication phase: User authentication is performed using PAP (Password Authentication Protocol) or CHAP (Challenge Handshake Authentication Protocol) to verify the validity of the username and password.
[0062] NCP (Network Control Protocol) negotiation: Negotiates different network layer protocols, such as IPCP (IP Control Protocol) used to configure user IP addresses and DNS server addresses.
[0063] After completing these PPP negotiations, both parties can transmit network layer data packets over the PPPoE session. If it is necessary to terminate the PPPoE session, either party can send a PADT (PPPoE Active Discovery Terminate) message to end the session.
[0064] In summary, the Discovery Stage and the PPP Session Stage together constitute the complete workflow of the PPPoE protocol, enabling users to connect to remote networks via Ethernet and enjoy various network services.
[0065] Figure 2 This is a schematic diagram of a conventional PPPoE+ protocol exchange process according to an embodiment of the present invention, as shown below. Figure 2 As shown, PPPoE+ (PPPoE Intermediate Agent) is an extension and enhancement of the traditional PPPoE (Point-to-Point Protocol over Ethernet). It is primarily used in Ethernet environments to implement connection authentication and data transmission between user terminals and broadband access servers. During the PPPoE+ protocol exchange process, a PPPoE Intermediate Agent / Agent is added between the user terminal (Client) and the Broadband Remote Access Server (BRAS). This allows the interception of the Active Discovery Initiation Message (PADI) and Active Discovery Request Message (PADR) sent by the user terminal (Client) to the BRAS, and the insertion of the user line information uPortID into the PADI and PADR messages.
[0066] However, the user line information uPortID in the target message (such as PADI or PADR) during the discovery phase is added by the proxy server (such as PPPoE intermediate proxy / agent). Therefore, the user line information uPortID is also provided by the proxy server. Since the security of the proxy server cannot be controlled, the user line information uPortID provided by the proxy server is at risk of being forged.
[0067] In step S104 above, the target message in the discovery phase can be a PPPoE frame. The PPPoE frame exists as the payload of an Ethernet frame. When an Ethernet frame is a PPPoE frame, its type / length field (Len / Type field) should be 0x8863 (indicating the PPPoE discovery phase) or 0x8864 (indicating the PPPoE session phase, i.e., the PPP session phase).
[0068] Figure 3 This is a schematic diagram of a PPPoE frame structure according to an embodiment of the present invention, as shown below. Figure 3As shown, a PPPoE frame contains fields such as version number (Ver), type (Type), code (Code), session ID (Session-ID, also known as session identifier), length (Length), and payload (Payload). The payload field has different formats at different stages. For example, during the discovery phase, the payload is filled with tags (such as Ethernet Point-to-Point Protocol tags); during the session phase, the payload carries the PPP message.
[0069] Optionally, the target messages in the discovery phase include: Active Discovery Initiation Message (PADI) and Active Discovery Request Message (PADR).
[0070] Optionally, the PADI message structure includes: Ethernet header and PPPoE header.
[0071] Optionally, the Ethernet header may include at least: a destination MAC address, such as the broadcast address 0xffffffffffff; a source MAC address, such as the client's MAC address; and a type / length, such as "0x0886" representing the PPPoE protocol.
[0072] Optionally, the PPPoE header includes at least: Version (Ver), such as "0x1" indicating PPPoE version 1; Type (Type): such as "0x1" in combination with the Ver field to indicate PPPoE; Code (Code): such as "0x09" indicating PADI message; Session ID (Session ID): such as 0x0000 if the session ID is 0 during the discovery phase; Length (Length): indicating the length of the subsequent payload (excluding Ethernet and PPPoE headers); and Payload field.
[0073] Optionally, the payload field includes a service-name tag and an Ethernet point-to-point protocol tag, i.e., a PPPoE tag.
[0074] Optionally, the service name tag includes: Tag Type: such as 0x0101; Tag Length: the length of the subsequent Value field; Value field: such as a string of the service name (usually an ASCII encoded string).
[0075] Optionally, the Ethernet point-to-point protocol label includes: Tag Type: such as 0x0105; Tag Length: such as 0x0004 (assuming the Value field is 4 bytes); Value field: such as "0x000DE9" + user line information, where the user line information should immediately follow 0x000DE9, and the specific value should be filled in according to the actual situation.
[0076] Optionally, the message structure of PADR is similar to that of PADI, and will not be described in detail here.
[0077] As an optional embodiment, generating a target message for the discovery phase of the Ethernet Point-to-Point Protocol (PPP) based on user line information includes: generating a preset message for the discovery phase via a user terminal, wherein the preset message for the discovery phase includes at least a payload field; adding an Ethernet PPP tag to the payload field of the preset message for the discovery phase via a user terminal, wherein the Ethernet PPP tag includes at least a value field; and concatenating user line information to the end of the value field of the Ethernet PPP tag in the preset message for the discovery phase via a user terminal to obtain the target message for the discovery phase.
[0078] In the above embodiments of this application, the user terminal can generate a preset message for the discovery phase. An Ethernet Point-to-Point Protocol (PPP) tag can be added to the payload field of the preset message for the discovery phase. The PPP tag has at least a value field. Therefore, when generating the preset message for the discovery phase, the user line information of the user terminal can be directly concatenated to the end of the value field of the PPP tag in the preset message for the discovery phase, thereby realizing the generation of the preset message for the discovery phase.
[0079] Optionally, the preset messages for the discovery phase include: Active Discovery Initiation Message PADI and Active Discovery Request Message PADR.
[0080] As an optional embodiment, generating the target message for the discovery phase of the Ethernet point-to-point protocol based on user line information includes: generating an active discovery initial message for broadcast to the network server through the user terminal based on the user line information, wherein the active discovery initial message is the target message for the discovery phase.
[0081] In the above embodiments of this application, when the generated discovery phase target message is a discovery phase initial message PADI with added user line information, the discovery phase target message can be broadcast in the Ethernet in the original manner of the discovery phase initial message PADI to find available access devices, thereby realizing the application of the discovery phase initial message PADI with added user line information.
[0082] As an optional embodiment, generating an Ethernet point-to-point protocol discovery phase message based on user line information includes: receiving an active discovery proposal message returned by the network server in response to the active discovery initial message through the user terminal; and generating an active discovery request message in response to the active discovery proposal message through the user terminal, wherein the active discovery request message is the discovery phase target message.
[0083] In the above embodiments of this application, the network server can be an access device or a management device for access devices in an Ethernet network. In response to the Active Discovery Initial message, the network server can select at least one access device in the Ethernet network that can provide access to the user terminal, generate an Active Discovery Proposal message PADO, and then the user terminal can respond to the Active Discovery Proposal message PADO to generate an Active Discovery Request message PADR with user line information added, thereby realizing the application of the Active Discovery Request message PADR with user line information added.
[0084] As an optional embodiment, the user terminal obtains the user line information of the user terminal by: identifying the terminal information of the user terminal, wherein the multiple information items in the terminal information include at least: the user terminal's access node identifier, rack, frame, slot, sub-slot, access port, and optical network identifier of the optical network unit; and arranging the multiple information items in the following order to obtain the user line information: access node identifier, rack, frame, slot, sub-slot, access port, and optical network identifier.
[0085] In the above embodiments of this application, the user line information is generated by arranging multiple information items in the terminal information of the user terminal in a specific order. Therefore, by obtaining the terminal information of the user terminal, extracting each information item in the terminal information, and filling the extracted information items into a specific order, the user line information can be obtained, thereby realizing the generation of user line information.
[0086] Optionally, the PPPoE+ data format used for user line information is as follows: "AccessNodeIdentifier / ANI_rack / ANI_frame / ANI_slot / ANI_subslot / ANI_port / ONU_ID".
[0087] For example, based on multiple information items in the terminal information, the user line information can be constructed as: "DeviceName / rack / frame / slot / subslot / port / 0000000000001A2B3C4D5E6F EP".
[0088] As an optional embodiment, after generating the target message for the discovery phase of the Ethernet Point-to-Point Protocol based on user line information, the method further includes: if the target message for the discovery phase is an active discovery proposal message, receiving an active discovery confirmation message returned by the network server through the user terminal, wherein the active discovery confirmation message includes at least: a session identifier; and generating a point-to-point protocol session based on the session identifier in response to the active discovery confirmation message through the user terminal.
[0089] In the above embodiments of this application, when the target message in the discovery phase is an Active Discovery Proposal Message (PADR), the network server responds to the Active Discovery Proposal Message (PADR) by returning an Active Discovery Confirmation Message (PADS) to the user terminal, which carries a session identifier. In response to the Active Discovery Confirmation Message (PADS), the user terminal can establish and generate a point-to-point protocol session, i.e., a PPP session, based on the session identifier (SESSION_ID) carried in the Active Discovery Confirmation Message (PADS).
[0090] As an optional embodiment, after generating a point-to-point protocol session based on a session identifier in response to an active discovery confirmation message via a user terminal, the method further includes: obtaining user account information and password information via the user terminal; and initiating authentication of the user terminal via the point-to-point protocol session based on the user account information and password information.
[0091] In the above embodiments of this application, when establishing a point-to-point protocol session (i.e., a PPP session), authentication can be performed through PAP or CHAP based on the user account information and password information obtained from the user terminal. If the authentication is successful, a PPP session is established, thereby authenticating the user terminal through PAP or CHAP and preventing the user terminal's user line information from being misused.
[0092] Optionally, after a PPP session is established, the session can be terminated using the Active Discovery Termination Message (PADT).
[0093] Figure 4 This is a schematic diagram of an Actively Discovered Termination Message (PADT) according to an embodiment of the present invention, as shown below. Figure 4 As shown, the field value of the code (CODE) is "0xa7", and the field value of the session identifier (SESSION-ID) is: the SESSION-ID of the PPPoE+ session to be terminated, used for dial-up termination.
[0094] Figure 5 This is a flowchart of a protocol message generation method according to an embodiment of the present invention. Figure 2 ,like Figure 5 As shown, the method includes the following steps:
[0095] Step S502: Through the access device, receive the Ethernet Point-to-Point Protocol discovery phase target message sent by the user terminal. The discovery phase target message includes at least: a payload field, an Ethernet Point-to-Point Protocol tag added to the payload field, and user line information of the user terminal added to the value field of the Ethernet Point-to-Point Protocol tag.
[0096] Step S504: Replace the user line information in the target message of the discovery phase with the device line information of the access device to obtain the device message of the discovery phase. The device message of the discovery phase is sent by the access device to the remote user dial-up authentication system for information authentication.
[0097] In the above embodiments of this application, an access device receives a discovery phase target message of the Ethernet Point-to-Point Protocol (PPP) sent by a user terminal. The discovery phase target message includes at least a payload field, an Ethernet PPP tag added to the payload field, and user line information of the user terminal added to the value field of the Ethernet PPP tag. The access device's device line information is used to replace the user line information in the discovery phase target message, resulting in a discovery phase device message. This discovery phase device message is sent by the access device to a remote user dial-up authentication system for information authentication. Thus, after receiving the discovery phase target message from the user terminal, the access device replaces the user line information in the discovery phase target message with its device line information, achieving the technical effect of preventing the impersonation of user line information and solving the technical problem of the risk of user line information being misused in the prior art.
[0098] In step S502 above, the access device can be a Broadband Remote Access Server (BRAS).
[0099] As an optional embodiment, replacing the user line information in the target message of the discovery phase with the device line information of the access device to obtain the device message of the discovery phase includes: obtaining a message replacement command through the user access port of the access device; in response to the message replacement command, obtaining the device line information of the access device, and replacing the user line information in the target message of the discovery phase with the device line information of the access device to obtain the device message of the discovery phase.
[0100] In the above embodiments of this application, the user access port is the command input port of the access device. After the message replacement command is input into the user access port, the access device can replace the user line information carried in the target message of the discovery phase with its own device line information according to the message replacement command, thereby converting the target message of the discovery phase into a device message of the discovery phase, and realizing the determination of the message of the discovery phase.
[0101] Optionally, after obtaining the device message during the discovery phase, the method further includes: the device message during the discovery phase can be transmitted to the remote user dial-up authentication system RADIUS via the Broadband Remote Access Server (BRAS) for information matching.
[0102] Optionally, the message replacement command can be: "pppoe intermediate-agent informationpolicy replace".
[0103] The present invention also provides a preferred embodiment, which provides a method for implementing PPPoE+ dial-up Internet access on a personal terminal and preventing impersonation, mainly including: obtaining user line information, user account information and password information; constructing PADI messages and PADR messages through the user terminal based on user line information, user account information and password information, and conducting PPP sessions based on negotiated PPP session connection parameters to achieve direct dial-up Internet access.
[0104] This application directly constructs PADI and PADR messages through the user terminal based on the user's line, account information, and password information, without requiring access device support. This reduces the complexity of troubleshooting and testing, and reduces manpower expenditure. Secondly, testing can be automated and has no impact on the user being tested, achieving a level of user unawareness.
[0105] The technical solution provided in this application strips the PPPoE+ user line information transmitted from the user terminal through the broadband access device, re-inputs the PPPoE+ user line information generated by the device itself, and then transmits it to RADIUS through BRAS for information matching, thereby preventing the theft of PPPoE+ user line information and improving user security.
[0106] Figure 6 This is a schematic diagram of a PPPoE+ protocol exchange process according to an embodiment of the present invention, as shown below. Figure 6 As shown, the method for implementing PPPoE+ dial-up internet access and preventing spoofing on a personal terminal mainly includes: a PPPoE+ information input and acquisition module, a PPPoE+ discovery phase module, a PPPoE+ session phase module, a PPPoE+ data transmission module, a PPPoE+ session termination module, and a spoofing method. Among them, the PPPoE+ information input and acquisition module, the PPPoE+ discovery phase module, the PPPoE+ session phase module, and the PPPoE+ data transmission module are installed on the personal terminal in the form of dial-up software.
[0107] Step 1: The PPPoE+ information input and acquisition module provides input methods for user line information, user account information, and password information. User account information and password information are used for PAP or CHAP authentication; user line information is used by the PPPoE+ discovery phase module to construct PPPoE+ data packets. The PPPoE+ data format is as follows: AccessNodeIdentifier / ANI_rack / ANI_frame / ANI_slot / ANI_subslot / ANI_port / ONU_ID.
[0108] Optionally, based on the input information, a string of user line information in the following format is constructed for later use: DeviceName / rack / frame / slot / subslot / port / 0000000000001A2B3C4D5E6F EP.
[0109] Step 2, PPPoE+ discovery phase module, utilizes information provided by the PPPoE+ information input and acquisition module (such as user line information).
[0110] In the user terminal, a PADI is constructed, where the destination address of the packet is 0xffffffffffff, the CODE field value is 0x09, the SESSION-ID field value is 0x0000, the tag type field value is 0x0101, and a PPPoE tag (0x0105) is added. The Value field of this PPPoE tag uses 0x000DE9 + the user line information from step 1.
[0111] Similarly, in the PADR information of the user terminal, the CODE field value is 0x19, the SESSION_ID field value is 0x0000, a PPPoE tag is added, and user line information is filled in. The PPPoE+ data packet with the added user line information is used to complete the discovery phase of PADI-PADO-PADR-PADS. The SESSION_ID is written to the session identifier number returned by PADS.
[0112] Step 3: The PPPoE+ session phase module initiates a PPP session based on the PPP session connection parameters negotiated during the discovery phase.
[0113] Optionally, all Ethernet frames are unicast. The SESSION-ID of the PPPoE+ session is based on the SESSION_ID of PADS during the discovery phase for session communication. In the initiated PPP authentication, the PPPoE frame structure uses the user account information and password information obtained in step 2 to authenticate with the server through the PAP or CHAP protocol, completes the LCP transmission process, and completes the NCP transmission process for IP address allocation and MTU / MRU negotiation.
[0114] Optionally, the PPPOE+ data transmission module mainly utilizes network interface drivers to encapsulate data packets in Ethernet frames, transmits them over the network through network hardware, and decapsulates the received Ethernet frames.
[0115] Optionally, the PPPoE+ session termination module is mainly used to terminate PPPoE+ sessions, construct PADT data packets, set the CODE field value to 0xa7, and the SESSION-ID field value to the SESSION-ID of the PPPoE+ session to be terminated, for dial-up termination.
[0116] Step 4: The user end adds PPPoE+-enabled access devices using the above solution or non-compliant methods, adding counterfeit PPPoE+ user line information and transmitting it to the broadband access device. To prevent counterfeiting, the broadband access device needs to strip the PPPoE+ user line information transmitted from the user end, re-insert the PPPoE+ user line information generated by the device itself, and then transmit it to RADIUS via BRAS for information matching, thus achieving the anti-counterfeiting function. Taking Huawei broadband access devices as an example, the command "pppoe intermediate-agent information policy replace" is executed on the user access port to replace the field format and content of the original PPPoE packet information fields.
[0117] The technical solution provided in this application changes the PPPoE+ implementation method. Instead of intercepting protocol packets during the PPPoE discovery phase at the access device and inserting user port information upstream, it directly adds user port information when constructing PADI and PADR packets. This is more convenient and flexible, requires no access device support, and allows personal terminals to directly use PPPoE+ for dial-up internet access. This reduces the complexity of troubleshooting and testing, and lowers manpower costs. Testing can be automated without affecting the tested user, achieving a seamless experience for the user. Furthermore, the access device removes the PPPoE+ user line information transmitted from the user terminal and re-inserts its own generated PPPoE+ user line information, thus preventing spoofing and improving user security.
[0118] According to an embodiment of the present invention, a protocol message generation apparatus embodiment is also provided. It should be noted that the protocol message generation apparatus can be used to execute the protocol message generation method in the embodiment of the present invention, and the protocol message generation method in the embodiment of the present invention can be executed in the protocol message generation apparatus.
[0119] Figure 7 This is a schematic diagram of a protocol message generation apparatus according to an embodiment of the present invention. Figure 1 ,like Figure 7 As shown, the device may include: an acquisition module 72, used to control the user terminal to acquire the user line information of the user terminal; and a generation module 74, used to generate a target message for the discovery phase of the Ethernet Point-to-Point Protocol based on the user line information, wherein the target message for the discovery phase includes at least: a payload field, an Ethernet Point-to-Point Protocol tag added to the payload field, and user line information set in the Ethernet Point-to-Point Protocol tag.
[0120] It should be noted that the acquisition module 72 in this embodiment can be used to execute step S102 in the embodiments of this application, and the generation module 74 in this embodiment can be used to execute step S104 in the embodiments of this application. The examples and application scenarios implemented by the above modules and corresponding steps are the same, but are not limited to the content disclosed in the above embodiments.
[0121] In the above embodiments of this application, the user terminal obtains the user line information of the user terminal; based on the user line information, it generates a discovery phase target message of the Ethernet Point-to-Point Protocol (PPP). The discovery phase target message includes at least: a payload field, an Ethernet PPP tag added to the payload field, and user line information set in the Ethernet PPP tag. This achieves the goal of directly adding the user line information to the discovery phase target message generated by the user terminal. Therefore, after the discovery phase target message is generated by the user terminal and before it is transmitted to the Ethernet access device, it is not necessary to modify the discovery phase target message. This achieves the technical effect of preventing third-party devices from intercepting and misusing the user line information, thereby solving the technical problem of the risk of user line information being misused in the prior art.
[0122] As an optional embodiment, the generation module includes: a generation unit, configured to generate a preset message for the discovery phase via a user terminal, wherein the preset message for the discovery phase includes at least a payload field; an adding unit, configured to add an Ethernet Point-to-Point Protocol (PPP) tag to the payload field of the preset message for the discovery phase via a user terminal, wherein the Ethernet PPP tag includes at least a value field; and a splicing unit, configured to splice user line information to the end of the value field of the Ethernet PPP tag in the preset message for the discovery phase via a user terminal to obtain a target message for the discovery phase.
[0123] As an optional embodiment, the generation module includes: a broadcast unit, used to generate an active discovery initial message for broadcasting to the network server through a user terminal based on user line information, wherein the active discovery initial message is the target message of the discovery phase.
[0124] As an optional embodiment, the generation module includes: a receiving unit, configured to receive, via a user terminal, an active discovery proposal message returned by a network server in response to an active discovery initial message; and a generation unit, configured to, via a user terminal, generate an active discovery request message in response to the active discovery proposal message, wherein the active discovery request message is a target message for the discovery phase.
[0125] As an optional embodiment, the acquisition module includes: an identification unit for identifying terminal information of the user terminal, wherein the terminal information includes at least the following information items: access node identifier, rack, frame, slot, sub-slot, access port, and optical network identifier of the optical network unit of the user terminal; and an arrangement unit for arranging the multiple information items in the following order to obtain user line information: access node identifier, rack, frame, slot, sub-slot, access port, and optical network identifier.
[0126] As an optional embodiment, the apparatus further includes: a receiving submodule, configured to receive, via a user terminal, an active discovery confirmation message returned by a network server after generating a discovery phase target message based on user line information, provided that the discovery phase target message is an active discovery proposal message, wherein the active discovery confirmation message includes at least: a session identifier; and a generating submodule, configured to generate a point-to-point protocol session via the user terminal in response to the active discovery confirmation message, based on the session identifier.
[0127] As an optional embodiment, the apparatus further includes: an acquisition submodule, used to acquire user account information and password information through the user terminal after generating a point-to-point protocol session based on a session identifier in response to an active discovery confirmation message; and an authentication submodule, used to initiate authentication of the user terminal through the point-to-point protocol session based on the user account information and password information.
[0128] Figure 8 This is a schematic diagram of a protocol message generation apparatus according to an embodiment of the present invention. Figure 2 ,like Figure 8As shown, the device may include: a receiving module 82, used to receive a discovery phase target message of Ethernet Point-to-Point Protocol sent by a user terminal through an access device, wherein the discovery phase target message includes at least: a payload field, an Ethernet Point-to-Point Protocol tag added to the payload field, and user line information of the user terminal added to the value field of the Ethernet Point-to-Point Protocol tag; and a replacement module 84, used to replace the user line information in the discovery phase target message with the device line information of the access device to obtain a discovery phase device message, wherein the discovery phase device message is sent by the access device to a remote user dial-up authentication system for information authentication.
[0129] It should be noted that the receiving module 82 in this embodiment can be used to execute step S602 in the embodiments of this application, and the replacement module 84 in this embodiment can be used to execute step S604 in the embodiments of this application. The examples and application scenarios implemented by the above modules and corresponding steps are the same, but are not limited to the content disclosed in the above embodiments.
[0130] In the above embodiments of this application, an access device receives a discovery phase target message of the Ethernet Point-to-Point Protocol (PPP) sent by a user terminal. The discovery phase target message includes at least a payload field, an Ethernet PPP tag added to the payload field, and user line information of the user terminal added to the value field of the Ethernet PPP tag. The access device's device line information is used to replace the user line information in the discovery phase target message, resulting in a discovery phase device message. This discovery phase device message is sent by the access device to a remote user dial-up authentication system for information authentication. Thus, after receiving the discovery phase target message from the user terminal, the access device replaces the user line information in the discovery phase target message with its device line information, achieving the technical effect of preventing the impersonation of user line information and solving the technical problem of the risk of user line information being misused in the prior art.
[0131] As an optional embodiment, the replacement module includes: an acquisition unit, configured to acquire a packet replacement command through the user access port of the access device; and a replacement unit, configured to acquire device line information of the access device in response to the packet replacement command, and use the device line information of the access device to replace the user line information in the target packet of the discovery phase, thereby obtaining the device packet of the discovery phase.
[0132] Embodiments of the present invention can provide an electronic device, which can be a computer terminal, and the computer terminal can be any one of a group of computer terminal devices. Optionally, in this embodiment, the computer terminal can also be replaced by a mobile terminal or other terminal device.
[0133] Optionally, in this embodiment, the computer terminal may be located in at least one of a plurality of network devices in a computer network.
[0134] In this embodiment, the computer terminal described above can execute the program code of the following steps in the protocol message generation method: the user terminal obtains the user line information of the user terminal; based on the user line information, generates a target message for the discovery phase of the Ethernet Point-to-Point Protocol, wherein the target message for the discovery phase includes at least: a payload field, an Ethernet Point-to-Point Protocol tag added to the payload field, and user line information set in the Ethernet Point-to-Point Protocol tag.
[0135] In this embodiment, the computer terminal described above can execute the program code for the following steps in the protocol message generation method: receiving an Ethernet Point-to-Point Protocol (PPP) discovery phase target message sent by a user terminal via an access device, wherein the discovery phase target message includes at least: a payload field, an Ethernet PPP tag added to the payload field, and user line information of the user terminal added to the value field of the Ethernet PPP tag; replacing the user line information in the discovery phase target message with the device line information of the access device to obtain a discovery phase device message, wherein the discovery phase device message is sent by the access device to a remote user dial-up authentication system for information authentication.
[0136] Figure 9 This is a structural block diagram of a computer terminal according to an embodiment of the present invention, such as... Figure 9 As shown, the computer terminal 90 may include one or more (only one is shown in the figure) processors 92 and memory 94.
[0137] The memory can be used to store software programs and modules, such as the program instructions / modules corresponding to the protocol message generation method and apparatus in this embodiment of the invention. The processor executes various functional applications and data processing by running the software programs and modules stored in the memory, thereby realizing the aforementioned protocol message generation method. The memory may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory may further include memory remotely located relative to the processor, and these remote memories can be connected to the terminal 90 via a network. Examples of the aforementioned networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.
[0138] The processor can call the information and application program stored in the memory through the transmission device to perform the following steps: the user terminal obtains the user line information of the user terminal; based on the user line information, a target message for the discovery phase of the Ethernet Point-to-Point Protocol is generated, wherein the target message for the discovery phase includes at least: a payload field, an Ethernet Point-to-Point Protocol tag added to the payload field, and the user line information set in the Ethernet Point-to-Point Protocol tag.
[0139] Optionally, the processor may also execute program code for the following steps: generating a discovery phase preset message via a user terminal, wherein the discovery phase preset message includes at least a payload field; adding an Ethernet Point-to-Point Protocol (PPP) tag to the payload field of the discovery phase preset message via a user terminal, wherein the Ethernet PPP tag includes at least a value field; and concatenating user line information to the end of the value field of the Ethernet PPP tag in the discovery phase preset message via a user terminal to obtain the discovery phase target message.
[0140] Optionally, the processor may also execute program code that performs the following steps: based on user line information, generates an active discovery initial message for broadcast to the network server via the user terminal, wherein the active discovery initial message is the target message for the discovery phase.
[0141] Optionally, the processor may also execute program code that performs the following steps: receiving an active discovery proposal message returned by the network server in response to the active discovery initial message through the user terminal; generating an active discovery request message in response to the active discovery proposal message through the user terminal, wherein the active discovery request message is the target message for the discovery phase.
[0142] Optionally, the processor may also execute program code that performs the following steps: identifying the terminal information of the user terminal, wherein the terminal information includes at least the following information items: the user terminal's access node identifier, rack, frame, slot, sub-slot, access port, and optical network identifier of the optical network unit; and arranging the multiple information items in the following order to obtain the user line information: access node identifier, rack, frame, slot, sub-slot, access port, and optical network identifier.
[0143] Optionally, the processor may also execute program code that performs the following steps: when the target message during the discovery phase is an active discovery proposal message, the user terminal receives an active discovery confirmation message returned by the network server, wherein the active discovery confirmation message includes at least: a session identifier; and the user terminal generates a point-to-point protocol session based on the session identifier in response to the active discovery confirmation message.
[0144] Optionally, the processor may also execute program code that performs the following steps: obtains user account information and password information through the user terminal; and initiates authentication of the user terminal based on the user account information and password information through a point-to-point protocol session.
[0145] The processor can invoke information and application programs stored in the memory through the transmission device to perform the following steps: Receiving a discovery phase target message of the Ethernet Point-to-Point Protocol (PPP) sent by a user terminal via an access device, wherein the discovery phase target message includes at least: a payload field, an Ethernet PPP tag added to the payload field, and user line information of the user terminal added to the value field of the Ethernet PPP tag; replacing the user line information in the discovery phase target message with the device line information of the access device to obtain a discovery phase device message, wherein the discovery phase device message is sent by the access device to a remote user dial-up authentication system for information authentication.
[0146] Optionally, the processor may also execute program code that performs the following steps: obtains a message replacement command through the user access port of the access device; in response to the message replacement command, obtains the device line information of the access device, and uses the device line information of the access device to replace the user line information in the target message of the discovery phase, thereby obtaining the device message of the discovery phase.
[0147] Those skilled in the art will understand that Figure 9 The structure shown is for illustrative purposes only. The computer terminal can also be a smartphone (such as an Android phone, an iOS phone, etc.), a tablet computer, a mobile internet device (MID), a PAD, and other terminal devices. Figure 9 This does not limit the structure of the aforementioned electronic device. For example, the computer terminal 90 may also include components that are more... Figure 9 The more or fewer components shown (such as network interfaces, display devices, etc.), or having the same Figure 9 The different configurations shown.
[0148] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be implemented by a computer program instructing the hardware related to the terminal device. The computer program can be stored in a non-volatile medium, which may include: flash drive, read-only memory (ROM), random access memory (RAM), magnetic disk or optical disk, etc.
[0149] Embodiments of the present invention also provide a non-volatile storage medium. Optionally, in this embodiment, the aforementioned non-volatile storage medium can be used to store the program code executed by the protocol message generation method provided in the above embodiments.
[0150] Optionally, in this embodiment, the non-volatile storage medium may be located in any computer terminal in a group of computer terminals in a computer network, or in any mobile terminal in a group of mobile terminals.
[0151] Optionally, in this embodiment, the non-volatile storage medium is configured to store program code for performing the following steps: the user terminal obtains the user line information of the user terminal; based on the user line information, a discovery phase target message of Ethernet Point-to-Point Protocol is generated, wherein the discovery phase target message includes at least: a payload field, an Ethernet Point-to-Point Protocol tag added to the payload field, and the user line information set in the Ethernet Point-to-Point Protocol tag.
[0152] Optionally, in this embodiment, the non-volatile storage medium is configured to store program code for performing the following steps: generating a discovery phase preset message via a user terminal, wherein the discovery phase preset message includes at least a payload field; adding an Ethernet point-to-point protocol tag to the payload field of the discovery phase preset message via a user terminal, wherein the Ethernet point-to-point protocol tag includes at least a value field; and concatenating user line information to the end of the value field of the Ethernet point-to-point protocol tag in the discovery phase preset message via a user terminal to obtain the discovery phase target message.
[0153] Optionally, in this embodiment, the non-volatile storage medium is configured to store program code for performing the following steps: generating an active discovery initial message for broadcasting to the network server through the user terminal based on user line information, wherein the active discovery initial message is the target message of the discovery phase.
[0154] Optionally, in this embodiment, the non-volatile storage medium is configured to store program code for performing the following steps: receiving an active discovery proposal message returned by the network server in response to the active discovery initial message through the user terminal; generating an active discovery request message in response to the active discovery proposal message through the user terminal, wherein the active discovery request message is the target message of the discovery phase.
[0155] Optionally, in this embodiment, the non-volatile storage medium is configured to store program code for performing the following steps: identifying terminal information of a user terminal, wherein the terminal information includes at least the following multiple information items: access node identifier, rack, frame, slot, sub-slot, access port, and optical network identifier of the optical network unit of the user terminal; arranging the multiple information items in the following order to obtain user line information: access node identifier, rack, frame, slot, sub-slot, access port, and optical network identifier.
[0156] Optionally, in this embodiment, the non-volatile storage medium is configured to store program code for performing the following steps: when the target message in the discovery phase is an active discovery proposal message, the user terminal receives an active discovery confirmation message returned by the network server, wherein the active discovery confirmation message includes at least: a session identifier; and the user terminal generates a point-to-point protocol session based on the session identifier in response to the active discovery confirmation message.
[0157] Optionally, in this embodiment, the non-volatile storage medium is configured to store program code for performing the following steps: obtaining user account information and password information through the user terminal; and initiating authentication of the user terminal based on the user account information and password information through a peer-to-peer protocol session.
[0158] Optionally, in this embodiment, the non-volatile storage medium is configured to store program code for performing the following steps: receiving a discovery phase target message of Ethernet Point-to-Point Protocol sent by a user terminal through an access device, wherein the discovery phase target message includes at least: a payload field, an Ethernet Point-to-Point Protocol tag added to the payload field, and user line information of the user terminal added to the value field of the Ethernet Point-to-Point Protocol tag; replacing the user line information in the discovery phase target message with the device line information of the access device to obtain a discovery phase device message, wherein the discovery phase device message is sent by the access device to a remote user dial-up authentication system for information authentication.
[0159] Optionally, in this embodiment, the non-volatile storage medium is configured to store program code for performing the following steps: obtaining a packet replacement command through the user access port of the access device; in response to the packet replacement command, obtaining the device line information of the access device, and using the device line information of the access device to replace the user line information in the target packet of the discovery phase, thereby obtaining the device packet of the discovery phase.
[0160] Embodiments of the present invention also provide a computer program product, including a computer program. Optionally, in this embodiment, when the computer program is executed by a processor, it implements the steps of the protocol message generation method provided in the above embodiments.
[0161] The sequence numbers of the above embodiments of the present invention are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.
[0162] In the above embodiments of the present invention, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0163] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. The device embodiments described above are merely illustrative; for example, the division of units can be a logical functional division, and in actual implementation, there may be other division methods. For instance, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the displayed or discussed mutual coupling, direct coupling, or communication connection may be through some interfaces; the indirect coupling or communication connection between units or modules may be electrical or other forms.
[0164] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0165] Furthermore, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0166] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a non-volatile storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a non-volatile storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned non-volatile storage medium includes various media capable of storing program code, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.
[0167] The above description is only a preferred embodiment of the present invention. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.
Claims
1. A method for generating protocol messages, characterized in that, include: The user terminal obtains the user line information of the user terminal; Based on the user line information, a discovery phase target message for the Ethernet Point-to-Point Protocol is generated, wherein the discovery phase target message includes at least: a payload field, wherein an Ethernet Point-to-Point Protocol tag is added to the payload field, and the Ethernet Point-to-Point Protocol tag contains the user line information; The user terminal obtains the user line information of the user terminal, including: The terminal information of the user terminal is identified, wherein the terminal information includes at least the following multiple information items: the access node identifier, rack, frame, slot, sub-slot, access port, and optical network identifier of the optical network unit of the user terminal. The user line information is obtained by arranging the multiple information items in the following order: the access node identifier, the rack, the frame, the slot, the sub-slot, the access port, and the optical network identifier.
2. The method according to claim 1, characterized in that, Based on the user line information, the target message for the discovery phase of the Ethernet Point-to-Point Protocol is generated as follows: The user terminal generates a discovery phase preset message, wherein the discovery phase preset message includes at least the payload field. Through the user terminal, the Ethernet Point-to-Point Protocol tag is added to the payload field of the preset message in the discovery phase, wherein the Ethernet Point-to-Point Protocol tag includes at least a value field. The user terminal uses the Ethernet point-to-point protocol tag value field in the preset message of the discovery phase to concatenate the user line information to obtain the target message of the discovery phase.
3. The method according to claim 1, characterized in that, Based on the user line information, the target message for the discovery phase of the Ethernet Point-to-Point Protocol is generated as follows: Based on the user line information, the user terminal generates an active discovery initial message for broadcasting to the network server, wherein the active discovery initial message is the target message of the discovery phase.
4. The method according to claim 1, characterized in that, Based on the user line information, the Ethernet Point-to-Point Protocol discovery phase message is generated, including: The user terminal receives an Active Discovery Proposal message returned by the network server in response to the Active Discovery Initial Message. The user terminal generates an active discovery request message in response to the active discovery proposal message, wherein the active discovery request message is the target message of the discovery phase.
5. The method according to claim 1, characterized in that, After generating the Ethernet Point-to-Point Protocol discovery phase target message based on the user line information, the method further includes: When the target message in the discovery phase is an active discovery proposal message, the user terminal receives an active discovery confirmation message returned by the network server, wherein the active discovery confirmation message includes at least: a session identifier; The user terminal, in response to the active discovery confirmation message, generates the point-to-point protocol session based on the session identifier.
6. The method according to claim 5, characterized in that, After generating the peer-to-peer protocol session based on the session identifier via the user terminal in response to the active discovery confirmation message, the method further includes: The user account information and password information are obtained through the user terminal; The authentication of the user terminal is initiated through the peer-to-peer protocol session, based on the user account information and the password information.
7. A method for generating protocol messages, characterized in that, include: The access device receives Ethernet Point-to-Point Protocol (PPP) discovery phase target messages sent by user terminals. The discovery phase target messages include at least: a payload field, an Ethernet PPP tag added to the payload field, and user line information of the user terminal added to the value field of the Ethernet PPP tag. The user line information in the discovery phase target message is replaced with the device line information of the access device to obtain the discovery phase device message, wherein the discovery phase device message is sent by the access device to the remote user dial-up authentication system for information authentication. The user line information of the user terminal is obtained by the user terminal and includes: The terminal information of the user terminal is identified, wherein the terminal information includes at least the following multiple information items: the access node identifier, rack, frame, slot, sub-slot, access port, and optical network identifier of the optical network unit of the user terminal. The user line information is obtained by arranging the multiple information items in the following order: the access node identifier, the rack, the frame, the slot, the sub-slot, the access port, and the optical network identifier.
8. The method according to claim 7, characterized in that, Using the device line information of the access device, the user line information in the discovery phase target message is replaced with the following to obtain the discovery phase device message: Obtain the message replacement command through the user access port of the access device; In response to the message replacement command, the device line information of the access device is obtained, and the user line information in the discovery phase target message is replaced with the device line information of the access device to obtain the discovery phase device message.
9. A protocol message generation apparatus, characterized in that, include: The acquisition module is used to control the user terminal to acquire the user line information of the user terminal; The generation module is used to generate a target message for the discovery phase of Ethernet Point-to-Point Protocol based on the user line information. The target message for the discovery phase includes at least: a payload field, wherein an Ethernet Point-to-Point Protocol tag is added to the payload field, and the user line information is set in the Ethernet Point-to-Point Protocol tag. The acquisition module includes: The identification unit is used to identify the terminal information of the user terminal, wherein the terminal information includes at least the following information items: the access node identifier, rack, frame, slot, sub-slot, access port, and optical network identifier of the optical network unit of the user terminal. An arrangement unit is used to arrange multiple information items in the following order to obtain the user line information: the access node identifier, the rack, the frame, the slot, the sub-slot, the access port, and the optical network identifier.
10. A protocol message generation apparatus, characterized in that, include: The receiving module is used to receive a target message of the discovery phase of the Ethernet Point-to-Point Protocol sent by a user terminal through an access device. The target message of the discovery phase includes at least: a payload field, an Ethernet Point-to-Point Protocol tag added to the payload field, and user line information of the user terminal added to the value field of the Ethernet Point-to-Point Protocol tag. The replacement module is used to replace the user line information in the discovery phase target message with the device line information of the access device to obtain the discovery phase device message, wherein the discovery phase device message is sent by the access device to the remote user dial-up authentication system for information authentication. The user line information of the user terminal is obtained by the user terminal and includes: The terminal information of the user terminal is identified, wherein the terminal information includes at least the following multiple information items: the access node identifier, rack, frame, slot, sub-slot, access port, and optical network identifier of the optical network unit of the user terminal. The user line information is obtained by arranging the multiple information items in the following order: the access node identifier, the rack, the frame, the slot, the sub-slot, the access port, and the optical network identifier.
11. An electronic device comprising a memory and a processor, characterized in that, The memory stores a computer program, and the processor is configured to execute the method for generating protocol messages according to any one of claims 1 to 8 through the computer program.
12. A computer program product comprising computer instructions, characterized in that, When the computer instructions are executed by the processor, they implement the steps of the method for generating protocol messages according to any one of claims 1 to 8.
Citation Information
Patent Citations
Device and method for transmitting network element protocol messages in optical network equipment
CN103200467A
A PPPoE protocol message transfer method
CN1972238A