WO2013117090A1 - Data transmission method and device - Google Patents

Data transmission method and device Download PDF

Info

Publication number
WO2013117090A1
WO2013117090A1 PCT/CN2012/083403 CN2012083403W WO2013117090A1 WO 2013117090 A1 WO2013117090 A1 WO 2013117090A1 CN 2012083403 W CN2012083403 W CN 2012083403W WO 2013117090 A1 WO2013117090 A1 WO 2013117090A1
Authority
WO
WIPO (PCT)
Prior art keywords
network element
mtu value
modified
length
mtu
Prior art date
Application number
PCT/CN2012/083403
Other languages
French (fr)
Chinese (zh)
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 WO2013117090A1 publication Critical patent/WO2013117090A1/en

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/24Negotiation of communication capabilities
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/16Implementation or adaptation of Internet protocol [IP], of transmission control protocol [TCP] or of user datagram protocol [UDP]
    • H04L69/166IP fragmentation; TCP segmentation

Definitions

  • the present invention relates to the field of communications, and in particular, to a data transmission method and apparatus. Background technique
  • the mobile data service based on 3G (3rd-generation mobile communication technology, 3rd-generation) network can meet the needs of users to access broadband network services anytime and anywhere, and the speed of data transmission is fast, which has been favored by the market to a large extent.
  • 3G 3rd-generation mobile communication technology
  • the indoor coverage of 3G networks is not ideal, which directly affects the popularity and promotion of 3G services.
  • SGW Securtiy GateWay, Security Gateway
  • IPSEC Internet Protocol Security
  • the voice service and the data service in the 3G network can be encrypted by the IPSEC tunnel between the AP (Acess Point) and the SGW as needed, thereby increasing the length of the packet.
  • the AP needs to perform fragmentation processing on the packet for fragment transmission.
  • the transmission delay occurs during the transmission, which increases the burden on the AP. If there are too many slices, the load of the AP will be exceeded, which will cause the transmission of the packet to fail and reduce the stability of data transmission.
  • the embodiment of the present invention provides a data transmission method and device, which can avoid fragmentation of a message that needs to be transmitted, thereby reducing transmission delay and reducing the load of the AP, so as to improve transmission stability and transmission efficiency of the data message.
  • the embodiment of the present invention provides a data transmission method, where the method includes: acquiring, by a first network element, a length of an additional message added when transmitting a data message; During the establishment of the communication channel between the first network element and the second network element, the MTU (Maximum Transmission Unit) determined by the first network element and the second network element according to the length of the added additional message The maximum transmission unit value is modified such that the first network element transmits the data message according to the modified MTU value.
  • MTU Maximum Transmission Unit
  • the embodiment of the present invention further provides a data transmission apparatus, including a first network element, where the first network element includes:
  • An obtaining unit configured to acquire a length of an additional message added when transmitting a data message
  • An MTU modifying unit configured to determine, according to the length of the added additional packet, the first network element and the second network element, in a process of establishing a communication channel between the first network element and the second network element
  • the maximum transmission unit MTU value is modified such that the first network element transmits the data message according to the modified MTU value.
  • the data transmission method and device provided by the embodiment of the present invention can modify the MTU value according to the length of the added additional message when the MTU value is negotiated between the first network element and the second network element, so as to avoid the datagram that needs to be transmitted.
  • the text is fragmented.
  • the method provided by the embodiment of the present invention can avoid fragmentation in the process of transmitting data packets, reduce network processing delay, reduce the load of the first network element, and improve transmission stability and transmission efficiency of service data. .
  • FIG. 1 is a schematic flowchart of a data transmission method according to an embodiment of the present invention.
  • FIG. 2 is a schematic flowchart of a data transmission method according to another embodiment of the present invention.
  • FIG. 3 is a schematic flowchart of a data transmission method according to still another embodiment of the present invention.
  • FIG. 4 is a schematic structural diagram of a data transmission apparatus according to another embodiment of the present invention.
  • An embodiment of the present invention provides a data transmission method. As shown in FIG. 1, the method includes:
  • the first network element acquires the length of the additional message that is added when the data packet is transmitted.
  • the first network element is a network element device involved in a data transmission process, and may be
  • the AP may be another network element device that has a data transmission function.
  • the additional packet may be an encrypted message added when the data packet to be transmitted is encrypted, or may be a preset.
  • the message for other purposes is not limited here.
  • the first network element performs the first network element and the second network element according to the length of the added additional information in the process of establishing a communication channel between the first network element and the second network element.
  • the determined MTU value is modified such that the first network element transmits the data message according to the modified MTU value.
  • the second network element is a device that receives the data packet, and may be an SGW (Securtiy Gate Way) that receives the data packet, or may be another type of data packet receiving device. No restrictions are imposed.
  • the MTU value is the maximum amount of data that can be transmitted by a single data packet in the current communication channel determined by the first network element and the second network element when establishing a communication channel according to the TCP protocol.
  • the encrypted packet is added to the data packet, so that the length of the entire packet is increased, so that the first network element transmits the encrypted packet.
  • the need for fragmentation increases the load on the first network element and increases the transmission delay.
  • the modified MTU value is smaller than the initial MTU value, so that when the data packet to be transmitted by the first network element is encrypted, the packet length is increased, The data packet to be transmitted is fragmented, where the initial MTU value is determined by the first network element and the second network element after being negotiated according to a Transmission Control Protocol (TCP).
  • TCP Transmission Control Protocol
  • the first network element when the MTU value is negotiated between the first network element and the second network element, the first network element can modify the MTU value according to the length of the added additional message to avoid the need for the data.
  • the message to be transmitted is fragmented.
  • the method provided by the embodiment of the present invention can avoid fragmentation in the process of transmitting data packets, reduce network processing delay, reduce the load of the first network element, and improve transmission stability and transmission efficiency of service data. .
  • Another embodiment of the present invention provides a data transmission method. As shown in FIG. 2, the method includes:
  • the first network element receives a data packet sent by the terminal.
  • the first network element may be an AP (Acess Point), but is not limited thereto; the terminal may be a smart phone, a tablet, or the like.
  • the terminal sends the data packet to be transmitted to the first network element through an air interface, so that the first network element encrypts the data packet to ensure information security of the user data.
  • the terminal may also be other terminal devices such as a notebook computer.
  • the first network element acquires, according to a preset rule, a length of the additional message that is added when the data packet is transmitted.
  • the additional packet includes a packet header of a TCP packet specified by a Transmission Control Protocol (TCP), and an encrypted packet added when the data packet to be transmitted is encrypted according to a preset rule, but Not limited to this. For example, if the communication data packet is IPSEC encrypted during data transmission, an encrypted message needs to be added to the communication data packet to ensure the security of the user communication data.
  • TCP Transmission Control Protocol
  • the three-way handshake is performed according to the TCP protocol to establish a communication channel.
  • the method provided by the embodiment of the present invention may modify the MTU value in the process of establishing a communication channel between the first network element and the second network element. The specific process is as follows:
  • the first network element modifies its own MTU value according to the length of the added additional message, and uses the obtained result as the first modified MTU value. Specifically, the first network element may subtract the length of the additional packet from its own MTU value, and use the obtained result as the first modified MTU value.
  • the first network element sends a first SY (Synchronize Sequence Numbers) packet to the second network element to complete the first handshake.
  • the first SYN packet is used to notify the second network element to establish a connection.
  • the MTU value of the first network element is included.
  • the second network element may be an SGW (Securtiy GateWay, security gateway) that receives the data packet, or may be another type of data packet receiving device, which is not limited herein.
  • the first network element obtains the MTU value of the second network element from the second SYN packet, and subtracts the length of the additional packet from the MTU value of the second network element, and the obtained result is obtained.
  • the second modified MTU value As the second modified MTU value.
  • the first network element compares the first modified MTU value with the second modified MTU value, and selects a smaller value as the modified MTU value, according to the modified
  • the MTU value modifies the MSS (Maximum Segment Size) value in the second SYN packet, and the MSS value is used to characterize the MTU value.
  • the first network element sends a second ACK message to the second network element to complete a third handshake, to establish a communication channel between the first network element and the second network element to transmit a data packet.
  • the second ACK message is a response message about the second SYN packet.
  • the first network element performs encryption processing on the received data packet according to a preset rule to obtain an encrypted data packet. Specifically, after the data packet is encrypted, the encrypted packet is added, so the length of the data packet is increased after being encrypted.
  • the first network element can establish an IPSEC (Internet Protocol Security) tunnel with the second network element, and perform IPSEC encryption on the data packet.
  • IPSEC Internet Protocol Security
  • the MTU value is the maximum amount of data that can be transmitted by a single data packet in the current communication channel determined by the first network element and the second network element when establishing a communication channel according to the TCP protocol.
  • the encrypted packet is added to the data packet, so that the length of the entire packet is increased, so that the first network element transmits the encrypted packet.
  • the need for fragmentation increases the load on the first network element and increases the transmission delay.
  • the modified MTU value is smaller than the MTU value that can be actually transmitted in the current network, the difference is the length of the increased encrypted message, so when the encrypted data packet is transmitted, Avoid sharding.
  • the first network element sends the encrypted data packet to the second network element to complete the transmission of the data packet.
  • the data transmission method provided by the embodiment of the present invention is mainly applied to the uBro networking mode, and can also be applied to an Ethernet network using other networking modes, which is not limited herein.
  • the method provided by the embodiment of the present invention implements a scenario in which an AP sends a data packet to the SGW. It can be seen that the method provided by the embodiment of the present invention can also implement a scenario in which the SGW sends a data packet to the AP. At this time, the first network element is the SGW, and the second network element is the AP. That is to say, the method provided by the embodiment of the present invention can implement data transmission between two network element devices in a data transmission process, and details are not described herein again.
  • the first network element when the first network element negotiates the MTU value with the second network element, the first network element can modify the MTU value according to the length of the added additional message to avoid the need for transmission.
  • the message is fragmented.
  • the method provided by the embodiment of the present invention can avoid fragmentation in the process of transmitting data packets, reduce network processing delay, reduce the load of the first network element, and improve transmission stability and transmission efficiency of the service data.
  • Another embodiment of the present invention provides a data transmission method. As shown in FIG. 3, the method includes: 301. A first network element receives a data packet sent by a terminal.
  • the first network element may be an AP (Acess Point), but is not limited thereto; the terminal may be a smart phone, a tablet computer, etc.
  • the data packet that the terminal needs to transmit is The text is sent to the first network element through an air interface, so that the first network element performs encryption processing on the data packet to ensure information security of the user data.
  • the terminal may also be other terminal devices such as a notebook computer.
  • the additional packet includes a packet header of a TCP packet specified by a TCP protocol, and a root
  • the encrypted message added when the data packet to be transmitted is encrypted according to a preset rule, but is not limited thereto. For example, if the communication data packet is IPSEC encrypted during data transmission, an encrypted message needs to be added to the communication data packet to ensure the security of the user communication data.
  • the second network element may be an SGW that receives the data packet, or may be another type of data packet receiving device, which is not limited herein.
  • the network element device between the first network element and the second network element supports an ICMP (Internet Control Message Protocol) detection, and the first network element and the first network element During the process of establishing a communication channel between the two network elements, the minimum MTU value allowed to pass between the first network element and the second network element is detected.
  • the network element device can automatically detect the minimum MTU value allowed to pass between the first network element and the second network element.
  • the network element device can be a router or a switch, and is not limited thereto.
  • the first network element subtracts the length of the additional packet from the minimum MTU value allowed to pass between the first network element and the second network element, to obtain a modified MTU value, according to the modified MTU.
  • the value is modified for the SYN packet sent during the three-way handshake.
  • the first network element may modify the MSS value in the SYN packet according to the modified MTU value, where the MSS value is used to represent the MTU value.
  • the first network element performs encryption processing on the received data packet according to a preset rule, to obtain an encrypted data packet. Specifically, after the data packet is encrypted, the encrypted packet is added, so the length of the data packet is increased after being encrypted. Generally, the first network element can establish an IPSEC tunnel with the second network element, and perform IPSEC encryption on the data packet.
  • the first network element may further reduce the modified MTU value, so that the modified MTU value is greater than or equal to the MTU value that can be actually transmitted in the current network, to ensure encryption.
  • the length of the data packet is less than or equal to the maximum packet length that can be transmitted in the current network.
  • the first network element sends the encrypted data packet to the second network element to complete the transmission of the data packet.
  • the data transmission method provided by the embodiment of the present invention is mainly applied to the uBro networking mode, and can also be applied to an Ethernet network using other networking modes, which is not limited herein.
  • the method provided by the embodiment of the present invention implements a scenario in which an AP sends a data packet to the SGW. It can be seen that the method provided by the embodiment of the present invention can also implement a scenario in which the SGW sends a data packet to the AP. At this time, the first network element is the SGW, and the second network element is the AP. That is to say, the method provided by the embodiment of the present invention can implement data transmission between two network element devices in a data transmission process, and details are not described herein again.
  • the network element device can detect the minimum MTU value allowed to pass between the first network element and the second network element, and the first network element can be configured according to the length of the added additional message.
  • the minimum MTU value is modified to avoid fragmentation of the packets that need to be transmitted.
  • fragmentation can be avoided in the process of transmitting data packets, network processing delay can be reduced, load of the first network element can be reduced, and transmission stability and transmission efficiency of service data can be improved.
  • a further embodiment of the present invention provides a data transmission apparatus. As shown in FIG. 4, the data transmission apparatus includes a first network element, and the method of the first network element side in the foregoing method embodiment is implemented.
  • the network element includes:
  • the obtaining unit 41 is configured to acquire a length of the additional message that is added when the data message is transmitted;
  • the MTU modifying unit 42 is configured to: when the communication channel is established between the first network element and the second network element, the first network element and the second network element according to the length of the added additional message The determined MTU value is modified such that the first network element transmits the data message according to the modified MTU value.
  • the second network element is a device that receives the data packet.
  • the MTU modifying unit 42 is specifically configured to: when the first network element and the second network element perform a three-way handshake according to a Transmission Control Protocol (TCP) to establish a communication channel, according to the additional message
  • TCP Transmission Control Protocol
  • the length of the MTU value determined by the first network element and the second network element is modified, so that the first network element transmits the data packet according to the modified MTU value.
  • the MTU modification unit 42 includes a first modification subunit 421, a second modification subunit 422, and a processing subunit 423, where:
  • the first modification sub-unit 421 is configured to: when the first network element performs the first handshake with the second network element, subtract the length of the additional message from the MTU value of the first network element to obtain the first time The modified MTU value;
  • the second modification sub-unit 422 is configured to: when the first network element performs a second handshake with the second network element, obtain the MTU value of the second network element, and subtract the MTU value of the second network element from the The length of the additional message is obtained, and the MTU value after the second modification is obtained;
  • the processing sub-unit 423 is configured to compare the first modified MTU value with the second modified MTU value, and select a smaller value as the modified MTU value, so that the first The network element transmits the data packet according to the modified MTU value.
  • the MTU modification unit 42 further includes an MTU acquisition subunit 424 and a third modification subunit 425, where:
  • the MTU obtaining sub-unit 424 is configured to acquire the foregoing information from the network element device between the first network element and the second network element in the process of establishing a communication channel between the first network element and the second network element. a minimum MTU value allowed to pass between a network element and a second network element, where the network element device supports ICMP detection, and can detect a minimum MTU value allowed to pass between the first network element and the second network element.
  • the network element device may be a router or a switch, which is not limited herein;
  • the third modification sub-unit 425 is configured to subtract the length of the additional packet from the minimum allowed MTU value to obtain a modified MTU value, so that the first network element is based on the modified MTU value. Transmitting the data message.
  • the data transmission apparatus provided by the embodiment of the present invention is mainly applied to the uBro networking mode, but can also be applied to an Ethernet network that uses other networking modes, which is not limited herein.
  • the data transmission device provided by the embodiment of the present invention can modify the minimum MTU value allowed to be transmitted between the data transmission devices according to the length of the added additional message to avoid fragmentation of the message to be transmitted.
  • the device provided by the embodiment of the present invention can avoid fragmentation in the process of transmitting data packets, reduce network processing delay, reduce the load of the first network element, and improve transmission stability and transmission efficiency of service data.
  • the present invention can be implemented by means of software plus necessary general hardware, and of course, by hardware, but in many cases, the former is a better implementation. .
  • the technical solution of the present invention which is essential or contributes to the prior art, may be embodied in the form of a software product stored in a readable storage medium, such as a floppy disk of a computer.
  • a hard disk or optical disk or the like includes instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to perform the methods described in various embodiments of the present invention.

Abstract

Disclosed are a data transmission method and device, which relate to the field of communications, and are used for avoiding generating fragments when transmitting a data message. The method provided in the present invention comprises: a first network element obtaining the length of an extra message which is added when transmitting a data message; and in the process of establishing a communication channel between the first network element and a second network element, according to the length of the added extra message, modifying a maximum transmission unit (MTU) value determined by the first network element and the second network element, so that the first network element transmits the data message according to the modified MTU value. The present invention is applied to the field of communications, and is used for transmitting a data message.

Description

数据传输方法及装置 本申请要求于 2012年 2月 8 日提交中国专利局、 申请号为  Data transmission method and device The application is submitted to the Chinese Patent Office on February 8, 2012, and the application number is
201 21 0027471 . 2 、 发明名称为 "数据传输方法及装置" 的中国专利申请的 优先权, 其全部内容通过引用结合在本申请中。 技术领域 201 21 0027471. The priority of the invention is the priority of the Chinese patent application, the entire disclosure of which is incorporated herein by reference. Technical field
本发明涉及通信领域, 尤其涉及一种数据传输方法及装置。 背景技术  The present invention relates to the field of communications, and in particular, to a data transmission method and apparatus. Background technique
基于 3G (第三代移动通信技术, 3rd-generation ) 网络的移动数据业务能够 满足用户随时随地接入宽带网络业务的需求, 且传输数据的速度较快, 得到了 市场较大程度的青睐。 然而, 由于 3G频率高, 衰减大, 导致 3G网络在室内的 覆盖不理想, 直接影响到 3G业务的普及和推广。 为了确保 3G网络在室内的覆 盖程度、 以及为了保证用户的信息安全, 需要配置 SGW ( Securtiy GateWay, 安 全网关) 以建立 IPSEC ( Internet protocol security, 因特网协议安全性) 隧道, 并对通信数据内容进行加密。 3G网络中的语音业务和数据业务可以根据需要在 AP ( Acess Point, 接入点)和 SGW之间通过 IPSEC隧道进行加密, 从而会增 加报文的长度。 当报文的长度过长时, 需要 AP对该报文进行分片处理以进行分 片传输; 釆用分片传输时会在传输过程中造成传输时延, 增加 AP的负担, 当报 文分片过多时会超出 AP的负荷,会导致报文的传输发生故障, 降低数据传输的 稳定性。 发明内容  The mobile data service based on 3G (3rd-generation mobile communication technology, 3rd-generation) network can meet the needs of users to access broadband network services anytime and anywhere, and the speed of data transmission is fast, which has been favored by the market to a large extent. However, due to the high frequency of 3G and large attenuation, the indoor coverage of 3G networks is not ideal, which directly affects the popularity and promotion of 3G services. In order to ensure the coverage of the 3G network indoors and to ensure the security of users' information, it is necessary to configure an SGW (Securtiy GateWay, Security Gateway) to establish an IPSEC (Internet Protocol Security) tunnel and encrypt the communication data content. . The voice service and the data service in the 3G network can be encrypted by the IPSEC tunnel between the AP (Acess Point) and the SGW as needed, thereby increasing the length of the packet. When the length of the packet is too long, the AP needs to perform fragmentation processing on the packet for fragment transmission. When the fragment transmission is used, the transmission delay occurs during the transmission, which increases the burden on the AP. If there are too many slices, the load of the AP will be exceeded, which will cause the transmission of the packet to fail and reduce the stability of data transmission. Summary of the invention
本发明的实施例提供一种数据传输方法及装置, 能够避免对需要传输的报 文进行分片,从而减少传输时延并减轻 AP的负荷, 以提高数据报文的传输稳定 性和传输效率。  The embodiment of the present invention provides a data transmission method and device, which can avoid fragmentation of a message that needs to be transmitted, thereby reducing transmission delay and reducing the load of the AP, so as to improve transmission stability and transmission efficiency of the data message.
为达到上述目的, 本发明的实施例釆用如下技术方案:  In order to achieve the above object, embodiments of the present invention use the following technical solutions:
一方面, 本发明实施例提供了一种数据传输方法, 所述方法包括: 第一网元获取在传输数据报文时增加的附加报文的长度; 在所述第一网元与第二网元之间建立通信信道的过程中, 根据所述增加的 附加报文的长度对所述第一网元与第二网元确定的 MTU ( Maximum Transmission Unit, 最大传输单元)值进行修改, 以使得所述第一网元根据修改 后的 MTU值传输所述数据报文。 In one aspect, the embodiment of the present invention provides a data transmission method, where the method includes: acquiring, by a first network element, a length of an additional message added when transmitting a data message; During the establishment of the communication channel between the first network element and the second network element, the MTU (Maximum Transmission Unit) determined by the first network element and the second network element according to the length of the added additional message The maximum transmission unit value is modified such that the first network element transmits the data message according to the modified MTU value.
另一方面, 本发明实施例还提供了一种数据传输装置, 包括第一网元, 所 述第一网元包括:  On the other hand, the embodiment of the present invention further provides a data transmission apparatus, including a first network element, where the first network element includes:
获取单元, 用于获取在传输数据报文时增加的附加报文的长度;  An obtaining unit, configured to acquire a length of an additional message added when transmitting a data message;
MTU修改单元, 用于在所述第一网元与第二网元之间建立通信信道的过程 中, 根据所述增加的附加报文的长度对所述第一网元与第二网元确定的最大传 输单元 MTU值进行修改, 以使得所述第一网元根据修改后的 MTU值传输所述 数据报文。  An MTU modifying unit, configured to determine, according to the length of the added additional packet, the first network element and the second network element, in a process of establishing a communication channel between the first network element and the second network element The maximum transmission unit MTU value is modified such that the first network element transmits the data message according to the modified MTU value.
本发明实施例提供的数据传输方法及装置, 在第一网元与第二网元协商 MTU值时, 能够根据增加的附加报文的长度对 MTU值进行修改, 以避免对需 要传输的数据报文进行分片。 釆用本发明实施例提供的方法, 能够在传输数据 报文的过程中避免分片, 减少网络处理时延, 同时还能减轻第一网元的负荷, 提高业务数据的传输稳定性和传输效率。 附图说明  The data transmission method and device provided by the embodiment of the present invention can modify the MTU value according to the length of the added additional message when the MTU value is negotiated between the first network element and the second network element, so as to avoid the datagram that needs to be transmitted. The text is fragmented. The method provided by the embodiment of the present invention can avoid fragmentation in the process of transmitting data packets, reduce network processing delay, reduce the load of the first network element, and improve transmission stability and transmission efficiency of service data. . DRAWINGS
为了更清楚地说明本发明实施例或现有技术中的技术方案, 下面将对实施 例或现有技术描述中所需要使用的附图作简单地介绍, 显而易见地, 下面描述 中的附图仅仅是本发明的一些实施例, 对于本领域普通技术人员来讲, 在不付 出创造性劳动的前提下, 还可以根据这些附图获得其他的附图。  In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the embodiments or the description of the prior art will be briefly described below. Obviously, the drawings in the following description are only It is a certain embodiment of the present invention, and other drawings can be obtained from those skilled in the art without any creative work.
图 1为本发明一实施例提供的数据传输方法的流程示意图;  1 is a schematic flowchart of a data transmission method according to an embodiment of the present invention;
图 2为本发明另一实施例提供的数据传输方法的流程示意图;  2 is a schematic flowchart of a data transmission method according to another embodiment of the present invention;
图 3为本发明再一实施例提供的数据传输方法的流程示意图;  3 is a schematic flowchart of a data transmission method according to still another embodiment of the present invention;
图 4-图 6为本发明又一实施例提供的数据传输装置的结构示意图。  FIG. 4 is a schematic structural diagram of a data transmission apparatus according to another embodiment of the present invention.
具体实施方式 下面将结合本发明实施例中的附图, 对本发明实施例中的技术方案进行清 楚、 完整地描述, 显然, 所描述的实施例仅仅是本发明一部分实施例, 而不是 全部的实施例。 基于本发明中的实施例, 本领域普通技术人员在没有作出创造 性劳动前提下所获得的所有其他实施例, 都属于本发明保护的范围。 detailed description The technical solutions in the embodiments of the present invention are clearly and completely described in the following with reference to the accompanying drawings in the embodiments of the present invention. It is obvious that the described embodiments are only a part of the embodiments of the present invention, but not all of the embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative efforts are within the scope of the present invention.
本发明一实施例提供了一种数据传输方法, 如图 1所示, 所述方法包括: An embodiment of the present invention provides a data transmission method. As shown in FIG. 1, the method includes:
101、 第一网元获取在传输数据报文时增加的附加报文的长度。 101. The first network element acquires the length of the additional message that is added when the data packet is transmitted.
具体的, 所述第一网元是数据传输过程中涉及到的一个网元设备, 可以是 Specifically, the first network element is a network element device involved in a data transmission process, and may be
AP ( Acess Point, 接入点), 也可以是具备数据发送功能的其他网元设备; 所述 附加报文可以是对待传输数据报文进行加密时增加的加密报文, 也可以是预设 的实现其他用途的报文, 此处不做限定。 The AP (Acess Point) may be another network element device that has a data transmission function. The additional packet may be an encrypted message added when the data packet to be transmitted is encrypted, or may be a preset. The message for other purposes is not limited here.
102、 在所述第一网元与第二网元之间建立通信信道的过程中, 第一网元根 据所述增加的附加 4艮文的长度对所述第一网元与第二网元确定的 MTU值进行 修改, 以使得所述第一网元根据修改后的 MTU值传输所述数据报文。 其中, 所 述第二网元是接收所述数据报文的设备, 可以是接收所述数据报文的 SGW ( Securtiy Gate Way, 安全网关), 也可以是其他类型的数据报文接收设备, 此处 不做限定。  102. The first network element performs the first network element and the second network element according to the length of the added additional information in the process of establishing a communication channel between the first network element and the second network element. The determined MTU value is modified such that the first network element transmits the data message according to the modified MTU value. The second network element is a device that receives the data packet, and may be an SGW (Securtiy Gate Way) that receives the data packet, or may be another type of data packet receiving device. No restrictions are imposed.
值得说明的是, MTU值是第一网元和第二网元根据 TCP协议建立通信信道 时、 确定的当前通信信道内单个数据包能够传输的最大数据量。 当在数据传输 过程中需要对数据报文进行加密时, 需要在所述数据报文中增加加密报文, 使 得整个报文的长度增大, 导致第一网元在传输加密后的报文时需要分片, 会增 加第一网元的负荷以及增加传输时延。  It is worth noting that the MTU value is the maximum amount of data that can be transmitted by a single data packet in the current communication channel determined by the first network element and the second network element when establishing a communication channel according to the TCP protocol. When the data packet needs to be encrypted in the data transmission process, the encrypted packet is added to the data packet, so that the length of the entire packet is increased, so that the first network element transmits the encrypted packet. The need for fragmentation increases the load on the first network element and increases the transmission delay.
具体的, 在本实施例提供的数据传输方法中, 修改后的 MTU值小于初始 MTU值, 以使得在第一网元对待传输的数据报文进行加密处理导致报文长度增 加的情况下, 无需对所述待传输的数据报文进行分片, 其中, 初始 MTU值由第 一网元与第二网元根据 TCP ( Transmission Control Protocol , 传输控制协议)进 行协商后确定。  Specifically, in the data transmission method provided in this embodiment, the modified MTU value is smaller than the initial MTU value, so that when the data packet to be transmitted by the first network element is encrypted, the packet length is increased, The data packet to be transmitted is fragmented, where the initial MTU value is determined by the first network element and the second network element after being negotiated according to a Transmission Control Protocol (TCP).
本发明实施例提供的数据传输方法, 在第一网元与第二网元协商 MTU值 时, 第一网元能够根据增加的附加报文的长度对 MTU值进行修改, 以避免对需 要传输的报文进行分片。 釆用本发明实施例提供的方法, 能够在传输数据报文 的过程中避免分片, 减少网络处理时延, 同时还能减轻第一网元的负荷, 提高 业务数据的传输稳定性和传输效率。 本发明另一实施例提供了一种数据传输方法, 如图 2所示, 所述方法包括:In the data transmission method provided by the embodiment of the present invention, when the MTU value is negotiated between the first network element and the second network element, the first network element can modify the MTU value according to the length of the added additional message to avoid the need for the data. The message to be transmitted is fragmented. The method provided by the embodiment of the present invention can avoid fragmentation in the process of transmitting data packets, reduce network processing delay, reduce the load of the first network element, and improve transmission stability and transmission efficiency of service data. . Another embodiment of the present invention provides a data transmission method. As shown in FIG. 2, the method includes:
201、 第一网元接收终端发送的数据报文。 201. The first network element receives a data packet sent by the terminal.
具体的, 所述第一网元可以是 AP ( Acess Point, 接入点), 但不仅限于此; 所述终端可以是智能手机、 平板电脑等。 一般的, 终端将需要传输的数据报文 通过空口发送给所述第一网元, 以便于所述第一网元对所述数据报文进行加密 处理, 以确保用户数据的信息安全。 可选的, 所述终端也可以是笔记本电脑等 其他终端设备。  Specifically, the first network element may be an AP (Acess Point), but is not limited thereto; the terminal may be a smart phone, a tablet, or the like. Generally, the terminal sends the data packet to be transmitted to the first network element through an air interface, so that the first network element encrypts the data packet to ensure information security of the user data. Optionally, the terminal may also be other terminal devices such as a notebook computer.
202、 第一网元根据预设规则获取在传输数据报文时增加的附加报文的长 度。  202. The first network element acquires, according to a preset rule, a length of the additional message that is added when the data packet is transmitted.
具体的, 所述附加报文包括 TCP ( Transmission Control Protocol, 传输控制 协议)规定的 TCP数据包的报文头, 以及根据预设规则对待传输的数据报文进 行加密时增加的加密报文, 但不仅限于此。 例如, 在数据传输过程中对通信数 据报文进行 IPSEC加密, 则需要对所述通信数据报文增加加密报文以确保用户 通信数据的安全性。  Specifically, the additional packet includes a packet header of a TCP packet specified by a Transmission Control Protocol (TCP), and an encrypted packet added when the data packet to be transmitted is encrypted according to a preset rule, but Not limited to this. For example, if the communication data packet is IPSEC encrypted during data transmission, an encrypted message needs to be added to the communication data packet to ensure the security of the user communication data.
一般的, 在传输数据之前, 需要根据 TCP协议进行三次握手以建立通信信 道, 本发明实施例提供的方法可以在第一网元与第二网元建立通信信道的过程 中对 MTU值进行修改 , 具体过程如下:  Generally, before the data is transmitted, the three-way handshake is performed according to the TCP protocol to establish a communication channel. The method provided by the embodiment of the present invention may modify the MTU value in the process of establishing a communication channel between the first network element and the second network element. The specific process is as follows:
203、 第一网元根据所述增加的附加报文的长度, 对自身的 MTU值进行修 改, 将得到的结果作为第一次修改后的 MTU值。 具体的, 第一网元可以从自身 的 MTU值中减去所述附加报文的长度,将得到的结果作为第一次修改后的 MTU 值。  203. The first network element modifies its own MTU value according to the length of the added additional message, and uses the obtained result as the first modified MTU value. Specifically, the first network element may subtract the length of the additional packet from its own MTU value, and use the obtained result as the first modified MTU value.
204、 第一网元向第二网元发送第一 SY (Synchronize Sequence Numbers, 同步序列编号)包以完成第一次握手,所述第一 SYN包用于通知所述第二网元建 立连接, 其中包括所述第一网元的 MTU值。 具体的, 所述第二网元具体可以是接收所述数据报文的 SGW ( Securtiy GateWay, 安全网关), 也可以是其他类型的数据报文接收设备, 此处不做限定The first network element sends a first SY (Synchronize Sequence Numbers) packet to the second network element to complete the first handshake. The first SYN packet is used to notify the second network element to establish a connection. The MTU value of the first network element is included. Specifically, the second network element may be an SGW (Securtiy GateWay, security gateway) that receives the data packet, or may be another type of data packet receiving device, which is not limited herein.
205、 第二网元接收所述第一 SYN 包, 向所述第一网元返回第一 ACK ( Acknowledgement, 确认) 消息以及第二 SYN 包以完成第二次握手, 其中, 所述第一 ACK消息是关于所述第一 SYN包的应答消息, 所述第二 SYN包用于 指示所述第一网元建立连接, 其中包括所述第二网元的 MTU值。 205. The second network element receives the first SYN packet, and returns a first ACK (Acknowledgement) message and a second SYN packet to the first network element to complete a second handshake, where the first ACK is performed. The message is a response message about the first SYN packet, and the second SYN packet is used to indicate that the first network element establishes a connection, where the MTU value of the second network element is included.
206、 第一网元从所述第二 SYN包中获取所述第二网元的 MTU值, 并将所 述第二网元的 MTU值减去所述附加报文的长度,将得到的结果作为第二次修改 后的 MTU值。  The first network element obtains the MTU value of the second network element from the second SYN packet, and subtracts the length of the additional packet from the MTU value of the second network element, and the obtained result is obtained. As the second modified MTU value.
207、第一网元将所述第一次修改后的 MTU值与所述第二次修改后的 MTU 值进行比对, 从中选取较小值作为修改后的 MTU值, 根据所述修改后的 MTU 值对所述第二 SYN包中的 MSS ( Maximum Segment Size, 最大分段大小)值进 行修改, 所述 MSS值用于表征 MTU值。  207. The first network element compares the first modified MTU value with the second modified MTU value, and selects a smaller value as the modified MTU value, according to the modified The MTU value modifies the MSS (Maximum Segment Size) value in the second SYN packet, and the MSS value is used to characterize the MTU value.
208、所述第一网元向所述第二网元发送第二 ACK消息以完成第三次握手, 以在所述第一网元与第二网元之间建立通信信道以传输数据报文, 其中, 所述 第二 ACK消息是关于所述第二 SYN包的应答消息。  208. The first network element sends a second ACK message to the second network element to complete a third handshake, to establish a communication channel between the first network element and the second network element to transmit a data packet. The second ACK message is a response message about the second SYN packet.
209、 第一网元根据预设规则对接收到的数据报文进行加密处理, 得到加密 后的数据报文。 具体的, 所述数据报文经过加密处理之后增加了加密的报文, 所以数据报文在加密后长度会增加。 一般的, 第一网元可以与第二网元建立 IPSEC ( Internet protocol security, 因特网协议安全性) 隧道, 对数据报文进行 IPSEC加密。  209. The first network element performs encryption processing on the received data packet according to a preset rule to obtain an encrypted data packet. Specifically, after the data packet is encrypted, the encrypted packet is added, so the length of the data packet is increased after being encrypted. Generally, the first network element can establish an IPSEC (Internet Protocol Security) tunnel with the second network element, and perform IPSEC encryption on the data packet.
值得说明的, MTU值是第一网元和第二网元根据 TCP协议建立通信信道 时、 确定的当前通信信道内单个数据包能够传输的最大数据量。 当在数据传输 过程中需要对数据报文进行加密时, 需要在所述数据报文中增加加密报文, 使 得整个报文的长度增大, 导致第一网元在传输加密后的报文时需要分片, 会增 加第一网元的负荷以及增加传输时延。 在本发明实施例中, 由于修改后的 MTU 值与当前网络中实际能够传输的 MTU值相比较小,其差值为增加的加密报文的 长度, 所以在传输加密后的数据报文时能够避免分片。 可选的, 第一网元在对 MTU值进行修改时, 也可以进一步减小修改后的 MTU值, 使得修改后的 MTU值大于或等于当前网络中实际能够传输的 MTU 值, 以确保加密后的数据报文的长度小于或等于当前网络中实际能够传输的最 大报文长度。 It is worth noting that the MTU value is the maximum amount of data that can be transmitted by a single data packet in the current communication channel determined by the first network element and the second network element when establishing a communication channel according to the TCP protocol. When the data packet needs to be encrypted in the data transmission process, the encrypted packet is added to the data packet, so that the length of the entire packet is increased, so that the first network element transmits the encrypted packet. The need for fragmentation increases the load on the first network element and increases the transmission delay. In the embodiment of the present invention, since the modified MTU value is smaller than the MTU value that can be actually transmitted in the current network, the difference is the length of the increased encrypted message, so when the encrypted data packet is transmitted, Avoid sharding. Optionally, when the MTU value is modified, the first network element may further reduce the modified MTU value, so that the modified MTU value is greater than or equal to the MTU value that can be actually transmitted in the current network, to ensure encryption. The length of the data packet is less than or equal to the maximum packet length that can be transmitted in the current network.
210、 第一网元将加密后的数据报文发送至第二网元, 以完成数据报文的传 输。  210. The first network element sends the encrypted data packet to the second network element to complete the transmission of the data packet.
值得说明的是, 本发明实施例提供的数据传输方法主要应用于 uBro组网模 式, 也可以应用于釆用其他组网模式的以太网网络, 此处不做限定。  It should be noted that the data transmission method provided by the embodiment of the present invention is mainly applied to the uBro networking mode, and can also be applied to an Ethernet network using other networking modes, which is not limited herein.
本发明实施例提供的方法实现的是 AP向 SGW发送数据报文的场景。 显而 易见的 ,本发明实施例提供的方法也可以实现 SGW向 AP发送数据报文的场景, 此时, 第一网元为 SGW, 第二网元为 AP。 也就是说, 本发明实施例提供的方 法可以实现数据传输过程中 2个网元设备之间的数据传输, 此处不再赘述。  The method provided by the embodiment of the present invention implements a scenario in which an AP sends a data packet to the SGW. It can be seen that the method provided by the embodiment of the present invention can also implement a scenario in which the SGW sends a data packet to the AP. At this time, the first network element is the SGW, and the second network element is the AP. That is to say, the method provided by the embodiment of the present invention can implement data transmission between two network element devices in a data transmission process, and details are not described herein again.
本发明实施例提供的数据传输方法, 在第一网元与第二网元协商 MTU值 时, 第一网元能够根据增加的附加报文的长度对 MTU值进行修改, 以避免对需 要传输的报文进行分片。 釆用本发明实施例提供的方法, 能够在传输数据报文 的过程中避免分片, 减少网络处理时延, 同时还能减轻第一网元负荷, 提高业 务数据的传输稳定性和传输效率。 本发明另一实施例提供了一种数据传输方法, 如图 3所示, 所述方法包括: 301、 第一网元接收终端发送的数据报文。  In the data transmission method provided by the embodiment of the present invention, when the first network element negotiates the MTU value with the second network element, the first network element can modify the MTU value according to the length of the added additional message to avoid the need for transmission. The message is fragmented. The method provided by the embodiment of the present invention can avoid fragmentation in the process of transmitting data packets, reduce network processing delay, reduce the load of the first network element, and improve transmission stability and transmission efficiency of the service data. Another embodiment of the present invention provides a data transmission method. As shown in FIG. 3, the method includes: 301. A first network element receives a data packet sent by a terminal.
具体的, 所述第一网元可以是 AP ( Acess Point, 接入点), 但不仅限于此; 所述终端可以是智能手机、 平板电脑等, 一般的, 所述终端将需要传输的数据 报文通过空口发送给所述第一网元, 以便于所述第一网元对所述数据报文进行 加密处理, 以确保用户数据的信息安全。 可选的, 所述终端也可以是笔记本电 脑等其他终端设备。  Specifically, the first network element may be an AP (Acess Point), but is not limited thereto; the terminal may be a smart phone, a tablet computer, etc. Generally, the data packet that the terminal needs to transmit is The text is sent to the first network element through an air interface, so that the first network element performs encryption processing on the data packet to ensure information security of the user data. Optionally, the terminal may also be other terminal devices such as a notebook computer.
302、 第一网元根据预设规则获取在传输数据报文时增加的附加报文的长 度。  302. The first network element acquires, according to a preset rule, a length of the additional message that is added when the data packet is transmitted.
具体的, 所述附加报文包括 TCP协议规定的 TCP数据包的报文头, 以及根 据预设规则对待传输的数据报文进行加密时增加的加密报文, 但不仅限于此。 例如, 在数据传输过程中对通信数据报文进行 IPSEC加密, 则需要对所述通信 数据报文增加加密报文以确保用户通信数据的安全性。 Specifically, the additional packet includes a packet header of a TCP packet specified by a TCP protocol, and a root The encrypted message added when the data packet to be transmitted is encrypted according to a preset rule, but is not limited thereto. For example, if the communication data packet is IPSEC encrypted during data transmission, an encrypted message needs to be added to the communication data packet to ensure the security of the user communication data.
303、在第一网元与第二网元之间根据 TCP协议进行三次握手以建立通信信 道, 从所述第一网元与第二网元之间的网元设备获取获取所述第一网元与第二 网元之间允许通过的最小 MTU值。 具体的, 所述第二网元可以是接收所述数据 报文的 SGW, 也可以是其他类型的数据报文接收设备, 此处不做限定。  303. Perform a three-way handshake between the first network element and the second network element according to the TCP protocol to establish a communication channel, and obtain, by the network element device between the first network element and the second network element, the first network. The minimum MTU value allowed to pass between the element and the second network element. Specifically, the second network element may be an SGW that receives the data packet, or may be another type of data packet receiving device, which is not limited herein.
具体的 ,所述第一网元与第二网元之间的网元设备支持控制报文协议 ICMP ( Internet Control Message Protocol, 因特网控制报文协议)探测, 能够在所述第 一网元与第二网元之间建立通信信道的过程中, 探测出所述第一网元与第二网 元之间允许通过的最小 MTU值。 其中, 所述网元设备能够自动探测到所述第一 网元与第二网元之间允许通过的最小 MTU值, 所述网元设备可以是路由器, 也 可以是交换机, 不仅限于此。  Specifically, the network element device between the first network element and the second network element supports an ICMP (Internet Control Message Protocol) detection, and the first network element and the first network element During the process of establishing a communication channel between the two network elements, the minimum MTU value allowed to pass between the first network element and the second network element is detected. The network element device can automatically detect the minimum MTU value allowed to pass between the first network element and the second network element. The network element device can be a router or a switch, and is not limited thereto.
304、 第一网元将所述第一网元与第二网元之间允许通过的最小 MTU值减 去所述附加报文的长度, 得到修改后的 MTU值, 根据所述修改后的 MTU值对 三次握手过程中发送的 SYN报文进行修改。  304. The first network element subtracts the length of the additional packet from the minimum MTU value allowed to pass between the first network element and the second network element, to obtain a modified MTU value, according to the modified MTU. The value is modified for the SYN packet sent during the three-way handshake.
具体的,第一网元可以根据所述修改后的 MTU值对所述 SYN报文中的 MSS 值进行修改, 所述 MSS值用于表征 MTU值。  Specifically, the first network element may modify the MSS value in the SYN packet according to the modified MTU value, where the MSS value is used to represent the MTU value.
305、 第一网元根据预设规则对接收到的数据报文进行加密处理, 得到加密 后的数据报文。 具体的, 所述数据报文经过加密处理之后增加了加密的报文, 所以数据报文在加密后长度会增加。 一般的, 第一网元可以与第二网元建立 IPSEC隧道, 对数据报文进行 IPSEC加密。  305. The first network element performs encryption processing on the received data packet according to a preset rule, to obtain an encrypted data packet. Specifically, after the data packet is encrypted, the encrypted packet is added, so the length of the data packet is increased after being encrypted. Generally, the first network element can establish an IPSEC tunnel with the second network element, and perform IPSEC encryption on the data packet.
值得说明的, MTU值是第一网元和第二网元根据 TCP协议建立通信信道 时、 确定的当前通信信道内单个数据包能够传输的最大数据量。 当在数据传输 过程中需要对数据报文进行加密时, 需要在所述数据报文中增加加密报文, 使 得整个报文的长度增大, 导致第一网元在传输加密后的报文时需要分片, 会增 加第一网元的负荷以及增加传输时延。 在本发明实施例中, 由于修改后的 MTU 值与当前网络中实际能够传输的 MTU值相比较小,其差值为增加的加密报文的 长度, 所以在传输加密后的数据报文时能够避免分片。 It is worth noting that the MTU value is the maximum amount of data that can be transmitted by a single data packet in the current communication channel determined by the first network element and the second network element when establishing a communication channel according to the TCP protocol. When the data packet needs to be encrypted in the data transmission process, the encrypted packet is added to the data packet, so that the length of the entire packet is increased, so that the first network element transmits the encrypted packet. The need for fragmentation increases the load on the first network element and increases the transmission delay. In the embodiment of the present invention, since the modified MTU value is smaller than the MTU value that can be actually transmitted in the current network, the difference is the increased encrypted message. Length, so fragmentation can be avoided when transmitting encrypted data packets.
可选的, 第一网元在对 MTU值进行修改时, 也可以进一步减小修改后的 MTU值, 使得修改后的 MTU值大于或等于当前网络中实际能够传输的 MTU 值, 以确保加密后的数据报文的长度小于或等于当前网络中实际能够传输的最 大报文长度。  Optionally, when the MTU value is modified, the first network element may further reduce the modified MTU value, so that the modified MTU value is greater than or equal to the MTU value that can be actually transmitted in the current network, to ensure encryption. The length of the data packet is less than or equal to the maximum packet length that can be transmitted in the current network.
306、 第一网元将加密后的数据报文发送至第二网元, 以完成数据报文的传 输。  306. The first network element sends the encrypted data packet to the second network element to complete the transmission of the data packet.
值得说明的是, 本发明实施例提供的数据传输方法主要应用于 uBro组网模 式, 也可以应用于釆用其他组网模式的以太网网络, 此处不做限定。  It should be noted that the data transmission method provided by the embodiment of the present invention is mainly applied to the uBro networking mode, and can also be applied to an Ethernet network using other networking modes, which is not limited herein.
本发明实施例提供的方法实现的是 AP向 SGW发送数据报文的场景。 显而 易见的,本发明实施例提供的方法也可以实现 SGW向 AP发送数据报文的场景, 此时, 第一网元为 SGW, 第二网元为 AP。 也就是说, 本发明实施例提供的方 法可以实现数据传输过程中 2个网元设备之间的数据传输, 此处不再赘述。  The method provided by the embodiment of the present invention implements a scenario in which an AP sends a data packet to the SGW. It can be seen that the method provided by the embodiment of the present invention can also implement a scenario in which the SGW sends a data packet to the AP. At this time, the first network element is the SGW, and the second network element is the AP. That is to say, the method provided by the embodiment of the present invention can implement data transmission between two network element devices in a data transmission process, and details are not described herein again.
本发明实施例提供的数据传输方法, 网元设备可以探测到第一网元和第二 网元之间允许通过的最小 MTU值,第一网元能够根据增加的附加报文的长度对 所述最小 MTU值进行修改, 以避免对需要传输的报文进行分片。 釆用本发明实 施例提供的方法, 能够在传输数据报文的过程中避免分片, 减少网络处理时延, 同时还能减轻第一网元负荷, 提高业务数据的传输稳定性和传输效率。 本发明又一实施例提供了一种数据传输装置, 如图 4 所示, 所述数据传输 装置包括第一网元, 能够实现上述方法实施例中第一网元侧的方法, 所述第一 网元包括:  According to the data transmission method provided by the embodiment of the present invention, the network element device can detect the minimum MTU value allowed to pass between the first network element and the second network element, and the first network element can be configured according to the length of the added additional message. The minimum MTU value is modified to avoid fragmentation of the packets that need to be transmitted. By using the method provided by the embodiment of the present invention, fragmentation can be avoided in the process of transmitting data packets, network processing delay can be reduced, load of the first network element can be reduced, and transmission stability and transmission efficiency of service data can be improved. A further embodiment of the present invention provides a data transmission apparatus. As shown in FIG. 4, the data transmission apparatus includes a first network element, and the method of the first network element side in the foregoing method embodiment is implemented. The network element includes:
获取单元 41 , 用于获取在传输数据报文时增加的附加报文的长度;  The obtaining unit 41 is configured to acquire a length of the additional message that is added when the data message is transmitted;
MTU修改单元 42 ,用于在所述第一网元与第二网元之间建立通信信道的过 程中, 根据所述增加的附加报文的长度对所述第一网元与第二网元确定的 MTU 值进行修改, 以使得所述第一网元根据修改后的 MTU值传输所述数据报文。 其 中, 所述第二网元是接收所述数据报文的设备。  The MTU modifying unit 42 is configured to: when the communication channel is established between the first network element and the second network element, the first network element and the second network element according to the length of the added additional message The determined MTU value is modified such that the first network element transmits the data message according to the modified MTU value. The second network element is a device that receives the data packet.
具体的, 所述第一获取单元 41获取的附加报文的长度可以是对所述数据报 文进行加密时增加的加密报文的长度。 Specifically, the length of the additional packet acquired by the first acquiring unit 41 may be the datagram. The length of the encrypted message added when the file is encrypted.
所述 MTU修改单元 42 具体用于在所述第一网元与第二网元根据 TCP ( Transmission Control Protocol, 传输控制协议 )进行三次握手以建立通信信道 的过程中,根据所述附加报文的长度对所述第一网元与第二网元确定的 MTU值 进行修改, 以使得所述第一网元根据修改后的 MTU值传输所述数据报文。  The MTU modifying unit 42 is specifically configured to: when the first network element and the second network element perform a three-way handshake according to a Transmission Control Protocol (TCP) to establish a communication channel, according to the additional message The length of the MTU value determined by the first network element and the second network element is modified, so that the first network element transmits the data packet according to the modified MTU value.
进一步的, 如图 5所示, 所述 MTU修改单元 42包括第一修改子单元 421、 第二修改子单元 422以及处理子单元 423 , 其中:  Further, as shown in FIG. 5, the MTU modification unit 42 includes a first modification subunit 421, a second modification subunit 422, and a processing subunit 423, where:
第一修改子单元 421 用于在所述第一网元与第二网元进行第一次握手时, 将该第一网元的 MTU值减去所述附加报文的长度, 得到第一次修改后的 MTU 值;  The first modification sub-unit 421 is configured to: when the first network element performs the first handshake with the second network element, subtract the length of the additional message from the MTU value of the first network element to obtain the first time The modified MTU value;
第二修改子单元 422 用于在所述第一网元与第二网元进行第二次握手时, 获取所述第二网元 MTU值, 并将该第二网元的 MTU值减去所述附加报文的长 度, 得到第二次修改后的 MTU值;  The second modification sub-unit 422 is configured to: when the first network element performs a second handshake with the second network element, obtain the MTU value of the second network element, and subtract the MTU value of the second network element from the The length of the additional message is obtained, and the MTU value after the second modification is obtained;
处理子单元 423用于将所述第一次修改后的 MTU值与所述第二次修改后的 MTU值进行比对, 从中选取较小值作为修改后的 MTU值, 以使得所述第一网 元根据修改后的 MTU值传输所述数据报文。  The processing sub-unit 423 is configured to compare the first modified MTU value with the second modified MTU value, and select a smaller value as the modified MTU value, so that the first The network element transmits the data packet according to the modified MTU value.
根据图 4所示的数据传输装置, 进一步的, 如图 6所示, 所述 MTU修改单 元 42还包括 MTU获取子单元 424、 第三修改子单元 425, 其中:  According to the data transmission apparatus shown in FIG. 4, further, as shown in FIG. 6, the MTU modification unit 42 further includes an MTU acquisition subunit 424 and a third modification subunit 425, where:
MTU获取子单元 424用于在所述第一网元与第二网元之间建立通信信道的 过程中, 从所述第一网元与第二网元之间的网元设备获取所述第一网元与第二 网元之间允许通过的最小 MTU值, 其中, 所述网元设备支持 ICMP探测, 能够 探测出第一网元与第二网元之间允许通过的最小 MTU值,所述网元设备可以是 路由器, 也可以是交换机, 此处不做限定;  The MTU obtaining sub-unit 424 is configured to acquire the foregoing information from the network element device between the first network element and the second network element in the process of establishing a communication channel between the first network element and the second network element. a minimum MTU value allowed to pass between a network element and a second network element, where the network element device supports ICMP detection, and can detect a minimum MTU value allowed to pass between the first network element and the second network element. The network element device may be a router or a switch, which is not limited herein;
第三修改子单元 425用于将所述允许通过的最小 MTU值减去所述附加报文 的长度, 得到修改后的 MTU值, 以使得所述第一网元根据所述修改后的 MTU 值传输所述数据报文。  The third modification sub-unit 425 is configured to subtract the length of the additional packet from the minimum allowed MTU value to obtain a modified MTU value, so that the first network element is based on the modified MTU value. Transmitting the data message.
值得说明的是, 本发明实施例提供的数据传输装置主要应用于 uBro组网模 式, 但也可以应用于釆用其他组网模式的以太网网络, 此处不做限定。 本发明实施例提供的数据传输装置, 能够根据增加的附加报文的长度对数 据传输设备之间允许传输的最小 MTU值进行修改,以避免对需要传输的报文进 行分片。 釆用本发明实施例提供的装置, 能够在传输数据报文的过程中避免分 片, 减少网络处理时延, 同时还能减轻第一网元负荷, 提高业务数据的传输稳 定性和传输效率。 It should be noted that the data transmission apparatus provided by the embodiment of the present invention is mainly applied to the uBro networking mode, but can also be applied to an Ethernet network that uses other networking modes, which is not limited herein. The data transmission device provided by the embodiment of the present invention can modify the minimum MTU value allowed to be transmitted between the data transmission devices according to the length of the added additional message to avoid fragmentation of the message to be transmitted. The device provided by the embodiment of the present invention can avoid fragmentation in the process of transmitting data packets, reduce network processing delay, reduce the load of the first network element, and improve transmission stability and transmission efficiency of service data.
通过以上的实施方式的描述, 所属领域的技术人员可以清楚地了解到本发 明可借助软件加必需的通用硬件的方式来实现, 当然也可以通过硬件, 但很多 情况下前者是更佳的实施方式。 基于这样的理解, 本发明的技术方案本质上或 者说对现有技术做出贡献的部分可以以软件产品的形式体现出来, 该计算机软 件产品存储在可读取的存储介质中, 如计算机的软盘, 硬盘或光盘等, 包括若 干指令用以使得一台计算机设备(可以是个人计算机, 服务器, 或者网络设备 等)执行本发明各个实施例所述的方法。  Through the description of the above embodiments, those skilled in the art can clearly understand that the present invention can be implemented by means of software plus necessary general hardware, and of course, by hardware, but in many cases, the former is a better implementation. . Based on such understanding, the technical solution of the present invention, which is essential or contributes to the prior art, may be embodied in the form of a software product stored in a readable storage medium, such as a floppy disk of a computer. A hard disk or optical disk or the like includes instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to perform the methods described in various embodiments of the present invention.
以上所述, 仅为本发明的具体实施方式, 但本发明的保护范围并不局限于 此, 任何熟悉本技术领域的技术人员在本发明揭露的技术范围内, 可轻易想到 变化或替换, 都应涵盖在本发明的保护范围之内。 因此, 本发明的保护范围应 以所述权利要求的保护范围为准。  The above is only the specific embodiment of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily think of changes or substitutions within the technical scope of the present invention. It should be covered by the scope of the present invention. Therefore, the scope of the invention should be determined by the scope of the appended claims.

Claims

权 利 要 求 书 WO 2013/117090 PCT/CN2012/083403 Claim WO 2013/117090 PCT/CN2012/083403
1、 一种数据传输方法, 其特征在于, 包括:  A data transmission method, comprising:
第一网元获取在传输数据报文时增加的附加报文的长度;  The first network element acquires the length of the additional message added when transmitting the data packet;
在所述第一网元与第二网元之间建立通信信道的过程中, 根据所述增加的 附加 4艮文的长度对所述第一网元与第二网元确定的最大传输单元 MTU值进行 修改, 以使得所述第一网元根据修改后的 MTU值传输所述数据报文。  And a maximum transmission unit MTU determined by the first network element and the second network element according to the length of the added additional information in the process of establishing a communication channel between the first network element and the second network element. The value is modified such that the first network element transmits the data message according to the modified MTU value.
2、 根据权利要求 1所述的数据传输方法, 其特征在于, 所述附加报文是对 所述数据报文进行加密时增加的加密报文。  The data transmission method according to claim 1, wherein the additional message is an encrypted message added when the data message is encrypted.
3、 根据权利要求 2所述的数据传输方法, 其特征在于, 所述在所述第一网 元与第二网元之间建立通信信道的过程中, 根据所述增加的附加报文的长度对 所述第一网元与第二网元确定的最大传输单元 MTU值进行修改,以使得所述第 一网元根据修改后的 MTU值传输所述数据报文, 包括:  The data transmission method according to claim 2, wherein in the process of establishing a communication channel between the first network element and the second network element, according to the length of the added additional message The MTU value of the maximum transmission unit determined by the first network element and the second network element is modified, so that the first network element transmits the data packet according to the modified MTU value, including:
在所述第一网元与第二网元根据传输控制协议 TCP进行三次握手以建立通 信信道的过程中, 所述第一网元根据所述附加报文的长度对所述第一网元与第 二网元确定的最大传输单元 MTU值进行修改,以使得所述第一网元根据修改后 的 MTU值传输所述数据报文。  In the process of the third network element and the second network element performing a three-way handshake according to the transmission control protocol TCP to establish a communication channel, the first network element is configured to the first network element according to the length of the additional packet. The MTU value of the maximum transmission unit determined by the second network element is modified, so that the first network element transmits the data packet according to the modified MTU value.
4、 根据权利要求 3所述的数据传输方法, 其特征在于, 所述在所述第一网 元与第二网元根据传输控制协议 TCP进行三次握手以建立通信信道的过程中, 所述第一网元根据所述附加报文的长度对所述第一网元与第二网元确定的最大 传输单元 MTU值进行修改, 以使得所述第一网元根据修改后的 MTU值传输所 述数据报文, 包括:  The data transmission method according to claim 3, wherein in the process that the first network element and the second network element perform a three-way handshake according to a transmission control protocol TCP to establish a communication channel, the Modifying, by the network element, the maximum transmission unit MTU value determined by the first network element and the second network element according to the length of the additional packet, so that the first network element transmits the modified MTU value according to the modified Data message, including:
在所述第一网元与第二网元进行第一次握手时,将该第一网元的 MTU值减 去所述附加报文的长度, 得到第一次修改后的 MTU值;  When the first network element performs the first handshake with the second network element, the MTU value of the first network element is subtracted from the length of the additional packet, and the MTU value after the first modification is obtained;
在所述第一网元与第二网元进行第二次握手时, 获取所述第二网元的 MTU 值, 并将该第二网元的 MTU值减去所述附加报文的长度, 得到第二次修改后的 MTU值;  Obtaining, by the first network element, the second handshake of the second network element, obtaining an MTU value of the second network element, and subtracting an MTU value of the second network element from a length of the additional packet, Obtain the MTU value after the second modification;
将所述第一次修改后的 MTU值与所述第二次修改后的 MTU值进行比对, 从中选取较小值作为修改后的 MTU值,以使得所述第一网元根据所述修改后的 MTU值传输所述数据报文。 Comparing the first modified MTU value with the second modified MTU value, and selecting a smaller value as the modified MTU value, so that the first network element is modified according to the The subsequent MTU value transmits the data message.
5、 根据权利要求 2所述的方法, 其特征在于, 所述在所述第一网元与第二 网元之间建立通信信道的过程中, 根据所述增加的附加报文的长度对所述第一 网元与第二网元确定的最大传输单元 MTU值进行修改,以使得所述第一网元根 据修改后的 MTU值传输所述数据报文, 还包括: The method according to claim 2, wherein, in the process of establishing a communication channel between the first network element and the second network element, according to the length of the added additional message The MTU value of the maximum transmission unit determined by the first network element and the second network element is modified, so that the first network element transmits the data packet according to the modified MTU value, and further includes:
在所述第一网元与第二网元之间建立通信信道的过程中, 从所述第一网元 与第二网元之间的网元设备获取所述第一网元与第二网元之间允许通过的最小 MTU值, 其中, 所述网元设备支持控制报文协议 ICMP探测, 能够探测出所述 第一网元与第二网元之间允许通过的最小 MTU值;  Obtaining, by the network element device between the first network element and the second network element, the first network element and the second network in a process of establishing a communication channel between the first network element and the second network element The minimum MTU value allowed to pass between the elements, wherein the network element device supports the control message protocol ICMP detection, and can detect the minimum MTU value allowed to pass between the first network element and the second network element;
所述第一网元将所述第一网元与第二网元之间允许通过的最小 MTU值减 去所述附加报文的长度, 得到修改后的 MTU值, 以使得所述第一网元根据所述 修改后的 MTU值传输所述数据报文。  The first network element subtracts the length of the additional packet from the minimum MTU value allowed to pass between the first network element and the second network element, to obtain a modified MTU value, so that the first network The element transmits the data packet according to the modified MTU value.
6、 一种数据传输装置, 包括第一网元, 其特征在于, 所述第一网元包括: 获取单元, 用于获取在传输数据报文时增加的附加报文的长度;  A data transmission apparatus, comprising a first network element, wherein the first network element comprises: an obtaining unit, configured to acquire a length of an additional message added when transmitting a data message;
MTU修改单元, 用于在所述第一网元与第二网元之间建立通信信道的过程 中, 根据所述增加的附加报文的长度对所述第一网元与第二网元确定的最大传 输单元 MTU值进行修改, 以使得所述第一网元根据修改后的 MTU值传输所述 数据报文。  An MTU modifying unit, configured to determine, according to the length of the added additional packet, the first network element and the second network element, in a process of establishing a communication channel between the first network element and the second network element The maximum transmission unit MTU value is modified such that the first network element transmits the data message according to the modified MTU value.
7、 根据权利要求 6所述的数据传输装置, 其特征在于, 所述第一获取单元 获取的附加报文的长度是对所述数据报文进行加密时增加的加密报文的长度。  The data transmission device according to claim 6, wherein the length of the additional message acquired by the first acquiring unit is the length of the encrypted message added when the data message is encrypted.
8、 根据权利要求 7所述的数据传输装置, 其特征在于, 所述 MTU修改单 元具体用于在所述第一网元与第二网元根据传输控制协议 TCP进行三次握手以 建立通信信道的过程中, 根据所述附加报文的长度对所述第一网元与第二网元 确定的 MTU值进行修改, 以使得所述第一网元根据修改后的 MTU值传输所述 数据报文。  The data transmission device according to claim 7, wherein the MTU modification unit is configured to perform a three-way handshake between the first network element and the second network element according to a transmission control protocol TCP to establish a communication channel. The MTU value determined by the first network element and the second network element is modified according to the length of the additional packet, so that the first network element transmits the data packet according to the modified MTU value. .
9、 根据权利要求 8所述的数据传输装置, 其特征在于, 所述 MTU修改单 元包括:  The data transmission device according to claim 8, wherein the MTU modification unit comprises:
第一修改子单元, 用于在所述第一网元与第二网元进行第一次握手时, 将 该第一网元的 MTU值减去所述附加报文的长度,得到第一次修改后的 MTU值; 第二修改子单元, 用于在所述第一网元与第二网元进行第二次握手时, 获 取所述第二网元 MTU值,并将该第二网元的 MTU值减去所述附加报文的长度, 得到第二次修改后的 MTU值; a first modifying subunit, configured to: when the first network element and the second network element perform the first handshake, subtract the length of the additional message from the MTU value of the first network element to obtain the first time The modified MTU value; a second modifying subunit, configured to: when the first network element performs a second handshake with the second network element, obtain the MTU value of the second network element, and subtract the MTU value of the second network element from the The length of the additional message is obtained, and the MTU value after the second modification is obtained;
处理子单元, 用于将所述第一次修改后的 MTU值与所述第二次修改后的 MTU值进行比对, 从中选取较小值作为修改后的 MTU值, 以使得所述第一网 元根据所述修改后的 MTU值传输所述数据报文。  a processing subunit, configured to compare the first modified MTU value with the second modified MTU value, and select a smaller value as the modified MTU value, so that the first The network element transmits the data packet according to the modified MTU value.
10、 根据权利要求 7所述的装置, 其特征在于, 所述 MTU修改单元包括: 10. The apparatus according to claim 7, wherein the MTU modification unit comprises:
MTU获取子单元, 用于在所述第一网元与第二网元之间建立通信信道的过 程中, 从所述第一网元与第二网元之间的网元设备获取所述第一网元与第二网 元之间允许通过的最小 MTU值, 其中, 所述网元设备支持控制报文协议 ICMP 探测, 能够探测出所述第一网元与第二网元之间允许通过的最小 MTU值; An MTU acquiring subunit, configured to acquire, according to a network element device between the first network element and the second network element, in a process of establishing a communication channel between the first network element and the second network element A minimum MTU value that is allowed to pass between a network element and a second network element, where the network element device supports the control packet protocol ICMP detection, and can detect that the first network element and the second network element are allowed to pass. Minimum MTU value;
第三修改子单元, 用于将所述第一网元与第二网元之间允许通过的最小 MTU值减去所述附加报文的长度, 得到修改后的 MTU值, 以使得所述第一网 元根据所述修改后的 MTU值传输所述数据报文。  a third modification subunit, configured to subtract a length of the additional packet from a minimum MTU value allowed to pass between the first network element and the second network element, to obtain a modified MTU value, so that the first A network element transmits the data packet according to the modified MTU value.
PCT/CN2012/083403 2012-02-08 2012-10-24 Data transmission method and device WO2013117090A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201210027471.2 2012-02-08
CN2012100274712A CN102594505A (en) 2012-02-08 2012-02-08 Data transmission method and device

Publications (1)

Publication Number Publication Date
WO2013117090A1 true WO2013117090A1 (en) 2013-08-15

Family

ID=46482736

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2012/083403 WO2013117090A1 (en) 2012-02-08 2012-10-24 Data transmission method and device

Country Status (2)

Country Link
CN (1) CN102594505A (en)
WO (1) WO2013117090A1 (en)

Families Citing this family (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102594505A (en) * 2012-02-08 2012-07-18 华为技术有限公司 Data transmission method and device
CN103023777B (en) * 2012-11-27 2015-11-25 杭州华三通信技术有限公司 A kind of method and apparatus obtaining universe minimax transmission unit value
CN103117949B (en) * 2013-01-24 2016-08-10 杭州华三通信技术有限公司 A kind of message transmitting method based on lsp tunnel and equipment
CN103475596B (en) * 2013-08-30 2016-08-17 广州市动景计算机科技有限公司 The data transmission method of middleware based on MTU value and mobile terminal and system
CN103797836B (en) * 2013-09-18 2017-12-01 华为技术有限公司 Dispatching method and base station
TWI580226B (en) * 2014-06-12 2017-04-21 智邦科技股份有限公司 Method for determining maximum segment size
CN104618275A (en) * 2015-01-21 2015-05-13 大唐移动通信设备有限公司 Fragmentation processing method and equipment
CN106302246A (en) * 2015-06-03 2017-01-04 中兴通讯股份有限公司 A kind of method and apparatus adjusting IPv6 tunnel MTU
CN107528792A (en) * 2016-06-21 2017-12-29 中兴通讯股份有限公司 MSS amending method, apparatus and system
CN107566173A (en) * 2017-08-29 2018-01-09 深圳天珑无线科技有限公司 Mobile terminal sets the method and device of MTU
CN111817886B (en) * 2020-06-29 2023-12-26 新华三信息安全技术有限公司 Method and equipment for acquiring management object data

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1425996A (en) * 2001-12-11 2003-06-25 财团法人资讯工业策进会 Automatic space reserving system and method for packaging between channels
CN1599361A (en) * 2003-09-17 2005-03-23 西门子公司 Method of transmitting packet data on network
CN1852221A (en) * 2006-05-30 2006-10-25 杭州华为三康技术有限公司 Entry quick convergence method and method for realizing message quick forwarding according to this entry
CN102594505A (en) * 2012-02-08 2012-07-18 华为技术有限公司 Data transmission method and device

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1426204A (en) * 2001-12-11 2003-06-25 财团法人资讯工业策进会 System and method for automatically driving and changing package length to meet channel width
CN1300985C (en) * 2003-04-04 2007-02-14 华为技术有限公司 Method for processing extra-long message in two-layer virtual special-purpose network
CN100477568C (en) * 2003-04-28 2009-04-08 华为技术有限公司 Data transmission method for mobile packet network
CN101640645B (en) * 2009-09-09 2012-01-11 中兴通讯股份有限公司 Message transmission method and system

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1425996A (en) * 2001-12-11 2003-06-25 财团法人资讯工业策进会 Automatic space reserving system and method for packaging between channels
CN1599361A (en) * 2003-09-17 2005-03-23 西门子公司 Method of transmitting packet data on network
CN1852221A (en) * 2006-05-30 2006-10-25 杭州华为三康技术有限公司 Entry quick convergence method and method for realizing message quick forwarding according to this entry
CN102594505A (en) * 2012-02-08 2012-07-18 华为技术有限公司 Data transmission method and device

Also Published As

Publication number Publication date
CN102594505A (en) 2012-07-18

Similar Documents

Publication Publication Date Title
WO2013117090A1 (en) Data transmission method and device
US11570098B2 (en) Systems, apparatuses and methods for cooperating routers
US10462229B2 (en) Method and apparatus for initiating and maintaining sessions between endpoints
US11159361B2 (en) Method and apparatus for providing notification of detected error conditions in a network
US8537710B2 (en) Maximum transfer unit (MTU) optimization for advanced wireless networks
US9319439B2 (en) Secured wireless session initiate framework
EP2713546A1 (en) Method and device for data transmission
WO2013143352A1 (en) Method and terminal device for establishing wireless network connection
WO2014110704A1 (en) Method for implementing network access configuration of wifi device by checking length of wifi data packet
WO2015165051A1 (en) Data transmission method and device
WO2011098052A1 (en) Method and apparatus for processing local link congestion
WO2010083671A1 (en) Network security hypertext transfer protocol negotiation method and correlated devices
WO2014048373A1 (en) Method and device for wireless information transmission
US11184799B2 (en) WiFi TCP performance in multi-radio coexistence cases
EP3539235B1 (en) Systems, apparatuses and methods for cooperating routers
WO2016078072A1 (en) Method and system for implementing service optimization
JP5087779B2 (en) Communication module, program, and communication terminal
US20230171191A1 (en) Systems, Apparatuses and Methods for Cooperating Routers
CN108429700B (en) Method and device for sending message
WO2020154872A1 (en) Transmission control protocol acceleration method and apparatus
Le et al. Removing tcp congestion control on the last hop in split tcp environments
US10715495B2 (en) Congestion control during communication with a private network
CN105812416A (en) Method and system for transmitting files between different networks
Lu et al. Improving voice capacity in IEEE 802.11 WLAN
WO2015123941A1 (en) Method for processing volte voice service, terminal and routing device

Legal Events

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

Ref document number: 12867741

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 12867741

Country of ref document: EP

Kind code of ref document: A1