CIR 209 (Lecture 4e) OSI - Model
CIR 209 (Lecture 4e) OSI - Model
The transport layer is responsible for process-to-process delivery of the entire message. A
process is an application program running on a host.
Whereas the network layer oversees source-to-destination delivery of individual packets, it
does not recognize any relationship between those packets.
It treats each one independently, as though each piece belonged to a separate message,
whether or not it does.
The transport layer, on the other hand, ensures that the whole message arrives intact and in
order, overseeing both error control and flow control at the source-to-destination level.
1.2 Role of the Transport Layer
Computers often run several programs at the same time. For this reason, source-to-
destination delivery means delivery not only from one computer to the next but also
from a specific process (running program) on one computer to a specific process
(running program) on the other.
Page 1 of 9
The transport layer header must therefore include a type of address called a service-point
address (or port address).
The network layer gets each packet to the correct computer; the transport layer gets the
entire message to the correct process on that computer.
ii. Segmentation and reassembly
These numbers enable the transport layer to reassemble the message correctly upon
arriving at the destination and to identify and replace packets that were lost in
transmission.
iii. Connection control
A connection-oriented transport layer makes a connection with the transport layer at the
destination machine first before delivering the packets.
After all the data are transferred, the connection is terminated.
iv. Flow control
Like the data link layer, the transport layer is responsible for flow control. However, flow
control at this layer is performed end to end rather than across a single link.
v. Error control
Like the data link layer, the transport layer is responsible for error control.
However, error control at this layer is performed process-to-process rather than across a
single link.
The sending transport layer makes sure that the entire message arrives at the receiving
transport layer without error (damage, loss, or duplication).
Error correction is usually achieved through retransmission
Page 2 of 9
1.4 Specific transport layer responsibilities:
Tracking individual conversations
Transport layer protocols specify how to transfer messages between hosts, and are
responsible for managing reliability requirements of a conversation.
1.5 Transport Layer Protocols
The transport layer includes:
Transmission Control Protocol (TCP) - Reliable protocol for the TCP/IP stack
User Datagram Protocol (UDP) - unreliable protocol for the TCP/IP stack
Sequenced Packet Exchange (SPX) reliable protocol for the IPX/SPX (Novell Netware
Stack)
Page 3 of 9
1.5.1 Transmission Control Protocol (TCP)
Features of TCP
Number and track data segments transmitted to a specific host from a specific
application
Acknowledge received data
TCP is a stateful connection oriented transport layer protocol which means it keeps track of
the state of the communication session.
TCP records which information it has sent, and which information has been acknowledged
Page 4 of 9
Figure 1: Transport Layer Header (Source: Comer, 2008; 5th edition)
Source Port A 16-bit field used to identify the source application by port number.
Destination Port A 16-bit field used to identify the destination application by port number.
Header Length A 4-bit field known as ʺdata offsetʺ that indicates the length of the TCP segment header
Checksum A 16-bit field used for error checking of the segment header and data.
Page 5 of 9
1.5.2 User Datagram Protocol (UDP)
UDP provides the basic functions for delivering datagrams between the appropriate applications,
with very little overhead and data checking.
• UDP is a connectionless protocol.
• UDP is known as a best-effort delivery protocol because there is no acknowledgment that
the data is received at the destination.
Features UDP
• Data is reconstructed in the order that it is received.
• Any segments that are lost are not resent.
• There is no session establishment.
• The sending is not informed about resource availability
UDP Header
Figure 2: User Datagram Protocol Header (Source: Comer, 2008; 5th edition)
Page 6 of 9
Socketing Role of Transport Layer: Separating Multiple Communications
TCP and UDP transport layer protocols use port numbers to manage multiple, simultaneous
conversations.
The source port number is associated with the originating application on the local host
whereas the destination port number is associated with the destination application on the
remote host.
Page 7 of 9
Port Number Protocol Application
20 TCP File Transfer Protocol (FTP) - Data
23 TCP Telnet
0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 3 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
Connection control Data stream type Source connection ID
Destination connection ID Sequence number
Acknowledgement Number Allocation number
Data :::
Page 8 of 9
Functions of the Various Flags
i. Connection control (8 Binary bits).
Value Description
0x10 End of message.
0x20 Attention.
0x40 Acknowledgement required.
0x80 System packet.
Page 9 of 9