[go: up one dir, main page]
More Web Proxy on the site http://driver.im/

CN101827031A - Method and device for packet transmission in user datagram protocol UDP tunnel - Google Patents

Method and device for packet transmission in user datagram protocol UDP tunnel Download PDF

Info

Publication number
CN101827031A
CN101827031A CN201010153910A CN201010153910A CN101827031A CN 101827031 A CN101827031 A CN 101827031A CN 201010153910 A CN201010153910 A CN 201010153910A CN 201010153910 A CN201010153910 A CN 201010153910A CN 101827031 A CN101827031 A CN 101827031A
Authority
CN
China
Prior art keywords
tunnel
message
udp
passenger
udp tunnel
Prior art date
Legal status (The legal status 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 status listed.)
Pending
Application number
CN201010153910A
Other languages
Chinese (zh)
Inventor
吴二刚
郭辉
刘鹏午
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
ZTE Corp
Original Assignee
ZTE Corp
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 ZTE Corp filed Critical ZTE Corp
Priority to CN201010153910A priority Critical patent/CN101827031A/en
Publication of CN101827031A publication Critical patent/CN101827031A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Mobile Radio Communication Systems (AREA)

Abstract

The invention discloses a method and device for packet transmission in a user datagram protocol UDP tunnel, which aims to reduce the packet reassembly probability in tunnel transmission and improve the speed of the transmission tunnel. The method comprises the following steps: carrying out UDP tunnel encapsulation for received data packets as first passenger packets, thereby obtaining first UDP tunnel packets, when the length of the first UDP tunnel packets is more than the value of the maximum transmission unit MTU of the UDP tunnel, judging whether the frame headers of the first passenger packets carry signs allowing fragmentation or not, if YES, fragmenting the first passenger packets according to the value of the MTU, then carrying out UDP encapsulation for second passenger packets after fragmentation, thereby obtaining corresponding second UDP tunnel packets, transmitting the second UDP tunnel packets, wherein the frame headers of the second passenger packets carry fragmentation signs corresponding to the second passenger packets, otherwise discarding the data packets.

Description

Method and device for transmitting message in User Datagram Protocol (UDP) tunnel
Technical Field
The present invention relates to the field of tunneling technologies, and in particular, to a method and an apparatus for tunneling a packet using a user data packet protocol.
Background
Tunneling is a way of transferring data between networks by using the infrastructure of the internetwork. The data or payload that is communicated using the tunnel may be data frames or packets of different protocols. Tunneling protocols re-encapsulate data frames or packets of other protocols and then send through tunnels. The new header, i.e., the tunnel header, provides routing information for delivering encapsulated payload data over the internet. The tunnel technology allows an authorized mobile user or an authorized user to access a local area network, such as an enterprise network, at any time and any place, so that the security is greatly improved, and the risk of eavesdropping and tampering on the network is reduced. Because of these advantages of tunneling, it is favored and applied by many enterprises.
A typical tunneling networking architecture is shown in fig. 1, and includes: the Access Point (AP) includes a device (Station, STA), an Access Point (AP), a SWITCH (SWITCH), an Access Controller (AC), and a Remote Broadband Access Server (BRAS), where the AP and the AC are two ends of a tunnel. Referring to fig. 2, the process of transmitting the message in the tunnel includes:
step 201: the device STA sends the original data message to the AP.
Step 202: and the AP performs tunnel encapsulation on the received data message as a passenger message to obtain a tunnel message.
Step 203: and the AP sends the tunnel message to the AC through the Switch.
Step 204: and the AC decapsulates the received tunnel message and restores the tunnel message into an original data message.
Here, the AC checks the tunnel packet, and after the check is passed, the tunnel header of the tunnel packet is stripped off to obtain the original data packet.
Step 205: and the AC sends the restored data message.
This is the transmission of data messages, whereas response messages are the opposite, including:
step 206: and the AC encapsulates the response message into a tunnel message.
Step 207: and the AC sends the tunnel message to the AP through the Switch.
Step 208: and the AP decapsulates the received tunnel message to obtain a response message.
Of course, verification is still needed here, and package connection can be performed only after the verification is passed.
Step 209: and the AP sends the response message to the equipment.
After the packet is encapsulated by the tunnel, the tunnel packet may become larger and may exceed a Maximum Transmission Unit (MTU) value of the network device in the tunnel. At this time, the tunnel message needs to be reasonably fragmented, and can be transmitted through the tunnel.
At present, the encapsulated tunnel message is generally directly fragmented, and the fragmented tunnel message is transmitted in the tunnel. Wherein, the tunnel header of the tunnel message after fragmentation carries the fragmentation identification of the tunnel message. After reaching the opposite end of the tunnel, the tunnel head is stripped, the data message is restored, and the final destination device carries out message recombination.
In the process of transmitting the message in the tunnel, the intermediate device forwards the message according to the routing information in the tunnel header, so that the intermediate device also obtains the fragment identifier carried in the tunnel header. Thus, some intermediate devices may need the whole message information, and then the intermediate devices need to reassemble the message according to the fragment identifier, perform corresponding processing, perform fragmentation, and transmit the message in the tunnel. For example: when the firewall is passed through, the firewall needs to judge whether the whole message is legal, therefore, when the tunnel header of the received tunnel message carries the fragment identifier, other tunnel messages belonging to the same message as the tunnel message need to be received, then all the tunnel messages are recombined, whether the recombined message is legal is judged, if so, the recombined message is transmitted after being fragmented.
It can be seen that the fragmentation mode in the existing tunnel transmission message can recombine the message in the intermediate device of the tunnel, i.e. in the network layer, so that a large amount of memory and processing time of the CPU are inevitably wasted, and the possibility of data delay and packet loss is increased.
Disclosure of Invention
The embodiment of the invention provides a method and a device for transmitting a message in a User Datagram Protocol (UDP) tunnel, which are used for reducing the probability of message recombination in the tunnel transmission process and improving the tunnel transmission speed.
The embodiment of the invention provides a method for transmitting a message in a User Datagram Protocol (UDP) tunnel, which comprises the following steps:
performing UDP tunnel encapsulation on the received data message as a first passenger message to obtain a first UDP tunnel message;
when the length of the first UDP tunnel message is larger than the Maximum Transmission Unit (MTU) value of the UDP tunnel, judging whether a frame header of a first passenger message in the first UDP tunnel message carries a fragmentation allowing mark;
if so, fragmenting the first passenger message according to the MTU value, performing UDP (user Datagram protocol) packaging on each fragmented second passenger message to obtain a corresponding second UDP tunnel message, and sending each second UDP tunnel message, wherein a frame header of the second passenger message in the second UDP tunnel message carries a fragmentation identification corresponding to the second passenger message;
otherwise, discarding the data message.
The embodiment of the invention provides a device for transmitting messages in a User Datagram Protocol (UDP) tunnel, which comprises:
the encapsulating unit is used for performing UDP tunnel encapsulation on the received data message as a first passenger message to obtain a first UDP tunnel message;
a detecting unit, configured to determine whether a frame header of a first passenger packet in the first UDP tunnel packet carries a fragmentation permission flag when the length of the first UDP tunnel packet is greater than a maximum transmission unit MTU value of the UDP tunnel;
the fragmentation unit is used for fragmenting the first passenger message according to the MTU value when a frame header of the first passenger message carries a fragmentation permission flag, performing UDP (user Datagram protocol) encapsulation on each fragmented second passenger message to obtain corresponding second UDP tunnel messages, and sending each second UDP tunnel message, wherein the frame header of the second passenger message in the second UDP tunnel messages carries a fragmentation identification corresponding to the second passenger message;
and the discarding unit is used for discarding the data message when the frame header of the first passenger message does not carry the fragmentation permission mark.
In the embodiment of the present invention, a received data packet is used as a first passenger packet to perform UDP tunnel encapsulation, so as to obtain a first UDP tunnel packet, when the length of the first UDP tunnel packet is greater than the MTU value of the UDP tunnel, it is determined whether a frame header of the first passenger packet in the first UDP tunnel packet carries a fragmentation permission flag, if yes, the first passenger packet is fragmented according to the MTU value, each fragmented second passenger packet is UDP encapsulated, so as to obtain a corresponding second UDP tunnel packet, and each second UDP tunnel packet is sent, wherein a frame header of the second passenger packet in the second UDP tunnel packet carries a fragmentation identifier corresponding to the second passenger packet, so that only the frame header of the passenger packet in the second layer carries the fragmentation identifier, so that in the process of tunnel transmission, an intermediate device can only read information in the tunnel frame header of the UDP tunnel packet, namely, the fragment identifier cannot be obtained, so that the UDP tunnel message is determined to be a complete message, and reassembly is not performed. Therefore, the waste of resources is reduced, and the speed of transmitting the message through the UDP tunnel is also improved.
Drawings
FIG. 1 is a flow chart of accessing a network device in an embodiment of the present invention;
fig. 2 is a flowchart of accessing a network device according to a first embodiment of the present invention;
FIG. 3 is an architecture diagram of a system of access network appliances in an embodiment of the present invention;
FIG. 4 is a block diagram of an access point in an embodiment of the invention;
fig. 5 is a block diagram of a network device in an embodiment of the present invention.
Detailed Description
In the process of transmitting a message through a tunnel according to the embodiment of the present invention, a User Datagram Protocol (UDP) encapsulation format is adopted, where the UDP encapsulation format is a two-layer encapsulation format, and a format of a tunnel message after UDP encapsulation is shown in table 1:
tunnel frame header Passenger messages
TABLE 1
The format of the passenger message of the second layer is shown in table 2:
frame header Data load
TABLE 2
Thus, the tunnel packet after UDP encapsulation includes: tunnel frame header and passenger message, wherein, the tunnel frame header includes ethernet header, VLAN, IP, UDP header and ID part of the tunnel, which may specifically include: information such as source address information, destination address information, tunnel information, and certainly, check information and message length information may be included, and are not specifically listed. The passenger message is further divided into a frame header and a data payload.
After UDP encapsulation is adopted, a process of transmitting a packet in a configured UDP tunnel is shown in fig. 3, and includes:
step 301: and receiving a data message.
When in a typical tunneling networking architecture as shown in fig. 1, an AP receives a data packet from a device.
Step 302: and performing UDP encapsulation on the received data message as a first passenger message to obtain a first UDP tunnel message.
The data packet is encapsulated in the format shown in table 1, and the first passenger packet in the encapsulated first UDP tunnel packet is the received data packet.
Step 303: comparing the length of the first UDP tunnel packet with the MTU value of the UDP tunnel, and if the length of the first UDP tunnel packet is greater than the MTU value, performing step 304, otherwise, performing step 309.
When the length of the first UDP tunnel packet is greater than the MTU value, it indicates that the first UDP tunnel packet is too large to be directly transmitted in the UDP tunnel, and the fragmentation process is necessary, so step 304 is performed. When the length of the first UDP tunnel packet is less than or equal to the MTU value, which indicates that the first UDP tunnel packet can be directly transmitted in the UDP tunnel, step 309 is performed.
Each network device in the UDP tunnel has a corresponding MTU value, and generally, the MTU value of the UDP tunnel is the minimum value.
Step 304: and judging whether the frame header of the first passenger message in the first UDP tunnel message carries a fragmentation permission mark, if so, executing the step 305, otherwise, executing the step 308.
Generally, when sending a data packet, a network terminal sets a flag indicating whether to allow fragmentation of the data packet, that is, a fragmentation allowing flag, in a header of the data packet. Therefore, after the data packet is encapsulated into the first UDP tunnel packet, it is checked whether the frame header in the first passenger packet in the first UDP tunnel packet carries the fragmentation permission flag.
For example, DF in the IP header of a data packet may be used to identify whether fragmentation is allowed. When DF is 0, it indicates that the datagram fragment is allowed, and when DF is 1, it indicates that the datagram fragment is not allowed. Thus, the value of DF in the IP header of the first passenger message is checked, and when DF is 0, the passenger message is allowed to fragment, step 305 is performed, otherwise step 308 is performed.
Step 305: and according to the MTU value of the UDP tunnel, fragmenting the first passenger message to obtain at least two second passenger messages. And the frame header of the second passenger message carries the fragment identifier corresponding to the fragment of the second passenger message.
And dividing the first passenger message into two or more second passenger messages, wherein the length of each second passenger message is less than or equal to the MTU value of the UDP tunnel. And, set up a piece of label in the frame header of the second passenger's message, the fragmentation information used for marking the second passenger's message of this piece, including: whether it is a fragmented message, and the second fragmented message, etc.
To save transmission resources, the length of the secondary passenger messages is typically close to the MTU value.
Step 306: and performing UDP encapsulation on each second passenger message to obtain a corresponding second UDP tunnel message.
Each second passenger message is UDP encapsulated, still using the format as in table 1, to obtain a corresponding UDP second tunnel message. In this way, the tunnel frame header of each second UDP tunnel packet is consistent with the tunnel frame header of the first UDP tunnel packet.
Step 307: and sending each second UDP tunnel message, and finishing the message transmission process.
And transmitting the corresponding second UDP tunnel message in the UDP tunnel according to the destination address information in the tunnel frame header of each second UDP tunnel message.
Step 308: and discarding the received data message, and ending the message transmission process.
Here, the length of the first UDP tunnel packet is greater than the MTU value of the UDP tunnel, and the frame header of the first passenger packet does not carry the fragmentation permission flag, so that the first UDP tunnel packet cannot be transmitted in the tunnel, and at this time, the received data packet is discarded.
Step 309: and sending a first UDP tunnel message, and finishing the message transmission process.
The length of the first UDP tunnel message is less than or equal to the MTU value of the UDP tunnel, so that the first UDP tunnel message is directly sent without fragmentation processing.
It can be seen that, in the above embodiment, when the length of the UDP tunnel packet is greater than the MTU value of the UDP tunnel and fragmentation processing is required, the UDP tunnel packet is not fragmented directly, but a passenger packet in the UDP tunnel packet is fragmented, so that a tunnel frame header of the UDP tunnel packet does not carry a fragmentation identifier, and only a frame header of a passenger packet in the second layer carries a fragmentation identifier, so that in the process of tunnel transmission, the intermediate device can only read information in the tunnel frame header of the UDP tunnel packet, that is, the fragmentation identifier cannot be obtained, thereby determining that the UDP tunnel packet is a complete packet, and reassembly is not performed. Therefore, the waste of resources is reduced, and the speed of transmitting the message through the UDP tunnel is also improved.
Although the above method for transmitting packets through UDP tunnels can reduce the number of reassembly times during transmission, fragmentation processing may still be performed at the initial end that sends the UDP tunnel packet, so that reassembly of the packet is performed in the final destination device. Therefore, the speed of UDP tunnel transmission may also be affected to a certain extent, and therefore, in the embodiment of the present invention, after the received data packet is discarded in step 308, there is a process of performing MTU value negotiation with the terminal that sends the data packet, that is, performing MTU value negotiation with the terminal corresponding to the source address information carried in the tunnel frame header of the first UDP tunnel packet, and adjusting the length of the next data packet sent by the terminal. Therefore, when the UDP tunnel message is transmitted next time, the encapsulated UDP tunnel message may be smaller than the MTU value of the UDP tunnel, so that the UDP tunnel message is directly sent without being fragmented.
After discarding the data packet, a specific process of performing MTU value negotiation with a terminal corresponding to source address information carried in a tunnel frame header of the first UDP tunnel packet may be as shown in fig. 4, including:
step 401: and acquiring the length of the tunnel frame header in the first UDP tunnel message.
Step 402: and determining the negotiated MTU value according to the MTU value of the first UDP tunnel and the difference value between the lengths of the obtained tunnel frame headers.
For example: the MTU value of the first UDP tunnel is 1500 bytes and the length of the tunnel header is 52 bytes, then the negotiated MTU value is 1500-52-1448 bytes. Of course, the negotiated MTU value may be other values less than 1448 bytes. I.e. the negotiated MTU value is less than or equal to the difference between the MTU value of the UDP tunnel and the length of the tunnel frame header.
Step 403: and sending the negotiated MTU value according to the source address information carried in the tunnel frame header of the first UDP tunnel message.
The data packet carries source address information, and after UDP tunnel encapsulation, the tunnel frame header of the corresponding first UDP tunnel packet also carries the source address information, so that the negotiated MTU value is sent to the terminal corresponding to the source address information carried in the tunnel frame header of the first UDP tunnel packet, and thus, the terminal can adjust the length of the data packet to be sent next time according to the negotiated MTU value.
When the above method is adopted to transmit the message in the UDP tunnel, some intermediate network devices do not completely follow the MTU negotiation standard, and no matter whether the passenger message carries the permission fragmentation mark, the passenger message in the UDP tunnel message exceeding the MTU value is directly fragmented, and the MTU value of the sending end cannot be responded, namely the negotiation of the MTU value is not carried out. In this case, the fragmentation process may be wrong, and therefore, this situation must be detected and processed accordingly. At this time, referring to fig. 5, the process of transmitting the packet in the UDP tunnel includes:
step 501: and receiving a third UDP tunnel message from the intermediate network equipment.
Step 502: and decapsulating the third UDP tunnel message to obtain a corresponding third passenger message.
The format of the third UDP tunnel packet is also shown in table 1, and after decapsulating the third UDP tunnel packet, a corresponding third passenger packet may be obtained.
Step 503: and judging whether the header of the third passenger message has the fragment identifier or not, if so, executing the step 504, otherwise, executing the step 505.
Here, the intermediate network device may fragment all the passenger messages in the UDP tunnel message that exceeds the MTU value directly, and therefore, when the frame header of the third passenger message has the fragment identifier, step 504 is performed. Otherwise, step 505 is performed.
For example, when it is checked that frag _ off in the frame header of the third passenger packet is not 0 or the MF flag is set, it is determined that the third passenger packet is a fragmented packet, and step 504 is executed, otherwise, step 505 is executed.
Step 504: judging whether the frame header of the third passenger message carries the permission fragment mark, if so, executing step 505, otherwise, executing step 506
A check may be made to determine whether the frame header of the third passenger packet carries the fragmentation permission flag as described in step 304, and the specific process is not described in detail.
Step 505: and sending a third passenger message, and finishing the transmission process.
At this time, the third passenger message is not fragmented, or the frame header of the fragmented third passenger message carries the fragmentation permission flag, so that the transmission process is normal, and the third passenger message can be directly sent to the corresponding terminal.
Step 506: and sending a third passenger message, carrying out MTU value negotiation with a terminal corresponding to source address information carried in a tunnel frame header of a third UDP tunnel message, and adjusting the length of the next data message sent by the terminal. The transmission process is finished.
The frame header of the third passenger message has no fragmentation permission flag, but the third passenger message is a fragmentation message, so that the transmission performance of the tunnel message is affected, and therefore, when the situation is detected, the third passenger message can actively negotiate the MTU value with the source end of the third passenger message, namely, negotiate the MTU value with the terminal corresponding to the source address information carried in the tunnel frame header of the third UDP tunnel message, so that fragmentation is reduced, and the downlink data forwarding performance is greatly improved.
After the active negotiation of the MTU value with the source end of the passenger message is carried out, the probability of the fragmentation of the passenger message by the intermediate network equipment in the next transmission process is reduced, and the efficiency and the accuracy of tunnel transmission are improved.
The process of negotiating the MTU value by the terminal corresponding to the source address information carried in the tunnel frame header of the third UDP tunnel packet is consistent with the above-mentioned process of negotiating the MTU value by the terminal corresponding to the source address information carried in the tunnel frame header of the first UDP tunnel packet, and the specific process is not described again.
According to the method for transmitting packets in the UDP tunnel, a device for transmitting packets in the UDP tunnel may be constructed, and referring to fig. 6, the method includes: packaging unit 100, detection unit 200, slicing unit 300, and discarding unit 400. Wherein,
the encapsulating unit 100 is configured to perform UDP tunnel encapsulation on the received data packet as a first passenger packet, so as to obtain a first UDP tunnel packet.
A detecting unit 200, configured to determine whether a frame header of a first passenger packet in the first UDP tunnel packet carries a fragmentation permission flag when the length of the first UDP tunnel packet is greater than the MTU value of the UDP tunnel.
A fragmentation unit 300, configured to fragment the first passenger packet according to the MTU value when the frame header of the first passenger packet carries a fragmentation permission flag, perform UDP encapsulation on each fragmented second passenger packet, obtain a corresponding second UDP tunnel packet, and send each second UDP tunnel packet, where a fragment identifier corresponding to the second passenger packet is carried in the frame header of the second passenger packet in the second UDP tunnel packet.
A discarding unit 400, configured to discard the data packet when the frame header of the first passenger packet does not carry a fragmentation permission flag.
Wherein, the detecting unit 200 firstly compares the length of the first UDP tunnel packet with the MTU value of the UDP tunnel, and when the length of the first UDP tunnel packet is greater than the MTU value, then determines whether the frame header of the first passenger packet in the first UDP tunnel packet carries the fragmentation permission flag,
when the discarding unit 400 discards the data packet, the apparatus also performs MTU value negotiation with the terminal sending the data packet, and adjusts the length of the next data packet sent by the terminal. Thus, the apparatus further comprises: and the negotiation unit is used for negotiating the MTU value with the terminal corresponding to the source address information carried in the tunnel frame header of the first UDP tunnel message and adjusting the length of the next data message sent by the terminal.
Because some intermediate network devices do not completely comply with the above MTU negotiation standard when transmitting a packet in a UDP tunnel, and regardless of whether a passenger packet carries an allowed fragmentation flag, the passenger packet in the UDP tunnel packet that exceeds the MTU value is directly fragmented, in another embodiment of the present invention, the apparatus further includes:
and the decapsulation unit is used for decapsulating the received third UDP tunnel message to obtain a corresponding third passenger message.
Then, the negotiation unit is further configured to perform MTU value negotiation with the terminal corresponding to the address information carried in the tunnel frame header of the third UDP tunnel packet when the frame header of the third passenger packet carries the fragmentation identifier and the frame header of the third passenger packet does not carry the fragmentation permission flag, and adjust the length of the next data packet sent by the terminal.
Of course, in the two embodiments, the negotiation unit includes:
an obtaining subunit, configured to obtain a length of a tunnel frame header in the UDP tunnel message,
a determining subunit, configured to determine a negotiated MTU value according to the MTU value of the UDP tunnel and a difference between lengths of headers of the tunnel,
and the sending subunit is configured to send the negotiated MTU value according to the source address information carried in the tunnel frame header of the UDP tunnel packet.
Of course, in the embodiment of the present invention, when the length of the first UDP tunnel packet is less than or equal to the MTU value of the UDP tunnel, the first UDP tunnel packet may be directly sent. Therefore, the embodiment of the invention further comprises: a sending unit, configured to send the first UDP tunnel packet when the length of the first UDP tunnel packet is less than or equal to the MTU value of the UDP tunnel.
In a typical tunneling networking architecture as shown in fig. 1, the apparatus for transmitting a packet in a UDP tunnel in the embodiment of the present invention may be applied to an AP.
In the embodiment of the present invention, a received data packet is used as a first passenger packet to perform UDP tunnel encapsulation, so as to obtain a first UDP tunnel packet, when the length of the first UDP tunnel packet is greater than the MTU value of the UDP tunnel, it is determined whether a frame header of the first passenger packet in the first UDP tunnel packet carries a fragmentation permission flag, if yes, the first passenger packet is fragmented according to the MTU value, each fragmented second passenger packet is UDP encapsulated, so as to obtain a corresponding second UDP tunnel packet, and each second UDP tunnel packet is sent, wherein a frame header of the second passenger packet in the second UDP tunnel packet carries a fragmentation identifier corresponding to the second passenger packet, so that only the frame header of the passenger packet in the second layer carries the fragmentation identifier, so that in the process of tunnel transmission, an intermediate device can only read information in the tunnel frame header of the UDP tunnel packet, namely, the fragment identifier cannot be obtained, so that the UDP tunnel message is determined to be a complete message, and reassembly is not performed. Therefore, the waste of resources is reduced, and the speed of transmitting the message through the UDP tunnel is also improved.
And when the length of the first UDP tunnel message is greater than the MTU value of the UDP tunnel and the frame header of the first passenger message in the first UDP tunnel message does not carry the fragmentation permission flag, the terminal may also perform MTU value negotiation with the terminal corresponding to the source address information carried in the data message, and adjust the length of the terminal sending the next data message. Therefore, when the UDP tunnel message is transmitted next time, the UDP tunnel message obtained by encapsulation may be smaller than the MTU value of the UDP tunnel, so that the UDP tunnel message is directly sent without being fragmented, and the UDP tunnel message transmission efficiency is greatly improved.
In addition, in the embodiment of the invention, whether the passenger message carries the fragment permission mark or not can be detected, the passenger message in the UDP tunnel message which exceeds the MTU value is directly fragmented and the negotiation of the MTU value is not carried out, at the moment, the negotiation of the MTU value is actively carried out with the source end of the passenger message, thereby reducing the occurrence of fragmentation, improving the data forwarding performance and ensuring the reliability and the stability of the UDP tunnel transmission.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present invention without departing from the spirit and scope of the invention. Thus, if such modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include such modifications and variations.

Claims (10)

1. A method for transmitting messages in a User Datagram Protocol (UDP) tunnel is characterized by comprising the following steps:
performing UDP tunnel encapsulation on the received data message as a first passenger message to obtain a first UDP tunnel message;
when the length of the first UDP tunnel message is larger than the Maximum Transmission Unit (MTU) value of the UDP tunnel, judging whether a frame header of a first passenger message in the first UDP tunnel message carries a fragmentation allowing mark;
if so, fragmenting the first passenger message according to the MTU value, performing UDP (user Datagram protocol) packaging on each fragmented second passenger message to obtain a corresponding second UDP tunnel message, and sending each second UDP tunnel message, wherein a frame header of the second passenger message in the second UDP tunnel message carries a fragmentation identification corresponding to the second passenger message;
otherwise, discarding the data message.
2. The method of claim 1, wherein after discarding the data packet, further comprising:
and the terminal corresponding to the source address information carried in the tunnel frame header of the first UDP tunnel message carries out MTU value negotiation, and the length of the next data message sent by the terminal is adjusted.
3. The method of claim 1, further comprising:
decapsulating the received third UDP tunnel message to obtain a corresponding third passenger message;
and when the frame header of the third passenger message carries the fragmentation identification and the frame header of the third passenger message does not carry the fragmentation permission identification, performing MTU value negotiation with a terminal corresponding to the source address information carried in the tunnel frame header of the third UDP tunnel message, and adjusting the length of the terminal for sending the next data message.
4. The method according to claim 2 or 3, wherein negotiating the MTU value with the terminal corresponding to the source address information carried in the tunnel frame header of the UDP tunnel packet comprises:
acquiring the length of a tunnel frame header in the UDP tunnel message;
determining a negotiated MTU value according to the MTU value of the UDP tunnel and the difference value between the lengths of the tunnel frame headers;
and sending the negotiated MTU value according to the source address information carried in the tunnel frame header of the UDP tunnel message.
5. The method of claim 1, wherein when the length of the first UDP tunnel packet is less than or equal to the MTU value of the UDP tunnel, further comprising:
and sending the first UDP tunnel message.
6. An apparatus for transmitting packets in a UDP tunnel, comprising:
the encapsulating unit is used for performing UDP tunnel encapsulation on the received data message as a first passenger message to obtain a first UDP tunnel message;
a detecting unit, configured to determine whether a frame header of a first passenger packet in the first UDP tunnel packet carries a fragmentation permission flag when the length of the first UDP tunnel packet is greater than a maximum transmission unit MTU value of the UDP tunnel;
the fragmentation unit is used for fragmenting the first passenger message according to the MTU value when a frame header of the first passenger message carries a fragmentation permission flag, performing UDP (user Datagram protocol) encapsulation on each fragmented second passenger message to obtain corresponding second UDP tunnel messages, and sending each second UDP tunnel message, wherein the frame header of the second passenger message in the second UDP tunnel messages carries a fragmentation identification corresponding to the second passenger message;
and the discarding unit is used for discarding the data message when the frame header of the first passenger message does not carry the fragmentation permission mark.
7. The apparatus of claim 6, further comprising:
and the negotiation unit is used for negotiating the MTU value with the terminal corresponding to the source address information carried in the tunnel frame header of the first UDP tunnel message and adjusting the length of the next data message sent by the terminal.
8. The apparatus of claim 6, further comprising:
a decapsulation unit, configured to decapsulate the received third UDP tunnel packet to obtain a corresponding third passenger packet;
and the negotiation unit is further configured to, when the frame header of the third passenger packet carries a fragmentation identifier and the frame header of the third passenger packet does not carry a fragmentation permission flag, perform MTU value negotiation with a terminal corresponding to address information carried in a tunnel frame header of the third UDP tunnel packet, and adjust a length of a next data packet sent by the terminal.
9. The apparatus according to claim 7 or 8, wherein the negotiation unit comprises:
an obtaining subunit, configured to obtain a length of a tunnel frame header in the UDP tunnel message;
a determining subunit, configured to determine, according to the MTU value of the UDP tunnel and a difference between lengths of the tunnel frame headers, a negotiated MTU value;
and the sending subunit is configured to send the negotiated MTU value according to the source address information carried in the tunnel frame header of the UDP tunnel packet.
10. The apparatus of claim 6, further comprising:
a sending unit, configured to send the first UDP tunnel packet when the length of the first UDP tunnel packet is less than or equal to the MTU value of the UDP tunnel.
CN201010153910A 2010-04-22 2010-04-22 Method and device for packet transmission in user datagram protocol UDP tunnel Pending CN101827031A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201010153910A CN101827031A (en) 2010-04-22 2010-04-22 Method and device for packet transmission in user datagram protocol UDP tunnel

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201010153910A CN101827031A (en) 2010-04-22 2010-04-22 Method and device for packet transmission in user datagram protocol UDP tunnel

Publications (1)

Publication Number Publication Date
CN101827031A true CN101827031A (en) 2010-09-08

Family

ID=42690747

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201010153910A Pending CN101827031A (en) 2010-04-22 2010-04-22 Method and device for packet transmission in user datagram protocol UDP tunnel

Country Status (1)

Country Link
CN (1) CN101827031A (en)

Cited By (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102780633A (en) * 2012-08-08 2012-11-14 北京傲天动联技术有限公司 Device and method for transmitting data based on CAPWAP (control and provisioning of wireless access points) protocol
CN103262606A (en) * 2010-12-21 2013-08-21 瑞典爱立信有限公司 An improvement on ip fragmentation in gtp tunnel
CN105530193A (en) * 2014-09-30 2016-04-27 华为技术有限公司 Method for determining maximum transmission unit of tunnel, network device and system
CN106385344A (en) * 2016-09-05 2017-02-08 杭州华三通信技术有限公司 Message monitoring method and device
CN106612245A (en) * 2015-10-27 2017-05-03 大唐移动通信设备有限公司 Message transmission method and system based on GTPU (GPRS Tunneling Protocol for the user plane) tunnel protocol
CN106789534A (en) * 2016-12-27 2017-05-31 京信通信技术(广州)有限公司 A kind of data transmission method and device based on wireless network
CN107749815A (en) * 2017-09-21 2018-03-02 京信通信系统(中国)有限公司 A kind of data transmission method, processing method and processing device
CN108282391A (en) * 2018-01-11 2018-07-13 新华三技术有限公司 A kind of VXLAN message fragmenting methods and device
CN110198203A (en) * 2019-06-14 2019-09-03 中国人民解放军陆军工程大学 Method for controlling data transmission rate
CN110313160A (en) * 2017-08-10 2019-10-08 联发科技股份有限公司 Method and device thereof in mobile communication system for avoiding package from dividing
CN111917786A (en) * 2020-08-06 2020-11-10 冯田旺 GRE tunnel-based data packet fragmentation method and data packet recombination method
CN112738661A (en) * 2020-12-15 2021-04-30 广西广播电视信息网络股份有限公司 Method for realizing bidirectional downlink acceleration on broadcast channel of I-PON (input-output passive optical network)
CN113660295A (en) * 2021-10-20 2021-11-16 深圳市龙信信息技术有限公司 Message processing device

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1536832A (en) * 2003-04-04 2004-10-13 华为技术有限公司 Method for processing extra-long message in two-layer virtual special-purpose network
CN1561049A (en) * 2004-03-10 2005-01-05 中兴通讯股份有限公司 Slicing transmitting method of tunnel packet
CN1716943A (en) * 2004-06-28 2006-01-04 杭州华为三康技术有限公司 Method and system for obtaining path maximum transmission length in channel gateway environment
CN1863141A (en) * 2005-07-29 2006-11-15 华为技术有限公司 Method for transmission processing IP fragment message
CN1988508A (en) * 2006-12-04 2007-06-27 华为技术有限公司 Separate sheet message transmission method and communication system and tunnel device
CN101400085A (en) * 2007-09-30 2009-04-01 华为技术有限公司 Method, device and system for negotiating maximum transmission unit value of path
CN101488912A (en) * 2008-12-19 2009-07-22 华为技术有限公司 Method and apparatus for IP fragmentation

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1536832A (en) * 2003-04-04 2004-10-13 华为技术有限公司 Method for processing extra-long message in two-layer virtual special-purpose network
CN1561049A (en) * 2004-03-10 2005-01-05 中兴通讯股份有限公司 Slicing transmitting method of tunnel packet
CN1716943A (en) * 2004-06-28 2006-01-04 杭州华为三康技术有限公司 Method and system for obtaining path maximum transmission length in channel gateway environment
CN1863141A (en) * 2005-07-29 2006-11-15 华为技术有限公司 Method for transmission processing IP fragment message
CN1988508A (en) * 2006-12-04 2007-06-27 华为技术有限公司 Separate sheet message transmission method and communication system and tunnel device
CN101400085A (en) * 2007-09-30 2009-04-01 华为技术有限公司 Method, device and system for negotiating maximum transmission unit value of path
CN101488912A (en) * 2008-12-19 2009-07-22 华为技术有限公司 Method and apparatus for IP fragmentation

Cited By (21)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103262606B (en) * 2010-12-21 2018-10-12 瑞典爱立信有限公司 Improvement to the IP fragmentation in GTP tunnel
CN103262606A (en) * 2010-12-21 2013-08-21 瑞典爱立信有限公司 An improvement on ip fragmentation in gtp tunnel
CN102780633B (en) * 2012-08-08 2015-04-01 北京傲天动联技术股份有限公司 Device and method for transmitting data based on CAPWAP (control and provisioning of wireless access points) protocol
CN102780633A (en) * 2012-08-08 2012-11-14 北京傲天动联技术有限公司 Device and method for transmitting data based on CAPWAP (control and provisioning of wireless access points) protocol
CN105530193A (en) * 2014-09-30 2016-04-27 华为技术有限公司 Method for determining maximum transmission unit of tunnel, network device and system
CN105530193B (en) * 2014-09-30 2019-06-07 华为技术有限公司 Determine method, the network equipment and the system of tunnel maximum transmission unit
CN106612245A (en) * 2015-10-27 2017-05-03 大唐移动通信设备有限公司 Message transmission method and system based on GTPU (GPRS Tunneling Protocol for the user plane) tunnel protocol
CN106385344A (en) * 2016-09-05 2017-02-08 杭州华三通信技术有限公司 Message monitoring method and device
CN106385344B (en) * 2016-09-05 2019-09-06 新华三技术有限公司 A kind of monitoring messages method and apparatus
CN106789534B (en) * 2016-12-27 2019-09-17 京信通信系统(中国)有限公司 A kind of data transmission method and device based on wireless network
CN106789534A (en) * 2016-12-27 2017-05-31 京信通信技术(广州)有限公司 A kind of data transmission method and device based on wireless network
CN110313160A (en) * 2017-08-10 2019-10-08 联发科技股份有限公司 Method and device thereof in mobile communication system for avoiding package from dividing
CN110313160B (en) * 2017-08-10 2021-10-22 联发科技股份有限公司 Method and device for avoiding packet segmentation
CN107749815A (en) * 2017-09-21 2018-03-02 京信通信系统(中国)有限公司 A kind of data transmission method, processing method and processing device
US11251992B2 (en) 2017-09-21 2022-02-15 Comba Network Systems Company Limited Data transmission method and processing method, and device
CN108282391A (en) * 2018-01-11 2018-07-13 新华三技术有限公司 A kind of VXLAN message fragmenting methods and device
CN110198203A (en) * 2019-06-14 2019-09-03 中国人民解放军陆军工程大学 Method for controlling data transmission rate
CN111917786A (en) * 2020-08-06 2020-11-10 冯田旺 GRE tunnel-based data packet fragmentation method and data packet recombination method
CN112738661A (en) * 2020-12-15 2021-04-30 广西广播电视信息网络股份有限公司 Method for realizing bidirectional downlink acceleration on broadcast channel of I-PON (input-output passive optical network)
CN112738661B (en) * 2020-12-15 2022-05-31 广西广播电视信息网络股份有限公司 Method for realizing bidirectional downlink acceleration on broadcast channel of I-PON (input-output passive optical network)
CN113660295A (en) * 2021-10-20 2021-11-16 深圳市龙信信息技术有限公司 Message processing device

Similar Documents

Publication Publication Date Title
CN101827031A (en) Method and device for packet transmission in user datagram protocol UDP tunnel
EP1427146B1 (en) Packet transmission system and packet reception system
US20130279464A1 (en) Ip fragmentation in gtp tunnel
CN1933486B (en) IP communication device and IP communication system therefor
WO2010031324A1 (en) Method, device and system for data transmission
US9462530B2 (en) Wireless base station, wireless terminal, and packet transmission method
WO2016173076A1 (en) Data transfer method and system, and ue having relay function
CN102624723B (en) Method and device for achieving explicit congestion notification
WO2014026571A1 (en) Method and device for sending generic routing encapsulation tunnel message
CN112787902B (en) Message encapsulation method and device and message decapsulation method and device
US20080239988A1 (en) Method and System For Network Infrastructure Offload Traffic Filtering
US8179795B2 (en) Communication terminal apparatus, distribution apparatus, error notification method, and error notification program
WO2011079785A1 (en) Method and apparatus for transmitting data packets
CN104184646A (en) VPN data interaction method and system and VPN data interaction device
WO2006019501A2 (en) Efficient data transmission by data aggregation
CN107517225B (en) Protocol conversion method, gateway equipment and storage medium
EP2157727B1 (en) Wireless Base Station Applying Echo-Message
CN101645895A (en) Method and device for realizing tunnel safety
EP2600569B1 (en) Method, apparatus and system for processing a tunnel packet
CN102255790A (en) Method and system for informing congestion control information
CN100433714C (en) Method for transmission processing IP fragment message
WO2018045521A1 (en) Method and device for transmitting signaling in wireless network
WO2021208088A1 (en) Method and apparatus for security communication
US8583822B2 (en) Method and system for minimum frame size support for a communication protocol encapsulated over Ethernet
CN108055360B (en) Network data transmission method, system, transmission device and storage medium

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C02 Deemed withdrawal of patent application after publication (patent law 2001)
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20100908