WO2017190467A1 - 终端最大传输单元的调整方法、装置和终端设备 - Google Patents

终端最大传输单元的调整方法、装置和终端设备 Download PDF

Info

Publication number
WO2017190467A1
WO2017190467A1 PCT/CN2016/100842 CN2016100842W WO2017190467A1 WO 2017190467 A1 WO2017190467 A1 WO 2017190467A1 CN 2016100842 W CN2016100842 W CN 2016100842W WO 2017190467 A1 WO2017190467 A1 WO 2017190467A1
Authority
WO
WIPO (PCT)
Prior art keywords
terminal
mtu parameter
mtu
parameter
network
Prior art date
Application number
PCT/CN2016/100842
Other languages
English (en)
French (fr)
Inventor
薛晶
Original Assignee
中兴通讯股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Publication of WO2017190467A1 publication Critical patent/WO2017190467A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting
    • H04L41/0813Configuration setting characterised by the conditions triggering a change of settings
    • H04L41/0816Configuration setting characterised by the conditions triggering a change of settings the condition being an adaptation, e.g. in response to network events

Definitions

  • the present application relates to the field of communications technologies, and in particular, to a method and an apparatus for adjusting a maximum transmission unit of a terminal.
  • the terminal device negotiates the MSS value with the server.
  • the MSS value can be obtained by subtracting the IPv4 Header (IPv4 protocol header, size 20 Byte) and TCP header (TCP protocol header, 20 Byte) from the MTU (Maximum Transmission Unit) value.
  • the embodiments of the present application are directed to solving the above technical problems.
  • an embodiment of the present application provides a method for adjusting a maximum transmission unit of a terminal, which effectively improves processing of request exceptions and network request response efficiency.
  • Another embodiment of the present application provides an adjustment apparatus for a terminal maximum transmission unit.
  • Another embodiment of the present application provides a terminal device.
  • a method for adjusting a maximum transmission unit of a terminal includes the following steps: when a network request response abnormality occurs in a terminal, and the network request response abnormality is related to a setting of a maximum transmission unit MTU parameter.
  • the target MTU parameter supported by the network where the terminal is located is detected; and the local preset MTU parameter of the terminal is adjusted to the target MTU parameter supported by the network.
  • the target MTU parameter supported by the network where the terminal is located is automatically detected, and the terminal local device is The preset MTU parameter is adjusted to the target MTU parameter, and the user is not required to find and confirm the abnormal cause, and the problem can be found and solved in a timely and convenient manner. Further, for the portable terminal, the frequency of the change of the location of use is higher, and the problem that the network request response is abnormal due to the MTU parameter setting problem is more likely to occur. According to the embodiment of the present invention, the terminal can be adjusted in time for the changed network. The MTU parameter effectively improves the processing of request exceptions and the efficiency of network request response.
  • the apparatus for adjusting the maximum transmission unit of the terminal in the embodiment of the present application may automatically detect the target MTU parameter supported by the network where the terminal is located when the network request response abnormality occurs in the terminal, and the abnormality is related to the setting of the MTU parameter, and the terminal local device is
  • the preset MTU parameter is adjusted to the target MTU parameter, and the user is not required to find and confirm the abnormal cause, and the problem can be found and solved in a timely and convenient manner.
  • the frequency of the change of the location of use is higher, and the problem that the network request response is abnormal due to the MTU parameter setting problem is more likely to occur.
  • the terminal can be adjusted in time for the changed network.
  • the MTU parameter effectively improves the processing of request exceptions and the efficiency of network request response.
  • a terminal device includes the apparatus for adjusting a maximum transmission unit of a terminal according to the second embodiment of the present invention.
  • the terminal device in the embodiment of the present application can automatically detect the target MTU parameter supported by the network where the terminal is located when the network request response abnormality occurs in the terminal, and the abnormality is related to the setting of the MTU parameter, and adjust the preset local MTU parameter of the terminal.
  • the target MTU parameter the user can find the cause of the abnormality in a timely manner, and the problem can be solved in a timely and convenient manner.
  • the present invention is The embodiment can adjust the MTU parameter of the terminal for the changed network in time, effectively improving the processing of the request exception and the efficiency of the network request response.
  • FIG. 1 is a flowchart of a method for adjusting a maximum transmission unit of a terminal according to an embodiment of the present application
  • FIG. 2 is a schematic diagram of a complete HTTP communication protocol response according to an embodiment of the present application.
  • FIG. 3 is a flowchart of detecting target MTU parameters supported by a network where the terminal is located according to an embodiment of the present application
  • FIG. 4 is a flowchart of a method for adjusting a maximum transmission unit of a terminal according to another embodiment of the present application.
  • FIG. 5 is a schematic structural diagram of an apparatus for adjusting a maximum transmission unit of a terminal according to an embodiment of the present application
  • FIG. 6 is a schematic structural diagram of an apparatus for adjusting a maximum transmission unit of a terminal according to another embodiment of the present application.
  • FIG. 1 is a flowchart of a method for adjusting a maximum transmission unit of a terminal according to an embodiment of the present application.
  • a method for adjusting a maximum transmission unit of a terminal includes the following steps:
  • the terminal in the embodiment of the present invention may be a connection device of the Internet or a local area network, for example, a wired or wireless routing device such as a CPE (Customer Premise Equipment) or a data network card.
  • a connection device of the Internet or a local area network for example, a wired or wireless routing device such as a CPE (Customer Premise Equipment) or a data network card.
  • CPE Customer Premise Equipment
  • the network request response abnormality occurs in the terminal, which may be caused by various reasons, for example, due to network failure, or line failure, or equipment failure or network connection setup failure, or because the terminal has a MTU parameter greater than when establishing a TCP connection with the target server.
  • the MTU parameter of the network causes the packet to be truncated.
  • the target MTU parameter supported by the network where the mobile terminal is detected is triggered. Before adjusting the MTU parameters of the terminal, it may be determined that the network request response abnormality is caused by the preset local MTU parameter of the terminal being greater than the MTU parameter of the network.
  • the network request response exception is related to the setting of the MTU parameter.
  • Condition 1 Some or all of the HTTP packets have been unable to receive a full network request response.
  • the complete network request response refers to the network request response obtained through the complete HTTP communication protocol.
  • the complete HTTP communication protocol may include the following four steps: a client (Client) establishes a connection with a server (Server), a client sends a request message, a client receives a network request response message returned by the server, and closes. connection. Due to different routes, when the data packets pass through different network nodes, different MTU parameters may occur.
  • the MTU parameter of the data packet sent by the terminal is smaller than the MTU parameter of the network node, and the function is normal, that is, the four steps of the complete HTTP communication protocol are completed in sequence, it is determined that the complete network request response is received.
  • the function is abnormal, and usually the network node discards the data packet that is larger than the MTU parameter of the local node. Since the remote server does not receive the data, it naturally does not respond to the data to the terminal, that is, it cannot receive a complete network request response.
  • the default ping packet operation can receive the data of the HTTP data reply.
  • the default ping operation of the operating system has a packet size of 32 bytes or 64 bytes. Far less than the network The MTU parameter, therefore, if the default ping operation can be pinged, the data link is normal.
  • the target MTU parameters supported by the network where the terminal is located may be detected in various manners.
  • detecting the target MTU parameter supported by the network where the terminal is located may include: determining an MTU parameter to be tested according to the local preset MTU parameter and the preset minimum MTU parameter of the terminal; The MTU parameter to be tested sends a network request, and adjusts the MTU parameter to be tested according to the obtained network request response to determine a target MTU parameter supported by the network where the terminal is located.
  • the preset minimum MTU parameter may be a packet size of a default ping packet operation, such as 32 bytes, or 64 bytes.
  • an MTU parameter may be selected as a MTU parameter to be tested within a range between a preset minimum MTU parameter and a local preset MTU parameter of the terminal by using a preset rule.
  • the preset rules may include, but are not limited to, a sequential search method, a binary search method, a binary sort tree search method, a hash table method, and a block search method.
  • the MTU parameter to be tested (first MTU parameter + second MTU parameter) /2.
  • the network request is sent by using the MTU parameter to be tested, and according to whether the obtained network request response is a complete response, the MTU parameter to be measured is adjusted, and the network request is resent, and the response is determined according to whether the obtained network request response is complete. Measure the MTU parameters until the maximum MTU parameter that the network can ping is obtained.
  • the network request is sent by using the MTU parameter to be tested, and the MTU parameter of the network to be tested is determined according to the obtained network request response, and the target MTU parameter supported by the network of the terminal is determined by the figure.
  • the steps shown in 3 are implemented. As shown in Figure 3, the following steps are included:
  • a ping command may be sent using the MTU parameter to be tested to determine whether a complete response can be obtained.
  • the instruction "ping-f-l MTU xx.xx.xx.xx” can be used to test the MTU size within a certain range until an appropriate MTU parameter is tried.
  • the “MTU” in the above instruction is the MTU parameter to be tested, and “xx.xx.xx.xx” is the target IP address of the HTTP request that cannot receive the complete response.
  • the MTU parameter to be tested is increased.
  • the MTU parameter to be tested may be used as the minimum MTU parameter of the next detection range, that is, the MTU parameter to be tested is used as the lower limit of the next detection range, and the MTU to be tested is reselected according to the preset rule from the updated detection range. And repeating steps S301-S302, and performing detection until the difference between the MTU parameter before the reselection and the MTU parameter after the reselection is less than a preset value, and obtaining the maximum available MTU parameter capable of receiving the complete response. .
  • the MTU parameter to be tested may be reduced. Specifically, the MTU parameter to be tested may be used as the maximum MTU parameter of the next detection range, that is, the MTU parameter to be tested is used as the upper limit of the next detection range, and the MTU to be tested is reselected according to the preset rule from the updated detection range. And repeating steps S301-S302, and performing detection until the difference between the MTU parameter before the reselection and the MTU parameter after the reselection is less than a preset value, and obtaining the maximum available MTU parameter capable of receiving the complete response. .
  • the preset value is a small value, for example, a value of 0 or slightly greater than 0.
  • the MTU parameter before reselection and the MTU parameter after reselection may be selected or before reselection is selected.
  • the mean value of the MTU parameter and the reselected MTU parameter is used as the target MTU parameter supported by the network where the terminal is located.
  • S102 Adjust the local preset MTU parameter of the terminal to a target MTU parameter supported by the network where the terminal is located.
  • the preset MTU parameter of the terminal is adjusted to the maximum MTU parameter that the network where the terminal is located can be pinged, which can effectively avoid data packet loss and improve the efficiency and success rate of the request response.
  • the target MTU parameter supported by the network where the terminal is located is automatically detected, and the terminal local device is The preset MTU parameter is adjusted to the target MTU parameter, and the user is not required to find and confirm the abnormal cause, and the problem can be found and solved in a timely and convenient manner. Further, for the portable terminal, the frequency of the change of the location of use is higher, and the problem that the network request response is abnormal due to the MTU parameter setting problem is more likely to occur. According to the embodiment of the present invention, the terminal can be adjusted in time for the changed network. The MTU parameter effectively improves the processing of request exceptions and the efficiency of network request response.
  • a method for adjusting a maximum transmission unit of a terminal may include the following steps.
  • the user may be prompted by, but not limited to, the following:
  • the voice prompt information is broadcasted by the voice broadcast device of the terminal;
  • S402. Receive an adjustment instruction of the user.
  • the local preset MTU parameter of the terminal may be adjusted to the target MTU parameter supported by the network where the terminal is located.
  • the method further includes:
  • the user is prompted to adjust the local preset MTU parameter of the terminal to the target MTU parameter supported by the network where the terminal is located.
  • the user can understand the detection result and select whether to perform corresponding operating.
  • the present application further provides an adjustment device for the maximum transmission unit of the terminal.
  • FIG. 5 is a schematic structural diagram of an apparatus for adjusting a maximum transmission unit of a terminal according to an embodiment of the present application.
  • an apparatus for adjusting a maximum transmission unit of a terminal includes: a detection module 10 and an adjustment module 20.
  • the detecting module 10 is configured to detect a target MTU parameter supported by the network where the terminal is located when a network request response abnormality occurs in the terminal, and the network request response abnormality is related to the setting of the MTU parameter.
  • the terminal in the embodiment of the present invention may be a connection device of the Internet or a local area network, for example, a wired or wireless routing device such as a CPE (Customer Premise Equipment) or a data network card.
  • a connection device of the Internet or a local area network for example, a wired or wireless routing device such as a CPE (Customer Premise Equipment) or a data network card.
  • CPE Customer Premise Equipment
  • the network request response abnormality occurs in the terminal, which may be caused by various reasons, for example, due to network failure, or line failure, or equipment failure or network connection setup failure, or because the terminal has a MTU parameter greater than when establishing a TCP connection with the target server.
  • the MTU parameter of the network causes the packet to be truncated.
  • the target MTU parameter supported by the network where the mobile terminal is detected is triggered. Before adjusting the MTU parameters of the terminal, it may be determined that the network request response abnormality is caused by the preset local MTU parameter of the terminal being greater than the MTU parameter of the network.
  • determining that the network request response exception is related to the setting of the MTU parameter.
  • the detecting module 10 detects the target MTU parameter supported by the network where the terminal is located:
  • Condition 1 Some or all of the HTTP packets have been unable to receive a full network request response.
  • the complete network request response refers to the network request response obtained through the complete HTTP communication protocol.
  • the complete HTTP communication protocol may include the following four steps: a client (Client) establishes a connection with a server (Server), a client sends a request message, a client receives a network request response message returned by the server, and closes. connection. Due to different routes, when the data packets pass through different network nodes, different MTU parameters may occur.
  • the MTU parameter of the data packet sent by the terminal is smaller than the MTU parameter of the network node, and the function is normal, that is, the four steps of the complete HTTP communication protocol are completed in sequence, it is determined that the complete network request response is received.
  • the function is abnormal, and usually the network node discards the data packet that is larger than the MTU parameter of the local node. Since the remote server does not receive the data, it naturally does not respond to the data to the terminal, that is, it cannot receive a complete network request response.
  • the default ping packet operation can receive the data of the HTTP data reply.
  • the default ping operation of the operating system has a packet size of 32 bytes or 64 bytes. It is much smaller than the MTU parameter of the network. Therefore, if the default ping operation can be pinged, the data link is normal.
  • the network request can be determined. Whether the response exception is related to the setting of the maximum transmission unit MTU parameter.
  • the detecting module 10 can detect the target MTU parameters supported by the network where the terminal is located in multiple manners.
  • the detecting module 10 may include: a determining unit 11 and an adjusting unit 12 (not shown).
  • the determining unit 11 is configured to determine the MTU parameter to be tested according to the local preset MTU parameter and the preset minimum MTU parameter of the terminal.
  • the preset minimum MTU parameter may be a packet size of a default ping packet operation, such as 32 bytes, or 64 bytes.
  • the determining unit 11 may select an MTU parameter as the MTU parameter to be tested within a range between the preset minimum MTU parameter and the local preset MTU parameter of the terminal by using a preset rule.
  • the preset rules may include, but are not limited to, a sequential search method, a binary search method, a binary sort tree search method, a hash table method, and a block search method.
  • the MTU parameter to be tested (first MTU parameter + second MTU parameter) /2.
  • the adjusting unit 12 is configured to send a network request by using the MTU parameter to be tested, and adjust the target MTU parameter according to the obtained network request response to determine a target MTU parameter supported by the network where the terminal is located.
  • the adjusting unit 12 may send a network request by using the MTU parameter to be tested, and according to whether the obtained network request response is a complete response, the MTU parameter to be measured is adjusted, and the network request is resent, according to the obtained The network request response is adjusted again to adjust the MTU parameter to be tested until the maximum MTU parameter that the network can ping is obtained.
  • the adjusting unit 12 may detect the target MTU parameter supported by the network where the terminal is located by using the steps shown in FIG. 3, and the specific process is the same as the embodiment shown in FIG. 3.
  • the adjustment module 20 is configured to adjust the local preset MTU parameter of the terminal to the target MTU parameter supported by the network where the terminal is located.
  • the apparatus for adjusting the maximum transmission unit of the terminal in the embodiment of the present application may automatically detect the target MTU parameter supported by the network where the terminal is located when the network request response abnormality occurs in the terminal, and the abnormality is related to the setting of the MTU parameter, and the terminal local device is
  • the preset MTU parameter is adjusted to the target MTU parameter, and the user is not required to find and confirm the abnormal cause, and the problem can be found and solved in a timely and convenient manner.
  • the frequency of the change of the location of use is higher, and the problem that the network request response is abnormal due to the MTU parameter setting problem is more likely to occur.
  • the terminal can be adjusted in time for the changed network.
  • the MTU parameter effectively improves the processing of request exceptions and the efficiency of network request response.
  • FIG. 6 is a schematic structural diagram of an apparatus for adjusting a maximum transmission unit of a terminal according to another embodiment of the present application.
  • the apparatus for adjusting the maximum transmission unit of the terminal includes: a detection module 10 , an adjustment module 20 , a first prompt module 30 , a receiving module 40 , and a second prompt module 50 .
  • the detecting module 10 and the adjusting module 20 are the same as those in the embodiment shown in FIG.
  • the first prompting module 30 is configured to prompt the user to adjust the local preset MTU parameters of the terminal when the network request response abnormality occurs, and the network request response abnormality is related to the setting of the MTU parameter.
  • the first prompting module 30 may prompt the user by, but not limited to, the following manners:
  • the voice prompt information is broadcasted by the voice broadcast device of the terminal;
  • the user can adjust whether to adjust the preset MTU parameter of the terminal according to the need, and if necessary, input an adjustment command.
  • the receiving module 40 is configured to receive an adjustment instruction of the user.
  • the detecting module 10 detects a target MTU parameter supported by the network where the terminal is located according to the adjustment instruction of the user.
  • the detection module 10 detects the target MTU parameters supported by the network where the terminal is located, and may refer to the specific implementation manner of the embodiment shown in FIG. 5, and details are not described herein.
  • the second prompting module 50 is configured to prompt the user to adjust the local preset MTU parameter of the terminal to the target MTU parameter supported by the network where the terminal is located after detecting the target MTU parameter supported by the network where the terminal is located.
  • the adjustment module 40 adjusts the local preset MTU parameter of the terminal to the target MTU parameter supported by the network where the terminal is located.
  • the user can understand the detection result and select whether to perform corresponding operating.
  • the invention also proposes a terminal device.
  • the terminal device includes the adjusting device of the maximum transmission unit of the terminal according to any embodiment of the present invention, where the terminal can be automatically detected when the network request response abnormality occurs, and the abnormality is related to the setting of the MTU parameter.
  • the target MTU parameter supported by the network, and the preset local MTU parameter of the terminal is adjusted to the target MTU parameter, so that the user does not need to find and confirm the abnormal cause, and can find the problem and solve the problem in a timely and convenient manner.
  • the frequency of the change of the location of use is higher, and the problem that the network request response is abnormal due to the MTU parameter setting problem is more likely to occur.
  • the terminal can be adjusted in time for the changed network.
  • the MTU parameter effectively improves the processing of request exceptions and the efficiency of network request response.
  • a "computer-readable medium” can be any apparatus that can contain, store, communicate, propagate, or transport a program for use in an instruction execution system, apparatus, or device, or in conjunction with the instruction execution system, apparatus, or device.
  • computer readable media include the following: electrical connections (electronic devices) having one or more wires, portable computer disk cartridges (magnetic devices), random access memory (RAM), Read only memory (ROM), erasable editable read only memory (EPROM or flash memory), fiber optic devices, and portable compact disk read only memory (CDROM).
  • the computer readable medium may even be a paper or other suitable medium on which the program can be printed, as it may be optically scanned, for example by paper or other medium, followed by editing, interpretation or, if appropriate, other suitable The method is processed to obtain the program electronically and then stored in computer memory.
  • portions of the application can be implemented in hardware, software, firmware, or a combination thereof.
  • multiple steps or methods may be implemented in software or firmware stored in a memory and executed by a suitable instruction execution system.
  • a suitable instruction execution system For example, if implemented in hardware, as in another embodiment, it can be implemented by any one or combination of the following techniques well known in the art: having logic gates configured to implement logic functions on data signals. Discrete logic circuits, application specific integrated circuits with suitable combinational logic gates, programmable gate arrays (PGAs), field programmable gate arrays (FPGAs), etc.
  • the programming may be performed by a related hardware, which may be stored in a computer readable storage medium, which, when executed, includes one or a combination of the steps of the method embodiments.
  • each functional unit in each embodiment of the present application may be integrated into one processing module, or each unit may exist physically separately, or two or more units may be integrated into one module.
  • the above integrated modules can be implemented in the form of hardware or in the form of software functional modules.
  • the integrated modules, if implemented in the form of software functional modules and sold or used as stand-alone products, may also be stored in a computer readable storage medium.
  • the above mentioned storage medium may be a read only memory, a magnetic disk or an optical disk or the like.
  • the method and apparatus for adjusting the maximum transmission unit of the terminal provided by the embodiment of the present invention have the following beneficial effects: the MTU parameter of the terminal can be adjusted in time for the changed network, and the processing of the request exception and the network request response are effectively improved. effectiveness.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

本申请提出一种终端最大传输单元的调整方法、装置和终端设备,其中,该终端最大传输单元的调整方法,包括以下步骤:当终端出现网络请求响应异常,且所述网络请求响应异常与最大传输单元MTU参数的设置相关时,探测所述终端的所在网络支持的目标MTU参数;将述终端的本机预设MTU参数调整为所述的所在网络支持的目标MTU参数。本申请的终端最大传输单元的调整方法,能够及时发现问题、解决问题,有效提高了请求异常的处理和网络请求响应效率。

Description

终端最大传输单元的调整方法、装置和终端设备 技术领域
本申请涉及通信技术领域,特别涉及一种终端最大传输单元的调整方法和装置。
背景技术
使用各种终端设备进行网上活动已经称为用户日常生活中的一部分。但是,在使用终端设备进行网上活动时,会出现数据功能连接正常,但存在部分或全部网页无法打开的情况。
这种情况产生的原因主要是因为MSS(Maximum Segment Size,网络数据传输最大值)过大导致。在网络通信过程中建立TCP连接时,终端设备会与服务器协商MSS值。当用协商好的MSS值在网络中传输数据包时,如果MSS值大于网络的MSS值,则数据包会发生截断。由于MSS值可由MTU(Maximum Transmission Unit,最大传输单元)值减去IPv4 Header(IPv4协议包头,大小为20 Byte)和TCP header(TCP协议包头,20 Byte)得到。因此,当终端的MTU值大于网络节点的MTU值,也会发生丢包甚至打不开网页的情况,从而影响数据包的传输。因此,一种能够将终端的MTU值调整为小于网络节点MTU值的方法有待提出。
发明内容
本申请实施例旨在解决上述技术问题。
为此,本申请的一个实施例提出一种终端最大传输单元的调整方法,有效地提高了请求异常的处理和网络请求响应效率。
本申请的另一实施例提出一种终端最大传输单元的调整装置。
本申请的另一实施例提出一种终端设备。
为达上述目的,根据本申请实施例提出的一种终端最大传输单元的调整方法,包括以下步骤:当终端出现网络请求响应异常,且所述网络请求响应异常与最大传输单元MTU参数的设置相关时,探测所述终端的所在网络支持的目标MTU参数;将述终端的本机预设MTU参数调整为所述的所在网络支持的目标MTU参数。
本申请实施例的终端最大传输单元的调整方法,可在终端出现网络请求响应异常,且该异常与MTU参数的设置相关时,自动探测终端的所在网络支持的目标MTU参数,并将终端本机预设MTU参数调整为该目标MTU参数,无需用户查找确认异常原因,能够及时、方便地发现问题、解决问题。更进一步地,对于便携式终端来说,由于其使用位置变更频率较高,更易出现因MTU参数设置问题导致网络请求响应异常的问题,通过本发明的实施例,能够及时针对变更的网络调整终端的MTU参数,有效地提高了请求异常的处理和网络请求响应效率。
根据本申请另一实施例提供的一种终端最大传输单元的调整装置,包括:探测模块,设置为当终端出现网络请求响应异常,且所述网络请求响应异常与MTU参数的设置相关时,探测所述终端的所在网络支持的目标MTU参数;调整模块,设置为将述终端的本机预设MTU参数调整为所述终端的所在网络支持的目标MTU参数。
本申请实施例的终端最大传输单元的调整装置,可在终端出现网络请求响应异常,且该异常与MTU参数的设置相关时,自动探测终端的所在网络支持的目标MTU参数,并将终端本机预设MTU参数调整为该目标MTU参数,无需用户查找确认异常原因,能够及时、方便地发现问题、解决问题。更进一步地,对于便携式终端来说,由于其使用位置变更频率较高,更易出现因MTU参数设置问题导致网络请求响应异常的问题,通过本发明的实施例,能够及时针对变更的网络调整终端的MTU参数,有效地提高了请求异常的处理和网络请求响应效率。
根据本申请另一个实施例提供的一种终端设备,包括本发明第二发明实施例的终端最大传输单元的调整装置。
本申请实施例的终端设备,可在终端出现网络请求响应异常,且该异常与MTU参数的设置相关时,自动探测终端的所在网络支持的目标MTU参数,并将终端本机预设MTU参数调整为该目标MTU参数,无需用户查找确认异常原因,能够及时、方便地发现问题、解决问题。更进一步地,对于便携式终端来说,由于其使用位置变更频率较高,更易出现因MTU参数设置问题导致网络请求响应异常的问题,通过本发明的实 施例,能够及时针对变更的网络调整终端的MTU参数,有效地提高了请求异常的处理和网络请求响应效率。
本申请的附加方面和优点将在下面的描述中部分给出,部分将从下面的描述中变得明显,或通过本申请的实践了解到。
附图说明
本申请的上述和/或附加的方面和优点从结合下面附图对实施例的描述中将变得明显和容易理解,其中:
图1为根据本申请一个实施例的终端最大传输单元的调整方法的流程图;
图2为根据本申请一个实施例的完整的HTTP通信协议响应示意图;
图3为根据本申请一个实施例的探测所述终端的所在网络支持的目标MTU参数的流程图;
图4为根据本申请另一个实施例的终端最大传输单元的调整方法的流程图;
图5为根据本申请一个实施例的终端最大传输单元的调整装置的结构示意图;
图6为根据本申请另一个实施例的终端最大传输单元的调整装置的结构示意图。
具体实施方式
下面详细描述本申请的实施例,所述实施例的示例在附图中示出,其中自始至终相同或类似的标号表示相同或类似的元件或具有相同或类似功能的元件。下面通过参考附图描述的实施例是示例性的,仅用于解释本申请,而不能理解为对本申请的限制。
下面参考附图描述根据本申请实施例的终端最大传输单元的调整方法、装置和终端设备。
图1为根据本申请一个实施例的终端最大传输单元的调整方法的流程图。
如图1所示,根据本申请实施例的终端最大传输单元的调整方法,包括以下步骤:
S101,当终端出现网络请求响应异常,且所述网络请求响应异常与MTU参数的设置相关时,探测所述终端的所在网络支持的目标MTU参数。
需要说明的是,本发明实施例中的终端可以是因特网或者局域网的连接设备,例如,CPE(Customer Premise Equipment,客户终端设备)、数据上网卡等有线或无线路由设备。
终端出现网络请求响应异常,可能是由于多种原因造成的,例如,因网络故障、或者线路故障、或者设备故障或网络连接设置失败、或者因终端在与目标服务器建立TCP连接时的MTU参数大于网络的MTU参数而导致数据包发生截断。在本发明的一个实施例中,当移动终端出现的网络请求响应异常与MTU参数的设置相关时,触发探测移动终端的所在网络支持的目标MTU参数。在对终端的MTU参数进行调整前,可确定出现网络请求响应异常是由于终端本机预设MTU参数大于网络的MTU参数导致的。
在本发明的一个实施例中,如果所述终端的网络请求不能得到完整响应,且所述终端的数据链路正常,则确定所述网络请求响应异常与MTU参数的设置相关。
也就是说,如果同时满足终端的网络请求不能得到完整响应且终端数据链路正常两个条件,则可确定网络请求响应异常是否与最大传输单元MTU参数的设置相关,并触发探测所述终端的所在网络支持的目标MTU参数。
在本发明的一个具体实施例中,当终端出现网络请求响应异常,且满足以下两个条件时,触发探测所述终端的所在网络支持的目标MTU参数:
条件1:部分或全部HTTP数据包一直不能收到完整的网络请求响应。
其中,完整的网络请求响应是指经过完整的HTTP通信协议得到的网络请求响应。
如图2所示,完整的HTTP通信协议可包括如下图四步:客户端(Client)与服务器(Server)建立连接、客户端发出请求信息、客户端收到服务器返回的网络请求响应信息以及关闭连接。由于路由不同,当数据包经过不同的网络节点,就可能出现MTU参数不同的情况。
当终端发送的数据包的MTU参数小于网络节点的MTU参数,功能正常,即上述完整的HTTP通信协议的四步都依次完成,则可确定接收到完整的网络请求响应。
当终端发送的数据包的MTU参数大于网络节点的MTU参数,功能异常,通常该网络节点是将大于本节点MTU参数的数据包丢弃。由于远程服务器没有收到数据,所以自然不会给终端响应数据,即无法接收到完整的网络请求响应。
条件2:默认ping包操作能收到该HTTP数据回复的数据。
目前操作系统默认的ping操作的数据包大小是32字节,或64字节。远小于网络 的MTU参数,因此,如果默认的ping操作能ping通,说明数据链路正常。
如果数据链路不正常,可能是由于设备或线路故障等原因导致,但是如果数据链路正常,但收不到远程服务器的完整响应数据,即同时满足条件1和条件2,则可确定网络请求响应异常是否与最大传输单元MTU参数的设置相关。
其中,终端的所在网络支持的目标MTU参数是指,网络能够ping通的最大MTU参数。
本发明的实施例中,可通过多种方式探测终端的所在网络支持的目标MTU参数。
其中,在本发明的一个实施例中,探测所述终端的所在网络支持的目标MTU参数可包括:根据所述终端的本机预设MTU参数和预设最小MTU参数确定待测MTU参数;使用所述待测MTU参数发送网络请求,并根据得到的网络请求响应调整所述待测MTU参数确定所述终端的所在网络支持的目标MTU参数。
其中,预设最小MTU参数可以是默认ping包操作的数据包大小,例如32字节,或64字节。
在本发明的实施例中可通过预设规则在预设最小MTU参数与终端的本机预设MTU参数之间的范围内选择一个MTU参数作为待测MTU参数。其中,预设规则可包括但不限于顺序查找法、二分查找法、二叉排序树查找法、哈希表法、分块查找法。
以二分查找法为例,待测MTU参数=(第一MTU参数+第二MTU参数)/2。
然后,使用所述待测MTU参数发送网络请求,并根据得到的网络请求响应是否为完整响应对待测MTU参数进行调整,并重新发送网络请求,根据得到的网络请求响应是否为完整响再次调整待测MTU参数,直至得到网络能够ping通的最大MTU参数。
在本发明的一个实施例中,使用所述待测MTU参数发送网络请求,并根据得到的网络请求响应调整所述待测MTU参数确定所述终端的所在网络支持的目标MTU参数可通过如图3所示的步骤实现。如图3所示,包括以下步骤:
S301,使用所述待测MTU参数发送网络请求。
S302,判断所述网络请求是否能够得到完整响应。
在本发明的实施例中,可使用待测MTU参数发送ping指令,以判断是否能够得到完整响应。具体地,可使用指令“ping-f-l MTU xx.xx.xx.xx”对某范围内的MTU大小进行测试,直至尝试一个合适的MTU参数。其中,上述指令中“MTU”为待测MTU参数,“xx.xx.xx.xx”为无法接收完整响应的HTTP请求的目标IP地址。
S303,如果所述网络请求能够得到完整响应,则根据预设策略增大所述待测MTU 参数。
在本发明的一个实施例中,如果使用待测MTU参数能ping通,则增大待测MTU参数。具体地,可将待测MTU参数作为下一次探测范围的最小MTU参数,即将待测MTU参数作为下次探测范围的下限,并从更新后的探测范围中根据上述预设规则重新选择待测MTU参数,并重复步骤S301-S302,并进行探测,直至重新选择前的待测MTU参数与重新选择后的待测MTU参数的差小于预设值时,得到能够接收到完整响应的可用最大MTU参数。
S304,如果所述网络请求不能得到完整响应,则根据预设策略降低所述待测MTU参数。
在本发明的一个实施例中,如果使用待测MTU参数不能ping通,则可降低所述待测MTU参数。具体地,可将待测MTU参数作为下一次探测范围的最大MTU参数,即将待测MTU参数作为下次探测范围的上限,并从更新后的探测范围中根据上述预设规则重新选择待测MTU参数,并重复步骤S301-S302,并进行探测,直至重新选择前的待测MTU参数与重新选择后的待测MTU参数的差小于预设值时,得到能够接收到完整响应的可用最大MTU参数。
S305,判断调整前的待测MTU参数与调整后的待测MTU参数的差是否小于预设值。
其中,预设值为一个很小的值,例如,可为0或者稍大于0的值。
S306,确定所述调整后的待测MTU参数为所述终端的所在网络支持的目标MTU参数。
如果调整前的待测MTU参数与调整后的待测MTU参数的差小于预设值,则执行S306,否则重复步骤S301-S306,直至调整后的待测MTU参数与调整前的待测MTU参数的差小于预设值。
需要说明的是,由于重新选择前的MTU参数与重新选择后的MTU参数之间相差很小,因此,可选择重新选择前的MTU参数与重新选择后的MTU参数中任意一个或者选择重新选择前的MTU参数与重新选择后的MTU参数的均值,作为终端的所在网络支持的目标MTU参数。
由此,通过上述步骤如此迭代,直至得到终端的所在网络支持的目标MTU参数,即能够接收到完整响应的可用最大MTU参数。
S102,将述终端的本机预设MTU参数调整为所述终端的所在网络支持的目标MTU参数。
由此,将终端本机预设MTU参数调整为探测终端所在网络能够ping通的最大MTU参数,能够有效避免数据丢包发生,提高请求响应的效率和成功率。
本申请实施例的终端最大传输单元的调整方法,可在终端出现网络请求响应异常,且该异常与MTU参数的设置相关时,自动探测终端的所在网络支持的目标MTU参数,并将终端本机预设MTU参数调整为该目标MTU参数,无需用户查找确认异常原因,能够及时、方便地发现问题、解决问题。更进一步地,对于便携式终端来说,由于其使用位置变更频率较高,更易出现因MTU参数设置问题导致网络请求响应异常的问题,通过本发明的实施例,能够及时针对变更的网络调整终端的MTU参数,有效地提高了请求异常的处理和网络请求响应效率。
在本发明的一个实施例中,如果所述网络请求响应异常与MTU参数的设置相关,则可提示用户对所述终端的本机预设MTU参数进行调整,并根据用户的指令调整终端的本机预设MTU参数。如图4所示,本发明另一个实施例的终端最大传输单元的调整方法,可包括以下步骤。
S401,当终端出现网络请求响应异常,且所述网络请求响应异常与MTU参数的设置相关时,提示用户对所述终端的本机预设MTU参数进行调整。
在本发明的一个实施例中,可通过但不限于以下方式对用户进行提示:
通过所述终端的显示器显示文字提示信息;
或者,通过所述终端的语音播报装置播报语音提示信息;
或者,与用户的移动终端进行通信,并将提示信息发送至用户的移动终端。
用户在查看提示信息后,可根据需要选择是否调整终端的本机预设MTU参数进行调整,如果需要调整,可输入确认调整指令。
S402,接收所述用户的调整指令。
S403,根据所述用户的调整指令探测所述终端的所在网络支持的目标MTU参数。
其中,探测终端的所在网络支持的目标MTU参数可参照图1所示实施例的具体实现方式,在此不进行详细说明。
进而,在探测到终端的所在网络支持的目标MTU参数后,可将述终端的本机预设MTU参数调整为所述终端的所在网络支持的目标MTU参数。
在本发明的一个实施例中,在探测所述终端的所在网络支持的目标MTU参数之后,还可包括:
S404,提示所述用户是否将述终端的本机预设MTU参数调整为所述终端的所在网络支持的目标MTU参数。
S405,在接收到所述用户的确认指令后,将述终端的本机预设MTU参数调整为所述终端的所在网络支持的目标MTU参数。
由此,通过将探测到的终端所在网络能够ping通的最大MTU参数,并提示用户可使用探测到的MTU参数调整终端本机预设MTU参数,能够便于用户了解探测结果,并选择是否进行相应操作。
与上述实施例提供的终端最大传输单元的调整方法相对应,本申请还提出一种终端最大传输单元的调整装置。
图5为根据本申请一个实施例的终端最大传输单元的调整装置的结构示意图。
如图5所示,根据本申请实施例的终端最大传输单元的调整装置,包括:探测模块10和调整模块20。
具体地,探测模块10设置为当终端出现网络请求响应异常,且所述网络请求响应异常与MTU参数的设置相关时,探测所述终端的所在网络支持的目标MTU参数。
需要说明的是,本发明实施例中的终端可以是因特网或者局域网的连接设备,例如,CPE(Customer Premise Equipment,客户终端设备)、数据上网卡等有线或无线路由设备。
终端出现网络请求响应异常,可能是由于多种原因造成的,例如,因网络故障、或者线路故障、或者设备故障或网络连接设置失败、或者因终端在与目标服务器建立TCP连接时的MTU参数大于网络的MTU参数而导致数据包发生截断。在本发明的一个实施例中,当移动终端出现的网络请求响应异常与MTU参数的设置相关时,触发探测移动终端的所在网络支持的目标MTU参数。在对终端的MTU参数进行调整前,可确定出现网络请求响应异常是由于终端本机预设MTU参数大于网络的MTU参数导致的。
在本发明的一个实施例中,,如果所述终端的网络请求不能得到完整响应,且所述终端的数据链路正常,则确定所述网络请求响应异常与MTU参数的设置相关。
也就是说,如果同时满足终端的网络请求不能得到完整响应且终端数据链路正常两个条件,则可确定网络请求响应异常是否与最大传输单元MTU参数的设置相关,并触发探测所述终端的所在网络支持的目标MTU参数。
在本发明的一个具体实施例中,当终端出现网络请求响应异常,且满足以下两个条件时探测模块10探测所述终端的所在网络支持的目标MTU参数:
条件1:部分或全部HTTP数据包一直不能收到完整的网络请求响应。
其中,完整的网络请求响应是指经过完整的HTTP通信协议得到的网络请求响应。
如图2所示,完整的HTTP通信协议可包括如下图四步:客户端(Client)与服务器(Server)建立连接、客户端发出请求信息、客户端收到服务器返回的网络请求响应信息以及关闭连接。由于路由不同,当数据包经过不同的网络节点,就可能出现MTU参数不同的情况。
当终端发送的数据包的MTU参数小于网络节点的MTU参数,功能正常,即上述完整的HTTP通信协议的四步都依次完成,则可确定接收到完整的网络请求响应。
当终端发送的数据包的MTU参数大于网络节点的MTU参数,功能异常,通常该网络节点是将大于本节点MTU参数的数据包丢弃。由于远程服务器没有收到数据,所以自然不会给终端响应数据,即无法接收到完整的网络请求响应。
条件2:默认ping包操作能收到该HTTP数据回复的数据。
目前操作系统默认的ping操作的数据包大小是32字节,或64字节。远小于网络的MTU参数,因此,如果默认的ping操作能ping通,说明数据链路正常。
如果数据链路不正常,可能是由于设备或线路故障等原因导致,但是如果数据链路正常,但收不到远程服务器的完整响应数据,即同时满足条件1和条件2,则可确定网络请求响应异常是否与最大传输单元MTU参数的设置相关。
本发明的实施例中,探测模块10可通过多种方式探测终端的所在网络支持的目标MTU参数。
其中,在本发明的一个实施例中,探测模块10可包括:确定单元11和调整单元12(图中未示出)。
确定单元11设置为根据所述终端的本机预设MTU参数和预设最小MTU参数确定待测MTU参数。其中,预设最小MTU参数可以是默认ping包操作的数据包大小,例如32字节,或64字节。
在本发明的实施例中,确定单元11可通过预设规则在预设最小MTU参数与终端的本机预设MTU参数之间的范围内选择一个MTU参数作为待测MTU参数。其中,预设规则可包括但不限于顺序查找法、二分查找法、二叉排序树查找法、哈希表法、分块查找法。
以二分查找法为例,待测MTU参数=(第一MTU参数+第二MTU参数)/2。
调整单元12设置为使用所述待测MTU参数发送网络请求,并根据得到的网络请求响应调整所述待测MTU参数确定所述终端的所在网络支持的目标MTU参数。
在本发明的一个实施例中,调整单元12可使用所述待测MTU参数发送网络请求,并根据得到的网络请求响应是否为完整响应对待测MTU参数进行调整,并重新发送网络请求,根据得到的网络请求响应是否为完整响再次调整待测MTU参数,直至得到网络能够ping通的最大MTU参数。
在本发明的一个实施例中,所述调整单元12可通过如图3所示的步骤探测所述终端的所在网络支持的目标MTU参数,具体过程与图3所示实施例相同。
调整模块20设置为将述终端的本机预设MTU参数调整为所述终端的所在网络支持的目标MTU参数
由此,调整模块20将终端本机预设MTU参数调整为探测终端所在网络能够ping通的最大MTU参数,能够有效避免数据丢包发生,提高请求网络请求响应的效率和成功率。
本申请实施例的终端最大传输单元的调整装置,可在终端出现网络请求响应异常,且该异常与MTU参数的设置相关时,自动探测终端的所在网络支持的目标MTU参数,并将终端本机预设MTU参数调整为该目标MTU参数,无需用户查找确认异常原因,能够及时、方便地发现问题、解决问题。更进一步地,对于便携式终端来说,由于其使用位置变更频率较高,更易出现因MTU参数设置问题导致网络请求响应异常的问题,通过本发明的实施例,能够及时针对变更的网络调整终端的MTU参数,有效地提高了请求异常的处理和网络请求响应效率。
图6为根据本申请另一个实施例的终端最大传输单元的调整装置的结构示意图。
如图6所示,根据本申请实施例的终端最大传输单元的调整装置,包括:探测模块10、调整模块20第一提示模块30、接收模块40、和第二提示模块50。
其中,探测模块10和调整模块20与图4所示实施例中相同。
第一提示模块30设置为当终端出现网络请求响应异常,且所述网络请求响应异常与MTU参数的设置相关时,提示用户对所述终端的本机预设MTU参数进行调整。
在本发明的一个实施例中,第一提示模块30可通过但不限于以下方式对用户进行提示:
通过所述终端的显示器显示文字提示信息;
或者,通过所述终端的语音播报装置播报语音提示信息;
或者,与用户的移动终端进行通信,并将提示信息发送至用户的移动终端。
用户在查看提示信息后,可根据需要选择是否调整终端的本机预设MTU参数进行调整,如果需要调整,可输入调整指令。
接收模块40设置为接收所述用户的调整指令。
其中,探测模块10根据所述用户的调整指令探测所述终端的所在网络支持的目标MTU参数。其中,探测模块10探测终端的所在网络支持的目标MTU参数可参照图5所示实施例的具体实现方式,在此不进行详细说明。
第二提示模块50设置为在探测所述终端的所在网络支持的目标MTU参数之后,提示所述用户是否将述终端的本机预设MTU参数调整为所述终端的所在网络支持的目标MTU参数。
其中,调整模块40在接收到所述用户的确认指令后,将述终端的本机预设MTU参数调整为所述终端的所在网络支持的目标MTU参数。
由此,通过将探测到的终端所在网络能够ping通的最大MTU参数,并提示用户可使用探测到的MTU参数调整终端本机预设MTU参数,能够便于用户了解探测结果,并选择是否进行相应操作。
本发明还提出一种终端设备。
根据本发明实施例的终端设备,包括本发明任一实施例的终端最大传输单元的调整装置,可在终端出现网络请求响应异常,且该异常与MTU参数的设置相关时,自动探测终端的所在网络支持的目标MTU参数,并将终端本机预设MTU参数调整为该目标MTU参数,无需用户查找确认异常原因,能够及时、方便地发现问题、解决问题。 更进一步地,对于便携式终端来说,由于其使用位置变更频率较高,更易出现因MTU参数设置问题导致网络请求响应异常的问题,通过本发明的实施例,能够及时针对变更的网络调整终端的MTU参数,有效地提高了请求异常的处理和网络请求响应效率。
流程图中或在此以其他方式描述的任何过程或方法描述可以被理解为,表示包括一个或更多个设置为实现特定逻辑功能或过程的步骤的可执行指令的代码的模块、片段或部分,并且本申请的优选实施方式的范围包括另外的实现,其中可以不按所示出或讨论的顺序,包括根据所涉及的功能按基本同时的方式或按相反的顺序,来执行功能,这应被本申请的实施例所属技术领域的技术人员所理解。
在流程图中表示或在此以其他方式描述的逻辑和/或步骤,例如,可以被认为是用于实现逻辑功能的可执行指令的定序列表,可以具体实现在任何计算机可读介质中,以供指令执行系统、装置或设备(如基于计算机的系统、包括处理器的系统或其他可以从指令执行系统、装置或设备取指令并执行指令的系统)使用,或结合这些指令执行系统、装置或设备而使用。就本说明书而言,"计算机可读介质"可以是任何可以包含、存储、通信、传播或传输程序以供指令执行系统、装置或设备或结合这些指令执行系统、装置或设备而使用的装置。计算机可读介质的更具体的示例(非穷尽性列表)包括以下:具有一个或多个布线的电连接部(电子装置),便携式计算机盘盒(磁装置),随机存取存储器(RAM),只读存储器(ROM),可擦除可编辑只读存储器(EPROM或闪速存储器),光纤装置,以及便携式光盘只读存储器(CDROM)。另外,计算机可读介质甚至可以是可在其上打印所述程序的纸或其他合适的介质,因为可以例如通过对纸或其他介质进行光学扫描,接着进行编辑、解译或必要时以其他合适方式进行处理来以电子方式获得所述程序,然后将其存储在计算机存储器中。
应当理解,本申请的各部分可以用硬件、软件、固件或它们的组合来实现。在上述实施方式中,多个步骤或方法可以用存储在存储器中且由合适的指令执行系统执行的软件或固件来实现。例如,如果用硬件来实现,和在另一实施方式中一样,可用本领域公知的下列技术中的任一项或他们的组合来实现:具有设置为对数据信号实现逻辑功能的逻辑门电路的离散逻辑电路,具有合适的组合逻辑门电路的专用集成电路,可编程门阵列(PGA),现场可编程门阵列(FPGA)等。
本技术领域的普通技术人员可以理解实现上述实施例方法携带的全部或部分步骤 是可以通过程序来指令相关的硬件完成,所述的程序可以存储于一种计算机可读存储介质中,该程序在执行时,包括方法实施例的步骤之一或其组合。
此外,在本申请各个实施例中的各功能单元可以集成在一个处理模块中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个模块中。上述集成的模块既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。所述集成的模块如果以软件功能模块的形式实现并作为独立的产品销售或使用时,也可以存储在一个计算机可读取存储介质中。
上述提到的存储介质可以是只读存储器,磁盘或光盘等。
在本说明书的描述中,参考术语“一个实施例”、“一些实施例”、“示例”、“具体示例”、或“一些示例”等的描述意指结合该实施例或示例描述的具体特征、结构、材料或者特点包含于本申请的至少一个实施例或示例中。在本说明书中,对上述术语的示意性表述不一定指的是相同的实施例或示例。而且,描述的具体特征、结构、材料或者特点可以在任何的一个或多个实施例或示例中以合适的方式结合。
尽管已经示出和描述了本申请的实施例,本领域的普通技术人员可以理解:在不脱离本申请的原理和宗旨的情况下可以对这些实施例进行多种变化、修改、替换和变型,本申请的范围由权利要求及其等同限定。
工业实用性
如上所述,本发明实施例提供的一种终端最大传输单元的调整方法和装置具有以下有益效果:能够及时针对变更的网络调整终端的MTU参数,有效地提高了请求异常的处理和网络请求响应效率。

Claims (13)

  1. 一种终端最大传输单元的调整方法,包括:
    当终端出现网络请求响应异常,且所述网络请求响应异常与MTU值参数的设置相关时,探测所述终端的所在网络支持的目标MTU参数;
    将述终端的本机预设MTU参数调整为所述终端的所在网络支持的目标MTU参数。
  2. 如权利要求1所述的方法,其中,
    如果所述终端的网络请求不能得到完整响应,且所述终端的数据链路正常,则确定所述网络请求响应异常与MTU参数的设置相关。
  3. 如权利要求1或2所述的方法,其中,探测所述终端的所在网络支持的目标MTU参数,包括:
    根据所述终端的本机预设MTU参数和预设最小MTU参数确定待测MTU参数;
    使用所述待测MTU参数发送网络请求,并根据得到的网络请求响应调整所述待测MTU参数确定所述终端的所在网络支持的目标MTU参数。
  4. 如权利要求3所述的方法,其中,所述使用所述待测MTU参数发送网络请求,并根据得到的网络请求响应调整所述待测MTU参数确定所述终端的所在网络支持的目标MTU参数,包括:
    使用所述待测MTU参数发送网络请求;
    判断所述网络请求是否能够得到完整响应;
    如果所述网络请求能够得到完整响应,则根据预设策略增大所述待测MTU参数;
    如果所述网络请求不能得到完整响应,则根据预设策略降低所述待测MTU参数;
    判断调整前的待测MTU参数与调整后的待测MTU参数的差是否小于预设值;
    如果调整前的待测MTU参数与调整后的待测MTU参数的差小于预设值,则确定所述调整后的待测MTU参数为所述终端的所在网络支持的目标MTU参数,如果调整前的待测MTU参数与调整后的待测MTU参数的差不小于预设值,则再次调整所述待测MTU参数,直至调整前的待测MTU参数与调整后的待测MTU参数的差小于预设值。
  5. 如权利要求1-4任一项所述的方法,其中,还包括:
    当终端出现网络请求响应异常,且所述网络请求响应异常与MTU参数的设置相关时,提示用户对所述终端的本机预设MTU参数进行调整;
    接收所述用户的调整指令;
    其中,根据所述用户的调整指令探测所述终端的所在网络支持的目标MTU参数。
  6. 如权利要求1-5任一项所述的方法,其中,在探测所述终端的所在网络支持的目标MTU参数之后,还包括:
    提示所述用户是否将述终端的本机预设MTU参数调整为所述终端的所在网络支持的目标MTU参数;
    其中,在接收到所述用户的确认指令后,将述终端的本机预设MTU参数调整为所述终端的所在网络支持的目标MTU参数。
  7. 一种终端最大传输单元的调整装置,包括:
    探测模块,设置为当终端出现网络请求响应异常,且所述网络请求响应异常与MTU参数的设置相关时,探测所述终端的所在网络支持的目标MTU参数;
    调整模块,设置为将述终端的本机预设MTU参数调整为所述终端的所在网络支持的目标MTU参数。
  8. 如权利要求7所述的装置,其中,如果所述终端的网络请求不能得到完整响应,且所述终端的数据链路正常,则确定所述网络请求响应异常与MTU参数的设置相关。
  9. 如权利要求7或8所述的装置,其中,所述探测模块包括:
    确定单元,设置为根据所述终端的本机预设MTU参数和预设最小MTU参数确定待测MTU参数;
    调整单元,设置为使用所述待测MTU参数发送网络请求,并根据得到的网络请求响应调整所述待测MTU参数确定所述终端的所在网络支持的目标MTU参数。
  10. 如权利要求9所述的装置,其中,所述调整单元,设置为执行:
    使用所述待测MTU参数发送网络请求;
    判断所述网络请求是否能够得到完整响应;
    如果所述网络请求能够得到完整响应,则根据预设策略增大所述待测MTU参数;
    如果所述网络请求不能得到完整响应,则根据预设策略降低所述待测MTU参数;
    判断调整前的待测MTU参数与调整后的待测MTU参数的差是否小于预设值;
    如果调整前的待测MTU参数与调整后的待测MTU参数的差小于预设值,则确定所述调整后的待测MTU参数为所述终端的所在网络支持的目标MTU参数,如果调整前的待测MTU参数与调整后的待测MTU参数的差不小于预设值,则再次调整所述待测MTU参数,直至调整前的待测MTU参数与调整后的待测MTU参数的差小于预设值。
  11. 如权利要求7-10任一项所述的装置,其中,还包括:
    第一提示模块,设置为当终端出现网络请求响应异常,且所述网络请求响应异常与MTU参数的设置相关时,提示用户对所述终端的本机预设MTU参数进行调整;
    接收模块,设置为接收所述用户的调整指令;
    其中,根据所述用户的调整指令探测所述终端的所在网络支持的目标MTU参数。
  12. 如权利要求7-11任一项所述的装置,其中,还包括:
    第二提示模块,设置为在探测所述终端的所在网络支持的目标MTU参数之后,提示所述用户是否将述终端的本机预设MTU参数调整为所述终端的所在网络支持的目标MTU参数;
    其中,所述调整模块在接收到所述用户的确认指令后,将述终端的本机预设MTU参数调整为所述终端的所在网络支持的目标MTU参数。
  13. 一种终端设备,包括如权利要求7-11任一项所述的终端最大传输单元的调整装置。
PCT/CN2016/100842 2016-05-03 2016-09-29 终端最大传输单元的调整方法、装置和终端设备 WO2017190467A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201610290279.0A CN107342885A (zh) 2016-05-03 2016-05-03 终端最大传输单元的调整方法、装置和终端设备
CN201610290279.0 2016-05-03

Publications (1)

Publication Number Publication Date
WO2017190467A1 true WO2017190467A1 (zh) 2017-11-09

Family

ID=60202653

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/100842 WO2017190467A1 (zh) 2016-05-03 2016-09-29 终端最大传输单元的调整方法、装置和终端设备

Country Status (2)

Country Link
CN (1) CN107342885A (zh)
WO (1) WO2017190467A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111654450A (zh) * 2020-05-28 2020-09-11 北京小米移动软件有限公司 数据传输方法及装置、存储介质

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110300026A (zh) * 2019-06-28 2019-10-01 北京金山云网络技术有限公司 一种网络连接故障处理方法及装置
CN111278011B (zh) * 2020-02-13 2023-07-21 海信视像科技股份有限公司 一种智能音箱的配网方法及智能音箱
CN111711858B (zh) * 2020-06-08 2022-10-14 苏州华兴源创科技股份有限公司 数据传输方法、装置、集成芯片及视频图像处理系统
CN112637882B (zh) * 2020-12-29 2023-05-12 京信网络系统股份有限公司 基站速率检测与修复方法、基站及设备
CN117319317A (zh) * 2023-10-16 2023-12-29 广州通则康威科技股份有限公司 一种调整cpe下挂设备mtu的方法、装置及存储介质

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1599361A (zh) * 2003-09-17 2005-03-23 西门子公司 在网络中传输分组数据的方法
CN1716943A (zh) * 2004-06-28 2006-01-04 杭州华为三康技术有限公司 获取隧道网关环境中路径最大传输长度的方法及系统
CN1812313A (zh) * 2005-01-26 2006-08-02 华为技术有限公司 无线链路控制层缓冲区溢出的控制方法
CN101197783A (zh) * 2007-12-28 2008-06-11 华为技术有限公司 一种传输数据报文的方法和转换器
CN101924689A (zh) * 2009-06-16 2010-12-22 中兴通讯股份有限公司 最大分段参数的协商方法及网络转发设备
CN102291318A (zh) * 2011-09-22 2011-12-21 杭州华三通信技术有限公司 一种最大传输单元协商的方法和路由器
US20150071067A1 (en) * 2011-08-12 2015-03-12 Talari Networks Incorporated Adaptive Private Network with Path Maximum Transmission Unit (MTU) Discovery Process

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102868609B (zh) * 2012-09-27 2018-03-13 中兴通讯股份有限公司 一种最大传输单元协商方法及数据终端

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1599361A (zh) * 2003-09-17 2005-03-23 西门子公司 在网络中传输分组数据的方法
CN1716943A (zh) * 2004-06-28 2006-01-04 杭州华为三康技术有限公司 获取隧道网关环境中路径最大传输长度的方法及系统
CN1812313A (zh) * 2005-01-26 2006-08-02 华为技术有限公司 无线链路控制层缓冲区溢出的控制方法
CN101197783A (zh) * 2007-12-28 2008-06-11 华为技术有限公司 一种传输数据报文的方法和转换器
CN101924689A (zh) * 2009-06-16 2010-12-22 中兴通讯股份有限公司 最大分段参数的协商方法及网络转发设备
US20150071067A1 (en) * 2011-08-12 2015-03-12 Talari Networks Incorporated Adaptive Private Network with Path Maximum Transmission Unit (MTU) Discovery Process
CN102291318A (zh) * 2011-09-22 2011-12-21 杭州华三通信技术有限公司 一种最大传输单元协商的方法和路由器

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111654450A (zh) * 2020-05-28 2020-09-11 北京小米移动软件有限公司 数据传输方法及装置、存储介质
US11606718B2 (en) 2020-05-28 2023-03-14 Beijing Xiaomi Mobile Software Co., Ltd. Method and device for data transmission, and storage medium
CN111654450B (zh) * 2020-05-28 2023-08-08 北京小米移动软件有限公司 数据传输方法及装置、存储介质

Also Published As

Publication number Publication date
CN107342885A (zh) 2017-11-10

Similar Documents

Publication Publication Date Title
WO2017190467A1 (zh) 终端最大传输单元的调整方法、装置和终端设备
US7471681B2 (en) Determining network path transmission unit
US7738495B2 (en) Method of determining a maximum transmission unit value of a network path using transport layer feedback
CN1938982B (zh) 通过认证因特网控制消息协议分组来防止网络攻击的方法和装置
US20190372864A1 (en) Control of network nodes in computer network systems
CN110999257B (zh) 用于服务器通知的递送的传送方法选择
US10419968B2 (en) Dynamic selection of TCP congestion control for improved performances
US10129722B2 (en) Service processing method and network device
US11677675B2 (en) Method and system for determining a path maximum transmission unit (MTU) between endpoints of a generic routing encapsulation (GRE) tunnel
WO2017035763A1 (zh) 一种IPv6网络中数据报文的发送方法及装置
US11711306B2 (en) Determining quality information for a route
CN106470136B (zh) 平台测试方法以及平台测试系统
TWI580226B (zh) 決定最大分段大小値之方法
CN104283882A (zh) 一种路由器的智能安全防护方法
US20200007427A1 (en) Path metric measurement
US9451018B2 (en) SCTP endpoint migration
Sinky et al. Seamless handoffs in wireless HetNets: Transport-layer challenges and multi-path TCP solutions with cross-layer awareness
US9509777B2 (en) Connection method and management server
US20220046118A1 (en) Transparent Proxy Conversion of Transmission Control Protocol (TCP) Fast Open Connection
CN115914164A (zh) 一种隧道连接方法、装置、电子设备和存储介质
US9256416B1 (en) Methods and apparatus for automatic session validation for distributed access points
CN102469016B (zh) 反向确定路径最大传输单元的方法和装置
US8811233B2 (en) Topology detection method and topology detection apparatus
WO2021103822A1 (zh) 用于获取共用最大分段大小mss的方法及装置
JP2017034627A (ja) 通信制御システムおよび通信制御方法

Legal Events

Date Code Title Description
NENP Non-entry into the national phase

Ref country code: DE

121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 16900989

Country of ref document: EP

Kind code of ref document: A1

122 Ep: pct application non-entry in european phase

Ref document number: 16900989

Country of ref document: EP

Kind code of ref document: A1