0% found this document useful (0 votes)
25 views

Transport Layer

The transport layer offers end-to-end communication between processes on remote hosts by taking data from the application layer, breaking it into segments, numbering bytes, and passing it to the network layer. The two main transport protocols are TCP, which provides reliable communication, and UDP, which provides unreliable communication. TCP uses acknowledgments and retransmission to ensure reliable delivery of data segments in order, while UDP does not provide these reliability features.

Uploaded by

sairajdash189
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
25 views

Transport Layer

The transport layer offers end-to-end communication between processes on remote hosts by taking data from the application layer, breaking it into segments, numbering bytes, and passing it to the network layer. The two main transport protocols are TCP, which provides reliable communication, and UDP, which provides unreliable communication. TCP uses acknowledgments and retransmission to ensure reliable delivery of data segments in order, while UDP does not provide these reliability features.

Uploaded by

sairajdash189
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

Transport Layer Introduction

Transport layer offers peer-to-peer and end-to-end connection between two processes on
remote hosts. Transport layer takes data from upper layer (i.e. Application layer) and then
breaks it into smaller size segments, numbers each byte, and hands over to lower layer
(Network Layer) for delivery.

Functions
• This Layer is the first one which breaks the information data, supplied by
Application layer in to smaller units called segments. It numbers every byte in
the segment and maintains their accounting.
• This layer ensures that data must be received in the same sequence in which
it was sent.
• This layer provides end-to-end delivery of data between hosts which may or
may not belong to the same subnet.
• All server processes intend to communicate over the network are equipped
with well-known Transport Service Access Points (TSAPs) also known as port
numbers.

End-to-End Communication
A process on one host identifies its peer host on remote network by means of TSAPs, also
known as Port numbers. TSAPs are very well defined and a process which is trying to
communicate with its peer knows this in advance.

For example, when a DHCP client wants to communicate with remote DHCP server,
it always requests on port number 67. When a DNS client wants to communicate
with remote DNS server, it always requests on port number 53 (UDP).
The two main Transport layer protocols are:
• Transmission Control Protocol
It provides reliable communication between two hosts.
• User Datagram Protocol
It provides unreliable communication between two hosts.

Transmission Control Protocol


The transmission Control Protocol (TCP) is one of the most important protocols of
Internet Protocols suite. It is most widely used protocol for data transmission in
communication network such as internet.

Features
• TCP is reliable protocol. That is, the receiver always sends either
positive or negative acknowledgement about the data packet to the
sender, so that the sender always has bright clue about whether the
data packet is reached the destination or it needs to resend it.
• TCP ensures that the data reaches intended destination in the same
order it was sent.
• TCP is connection oriented. TCP requires that connection between two
remote points be established before sending actual data.
• TCP provides error-checking and recovery mechanism.
• TCP provides end-to-end communication.
• TCP provides flow control and quality of service.
• TCP operates in Client/Server point-to-point mode.
• TCP provides full duplex server, i.e. it can perform roles of both receiver
and sender.

Header
The length of TCP header is minimum 20 bytes long and maximum 60 bytes.

• Source Port (16-bits) - It identifies source port of the application


process on the sending device.
• Destination Port (16-bits) - It identifies destination port of the
application process on the receiving device.
• Sequence Number (32-bits) - Sequence number of data bytes of a
segment in a session.
• Acknowledgement Number (32-bits) - When ACK flag is set, this
number contains the next sequence number of the data byte expected
and works as acknowledgement of the previous data received.
• Data Offset (4-bits) - This field implies both, the size of TCP header
(32-bit words) and the offset of data in current packet in the whole TCP
segment.
• Reserved (3-bits) - Reserved for future use and all are set zero by
default.
• Flags (1-bit each)
o NS - Nonce Sum bit is used by Explicit Congestion
Notification signaling process.
o CWR - When a host receives packet with ECE bit set, it
sets Congestion Windows Reduced to acknowledge that
ECE received.
o ECE -It has two meanings:
▪ If SYN bit is clear to 0, then ECE means that
the IP packet has its CE (congestion
experience) bit set.
▪ If SYN bit is set to 1, ECE means that the
device is ECT capable.
o URG - It indicates that Urgent Pointer field has significant
data and should be processed.
o ACK - It indicates that Acknowledgement field has
significance. If ACK is cleared to 0, it indicates that packet
does not contain any acknowledgement.
o PSH - When set, it is a request to the receiving station to
PUSH data (as soon as it comes) to the receiving
application without buffering it.
o RST - Reset flag has the following features:
▪ It is used to refuse an incoming connection.
▪ It is used to reject a segment.
▪ It is used to restart a connection.
o SYN - This flag is used to set up a connection between
hosts.
o FIN - This flag is used to release a connection and no more
data is exchanged thereafter. Because packets with SYN
and FIN flags have sequence numbers, they are processed
in correct order.
• Windows Size - This field is used for flow control between two stations
and indicates the amount of buffer (in bytes) the receiver has allocated
for a segment, i.e. how much data is the receiver expecting.
• Checksum - This field contains the checksum of Header, Data and
Pseudo Headers.
• Urgent Pointer - It points to the urgent data byte if URG flag is set to
1.
• Options - It facilitates additional options which are not covered by the
regular header. Option field is always described in 32-bit words. If this
field contains data less than 32-bit, padding is used to cover the
remaining bits to reach 32-bit boundary.

Addressing
TCP communication between two remote hosts is done by means of port numbers
(TSAPs). Ports numbers can range from 0 – 65535 which are divided as:

• System Ports (0 – 1023)


• User Ports ( 1024 – 49151)
• Private/Dynamic Ports (49152 – 65535)
The User Datagram Protocol (UDP) is simplest Transport Layer communication
protocol available of the TCP/IP protocol suite. It involves minimum amount of
communication mechanism. UDP is said to be an unreliable transport protocol but it
uses IP services which provides best effort delivery mechanism.
In UDP, the receiver does not generate an acknowledgement of packet received and
in turn, the sender does not wait for any acknowledgement of packet sent. This
shortcoming makes this protocol unreliable as well as easier on processing.

Requirement of UDP
A question may arise, why do we need an unreliable protocol to transport the data?
We deploy UDP where the acknowledgement packets share significant amount of
bandwidth along with the actual data. For example, in case of video streaming,
thousands of packets are forwarded towards its users. Acknowledging all the
packets is troublesome and may contain huge amount of bandwidth wastage. The
best delivery mechanism of underlying IP protocol ensures best efforts to deliver its
packets, but even if some packets in video streaming get lost, the impact is not
calamitous and can be ignored easily. Loss of few packets in video and voice traffic
sometimes goes unnoticed.

Features
• UDP is used when acknowledgement of data does not hold any
significance.
• UDP is good protocol for data flowing in one direction.
• UDP is simple and suitable for query based communications.
• UDP is not connection oriented.
• UDP does not provide congestion control mechanism.
• UDP does not guarantee ordered delivery of data.
• UDP is stateless.
• UDP is suitable protocol for streaming applications such as VoIP,
multimedia streaming.

UDP Header
UDP header is as simple as its function.

UDP header contains four main parameters:


• Source Port - This 16 bits information is used to identify the source port
of the packet.
• Destination Port - This 16 bits information, is used identify application
level service on destination machine.
• Length - Length field specifies the entire length of UDP packet
(including header). It is 16-bits field and minimum value is 8-byte, i.e.
the size of UDP header itself.
• Checksum - This field stores the checksum value generated by the
sender before sending. IPv4 has this field as optional so when checksum
field does not contain any value it is made 0 and all its bits are set to
zero.

UDP application
Here are few applications where UDP is used to transmit data:
• Domain Name Services
• Simple Network Management Protocol
• Trivial File Transfer Protocol
• Routing Information Protocol
• Kerberos

You might also like