L2TP connection method and device, computer equipment and storage medium
By determining the reconnection time based on the packet information of the LAC in the LNS and sending the reconnection time indication, the problem of LNS being paralyzed due to excessive load is solved, and normal operation of services and communication efficiency are improved.
Patent Information
- Application Number
- CN202510441971.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-09
- Publication Date
- 2025-06-17
AI Technical Summary
When a large number of L2TP connections are interrupted, LNS may be paralyzed due to excessive load, affecting the normal operation of the business.
By implementing an L2TP connection method in LNS, the reconnection time is determined based on the packet information of the target LAC, and a reconnection time indication is sent to the target LAC, so that it can perform L2TP connection at a specified time, thereby preventing disorderly reconnection.
This method effectively prevents LNS from being paralyzed due to overload, ensures the normal operation of the business, and improves the communication efficiency between LNS and LAC.
Smart Images

Figure CN120166019A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the fields of network technology and security technology, and particularly to an L2TP connection method, apparatus, computer device, and storage medium. Background Art
[0002] L2TP (Layer 2 Tunneling Protocol) is used to establish a Virtual Private Network (VPN) connection between networks, and is mainly applied to scenarios such as enterprise remote work, interconnection of branch offices, and the Internet of Things.
[0003] However, when a large-scale network failure (such as equipment cutover) occurs, a large number of L2TP connections are interrupted, and all LACs (L2TP Access Concentrators) initiate reconnection requests simultaneously, causing a huge load pressure on the LNS (L2TP Network Server), and most likely resulting in the paralysis of the LNS and affecting the normal operation of the service. Summary of the Invention
[0004] Based on this, it is necessary to provide an L2TP connection method, apparatus, computer device, and storage medium that can prevent the paralysis of the LNS and ensure the normal operation of the service for the above technical problems.
[0005] In a first aspect, this application provides an L2TP connection method applied to an LNS. The method includes:
[0006] When the number of target access concentrators LACs where the Layer 2 Tunneling Protocol L2TP connection is interrupted exceeds a quantity threshold, determine the reconnection time of the target LAC according to the grouping information of the target LAC;
[0007] Send the reconnection time to the target LAC so that the target LAC performs an L2TP connection at the reconnection time.
[0008] In one embodiment, the sending the reconnection time to the target LAC includes:
[0009] Send a reconnection indication message to the target LAC; wherein, the reconnection indication message carries the reconnection time.
[0010] In one embodiment, the determining the reconnection time of the target LAC according to the grouping information of the target LAC includes:
[0011] Determine the connection order of the target LAC according to the grouping information of the target LAC;
[0012] Determine the reconnection time of the target LAC according to the reconnection time interval and the connection order.
[0013] In one embodiment, the method further includes:
[0014] Receive the SCCRQ message of the open control connection request sent by the target LAC; wherein, the packet information of the target LAC is carried in the SCCRQ message.
[0015] In one embodiment, the packet information of the target LAC is determined by the target LAC according to its own network element priority.
[0016] In one embodiment, the network element priority of the target LAC is determined according to the geographical location of the LAC and / or the service type.
[0017] In one embodiment, the LAC identifier of the target LAC is included in the SCCRQ message.
[0018] In a second aspect, the present application further provides an L2TP connection device, configured in an LNS, and the device includes:
[0019] A determination module, configured to determine the reconnection time of the target LAC according to the packet information of the target LAC when the number of target access concentrators LAC where the Layer 2 Tunneling Protocol L2TP connection is interrupted exceeds a quantity threshold;
[0020] A sending module, configured to send the reconnection time to the target LAC, so that the target LAC performs an L2TP connection at the reconnection time.
[0021] In a third aspect, the present application further provides a computer device. The computer device includes a memory and a processor, the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:
[0022] When the number of target access concentrators LAC where the Layer 2 Tunneling Protocol L2TP connection is interrupted exceeds a quantity threshold, determine the reconnection time of the target LAC according to the packet information of the target LAC;
[0023] Send the reconnection time to the target LAC, so that the target LAC performs an L2TP connection at the reconnection time.
[0024] In a fourth aspect, the present application further provides a computer-readable storage medium. The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the following steps are implemented:
[0025] When the number of target access concentrators LACs where the Layer 2 Tunneling Protocol L2TP connection is interrupted exceeds the quantity threshold, determine the reconnection time of the target LAC according to the grouping information of the target LAC;
[0026] Send the reconnection time to the target LAC so that the target LAC performs an L2TP connection at the reconnection time.
[0027] In a fifth aspect, the present application also provides a computer program product. The computer program product includes a computer program which, when executed by a processor, implements the following steps:
[0028] When the number of target access concentrators LACs where the Layer 2 Tunneling Protocol L2TP connection is interrupted exceeds the quantity threshold, determine the reconnection time of the target LAC according to the grouping information of the target LAC;
[0029] Send the reconnection time to the target LAC so that the target LAC performs an L2TP connection at the reconnection time.
[0030] The above L2TP connection method, device, computer device, and storage medium determine the reconnection time of the target LAC according to the grouping information of the target LAC when the number of target access concentrators LACs where the Layer 2 Tunneling Protocol L2TP connection is interrupted exceeds the quantity threshold, and then send the reconnection time to the target LAC so that the target LAC performs an L2TP connection at the reconnection time. According to the above content, it can be seen that the present application determines the reconnection time of the target LAC according to the grouping information of the target LAC, and by stipulating different reconnection times, prevents the phenomenon of disorderly reconnection of a large number of LACs; by sending the reconnection time to the target LAC, it enables the target LAC to perform an L2TP connection at the reconnection time, ensuring that the LAC can perform reconnection operations in an orderly manner, preventing the L2TP service from being interrupted for a long time due to the overload and paralysis of the LNS, improving the communication efficiency between the LNS and the LAC, and realizing the overall planning for the LAC. Description of the Drawings
[0031] Figure 1 It is an application environment diagram of an L2TP connection method provided by an embodiment of the present application;
[0032] Figure 2 It is a flowchart of a first L2TP connection method provided by an embodiment of the present application;
[0033] Figure 3 It is a flowchart of a second L2TP connection method provided by an embodiment of the present application;
[0034] Figure 4Schematic flowchart of the third L2TP connection method provided by an embodiment of this application;
[0035] Figure 5 Block diagram of the structure of an L2TP connection device provided by an embodiment of this application;
[0036] Figure 6 Internal structure diagram of a computer device in one embodiment. Detailed implementation manners
[0037] In order to make the objectives, technical solutions, and advantages of this application clearer, the following further describes this application in detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain this application and are not used to limit this application.
[0038] The L2TP connection method provided by an embodiment of this application can be applied to an application environment as shown in Figure 1 . Among them, the LNS 102 communicates with the LAC 104 through a network. When the number of target access concentrators LACs where the Layer 2 Tunneling Protocol L2TP connection is interrupted exceeds a quantity threshold, the reconnection time of the target LAC is determined according to the grouping information of the target LAC, and the reconnection time is sent to the target LAC, so that the target LAC performs an L2TP connection at the reconnection time.
[0039] In one embodiment, as shown in Figure 2 , a kind of L2TP connection method is provided. Taking the method applied to the LNS 102 in Figure 1 as an example, the method includes the following steps:
[0040] S201. When the number of target access concentrators LACs where the Layer 2 Tunneling Protocol L2TP connection is interrupted exceeds a quantity threshold, determine the reconnection time of the target LAC according to the grouping information of the target LAC.
[0041] It should be noted that the grouping information of the target LAC is used to represent the grouping number to which the target LAC belongs; furthermore, according to the grouping number to which the target LAC belongs, the service priority of the target LAC is determined, and according to the service priority of the target LAC, the reconnection time of the target LAC is determined.
[0042] In an embodiment of this application, when it is necessary to determine the reconnection time of the target LAC, the service priority of the target LAC can be determined according to the grouping number of the target LAC recorded in the grouping information of the target LAC; according to the first mapping relationship between the candidate priority and the candidate time interval, determine the reconnection time interval corresponding to the service priority of the target LAC; use the sum of the current moment and the reconnection time interval as the reconnection time of the target LAC.
[0043] Among them, at least one candidate time interval corresponding to each candidate priority is recorded in the first mapping relationship between the service priority and the reconnection time interval.
[0044] Specifically, when it is necessary to determine the reconnection time interval corresponding to the service priority of the target LAC according to the first mapping relationship between the candidate priority and the candidate time interval, the following may be included: after determining the service priority of the target LAC, select a reference priority that is the same as the service priority from at least one candidate priority recorded in the first mapping relationship, and use the candidate time interval corresponding to the reference priority in the first mapping relationship as the reconnection time interval corresponding to the service priority of the target LAC.
[0045] Furthermore, when it is necessary to determine the service priority of the target LAC, the second mapping relationship between the packet number and the service priority may be obtained in advance. At least one candidate priority corresponding to each candidate number is recorded in the second mapping relationship. Then, according to the second mapping relationship, the service priority of the target LAC is determined.
[0046] In an embodiment of the present application, when determining the service priority of the target LAC according to the second mapping relationship, the following may be included: after determining the packet number to which the target LAC belongs, select a reference number that is the same as the packet number from at least one candidate number recorded in the second mapping relationship; then, use the candidate priority corresponding to the reference number in the second mapping relationship as the service priority of the target LAC.
[0047] S202, send the reconnection time to the target LAC so that the target LAC performs an L2TP connection at the reconnection time.
[0048] It should be noted that when sending the reconnection time to the target LAC, the reconnection time may be marked with the LAC identifier so that the reconnection time is marked with the LAC identifier corresponding to the target LAC; then, when the target LAC receives the reconnection time, verify whether the LAC identifier marked on the reconnection time is the same as its own LAC identifier. If they are the same, perform an L2TP connection at the reconnection time.
[0049] Furthermore, if the LAC identifier marked on the reconnection time is not the same as its own LAC identifier, the target LAC sends a time re-acquisition request to the LNS so that the LNS performs the operation of determining the reconnection time of the target LAC according to the packet information of the target LAC again; and sends the reconnection time to the target LAC.
[0050] The above L2TP connection method determines the reconnection time of the target LAC according to the grouping information of the target LAC when the number of target access concentrators (LACs) where the Layer 2 Tunneling Protocol (L2TP) connection is interrupted exceeds the number threshold, and then sends the reconnection time to the target LAC so that the target LAC can perform the L2TP connection at the reconnection time. According to the above content, it can be known that in this application, the reconnection time of the target LAC is determined according to the grouping information of the target LAC, and by specifying different reconnection times, the phenomenon that a large number of LACs reconnect disorderly is prevented; by sending the reconnection time to the target LAC, the target LAC is enabled to perform the L2TP connection at the reconnection time, ensuring that the LAC can perform the reconnection operation orderly, preventing the L2TP service from being interrupted for a long time due to the overload paralysis of the LNS, improving the communication efficiency between the LNS and the LAC, and realizing the overall planning for the LAC.
[0051] In one embodiment, when it is necessary to send the reconnection time to the target LAC, the following content may be included: sending a reconnection indication message to the target LAC; wherein, the reconnection indication message carries the reconnection time.
[0052] In one embodiment of this application, the reconnection indication message may also carry the LAC identifier corresponding to the target LAC; furthermore, after the LNS sends the reconnection indication message to the target LAC, the target LAC can verify whether the LAC identifier carried in the reconnection indication message is the same as its own LAC identifier. If they are the same, the target LAC performs the L2TP connection at the reconnection time; if they are different, the target LAC sends a reconnection exception message to the LNS so that the LNS sends a reconnection indication message carrying the LAC identifier corresponding to the target LAC.
[0053] Specifically, the message design of the reconnection indication message is as follows:
[0054] The field names, field lengths, and functions of each field included in the general header field of the reconnection indication message are as follows:
[0055] Field Name Length (Bytes) Function Version 1 L2TP Protocol Version Number Type 1 Fixed to a specific value for identifying the "Group - based Reconnection Instruction Message" message type Length 2 Indicates the total number of bytes of the message, covering the header and all subsequent fields Tunnel ID 4 Uniquely identifies the L2TP tunnel Session ID 4 Uniquely identifies the L2TP session
[0056] The field names, field lengths, and functions of each field included in the message specific field of the reconnection indication message are as follows:
[0057] Field Name Length (Bytes) Function Group ID 2 Identifies the group number to which the LAC belongs. The LNS can manage LACs in different groups differently based on this number. After receiving the message, the LAC determines whether it is the target for reconnection based on this field Reconnection Time 2 Indicates the reconnection time (in seconds) that the LAC in this group needs to wait. After receiving this message, the LAC needs to wait for this specified time before initiating a reconnection operation, so as to achieve sequential reconnection of LACs in different groups MaxReconnection Attempts 1 Specifies the maximum number of reconnection attempts allowed for the LAC in this group. If the LAC fails to reconnect successfully after reaching this maximum number of attempts, it should stop the reconnection attempt and report an error according to the preset mechanism or wait for further instructions Reconnection Window 2 Defines a reconnection time window (in seconds). The LAC in the group must complete the reconnection operation within this time window. If the reconnection is not successful beyond this time window, it may need to wait for a new reconnection instruction ErrorHandlingCode 1 Indicates the handling method to be taken when the LAC encounters an error during reconnection. For example: 0x00 means ignore the error and continue to attempt reconnection; 0x01 means stop reconnection and report the error to the LNS; 0x02 means continue to attempt reconnection after reducing the reconnection attempt frequency AdditionalInstructions Variable length Used to carry additional reconnection - related instructions or information, such as specific reconnection parameter settings, network environment prompts, etc. This field is an optional field and can be used flexibly according to actual needs
[0058] The above L2TP connection method realizes the L2TP connection of the target LAC at the reconnection time by sending a reconnection indication message to the target LAC and carrying the reconnection time in the reconnection indication message, ensuring that the LAC can perform the reconnection operation orderly, preventing the long-term interruption of L2TP services caused by the overload paralysis of the LNS, improving the communication efficiency between the LNS and the LAC, and realizing the overall planning for the LAC.
[0059] In one embodiment, as Figure 3 shown, when it is necessary to determine the reconnection time of the target LAC according to the grouping information of the target LAC, the following contents may be included:
[0060] S301. Determine the connection order of the target LAC according to the grouping information of the target LAC.
[0061] It should be noted that when it is necessary to obtain the grouping information of the target LAC, the following contents may be included: receiving the open control connection request SCCRQ message sent by the target LAC; wherein, the SCCRQ message carries the grouping information of the target LAC.
[0062] Furthermore, the SCCRQ message contains the LAC identifier of the target LAC.
[0063] In one embodiment of the present application, the SCCRQ message is used to represent a reconnection request initiated by the target LAC to the LNS. Among them, the Ac-Name field is used to identify the target LAC, and its length is variable, using a part of the space to define the grouping information of the LAC. For example, the format of "GroupX - LACName" can be adopted, where "GroupX" represents the grouping information to which the target LAC belongs, and "LACName" is the specific name of the target LAC.
[0064] In the case where the number of target access concentrators (LACs) with the interruption of the Layer 2 Tunneling Protocol (L2TP) connection exceeds the number threshold, the LNS still briefly retains the SCCRQ message to realize querying the grouping information of the target LAC through the SCCRQ message.
[0065] In one embodiment of the present application, when it is necessary to determine the connection order of the target LAC according to the grouping information of the target LAC, the mapping relationship between the candidate grouping information and the candidate order may be obtained in advance, and different candidate orders corresponding to different candidate grouping information are recorded in this mapping relationship; therefore, after determining the grouping information of the target LAC, select the reference grouping information that is the same as the grouping information of the target LAC from the candidate grouping information included in the mapping relationship, and use the candidate order corresponding to the reference grouping information in the mapping relationship as the connection order of the target LAC.
[0066] Further explanation: The grouping information of the target LAC is determined by the target LAC according to its own network element priority. Among them, the network element priority of the target LAC is determined according to the geographical location of the LAC and / or the service type.
[0067] In an embodiment of the present application, when it is necessary to obtain the grouping information of the target LAC, the target LAC can, according to its own geographical location and / or service type, combine the third mapping relationship between the geographical location and the network element priority, or the fourth mapping relationship between the service type and the network element priority, to determine the network element priority of the target LAC.
[0068] Specifically, the third mapping relationship records different network element priorities corresponding to different geographical locations. In the fourth mapping relationship, different network element priorities corresponding to different service types are recorded. Furthermore, after determining the geographical location and / or service type of the target LAC, according to the geographical location and / or service type of the target LAC, the network element priority of the target LAC is determined from the third mapping relationship and the fourth mapping relationship.
[0069] Furthermore, if the network element priority determined according to the third mapping relationship is different from the network element priority determined according to the fourth mapping relationship, then the highest determined network element priority is used as the network element priority of the target LAC.
[0070] S302. Determine the reconnection time of the target LAC according to the reconnection time interval and the connection order.
[0071] It should be noted that the reconnection time interval is used to represent the time interval between adjacent LACs in different groups during the reconnection process. As an example, if the time of the first group of LACs during reconnection is A and the time of the second group of LACs during reconnection is B, then the reconnection time interval is B - A.
[0072] In an embodiment of the present application, after determining the connection order, the reconnection time required for each group of LACs during reconnection is estimated respectively. Furthermore, according to the reconnection time and the reconnection time interval, the total time required for other LACs before the target LAC in the connection order is estimated. Then, the current time is added to the total time required for other LACs, and the obtained time is the reconnection time of the target LAC.
[0073] The above L2TP connection method realizes determining the reconnection time of the target LAC in combination with the reconnection time interval by determining the connection order of the target LAC, ensures that the LAC can perform the reconnection operation in an orderly manner, prevents the LNS from being overloaded and paralyzed, resulting in a long-term interruption of the L2TP service, improves the communication efficiency between the LNS and the LAC, and realizes the overall planning for the LAC.
[0074] In one embodiment, as Figure 4 shown, when it is necessary to send a reconnection time to the target LAC, the following content may be included:
[0075] S401, receive the open control connection request SCCRQ message sent by the target LAC; wherein, the SCCRQ message carries the packet information of the target LAC.
[0076] S402, in the case where the number of target access concentrators LACs with the Layer 2 Tunneling Protocol L2TP connection interrupted exceeds the number threshold, determine the connection order of the target LAC according to the packet information of the target LAC.
[0077] S403, determine the reconnection time of the target LAC according to the reconnection time interval and the connection order.
[0078] S404, send a reconnection indication message to the target LAC; wherein, the reconnection indication message carries the reconnection time; so that the target LAC performs an L2TP connection at the reconnection time.
[0079] The above L2TP connection method determines the reconnection time of the target LAC according to the packet information of the target LAC in the case where the number of target access concentrators LACs with the Layer 2 Tunneling Protocol L2TP connection interrupted exceeds the number threshold, and realizes sending the reconnection time to the target LAC so that the target LAC performs an L2TP connection at the reconnection time. According to the above content, it can be known that in this application, the reconnection time of the target LAC is determined according to the packet information of the target LAC, and by specifying different reconnection times, the phenomenon that a large number of LACs reconnect disorderly is prevented; by sending the reconnection time to the target LAC, the target LAC is enabled to perform an L2TP connection at the reconnection time, ensuring that the LAC can perform the reconnection operation orderly, preventing the LNS from being overloaded and paralyzed, resulting in a long-term interruption of the L2TP service, improving the communication efficiency between the LNS and the LAC, and realizing the overall planning for the LAC.
[0080] It should be understood that although the steps in the flowcharts involved in the above embodiments are sequentially shown according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless there is a clear indication in this article, the execution of these steps has no strict order limit, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above embodiments may include multiple steps or multiple stages. These steps or stages are not necessarily executed at the same moment, but can be executed at different moments, and the execution order of these 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.
[0081] Based on the same inventive concept, an embodiment of the present application further provides an L2TP connection device for implementing the L2TP connection method involved above. The solution for solving the problem provided by this device is similar to the solution described in the above method. Therefore, the specific limitations in one or more embodiments of the L2TP connection device provided below can refer to the limitations on the L2TP connection method in the above text and will not be repeated here.
[0082] In one embodiment, as Figure 5 shown, an L2TP connection device is provided, including: a determination module 10 and a sending module 20, where:
[0083] The determination module 10 is configured to determine the reconnection time of the target LAC according to the grouping information of the target LAC when the number of target access concentrators (LACs) with the interruption of the Layer 2 Tunneling Protocol (L2TP) connection exceeds a quantity threshold.
[0084] The sending module 20 is configured to send the reconnection time to the target LAC so that the target LAC performs an L2TP connection at the reconnection time.
[0085] In one embodiment, the sending module 20 is specifically configured to:
[0086] Send a reconnection indication message to the target LAC; wherein, the reconnection indication message carries the reconnection time.
[0087] In one embodiment, the determination module 10 is specifically configured to:
[0088] Determine the connection order of the target LAC according to the grouping information of the target LAC; and determine the reconnection time of the target LAC according to the reconnection time interval and the connection order.
[0089] In one embodiment, the L2TP connection device further includes:
[0090] A receiving module 30, configured to receive a Start Control Connection Request (SCCRQ) message sent by the target LAC; wherein, the SCCRQ message carries the grouping information of the target LAC.
[0091] In one embodiment, the grouping information of the target LAC is determined by the target LAC according to its own network element priority.
[0092] In one embodiment, the network element priority of the target LAC is determined according to the geographical location of the LAC and / or the service type.
[0093] In one embodiment, the SCCRQ message includes the LAC identifier of the target LAC.
[0094] The above L2TP connection device determines the reconnection time of the target LAC according to the packet information of the target LAC when the number of target access concentrators (LACs) where the Layer 2 Tunneling Protocol (L2TP) connection is interrupted exceeds the number threshold, and sends the reconnection time to the target LAC, so that the target LAC performs the L2TP connection at the reconnection time. According to the above content, it can be known that this application determines the reconnection time of the target LAC according to the packet information of the target LAC, and prevents the phenomenon of disorderly reconnection of a large number of LACs by specifying different reconnection times; by sending the reconnection time to the target LAC, it enables the target LAC to perform the L2TP connection at the reconnection time, ensuring that the LAC can perform the reconnection operation orderly, preventing the L2TP service from being interrupted for a long time due to the overload and paralysis of the LNS, improving the communication efficiency between the LNS and the LAC, and realizing the overall planning for the LAC.
[0095] Each module in the above L2TP connection device can be implemented in whole or in part by software, hardware, and their combination. Each of the above modules can be embedded in the processor in the computer device in the form of hardware or be independent of the processor, or can be stored in the memory in the computer device in the form of software, so that the processor can call and execute the operations corresponding to each of the above modules.
[0096] In one embodiment, a computer device is provided. The computer device can be a terminal, and its internal structure diagram can be as Figure 6 shown. The computer device includes a processor, a memory, an input / output interface, a communication interface, a display unit, and an input device. Among them, the processor, the memory, and the input / output interface are connected through a system bus, and the communication interface, the display unit, and the input device are connected to the system bus through the input / output interface. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is used for the processor to exchange information with external devices. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be implemented through WIFI, a mobile cellular network, NFC (Near Field Communication), or other technologies. When the computer program is executed by the processor, it implements an L2TP connection method. The display unit of the computer device is used to form a visually visible picture, which can be a display screen, a projection device, or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen. The input device of the computer device can be a touch layer covered on the display screen, or a button, a trackball, or a touchpad set on the shell of the computer device, or an external keyboard, a touchpad, or a mouse, etc.
[0097] Those skilled in the art can understand that Figure 6 the structure shown in Figure 6 is only a block diagram of some structures related to the solution of this application, and does not constitute a limitation on the computer device to which the solution of this application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine some components, or have a different component layout.
[0098] In one embodiment, a computer device is provided, including a memory and a processor. A computer program is stored in the memory, and when the processor executes the computer program, the following steps are implemented:
[0099] When the number of target access concentrators (LACs) where the Layer 2 Tunneling Protocol (L2TP) connection is interrupted exceeds the number threshold, determine the reconnection time of the target LAC according to the packet information of the target LAC;
[0100] Send the reconnection time to the target LAC so that the target LAC performs an L2TP connection at the reconnection time.
[0101] In one embodiment, when the processor executes the computer program, the following steps are further implemented:
[0102] Send a reconnection indication message to the target LAC; wherein, the reconnection indication message carries the reconnection time.
[0103] In one embodiment, when the processor executes the computer program, the following steps are further implemented:
[0104] Determine the connection order of the target LAC according to the packet information of the target LAC;
[0105] Determine the reconnection time of the target LAC according to the reconnection time interval and the connection order.
[0106] In one embodiment, when the processor executes the computer program, the following steps are further implemented:
[0107] Receive an Open Control Connection Request (SCCRQ) message sent by the target LAC; wherein, the SCCRQ message carries the packet information of the target LAC.
[0108] In one embodiment, when the processor executes the computer program, the following steps are further implemented:
[0109] The packet information of the target LAC is determined by the target LAC according to its own network element priority.
[0110] In one embodiment, when the processor executes the computer program, the following steps are further implemented:
[0111] The network element priority of the target LAC is determined according to the geographical location of the LAC and / or the service type.
[0112] In one embodiment, when the processor executes the computer program, the following steps are further implemented:
[0113] The LAC identifier of the target LAC is included in the SCCRQ message.
[0114] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the following steps are implemented:
[0115] When the number of target access concentrators LACs where the Layer 2 Tunneling Protocol L2TP connection is interrupted exceeds the number threshold, determine the reconnection time of the target LAC according to the packet information of the target LAC;
[0116] Send the reconnection time to the target LAC so that the target LAC performs an L2TP connection at the reconnection time.
[0117] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented:
[0118] Send a reconnection indication message to the target LAC; wherein, the reconnection time is carried in the reconnection indication message.
[0119] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented:
[0120] Determine the connection order of the target LAC according to the packet information of the target LAC;
[0121] Determine the reconnection time of the target LAC according to the reconnection time interval and the connection order.
[0122] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented:
[0123] Receive an open control connection request SCCRQ message sent by the target LAC; wherein, the packet information of the target LAC is carried in the SCCRQ message.
[0124] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented:
[0125] The packet information of the target LAC is determined by the target LAC according to its own network element priority.
[0126] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented:
[0127] The network element priority of the target LAC is determined according to the geographical location of the LAC and / or the service type.
[0128] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented:
[0129] The LAC identifier of the target LAC is included in the SCCRQ message.
[0130] In one embodiment, a computer program product is provided, including a computer program, which when executed by a processor, implements the following steps:
[0131] When the number of target access concentrators LACs where the Layer 2 Tunneling Protocol L2TP connection is interrupted exceeds a quantity threshold, determine the reconnection time of the target LAC according to the packet information of the target LAC;
[0132] Send the reconnection time to the target LAC so that the target LAC performs an L2TP connection at the reconnection time.
[0133] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented:
[0134] Send a reconnection indication message to the target LAC; wherein, the reconnection time is carried in the reconnection indication message.
[0135] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented:
[0136] Determine the connection order of the target LAC according to the packet information of the target LAC;
[0137] Determine the reconnection time of the target LAC according to the reconnection time interval and the connection order.
[0138] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented:
[0139] Receive an open control connection request SCCRQ message sent by the target LAC; wherein, the packet information of the target LAC is carried in the SCCRQ message.
[0140] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented:
[0141] The packet information of the target LAC is determined by the target LAC according to its own network element priority.
[0142] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented:
[0143] The network element priority of the target LAC is determined according to the geographical location of the LAC and / or the service type.
[0144] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented:
[0145] The SCCRQ message contains the LAC identifier of the target LAC.
[0146] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use, and processing of relevant data need to comply with the relevant laws, regulations, and standards of relevant countries and regions.
[0147] Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be completed by instructing relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above methods. Among them, any reference to a memory, database, or other medium used in the embodiments provided in this application can include at least one of non-volatile and volatile memories. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc. The databases involved in the embodiments provided in this application can include at least one of relational databases and non-relational databases. Non-relational databases can include distributed databases based on blockchain, etc., and are not limited thereto. The processors involved in the embodiments provided in this application can be general-purpose processors, central processors, graphics processors, digital signal processors, programmable logic devices, data processing logics based on quantum computing, etc., and are not limited thereto.
[0148] The technical features of the above embodiments can be combined arbitrarily. For the sake of concise description, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, it should be considered as the scope recorded in this specification.
[0149] The above embodiments only express several implementation manners of the present application, and the description is relatively specific and detailed. However, it should not be understood as a limitation to the patent scope of the present application. It should be noted that for those of ordinary skill in the art, without departing from the concept of the present application, several deformations and improvements can still be made, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the appended claims.
Claims
1. An L2TP connection method, characterized in that: Applied to a network server LNS, the method comprises: When the number of target access concentrators LACs whose layer 2 tunnel protocol L2TP connection is interrupted exceeds a number threshold, determining a reconnection time of the target LACs according to grouping information of the target LACs; The reconnection time is sent to the target LAC, so that the target LAC performs an L2TP connection at the reconnection time.
2. The method according to claim 1, characterized in that The sending the reconnection time to the target LAC includes: Sending a reconnection indication message to the target LAC; wherein the reconnection indication message carries the reconnection time.
3. The method according to claim 1, characterized in that The determining the reconnection time of the target LAC according to the grouping information of the target LAC includes: Determining a connection order of the target LACs according to the grouping information of the target LACs; The reconnection time of the target LAC is determined according to the reconnection time interval and the connection sequence.
4. The method according to any one of claims 1 to 3, characterized in that: The method further comprises: Receive an open control connection request SCCRQ message sent by the target LAC; wherein the SCCRQ message carries the grouping information of the target LAC.
5. The method according to claim 4, characterized in that The grouping information of the target LAC is determined by the target LAC according to its own network element priority.
6. The method according to claim 5, characterized in that The network element priority of the target LAC is determined according to the geographical location of the LAC and / or the service type.
7. The method according to claim 4, characterized in that The SCCRQ message includes the LAC identifier of the target LAC.
8. An L2TP connection device, characterized in that: Configured in LNS, the device includes: A determination module, configured to determine a reconnection time of the target LAC according to the grouping information of the target LAC when the number of the target access concentrators LACs where the Layer 2 Tunnel Protocol L2TP connection is interrupted exceeds a quantity threshold; The sending module is used to send the reconnection time to the target LAC, so that the target LAC performs L2TP connection at the reconnection time.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
11. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.