Fragmentation of send data, 2-3 fragmentation of send data – Omron CS CJ1W-ETN21 User Manual

Page 126

Advertising
background image

102

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.

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.

Data B

Sending User Program

Ethernet Unit

1. Send request

Source data

1,984 bytes

1,024 bytes

Data A

Data B

960 bytes

Data A

Data B

Data A

2. Data separated

3. Data A and
Data B sent
consecutively.

Receiving Node

Receiving Computer

4. First receive request

1,984bytes

1,984 bytes

Remaining
960 bytes

5. Second receive request

Only first
1,024 bytes

Advertising