Technical data

TCP/IP and UDP/IP
In the OSI model each layer is responsible for the
data that passes through it. The transport layer bears
responsibility for the transfer of data and there are
two alternative protocols available for this, TCP and
UDP.
UDP
UDP (User Datagram Protocol) is usually classified
as a connectionless protocol. This means that data
can be sent irrespective of whether the receiver
exists or not. Neither will the receiver notify the
sender whether the data was received or not. As
data is transferred without an established connec-
tion, the transfer is more effective and usually faster.
Consequently, UDP is used in applications that require effective use of the bandwidth
and where the application supports the retransmission of lost data if necessary.
You can compare UDP to posting a letter, data is placed in an addressed envelope.
Once you have posted the letter, you expect the post office to distribute the letter
correctly. Another important function included in UDP is the possibility to send
“broadcast” and “multicast”, one message with many recipients. This is the primary
reason for choosing UDP.
TCP
TCP (Transmission Control Protocol) is a connection oriented protocol, this means a
connection is established before the devices exchange data. TCP takes greater respon-
sibility for the data transfer than UDP, as the transferred data is acknowledged by the
recipient. The recipient must return an acknowledgement (ACK) for each sent data
packet. When an ACK is not received, the packet is retransmitted, which guarantees
that the data reaches the recipient.
Another function of TCP is that the protocol maintains sequence and flow control
when large amounts of data are transferred. Several TCP-packets can reach the recipi-
ent in another order than the one they were sent in. TCP guarantees, that the packets
are put together in the correct sequence, as they are assigned a sequence number. On
account of the requirement to establish a session and acknowledge transfers, it takes
longer for TCP to transfer data than UDP, in addition TCP uses more bandwidth.
www.westermo.com Theoretical and general applications 121
Windows Sockets
Applications
Telnet, FTP
Sockets
TCP
Application
OSI Layer No.
7
Application
Layer
4
Transport
Layer
3
Network
Layer
1, 2
Physical Layer
Data Link
Layer
Transport
Internet
Network interface
TDI
UDP
TCP
NetBios
NetBios over TCP/IP
NetBios
Applications
LAN Technologies
Ethernet, Token Ring
FDDI
NetBios
NetBios over TCP/IP
ICPM IGMP
ARP
B A C K