Protocol Overview

Section 6-2

6-2-3 Fragmentation of Send Data

The Ethernet Unit fragments data for TCP transmission into units of 1,024 bytes and data for UDP transmission into units of 1,472 bytes. TCP requires one reception request to receive each unit of data. UDP, however, restores the original data before passing it to the user process, allowing all the data in a single transmission to be received with one reception request.

Cautions when Using TCP

An example of the fragmentation and transmission of data using the TCP is shown in the following illustration.

1,2,3... 1. The sending user program sends a request to send 1,984 bytes of data.

2.The Ethernet Unit fragments the send data into Data A with 1,024 bytes and Data B with 960 bytes.

3.Data A and Data B are sent consecutively.

4.The receiving user program sends a request to receive 1,984 bytes of data. However, only data A is sent in the first packet, and data B is not received.

5.Another receive request to receive data must be made before the remain- ing data, Data B, is received.

Sending User Program

 

Ethernet Unit

Receiving Node

Receiving Computer

1. Send request

 

 

 

 

 

 

 

 

4. First receive request

 

 

 

 

 

 

 

 

 

1,984bytes

1,984 bytes

1,024 bytes

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Source data

 

 

Data A

 

 

Data A

 

 

Data A

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Only first

 

 

 

Data B

 

 

 

 

 

 

 

 

 

 

 

 

 

 

1,024 bytes

 

 

960 bytes

 

 

 

 

5. Second receive request

 

 

2. Data separated

 

 

 

 

 

1,984 bytes

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

3. Data A and

 

Data B

 

 

Data B

 

 

 

 

 

 

 

 

Data B sent

 

 

 

 

 

 

 

 

 

 

 

 

 

 

consecutively.

 

 

 

 

Remaining

 

 

 

 

 

 

 

 

 

 

960 bytes

When using TCP protocol, the fragmented data is passed to the user program. Therefore, the receiving user program must be able to evaluate the end of the data transmission, and repeatedly send receive requests until all data has been received. The receive request is sent twice in the example shown above, but the data would be even more fragmented if a router was included in the communications path, and the number of receive requests would need to be increased accordingly.

When making the receive request, it is not necessary to specify the same data length as the sent data length. For example, if the length setting is shorter than the actual length of the data, all the data can be received by repeating the receive requests.

Note If communications are with a different segment and data is sent via the TCP protocol, data will be fragmented into units of 536 bytes.

Cautions when Using UDP

An example of fragmentation and transmission of data using the UDP is shown in the following illustration.

1,2,3... 1. The transmission user program sends a request to send 1,984 bytes of da- ta.

2.The Ethernet Unit fragments the send data into Data A with 1,472 bytes and Data B with 512 bytes.

102

Page 126
Image 126
Omron CJ1W-ETN21 operation manual Fragmentation of Send Data