![background image](http://html1.mh-extra.com/html/omron/cs1w-etn01/cs1w-etn01_operation-manuals_742528102.webp)
6-1
Section
Overview
90
6-1-7 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 origi-
nal data before passing it to the user process, allowing all the data in a single
transmission to be received with one reception request.
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 remaining
data, Data B, is received.
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
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 communica-
tions path, and the number of receive requests would need to be increased ac-
cordingly.
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 re-
ceive requests.
Note If communications are with a different segment and data is sent via the TCP pro-
tocol, data will be fragmented into units of 536 bytes.
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 data.
2. The Ethernet Unit fragments the send data into Data A with 1,472 bytes and
Data B with 512 bytes.
3. Data A and Data B are sent consecutively.
Cautions when Using TCP
Cautions when Using UDP