Tunnel keep-alive method, network device, system and storage medium
After the communication failure between the CP device and the UP device through the UP device, the tunnel is kept alive according to the synchronized tunnel information, which solves the problem of tunnel interruption caused by the communication failure between the CP device and the UP device, and ensures that the terminal and the remote network are Stable connection.
Patent Information
- Application Number
- CN202010899677.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-08-31
- Publication Date
- 2025-02-25
- Estimated Expiration
- 2040-08-31
AI Technical Summary
When a communication failure occurs between the CP device and the UP device, the tunnel maintenance packet cannot be maintained through the tunnel, resulting in the interruption of the connection between the terminal and the remote network.
The UP device receives the tunnel information synchronized by the CP device, and after a communication failure, the tunnel is maintained based on the information to maintain the tunnel connection with the remote network device.
It ensures that the connection between the terminal and the remote network is not interrupted due to communication failures between the CP device and the UP device, and ensures the continuity of user services.
Smart Images

Figure CN114125910B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of communication technology, and in particular to a tunnel keep-alive method, network device, system and storage medium. Background Art
[0002] Currently, terminals can access the network through broadband network gateway (BNG) devices deployed in the network. Traditional BNG devices couple the control plane (CP) function and the user plane (UP) function. With the development of communication technology, the industry has proposed a BNG with separated control plane and user plane functions. This BNG is called a virtual broadband network gateway (vBNG) and includes a CP device and a UP device. When the Layer 2 Tunnel Protocol (L2TP) access concentrator (LAC) is implemented through vBNG, the CP device can establish a tunnel between the UP device and the remote L2TP network server (L2TP network server, LNS) to ensure that the terminal successfully accesses the remote network. However, in order to ensure that user services are not interrupted, the tunnel needs to be kept alive.
[0003] The related art provides a tunnel keep-alive method, in which after the CP device establishes a tunnel between the UP device and the LNS, the CP device and the LNS periodically send tunnel keep-alive messages through the UP device to keep the tunnel alive, so as to ensure that the user service is not interrupted. That is, the UP device is responsible for forwarding the tunnel keep-alive messages between the CP device and the LNS, so that the CP device and the LNS can communicate, and then keep the tunnel alive to ensure that the user service is not interrupted.
[0004] However, if a communication failure occurs between the CP device and the UP device, the CP device and the LNS cannot keep the tunnel alive through tunnel keepalive messages, which will trigger the removal of the tunnel, thereby disconnecting the terminal from the remote network, that is, interrupting user services. Summary of the invention
[0005] The embodiment of the present application provides a tunnel keep-alive method, network device, system and storage medium, which can ensure that the network connection of the terminal is not interrupted when a communication failure occurs between the UP device and the CP device. The technical solution is as follows:
[0006] In a first aspect, a tunnel keepalive method is provided, where a control plane CP device and a user plane UP device are used to interact with a remote network device to ensure that a terminal accesses a network, the method comprising:
[0007] The UP device receives the first tunnel information sent by the CP device, the first tunnel information including information of one or more tunnels established between the UP device and the remote network device; if the UP device detects that the communication between itself and the CP device fails, the UP device keeps the one or more tunnels alive according to the first tunnel information.
[0008] In an embodiment of the present application, before the communication failure between the UP device and the CP device, the UP device receives the tunnel information synchronized by the CP device. After the communication failure between the UP device and the CP, the UP device keeps the tunnel alive according to the tunnel information, that is, the UP device maintains the tunnel with the remote network device. In this way, the tunnel demolition will not be triggered due to the communication failure between the CP device and the UP device. This solution can ensure that the network connection between the terminal and the remote end will not be interrupted, that is, the user service will not be damaged.
[0009] In the embodiment of the present application, before the communication failure between the UP device and the CP device occurs, there are multiple implementation methods for the CP device to send the first tunnel information to the UP device. Please follow the relevant introduction in the second aspect below, which will not be repeated here.
[0010] Optionally, the first tunnel information is carried in a packet forwarding control protocol (PFCP) update request message, the one or more tunnels are L2TP tunnels, and the information of each tunnel in the one or more tunnels includes tunnel description information; if the L2TP tunnel is created according to the fourth version of the Internet Protocol (Internet protocol version 4, IPv4), the tunnel description information includes a tunnel local identifier, a tunnel remote identifier, a tunnel local IPv4 address, and a tunnel remote IPv4 address; if the L2TP tunnel is created according to the sixth version of the Internet Protocol (Internet protocol version 6, IPv6), the tunnel description information includes a tunnel local identifier, a tunnel remote identifier, a tunnel local IPv6 address, and a tunnel remote IPv6 address. That is, the CP device synchronizes the tunnel information to the UP device by extending the PFCP message.
[0011] In an embodiment of the present application, when the communication between the UP device and the CP device is normal, the CP device can also synchronize the first session information to the UP device, and the UP device receives the first session information sent by the CP device, and the first session information includes information about the session carried on the one or more tunnels. It should be noted that since the terminal implements service communication through the session carried on the tunnel, the CP device synchronizes the session information to the UP device, and in the subsequent process of the UP device keeping the tunnel alive, the session communication between the terminal and the remote network device is implemented according to the session information.
[0012] Optionally, the first session information is carried in a PFCP update request message, and the information of the session carried on each tunnel in the one or more tunnels includes a tunnel local identifier, a session local identifier, and a session remote identifier. That is, the CP device synchronizes the session message to the UP device by extending the PFCP message.
[0013] Optionally, in an embodiment of the present application, after receiving the PFCP update request message, the UP device sends a PFCP update response message to the CP device.
[0014] Optionally, the UP device communicates with the CP device through the control message redirection interface and the state control interface; the UP device detects that the communication between itself and the CP device fails, including: the UP device monitors the status of the control message redirection interface and the state control interface; if the UP device monitors that the status of the control message redirection interface and / or the state control interface is abnormal, the UP device determines that the communication between itself and the CP device fails. That is, the UP device perceives the communication status between the UP device and the CP device by real-time detection of the status of the communication interface between itself and the CP device.
[0015] It should be noted that, in the embodiment of the present application, each tunnel independently performs tunnel keepalive, that is, each tunnel corresponds to a tunnel keepalive sequence number, and the UP device or CP device periodically exchanges tunnel keepalive messages with the remote network device to achieve tunnel keepalive for each tunnel. In the embodiment of the present application, the first tunnel information includes the identification of one or more tunnels, and the tunnel keepalive message carries the tunnel keepalive sequence number of the corresponding tunnel.
[0016] In the case of a communication failure between the UP device and the CP device, the tunnel does not want to be removed, that is, the user services of the terminal do not want to be interrupted. Therefore, the tunnel is kept alive by the UP device. Next, the implementation method of the UP device keeping the tunnel alive when the UP device detects a communication failure between itself and the CP device is introduced.
[0017] The first implementation method, the UP device performs tunnel keep-alive for the one or more tunnels according to the first tunnel information, including: the UP device monitors a first tunnel keep-alive message sent by a remote network device, the first tunnel keep-alive message carries an identifier of a target tunnel and a tunnel keep-alive sequence number, and the UP device sends a second tunnel keep-alive message to the remote network device according to the identifier and tunnel keep-alive sequence number of the target tunnel and the identifier of the one or more tunnels.
[0018] It should be noted that, starting from sending the second tunnel keep-alive message to the remote network device, the UP device starts to periodically exchange tunnel keep-alive messages with the remote network device to implement tunnel keep-alive.
[0019] In this implementation, the remote network device will not perceive the communication failure between the CP device and the UP device. Instead, the UP device will continue to take over the CP device and keep the tunnel alive based on the information of the tunnel currently maintained by the remote network device, that is, the tunnel is kept alive quickly and seamlessly.
[0020] From the above, it can be seen that when the communication between the UP device and the CP device is normal, the CP device also sends the first session information to the UP device. In this way, while keeping the tunnel alive, the UP device can also maintain the data packets between the terminal and the remote network device on the session carried by the tunnel according to the first session information, thereby ensuring that the terminal can carry out normal business communications.
[0021] The second implementation method , the UP device performs tunnel keep-alive on the one or more tunnels according to the first tunnel information, including: the UP device resets the tunnel keep-alive sequence number of the target tunnel in the first tunnel information, the target tunnel is one of the one or more tunnels, the UP device instructs the remote network device to reset the tunnel keep-alive sequence number of the target tunnel according to the reset tunnel keep-alive sequence number of the target tunnel, after the remote network device successfully resets the tunnel keep-alive sequence number of the target tunnel, the UP device performs tunnel keep-alive on the target tunnel according to the reset tunnel keep-alive sequence number of the target tunnel and the identifier of the target tunnel.
[0022] In this implementation, the UP device needs to perform a tunnel failure recovery with the remote network device, that is, perform a data reconciliation with the remote network device and reset the tunnel keep-alive sequence number to ensure the tunnel consistency between the UP device and the remote network device.
[0023] Optionally, the UP device instructs the remote network device to reset the tunnel keep-alive sequence number of the target tunnel based on the reset tunnel keep-alive sequence number of the target tunnel, including: the UP device sends a first control request message to the remote network device, the first control request message carries the identifier of the target tunnel, the reset tunnel keep-alive sequence number of the target tunnel, and sequence number reset indication information; the UP device receives a first control response message sent by the remote network device, the first control response message is used to indicate that the remote network device has successfully reset the tunnel keep-alive sequence number of the target tunnel.
[0024] Optionally, before the UP device resets the tunnel keep-alive sequence number of the target tunnel, it also includes: the UP device creates a data reconciliation tunnel between the UP device and the remote network device; the UP device sends a first tunnel data reconciliation message to the remote network device through the data reconciliation tunnel, and the first tunnel data reconciliation message carries the identifier of the tunnel established between the UP device and the remote network device and stored on the UP device; the UP device receives a first tunnel reconciliation response message sent by the remote network device, and the first tunnel reconciliation response message carries the identifier of the tunnel established between the remote network device and the UP device and stored on the remote network device; the UP device determines the intersection of the identifier of the tunnel carried by the first tunnel data reconciliation message and the identifier of the tunnel carried by the first tunnel reconciliation response message as the identifier of one or more tunnels.
[0025] That is, before resetting the tunnel keep-alive sequence number between the UP device and the remote network device, the UP device first performs data reconciliation with the remote network device to ensure the tunnel consistency between the UP device and the remote network device through data reconciliation, so that the UP device can keep the tunnel alive more accurately.
[0026] As can be seen from the foregoing, when the communication between the UP device and the CP device is normal, the CP device also sends the first session information to the UP device, that is, before the UP device keeps the tunnel of one or more tunnels alive according to the first tunnel information, it also includes: the UP device receives the first session information sent by the CP device, and the first session information includes information about the sessions carried on the one or more tunnels. In this way, after the UP device creates a data reconciliation tunnel with the remote network device, it also includes: the UP device sends a first session data reconciliation message to the remote network device, and the first session data reconciliation message carries one or more first reference session identifiers, and the one or more first reference sessions are sessions carried on the target tunnel stored on the UP device; the UP device receives a first session reconciliation response message sent by the remote network device, and the first session reconciliation response message carries one or more second reference session identifiers, and the one or more second reference sessions are sessions carried on the target tunnel stored on the remote network device; the UP device determines the intersection of the identifiers of the one or more first reference sessions and the identifiers of the one or more second reference sessions as the identifier of the session carried on the target tunnel.
[0027] That is, in the embodiment of the present application, the UP device can also update the information of the session carried on the target tunnel in the first session information to perform fault recovery on the session carried on the target tunnel.
[0028] It should be noted that, through session failure recovery between the UP device and the remote network device, the session that has not been completely established between the UP device and the remote network device is deleted, that is, the session in the semi-connected state is cleared.
[0029] In the second implementation method described above, the UP device and the remote network device ensure the consistency of the tunnel and session between the UP device and the remote network device through tunnel fault recovery and session fault recovery, and can more accurately keep the tunnel established between the UP device and the remote network device alive.
[0030] The above only takes the target tunnel among the one or more tunnels as an example to introduce the method of keeping the tunnel alive by the UP device. For other tunnels among the one or more tunnels except the target tunnel, the UP device can keep the tunnel alive according to the same tunnel keeping method as the target tunnel, and the embodiments of the present application will not go into details about this.
[0031] In an embodiment of the present application, after the UP device performs tunnel keeping alive for the one or more tunnels according to the first tunnel information, it also includes: if the UP device detects that the communication between itself and the CP device is restored, the UP device stops performing tunnel keeping alive for the one or more tunnels, and the CP device needs to perform tunnel keeping alive for the one or more tunnels again.
[0032] In the embodiment of the present application, after the UP device stops performing tunnel keep-alive for the one or more tunnels, it also includes: the UP device receives the second tunnel information sent by the CP device, the second tunnel information includes the information of one or more tunnels established between the UP device and the remote network device stored on the CP device at the first moment, the first moment refers to the moment when the CP device completes tunnel failure recovery or session failure recovery between the UP device and the remote network device after the communication between the UP device and the CP device is restored; the UP device updates the locally stored tunnel information according to the second tunnel information. That is, after the tunnel failure recovery or session failure recovery is completed between the CP device and the remote network device, the tunnel information is synchronized to the UP device again to ensure that the tunnel information stored on the UP device is consistent with the CP device, in case the communication between the UP device and the CP device fails again.
[0033] Optionally, the second tunnel information is carried in a PFCP update request message. That is, in the embodiment of the present application, the PFCP is also extended to obtain a PFCP update request message carrying the second tunnel information.
[0034] In a second aspect, a tunnel keepalive method is provided, where a control plane CP device and a user plane UP device are used to interact with a remote network device to ensure that a terminal accesses a network, the method comprising:
[0035] The CP device sends first tunnel information to the UP device, where the first tunnel information includes information of one or more tunnels established between the UP device and the remote network device; if the CP device detects that a communication failure occurs between itself and the UP device, the CP device stops performing tunnel keep-alive operation on the one or more tunnels established between the UP device and the remote network device according to the first tunnel information when the UP device detects that a communication failure occurs between itself and the CP device.
[0036] In an embodiment of the present application, before the communication failure between the UP device and the CP device, the CP device synchronizes tunnel information to the UP device. After the communication failure between the UP device and the CP, the UP device keeps the tunnel alive according to the tunnel information, that is, the UP device maintains the tunnel with the remote network device. In this way, the tunnel demolition will not be triggered due to the communication failure between the CP device and the UP device. This solution can ensure that the network connection between the terminal and the remote end will not be interrupted, that is, the user service will not be damaged.
[0037] It should be noted that the implementation method of the UP device performing tunnel keep-alive according to the tunnel information refers to the tunnel keep-alive method provided in the first aspect above, which will not be repeated here.
[0038] In the embodiment of the present application, before the communication failure between the UP device and the CP device occurs, there are multiple implementation methods for the CP device to send the first tunnel information to the UP device, and two of the implementation methods are described below.
[0039] The first implementation method , the CP device synchronizes the first tunnel information to the UP device in real time.
[0040] That is, each time the CP device creates a tunnel, it sends information about the created tunnel to the UP device, and each time it deletes a tunnel, it sends information about the deleted tunnel to the UP device.
[0041] Optionally, the first tunnel information is carried in a PFCP update request message, and the one or more tunnels are L2TP tunnels. The information of each tunnel in the one or more tunnels includes tunnel description information; if the L2TP tunnel is created based on IPv4, the tunnel description information includes a tunnel local identifier, a tunnel remote identifier, a tunnel local IPv4 address, and a tunnel remote IPv4 address; if the L2TP tunnel is created based on IPv6, the tunnel description information includes a tunnel local identifier, a tunnel remote identifier, a tunnel local IPv6 address, and a tunnel remote IPv6 address.
[0042] In an embodiment of the present application, when communication between the UP device and the CP device is normal, the CP device can also synchronize the first session information to the UP device, and the UP device receives the first session information sent by the CP device, where the first session information includes information about the session carried on the one or more tunnels.
[0043] In a first implementation manner, each time a CP device creates a session, it synchronizes the information of the created session to the UP device, and each time a CP device deletes a session, it synchronizes the information of the deleted session to the UP device.
[0044] Optionally, the first session information is carried in a PFCP update request message, and the information of the session carried on each tunnel in the one or more tunnels includes a tunnel local identifier, a session local identifier, and a session remote identifier.
[0045] In the first implementation of synchronizing information from the CP device to the UP device, the first tunnel information and the first session information are respectively carried in different PFCP update request messages, and a PFCP update request message carries information of a created tunnel, or information of a deleted tunnel, or information of a created session, or information of a deleted session. By synchronizing information in an instant manner, the timeliness of information and the reliability of tunnel keepalive can be guaranteed.
[0046] The second implementation method , the CP device periodically synchronizes the first tunnel information to the UP device.
[0047] That is, the CP device synchronizes the information of all established tunnels stored in itself to the UP device every other synchronization cycle. Alternatively, the CP device synchronizes the updated tunnel information to the CP device every other synchronization cycle, and the updated tunnel includes the information of tunnels established and deleted after the last synchronization of tunnel information.
[0048] In the second implementation, the CP device can also periodically synchronize the first session information to the UP device. That is, in the embodiment of the present application, before the CP device stops keeping the tunnel alive, it also includes: the CP device sends the first session information to the UP device, and the first session information includes information about the session carried on the one or more tunnels.
[0049] Optionally, the first tunnel information and the first session information are carried in a PFCP update request message. For the relevant description of the PFCP update request message, refer to the aforementioned relevant introduction and will not be repeated here. It should be noted that in the second implementation method, the first tunnel information and the first session information can be carried in the same PFCP update request message or in different PFCP update request messages.
[0050] Optionally, the first session information is carried in a PFCP update request message, and the information of the session carried on each tunnel of the one or more tunnels includes a tunnel local identifier, a session local identifier, and a session remote identifier.
[0051] It should be noted that the detailed introduction of the first tunnel information and the first session information refers to the relevant content of the aforementioned first aspect, which will not be repeated here.
[0052] Optionally, the CP device communicates with the UP device through a control message redirection interface and a status control interface; the CP device detects that a communication failure occurs between itself and the UP device, including: the CP device monitors the status of the control message redirection interface and the status control interface; if the CP device monitors that the status of the control message redirection interface and / or the status control interface is abnormal, the CP device determines that a communication failure occurs between itself and the UP device.
[0053] In the embodiment of the present application, if the CP device detects that the communication between itself and the UP device fails, then after the CP device stops performing tunnel keepalive for the one or more tunnels, the method further includes: if the CP device detects that the communication between itself and the UP device is restored, then the CP device performs tunnel keepalive for the one or more tunnels again. That is, when the communication between the CP device and the UP device is normal, the CP device still performs tunnel keepalive to reduce the load pressure of the UP device.
[0054] In an embodiment of the present application, the CP device re-performs tunnel keep-alive on the one or more tunnels, including: the CP device resets the tunnel keep-alive sequence number of the locally stored target tunnel, the target tunnel being one of the one or more tunnels; the CP device instructs the remote network device to reset the tunnel keep-alive sequence number of the target tunnel according to the reset tunnel keep-alive sequence number of the target tunnel; after the remote network device successfully resets the tunnel keep-alive sequence number of the target tunnel, the CP device performs tunnel keep-alive on the target tunnel through the UP device according to the reset tunnel keep-alive sequence number of the target tunnel and the identifier of the target tunnel.
[0055] Optionally, the CP device instructs the remote network device to reset the tunnel keep-alive sequence number of the target tunnel based on the reset tunnel keep-alive sequence number of the target tunnel, including: the CP device sends a second control request message to the remote network device through the UP device, the second control request message carries the identifier of the target tunnel, the reset tunnel keep-alive sequence number of the target tunnel, and sequence number reset indication information; the CP device receives a second control response message sent by the remote network device through the UP device, and the second control response message is used to indicate that the remote network device has successfully reset the tunnel keep-alive sequence number of the target tunnel.
[0056] It should be noted that in the process of keeping the tunnel between the UP device and the remote network device, the remote network device may dismantle some tunnels. Through tunnel failure recovery between the CP device and the remote network device, the tunnel data between the UP device and the remote network device will be reconciled to clean up the dismantled tunnels stored on the CP, ensure the consistency of the tunnels between the CP device and the remote network device, and ensure the accuracy of the tunnel keeping of the UP device.
[0057] That is, before the CP device resets the tunnel keep-alive sequence number of the locally stored target tunnel, it also includes: the CP device creates a data reconciliation tunnel with the remote network device; the CP device sends a second data reconciliation message to the remote network device through the UP device through the data reconciliation tunnel, and the second data reconciliation message carries the identifier of the tunnel established between the UP device and the remote network device stored on the CP device; the CP device receives a second reconciliation response message sent by the remote network device through the UP device, and the second reconciliation response message carries the identifier of the tunnel established between the remote network device and the UP device stored on the remote network device; the CP device determines the intersection of the tunnel identifier carried by the second data reconciliation message and the tunnel identifier carried by the second reconciliation response message as the identifier of one or more tunnels.
[0058] It should be noted that the process of the CP device performing data reconciliation and resetting the tunnel keep-alive sequence number refers to the relevant content of the aforementioned UP device, which will not be repeated here.
[0059] In the embodiment of the present application, after the CP device recovers the target tunnel through the UP device, it can also update the information of the session carried on the target tunnel stored in itself through the UP device to recover the session carried on the target tunnel.
[0060] That is, after the CP device creates a data reconciliation tunnel with the remote network device, it also includes: the CP device sends a second session data reconciliation message to the remote network device through the UP device, the second session data reconciliation message carries one or more first reference session identifiers, and the one or more first reference sessions are sessions carried on the target tunnel stored on the CP device; the CP device receives a second session reconciliation response message sent by the remote network device through the UP device, the second session reconciliation response message carries one or more third reference session identifiers, and the one or more third reference sessions are sessions carried on the target tunnel stored on the remote network device; the CP device determines the intersection of the identifiers of the one or more first reference sessions and the identifiers of the one or more third reference sessions as the identifier of the session carried on the target tunnel. That is, the CP device updates the information of the session carried on the target tunnel stored in itself through the UP device to perform fault recovery on the session carried on the target tunnel.
[0061] It should be noted that in the process of keeping the tunnel alive between the UP device and the remote network device, the remote network device may also remove sessions on certain tunnels. The CP device and the remote network device recover through session failures and reconcile the session data between the UP device and the remote network device, that is, clear the removed sessions stored on the CP to ensure session consistency between the CP device and the remote network device.
[0062] In addition, for other tunnels in the one or more tunnels except the target tunnel, the CP device can perform tunnel fault recovery and session fault recovery according to the same fault recovery method as the target tunnel, which will not be described in detail in the embodiment of the present application.
[0063] In the embodiment of the present application, after the CP device performs fault recovery on the target tunnel through the UP device according to the tunnel keep-alive sequence number of the reset target tunnel, it also includes: the CP device sends second tunnel information to the UP device, and the second tunnel information includes information of one or more tunnels established between the UP device and the remote network device stored on the CP device at the first moment, and the first moment refers to the moment when the CP device completes tunnel fault recovery or session fault recovery between the UP device and the remote network device after the communication between the UP device and the CP device is restored. That is, the CP device synchronizes the tunnel information to the UP device again, in case the communication between the UP device and the CP device fails again, and the UP device performs tunnel keep-alive.
[0064] Optionally, the second tunnel information is carried in a PFCP update request message.
[0065] In the embodiment of the present application, after the CP device recovers the session on the target tunnel through the UP device, the process further includes: the CP device sends second session information to the UP device, the second session information including information of the session carried on one or more tunnels established between the UP device and the remote network device and stored on the CP device at the second moment. That is, the CP device synchronizes the session information to the UP device again, in case the communication between the UP device and the CP device fails again, and the UP device keeps the tunnel alive and implements the session communication of the terminal.
[0066] Optionally, the second session information is carried in a PFCP update request message.
[0067] Optionally, the second tunnel information and the second session information are carried in one PFCP update request message, or are carried in different PFCP update request messages.
[0068] Optionally, in the application embodiment, after sending a PFCP update request message carrying the second tunnel information and / or the second session information to the UP device, the CP device receives a PFCP update response message sent by the UP device.
[0069] In an embodiment of the present application, after the CP device performs tunnel failure recovery and session failure session with the remote network device, after synchronizing the tunnel information and session information to the UP device once, it continues to synchronize the latest tunnel information and session information to the UP device in an immediate or periodic manner in preparation for a subsequent communication failure between the UP device and the CP device.
[0070] In a third aspect, a network device is provided, wherein the network device has the function of implementing the tunnel keep-alive method in the first aspect. The network device includes one or more modules, wherein the one or more modules are used to implement the tunnel keep-alive method provided in the first aspect.
[0071] That is, a network device is provided, which is applied to a network system, the network system includes a CP device and a UP device, the CP device and the UP device are used to interact with a remote network device to ensure that a terminal accesses the network, the network device is a UP device, and the network device includes:
[0072] A first receiving module, configured to receive first tunnel information sent by a CP device, where the first tunnel information includes information about one or more tunnels established between a UP device and a remote network device;
[0073] The tunnel keep-alive module is used to keep the one or more tunnels alive according to the first tunnel information if a communication failure is detected between the UP device and the CP device.
[0074] Optionally, the first tunnel information includes identifications of one or more tunnels;
[0075] The tunnel keepalive module includes:
[0076] A monitoring unit, configured to monitor a first tunnel keep-alive message sent by a remote network device, wherein the first tunnel keep-alive message carries an identifier of a target tunnel and a tunnel keep-alive sequence number;
[0077] The first sending unit is used to send a second tunnel keep-alive message to the remote network device according to the tunnel keep-alive sequence number of the target tunnel and the identifier of the one or more tunnels.
[0078] Optionally, the first tunnel information includes identifications of one or more tunnels;
[0079] The tunnel keepalive module includes:
[0080] a reset unit, configured to reset a tunnel keep-alive sequence number of a target tunnel, the target tunnel being one of the one or more tunnels;
[0081] an instructing unit, configured to instruct a remote network device to reset the tunnel keep-alive sequence number of the target tunnel according to the reset tunnel keep-alive sequence number of the target tunnel;
[0082] The tunnel keep-alive unit is used to keep the target tunnel alive according to the reset tunnel keep-alive sequence number of the target tunnel and the identifier of the target tunnel after the remote network device successfully resets the tunnel keep-alive sequence number of the target tunnel.
[0083] Optionally, the indicating unit is specifically used for:
[0084] Sending a first control request message to a remote network device, where the first control request message carries an identifier of a target tunnel, a tunnel keepalive sequence number of the reset target tunnel, and sequence number reset indication information;
[0085] A first control response message sent by a remote network device is received, where the first control response message is used to indicate that the remote network device has successfully reset the tunnel keep-alive sequence number of the target tunnel.
[0086] Optionally, the tunnel keep-alive module further includes:
[0087] A creation unit, used for creating a data reconciliation tunnel with a remote network device;
[0088] A second sending unit, configured to send a first tunnel data reconciliation message to the remote network device through the data reconciliation tunnel, wherein the first tunnel data reconciliation message carries an identifier of the tunnel established between the UP device and the remote network device and stored therein;
[0089] A first receiving unit, configured to receive a first tunnel reconciliation response message sent by a remote network device, wherein the first tunnel reconciliation response message carries an identifier of a tunnel established between the remote network device and the UP device and stored on the remote network device;
[0090] The first determining unit is configured to determine an intersection of an identifier of a tunnel carried by the first tunnel data reconciliation message and an identifier of a tunnel carried by the first tunnel reconciliation response message as an identifier of the one or more tunnels.
[0091] Optionally, the network device further includes:
[0092] A second receiving module, configured to receive first session information sent by the CP device, where the first session information includes information about the session carried on the one or more tunnels;
[0093] The tunnel keepalive module also includes:
[0094] A third sending unit is used to send a first session data reconciliation message to the remote network device, where the first session data reconciliation message carries one or more identifiers of first reference sessions, where the one or more first reference sessions are sessions carried on the target tunnel stored on the UP device;
[0095] A second receiving unit is used to receive a first session reconciliation response message sent by a remote network device, where the first session reconciliation response message carries identifiers of one or more second reference sessions, where the one or more second reference sessions are sessions carried on a target tunnel stored on the remote network device;
[0096] The second determining unit is configured to determine an intersection of the one or more first reference session identifiers and the one or more second reference session identifiers as an identifier of a session carried on a target tunnel.
[0097] Optionally, the network device further includes:
[0098] The processing module is configured to stop keeping the one or more tunnels alive if it is detected that the communication between the UP device and the CP device is restored.
[0099] Optionally, the network device further includes:
[0100] A third receiving module is configured to receive second tunnel information sent by the CP device, where the second tunnel information includes information about one or more tunnels established between the UP device and the remote network device stored on the CP device at a first moment, where the first moment refers to a moment when the CP device completes tunnel failure recovery or session failure recovery between the UP device and the remote network device after communication between the UP device and the CP device is restored;
[0101] An updating module is used to update the locally stored tunnel information according to the second tunnel information.
[0102] Optionally, the UP device communicates with the CP device via a control message redirection interface and a status control interface;
[0103] The tunnel keepalive module includes:
[0104] A monitoring unit, used for monitoring the status of the control message redirection interface and the status control interface;
[0105] The third determining unit is configured to determine that a communication failure between the UP device and the CP device is detected if it is monitored that the state of the control message redirection interface and / or the state control interface is abnormal.
[0106] Optionally, the first tunnel information is carried in a PFCP update request message, the one or more tunnels are L2TP tunnels, and the information of each tunnel in the one or more tunnels includes tunnel description information;
[0107] If the L2TP tunnel is created based on IPv4, the tunnel description information includes the tunnel local identifier, tunnel remote identifier, tunnel local IPv4 address, and tunnel remote IPv4 address;
[0108] If the L2TP tunnel is created based on IPv6, the tunnel description information includes a local tunnel identifier, a remote tunnel identifier, a local tunnel IPv6 address, and a remote tunnel IPv6 address.
[0109] Optionally, the second tunnel information is carried in a PFCP update request message.
[0110] Optionally, the first session information is carried in a PFCP update request message, and the information of the session carried on each tunnel of the one or more tunnels includes a tunnel local identifier, a session local identifier, and a session remote identifier.
[0111] In a fourth aspect, a network device is provided, wherein the network device has the function of implementing the tunnel keep-alive method in the second aspect. The network device comprises one or more modules, wherein the one or more modules are used to implement the tunnel keep-alive method provided in the second aspect.
[0112] That is, a network device is provided, which is applied to a network system, the network system includes a CP device and a UP device, the CP device and the UP device are used to interact with a remote network device to ensure that a terminal accesses the network, the network device is a CP device, and the network device includes:
[0113] A first sending module, configured to send first tunnel information to the UP device, where the first tunnel information includes information about one or more tunnels established between the UP device and the remote network device;
[0114] A processing module, configured to stop keeping the one or more tunnels alive if a communication failure between the CP device and the UP device is detected;
[0115] The first tunnel information is used to instruct the UP device to keep one or more tunnels established between the UP device and the remote network device alive when detecting that a communication failure occurs between the UP device and the CP device.
[0116] Optionally, the network device further includes:
[0117] The tunnel keep-alive module is used to re-enable one or more tunnels to keep alive the tunnel if it is detected that the communication between the CP device and the UP device is restored.
[0118] Optionally, the tunnel keepalive module includes:
[0119] a reset unit, configured to reset a tunnel keep-alive sequence number of a locally stored target tunnel, the target tunnel being one of the one or more tunnels;
[0120] an instructing unit, configured to instruct a remote network device to reset the tunnel keep-alive sequence number of the target tunnel according to the reset tunnel keep-alive sequence number of the target tunnel;
[0121] The tunnel keep-alive unit is used to keep the target tunnel alive through the UP device according to the reset tunnel keep-alive sequence number of the target tunnel and the identifier of the target tunnel after the remote network device successfully resets the tunnel keep-alive sequence number of the target tunnel.
[0122] Optionally, the indicating unit is specifically used for:
[0123] Sending a second control request message to the remote network device through the UP device, where the second control request message carries the identifier of the target tunnel, the tunnel keep-alive sequence number of the reset target tunnel, and sequence number reset indication information;
[0124] The second control response message sent by the remote network device is received through the UP device, where the second control response message is used to indicate that the remote network device has successfully reset the tunnel keep-alive sequence number of the target tunnel.
[0125] Optionally, the tunnel keep-alive module further includes:
[0126] A creation unit, used for creating a data reconciliation tunnel with a remote network device;
[0127] A first sending unit, configured to send a second data reconciliation message to a remote network device through a UP device via a data reconciliation tunnel, wherein the second data reconciliation message carries an identifier of a tunnel established between the UP device and the remote network device stored on the CP device;
[0128] A first receiving unit is configured to receive, through the UP device, a second reconciliation response message sent by the remote network device, where the second reconciliation response message carries an identifier of a tunnel established between the remote network device and the UP device and stored on the remote network device;
[0129] The first determining unit is configured to determine an intersection of an identifier of a tunnel carried by the second data reconciliation message and an identifier of a tunnel carried by the second reconciliation response message as an identifier of one or more tunnels.
[0130] Optionally, the tunnel keep-alive module further includes:
[0131] A second sending unit is used to send a second session data reconciliation message to the remote network device through the UP device, where the second session data reconciliation message carries one or more identifiers of the first reference sessions, where the one or more first reference sessions are sessions carried on the target tunnel stored on the CP device;
[0132] A second receiving unit is configured to receive, through the UP device, a second session reconciliation response message sent by the remote network device, where the second session reconciliation response message carries identifiers of one or more third reference sessions, where the one or more third reference sessions are sessions carried on the target tunnel stored on the remote network device;
[0133] The second determining unit is configured to determine an intersection of the one or more first reference session identifiers and the one or more third reference session identifiers as an identifier of a session carried on a target tunnel.
[0134] Optionally, the tunnel keep-alive module further includes:
[0135] The third sending unit is used to send second tunnel information to the UP device, where the second tunnel information includes information of one or more tunnels established between the UP device and the remote network device stored on the CP device at a first moment, where the first moment refers to the moment when the CP device completes tunnel fault recovery or session fault recovery between the UP device and the remote network device through the UP device after the communication between the UP device and the CP device is restored.
[0136] Optionally, the CP device communicates with the UP device via a control message redirection interface and a status control interface;
[0137] The processing modules include:
[0138] A monitoring unit, used for monitoring the status of the control message redirection interface and the status control interface;
[0139] The third determining unit is configured to determine that a communication failure between the CP device and the UP device is detected if it is monitored that the state of the control message redirection interface and / or the state control interface is abnormal.
[0140] Optionally, the first tunnel information is carried in a PFCP update request message, the one or more tunnels are Layer 2 Tunnel Protocol L2TP tunnels, and the information of each tunnel in the one or more tunnels includes tunnel description information;
[0141] If the L2TP tunnel is created based on IPv4, the tunnel description information includes the tunnel local identifier, tunnel remote identifier, tunnel local IPv4 address, and tunnel remote IPv4 address;
[0142] If the L2TP tunnel is created based on IPv6, the tunnel description information includes a local tunnel identifier, a remote tunnel identifier, a local tunnel IPv6 address, and a remote tunnel IPv6 address.
[0143] Optionally, the second tunnel information is carried in a PFCP update request message.
[0144] Optionally, the network device further includes:
[0145] The fourth sending module is used to send the first session information to the UP device, where the first session information includes information about the sessions carried on the one or more tunnels.
[0146] Optionally, the first session information is carried in a PFCP update request message, and the information of the session carried on each tunnel of the one or more tunnels includes a tunnel local identifier, a session local identifier, and a session remote identifier.
[0147] Optionally, the first sending module includes:
[0148] a fifth sending unit, configured to send information of a created tunnel to the UP device each time a tunnel is created, wherein the one or more tunnels include the created tunnel; or
[0149] The sixth sending unit is configured to periodically send the tunnel information stored in the unit to the UP device.
[0150] In a fifth aspect, a network device is provided, the network device is applied to a network system, the network system includes a UP device and a CP device, the CP device and the UP device are used to interact with a remote network device to ensure that the terminal accesses the network, the network device is a UP device, the network device includes a processor and a memory, the memory is used to store a program for executing the tunnel keep-alive method provided in the first aspect, and store data involved in implementing the tunnel keep-alive method provided in the first aspect. The processor is configured to execute the program stored in the memory. The operating device of the storage device may also include a communication bus, which is used to establish a connection between the processor and the memory.
[0151] In a sixth aspect, a network device is provided, the network device is applied to a network system, the network system includes a UP device and a CP device, the CP device and the UP device are used to interact with a remote network device to ensure that the terminal accesses the network, the network device is a CP device, the network device includes a processor and a memory, the memory is used to store a program for executing the tunnel keep-alive method provided in the second aspect, and store data involved in implementing the tunnel keep-alive method provided in the second aspect. The processor is configured to execute the program stored in the memory. The operating device of the storage device may also include a communication bus, which is used to establish a connection between the processor and the memory.
[0152] In a seventh aspect, a network system is provided, the system comprising a CP device and a UP device, and a remote network device, the CP device and the UP device are used to interact with the remote network device to ensure that a terminal accesses a network;
[0153] The UP device is used to implement the tunnel keep-alive method provided in the first aspect above;
[0154] The CP device is used to implement the tunnel keep-alive method provided in the second aspect above.
[0155] In an eighth aspect, a computer-readable storage medium is provided, wherein instructions are stored in the computer-readable storage medium, and when the computer-readable storage medium is executed on a computer, the computer executes the tunnel keeping alive method described in the first aspect or the second aspect.
[0156] In a ninth aspect, a computer program product comprising instructions is provided, which, when executed on a computer, enables the computer to execute the tunnel keepalive method described in the first aspect or the second aspect.
[0157] The technical effects obtained by the above-mentioned third aspect, fourth aspect, fifth aspect, sixth aspect, seventh aspect, eighth aspect and ninth aspect are similar to the technical effects obtained by the corresponding technical means in the first aspect or the second aspect, and will not be repeated here.
[0158] The technical solution provided by the embodiments of the present application can at least bring the following beneficial effects:
[0159] In an embodiment of the present application, before the communication failure between the UP device and the CP device, the UP device receives the tunnel information synchronized by the CP device. After the communication failure between the UP device and the CP, the UP device keeps the tunnel alive according to the tunnel information, that is, the UP device maintains the tunnel with the remote network device. In this way, the tunnel demolition will not be triggered due to the communication failure between the CP device and the UP device. This solution can ensure that the network connection between the terminal and the remote end will not be interrupted, that is, the user service will not be damaged. BRIEF DESCRIPTION OF THE DRAWINGS
[0160] Figure 1 This is a system architecture diagram involved in a tunnel keep-alive method provided in an embodiment of the present application;
[0161] Figure 2 It is a structural diagram of a network device provided in an embodiment of the present application;
[0162] Figure 3 This is a flow chart of a tunnel keep-alive method provided in an embodiment of the present application;
[0163] Figure 4 is a flow chart of another tunnel keep-alive method provided in an embodiment of the present application;
[0164] Figure 5 It is a schematic diagram of communication between modules included in a CP device and a UP device provided in an embodiment of the present application;
[0165] Figure 6 It is a structural diagram of a network device provided in an embodiment of the present application;
[0166] Figure 7 is a schematic diagram of the structure of another network device provided in an embodiment of the present application;
[0167] Figure 8 It is a structural diagram of another network device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0168] In order to make the objectives, technical solutions and advantages of the embodiments of the present application clearer, the implementation methods of the present application will be further described in detail below in conjunction with the accompanying drawings.
[0169] The network architecture and business scenarios described in the embodiments of the present application are intended to more clearly illustrate the technical solutions of the embodiments of the present application, and do not constitute a limitation on the technical solutions provided in the embodiments of the present application. A person of ordinary skill in the art can appreciate that with the evolution of the network architecture and the emergence of new business scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.
[0170] Figure 1 is a system architecture diagram involved in a tunnel keep-alive method provided in an embodiment of the present application. Figure 1 The system architecture includes a terminal 101, a CP device 102 and a UP device 103, a remote network device 104 and a remote access point 105. A communication connection is established between the terminal 101 and the UP device 103, a communication connection is established between the UP device 103 and the remote network device 104, a communication connection is established between the CP device 102 and the UP device 103, and a communication connection is established between the remote network device 104 and the remote access point 105.
[0171] In the embodiment of the present application, the local CP device 102 and the UP device 103 are two parts of the vBGN, which jointly implement the LAC function, and the remote network device 104 implements the LNS function. The local CP device 102 can establish a tunnel and a session between the UP device 103 and the remote network device 104 to ensure that the terminal 101 successfully accesses the network provided by the remote access point 105 and implements service communication. In order to ensure that the user service is not interrupted, the tunnel between the UP device 103 and the remote network device 104 needs to be kept alive.
[0172] In the case where there is no communication failure between the UP device 103 and the CP device 102, the CP device 102 is used to establish a tunnel between the UP device 103 and the remote network device 104 and a session carried on the tunnel, thereby connecting the terminal 101 to the remote network, and the CP device 102 performs tunnel keepalive on the tunnel established between the UP device 103 and the remote network device 104 through the UP device 103 to ensure that user services are not interrupted. The UP device 103 is also used to transmit data packets between the terminal 101 and the remote network device 104 on the session carried by the tunnel, so as to realize service communication between the terminal 101 and the remote network device 104. That is, the CP device 102 and the UP device 103 are used to interact with the remote network device 104 to ensure that the terminal 101 accesses the network. In addition, the CP device 102 is also used to synchronize tunnel information and session information to the UP device 103 according to the tunnel keepalive method provided in the embodiment of the present application.
[0173] In the event of a communication failure between the UP device 103 and the CP device 102, the CP device 102 cannot continue to interact with the remote network device 104 through the UP device 103 to keep the tunnel alive. In this case, the UP device 103 keeps the tunnel between the UP device 103 and the remote network device 104 alive based on the stored tunnel information to ensure that the tunnel will not be dismantled due to the communication failure between the UP device 103 and the CP device 102, so as to maintain the tunnel and ensure that the session carried on the tunnel is not interrupted.
[0174] After the communication between the UP device 103 and the CP device 102 is restored, the UP device 103 stops tunnel keep-alive, and the CP device 102 continues to keep the tunnel alive through the UP device 103 and the remote network device 104, and during the process of keeping the tunnel alive between itself and the remote network device 104, the CP device 102 synchronizes the stored tunnel information to the UP device 103.
[0175] It should be noted that the system architecture includes multiple terminals, and remote network devices and remote access points corresponding to each terminal. The above only takes one terminal and one corresponding remote network device and remote access point as an example. For each terminal, the CP device and the UP device can realize the above functions.
[0176] Optionally, the remote network device 104 is a traditional BNG device, that is, the remote network device 104 is an independent gateway device. Alternatively, the remote network device 104 is also implemented by vBNG, that is, it includes a CP device and a UP device. In this case, for the convenience of description, the local CP device 102 and UP device 103 are respectively referred to as CP-LAC and UP-LAC, and the remote CP device and UP device are respectively referred to as CP-LNS and UP-LNS. The CP-LAC is connected to the UP-LAC in communication, the UP-LAC is connected to the UP-LNS in communication, and the UP-LNS is connected to the CP-LNS in communication.
[0177] Optionally, a virtual broadband remote access server (vBRAS) can also achieve the same function as vBNG, that is, the vBRAS includes a CP device and a UP device, which are used to connect the local terminal to the remote network and implement tunnel preservation according to the tunnel preservation method provided in the embodiment of the present application.
[0178] In the embodiment of the present application, the terminal 101 is a mobile phone, a computer, a home gateway or other device, the UP device 103 is a router, a switch or other device, the CP device 102 is a server, or a server cluster composed of multiple servers, or a cloud computing service center, the remote network device 104 is an independent device such as a router, a switch, or the remote network device 104 includes a UP device and a CP device, and the remote access point 105 is a device that provides a broadband network.
[0179] Please refer to Figure 2 , Figure 2 is a schematic diagram of a network device according to an embodiment of the present application. Optionally, the network device is Figure 1 The CP device or UP device shown in FIG. 1 includes one or more processors 201 , a communication bus 202 , a memory 203 , and one or more communication interfaces 204 .
[0180] The processor 201 is a general-purpose central processing unit (CPU), a network processor (NP), a microprocessor, or one or more integrated circuits for implementing the solution of the present application, such as an application-specific integrated circuit (ASIC), a programmable logic device (PLD) or a combination thereof. Optionally, the PLD is a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL) or any combination thereof.
[0181] The communication bus 202 is used to transmit information between the above components. Optionally, the communication bus 202 is divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.
[0182] Optionally, the memory 203 is a read-only memory (ROM), a random access memory (RAM), an electrically erasable programmable read-only memory (EEPROM), an optical disc (including a compact disc read-only memory (CD-ROM), a compressed optical disc, a laser disc, a digital versatile disc, a Blu-ray disc, etc.), a magnetic disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto. The memory 203 exists independently and is connected to the processor 201 via the communication bus 202, or the memory 203 is integrated with the processor 201.
[0183] The communication interface 204 uses any transceiver-like device to communicate with other devices or communication networks. The communication interface 204 includes a wired communication interface, and optionally, also includes a wireless communication interface. Among them, the wired communication interface is, for example, an Ethernet interface. Optionally, the Ethernet interface is an optical interface, an electrical interface, or a combination thereof. The wireless communication interface is a wireless local area network (WLAN) interface, a cellular network communication interface, or a combination thereof. When the network device is a CP device, the communication interface 204 is used to communicate with a UP device, and when the network device is a UP device, the communication interface 204 is used to communicate with a CP device.
[0184] Optionally, in some embodiments, the network device includes multiple processors, such as Figure 2 The processor 201 and the processor 205 shown in . Each of these processors is a single-core processor, or a multi-core processor. Optionally, the processor here refers to one or more devices, circuits, and / or processing cores for processing data (such as computer program instructions).
[0185] In a specific implementation, as an embodiment, the network device also includes an output device 206 and an input device 207. The output device 206 communicates with the processor 201 and can display information in a variety of ways. For example, the output device 206 is a liquid crystal display (LCD), a light emitting diode (LED) display device, a cathode ray tube (CRT) display device or a projector. The input device 207 communicates with the processor 201 and can receive user input in a variety of ways. For example, the input device 207 is a mouse, a keyboard, a touch screen device or a sensor device.
[0186] In some embodiments, the memory 203 is used to store the program code 210 for executing the solution of the present application, and the processor 201 can execute the program code 210 stored in the memory 203. The program code includes one or more software modules, and the network device can implement the following through the processor 201 and the program code 210 in the memory 203. Figure 3 The embodiment provides a tunnel keep-alive method.
[0187] When the network device is a UP device, the memory 203 is used to store the program code 210, and the processor 201 is used to execute the program code 210 stored in the memory 203 to implement the corresponding function of the UP device in the tunnel keeping alive method provided in the embodiment of the present application. That is, the first tunnel information sent by the CP device is received, and if a communication failure is detected between the UP device and the CP device, the tunnel keeping alive is performed according to the first tunnel information. The specific implementation method is as follows Figure 3 The detailed description in the embodiments will not be repeated here.
[0188] For example, when Figure 6 In the illustrated embodiment, when the first receiving module 601 and the tunnel keeping alive module 602 are implemented by software, the program code 210 may include a first receiving module and a tunnel keeping alive module, the first receiving module is used to receive the first tunnel information sent by the CP device, and the tunnel keeping alive module is used to perform tunnel keeping according to the first tunnel information.
[0189] When the network device is a CP device, the memory 203 is used to store the program code 210, and the processor 201 is used to execute the program code 210 stored in the memory 203 to implement the corresponding function of the CP device in the tunnel keeping alive method provided in the embodiment of the present application. That is, the first tunnel information is sent to the UP device, and if a communication failure is detected between the CP device and the UP device, the tunnel keeping alive is stopped. The specific implementation method is as follows Figure 3The detailed description in the embodiments will not be repeated here.
[0190] For example, when Figure 8 In the illustrated embodiment, when the first sending module 701, the processing module 702 and the tunnel keeping alive module 703 are implemented by software, the program code 210 may include the first sending module, the processing module and the tunnel keeping alive module. The first sending module is used to send the first tunnel information to the UP device. The processing module is used to stop the tunnel keeping alive after detecting that a communication failure occurs between the CP device and the UP device. The tunnel keeping alive module is used to re-perform the tunnel keeping alive after detecting that the communication between the CP device and the UP device is restored.
[0191] Figure 3 This is a flow chart of a tunnel keep-alive method provided in an embodiment of the present application. Please refer to Figure 3 , the method comprises the following steps.
[0192] Step 301: A UP device receives first tunnel information sent by a CP device, where the first tunnel information includes information about one or more tunnels established between the UP device and a remote network device.
[0193] In the embodiment of the present application, the CP device and the UP device are used to interact with the remote network device to ensure that the terminal accesses the network. For example, in a scenario where the terminal accesses the remote company headquarters intranet through a broadband dial-up connection, the terminal can establish a communication connection through the channel established between the local CP device and the UP device and the remote network device. For example, the CP device establishes a tunnel and a session carried on the tunnel between the UP device and the remote network device to ensure that the terminal accesses the remote network and realizes business communication.
[0194] In an embodiment of the present application, the terminal can send a connection request to the UP device to request access to a network provided by a remote access point managed by a remote network device when no communication failure occurs between the UP device and the CP device. The UP device forwards the connection request to the CP device. The CP device performs user authentication on the connection request to determine the remote network device corresponding to the network requested to be accessed by the terminal. After the user authentication is passed, the CP device establishes a tunnel and a session carried on the tunnel between the UP device and the remote network device. The terminal is successfully connected to the network through the session on the tunnel, and service communication is realized.
[0195] For example, a terminal at a lottery point wants to access the network of the lottery center at the corporate headquarters. The terminal sends a connection request to the UP device included in the local operator's vBNG through broadband dial-up. The CP device performs user authentication based on the connection request and determines the remote network device corresponding to the network of the lottery center that the terminal requests to access. After the CP device authenticates the user, it establishes a tunnel and a session carried on the tunnel between the UP device and the remote network device, and successfully connects the terminal to the lottery center's network through the session.
[0196] After the terminal successfully accesses the network, the terminal realizes business communication through the session carried on the tunnel maintained between the UP device and the remote network device. At the same time, the CP device keeps the tunnel between the UP device and the remote network device alive by exchanging tunnel keepalive messages between the UP device and the remote network device, that is, maintaining the tunnel between the UP device and the remote network device, and ensuring that the tunnel and the session carried on the tunnel are not interrupted, that is, ensuring that the terminal business is not interrupted. The UP device ensures that the terminal's business communication is maintained on the session carried by the tunnel by forwarding data messages between the terminal and the remote network device.
[0197] When the communication between the CP device and the UP device is normal, the CP device can also synchronize the information of the tunnel stored in itself to the UP device. That is, in the embodiment of the present application, the CP device sends the first tunnel information to the UP device, and the first tunnel information includes the information of one or more tunnels established between the UP device and the remote network device. It should be noted that there are multiple implementation methods for the CP device to send the first tunnel information to the UP device, and two of the implementation methods are exemplarily introduced below.
[0198] The first implementation method , the CP device synchronizes the first tunnel information to the UP device in real time.
[0199] That is, each time the CP device creates a tunnel, it sends information about the created tunnel to the UP device, and each time it deletes a tunnel, it sends information about the deleted tunnel to the UP device.
[0200] In an embodiment of the present application, the first tunnel information is carried in a PFCP update request message, the one or more tunnels are L2TP tunnels, and the information of each tunnel in the one or more tunnels includes tunnel description information. If the L2TP tunnel is created based on IPv4, the tunnel description information includes a tunnel local identifier, a tunnel remote identifier, a tunnel local IPv4 address, and a tunnel remote IPv4 address. If the L2TP tunnel is created based on IPv6, the tunnel description information includes a tunnel local identifier, a tunnel remote identifier, a tunnel local IPv6 address, and a tunnel remote IPv6 address. Among them, the tunnel local identifier and the tunnel remote identifier are identifiers of the tunnel.
[0201] In an embodiment of the present application, the first tunnel information can be carried in any communication protocol message. Optionally, the PFCP update request message is obtained by extending the PFCP protocol. Optionally, the node level message (nodemessage) specified by the PFCP is extended to obtain the PFCP update request message.
[0202] Exemplarily, Table 1 is a node message specified by the extended PFCP. The PFCP update request message also carries a message type, which can take any value between 16-49. The message type is used to indicate that the corresponding message is a PFCP update request message, also known as a PFCP L2TP tunnel update request.
[0203] Table 1
[0204]
[0205] In the node message of PFCP, the PFCP update request message includes a grouped information element (Grouped IE). A Grouped IE includes one or more embedded information elements Embedded IE. Embedded IE is the smallest unit of the PFCP update request message. Each Embedded IE carries a tunnel description information. The PFCP update request message is obtained by extending the Grouped IE.
[0206] In the embodiment of the present application, referring to Table 2, the identifier of the IE carried in the PFCP update request message is first explained, wherein M indicates a mandatory option, C indicates that it needs to be carried if the conditions are met, CO indicates that it can be carried or not carried if the conditions are met, and O indicates that it can be carried or not carried.
[0207] Table 2
[0208]
[0209]
[0210] Table 3 is an introduction to the tunnel information carried by the PFCP update request message. The PFCP update request message also carries the device number of the CP device, that is, the node identification (Node ID) of the CP device. When creating an L2TP tunnel, the PFCP update request message also carries the tunnel description information of each created tunnel. When deleting an L2TP tunnel, the PFCP update request message also carries the tunnel description information of each deleted tunnel.
[0211] Table 3
[0212]
[0213] Optionally, if L2TP traverses a layer 3 virtual private network (L3VPN), the PFCP update request message also carries the name of the L3VPN instance, that is, the private network name of the L3VPN.
[0214] Exemplarily, Table 4 is a structural description of the PFCP update request message obtained by extending the Grouped IE. In the case of creating or deleting an L2TP tunnel, the first 2 bytes (an Octet is 8 bits, i.e., one byte) of the PFCP update request message carry the tunnel message type, the 3rd and 4th bytes carry the length, which is used to indicate the message length, the 5th and 6th bytes carry the enterprise ID, indicating which manufacturer extended the message, and starting from the 7th byte, it carries the tunnel description information of the created or deleted tunnel, and optionally, if L2TP traverses L3VPN, it also carries the name of the L3VPN instance.
[0215] Table 4
[0216]
[0217] Table 5 is a schematic diagram of the structure of a PFCP update request message carrying tunnel description information obtained by extending the Embedded IE.
[0218] Table 5
[0219]
[0220] In Table 5, the tunnel description information starts from the 7th byte. Bit 1 (bit 1) of the 7th byte: V4 takes a value of 1, indicating that the L2TP tunnel is attached (over) to the IPv4 address, that is, the L2TP tunnel is created based on IPv4. In this case, p=16, q=20;
[0221] Bit 2 of the 7th byte: V6 is set to 1, indicating that the tunnel is over an IPv6 address, that is, the L2TP tunnel is created based on IPv6. In this case, r = 16 and s = 32.
[0222] Bits 3 to 6 of the 7th byte: Ver (version) indicates the version number of the L2TP tunnel. A value of 2 indicates the L2TP version V2, and the tunnel identification (tunnel ID) is a 16-bit unsigned integer. A value of 3 indicates the L2TP version V3, and the tunnel ID is a 32-bit unsigned integer.
[0223] Bits 7 to 8 of the 7th byte: reserved field, set to 0.
[0224] Bytes 8 to 11: local tunnel ID, 32-bit unsigned integer. The lower 16 bits of the L2TPV2 version are valid.
[0225] Bytes 12 to 15: remote tunnel ID, a 32-bit unsigned integer. The lower 16 bits of the L2TPV2 version are valid.
[0226] Bytes p to p+3: local IPv4 address of the tunnel.
[0227] Bytes q to q+3: remote IPv4 address of the tunnel.
[0228] Bytes r to r+15: local IPv6 address of the tunnel.
[0229] Bytes s to s+15: remote IPv6 address of the tunnel.
[0230] Exemplarily, assuming the L2TPv2 version and the use of IPv4 address, the structure of the PFCP update request message is shown in Table 6.
[0231] Table 6
[0232]
[0233] Exemplarily, assuming the L2TP V3 version and the use of IPv6 address, the structure of the PFCP update request message is shown in Table 7.
[0234] Table 7
[0235]
[0236] The above introduces the process of synchronizing tunnel information between the CP device and the UP device when the communication between the UP device and the CP device is normal. In an embodiment of the present application, the CP device can also send the first session information to the UP device, and the UP device receives the first session information sent by the CP device. The first session information includes information about the session carried on the one or more tunnels, that is, the CP device synchronizes the session information to the UP device.
[0237] Optionally, the first session information is also carried in the PFCP update request message, and the information of the session carried on each tunnel of the one or more tunnels includes a tunnel local identifier, a session local identifier and a session remote identifier.
[0238] In the node-level message of PFCP, in the PFCP update request message carrying the first session information, the PFCP update request message includes a Grouped IE, a Grouped IE includes one or more Embedded IEs, each Embedded IE carries information of a session, and the PFCP update request message carrying the first session information is obtained by extending the Grouped IE.
[0239] Table 8 is an introduction to the session information carried by the PFCP update request message. The PFCP update request message carries the device number of the CP device, that is, the node identifier of the CP device. When creating an L2TP session, the PFCP update request message also carries the information of each created session. When deleting an L2TP session, the PFCP update request message also carries the information of each deleted session.
[0240] Table 8
[0241] Embedded IE P Conditions / Contents IE Type Node ID M CP device number Node ID Creating an L2TP Session C Create an L2TP session that can carry multiple IEs create L2TP session Deleting an L2TP Session C Delete L2TP session, can carry multiple IE delete L2TP session
[0242] For example, Table 9 is a structural description of the PFCP update request message obtained by extending the Grouped IE. In the case of creating or deleting an L2TP session, the first 2 bytes (Octet) carry the session message type, the 3rd and 4th bytes carry the length, which is used to indicate the message length, the 5th and 6th bytes carry the manufacturer number, indicating which manufacturer extended the message, and starting from the 7th byte, it carries the information of the created or deleted session.
[0243] Table 9
[0244]
[0245] Table 10 is a schematic diagram of the structure of a PFCP update request message carrying information of a session obtained by extending the embedded IE.
[0246] Table 10
[0247]
[0248] In Table 10, bits 1 to 4 of the 7th byte: Ver indicates the version number of the L2TP tunnel. A value of 2 indicates the L2TP version 2, and the session ID is a 16-bit unsigned integer. A value of 3 indicates the L2TP version 3, and the session ID is a 32-bit unsigned integer.
[0249] Bits 5 to 8 of the 7th byte: reserved field, set to 0.
[0250] Bytes 8 to 11: local tunnel ID, 32-bit unsigned integer, the lower 16 bits of the L2TPV2 version are valid. Indicates the tunnel to which the session belongs.
[0251] Bytes 12 to 15: local session ID, a 32-bit unsigned integer. The lower 16 bits of the L2TPV2 version are valid.
[0252] Bytes 16 to 19: local session ID, a 32-bit unsigned integer. The lower 16 bits of the L2TPV2 version are valid.
[0253] It should be noted that, in the first implementation, the first tunnel information and the first session information are respectively carried in different PFCP update request messages, and a PFCP update request message carries information about a created tunnel, or information about a deleted tunnel, or information about a created session, or information about a deleted session. After receiving a PFCP update request message carrying information about a created tunnel or session, the UP device locally stores the information about the created tunnel or session, and after receiving a PFCP update request message carrying information about a deleted tunnel or session, the UP device deletes the corresponding locally stored information about the tunnel or session.
[0254] The second implementation method , the CP device periodically synchronizes the first tunnel information to the UP device.
[0255] That is, the CP device synchronizes the information of all established tunnels stored in itself to the UP device every other synchronization cycle. Alternatively, the CP device synchronizes the updated tunnel information to the CP device every other synchronization cycle, and the updated tunnel includes the information of tunnels established and deleted after the last synchronization of tunnel information.
[0256] Optionally, the first tunnel information is carried in the PFCP update request message. If information of multiple established tunnels is stored on the CP device, the first tunnel information includes information of the multiple established tunnels, and the information of each tunnel includes tunnel description information.
[0257] In the second implementation, the CP device can also periodically synchronize the first session information to the UP device, and the first session information is carried in the PFCP update request message. The relevant description of the PFCP update request message refers to the above-mentioned relevant introduction, which will not be repeated here.
[0258] It should be noted that, in the embodiment of the present application, the first tunnel information and the first session information can be carried in the same PFCP update request message, or in different PFCP update request messages.
[0259] For example, it is assumed that the CP device synchronizes the information of all established tunnels and sessions stored in itself to the UP device through a PFCP update request message every other synchronization cycle. Alternatively, the CP device synchronizes the information of all established tunnels stored in itself to the UP device through a PFCP update request message every other synchronization cycle, and synchronizes the information of all sessions stored in itself to the UP device through another PFCP update request message.
[0260] Optionally, in an embodiment of the present application, after receiving the PFCP update request message, the UP device can send a PFCP update response message to the CP device.
[0261] Exemplarily, referring to Table 1, the PFCP update response message carries a message type, and the message type can take any value between 16-49 that is different from the message type carried by the PFCP update request message, and the message type is used to indicate that the corresponding message is a PFCP update response message, also known as a PFCP L2TP tunnel update response. Referring to Table 11, the PFCP update response message also carries the device number of the UP device, that is, the node identifier of the UP device, and the PFCP update response message also carries a processing result (also known as cause), and the processing result is used to indicate whether the UP device successfully parses the PFCP update request message.
[0262] Table 11
[0263] Embedded IE P Conditions / Contents IE Type Node ID M UP device number Node ID cause M Processing result (success / error code) cause
[0264] Step 302: If a communication failure occurs between the UP device and the CP device, the UP device keeps the one or more tunnels alive according to the first tunnel information, and the CP device stops keeping the one or more tunnels alive.
[0265] In an embodiment of the present application, the UP device and the CP device communicate with each other through multiple communication interfaces, such as the communication interface between the CP device and the UP device in the vBNG defined in the broadband forum (BBF) WT-459, including a control packet redirection interface (CPRi) and a state control interface (SCi). The UP device communicates with the CP device through the control packet redirection interface and the state control interface. The UP device monitors the status of the control packet redirection interface and the state control interface. If the UP device monitors that the status of the control packet redirection interface and / or the state control interface is abnormal, the UP device determines that a communication failure has been detected between itself and the CP device.
[0266] Similarly, the CP device communicates with the UP device through the control message redirection interface and the status control interface. The CP device monitors the status of the control message redirection interface and the status control interface. If the CP device monitors that the status of the control message redirection interface and / or the status control interface is abnormal, the CP device determines that a communication failure has been detected between itself and the UP device.
[0267] In an embodiment of the present application, if the UP device detects that the communication between itself and the CP device fails, the UP device keeps the one or more tunnels alive according to the first tunnel information; if the CP device detects that the communication between itself and the UP device fails, the CP device stops keeping the one or more tunnels alive.
[0268] It should be noted that in the embodiment of the present application, each tunnel is independently kept alive, that is, each tunnel corresponds to a tunnel keep-alive sequence number, and the UP device or CP device implements tunnel keep-alive for each tunnel by exchanging tunnel keep-alive messages with the remote network device. The tunnel keep-alive sequence number includes a sending sequence number and an expected receiving sequence number. For example, for a tunnel, it is assumed that the UP device sends a tunnel keep-alive message to the remote network device. The tunnel keep-alive message is a message carrying a sending sequence number of 0 and an expected receiving sequence number of 0. After receiving the tunnel keep-alive message, the remote network device sends a tunnel keep-alive message carrying a sending sequence number of 0 and an expected receiving sequence number of 1 to the UP device. The UP device continues to send tunnel keep-alive messages carrying a sending sequence number of 1 and an expected receiving sequence number of 1 to the remote network device. The remote network device sends a tunnel keep-alive message carrying a sending sequence number of 1 and an expected receiving sequence number of 2 to the UP device. By analogy, the UP device and the remote network device periodically send tunnel keep-alive messages carrying the tunnel keep-alive sequence number to keep the tunnel alive. If the remote network device does not receive the expected tunnel keep-alive message within a timeout period, the remote network device will remove the tunnel. In the case that the communication between the UP device and the CP device is normal, if the CP device does not receive the tunnel keep-alive message within a timeout period, the CP device removes the tunnel.
[0269] Optionally, the tunnel keep-alive message is a Hello (Hel) message or a zero-length body message (ZLB) specified in L2TP.
[0270] In the case of a communication failure between the UP device and the CP device, the tunnel does not want to be removed, that is, the user services of the terminal do not want to be interrupted. Therefore, the UP device needs to continue to keep the tunnel alive. Next, the implementation method of the UP device keeping the tunnel alive when the UP device detects that the communication between itself and the CP device fails is introduced.
[0271] The first implementation method , the UP device monitors the first tunnel keep-alive message sent by the remote network device, the first tunnel keep-alive message carries the identifier of the target tunnel and the tunnel keep-alive sequence number, and the UP device sends a second tunnel keep-alive message to the remote network device according to the identifier and the tunnel keep-alive sequence number of the target tunnel and the identifier of the one or more tunnels.
[0272] In an embodiment of the present application, the UP device stores the first tunnel information synchronized by the CP device, the first tunnel information includes tunnel description information of one or more tunnels established between the UP device and the remote network device, and the tunnel description information includes the tunnel identifier. After monitoring the first tunnel keep-alive message sent by the remote network device, the UP device queries the identifier of the target tunnel from the locally stored first tunnel information according to the identifier of the target tunnel and the tunnel keep-alive sequence number carried in the first tunnel keep-alive message, and after finding the identifier of the target tunnel, the UP device locally stores the tunnel keep-alive sequence number of the target tunnel, and sends a second tunnel keep-alive message to the remote network device according to the tunnel keep-alive sequence number.
[0273] It should be noted that the UP device starts to send the second tunnel keep-alive message to the remote network device, that is, it starts to periodically send tunnel keep-alive messages to the remote network device to achieve tunnel keep-alive of the UP device.
[0274] In this implementation, the remote network device will not perceive the communication failure between the CP device and the UP device. Instead, the UP device will continue to take over the CP device and keep the tunnel alive based on the information of the tunnel currently maintained by the remote network device, that is, the tunnel is kept alive quickly and seamlessly.
[0275] From the above, it can be seen that when the communication between the UP device and the CP device is normal, the CP device also sends the first session information to the UP device. In this way, while keeping the tunnel alive, the UP device can also maintain the data packets between the terminal and the remote network device on the session carried by the tunnel according to the first session information, thereby ensuring that the terminal can carry out normal business communications.
[0276] Exemplarily, the terminal sends a data message to the UP device, the UP device sends the data message to the remote network device through the session carried by the tunnel created for the terminal, and the remote network device then sends the data message to the remote access point to implement service communication between the terminal and the remote access point.
[0277] The above only takes the target tunnel among the one or more tunnels as an example to introduce the first implementation method of tunnel keep-alive of the UP device. For other tunnels among the one or more tunnels except the target tunnel, the UP device can follow the same tunnel keep-alive method as the target tunnel, by monitoring the tunnel keep-alive message sent by the remote network device to obtain the tunnel keep-alive sequence number of the corresponding tunnel, and perform tunnel keep-alive on the corresponding tunnel according to the monitored tunnel keep-alive sequence number. The embodiments of the present application will not go into details about this.
[0278] The second implementation method, the UP device resets the tunnel keep-alive sequence number of the target tunnel in the first tunnel information, the target tunnel is one of the one or more tunnels, the UP device instructs the remote network device to reset the tunnel keep-alive sequence number of the target tunnel according to the reset tunnel keep-alive sequence number of the target tunnel, after the remote network device successfully resets the tunnel keep-alive sequence number of the target tunnel, the UP device performs tunnel keep-alive on the target tunnel according to the reset tunnel keep-alive sequence number of the target tunnel and the identifier of the target tunnel.
[0279] In an embodiment of the present application, the UP device sends a first control request message to a remote network device, the first control request message carries the identifier of the target tunnel, the tunnel keep-alive sequence number of the reset target tunnel, and the sequence number reset indication information, and the UP device receives a first control response message sent by the remote network device, and the first control response message is used to indicate that the remote network device has successfully reset the tunnel keep-alive sequence number of the target tunnel.
[0280] Optionally, in this implementation, the UP device needs to perform a tunnel fault recovery with the remote network device, and the tunnel fault recovery includes tunnel data reconciliation and resetting the tunnel keep-alive sequence number, that is, performing a tunnel data reconciliation and resetting the tunnel keep-alive sequence number with the remote network device to ensure the tunnel consistency between the UP device and the remote network device, and keeping the tunnel alive according to the reset tunnel keep-alive sequence number.
[0281] Among them, the process of data reconciliation between the UP device and the remote network device is: the UP device creates a data reconciliation tunnel between the UP device and the remote network device, and sends a first tunnel data reconciliation message to the remote network device through the data reconciliation tunnel, the first tunnel data reconciliation message carries the identifier of the tunnel established between the UP device and the remote network device and stored on the UP device, the UP device receives the first tunnel reconciliation response message sent by the remote network device, the first tunnel reconciliation response message carries the identifier of the tunnel established between the remote network device and the UP device and stored on the remote network device, the UP device determines the intersection of the identifier of the tunnel carried by the first tunnel data reconciliation message and the identifier of the tunnel carried by the first tunnel reconciliation response message as the identifier of one or more tunnels.
[0282] In an embodiment of the present application, the UP device first performs data reconciliation and then resets the tunnel keep-alive sequence number. Optionally, the UP device may also first reset the tunnel keep-alive sequence number of each tunnel included in the locally stored first tunnel information, and then, through the created data reconciliation tunnel, send a control request message for performing tunnel data reconciliation and resetting the tunnel keep-alive sequence number to the remote network device, so as to perform tunnel data reconciliation and reset the tunnel keep-alive sequence number with the remote network device through the control request message. That is, the first control request message and the first tunnel data reconciliation message can be the same message, and the first control response message and the first tunnel reconciliation response message can be the same message.
[0283] Optionally, the UP device resets the tunnel keep-alive sequence number of each tunnel included in the first tunnel information stored locally, establishes a data reconciliation tunnel (also called a recovery tunnel) with the remote network device, and sends a first control request message to the remote network device through the data reconciliation tunnel. After the remote network device receives the first control request message, if the remote network device stores the information of the target tunnel, it indicates that the data about the target tunnel between the remote network device and the UP device are consistent. The first control response message replied by the remote network device to the UP device carries the identifier of the target tunnel and the indication information confirming the reset of the tunnel keep-alive sequence number of the target tunnel. After receiving the first control response message, the UP device determines that the fault recovery of the target tunnel is successful. If the information of the target tunnel is not stored on the remote network device, it indicates that there is inconsistency in the data about the target tunnel between the remote network device and the UP device. The first control response message replied by the remote network device to the UP device does not carry the relevant information of the target tunnel, or carries the prompt information indicating that the target tunnel has not been successfully established. After receiving the first control response message, the UP device deletes the information of the target tunnel stored locally.
[0284] Optionally, the first control request message sent by the UP to the remote network device carries the identifiers of the one or more tunnels, the tunnel keep-alive sequence numbers of the one or more tunnels after being reset, and the sequence number reset indication information, that is, the UP device reconciles the data about the tunnels with the remote network device and resets the tunnel keep-alive sequence numbers at one time through one control request message. After receiving the first control request message, the remote network device sends the identifiers of all tunnels stored in itself and the indication information for resetting the tunnel keep-alive sequence numbers of the corresponding tunnels to the UP device through the first control response message. After receiving the first control response message, the UP device compares the identifiers of the one or more tunnels stored in itself with the identifiers of the tunnels carried in the first control response message, determines the tunnels stored in common in the UP device and the remote network device, and clears the tunnels stored only on the UP but not on the remote network device, so as to complete the data reconciliation about the tunnels and reset the tunnel keep-alive sequence numbers between the remote network device and the remote network device.
[0285] Optionally, after performing data reconciliation and resetting the tunnel keep-alive sequence number with the remote network device, the UP device dismantles the data reconciliation tunnel used for data reconciliation and requesting to reset the tunnel keep-alive sequence number.
[0286] After the UP device and the remote network device perform data reconciliation on the tunnel, the UP device stores information of the target tunnel, and the UP device performs tunnel keepalive on the target tunnel according to the reset tunnel keepalive sequence number of the target tunnel.
[0287] Optionally, the UP device resets the tunnel keep-alive sequence number according to the communication protocol between the UP device and the remote network device. Assuming that the communication protocol between the UP device and the remote network device is the L2TP protocol, the L2TP protocol stipulates that the tunnel keep-alive sequence number when creating a tunnel is 0 or 1. As the CP device and the remote network device send tunnel keep-alive messages to each other to keep the tunnel alive, the tunnel message sequence number carried by the tunnel keep-alive message increases dynamically. When the UP device recovers from a tunnel failure to keep the tunnel alive, the UP device needs to reset the tunnel keep-alive sequence number to 0 or 1, that is, reset it to the starting value.
[0288] After the UP device sends the first control request message to the remote network device, the remote network device determines that tunnel fault recovery of the target tunnel is currently required based on the sequence number reset indication information. The remote network device sends a first control response message to the UP device based on the tunnel keep-alive sequence number of the reset target tunnel. After receiving the first control response message, the UP device determines that the target tunnel fault recovery is successful.
[0289] After the target tunnel failure is successfully recovered, the UP device performs tunnel keepalive on the target tunnel according to the reset tunnel keepalive sequence number of the target tunnel. That is, the UP device periodically sends tunnel keepalive messages to the remote network device starting from the reset tunnel keepalive sequence number of the target tunnel, so as to periodically exchange tunnel keepalive messages with the remote network device to achieve tunnel keepalive of the target tunnel.
[0290] Optionally, the first control request message and the first tunnel data reconciliation message are both start control connection request (SCCRQ) messages in the L2TP protocol, and the first control response message and the first tunnel reconciliation response message are both start control connection response (SCCRP) messages in the L2TP protocol.
[0291] The above only takes the target tunnel among the one or more tunnels as an example to introduce the second implementation method of the UP device to keep the tunnel alive. For other tunnels among the one or more tunnels except the target tunnel, the UP device can keep the corresponding tunnel alive through tunnel fault recovery according to the same tunnel keeping method as the target tunnel. The embodiments of the present application will not go into details about this.
[0292] From the foregoing, it can be seen that when the communication between the UP device and the CP device is normal, the CP device also sends the first session information to the UP device. In this way, in addition to fault recovery of the target tunnel, the UP device can also update the information of the session carried on the target tunnel in the first session information to perform fault recovery on the session carried on the target tunnel.
[0293] In an embodiment of the present application, after the UP device creates a data reconciliation tunnel with the remote network device, it sends a first session data reconciliation message to the remote network device, and the first session data reconciliation message carries one or more identifiers of first reference sessions, and the one or more first reference sessions are sessions carried on the target tunnel stored on the UP device. The UP device receives a first session reconciliation response message sent by the remote network device, and the first session reconciliation response message carries one or more identifiers of second reference sessions, and the one or more second reference sessions are sessions carried on the target tunnel stored on the remote network device. The UP device determines the intersection of the identifiers of the one or more first reference sessions and the identifiers of the one or more second reference sessions as the identifier of the session carried on the target tunnel. In this way, the sessions carried on the target tunnel can be aligned.
[0294] Optionally, the first session data reconciliation message and the first tunnel data reconciliation message are the same message, that is, the UP device sends the identifier of the tunnel established between the UP device and the remote network device and the identifier of the session carried on each tunnel stored on the UP device to the remote network device at one time through the data reconciliation tunnel to perform tunnel data reconciliation and session data reconciliation.
[0295] Optionally, after the target tunnel failure is successfully recovered, the UP device exchanges session information with the remote network device to perform failure recovery on all sessions carried on the target tunnel, that is, to perform failure recovery on one or more first reference sessions carried on the target tunnel. In this case, the first session data reconciliation message and the first tunnel data reconciliation message are different messages.
[0296] For example, it is assumed that the sessions carried on the target tunnel stored on the UP device include session 1, session 2, and session 3, and the sessions carried on the target tunnel stored on the remote network device include session 1 and session 2, wherein session 1 and session 2 are successfully connected sessions, and session 3 is a session between the CP device and the remote network device that has not completed the connection before the communication failure between the UP device and the CP device, that is, session 3 is a session in a semi-connected state. The CP device stores the information of session 3 and synchronizes the information of session 3 to the UP device, while the remote network device does not store the information of session 3. In this case, the UP device sends a first fault recovery session query message to the remote network device, which carries the identifiers of session 1, session 2, and session 3, and the first fault recovery session response message replied by the remote network device to the UP device only carries the identifiers of session 1 and session 2. Then, after receiving the first fault recovery session response message, the UP device deletes the locally stored information of session 3, that is, clears the semi-connected session.
[0297] Similarly, assuming that the first fault recovery session query message sent by the UP device to the remote network device carries session 1 and session 2, and the first fault recovery session response message replied by the remote network device to the UP device carries session 1, session 2 and session 3, indicating that session 3 is a semi-connected session created by the remote network device, after receiving the first fault recovery session query message, the remote network device will delete the information of session 3 stored in itself, that is, the remote network device will also clean up the semi-connected session.
[0298] Optionally, the first session data reconciliation message is a failover session query (FSQ) message in the L2TP protocol, and the first session reconciliation response message is a failover session response (FSR) message in the L2TP protocol.
[0299] As can be seen from the above, through session failure recovery between the UP device and the remote network device, the session that has not been established between the UP device and the remote network device is deleted, that is, the session in the semi-connected state is cleared.
[0300] It should be noted that, for sessions carried on tunnels other than the target tunnel in the one or more tunnels, the UP device can perform session fault recovery on the sessions carried on the corresponding tunnels through session fault recovery in the same way as restoring the sessions carried on the target tunnel, and this embodiment of the present application will not go into details.
[0301] Optionally, the tunnel failure recovery and session failure recovery performed in the second implementation mode of the UP device performing tunnel keep-alive may adopt the failure recovery function proposed in the L2TP RFC 4951 specification. The CP device negotiates with the remote network device through the UP device whether to enable the failure recovery function when establishing a tunnel. If the failure recovery function is enabled on the CP device, the UP device, and the remote network device, then when the UP device starts to perform tunnel keep-alive, the failure recovery function is started to perform tunnel failure recovery and session failure recovery with the remote network device.
[0302] It should be noted that in the above-mentioned second implementation method, the UP device performs tunnel fault recovery and session fault recovery with the remote network device, that is, by reconciling the data of the tunnel and the session, and resetting the tunnel keep-alive sequence number, it can ensure that the UP device can more accurately keep the tunnel established between the UP device and the remote network device alive.
[0303] The above only introduces the method of keeping the tunnel of the UP device alive by taking the target tunnel among the one or more tunnels as an example. For other tunnels among the one or more tunnels except the target tunnel, the UP device can keep the tunnel alive according to the same tunnel keeping method as the target tunnel, and the embodiments of the present application will not go into details about this.
[0304] Step 303: If the communication between the CP device and the UP device is restored, the CP device performs tunnel keepalive on the one or more tunnels again, and the UP device stops performing tunnel keepalive on the one or more tunnels.
[0305] In an embodiment of the present application, after the CP device detects that the communication between itself and the UP device is restored, the CP device needs to reactivate the one or more tunnels, and the UP device stops tunnel maintenance after detecting that the communication between itself and the CP device is restored.
[0306] As can be seen from the foregoing, the CP device communicates with the UP device through the control message redirection interface and the status control interface. The CP device monitors the status of the control message redirection interface and the status control interface. If the CP device monitors that the status of the control message redirection interface and / or the status control interface has returned to normal, the CP device determines that it has detected that the communication between itself and the UP device has been restored.
[0307] Similarly, the UP device communicates with the CP device through the control message redirection interface and the status control interface. The UP device monitors the status of the control message redirection interface and the status control interface. If the UP device monitors that the status of the control message redirection interface and / or the status control interface has returned to normal, the UP device determines that the communication between itself and the CP device has been restored.
[0308] In an embodiment of the present application, the CP device re-performs tunnel keep-alive in the following manner: the CP device resets the tunnel keep-alive sequence number of the locally stored target tunnel, where the target tunnel is one of the one or more tunnels, and the CP device instructs the remote network device to reset the tunnel keep-alive sequence number of the target tunnel based on the reset tunnel keep-alive sequence number of the target tunnel. After the remote network device successfully resets the tunnel keep-alive sequence number of the target tunnel, the CP device performs tunnel keep-alive on the target tunnel through the UP device according to the reset tunnel keep-alive sequence number of the target tunnel and the identifier of the target tunnel.
[0309] Among them, the implementation method of the CP device resetting the tunnel keep-alive sequence number of the locally stored target tunnel is similar to the implementation method of the aforementioned UP device resetting the tunnel keep-alive sequence number of the target tunnel. For example, the CP device resets the tunnel keep-alive sequence number of the target tunnel to 0 or 1, etc., that is, resets it to the starting value specified by the communication protocol.
[0310] In an embodiment of the present application, after the CP device resets the tunnel keep-alive sequence number of the target tunnel, it sends a second control request message to the remote network device through the UP device, the second control request message carries the identifier of the target tunnel, the reset tunnel keep-alive sequence number of the target tunnel, and the sequence number reset indication information, and then, the CP device receives the second control response message sent by the remote network device through the UP device, and the second control response message is used to indicate that the remote network device has successfully reset the tunnel keep-alive sequence number of the target tunnel.
[0311] After the CP device sends the second control request message to the remote network device through the UP device, the remote network device determines that tunnel fault recovery of the target tunnel is currently required based on the sequence number reset indication information. The remote network device sends a first control response message to the CP device based on the tunnel keep-alive sequence number of the reset target tunnel. After receiving the second control response message through the UP device, the CP device determines that the target tunnel fault recovery is successful.
[0312] Optionally, in an embodiment of the present application, the process of tunnel failure recovery performed by the CP device also includes data reconciliation of the tunnel and resetting the tunnel keep-alive sequence number.
[0313] Optionally, before resetting the tunnel keep-alive sequence number of the locally stored target tunnel, the CP device creates a data reconciliation tunnel with the remote network device, and sends a second data reconciliation message to the remote network device through the UP device through the data reconciliation tunnel, the second data reconciliation message carries the identifier of the tunnel established between the UP device and the remote network device stored on the CP device, the CP device receives a second reconciliation response message sent by the remote network device through the UP device, the second reconciliation response message carries the identifier of the tunnel established between the remote network device and the UP device stored on the remote network device, and the CP device determines the intersection of the identifier of the tunnel carried by the second data reconciliation message and the identifier of the tunnel carried by the second reconciliation response message as the identifier of one or more tunnels.
[0314] Since the remote network device may send a removal request to the UP device to remove a tunnel in order to actively remove the tunnel during the process of exchanging tunnel keepalive messages between the UP device and the remote network device to keep the tunnel alive, the UP device may remove the corresponding tunnel or not after receiving the removal request. That is, during the process of the UP device keeping the tunnel alive, the tunnel established between the UP device and the remote network device will be updated. Based on this, after the communication between the CP device and the UP device is restored, the CP device and the remote network device recover through the tunnel failure, and reconcile the data about the tunnel between the UP device and the remote network device to clean up the removed tunnel stored on the CP, so as to ensure the tunnel consistency between the CP device and the remote network device.
[0315] In an embodiment of the present application, the CP device first performs data reconciliation and then resets the tunnel keep-alive sequence number. Optionally, the CP device may also first reset the tunnel keep-alive sequence number of each tunnel stored locally, and then, through the created data reconciliation tunnel, send a control request message for performing tunnel data reconciliation and resetting the tunnel keep-alive sequence number to the remote network device, so as to perform tunnel data reconciliation and reset the tunnel keep-alive sequence number with the remote network device through the control request message. That is, the second control request message and the second tunnel data reconciliation message can be the same message, and the second control response message and the second tunnel reconciliation response message can be the same message.
[0316] Optionally, the CP device resets the tunnel keep-alive sequence number of each tunnel stored locally, establishes a data reconciliation tunnel (also called a recovery tunnel) between the UP device and the remote network device, and sends the second control request message to the remote network device through the data reconciliation tunnel through the UP device. After the remote network device receives the second control request message, if the remote network device stores information about the target tunnel, it indicates that the data about the target tunnel between the remote network device and the CP device are consistent. The second control response message replied by the remote network device to the CP device carries the identifier of the target tunnel and the indication information confirming the reset of the tunnel keep-alive sequence number of the target tunnel. After the CP device receives the second control response message through the UP device, it determines that the fault recovery of the target tunnel is successful. If the remote network device does not store information about the target tunnel, it indicates that there is inconsistency between the data about the target tunnel between the remote network device and the CP device. The second control response message replied by the remote network device to the CP device does not carry relevant information about the target tunnel, or carries prompt information indicating that the target tunnel has not been successfully established. After receiving the second control response message through the UP device, the CP device deletes the information of the target tunnel stored locally.
[0317] Optionally, the second control request message sent by the CP to the remote network device through the UP device carries the identifiers of the one or more tunnels, the tunnel keep-alive sequence numbers of the one or more tunnels after being reset, and the sequence number reset indication information, that is, the CP device performs data reconciliation on the tunnels and resets the tunnel keep-alive sequence numbers with the remote network device at one time through one control request message. After receiving the second control request message, the remote network device sends the identifiers of all tunnels stored in itself and the indication information for resetting the tunnel keep-alive sequence numbers of the corresponding tunnels to the CP device through a second control response message. After receiving the second control response message through the UP device, the CP device determines the tunnels stored in common in the CP device and the remote network device by comparing the identifiers of the one or more tunnels stored in itself with the identifiers of the tunnels carried in the second control response message, and clears the tunnels stored only on the CP but not on the remote network device, so as to complete the data reconciliation on the tunnels and reset the tunnel keep-alive sequence numbers with the remote network device.
[0318] For example, it is assumed that before the communication failure between the CP device and the UP device, the tunnel information that the CP device synchronized to the UP device for the last time includes information of tunnel 1, tunnel 2 and tunnel 3. When the communication between the UP device and the CP device fails and the UP device performs tunnel keep-alive, tunnel 3 is removed by the remote network device. After the communication between the CP device and the UP device is restored, the CP device performs tunnel failure recovery with the remote network device, negotiates with the remote network device to reset the tunnel keep-alive sequence numbers of tunnel 1 and tunnel 2, and then performs tunnel keep-alive on tunnel 1 and tunnel 2. For tunnel 3, after the CP device sends a control request message to the remote network device to reset the tunnel keep-alive sequence number of tunnel 3, since the remote network device has deleted the information of tunnel 3, the remote network device will reply to the CP device with a control response message that tunnel 3 is not found. After receiving the control response message, the CP device deletes the information of tunnel 3.
[0319] Optionally, the second control request message and the second tunnel data reconciliation message are both SCCRQ messages in the L2TP protocol, and the second control response message and the second tunnel reconciliation response message are both SCCRP messages in the L2TP protocol.
[0320] Optionally, after performing data reconciliation and resetting the tunnel keep-alive sequence number between the CP device and the remote network device, the CP device dismantles the data reconciliation tunnel used for data reconciliation and requesting to reset the tunnel keep-alive sequence number.
[0321] After the CP device and the remote network device reconcile the data about the tunnel, the CP device stores the information of the target tunnel. Then, the CP device keeps the target tunnel alive through the UP device according to the reset tunnel keep-alive sequence number of the target tunnel.
[0322] The above only takes the target tunnel among the one or more tunnels as an example to introduce the implementation method of the CP device re-activating the tunnel. For other tunnels among the one or more tunnels except the target tunnel, the CP device can perform tunnel activation for the corresponding tunnel through tunnel fault recovery according to the same tunnel activation method as the target tunnel, and the embodiments of the present application will not go into details about this.
[0323] In the embodiment of the present application, in addition to recovering the target tunnel through the UP device, the CP device can also update the information of the session carried on the target tunnel stored in itself through the UP device to recover the session carried on the target tunnel.
[0324] In an embodiment of the present application, after the CP device creates a data reconciliation tunnel with the remote network device, it sends a second session data reconciliation message to the remote network device through the UP device, and the second session data reconciliation message carries one or more identifiers of the first reference session, and the one or more first reference sessions are sessions carried on the target tunnel stored on the CP device. The CP device receives a second session reconciliation response message sent by the remote network device through the UP device, and the second session reconciliation response message carries one or more identifiers of the third reference session, and the one or more third reference sessions are sessions carried on the target tunnel stored on the remote network device. The CP device determines the intersection of the identifiers of the one or more first reference sessions and the identifiers of the one or more third reference sessions as the identifier of the session carried on the target tunnel. In this way, the sessions carried on the target tunnel can be aligned.
[0325] Optionally, the second session data reconciliation message and the second tunnel data reconciliation message are the same message, that is, the CP device sends the identifier of the tunnel established between the UP device stored on the CP device and the remote network device and the identifier of the session carried on each tunnel to the remote network device at one time through the data reconciliation tunnel to perform tunnel data reconciliation and session data reconciliation.
[0326] From the above, it can be seen that during the process of tunnel keep-alive of the UP device, the tunnel established between the UP device and the remote network device will be dismantled. In addition, the session carried on the tunnel established between the UP device and the remote network device will also be dismantled. Based on this, after the communication between the CP device and the UP device is restored, the CP device and the remote network device recover through the session fault recovery, and the dismantled session stored on the CP device is deleted, that is, a data reconciliation about the session is performed with the remote network device to ensure the session consistency between the CP device and the remote network device.
[0327] Optionally, the second session data reconciliation message is an FSQ message in the L2TP protocol, and the second session reconciliation response message is an FSR message in the L2TP protocol.
[0328] It should be noted that, for sessions carried on other tunnels in the one or more tunnels except the target tunnel, the CP device can perform session fault recovery on the sessions carried on the corresponding tunnels through session fault recovery in the same way as restoring the sessions carried on the target tunnel, and this embodiment of the present application will not go into details.
[0329] In the embodiment of the present application, in the implementation method of the CP device re-performing tunnel preservation, the implementation method of tunnel fault recovery and session fault recovery is similar to that of the UP device, that is, the tunnel fault recovery and session fault recovery performed by the CP device in re-performing tunnel preservation can also adopt the failure recovery function proposed in the L2TP RFC 4951 specification. As can be seen from the foregoing, when the CP device establishes a tunnel with the remote network device through the UP device, it negotiates whether to enable the failure recovery function. If the failure recovery function is enabled on the CP device, the UP device and the remote network device, then when the CP device starts to re-perform tunnel preservation, the failure recovery function is started to perform tunnel fault recovery and session fault recovery with the remote network device.
[0330] It should be noted that, for other tunnels in the one or more tunnels except the target tunnel, the CP device can perform tunnel fault recovery and session fault recovery according to the same fault recovery method as the target tunnel, which will not be described in detail in the embodiments of the present application.
[0331] In an embodiment of the present application, after the CP device performs tunnel failure recovery through the UP device, the CP device sends the second tunnel information to the UP device, the UP device receives the second tunnel information sent by the CP device, and the UP device updates the locally stored tunnel information according to the second tunnel information. The second tunnel information includes information about one or more tunnels established between the UP device and the remote network device stored on the CP device at the first moment, and the first moment refers to the moment when the CP device completes tunnel failure recovery or session failure recovery between the UP device and the remote network device after the communication between the UP device and the CP device is restored. That is, the CP device synchronizes the tunnel information to the UP device again.
[0332] Optionally, the second tunnel information is carried in the PFCP update request message. The detailed introduction of the second tunnel information can refer to the aforementioned related introduction of the first tunnel information, which will not be repeated here.
[0333] In an embodiment of the present application, after the CP device recovers the session on the target tunnel through the UP device, the CP device sends the second session information to the UP device, the UP device receives the second session information sent by the CP device, and the UP device updates the locally stored session information according to the second session information. The second session information includes information about the session carried on one or more tunnels established between the UP device and the remote network device stored on the CP device at the second moment. That is, the CP device synchronizes the session information to the UP device again.
[0334] Optionally, the second moment refers to a moment when the CP device completes session failure recovery with the remote network device through the UP device after the communication between the CP device and the UP device is restored.
[0335] Optionally, the second session information is carried in the PFCP update request message. The detailed introduction of the second session information can refer to the aforementioned related introduction of the first session information, which will not be repeated here.
[0336] In the case where the first moment is the moment when the CP device completes tunnel failure recovery between the UP device and the remote network device, the CP device may send second tunnel information to the UP device after performing tunnel failure recovery on the one or more tunnels, send second session information to the UP device after performing session failure recovery on the sessions carried on the one or more tunnels, or send third tunnel information and second session information to the UP device, wherein the third tunnel information includes information on the sessions carried on the one or more tunnels established between the UP device and the remote network device stored on the CP device at the second moment. Optionally, the third tunnel information and the second session information are carried in the same PFCP message, or in different PFCP messages.
[0337] In the case where the first moment and the second moment are both moments when the CP device completes session failure recovery between the UP device and the remote network device through the UP device, the CP device can send second tunnel information and second session information to the UP device after performing tunnel failure recovery and session failure recovery on one or more tunnels. The second tunnel information and the second session information are carried in one PFCP update request message, or in different PFCP update request messages.
[0338] Optionally, for the session carried on each tunnel of the one or more tunnels, after the CP device recovers the session carried on a tunnel, it sends information of the session carried on the tunnel to the remote network device through the UP device, so as to synchronize the second session information to the UP device by multiple sending.
[0339] Optionally, in the application embodiment, after receiving the PFCP update request message carrying the second tunnel information and / or the second session information, the UP device sends a PFCP update response message to the CP device. For the relevant introduction of the PFCP update response message, please refer to the relevant description of Table 11 above.
[0340] In an embodiment of the present application, after the CP device performs tunnel failure recovery and session failure session with the remote network device, after synchronizing the tunnel information and session information to the UP device once, it continues to synchronize the latest tunnel information and session information to the UP device in an immediate or periodic manner in preparation for a subsequent communication failure between the UP device and the CP device.
[0341] Next, refer to Figure 4 The tunnel keep-alive message provided in the embodiment of the present application is explained again in combination with an exemplary application scenario. Figure 4 , the terminal is a home gateway, which requests to access the network through the point-to-point protocol (PPP). The CP device (CP-LAC) connects the terminal to the remote network by establishing a tunnel and session between the UP device (UP-LAC) and the remote network device (LNS). The CP device sends Hello messages / ZLB messages between the UP device and the remote network device to keep the tunnel alive. At the same time, the CP device synchronizes the L2TP tunnel information and session information to the UP device. In the event of a communication failure between the UP device and the CP device, the CP device detects the failure and stops tunnel keepalive. The UP device detects the failure and starts tunnel keepalive. The UP device synchronizes the tunnel and session information with the remote network device, and sends tunnel keepalive messages to each other to keep the tunnel alive. After the communication between the UP device and the CP device is restored, the UP device stops tunnel keepalive, and the CP device restarts tunnel keepalive. The CP device synchronizes tunnel and session information with the remote network device through the UP device, and sends tunnel keepalive messages to each other to keep the tunnel alive. In addition, the CP device synchronizes the tunnel and session information at this time to the UP device. Among them, the CP device and the UP device can synchronize tunnel and session information through PFCP update request messages.
[0342] In the embodiment of the present application, a L2TP proxy module is set on the UP device to implement the tunnel keep-alive function on the UP device. Figure 5, Table 12 and Table 13, the UP device includes a PFCP protocol module, a PFCP L2TP module and an L2TP proxy module, and the CP device includes a LAC function module, an LNS function module, a PFCP L2TP module and a PFCP protocol module. Among them, the CP device sends a PFCP update request message to the UP device through the SCi interface, the UP device decodes the message header of the PFCP update request message through the PFCP protocol module, the PFCP protocol module of the UP device sends the message body of the PFCP update request message obtained after decoding to the PFCP L2TP module, the PFCP L2TP module of the UP device parses the message body to obtain tunnel information and / or session information, and sends the tunnel information and / or session information to the L2TP proxy module, stores the tunnel information and / or session information through the L2TP proxy module, and according to the tunnel keep-alive method provided in the embodiment of the present application, in the event of a communication failure between the UP device and the CP device, performs tunnel keep-alive. In the embodiment of the present application, the functional description of each module on the UP device is shown in Table 12, and the functional description of each module on the CP device is shown in Table 13.
[0343] Table 12
[0344]
[0345] Table 13
[0346]
[0347] To summarize, in an embodiment of the present application, before the communication failure between the UP device and the CP device, the UP device receives the tunnel information synchronized by the CP device. After the communication failure between the UP device and the CP, the UP device keeps the tunnel alive according to the tunnel information, that is, the UP device maintains the tunnel with the remote network device. In this way, the tunnel demolition will not be triggered due to the communication failure between the CP device and the UP device. This solution can ensure that the connection between the terminal and the remote network will not be interrupted, that is, the user service will not be damaged.
[0348] Figure 6 600 provided in an embodiment of the present application. The network device 600 can be implemented as part or all of a UP device by software, hardware, or a combination of both. The UP device can be the UP device shown in the above embodiment. In the embodiment of the present application, the CP device and the UP device are used to interact with the remote network device to ensure that the terminal accesses the network. Figure 6 The network device 600 includes: a first receiving module 601 and a tunnel keep-alive module 602.
[0349] The first receiving module 601 is used to receive the first tunnel information sent by the CP device, where the first tunnel information includes information about one or more tunnels established between the UP device and the remote network device. Figure 3 The detailed description of step 301 in the embodiment is not repeated here.
[0350] The tunnel keep alive module 602 is used to keep the one or more tunnels alive according to the first tunnel information if a communication failure is detected between the UP device and the CP device. Figure 3 The detailed description of step 302 in the embodiment is not repeated here.
[0351] Optionally, the first tunnel information includes identifications of one or more tunnels;
[0352] The tunnel keep-alive module 602 includes:
[0353] A monitoring unit, configured to monitor a first tunnel keep-alive message sent by a remote network device, wherein the first tunnel keep-alive message carries an identifier of a target tunnel and a tunnel keep-alive sequence number;
[0354] The first sending unit is used to send a second tunnel keepalive message to the remote network device according to the tunnel keepalive sequence number of the target tunnel and the identifier of the one or more tunnels. For specific implementation methods, please refer to Figure 3 The detailed description of step 302 in the embodiment is not repeated here.
[0355] Optionally, the first tunnel information includes identifications of one or more tunnels;
[0356] The tunnel keep-alive module 602 includes:
[0357] a reset unit, configured to reset a tunnel keep-alive sequence number of a target tunnel, the target tunnel being one of the one or more tunnels;
[0358] an instructing unit, configured to instruct a remote network device to reset the tunnel keep-alive sequence number of the target tunnel according to the reset tunnel keep-alive sequence number of the target tunnel;
[0359] The tunnel keepalive unit is used to keep the target tunnel alive according to the reset tunnel keepalive sequence number of the target tunnel and the target tunnel identifier after the remote network device successfully resets the tunnel keepalive sequence number of the target tunnel. For specific implementation methods, please refer to Figure 3 The detailed description of step 302 in the embodiment is not repeated here.
[0360] Optionally, the indicating unit is specifically used for:
[0361] Sending a first control request message to a remote network device, where the first control request message carries an identifier of a target tunnel, a tunnel keepalive sequence number of the reset target tunnel, and sequence number reset indication information;
[0362] Receive a first control response message sent by a remote network device, where the first control response message is used to indicate that the remote network device has successfully reset the tunnel keepalive sequence number of the target tunnel. For specific implementation methods, please refer to Figure 3 The detailed description of step 302 in the embodiment is not repeated here.
[0363] Optionally, the tunnel keep-alive module 602 further includes:
[0364] A creation unit, used for creating a data reconciliation tunnel with a remote network device;
[0365] A second sending unit, configured to send a first tunnel data reconciliation message to the remote network device through the data reconciliation tunnel, wherein the first tunnel data reconciliation message carries an identifier of the tunnel established between the UP device and the remote network device and stored therein;
[0366] A first receiving unit, configured to receive a first tunnel reconciliation response message sent by a remote network device, wherein the first tunnel reconciliation response message carries an identifier of a tunnel established between the remote network device and the UP device and stored on the remote network device;
[0367] The first determining unit is configured to determine an intersection of an identifier of a tunnel carried by the first tunnel data reconciliation message and an identifier of a tunnel carried by the first tunnel reconciliation response message as an identifier of the one or more tunnels.
[0368] Optionally, the network device 600 further includes:
[0369] The second receiving module is used to receive the first session information sent by the CP device, where the first session information includes the information of the session carried on the one or more tunnels; for specific implementation methods, please refer to Figure 3 The relevant description of step 301 in the embodiment will not be repeated here.
[0370] The tunnel keep-alive module 602 further includes:
[0371] A third sending unit is used to send a first session data reconciliation message to the remote network device, where the first session data reconciliation message carries one or more identifiers of first reference sessions, where the one or more first reference sessions are sessions carried on the target tunnel stored on the UP device;
[0372] A second receiving unit is used to receive a first session reconciliation response message sent by a remote network device, where the first session reconciliation response message carries identifiers of one or more second reference sessions, where the one or more second reference sessions are sessions carried on a target tunnel stored on the remote network device;
[0373] The second determining unit is configured to determine the intersection of the one or more first reference session identifiers and the one or more second reference session identifiers as the identifier of the session carried on the target tunnel. Figure 3 The detailed description of step 302 in the embodiment is not repeated here.
[0374] Optionally, the network device 600 further includes:
[0375] The processing module is configured to stop keeping the one or more tunnels alive if it is detected that the communication between the UP device and the CP device is restored.
[0376] Optionally, the network device 600 further includes:
[0377] The third receiving module is used to receive the second tunnel information sent by the CP device, where the second tunnel information includes information about one or more tunnels established between the UP device and the remote network device stored on the CP device at a first moment, where the first moment refers to the moment when the CP device completes tunnel failure recovery or session failure recovery between the UP device and the remote network device after the communication between the UP device and the CP device is restored; for specific implementation methods, please refer to Figure 3 The detailed description of step 303 in the embodiment is not repeated here.
[0378] An updating module is used to update the locally stored tunnel information according to the second tunnel information.
[0379] Optionally, the UP device communicates with the CP device via a control message redirection interface and a status control interface;
[0380] The tunnel keep-alive module 602 includes:
[0381] A monitoring unit, used for monitoring the status of the control message redirection interface and the status control interface;
[0382] The third determining unit is used to determine that a communication failure between the UP device and the CP device is detected if the state of the control message redirection interface and / or the state control interface is abnormal. For specific implementation methods, please refer to Figure 3 The detailed description of step 302 in the embodiment is not repeated here.
[0383] Optionally, the first tunnel information is carried in a PFCP update request message, the one or more tunnels are L2TP tunnels, and the information of each tunnel in the one or more tunnels includes tunnel description information;
[0384] If the L2TP tunnel is created based on IPv4, the tunnel description information includes the tunnel local identifier, tunnel remote identifier, tunnel local IPv4 address, and tunnel remote IPv4 address;
[0385] If the L2TP tunnel is created based on IPv6, the tunnel description information includes the tunnel local identifier, tunnel remote identifier, tunnel local IPv6 address, and tunnel remote IPv6 address. For specific implementation methods, please refer to Figure 3 The detailed description of step 301 in the embodiment is not repeated here.
[0386] Optionally, the second tunnel information is carried in a PFCP update request message.
[0387] Optionally, the first session information is carried in the PFCP update request message, and the information of the session carried on each tunnel in the one or more tunnels includes the tunnel local identifier, the session local identifier and the session remote identifier. Figure 3 The detailed description of step 301 in the embodiment is not repeated here.
[0388] In an embodiment of the present application, before the communication failure between the UP device and the CP device, the UP device receives the tunnel information synchronized by the CP device. After the communication failure between the UP device and the CP, the UP device keeps the tunnel alive according to the tunnel information, that is, the UP device maintains the tunnel with the remote network device. In this way, the tunnel demolition will not be triggered due to the communication failure between the CP device and the UP device. This solution can ensure that the network connection between the terminal and the remote end will not be interrupted, that is, the user service will not be damaged.
[0389] It should be noted that: the network device provided in the above embodiment only uses the division of the above functional modules as an example when performing tunnel keep-alive. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the network device provided in the above embodiment and the tunnel keep-alive method embodiment belong to the same concept. The specific implementation process is detailed in the method embodiment and will not be repeated here.
[0390] Figure 7is a schematic diagram of the structure of a network device 700 provided in an embodiment of the present application. The network device 700 can be implemented as part or all of a CP device by software, hardware, or a combination of both. The CP device can be the CP device shown in the above embodiment. In the embodiment of the present application, the CP device and the UP device are used to interact with the remote network device to ensure that the terminal accesses the network. Figure 7 The network device 700 includes: a first sending module 701 and a processing module 702.
[0391] The first sending module 701 is used to send first tunnel information to the UP device, where the first tunnel information includes information about one or more tunnels established between the UP device and the remote network device. For specific implementation methods, please refer to Figure 3 The detailed description of step 301 in the embodiment is not repeated here.
[0392] Processing module 702 is used to stop keeping the tunnel alive for one or more tunnels if a communication failure is detected between the CP device and the UP device; for specific implementation methods, please refer to Figure 3 The detailed description of step 302 in the embodiment is not repeated here.
[0393] The first tunnel information is used by the UP device to keep one or more tunnels established between the UP device and the remote network device alive according to the first tunnel information when the UP device detects a communication failure between itself and the CP device. Figure 3 The detailed description of step 302 in the embodiment is not repeated here.
[0394] Alternatively, see Figure 8 , the network device 700 further includes:
[0395] The tunnel keep alive module 703 is used to re-enable the tunnel keep alive of one or more tunnels if it is detected that the communication between the CP device and the UP device is restored. Figure 3 The detailed description of step 303 in the embodiment is not repeated here.
[0396] Optionally, the tunnel keep-alive module 703 includes:
[0397] A resetting unit, used for resetting a tunnel keep-alive sequence number of each tunnel in the one or more tunnels stored locally;
[0398] an instructing unit, configured to instruct a remote network device to reset the tunnel keep-alive sequence number of the target tunnel according to the reset tunnel keep-alive sequence number of the target tunnel;
[0399] The tunnel keepalive unit is used to keep the target tunnel alive through the UP device according to the reset tunnel keepalive sequence number of the target tunnel and the target tunnel identifier after the remote network device successfully resets the tunnel keepalive sequence number of the target tunnel. For specific implementation methods, please refer to Figure 3 The detailed description of step 3032 in the embodiment is not repeated here.
[0400] Optionally, the indicating unit is specifically used for:
[0401] Sending a second control request message to the remote network device through the UP device, where the second control request message carries the identifier of the target tunnel, the tunnel keep-alive sequence number of the reset target tunnel, and sequence number reset indication information;
[0402] The UP device receives the second control response message sent by the remote network device, and the second control response message is used to indicate that the remote network device has successfully reset the tunnel keepalive sequence number of the target tunnel. For specific implementation methods, please refer to Figure 3 The detailed description of step 303 in the embodiment is not repeated here.
[0403] Optionally, the tunnel keep-alive module 703 further includes:
[0404] A creation unit, used for creating a data reconciliation tunnel with a remote network device;
[0405] A first sending unit, configured to send a second data reconciliation message to a remote network device through a UP device via a data reconciliation tunnel, wherein the second data reconciliation message carries an identifier of a tunnel established between the UP device and the remote network device stored on the CP device;
[0406] A first receiving unit is configured to receive, through the UP device, a second reconciliation response message sent by the remote network device, where the second reconciliation response message carries an identifier of a tunnel established between the remote network device and the UP device and stored on the remote network device;
[0407] The first determining unit is configured to determine an intersection of an identifier of a tunnel carried by the second data reconciliation message and an identifier of a tunnel carried by the second reconciliation response message as an identifier of one or more tunnels.
[0408] Optionally, the tunnel keep-alive module 703 further includes:
[0409] A second sending unit is used to send a second session data reconciliation message to the remote network device through the UP device, where the second session data reconciliation message carries one or more identifiers of the first reference sessions, where the one or more first reference sessions are sessions carried on the target tunnel stored on the CP device;
[0410] A second receiving unit is configured to receive, through the UP device, a second session reconciliation response message sent by the remote network device, where the second session reconciliation response message carries identifiers of one or more third reference sessions, where the one or more third reference sessions are sessions carried on the target tunnel stored on the remote network device;
[0411] The second determining unit is configured to determine the intersection of the one or more first reference session identifiers and the one or more third reference session identifiers as the identifier of the session carried on the target tunnel. Figure 3 The detailed description of step 303 in the embodiment is not repeated here.
[0412] Optionally, the tunnel keep-alive module 703 further includes:
[0413] The third sending unit is used to send second tunnel information to the UP device, where the second tunnel information includes information about one or more tunnels established between the UP device and the remote network device stored on the CP device at the first moment, where the first moment refers to the moment when the CP device completes tunnel failure recovery or session failure recovery between the UP device and the remote network device after the communication between the UP device and the CP device is restored. For specific implementation methods, please refer to Figure 3 The detailed description of step 303 in the embodiment is not repeated here.
[0414] Optionally, the CP device communicates with the UP device via a control message redirection interface and a status control interface;
[0415] The processing module 702 includes:
[0416] A monitoring unit, used for monitoring the status of the control message redirection interface and the status control interface;
[0417] The third determining unit is used to determine that a communication failure between the CP device and the UP device is detected if the state of the control message redirection interface and / or the state control interface is abnormal. Figure 3 The detailed description of step 302 in the embodiment is not repeated here.
[0418] Optionally, the first tunnel information is carried in a PFCP update request message, the one or more tunnels are Layer 2 Tunnel Protocol L2TP tunnels, and the information of each tunnel in the one or more tunnels includes tunnel description information;
[0419] If the L2TP tunnel is created based on IPv4, the tunnel description information includes the tunnel local identifier, tunnel remote identifier, tunnel local IPv4 address, and tunnel remote IPv4 address;
[0420] If the L2TP tunnel is created based on IPv6, the tunnel description information includes the tunnel local identifier, tunnel remote identifier, tunnel local IPv6 address, and tunnel remote IPv6 address. For specific implementation methods, please refer to Figure 3 The detailed description of step 301 in the embodiment is not repeated here.
[0421] Optionally, the second tunnel information is carried in a PFCP update request message.
[0422] Optionally, the network device 700 further includes:
[0423] The fourth sending module is used to send the first session information to the UP device, where the first session information includes information about the sessions carried on the one or more tunnels.
[0424] Optionally, the first session information is carried in the PFCP update request message, and the information of the session carried on each tunnel in the one or more tunnels includes the tunnel local identifier, the session local identifier and the session remote identifier. Figure 3 The detailed description of step 301 in the embodiment is not repeated here.
[0425] Optionally, the first sending module includes:
[0426] a fifth sending unit, configured to send information of a created tunnel to the UP device each time a tunnel is created, wherein the one or more tunnels include the created tunnel; or
[0427] The sixth sending unit is configured to periodically send the tunnel information stored in the unit to the UP device.
[0428] In an embodiment of the present application, before the communication failure between the UP device and the CP device, the UP device receives the tunnel information synchronized by the CP device. After the communication failure between the UP device and the CP, the UP device keeps the tunnel alive according to the tunnel information, that is, the UP device maintains the tunnel with the remote network device. In this way, the tunnel demolition will not be triggered due to the communication failure between the CP device and the UP device. This solution can ensure that the network connection between the terminal and the remote end will not be interrupted, that is, the user service will not be damaged.
[0429] It should be noted that: the network device provided in the above embodiment only uses the division of the above functional modules as an example when performing tunnel keep-alive. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the network device provided in the above embodiment and the tunnel keep-alive method embodiment belong to the same concept. The specific implementation process is detailed in the method embodiment and will not be repeated here.
[0430] The embodiment of the present application provides a network system, which can also be called a tunnel keep-alive system. The network system includes a CP device and a UP device, and a remote network device. The CP device and the UP device are used to interact with the remote network device to ensure that the terminal accesses the network. Among them, the UP device and the CP device have the corresponding functions of implementing the tunnel keep-alive method provided in the above embodiment, so as to perform tunnel keep-alive through the system. For specific implementation methods, please refer to Figure 3 The detailed description of the embodiments will not be repeated here.
[0431] In an embodiment of the present application, before the communication failure between the UP device and the CP device, the UP device receives the tunnel information synchronized by the CP device. After the communication failure between the UP device and the CP, the UP device keeps the tunnel alive according to the tunnel information, that is, the UP device maintains the tunnel with the remote network device. In this way, the tunnel demolition will not be triggered due to the communication failure between the CP device and the UP device. This solution can ensure that the network connection between the terminal and the remote end will not be interrupted, that is, the user service will not be damaged.
[0432] It should be noted that the network system and the tunnel keep-alive method embodiment provided in the above embodiment belong to the same concept, and the specific implementation process is detailed in the method embodiment, which will not be repeated here.
[0433] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network or other programmable device. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium can be any available medium that a computer can access, or a data storage device such as a server or data center that includes one or more available media integrated. The available medium may be a magnetic medium (e.g., a floppy disk, a hard disk, a magnetic tape), an optical medium (e.g., a digital versatile disc (DVD)), or a semiconductor medium (e.g., a solid state disk (SSD)). It is worth noting that the computer-readable storage medium mentioned in the embodiment of the present application may be a non-volatile storage medium, in other words, a non-transient storage medium.
[0434] It should be understood that the "at least one" mentioned herein refers to one or more, and "multiple" refers to two or more. In the description of the embodiments of the present application, unless otherwise specified, " / " means or, for example, A / B can mean A or B; "and / or" in this article is only a description of the association relationship of the associated objects, indicating that there can be three relationships, for example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, in order to facilitate the clear description of the technical solutions of the embodiments of the present application, in the embodiments of the present application, the words "first", "second" and the like are used to distinguish the same items or similar items with basically the same functions and effects. Those skilled in the art can understand that the words "first", "second" and the like do not limit the quantity and execution order, and the words "first", "second" and the like do not limit them to be necessarily different.
[0435] The above-mentioned embodiments are provided for the present application and are not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application shall be included in the protection scope of the present application.
Claims
1. A tunnel keep-alive method, characterized in that: The control plane CP device and the user plane UP device are used to interact with the remote network device to ensure that the terminal accesses the network. The method includes: The UP device receives first tunnel information sent by the CP device, where the first tunnel information includes information about one or more tunnels established between the UP device and the remote network device; If the UP device detects that a communication failure occurs between itself and the CP device, the UP device keeps the one or more tunnels alive according to the first tunnel information.
2. The method according to claim 1, characterized in that The first tunnel information includes identifications of the one or more tunnels; The UP device performs tunnel keepalive for the one or more tunnels according to the first tunnel information, including: The UP device monitors a first tunnel keep-alive message sent by the remote network device, where the first tunnel keep-alive message carries an identifier of a target tunnel and a tunnel keep-alive sequence number; The UP device sends a second tunnel keepalive message to the remote network device according to the identifier and tunnel keepalive sequence number of the target tunnel and the identifiers of the one or more tunnels.
3. The method according to claim 1, characterized in that The first tunnel information includes identifications of the one or more tunnels; The UP device performs tunnel keepalive for the one or more tunnels according to the first tunnel information, including: The UP device resets a tunnel keep-alive sequence number of a target tunnel, where the target tunnel is one of the one or more tunnels; The UP device instructs the remote network device to reset the tunnel keep-alive sequence number of the target tunnel according to the reset tunnel keep-alive sequence number of the target tunnel; After the remote network device successfully resets the tunnel keep-alive sequence number of the target tunnel, the UP device performs tunnel keep-alive on the target tunnel according to the reset tunnel keep-alive sequence number of the target tunnel and the identifier of the target tunnel.
4. The method according to claim 3, characterized in that The UP device instructs the remote network device to reset the tunnel keep-alive sequence number of the target tunnel according to the reset tunnel keep-alive sequence number of the target tunnel, including: The UP device sends a first control request message to the remote network device, where the first control request message carries the identifier of the target tunnel, the tunnel keep-alive sequence number of the reset target tunnel, and sequence number reset indication information; The UP device receives a first control response message sent by the remote network device, where the first control response message is used to indicate that the remote network device has successfully reset the tunnel keep-alive sequence number of the target tunnel.
5. The method according to claim 3, characterized in that Before the UP device resets the tunnel keep-alive sequence number of the target tunnel, the method further includes: The UP device creates a data reconciliation tunnel with the remote network device; The UP device sends a first tunnel data reconciliation message to the remote network device through the data reconciliation tunnel, where the first tunnel data reconciliation message carries an identifier of the tunnel established between the UP device and the remote network device and stored on the UP device; The UP device receives a first tunnel reconciliation response message sent by the remote network device, where the first tunnel reconciliation response message carries an identifier of a tunnel established between the remote network device and the UP device and stored on the remote network device; The UP device determines an intersection of the tunnel identifier carried by the first tunnel data reconciliation message and the tunnel identifier carried by the first tunnel reconciliation response message as the identifier of the one or more tunnels.
6. The method according to claim 5, characterized in that Before the UP device performs tunnel keepalive for the one or more tunnels according to the first tunnel information, the method further includes: The UP device receives first session information sent by the CP device, where the first session information includes information about sessions carried on the one or more tunnels; After the UP device creates a data reconciliation tunnel with the remote network device, the method further includes: The UP device sends a first session data reconciliation message to the remote network device, where the first session data reconciliation message carries one or more identifiers of first reference sessions, where the one or more first reference sessions are sessions carried on the target tunnel stored on the UP device; The UP device receives a first session reconciliation response message sent by the remote network device, where the first session reconciliation response message carries identifiers of one or more second reference sessions, where the one or more second reference sessions are sessions carried on the target tunnel and stored on the remote network device; The UP device determines an intersection of the identifiers of the one or more first reference sessions and the identifiers of the one or more second reference sessions as an identifier of a session carried on the target tunnel.
7. The method according to any one of claims 1 to 6, characterized in that: After the UP device performs tunnel keepalive for the one or more tunnels according to the first tunnel information, the method further includes: If the UP device detects that the communication between itself and the CP device is restored, the UP device stops performing tunnel keepalive for the one or more tunnels.
8. The method according to claim 7, characterized in that After the UP device stops keeping the one or more tunnels alive, the method further includes: The UP device receives second tunnel information sent by the CP device, where the second tunnel information includes information of one or more tunnels established between the UP device and the remote network device stored on the CP device at a first moment, where the first moment refers to a moment when the CP device completes tunnel failure recovery or session failure recovery between the UP device and the remote network device through the UP device after communication between the UP device and the CP device is restored; The UP device updates the locally stored tunnel information according to the second tunnel information.
9. The method according to any one of claims 1 to 6, characterized in that: The UP device communicates with the CP device via a control message redirection interface and a state control interface; The UP device detects that a communication failure occurs between the UP device and the CP device, including: The UP device monitors the status of the control message redirection interface and the status control interface; If the UP device monitors that the status of the control message redirection interface and / or the status control interface is abnormal, the UP device determines that a communication failure between itself and the CP device is detected.
10. The method according to any one of claims 1 to 6, characterized in that: The first tunnel information is carried in a Packet Forwarding Control Protocol PFCP update request message, the one or more tunnels are Layer 2 Tunneling Protocol L2TP tunnels, and the information of each tunnel in the one or more tunnels includes tunnel description information; If the L2TP tunnel is created according to the fourth version of the Internet Protocol IPv4, the tunnel description information includes a tunnel local identifier, a tunnel remote identifier, a tunnel local IPv4 address, and a tunnel remote IPv4 address; If the L2TP tunnel is created according to the sixth version of the Internet Protocol IPv6, the tunnel description information includes a tunnel local identifier, a tunnel remote identifier, a tunnel local IPv6 address, and a tunnel remote IPv6 address.
11. The method according to claim 8, characterized in that The second tunnel information is carried in the PFCP update request message.
12. The method according to claim 6, characterized in that The first session information is carried in a PFCP update request message, and the information of the session carried on each tunnel of the one or more tunnels includes a tunnel local identifier, a session local identifier, and a session remote identifier.
13. A tunnel keep alive method, characterized in that: The control plane CP device and the user plane UP device are used to interact with the remote network device to ensure that the terminal accesses the network. The method includes: The CP device sends first tunnel information to the UP device, where the first tunnel information includes information about one or more tunnels established between the UP device and the remote network device; If the CP device detects that a communication failure occurs between itself and the UP device, the CP device stops performing tunnel keepalive for the one or more tunnels; The first tunnel information is used by the UP device to keep one or more tunnels established between the UP device and the remote network device alive according to the first tunnel information when the UP device detects that a communication failure occurs between the UP device and the CP device.
14. The method according to claim 13, characterized in that If the CP device detects that a communication failure occurs between the CP device and the UP device, after the CP device stops performing tunnel keepalive for the one or more tunnels, the method further includes: If the CP device detects that the communication between itself and the UP device is restored, the CP device re-activates the one or more tunnels.
15. The method according to claim 14, characterized in that The CP device re-activates the one or more tunnels, including: The CP device resets a tunnel keep-alive sequence number of a locally stored target tunnel, where the target tunnel is one of the one or more tunnels; The CP device instructs the remote network device to reset the tunnel keep-alive sequence number of the target tunnel according to the reset tunnel keep-alive sequence number of the target tunnel; After the remote network device successfully resets the tunnel keep-alive sequence number of the target tunnel, the CP device keeps the target tunnel alive through the UP device according to the reset tunnel keep-alive sequence number of the target tunnel and the identifier of the target tunnel.
16. The method according to claim 15, characterized in that The CP device instructs the remote network device to reset the tunnel keep-alive sequence number of the target tunnel according to the reset tunnel keep-alive sequence number of the target tunnel, including: The CP device sends a second control request message to the remote network device through the UP device, where the second control request message carries the identifier of the target tunnel, the tunnel keep-alive sequence number of the reset target tunnel, and sequence number reset indication information; The CP device receives a second control response message sent by the remote network device through the UP device, where the second control response message is used to indicate that the remote network device has successfully reset the tunnel keep-alive sequence number of the target tunnel.
17. The method according to claim 15, characterized in that Before the CP device resets the tunnel keep-alive sequence number of the target tunnel stored locally, the method further includes: The CP device creates a data reconciliation tunnel with the remote network device; The CP device sends a second data reconciliation message to the remote network device through the UP device via the data reconciliation tunnel, where the second data reconciliation message carries an identifier of the tunnel established between the UP device and the remote network device stored on the CP device; The CP device receives, through the UP device, a second account reconciliation response message sent by the remote network device, where the second account reconciliation response message carries an identifier of a tunnel established between the remote network device and the UP device and stored on the remote network device; The CP device determines an intersection of the tunnel identifier carried by the second data reconciliation message and the tunnel identifier carried by the second reconciliation response message as the identifier of the one or more tunnels.
18. The method according to claim 17, characterized in that After the CP device creates a data reconciliation tunnel with the remote network device, the method further includes: The CP device sends a second session data reconciliation message to the remote network device through the UP device, where the second session data reconciliation message carries one or more identifiers of first reference sessions, where the one or more first reference sessions are sessions carried on the target tunnel stored on the CP device; The CP device receives, through the UP device, a second session reconciliation response message sent by the remote network device, where the second session reconciliation response message carries identifiers of one or more third reference sessions, where the one or more third reference sessions are sessions carried on the target tunnel and stored on the remote network device; The CP device determines an intersection of the identifiers of the one or more first reference sessions and the identifiers of the one or more third reference sessions as an identifier of a session carried on the target tunnel.
19. The method according to claim 15, characterized in that After the remote network device successfully resets the tunnel keep-alive sequence number of the target tunnel, the method further includes: The CP device sends second tunnel information to the UP device, and the second tunnel information includes information of one or more tunnels established between the UP device and the remote network device stored on the CP device at a first moment, and the first moment refers to the moment when the CP device completes tunnel fault recovery or session fault recovery between the UP device and the remote network device through the UP device after the communication between the UP device and the CP device is restored.
20. The method according to any one of claims 13 to 19, characterized in that: The CP device communicates with the UP device via a control message redirection interface and a state control interface; The CP device detects that a communication failure occurs between the CP device and the UP device, including: The CP device monitors the status of the control message redirection interface and the status control interface; If the CP device monitors that the status of the control message redirection interface and / or the status control interface is abnormal, the CP device determines that a communication failure between itself and the UP device has been detected.
21. The method according to any one of claims 13 to 19, characterized in that: The first tunnel information is carried in a Packet Forwarding Control Protocol PFCP update request message, the one or more tunnels are Layer 2 Tunneling Protocol L2TP tunnels, and the information of each tunnel in the one or more tunnels includes tunnel description information; If the L2TP tunnel is created according to the fourth version of the Internet Protocol IPv4, the tunnel description information includes a tunnel local identifier, a tunnel remote identifier, a tunnel local IPv4 address, and a tunnel remote IPv4 address; If the L2TP tunnel is created according to the sixth version of the Internet Protocol IPv6, the tunnel description information includes a tunnel local identifier, a tunnel remote identifier, a tunnel local IPv6 address, and a tunnel remote IPv6 address.
22. The method of claim 19, wherein: The second tunnel information is carried in the PFCP update request message.
23. The method according to any one of claims 13 to 19, characterized in that: Before the CP device stops keeping the tunnel alive, the method further includes: The CP device sends first session information to the UP device, where the first session information includes information about sessions carried on the one or more tunnels.
24. The method of claim 23, wherein: The first session information is carried in a PFCP update request message, and the information of the session carried on each tunnel of the one or more tunnels includes a tunnel local identifier, a session local identifier, and a session remote identifier.
25. The method according to any one of claims 13 to 19, characterized in that: The CP device sends first tunnel information to the UP device, including: The CP device sends information of the created tunnel to the UP device each time it creates a tunnel, wherein the one or more tunnels include the created tunnel; or The CP device periodically sends the tunnel information stored in the CP device to the UP device.
26. A network device, characterized in that: The network device is applied to a network system, the network system includes a control plane CP device and a user plane UP device, the CP device and the UP device are used to interact with a remote network device to ensure that a terminal accesses a network, the network device is the UP device, and the network device includes: A first receiving module, configured to receive first tunnel information sent by the CP device, where the first tunnel information includes information about one or more tunnels established between the UP device and the remote network device; The tunnel keep-alive module is configured to keep the one or more tunnels alive according to the first tunnel information if a communication failure is detected between the UP device and the CP device.
27. The network device according to claim 26, characterized in that The first tunnel information includes identifications of the one or more tunnels; The tunnel keep-alive module includes: A monitoring unit, configured to monitor a first tunnel keep-alive message sent by the remote network device, wherein the first tunnel keep-alive message carries an identifier of a target tunnel and a tunnel keep-alive sequence number; The first sending unit is used to send a second tunnel keep-alive message to the remote network device according to the identifier and the tunnel keep-alive sequence number of the target tunnel and the identifiers of the one or more tunnels.
28. The network device according to claim 26, characterized in that The first tunnel information includes identifications of the one or more tunnels; The tunnel keep-alive module includes: a resetting unit, configured to reset a tunnel keep-alive sequence number of a target tunnel, wherein the target tunnel is one of the one or more tunnels; an instructing unit, configured to instruct the remote network device to reset the tunnel keep-alive sequence number of the target tunnel according to the reset tunnel keep-alive sequence number of the target tunnel; The tunnel keep-alive unit is used to keep the target tunnel alive according to the reset tunnel keep-alive sequence number of the target tunnel and the identifier of the target tunnel after the remote network device successfully resets the tunnel keep-alive sequence number of the target tunnel.
29. The network device according to claim 28, characterized in that The indicating unit is specifically used for: Sending a first control request message to the remote network device, wherein the first control request message carries an identifier of the target tunnel, a tunnel keep-alive sequence number of the reset target tunnel, and sequence number reset indication information; A first control response message sent by the remote network device is received, where the first control response message is used to indicate that the remote network device has successfully reset the tunnel keep-alive sequence number of the target tunnel.
30. The network device according to claim 28, characterized in that The tunnel keep-alive module also includes: A creation unit, configured to create a data reconciliation tunnel with the remote network device; A second sending unit, configured to send a first tunnel data reconciliation message to the remote network device through the data reconciliation tunnel, wherein the first tunnel data reconciliation message carries an identifier of the tunnel established between the UP device and the remote network device and stored on the UP device; A first receiving unit, configured to receive a first tunnel reconciliation response message sent by the remote network device, wherein the first tunnel reconciliation response message carries an identifier of a tunnel established between the remote network device and the UP device and stored on the remote network device; The first determining unit is configured to determine an intersection of an identifier of a tunnel carried by the first tunnel data reconciliation message and an identifier of a tunnel carried by the first tunnel reconciliation response message as an identifier of the one or more tunnels.
31. The network device according to claim 30, characterized in that The network device also includes: A second receiving module, configured to receive first session information sent by the CP device, where the first session information includes information about sessions carried on the one or more tunnels; The tunnel keep-alive module also includes: A third sending unit is used to send a first session data reconciliation message to the remote network device, where the first session data reconciliation message carries one or more identifiers of first reference sessions, where the one or more first reference sessions are sessions carried on the target tunnel stored on the UP device; A second receiving unit, configured to receive a first session reconciliation response message sent by the remote network device, wherein the first session reconciliation response message carries identifiers of one or more second reference sessions, and the one or more second reference sessions are sessions carried on the target tunnel stored on the remote network device; The second determining unit is configured to determine an intersection of the identifiers of the one or more first reference sessions and the identifiers of the one or more second reference sessions as the identifier of the session carried on the target tunnel.
32. The network device according to any one of claims 26 to 31, characterized in that: The network device also includes: The processing module is configured to stop keeping the one or more tunnels alive if it is detected that the communication between the UP device and the CP device is restored.
33. The network device according to claim 32, characterized in that The network device also includes: a third receiving module, configured to receive second tunnel information sent by the CP device, wherein the second tunnel information includes information of one or more tunnels established between the UP device and the remote network device stored on the CP device at a first moment, wherein the first moment refers to a moment when the CP device completes tunnel failure recovery or session failure recovery between the UP device and the remote network device through the UP device after communication between the UP device and the CP device is restored; An updating module is used to update the locally stored tunnel information according to the second tunnel information.
34. The network device according to any one of claims 26 to 31, characterized in that: The UP device communicates with the CP device via a control message redirection interface and a state control interface; The tunnel keep-alive module includes: A monitoring unit, used to monitor the status of the control message redirection interface and the status control interface; The third determining unit is configured to determine that a communication failure between the UP device and the CP device is detected if it is monitored that the status of the control message redirection interface and / or the status control interface is abnormal.
35. The network device according to any one of claims 26 to 31, characterized in that: The first tunnel information is carried in a Packet Forwarding Control Protocol PFCP update request message, the one or more tunnels are Layer 2 Tunneling Protocol L2TP tunnels, and the information of each tunnel in the one or more tunnels includes tunnel description information; If the L2TP tunnel is created according to the fourth version of the Internet Protocol IPv4, the tunnel description information includes a tunnel local identifier, a tunnel remote identifier, a tunnel local IPv4 address, and a tunnel remote IPv4 address; If the L2TP tunnel is created according to the sixth version of the Internet Protocol IPv6, the tunnel description information includes a tunnel local identifier, a tunnel remote identifier, a tunnel local IPv6 address, and a tunnel remote IPv6 address.
36. The network device according to claim 33, characterized in that The second tunnel information is carried in the PFCP update request message.
37. The network device according to claim 31, characterized in that The first session information is carried in a PFCP update request message, and the information of the session carried on each tunnel of the one or more tunnels includes a tunnel local identifier, a session local identifier, and a session remote identifier.
38. A network device, characterized in that: The network device is applied to a network system, the network system includes a control plane CP device and a user plane UP device, the CP device and the UP device are used to interact with a remote network device to ensure that a terminal accesses the network, the network device is the CP device, and the network device includes: A first sending module, configured to send first tunnel information to the UP device, where the first tunnel information includes information about one or more tunnels established between the UP device and the remote network device; A processing module, configured to stop keeping the one or more tunnels alive if a communication failure is detected between the CP device and the UP device; The first tunnel information is used by the UP device to keep one or more tunnels established between the UP device and the remote network device alive according to the first tunnel information when the UP device detects that a communication failure occurs between the UP device and the CP device.
39. The network device according to claim 38, characterized in that The network device also includes: The tunnel keep-alive module is used to re-enable the one or more tunnels to keep alive the tunnels if it is detected that the communication between the CP device and the UP device is restored.
40. The network device according to claim 39, characterized in that The tunnel keep-alive module includes: a resetting unit, configured to reset a tunnel keep-alive sequence number of a locally stored target tunnel, wherein the target tunnel is one of the one or more tunnels; an instructing unit, configured to instruct the remote network device to reset the tunnel keep-alive sequence number of the target tunnel according to the reset tunnel keep-alive sequence number of the target tunnel; The tunnel keep-alive unit is used to keep the target tunnel alive through the UP device according to the reset tunnel keep-alive sequence number of the target tunnel and the identifier of the target tunnel after the remote network device successfully resets the tunnel keep-alive sequence number of the target tunnel.
41. The network device according to claim 40, characterized in that The instructions are specifically used to: Sending a second control request message to the remote network device through the UP device, where the second control request message carries the identifier of the target tunnel, the tunnel keep-alive sequence number of the reset target tunnel, and sequence number reset indication information; A second control response message sent by the remote network device is received through the UP device, where the second control response message is used to indicate that the remote network device has successfully reset the tunnel keep-alive sequence number of the target tunnel.
42. The network device according to claim 40, characterized in that The tunnel keep-alive module also includes: A creation unit, configured to create a data reconciliation tunnel with the remote network device; A first sending unit, configured to send a second data reconciliation message to the remote network device through the UP device via the data reconciliation tunnel, wherein the second data reconciliation message carries an identifier of the tunnel established between the UP device and the remote network device stored on the CP device; a first receiving unit, configured to receive, through the UP device, a second reconciliation response message sent by the remote network device, wherein the second reconciliation response message carries an identifier of a tunnel established between the remote network device and the UP device and stored on the remote network device; The first determining unit is configured to determine an intersection of an identifier of a tunnel carried by the second data reconciliation message and an identifier of a tunnel carried by the second reconciliation response message as an identifier of the one or more tunnels.
43. The network device according to claim 42, characterized in that The tunnel keep-alive module also includes: A second sending unit, configured to send a second session data reconciliation message to the remote network device through the UP device, wherein the second session data reconciliation message carries one or more identifiers of first reference sessions, and the one or more first reference sessions are sessions carried on the target tunnel stored on the CP device; A second receiving unit is configured to receive, through the UP device, a second session reconciliation response message sent by the remote network device, where the second session reconciliation response message carries identifiers of one or more third reference sessions, where the one or more third reference sessions are sessions carried on the target tunnel stored on the remote network device; The second determining unit is configured to determine an intersection of the identifiers of the one or more first reference sessions and the identifiers of the one or more third reference sessions as an identifier of a session carried on the target tunnel.
44. The network device according to claim 40, characterized in that The tunnel keep-alive module also includes: A third sending unit is used to send second tunnel information to the UP device, where the second tunnel information includes information about one or more tunnels established between the UP device and the remote network device stored on the CP device at a first moment, where the first moment refers to the moment when the CP device completes tunnel fault recovery or session fault recovery between the UP device and the remote network device through the UP device after the communication between the UP device and the CP device is restored.
45. The network device according to any one of claims 38 to 44, characterized in that: The CP device communicates with the UP device via a control message redirection interface and a state control interface; The processing module comprises: A monitoring unit, used to monitor the status of the control message redirection interface and the status control interface; The third determining unit is configured to determine that a communication failure between the CP device and the UP device is detected if it is monitored that the state of the control message redirection interface and / or the state control interface is abnormal.
46. The network device according to any one of claims 38 to 44, characterized in that: The network device also includes: The fourth sending module is used to send first session information to the UP device, where the first session information includes information about the sessions carried on the one or more tunnels.
47. The network device according to any one of claims 38 to 44, characterized in that: The first sending module includes: a fifth sending unit, configured to send information of a created tunnel to the UP device each time a tunnel is created, wherein the one or more tunnels include the created tunnel; or The sixth sending unit is used to periodically send the tunnel information stored in the UP device.
48. A network device, characterized in that: The network device is applied to a network system, the network system includes a control plane CP device and a user plane UP device, the CP device and the UP device are used to interact with a remote network device to ensure that the terminal accesses the network, the network device is the UP device, and the network device includes a memory and a processor; The memory is used to store the program code involved in any one of the methods described in claims 1-12; The processor is used to execute the program code to implement the method described in any one of claims 1-12.
49. A network device, characterized in that: The network device is applied to a network system, the network system includes a control plane CP device and a user plane UP device, the CP device and the UP device are used to interact with a remote network device to ensure that the terminal accesses the network, the network device is the CP device, and the network device includes a memory and a processor; The memory is used to store the program code involved in any one of the methods described in claims 13-25; The processor is used to execute the program code to implement the method described in any one of claims 13-25.
50. A network system, characterized in that: The system includes a control plane CP device and a user plane UP device, and a remote network device, wherein the CP device and the UP device are used to interact with the remote network device to ensure that the terminal accesses the network; The UP device is used to implement the method described in any one of claims 1 to 12; The CP device is used to implement the method described in any one of claims 13-25.
51. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method described in any one of claims 1 to 12 are implemented, or the steps of the method described in any one of claims 13 to 25 are implemented.
Citation Information
Patent Citations
Packet forwarding
EP3528438A1