The present invention relates to data frame transmission technology in communication systems, and particularly, to a method and an apparatus for data frame transmission by confining the size of a data frame to a Maximum Transmission Unit (MTU).
In order to fully utilize existing Synchronous Optical Network (SONET)/Synchronous Digital Hierarchy (SDH) and Optical Transmission Network (OTN), telecommunication operators usually map data of various upper layer services (e.g., Ethernet, Internet Protocol/Point-to-Point Protocol (IP/PPP), Multi-Protocol Label Switching (MPLS), etc.) to the SONET/SDH and OTN for transmission through a Generic Framing Procedure (GFP).
The GFP is put forward by the Telecommunication Standardization Sector of International Telecommunications Union (ITU-T), and the detailed description of the GFP is given in the ITU-T G7041/Y.1303. The transmission scheme of the GFP is explained hereinafter.
However, for the same transmission path, if the MTU of the source is larger than that of the sink, the payload length of the GFP frame sent from the source may very possibly be larger than the MTU of the sink, which makes it impossible for the buffer of the sink to hold the GFP frame, so that the GFP frame will be discarded and the data is lost. If the MTU of the source is much larger than that of the sink, there is a very high possibility that the payload length of the GFP frame from the source is larger than the MTU of the sink, which will cause very serious loss of frame at the sink.
Embodiments of the present invention provide a method for data frame transmission, which prevents loss of frame during data transmission caused by a Maximum Transmission Unit (MTU) difference between a transmitting device and a receiving device.
Embodiments of the present invention also provide an apparatus for data frame transmission, which prevents loss of frame during data transmission caused by a MTU difference between a transmitting device and a receiving device.
According to one embodiment of the present invention, the method for data frame transmission includes:
obtaining a Maximum Transmission Unit (MTU) of a sink;
determining whether an MTU of a source is larger than the MTU of the sink, if the MTU of the source is larger than the MTU of the sink, taking the MTU of the sink as a threshold to send a data frame; otherwise, taking the MTU of the source as the threshold to send the data frame.
An apparatus for data frame transmission includes:
an MTU processing unit, configured to obtain an MTU of the sink, determine whether the MTU of the source is larger than the MTU of the sink, if the MTU of the source is larger than the MTU of the sink, determine the MTU of the sink being a threshold;
a data frame encapsulation unit, configured to encapsulate an upper layer data packet into a data frame;
a buffer, configured to buffer the data frame encapsulated by the data frame encapsulation unit;
a transmission path, configured to read the data frame from the buffer and send the data frame.
In the method and apparatus provided by the embodiments of the present invention, the source obtains the MTU of the sink, when the MTU of the sink is smaller than that of the source, the source takes the MTU of the sink as the threshold for data frame transmission to ensure that the payload length of the data frame sent to the sink does not exceed the MTU of the sink, and therefore the frame loss at the sink caused by the difference between the MTUs of the source and sink is prevented.
Moreover, an upper layer of the source in the embodiments of the present invention may limit the length of the upper layer service data packet according to the MTU threshold so that the payload length of the encapsulated data frame will not exceed the MTU threshold, thus the embodiment of the present invention further solves the problem of packet loss at the source.
The present invention will be described in detail hereinafter with reference to accompanying drawings and embodiments.
The method provided by the embodiments of the present invention is applicable to communication systems similar to
Step 301: when a connection is established or after the connection is established, a source obtains the MTU of a sink. The MTU in the embodiment of the present invention refers to the maximum length of a data frame that can be received by a synchronous path of a communication device, and the MTU may be determined according to the size of the buffer of the synchronous path following existing method. Specifically to the GFP, the MTU is the maximum length of the payload of the GFP frame sent or received by the communication device.
Step 302: the source determines whether the MTU of the source is larger than the MTU of the sink, if the MTU of the source is larger than the MTU of the sink, proceed to Step 303; otherwise, proceed to Step 304.
Step 303: the source modifies the MTU of the source to the MTU of the sink and takes the modified MTU as a threshold to send the data frame. In the case of a GFP frame, the source determines whether the length of the payload encapsulated in the GFP frame is larger than the MTU of the sink, if the length of the payload encapsulated in the GFP frame is larger than the MTU of the sink, stops transmitting the GFP frame and sends an indication to the upper layer of the source (e.g., the Ethernet layer or PPP layer) indicating the length is overlarge. Upon the receipt of the indication, the upper layer of the source acquires the modified MTU and limits the length of the client service data packet according to the modified MTU to make sure that the length of the payload encapsulated in the GFP frame is within the threshold. The step of limiting the length of the client service data packet may be implemented through the existing fragment/concatenation method. If the length of the payload encapsulated in the GFP frame is smaller than or equal to the MTU of the sink, buffer and transmit the GFP frame, then the procedure ends.
After the source modifies the MTU of the source to that of the sink, the source may also send directly the modified MTU to the upper layer. The upper layer limits the length of the client service data packet according to the modified MTU to make sure that the length of the payload encapsulated in the GFP frame is within the modified MTU. Therefore the upper layer may control the length of the client service data packet and reduce the risk of packet loss at the source.
Step 304: the source sends the data frame taking the MTU of the source as the threshold, i.e., the source determines whether the length of the payload encapsulated in GFP frame is larger than the MTU of the source, if the length of the payload encapsulated in GFP frame is larger than the MTU of the source, stops transmitting the GFP frame, and sends an indication to the upper layer of the source indicating that the length is overlarge. Upon the receipt of the indication, the upper layer of the source limits the length of the client service data packet according to the MTU of the source to make sure that the length of the payload encapsulated in the GFP frame is within the MTU of the source; otherwise, buffer and transmit the GFP frame, and end the procedure.
In Step 301, there are several methods for the source to obtain the MTU of the sink; three of them are explained hereinafter.
In addition, in Step 301, the source may obtain the MTU of the sink regularly, or upon a trigger, e.g., when the synchronous path is launched again after being closed, the source may be triggered to obtain the MTU of the sink.
an MTU processing unit 704, configured to obtain the MTU of the sink, determine whether the MTU of the source is larger than the MTU of the sink, if the MTU of the source is larger than the MTU of the sink, determine the MTU of the sink to be a threshold;
a data frame encapsulation unit 701, configured to encapsulate an upper layer data packet into a data frame according to the threshold determined by the MTU processing unit 704; specifically in the embodiment of the present invention, the data frame encapsulation unit 701 may be a GFP module configured to encapsulate the upper layer data packet into a GFP frame;
a buffer 702, configured to buffer the data frame encapsulated by the data frame encapsulation unit 701;
a transmission path 703, configured to read the data frame from the buffer 702 and send the data frame; the transmission path 703 may be a synchronous transmission path such as SDH/SONET and OTN;
Preferably, when the MTU of the source is larger than that of the sink, the MTU processing unit 704 is further configured to inform, upon the receipt of the MTU of the sink, the data frame encapsulation unit 701 to encapsulate the data frame according to the MTU of the sink.
The MTU processing unit 704 is equipped on both the source and the sink. Since the communication is a bidirectional process, the source is also equipped with modules identical to those of the sink, and vice versa.
The MTU may be carried by the GFP control frame. The MTU may be carried in a designated field of payload of the GFP control frame, and the PLI of the header of the GFP control frame may be 1, 2 or 3.
The MTU may also be carried by the GFP client management frame. The MTU is carried in the header extension of the GFP client management frame.
The foregoing is only preferred embodiments of this invention. The protection scope of this invention, however, is not limited to the above description. Any change or substitution, within the technical scope disclosed by this invention, easily occurring to those skilled in the art should be covered by the protection scope of this invention.
Number | Date | Country | Kind |
---|---|---|---|
200510087196.3 | Jul 2005 | CN | national |
Filing Document | Filing Date | Country | Kind | 371c Date |
---|---|---|---|---|
PCT/CN2006/001345 | 6/15/2006 | WO | 00 | 10/23/2007 |