Method and electronic device for notifying failure
By using the second sub-channel to send TCP packets carrying the TCP option of the fault indication in MPTCP, the problem of failure information being unable to be transmitted in time during sub-channel failure is solved, and the transmission efficiency and performance are improved.
Patent Information
- Application Number
- CN202010660058.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-07-09
- Publication Date
- 2025-03-04
- Estimated Expiration
- 2040-07-09
AI Technical Summary
In the Multi-path Transmission Control Protocol (MPTCP), when a sub-channel fails, the client or server cannot transmit the fault information in time, resulting in transmission failure or delayed delay, affecting performance.
By sending a TCP message carrying the first TCP option of the fault indication on the second subchannel, the second device is notified of the failure of the first subchannel, thereby taking effective resolution measures.
It realizes timely notification and handling of sub-channel faults, improves transmission efficiency and performance, and avoids transmission failure and delay problems.
Smart Images

Figure CN113923696B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of communications, and more particularly to a method and electronic device for notifying a fault in the field of communications. Background Art
[0002] Multipath transmission control protocol (MPTCP) is a transmission protocol for concurrent transmission over multiple paths. Multiple subchannels of an MPTCP session can be established through MPTCP, so that a transmission control protocol (TCP) message of an MPTCP session can be transmitted through multiple subchannels. In the process of transmitting TCP messages, some of the multiple subchannels may have faults, such as a network port failure corresponding to the subchannel, a network failure corresponding to the subchannel, or an intermediate device failure corresponding to the subchannel, or a link failure of the subchannel. If a subchannel has failed, the client or server cannot transmit the fault information to the other end on the failed subchannel, resulting in the other end being unable to obtain accurate fault information of the subchannel, and unable to take effective measures to solve the fault in a timely manner, which will cause transmission failure or delay in transmission, thereby affecting transmission performance. Summary of the invention
[0003] An embodiment of the present application provides a method and electronic device for notifying a fault, wherein a first device can carry a first TCP option indicating a first sub-channel fault in a first TCP message and send the message to a second device through a second sub-channel. In this way, the second device can promptly learn of the first sub-channel fault through the second sub-channel, thereby being able to take effective measures to resolve the fault, thereby improving transmission efficiency and helping to improve transmission performance.
[0004] In a first aspect, a method for notifying a fault is provided, comprising: the first device sends a first transmission control protocol TCP message to a second device through a second sub-channel, the first TCP message includes a first TCP option, the first TCP option is used to indicate a failure of the first sub-channel, and the first sub-channel and the second sub-channel are sub-channels corresponding to a first multipath transmission control protocol MPTCP session.
[0005] In the above scheme, the first device sends a first TCP message carrying a first TCP option to the second device through a second sub-channel under the same MPTCP session. The second device can determine the failure of the first sub-channel based on the first TCP option, so that effective means can be taken to resolve the failure. For example, the data of the first sub-channel can be switched to other non-faulty sub-channels, or a new sub-channel can be established to divert the data of the first sub-channel. In this way, the transmission efficiency can be improved, which helps to improve the transmission performance.
[0006] It can be understood that the second sub-channel is a non-faulty sub-channel with normal transmission.
[0007] The message header of the first TCP message may include a first TCP option.
[0008] Optionally, the first TCP message may be a TCP data message or a TCP control message.
[0009] Optionally, the first device may be a client, and the second device may be a server.
[0010] Optionally, the first device may be a server, and the second device may be a client.
[0011] Optionally, the format of the first TCP option may be specified by the protocol; optionally, the length of each field of the first TCP option may be specified by the protocol; optionally, the physical meaning of each field of the first TCP option may be specified by the protocol; optionally, the positional relationship between each field of the first TCP option may be specified by the protocol.
[0012] In some possible implementations, the first TCP option includes a first field, a second field, and a third field, the first field is used to carry the source address identifier of the first sub-channel, the second field is used to carry the destination address identifier of the first sub-channel, and the first value of the third field is used to indicate the first sub-channel failure identified by the source address identifier carried by the first field and the destination address identifier carried by the second field.
[0013] In the above solution, the second device can determine, according to the first value of the third field, that the first subchannel identified by the source address identifier carried by the first field and the destination address identifier carried by the second field is faulty.
[0014] Optionally, if the first device can be a client and the second device can be a server, the source address identifier carried by the first field is the source address identifier of the first sub-channel on the client, and the destination address identifier carried by the second field is the destination address identifier of the first sub-channel on the server, that is, the source address identifier and destination address identifier of the first sub-channel at this time are based on the client.
[0015] Optionally, if the first device can be a server and the second device can be a client, the source address identifier carried by the first field is the source address identifier of the first sub-channel on the server, and the destination address identifier carried by the second field is the destination address identifier of the first sub-channel on the client, that is, the source address identifier and destination address identifier of the first sub-channel at this time are based on the server as a reference.
[0016] Optionally, the first value of the third field may be a value specified by the protocol.
[0017] Optionally, the lengths of the first field, the second field and the third field may be specified by the protocol.
[0018] Optionally, the positional relationship among the first field, the second field and the third field in the first TCP option may be specified by the protocol.
[0019] In some possible implementations, the method further includes: the first device determining a cause of a first sub-channel failure; wherein the first TCP option includes a fourth field, and a second value of the fourth field is used to indicate the cause of the first sub-channel failure.
[0020] In the above scheme, the first device can map the cause of the first sub-channel failure to the second value of the fourth field of the first TCP option, and the second device can determine the cause of the first sub-channel failure based on the second value of the fourth field, thereby determining the strategy for solving the first sub-channel failure based on the cause of the first sub-channel failure.
[0021] Different values of the fourth field indicate different causes of the failure of the first subchannel. Specifically, the relationship between the value of the fourth field and the cause of the failure may be specified by the protocol.
[0022] In some possible implementations, the first device determines the cause of the first subchannel failure, including: the first device detects a local failure and determines the cause of the first subchannel failure. Specifically, the first device may determine that the first subchannel failure is caused by a failure of a local device such as a local network port, a local network card, or a local processing protocol process related to the first subchannel.
[0023] In some possible implementations, the first device determining the cause of the first subchannel failure includes: the first device detecting the cause of the first subchannel failure according to the detection task. For example, the first device may detect the cause of the first subchannel failure according to BFD.
[0024] In some possible implementations, the first device determining a cause of the first subchannel failure includes: the first device receiving, through the first subchannel, a network control message protocol (ICMP) error report message sent by a third device, where the ICMP error report message is used to indicate a cause of the first subchannel failure;
[0025] The first device determines a cause of the first subchannel failure according to the ICMP error report message;
[0026] The first TCP option includes a fifth field, and the fifth field is used to carry the identifier of the third device.
[0027] In the above scheme, when the first device receives an ICMP error report message sent by a faulty third device, it can determine the cause of the failure of the first sub-channel based on the ICMP error report message, and carry the identifier of the third device in the fifth field of the first TCP option to send it to the second device. The second device can determine the faulty third device based on the fifth field.
[0028] Optionally, the third device may be a device between the first device and the second device, or the third device may be the second device.
[0029] In some possible implementations, the first TCP option also includes a sixth field, and the third value of the sixth field is used to indicate that the fifth field exists.
[0030] In this way, the second device can parse the value of the sixth field. If the value of the sixth field is the third value, the second device can determine that the fifth field exists, thereby determining the faulty third device based on the identifier of the third device carried by the fifth field.
[0031] In some possible implementations, the first TCP option also includes a seventh field, and the seventh field is used to carry the IP protocol version of the third device.
[0032] In this way, the second device can parse the identifier of the third device carried in the fifth field according to the IP protocol version of the third device carried in the seventh field. Different IP protocol versions of the third device correspond to different identifiers, which is conducive to the second device parsing the identifier of the third device.
[0033] Optionally, the first TCP option may not include the sixth field and / or the seventh field, and whether the fifth field exists and the protocol version corresponding to the identifier of the third device carried by the fifth field may be determined by the length of the first TCP option.
[0034] In some possible implementations, the ICMP error report message includes the cause of the failure of the first subchannel.
[0035] In some possible implementations, the first TCP option also includes an eighth field, a fourth value of the eighth field is used to indicate that the first sub-channel failure is a transient failure, and a fifth value of the eighth field is used to indicate that the first sub-channel failure is a non-transient failure.
[0036] In the above scheme, if the fourth value of the eighth field is used to indicate that the first sub-channel failure is a transient failure, the second device can determine that the failure of the first sub-channel is a transient failure according to the fourth value, and the second device can continue to try to establish the first sub-channel with the first device or the second device can mark the first sub-channel as a backup link. In addition, the first device can try to continue to send the first TCP message carrying the first TCP option to the second device through the first sub-channel, and the second sub-channel and the first sub-channel are the same sub-channel.
[0037] In the above scheme, if the fifth value of the eighth field is used to indicate that the failure of the first sub-channel is a non-instantaneous failure, the second device can determine that the failure of the first sub-channel is a non-instantaneous failure based on the fifth value, and the second device and the first device establish a new sub-channel to divert the data to be transmitted on the first sub-channel, or the second device switches the data to be transmitted on the first sub-channel to a normal, non-faulty sub-channel.
[0038] In some possible implementations, before the first device sends a first TCP message to the second device through the second sub-channel, the method also includes: the first device sends a second TCP message to the second device, the second TCP message includes a first announcement address ADD_ADDR option, and the first ADD_ADDR option includes a correspondence between a source network protocol IP address of the first sub-channel and a source address identifier of the first sub-channel.
[0039] In this way, when the second device receives the first ADD_ADDR option, it can save the correspondence between the source IP address of the first sub-channel and the source address identifier, and the second device also saves the correspondence between the destination IP address of the first sub-channel and the destination address identifier. When the second device receives the first TCP option carried by the first TCP message, the second device can determine the source IP address of the first sub-channel based on the source address identifier carried by the first field in the first TCP option and the correspondence between the saved source address identifier and the source IP address; similarly, the second device can determine the destination IP address of the first sub-channel based on the destination address identifier carried by the second field in the second TCP option and the correspondence between the saved destination address identifier and the destination IP address; the second device determines the faulty first sub-channel based on the source IP address and the destination IP address.
[0040] Optionally, the first ADD_ADDR option includes a correspondence between the source IP address and source port of the first subchannel and the source address identifier of the first subchannel.
[0041] Optionally, the second TCP message may be a TCP data message or a TCP control message.
[0042] Optionally, the message header of the second TCP message may include a first ADD_ADDR option.
[0043] In some possible implementations, before the first device sends the first TCP packet to the second device through the second subchannel, the method further includes:
[0044] The first device receives a third TCP message sent by the second device, where the third TCP message includes the second ADD_ADDR option, and the second ADD_ADDR option includes a correspondence between a target network protocol IP address of the first sub-channel and a target address identifier of the first sub-channel.
[0045] In the above scheme, when the first device determines that the first sub-channel fails, the source IP address and the destination IP address can be used to uniquely identify the first sub-channel, and the first device can determine the destination address identifier carried by the second field of the first TCP option based on the correspondence between the destination IP address of the first sub-channel and the destination address identifier.
[0046] Optionally, the second ADD_ADDR option includes a correspondence between a destination IP address and a destination port of the first subchannel and a destination address identifier of the first subchannel.
[0047] Optionally, the third TCP message may be a TCP data message or a TCP control message.
[0048] Optionally, the message header of the third TCP message may include a second ADD_ADDR option.
[0049] In a second aspect, a method for notifying a fault is provided, including: a second device receives a first transmission control protocol TCP message sent by a first device through a second sub-channel, the first TCP message includes a first TCP option, the first TCP option is used to indicate a failure of the first sub-channel, the first sub-channel and the second sub-channel are sub-channels corresponding to a first multipath transmission control protocol MPTCP session; the second device determines the failure of the first sub-channel based on the first TCP option.
[0050] In the above scheme, the first device sends a first TCP message carrying a first TCP option to the second device through a second sub-channel under the same MPTCP session. The second device can determine the failure of the first sub-channel based on the first TCP option, so that effective means can be taken to resolve the failure. For example, the data of the first sub-channel can be switched to other non-faulty sub-channels, or a new sub-channel can be established to divert the data of the first sub-channel. In this way, the transmission efficiency can be improved, which helps to improve the transmission performance.
[0051] In some possible implementations, the first TCP option includes a first field, a second field, and a third field, the first field is used to carry a source address identifier of the first subchannel, the second field is used to carry a destination address identifier of the first subchannel, and a first value of the third field is used to indicate a first subchannel failure identified by the source address identifier carried by the first field and the destination address identifier carried by the second field;
[0052] The second device determines the first subchannel failure according to the first TCP option, including:
[0053] The second device determines, according to the first value of the third field, that a first subchannel identified by the source address identifier carried by the first field and the destination address identifier carried by the second field is faulty.
[0054] In some possible implementations, the first TCP option includes a fourth field, and the second value of the fourth field is used to indicate a cause of the first subchannel failure;
[0055] The method further comprises:
[0056] The second device determines a cause of the first subchannel failure according to a second value of the fourth field;
[0057] The second device determines a strategy for resolving the first sub-channel failure according to a cause of the first sub-channel failure.
[0058] In some possible implementations, the first TCP option includes a fifth field, where the fifth field is used to carry an identifier of a failed third device, and the method further includes:
[0059] The second device determines that the third device fails according to the identifier of the third device carried by the fifth field.
[0060] In some possible implementations, the first TCP option further includes a sixth field, and a third value of the sixth field is used to indicate that the fifth field exists; before the second device determines that the third device has a fault according to the identifier of the third device carried by the fifth field, the method further includes:
[0061] The second device determines that the fifth field exists according to the third value of the sixth field.
[0062] In some possible implementations, the first TCP option further includes a seventh field, and the seventh field is used to carry a protocol version of the third device;
[0063] The method also includes: the second device parsing the identifier of the third device carried by the fifth field according to the protocol version of the third device carried by the seventh field.
[0064] In some possible implementations, the first TCP option further includes an eighth field, a fourth value of the eighth field is used to indicate that the first subchannel failure is a transient failure, and a fifth value of the eighth field is used to indicate that the first subchannel failure is a non-transient failure; and the method further includes:
[0065] The second device determines whether the first subchannel is a transient fault or a non-transient fault according to the fourth value or the fifth value of the eighth field.
[0066] In some possible implementations, before the second device receives the first TCP message sent by the first device through the second subchannel, the method further includes:
[0067] The second device sends a second TCP message to the first device, the second TCP message includes a first announcement address option, and the first ADD_ADDR option includes a correspondence between a source network protocol IP address of the first sub-channel and a source address identifier of the first sub-channel.
[0068] In some possible implementations, before the second device receives the first TCP message sent by the first device through the second subchannel, the method further includes:
[0069] The second device receives a third TCP message sent by the first device, where the third TCP message includes the second ADD_ADDR option, and the second ADD_ADDR option includes a correspondence between a target network protocol IP address of the first sub-channel and a target address identifier of the first sub-channel.
[0070] In a third aspect, the present application provides a device, which is included in an electronic device, and the device has the function of realizing the above-mentioned aspects and the behavior of the electronic device in the possible implementation methods of the above-mentioned aspects. The function can be implemented by hardware, or by hardware executing the corresponding software implementation. The hardware or software includes one or more modules or units corresponding to the above-mentioned functions. For example, a display module or unit, a detection module or unit, a processing module or unit, etc.
[0071] Optionally, the device may be the client or the server mentioned above.
[0072] In a fourth aspect, the present application provides an electronic device, comprising: one or more processors; a memory; a plurality of applications; and one or more computer programs. The one or more computer programs are stored in the memory, and the one or more computer programs include instructions. When the instructions are executed by the electronic device, the electronic device executes the method for notifying a fault in any possible implementation of any of the above aspects.
[0073] Optionally, the electronic device may further include: a touch display screen and / or a camera, wherein the touch display screen includes a touch-sensitive surface and a display;
[0074] Optionally, the electronic device may be the client or the server mentioned above.
[0075] In a fifth aspect, the present application provides an electronic device, comprising one or more processors and one or more memories. The one or more memories are coupled to the one or more processors, and the one or more memories are used to store computer program codes, and the computer program codes include computer instructions, and when the one or more processors execute the computer instructions, the electronic device executes the method for notifying a fault in any possible implementation of any of the above aspects.
[0076] In a sixth aspect, the present application provides a computer-readable storage medium, including computer instructions, which, when executed on an electronic device, enables the electronic device to execute any possible method of notifying a fault in any of the above aspects.
[0077] In a seventh aspect, the present application provides a computer program product, which, when executed on an electronic device, enables the electronic device to execute any possible method of notifying a fault in any of the above aspects. BRIEF DESCRIPTION OF THE DRAWINGS
[0078] Figure 1 It is a system framework diagram provided in an embodiment of the present application.
[0079] Figure 2 It is a schematic block diagram of an electronic device provided in an embodiment of the present application.
[0080] Figure 3 It is a schematic diagram of a method for notifying a fault provided in an embodiment of the present application.
[0081] Figure 4 It is a schematic diagram of the format of the ICMP error report message provided in the embodiment of the present application.
[0082] Figure 5 This is a format diagram of the first TCP option provided in an embodiment of the present application.
[0083] Figure 6 This is a format diagram of another first TCP option provided in an embodiment of the present application.
[0084] Figure 7 This is a format diagram of another first TCP option provided in an embodiment of the present application.
[0085] Figure 8 This is a format diagram of another first TCP option provided in an embodiment of the present application.
[0086] Fig. 9 It is a schematic diagram of a fault scenario provided in an embodiment of the present application.
[0087] Fig.10 It is a schematic diagram of another method for notifying a fault provided in an embodiment of the present application.
[0088] Fig.11 This is a format diagram of another first TCP option provided in an embodiment of the present application.
[0089] Fig.12 This is a format diagram of another first TCP option provided in an embodiment of the present application. DETAILED DESCRIPTION
[0090] The technical solutions in the embodiments of the present application will be described below in conjunction with the drawings in the embodiments of the present application.
[0091] MPTCP transmission can make full use of bandwidth resources and schedule data traffic transmission on multiple paths, thereby controlling congestion. MPTCP can also solve the problem of retransmission. Figure 1 The MPTCP transmission system framework diagram provided by the embodiment of the present application is shown. The client and the server can establish a substream through a three-way handshake, and multiple substreams can be established by analogy. The server and the client can transmit TCP messages by establishing multiple substreams, and the server and the client can close the substream through a four-way handshake. Among them, if the server sends a TCP message to the client, the server can be called the sender and the client is called the receiver; if the client sends a TCP message to the server, the client is called the sender and the server is called the receiver.
[0092] The client may refer to user equipment (UE), access terminal, user unit, user station, mobile station, mobile station, remote station, remote terminal, mobile device, user terminal, terminal, wireless communication device, user agent or user device. For example, the terminal device may be a mobile phone, a tablet computer, a computer with transceiver function, a virtual reality (VR) terminal device, an augmented reality (AR) terminal device, a wireless terminal in industrial control, a wireless terminal in self driving, a wireless terminal in remote medical, a wireless terminal in smart grid, a wireless terminal in transportation safety, a wireless terminal in smart city, a wireless terminal in smart home, a wearable device, a vehicle-mounted device, etc.
[0093] The server side, which can also be called a server, can serve the client side. The server side can provide resources to the client side and save client data, etc.
[0094] For example, Figure 2 2 is a schematic diagram of a structure of an electronic device 200 provided in an embodiment of the present application. The electronic device 200 may be a client or a server, and the electronic device 200 may include a processor 210, a memory 220, a communication module 230, and the like.
[0095] The processor 210 may include one or more processing units, and the memory 220 is used to store program codes and data. In the embodiment of the present application, the processor 210 may execute computer-executable instructions stored in the memory 220 to control and manage the actions of the electronic device 200.
[0096] The communication module 230 can be used for communication between various internal modules of the electronic device 200, or communication between the electronic device 200 and other external electronic devices. Exemplarily, if the electronic device 200 communicates with other electronic devices via a wired connection, the communication module 230 may include an interface, such as a USB interface. The USB interface may be an interface that complies with USB standard specifications, specifically a Mini USB interface, a Micro USB interface, a USB Type C interface, etc. The USB interface can be used to connect a charger to charge the electronic device 200, and can also be used to transfer data between the electronic device 200 and peripheral devices. It can also be used to connect headphones to play audio through the headphones. The interface can also be used to connect other electronic devices, such as AR devices.
[0097] Alternatively, the communication module 230 may include audio devices, radio frequency circuits, Bluetooth chips, wireless fidelity (Wi-Fi) chips, near-field communication (NFC) modules, etc., and can achieve interaction between the electronic device 300 and other electronic devices in a variety of different ways.
[0098] Optionally, the electronic device 200 may further include a display screen 240 , which may display images or videos in a human-computer interaction interface.
[0099] Optionally, the electronic device 200 may further include a peripheral device 250 , such as a mouse, a keyboard, a speaker, a microphone, etc.
[0100] It should be understood that, in addition to Figure 2 In addition to the various components or modules listed in the figure, the embodiment of the present application does not specifically limit the structure of the electronic device 200. In other embodiments of the present application, the electronic device 200 may also include more or fewer components than shown in the figure, or combine some components, or split some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.
[0101] The multiple subchannels established by the client and the server are bound to an existing MPTCP session. The TCP packets corresponding to the MPTCP session can be transmitted through any one or more subchannels. When the client or the server perceives that a subchannel has a fault, it is necessary to solve the fault or divert the data on the faulty subchannel to other subchannels for transmission to avoid the loss of TCP packets. For example, the sender can actively notify the receiver to disconnect the subchannel. In this case, the sender can first send the subchannel information to the receiver, and then the subchannel is disconnected. In other words, the sender can control the disconnection time of the subchannel and take timely solutions before the subchannel is disconnected, such as diverting the data on the subchannel to other subchannels, thereby avoiding the loss of TCP packets. When a subchannel fails, taking the client as the sender and the server as the receiver as an example, the fault includes: a fault in an intermediate device for transmitting TCP packets (the intermediate device is a device between the client and the server) or a network fault or a network port fault or a link fault. These faults cannot be predicted and the time of occurrence of the fault is relatively random. If these faults occur, the client cannot transmit the fault information to the server on the faulty sub-channel, resulting in the server being unable to obtain the fault information of the sub-channel and unable to take effective measures to solve the fault in a timely manner, which will cause transmission failure or delay in transmission, thereby affecting transmission performance.
[0102] The terms used in the embodiments of the present application are explained below.
[0103] 1. Subchannel: A subchannel can also be called a substream or a sublink. A subchannel is a bidirectional channel. One substream corresponds to one TCP connection. The client and the server can establish a substream through a three-way handshake. The client and the server can terminate a substream through a four-way handshake. A subchannel can be identified by a five-tuple of source IP address, destination IP address, source port, destination port, and protocol type.
[0104] 2. Source address identification (identity, ID) and destination address identification. The source IP address and / or source port can be mapped to the source address identification, and the destination IP address and / or destination port can be mapped to the destination address identification. In other words, there is a corresponding relationship between the source IP address and / or source port and the source address identification, and there is a corresponding relationship between the destination IP address and / or destination port and the destination address identification. In the embodiments of the present application, the source address identification (source IP address and / or source port) and the destination address identification (destination IP address and / or destination port) have relative concepts. For example, if the client sends a TCP message to the server, with the client as a reference, the source IP address is the IP address of the client, the source port is the port of the client, and accordingly, the source address identification is the ID of the client, the destination IP address is the IP address of the server, the destination port is the IP address of the server, and accordingly, the destination address identification is the ID of the server. For another example, if the server sends a TCP message to the client, with the server as a reference, the source IP is the IP address of the server, the source port is the port of the server, and accordingly, the source address identifier is the ID of the server, the destination IP address is the IP address of the client, the destination port is the IP address of the client, and accordingly, the destination address identifier is the ID of the client. The source address IP mentioned in the embodiment of the present application can be a public network address IP or a private network address IP; the destination address IP mentioned in the embodiment of the present application can be a public network address IP or a private network address IP.
[0105] 3. MPTCP session. An MPTCP session corresponds to multiple sub-channels. That is, the client and the server can transmit the data traffic of an MPTCP session through multiple sub-channels. The data traffic of an MPTCP session is also called the TCP message of the MPTCP session.
[0106] 4. TCP option. The TCP message header includes TCP options. A TCP option has a specific physical meaning. In the embodiment of the present application, the TCP option that the server can send to the client is the first TCP option. The first TCP option is used to notify the sub-channel failure.
[0107] 5. ADD-ADDR option. The ADD-ADDR option is used to announce the address. The ADD-ADDR option also belongs to the TCP option. The TCP message header can include the ADD-ADDR option.
[0108] 6. TCP message. TCP messages include TCP data messages and TCP control messages. TCP data messages are used to transmit user data. For example, TCP control messages can be response messages for TCP data messages, TCP control messages can also be TCP keep-alive messages, and TCP control messages can also be response messages for establishing connection requests.
[0109] Combine the following Figure 3 Describe the method 300 for notifying a fault provided in an embodiment of the present application. Method 300 takes the example of a client sending a first TCP message carrying a first TCP option to a server. Of course, the server can also send a first TCP message carrying a first TCP option to the client. In order to avoid repetition, the embodiment of the present application does not describe this in detail.
[0110] S310, the client sends a second TCP message to the server, the second TCP message includes a first ADD_ADDR option, the first ADD_ADDR option includes the correspondence between the source address identifier of the first subchannel and the source Internet protocol (IP) address of the first subchannel, at this time, the first subchannel uses the client as a reference.
[0111] Optionally, the second TCP message may be a TCP data message or a TCP control message.
[0112] Optionally, the client may send a second TCP message to the server during the process of establishing any sub-channel, and the second TCP message is a TCP control message.
[0113] Optionally, the client can send a second TCP message to the server through the established third sub-channel. In this case, the second TCP message can be a TCP control message, such as a keep-alive message or a response message of a TCP data message, or the second TCP message can be a TCP data message, such as a TCP data message of a certain application.
[0114] It is understandable that method 300 is described by taking one sub-channel as an example, and the client notifies the correspondence between the source address identifier and the source IP address of the first sub-channel through the third sub-channel. For multiple sub-channels established by the server and the client, the client can notify the correspondence between the source address identifier and the source IP address of other sub-channels or its own sub-channel through one or more established sub-channels. For example, the server and the client establish two sub-channels, namely sub-channel 1 and sub-channel 2. The client can send the correspondence between the source address identifier and the source IP address of sub-channel 2 and / or sub-channel 1 through sub-channel 1; or the client can send the correspondence between the source address identifier and the source IP address of sub-channel 1 and / or sub-channel 2 through sub-channel 2. Therefore, in the embodiment of the present application, it is not limited to which sub-channel notifies the correspondence between the source address identifier and the source IP address of a sub-channel.
[0115] Optionally, in an embodiment of the present application, the client may send the corresponding relationship between the source address identifier of the first sub-channel and the source IP address to the server through any established sub-channel as an example. In fact, the corresponding relationship between the source address identifier and the source IP address is only for the server to identify the source IP address of the first sub-channel. The client may also send the source IP address of the first sub-channel to the server through any established sub-channel without sending the corresponding relationship between the source address identifier of the first sub-channel and the source IP address.
[0116] Optionally, in the embodiment of the present application, the client may also send the corresponding relationship between the source address identifier and the source port of the first sub-channel to the server through any established sub-channel, or send the corresponding relationship between the source address identifier of the first sub-channel and the source port and the source IP address. In other words, if the source IP address can uniquely identify the source address information of the first sub-channel, the client sends the corresponding relationship between the source address identifier of the first sub-channel and the source IP address to the server; if the source port can uniquely identify the source address information of the first sub-channel, the client sends the corresponding relationship between the source address identifier of the first sub-channel and the source port to the server; if neither the source IP address nor the source port can uniquely identify the source address information of the first sub-channel, the client sends the corresponding relationship between the source address identifier of the first sub-channel and the source port and the source IP address to the server.
[0117] The client and the server may also save the correspondence between the source address identifier of the first sub-channel and the source IP of the first sub-channel, or save the correspondence between the source address identifier of the first sub-channel and the source port of the first sub-channel, or save the correspondence between the source address identifier of the first sub-channel and the source port of the first sub-channel and the source IP address of the first sub-channel.
[0118] S320, the server sends a third TCP message to the client, the third TCP message includes a second ADD_ADDR option, and the second ADD_ADDR option includes a correspondence between the destination address identifier of the first subchannel and the destination IP address of the first subchannel. The client and the server can save the correspondence between the destination IP address of the first subchannel and the destination address identifier. At this time, the first subchannel uses the client as a reference.
[0119] Optionally, the third TCP message may be a TCP data message or a TCP control message.
[0120] Optionally, the server may send a third TCP message to the client during the process of establishing any sub-channel, and the third TCP message is a TCP control message.
[0121] Optionally, the server may send a third TCP message to the client through the established fourth sub-channel. In this case, the third TCP message may be a TCP control message, such as a keep-alive message or a response message of a TCP data message, or the third TCP message may be a TCP data message, such as a TCP data message of a certain application.
[0122] It is understandable that method 300 is described only by taking one sub-channel as an example, and the server notifies the correspondence between the destination address identifier and the destination IP address of the first sub-channel through the fourth sub-channel. For multiple sub-channels established by the server and the client, the server can notify the correspondence between the destination address identifier and the destination IP address of other sub-channels or its own sub-channels through one or more established sub-channels. For example, the server and the client have established two sub-channels, namely sub-channel 3 and sub-channel 4. The server can send the correspondence between the destination address identifier and the destination IP address of sub-channel 3 and / or sub-channel 4 through sub-channel 3; or the server can send the correspondence between the destination address identifier and the destination IP address of sub-channel 3 and / or sub-channel 4 through sub-channel 4. Therefore, in the embodiment of the present application, it is not limited to which sub-channel notifies the correspondence between the destination address identifier and the destination IP address of a certain sub-channel.
[0123] Optionally, in an embodiment of the present application, the server may send the correspondence between the destination address identifier of the first sub-channel and the destination IP address to the client through any established sub-channel as an example. In fact, the correspondence between the destination address identifier and the destination IP address is only for the server to identify the destination IP address of the first sub-channel. The server may also send the destination IP address of the first sub-channel to the client through any established sub-channel without sending the correspondence between the destination address identifier of the first sub-channel and the destination IP address.
[0124] Optionally, in the embodiment of the present application, the server can also send the correspondence between the destination address identifier of the first sub-channel and the destination port to the client through any established sub-channel, or send the correspondence between the destination address identifier of the first sub-channel and the destination port and the destination IP address. In other words, if the destination IP address can uniquely identify the destination address information of the first sub-channel, the server sends the correspondence between the destination address identifier of the first sub-channel and the destination IP address to the client; if the destination port can uniquely identify the destination address information of the first sub-channel, the server sends the correspondence between the destination address identifier of the first sub-channel and the destination port to the client; if neither the destination IP address nor the destination port can uniquely identify the destination address information of the first sub-channel, the server sends the correspondence between the destination address identifier of the first sub-channel and the destination port and the destination IP address to the client.
[0125] The client and the server may also save the correspondence between the destination address identifier of the first sub-channel and the destination IP address of the first sub-channel, or save the correspondence between the destination address identifier of the first sub-channel and the destination port of the first sub-channel, or save the correspondence between the destination address identifier of the first sub-channel and the destination port of the first sub-channel and the destination IP address of the first sub-channel.
[0126] Optionally, the third sub-channel and the fourth sub-channel may be the same sub-channel or different sub-channels.
[0127] It should be noted that the order between S310 and S320 is not limited, and S310 can be performed before, after, or simultaneously with S320, and this application does not limit this.
[0128] It should also be noted that the client and the server may perform S330-S370 multiple times after performing S310 and S320 once. In other words, in the embodiment of the present application, the client and the server may notify the address information about the first sub-channel once.
[0129] S330: The client determines that the first sub-channel fails, or the client determines that the first sub-channel fails and the cause of the first sub-channel failure.
[0130] The client can determine the failure of the first subchannel by at least one of the following methods:
[0131] In the first method, the client can determine the local fault of the client, which may cause the first sub-channel fault, for example, the first sub-channel fault may be caused by a local device such as a local network port, a local network card, or a local processing protocol process related to the first sub-channel. In this way, the client can also determine the cause of the fault.
[0132] Method 2: The client can actively detect faults based on detection tasks. For example, the client can use the bidirectional forwarding detection mechanism (bidirectional forwarding detection, BFD) to deploy detection tasks to detect whether the first sub-channel is faulty. The client can determine the cause of the fault based on the detection results returned to the client. For another example, the client can send an ICMP request message to the server through the first sub-channel. The client can determine whether the first sub-channel is faulty based on whether a response message to the ICMP request message is received within a preset time. Specifically, if the client does not receive a response message within the preset time, it can be determined that the first sub-channel is faulty.
[0133] Method three: The client can passively detect the fault. For example, the client sends a TCP datagram to the server through the first subchannel. When the TCP datagram is sent to a certain device, the device fails. The client receives an Internet Control Message Protocol (ICMP) error report message returned by the device. The ICMP error report message can indicate the failure of the first subchannel. For example, the format of the ICMP error report message is as follows: Figure 4 As shown, Figure 4 The physical meaning of the ICMP error report message is different depending on the value of the type segment and code segment shown. The protocol can specify Figure 4 The specific value of the type field and the specific value of the code segment shown indicate that the ICMP error report message is a message in which the intermediate device feeds back the fault to the client and the cause of the first subchannel fault. In this way, the client can determine the first subchannel fault and the cause of the first subchannel fault according to the value of the type field and the value of the code segment of the ICMP error report message.
[0134] It should be noted that Figure 4 The source IP address is the IP address of the faulty device, and the destination IP address is the IP address of the client. The faulty device can be an intermediate device between the client and the server, in which case the source IP address is the source IP address of the intermediate device; of course, the faulty device can also be a server, in which case the source IP address is the IP address of the server.
[0135] It can be understood that the client sends a TCP data packet to the server on the current first sub-channel. When the TCP data packet reaches any device in the middle, even if the device may be the server, due to the failure of the device, the TCP data packet cannot be sent to the server. The device can intercept a partial fragment of the data part of the TCP data packet and send it to the client as the data part of the ICMP error report message. After the client receives the data part of the ICMP error report message, it determines that the first sub-channel fails according to the type field and code field of the ICMP error report message, and the TCP data packet including the data part of the ICMP fails to send.
[0136] Optionally, some faults of the first sub-channel are instantaneous faults, some faults are non-instantaneous faults, and some faults may be both instantaneous faults and non-instantaneous faults. In an embodiment of the present application, the client can determine whether the first sub-channel fault is an instantaneous fault or a non-instantaneous fault while determining the first sub-channel fault in any way. For example, if the first sub-channel fault is caused by a physical network port failure or a network card failure in one of the above methods, then the fault of the first sub-channel is a non-instantaneous fault; for another example, the client can count a small amount of network card packet loss sent through the first sub-channel within a preset period, but the network card is normal, then the fault of the first sub-channel is an instantaneous fault; for another example, in the above method three, it can be determined whether the fault of the first sub-channel is an instantaneous fault or a non-instantaneous fault based on the type segment and code end in the ICMP error report message.
[0137] It should be noted that the order of S330, S310 and S320 is not limited. S330 may be before or after S310 and / or S320.
[0138] S340: The client generates a first TCP option.
[0139] Specifically, the client determines in S330 that the first subchannel fails, and generates a first TCP option according to the failure information of the first subchannel.
[0140] The following discusses the format of the first TCP option in four cases:
[0141] In case one, the source IP address and the destination IP address can uniquely identify the faulty first sub-channel, but since the source IP address and the destination IP address occupy a large number of bytes, the client can determine the source address identifier carried by the first field based on the correspondence between the source IP address of the first sub-channel and the source address identifier of the first sub-channel saved by itself, and the client can determine the destination address identifier carried by the second field based on the correspondence between the destination IP address of the first sub-channel and the destination address identifier of the first sub-channel saved in S330. At this time, in a possible design, the first TCP option includes a first sub-segment, a second field, and a third field, the first field carries the source address identifier for the first sub-channel, the second field is used to carry the destination address identifier of the first sub-channel, and the first value of the third field is used to indicate the fault of the first sub-channel identified by the source address identifier carried by the first field and the destination address identifier carried by the second field.
[0142] For example, Figure 5As shown in the figure, the category (Kind) represents the category of the first TCP option, the category is fixed to 30, and 30 indicates that the first TCP option is a TCP option of MPTCP; the length (Length) is the length of the first TCP option, such as the total length can be 4 bytes; the subtype indicates that the first TCP option is a fault announcement option (fault announce option), that is, the third field of the subtype is used to indicate the first subchannel fault identified by the source address identifier carried by the first field and the destination address identifier carried by the second field, and the value of the third field can be a value specified by the protocol, which can be specified according to the protocol, and the embodiment of the present application does not limit this; as Figure 5 The source address identifier carried by the first field and the destination address identifier carried by the second field can uniquely identify the first subchannel.
[0143] For example, the first field may be referred to as a source address identifier (SrcAddressID) field, and the second field may be referred to as a destination address identifier (DestAddressID) field.
[0144] Case 2: In another possible design, the first TCP option includes the fields in addition to those in Case 1, such as Figure 6 As shown, the first TCP option may further include a fourth field, and the second value of the fourth field is used to indicate the cause of the first subchannel failure. Specifically, when the client determines the first subchannel failure in S330, if the cause of the first subchannel failure can be determined, the cause of the first subchannel failure can be carried in the fourth field of the first TCP option.
[0145] For example, for mode three of S330, the client may map the cause of the first subchannel failure indicated by the type segment and the code segment of the ICMP error report message to the second value of the fourth field of the first TCP option.
[0146] It is understandable that the protocol may specify that different values of the fourth field represent different causes of the first subchannel failure, and both the server and the client can learn that different values of the fourth field represent different causes of the first subchannel failure.For example, a value of 0 in the fourth field indicates that the sender (the sender is the client in method 300) has insufficient resources (lack of resources) and cannot support sending TCP data packets on the first subchannel; a value of 1 in the fourth field indicates that the sender's policy prohibits (administratively prohibited) sending TCP data packets on the first subchannel; a value of 2 in the fourth field indicates that there are too many TCP data packets (too many already acknowledged data) to be transmitted on the first subchannel, and the client has not received a response message for the TCP data packet on the first subchannel, but the client has received a response message for the TCP data packet on the first subchannel on other subchannels; a value of 3 in the fourth field indicates that compared with other subchannels of an MPTCP session, the transmission performance of the first subchannel is too poor (unacceptable performance); a value of 4 in the fourth field indicates that the lifetime of the first subchannel has expired (unacceptable performance); a value of 5 in the fourth field indicates that the client has deleted the source address information and destination address information of the first subchannel (removed The fourth field has a value of 6, indicating that there is interference (middlebox interference) in the first subchannel middlebox (also called intermediate device); the fourth field has a value of 7, indicating that an error is detected when processing a TCP option on the first subchannel (multipath TCP specific error); the fourth field has a value of 8, indicating that a reset field has been sent in response to the MP_FASTCLOSE option (fast close); the fourth field has a value of 9, indicating that an unknown error (unspecified TCP error) is detected on the first subchannel. The value of the fourth field is 10, which indicates that the network is unreachable due to a network failure. The value of the fourth field is 11, which indicates that the server is unreachable. The value of the fourth field is 12, which indicates that the client routing has failed. The value of the fourth field is 13, which indicates server suppression, that is, because the speed at which the server receives TCP messages is greater than the speed at which the server processes TCP messages, resulting in a large backlog of TCP messages on the server, the server can send an ICMP error report message to the client. The type segment and code segment in the ICMP error report message instruct the client to reduce the speed of sending TCP messages. The client determines that the value of the fourth field is 13 based on the type segment and code segment in the ICMP error report message. The value of the fourth field is 14, which indicates that the time to live (TTL) is 0, and an IP loop may occur. A new fault can be defined when the value of the fourth field is 15 or above.
[0147] Case 3: In another possible design, the first TCP option includes the fields in addition to those in case 1 or case 2, such as Figure 7 As shown, the first TCP option may also include a fifth field for carrying an identifier of a faulty device (such as a third device) and a sixth subfield A for indicating the existence of the fifth field. In this case, when any intermediate device or even the server fails, the ICMP error report message in method three of S330 is fed back. The client determines that the device is faulty based on the device indicated by the source IP address in the message header of the ICMP error report message, and the client carries the identifier of the faulty device in the fifth field, and uses the third value of the sixth field to indicate the existence of the fifth field.
[0148] For example, the fifth field may be referred to as a middlebox IP or an intermediate device IP field.
[0149] Optionally, in case three, a seventh field may also be included, and the seventh field is used to indicate the IP protocol version of the faulty device identified by the identifier of the faulty device carried by the fifth field, for example, the protocol version is IPv4 or IPv6, and different values of the seventh field represent different protocol versions.
[0150] It should be understood that, in the description of situation three, one field is used to indicate the protocol version. Of course, more than two fields can also be used to indicate the IP protocol version of the faulty device, and this application is not limited to this.
[0151] It should be noted that Figure 7 The first TCP option includes the fourth field, that is, case three adds the fifth field and the sixth field on the basis of case two. If the first TCP option does not include the fourth field, that is, case three adds the fifth field and the sixth field on the basis of case one.
[0152] Case 4: In another possible design, the first TCP option includes the fields in addition to those in case 1, case 2, or case 3, such as Figure 8 As shown, the first TCP option may also include an eighth field T for indicating whether the first subchannel failure is a transient failure or a non-transient failure. Specifically, the client determines whether the first subchannel failure is a transient failure or a non-transient failure according to S340, and the client may use different values of the eighth field to indicate whether the first subchannel failure is a transient failure or a non-transient failure. For example, the fourth value of the eighth field is 1, indicating that the first subchannel is a transient failure, and the fifth value of the eighth field is 0, indicating that the first subchannel is a non-transient failure. Non-transient failures may include permanent failures and long-term failures, etc.
[0153] It should be understood that, in the description of situation four, one field is used to indicate whether it is a transient fault or a non-transient fault. Of course, two different fields can also be used to indicate whether the first subchannel is a transient fault or a non-transient fault, and this application is not limited thereto.
[0154] It should be noted that Figure 8 The various fields shown are for understanding only. Figure 8 The first TCP option does not include the fourth field, the fifth field, the sixth field and the seventh field, that is, case four adds the eighth field on the basis of case one; if the first TCP option includes the fourth field but does not include the fifth field, the sixth field and the seventh field, that is, case four adds the eighth field on the basis of case two; if the first TCP option includes the fourth field, the fifth field, the sixth field and the seventh field, that is, case four adds the eighth field on the basis of case three.
[0155] S350, the client sends a first TCP message to the server through the second sub-channel, and the server receives the first TCP message sent by the client. The message header of the first TCP message includes a first TCP option, and the first TCP option is used to indicate a first sub-channel failure.
[0156] Optionally, the first TCP message may be a TCP data message or a TCP control message, which is not limited in this application.
[0157] The first subchannel and the second subchannel are two subchannels corresponding to the first MPTCP session.
[0158] S360: The server determines that the first sub-channel fails according to the first TCP option in the first TCP message.
[0159] Specifically, the server determines the failure of the first subchannel according to each field of the first TCP option. If the first TCP option is in the format of case 1 in S340, the server parses the first field, the second field, and the third field in the first TCP option, and the server obtains the source address identifier carried by the first field and the destination address identifier carried by the second field. The server determines the failure of the first subchannel according to the source address identifier carried by the first field and the destination address identifier carried by the second field. The server determines the failure of the first subchannel according to the first value of the third field.
[0160] The following discusses how the server determines the first sub-channel according to the source address identifier carried by the first field and the destination address identifier carried by the second field in three cases.
[0161] Case 1: If the server saves the correspondence between the source address identifier and the source IP address of the first sub-channel in S310, and the server saves the correspondence between the destination address identifier and the destination IP address of the first sub-channel in S320, the server determines the source IP address of the first sub-channel according to the saved correspondence between the source address identifier and the source IP address of the first sub-channel. The server determines the destination IP address of the first sub-channel according to the correspondence between the destination address identifier and the target IP address of the first sub-channel. The server determines the first sub-channel according to the source IP address and the destination IP address.
[0162] Case 2: If the server saves the correspondence between the source address identifier and source port of the first subchannel and the destination IP address of the first subchannel in S310, and the server saves the correspondence between the destination address identifier and destination port of the first subchannel in S320, the server determines the source port of the first subchannel according to the saved correspondence between the source address identifier and source port of the first subchannel. The server determines the destination port of the first subchannel according to the correspondence between the destination address identifier and target port of the first subchannel. The server determines the first subchannel according to the source port and the destination port.
[0163] Case 3: If the server saves the correspondence between the source address identifier of the first sub-channel and the source port and source IP address in S310, and the server saves the correspondence between the destination address identifier of the first sub-channel and the destination port and destination IP address in S320, the server determines the source port and source IP address of the first sub-channel according to the saved correspondence between the source address identifier of the first sub-channel and the source port and source IP address. The server determines the destination port and destination IP address of the first sub-channel according to the correspondence between the destination address identifier of the first sub-channel and the destination port and destination IP address. The server determines the first sub-channel according to the source port, source IP address, destination port and destination IP address.
[0164] S370: The server assists in resolving the failure of the first sub-channel.
[0165] In a possible implementation, if the server determines according to S360 that the first sub-channel fails, the server may notify the client to establish a new sub-channel or switch the data on the current sub-channel to another sub-channel for transmission.
[0166] In a possible implementation, while the server can notify the client to establish a new sub-channel or switch the data on the current sub-channel to other sub-channels for transmission, if the first TCP option is in the format of case 2 in S340, the server parses the fourth field in the first TCP option, obtains the value of the fourth field, and determines the cause of the first sub-channel failure based on the value of the fourth field. The server can take corresponding measures to solve the failure according to the cause of the first sub-channel failure. Different causes of failure may also have different solutions. For example, the server can issue a prompt warning message to indicate the failure of the first sub-channel and the cause of the failure, so that the operation and maintenance personnel can repair the failure in time.
[0167] In a possible implementation, while the server can notify the client to establish a new subchannel or switch the data on the current subchannel to other subchannels for transmission, if the first TCP option is in the format of case three in S340, the server parses whether the sixth field A in the first TCP option is the third value, and if the sixth field A is the third value, it means that the fifth field also exists. The server parses the identifier of the faulty device carried by the fifth field. The server determines that the device identified by the identifier of the faulty device has a fault, resulting in the failure of the first subchannel.
[0168] In method 300, only one client is taken as an example. The server receives the fifth field and the sixth field included in the TCP option sent by each client from a preset number of clients to the server, and the fifth field in the TCP option sent by each client carries the identifier of the same device. Then the server can determine that the device identified by the identifier of the device carried by the fifth field is faulty. The server can notify the client that sent the TCP option to switch the data to be transmitted on the first subchannel to other subchannels. At the same time, the server can send a prompt warning message to the operation and maintenance personnel. The prompt warning message can indicate the faulty device and the cause of the fault. The operation and maintenance personnel locate the faulty device and repair the fault in time according to the cause of the fault.
[0169] In one possible implementation, while the server can notify the client to establish a new sub-channel or switch the data on the current sub-channel to other sub-channels for transmission, if the first TCP option in situation three in S340 also includes the seventh field, the server can also determine the IP protocol version of the faulty device based on the seventh field, and parse the fifth field carrying the identifier of the faulty device according to the protocol version of the faulty device. Faulty devices with different protocol versions have different identifiers.
[0170] It can be understood that in the embodiment of the present application, the first TCP option may not include the sixth field and / or the seventh field. If the first TCP option does not include the sixth field and / or the seventh field, the client can determine whether there is a fifth field and a seventh field based on the value of the length field of the first TCP option.
[0171] In one possible implementation, while the server can notify the client to establish a new sub-channel or switch the data on the current sub-channel to other sub-channels for transmission, if the first TCP option is in the format of situation four in S340, the server parses the eighth field T in the first TCP option, and the server determines whether the first sub-channel is a transient fault or a non-transient fault based on the fourth value or the fifth value of the eighth field. If the server determines that the first sub-channel is a transient fault based on the fourth value of the eighth field, the server can attempt to continue to establish the first sub-channel; if the server determines that the first sub-channel is a non-transient fault based on the fifth value of the eighth field, the server attempts to establish other sub-channels or attempts to transmit TCP data packets on other established sub-channels.
[0172] Optionally, if the server determines that the first subchannel has a non-instantaneous fault according to the fifth value of the eighth field, the server may delete relevant configuration information of the first subchannel to release resources.
[0173] To better illustrate the method 300, Figures 9 to 12 Give an example description, such as Fig. 9 As shown, client 1 and client 2 support MPTCP transmission and can also send TCP options to the server. Client 1 and client 2 can be located in different cells or even in different cities. Client 1 and client 2 can access the server through Internet service provider (ISP) 1 or ISP2. The following description takes the correspondence between the source address identifier and the source IP, and the correspondence between the destination address identifier and the destination IP as an example. The correspondence between the source address identifier and the source port, and the correspondence between the destination address identifier and the destination port are similar. To avoid repetition, no detailed examples are given. Fig.10 As shown, method 1000 includes:
[0174] S1001, client 1 establishes MPTCP session 1 with server 1, and establishes<IP1,IP3> and<IP2,IP4> Two sub-channels.
[0175] Optionally, client 1 can establish a subchannel<IP1,IP3> During the process, you can use the subchannel<IP1,IP3> The corresponding relationship between the source address identifier and the source IP address is sent to the server through ADD_ADDR option 1 (for example, ADD_ADDR option 2 can be the first ADD_ADDR option mentioned above), such as the subchannel<IP1,IP3> The corresponding relationship between the source address identifier and the source address IP is <10, IP1>, that is, 10 indicates the source address IP1. At this time, S1002 does not exist.
[0176] Optionally, client 1 can establish a subchannel<IP2,IP4> During the process, you can use the subchannel<IP2,IP4> The corresponding relationship between the source address identifier and the source IP address is sent to the server through ADD_ADDR option 2 (for example, ADD_ADDR option 2 can be the first ADD_ADDR option mentioned above), such as the subchannel<IP2,IP4> The corresponding relationship between the source address identifier and the source address IP is <20, IP2>, that is, 20 indicates the source address IP1. At this time, S1003 does not exist.
[0177] Optionally, client 1 can establish the first subchannel<IP1,IP3> The correspondence between the source address identifier and the source IP address and the subchannel<IP2,IP4> The correspondence between the source address identifier and the source IP address is sent to the server.
[0178] Optionally, the server can establish a subchannel<IP1,IP3> During the process, you can use the subchannel<IP1,IP3> The correspondence between the destination address identifier and the destination IP address is sent to the client 1 via ADD_ADDR option 3 (for example, ADD_ADDR option 3 may be the aforementioned second ADD_ADDR option), such as the subchannel<IP1,IP3> The corresponding relationship between the destination address identifier and the destination address IP is <30, IP3>, that is, 30 indicates the source address IP3. At this time, S1004 does not exist.
[0179] Optionally, the server can establish a subchannel<IP2,IP4> During the process, you can use the subchannel<IP2,IP4> The corresponding relationship between the destination address identifier and the destination IP address is sent to the client 1 through ADD_ADDR option 4 (for example, ADD_ADDR option 4 can be the aforementioned second ADD_ADDR option), such as the subchannel<IP2,IP4> The corresponding relationship between the destination address identifier and the destination address IP is <40, IP4>, that is, 40 indicates the source address IP4. At this time, S1005 does not exist.
[0180] Optionally, the server can establish the first subchannel<IP1,IP3> The correspondence between the destination address identifier and the destination IP address and the subchannel<IP2,IP4> The correspondence between the destination address identifier and the destination IP address is sent to client 1.
[0181] S1002, client 1 sends a TCP data message or a TCP control message to the server, the TCP data message or the TCP control message includes ADD_ADDR option 1, and ADD_ADDR option 1 includes a subchannel<IP1,IP3> The correspondence between the source address identifier and the source IP address.
[0182] S1003, client 1 sends a TCP data message or a TCP control message to the server, the TCP data message or the TCP control message includes ADD_ADDR option 2, and ADD_ADDR option 2 includes a subchannel<IP2,IP4> The correspondence between the source address identifier and the source IP address.
[0183] Optionally, in S1002 and S1003, the client 1 may send ADD_ADDR option 1 and ADD_ADDR option 2 to the server through the same TCP data packet.
[0184] Optionally, in S1002 and S1003, the client 1 may send ADD_ADDR option 1 and ADD_ADDR option 2 to the server through the same TCP control message.
[0185] It should be noted that the order relationship between S1002 and S1003 is not limited. S1002 is performed before, after, or simultaneously with S1003.
[0186] S1004, the server sends a TCP data message or a TCP control message to the client 1, the TCP data message or the TCP control message includes ADD_ADDR option 3, and ADD_ADDR option 3 includes a subchannel<IP1,IP3> The correspondence between the destination address identifier and the destination IP address.
[0187] S1005, the server sends a TCP data message or a TCP control message to the client 1, the TCP data message or the TCP control message includes ADD_ADDR option 4, and ADD_ADDR option 4 includes a subchannel<IP2,IP4> The correspondence between the destination address identifier and the destination IP address.
[0188] Optionally, in S1004 and S1005, the server may send ADD_ADDR option 3 and ADD_ADDR option 4 to the client 1 through the same TCP data packet.
[0189] Optionally, in S1004 and S1005, the server may send ADD_ADDR option 3 and ADD_ADDR option 4 to client 1 through the same TCP control message.
[0190] It should be noted that the order between S1004 and S1005 is not limited. S1004 and S1005 are performed before, after or simultaneously.
[0191] In the above steps, the server and client can save the subchannel<IP1,IP3> The corresponding relationship between the source address identifier and the source address IP <10, IP1>, and the subchannel<IP1,IP3> The correspondence between the destination address identifier and the destination address IP <30, IP3>.
[0192] In the above steps, the server and client can save the subchannel<IP2,IP4> The corresponding relationship between the source address identifier and the source address IP <20, IP2>, and the subchannel<IP2,IP4> The correspondence between the destination address identifier and the destination address IP <40, IP4>.
[0193] S1006: Client 2 establishes MPTCP session 2 with server 2, and establishes<IP5,IP3> and<IP6,IP4> Two sub-channels.
[0194] Optionally, client 2 can establish a subchannel<IP5,IP3> During the process, you can use the subchannel<IP5,IP3> The corresponding relationship between the source address identifier and the source IP address is sent to the server through ADD_ADDR option 5 (for example, ADD_ADDR option 5 can be the first ADD_ADDR option mentioned above), such as the subchannel<IP5,IP3> The corresponding relationship between the source address identifier and the source address IP is <50, IP5>, that is, 50 indicates the source address IP5. At this time, S1007 does not exist.
[0195] Optionally, client 2 can establish a subchannel<IP6,IP4> During the process, you can use the subchannel<IP6,IP4> The corresponding relationship between the source address identifier and the source IP address is sent to the server through ADD_ADDR option 6 (for example, ADD_ADDR option 6 can be the first ADD_ADDR option mentioned above), such as the subchannel<IP6,IP4> The corresponding relationship between the source address identifier and the source address IP is <60, IP6>, that is, 60 indicates the source address IP6. At this time, S1008 does not exist.
[0196] Optionally, client 2 can establish the first subchannel<IP5,IP3> The correspondence between the source address identifier and the source IP address and the subchannel<IP6,IP4> The correspondence between the source address identifier and the source IP address is sent to the server.
[0197] Optionally, the server can establish a subchannel<IP5,IP3> During the process, you can use the subchannel<IP5,IP3> The corresponding relationship between the destination address identifier and the destination IP address is sent to the client 2 via ADD_ADDR option 7 (for example, ADD_ADDR option 7 may be the aforementioned second ADD_ADDR option), such as the subchannel<IP5,IP3> The corresponding relationship between the destination address identifier and the destination address IP is <30, IP3>, that is, 30 indicates the source address IP3. At this time, S1009 does not exist.
[0198] Optionally, the server can establish a subchannel<IP6,IP4> During the process, you can use the subchannel<IP6,IP4> The corresponding relationship between the destination address identifier and the destination IP address is sent to the client 2 via ADD_ADDR option 8 (for example, ADD_ADDR option 8 may be the aforementioned second ADD_ADDR option), such as the subchannel<IP6,IP4> The corresponding relationship between the destination address identifier and the destination address IP is <40, IP4>, that is, 40 indicates the source address IP4. At this time, S1010 does not exist.
[0199] Optionally, the server can establish the first subchannel<IP5,IP3> The correspondence between the destination address identifier and the destination IP address and the subchannel<IP6,IP4> The correspondence between the destination address identifier and the destination IP address is sent to client 2.
[0200] S1007, client 2 sends a TCP data message or a TCP control message to the server, the TCP data message or the TCP control message includes ADD_ADDR option 5, and ADD_ADDR option 5 includes a subchannel<IP5,IP3> The correspondence between the source address identifier and the source IP address.
[0201] S1008, client 2 sends a TCP data message or a TCP control message to the server, the TCP data message or the TCP control message includes ADD_ADDR option 6, and ADD_ADDR option 6 includes a subchannel<IP6,IP4> The correspondence between the source address identifier and the source IP address.
[0202] Optionally, in S1007 and S1008, the client 2 may send ADD_ADDR option 5 and ADD_ADDR option 6 to the server through the same TCP data packet.
[0203] Optionally, in S1007 and S1008, the client 2 may send ADD_ADDR option 5 and ADD_ADDR option 6 to the server through the same TCP control message.
[0204] It should be noted that the order relationship between S1007 and S1008 is not limited. S1007 is performed before, after or at the same time as S1008.
[0205] S1009, the server sends a TCP data message or a TCP control message to the client 2, the TCP data message or the TCP control message includes ADD_ADDR option 7, and ADD_ADDR option 7 includes a subchannel<IP5,IP3> The correspondence between the destination address identifier and the destination IP address.
[0206] S1010, the server sends a TCP data message or a TCP control message to the client 2, the TCP data message or the TCP control message includes ADD_ADDR option 8, and ADD_ADDR option 8 includes a subchannel<IP6,IP4> The correspondence between the destination address identifier and the destination IP address.
[0207] Optionally, in S1009 and S1010, the server may send ADD_ADDR option 7 and ADD_ADDR option 8 to client 1 through the same TCP data packet.
[0208] Optionally, in S1009 and S1010, the server may send ADD_ADDR option 7 and ADD_ADDR option 8 to client 1 through the same TCP control message.
[0209] It should be noted that the order of S1009 and S1010 is not limited. S1009 and S1010 are performed before, after or simultaneously.
[0210] In the above steps, the server and client can save the subchannel<IP5,IP3> The corresponding relationship between the source address identifier and the source address IP <50, IP5>, and the subchannel<IP5,IP3> The correspondence between the destination address identifier and the destination address IP <30, IP3>.
[0211] In the above steps, the server and client can save the subchannel<IP6,IP4> The corresponding relationship between the source address identifier and the source address IP <60, IP6>, and the subchannel<IP6,IP4> The correspondence between the destination address identifier and the destination address IP <40, IP4>.
[0212] It should be noted that the order between S1001-S1005 and S1006-S1010 is not limited. Any one of steps S1001-S1005 can be performed before, after or at the same time as any one of steps S1006-S1010, which is not limited in the embodiment of the present application.
[0213] If the gateway device from ISP2 to the server (the gateway device may be the aforementioned third device) fails, this will cause the network link from ISP2 to the server to be interrupted.
[0214] S1011, client 1 in subchannel<IP2,IP4> The TCP message (TCP data message or TCP control message) sent on the server is discarded due to a gateway failure on the server.
[0215] S1012, the gateway device generates an ICMP error report message 1 according to the TCP message lost in S1011. The source IP address of the ICMP error report message 1 is the IP address of the gateway device, such as IP7. The type field and code segment of the ICMP error report message 1 indicate the failure of the gateway device and the cause of the failure.
[0216] S1013, the gateway device passes through the sub-channel<IP2,IP4> Send ICMP error report message 1 back to client 1.
[0217] S1014, client 1 determines the subchannel according to the type field and code segment in ICMP error report message 1<IP2,IP4> (also called the first subchannel) failure and the cause of the failure.
[0218] S1015, client 1 generates TCP option 1, which is the first TCP option mentioned above.
[0219] For example, the specific format is Fig.11As shown, the category (Kind) indicates the category of TCP option 1, which is fixed to 30, indicating that TCP option 1 is a TCP option of MPTCP; the length (Length) is the length of TCP option 1, such as the total length can be 10 bytes; the first field carries the subchannel<IP2,IP4> The source address identifier is 20, which can also be called SrcAddressID; the second field carries the subchannel<IP2,IP4> The destination address identifier is 40, which can also be called the destination address identifier DestAddressID; the subtype of the third field indicates that TCP option 1 is a subflow fault announcement option (subflowfault announce option), and the value of the subtype (the second value) can be a value specified by the protocol, which can be specified according to the protocol, and the embodiment of the present application does not limit this; the fourth field is used to indicate the subchannel<IP2,IP4> The reason for the failure, for example, the second value of the fourth field is 10 to indicate the reason for the gateway device failure; the fifth field is used to indicate the IP address identifier of the network device, for example, IP7 is used to indicate the source address identifier of the gateway device; the third value of the sixth field is 1 to indicate that the fifth field exists; the seventh field is 1 to indicate that the protocol type of the gateway device is IPv4; the fifth value of the eighth field is 1 to indicate the subchannel<IP2,IP4> The fault is non-transient.
[0220] S1016, client 1 is in subchannel<IP1,IP3> Send a TCP data packet or a TCP control packet to the server, where the TCP data packet or the TCP control packet carries TCP option 1.
[0221] S1017, client 2 in subchannel<IP6,IP4> The TCP message (TCP data message or TCP control message) sent on the server is discarded due to a gateway failure on the server.
[0222] S1018, the gateway device generates ICMP error report message 2 according to the TCP message lost in S1015. The source IP address of ICMP error report message 2 is the IP address of the gateway device, such as IP7. The type field and code segment of ICMP error report message 2 indicate the failure of the gateway device and the cause of the failure.
[0223] In this example, the type fields and code segments of ICMP error report message 1 and ICMP error report message 2 indicate that the gateway device failures are the same and the causes of the failures are the same.
[0224] S1019, gateway device through sub-channel<IP6,IP4> Send ICMP error report message 2 to client 2.
[0225] S1020, client 2 determines the subchannel according to the type field and code segment in ICMP error report message 2<IP6,IP4> (also called the first subchannel) failure and the cause of the failure.
[0226] S1021, client 2 generates TCP option 2, which is the first TCP option mentioned above.
[0227] For example, the specific format is Fig.12 As shown, the category (Kind) indicates the category of TCP option 2, the category is fixed to 30, and 30 indicates that TCP option 2 is a TCP option of MPTCP; the length (Length) is the length of TCP option 2, such as the total length can be 10 bytes; the first field carries the subchannel<IP6,IP4> The source address identifier is 60, which can also be called SrcAddressID; the second field carries the subchannel<IP6,IP4> The destination address identifier is 40, which can also be called the destination address identifier DestAddressID; the subtype of the third field indicates that TCP option 2 is a subflow fault announcement option (subflowfault announce option), and the value of the subtype (the first value) can be a value specified by the protocol, which can be specified according to the protocol, and the embodiment of the present application does not limit this; the fourth field is used to indicate the subchannel<IP6,IP4> The reason for the failure, for example, the second value 10 indicates the reason for the gateway device failure; the fifth field is used to indicate the IP address identifier of the network device, for example, IP7 is used to indicate the source address identifier of the gateway device; the third value of the sixth field is 1 to indicate that the fifth field exists; the seventh field is 1 to indicate that the protocol type of the gateway device is IPv4; the fifth value of the eighth field is 1 to indicate that the subchannel<IP2,IP4> The fault is non-transient.
[0228] S1022, client 2 in subchannel<IP5,IP3> Send a TCP data packet or a TCP control packet to the server, where the TCP data packet or the TCP control packet carries TCP option 2.
[0229] It should be noted that the order between S1011-S1016 and S1017-S1022 is not limited. Any one of S1011-S1016 can be performed between, after or at the same time as any one of S1017-S1022, which is not limited in the embodiment of the present application.
[0230] S1023, the server receives the TCP data message or TCP control message of S1016 and S1020, and obtains TCP option 1 and TCP option 2.
[0231] S1024, the server can count and analyze the faults according to TCP option 1 and TCP option 2. The server can also send a warning message to the operation and maintenance personnel, which can indicate the faulty device and the cause of the fault. The operation and maintenance personnel can locate the faulty device and repair the fault in time according to the cause of the fault.
[0232] Specifically, the server can determine the subchannel identified by 20 carried by the first field and 40 carried by the second field according to the value of the third field in TCP option 1.<IP2,IP4> Failure; The server determines the subchannel identified by 60 carried by the first field and 40 carried by the second field based on the value of the third field in TCP option 2<IP6,IP4> Failure; the server can determine that the failure of the gateway device identified by the gateway identifier carried by the fifth field causes the failure of the first subchannel based on the second value of the fourth field in TCP option 1 and TCP option 2 being 10.
[0233] Optionally, the server can send the statistical faults to the big data platform, which analyzes the faults and sends prompt warning information to the operation and maintenance personnel. The prompt warning information can indicate the faulty equipment and the cause of the fault. The operation and maintenance personnel locate the faulty equipment and repair the fault in time according to the cause of the fault.
[0234] It should be noted that, in the embodiment of the present application, only the first TCP option is sent from the client to the server via a TCP data message or a TCP control message. Similarly, the server may also send the first TCP option to the client via a TCP data message or a TCP control message, and the server may send a TCP data message or a TCP control message to the client on the second sub-channel, the TCP data message or the TCP control message carrying the first TCP option, the first TCP option being used to indicate a first sub-channel failure, the first field included in the first TCP option being used to carry the source address identifier of the first sub-channel, and the second field being used to carry the destination address identifier of the first sub-channel, at which point the source address identifier and the destination address identifier are referenced to the server. To avoid redundancy, the present application does not describe in detail the server sending the first TCP option via a TCP data message or a TCP control message.
[0235] It should be noted that the format of the first TCP option and the ADD_ADDR option in the embodiments of the present application is merely described by way of example. The present application has no restrictions on the format of each option, and the positional relationship and length between the fields in each option are not limited. Each option may include more or fewer fields mentioned in the embodiments of the present application, and the present application is not limited thereto.
[0236] In this embodiment, the client and the server can be divided into functional modules according to the above method example. For example, each functional module can be divided according to each function, or two or more functions can be integrated into one processing module. The above integrated module can be implemented in the form of hardware. It should be noted that the division of modules in this embodiment is schematic and is only a logical function division. There may be other division methods in actual implementation.
[0237] It should be noted that all relevant contents of each step involved in the above method embodiment can be referred to the functional description of the corresponding functional module and will not be repeated here.
[0238] The client and server provided in this embodiment are used to execute the above-mentioned method of notifying a fault, so the same effect as the above-mentioned implementation method can be achieved. In the case of an integrated unit, the client and the server may include a processing module, a storage module and a communication module, respectively. Among them, the processing module can be used to control and manage the actions of the client and the server, for example, it can be used to support the electronic device to execute the steps performed by the processing unit. The storage module can be used to support the client and the server to execute stored program codes and data, etc. The communication module can be used to support the communication between the client and the server and other devices.
[0239] Among them, the processing module can be a processor or a controller. It can implement or execute various exemplary logic boxes, modules and circuits described in conjunction with the disclosure of this application. The processor can also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of digital signal processing (DSP) and a microprocessor, etc. The storage module can be a memory. The communication module can specifically be a device that interacts with other electronic devices, such as a radio frequency circuit, a Bluetooth chip, a Wi-Fi chip, etc.
[0240] In one embodiment, when the processing module is a processor and the storage module is a memory, the electronic device involved in this embodiment may be a Figure 2 Device of the structure shown.
[0241] This embodiment also provides a computer-readable storage medium, in which computer instructions are stored. When the computer instructions are executed on an electronic device, the electronic device executes the above-mentioned related method steps to implement the method for securely accessing data in the above-mentioned embodiment.
[0242] This embodiment also provides a computer program product. When the computer program product is run on a computer, the computer is enabled to execute the above-mentioned related steps to implement the method for securely accessing data in the above-mentioned embodiment.
[0243] In addition, an embodiment of the present application also provides a device, which may specifically be a chip, component or module, and the device may include a connected processor and memory; wherein the memory is used to store computer-executable instructions, and when the device is running, the processor may execute the computer-executable instructions stored in the memory so that the chip executes the method for securely accessing data in the above-mentioned method embodiments.
[0244] Among them, the electronic device, computer storage medium, computer program product or chip provided in this embodiment is used to execute the corresponding method provided above. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding method provided above and will not be repeated here.
[0245] Through the description of the above implementation methods, technical personnel in the relevant field can understand that for the convenience and simplicity of description, only the division of the above-mentioned functional modules is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.
[0246] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of modules or units is only a logical function division, and there may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0247] The units described as separate components may or may not be physically separated, and the components shown as units may be one physical unit or multiple physical units, that is, they may be located in one place or distributed in multiple different places. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0248] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0249] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solution of the embodiment of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium, including several instructions to enable a device (which can be a single-chip microcomputer, chip, etc.) or a processor (processor) to perform all or part of the steps of the various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read only memory (ROM), random access memory (RAM), disk or optical disk and other media that can store program code.
[0250] The above contents are only specific implementation methods of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A method for notifying a fault, characterized in that: include: The first device determines that the first subchannel fails; The first device determines a cause of a failure of the first subchannel; The first device sends a first TCP message to the second device through the second subchannel, where the first TCP message includes a first TCP option, where the first TCP option is used to indicate a failure of the first subchannel, and the first subchannel and the second subchannel are subchannels corresponding to a first MPTCP session; The first TCP option includes a first field, a second field, and a third field, the first field is used to carry the source address identifier of the first subchannel, the second field is used to carry the destination address identifier of the first subchannel, the first value of the third field is used to indicate the first subchannel fault identified by the source address identifier carried by the first field and the destination address identifier carried by the second field, the first TCP option includes a fourth field, the second value of the fourth field is used to indicate the cause of the first subchannel fault, the first TCP option also includes an eighth field, the fourth value of the eighth field is used to indicate that the first subchannel fault is a transient fault, and the fifth value of the eighth field is used to indicate that the first subchannel fault is a non-transient fault, if the second device determines that the first subchannel is a transient fault according to the fourth value of the eighth field, the second device attempts to continue to establish the first subchannel; If the second device determines that the first sub-channel is a non-instantaneous fault according to the fifth value of the eighth parameter, the second device attempts to establish other sub-channels or attempts to transmit TCP data packets on other established sub-channels.
2. The method according to claim 1, characterized in that The first device determines a cause of a first sub-channel failure, including: The first device detects a local fault and determines a cause of the first subchannel fault; or The first device detects a cause of the first sub-channel failure according to the detection task.
3. The method according to claim 1, characterized in that The first device determines a cause of a first sub-channel failure, including: The first device receives a network control message protocol ICMP error report message sent by a third device through the first subchannel, where the ICMP error report message is used to indicate a cause of a failure of the first subchannel; The first device determines a cause of the first subchannel failure according to the ICMP error report message; The first TCP option includes a fifth field, and the fifth field is used to carry the identifier of the third device.
4. The method according to claim 3, characterized in that The first TCP option also includes a sixth field, and the third value of the sixth field is used to indicate that the fifth field exists.
5. The method according to claim 3 or 4, characterized in that: The first TCP option also includes a seventh field, and the seventh field is used to carry the IP protocol version of the third device.
6. The method according to any one of claims 1 to 5, characterized in that Before the first device sends the first TCP message to the second device through the second subchannel, the method further includes: The first device sends a second TCP message to the second device, where the second TCP message includes a first ADD_ADDR option, where the first ADD_ADDR option includes a correspondence between a source IP address of the first sub-channel and a source address identifier of the first sub-channel.
7. The method according to any one of claims 1 to 5, characterized in that Before the first device sends the first TCP message to the second device through the second subchannel, the method further includes: The first device receives a third TCP message sent by the second device, where the third TCP message includes a second ADD_ADDR option, where the second ADD_ADDR option includes a correspondence between a target IP address of the first sub-channel and a target address identifier of the first sub-channel.
8. A method for notifying a fault, characterized in that: include: The second device receives a first TCP message sent by the first device through the second subchannel, where the first TCP message includes a first TCP option, where the first TCP option is used to indicate a first subchannel failure, and the first subchannel and the second subchannel are subchannels corresponding to a first MPTCP session; The second device determines, according to the first TCP option, that the first subchannel fails; The first TCP option includes a first field, a second field, and a third field, the first field is used to carry the source address identifier of the first subchannel, the second field is used to carry the destination address identifier of the first subchannel, and the first value of the third field is used to indicate the first subchannel fault identified by the source address identifier carried by the first field and the destination address identifier carried by the second field; the first TCP option includes a fourth field, the second value of the fourth field is used to indicate the cause of the first subchannel fault; the first TCP option also includes an eighth field, the fourth value of the eighth field is used to indicate that the first subchannel fault is a transient fault, and the fifth value of the eighth field is used to indicate that the first subchannel fault is a non-transient fault; The second device determines the first subchannel failure according to the first TCP option, including: The second device determines, according to the first value of the third field, a first subchannel fault identified by the source address identifier carried by the first field and the destination address identifier carried by the second field; The method further comprises: The second device determines whether the first sub-channel is a transient fault or a non-transient fault based on the fourth value or the fifth value of the eighth field. If the second device determines that the first sub-channel is a transient fault based on the fourth value of the eighth field, the second device attempts to continue to establish the first sub-channel; if the second device determines that the first sub-channel is a non-transient fault based on the fifth value of the eighth field, the second device attempts to establish other sub-channels or attempts to transmit TCP data packets on other established sub-channels.
9. The method according to claim 8, characterized in that The method further comprises: The second device determines a cause of the first subchannel failure according to a second value of the fourth field; The second device determines a strategy for resolving the first sub-channel failure according to a cause of the first sub-channel failure.
10. The method according to claim 8 or 9, characterized in that: The first TCP option includes a fifth field, where the fifth field is used to carry an identifier of a third device that fails. The method further includes: The second device determines that the third device fails according to the identifier of the third device carried by the fifth field.
11. The method according to claim 10, characterized in that The first TCP option also includes a sixth field, and the third value of the sixth field is used to indicate that the fifth field exists; Before the second device determines that the third device fails according to the identifier of the third device carried by the fifth field, the method further includes: The second device determines that the fifth field exists according to the third value of the sixth field.
12. The method according to claim 10 or 11, characterized in that: The first TCP option also includes a seventh field, and the seventh field is used to carry the IP protocol version of the third device; The method further comprises: The second device parses the identifier of the third device carried by the fifth field according to the protocol version of the third device carried by the seventh field.
13. The method according to any one of claims 8 to 12, characterized in that Before the second device receives the first TCP message sent by the first device through the second subchannel, the method further includes: The second device sends a second TCP message to the first device, where the second TCP message includes a first ADD_ADDR option, where the first ADD_ADDR option includes a correspondence between a source IP address of the first sub-channel and a source address identifier of the first sub-channel.
14. The method according to any one of claims 8 to 12, characterized in that Before the second device receives the first TCP message sent by the first device through the second subchannel, the method further includes: The second device receives a third TCP message sent by the first device, where the third TCP message includes a second ADD_ADDR option, where the second ADD_ADDR option includes a correspondence between a target IP address of the first sub-channel and a target address identifier of the first sub-channel.
15. An electronic device, characterized in that: include: one or more processors; Memory; a module with multiple applications installed; and one or more programs, wherein the one or more programs are stored in the memory, and when the one or more programs are executed by the processor, the electronic device executes the method as claimed in any one of claims 1 to 7.
16. An electronic device, characterized in that: include: one or more processors; Memory; a module with multiple applications installed; and one or more programs, wherein the one or more programs are stored in the memory, and when the one or more programs are executed by the processor, the electronic device executes the method as claimed in any one of claims 8 to 14.
17. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and when the computer instructions are executed on an electronic device, the electronic device executes the method according to any one of claims 1 to 7.
18. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and when the computer instructions are executed on an electronic device, the electronic device executes the method according to any one of claims 8 to 14.