"TCP and Udp": Ms. Sarvade P.S
"TCP and Udp": Ms. Sarvade P.S
Khed Solapur-413255
2024-25
AFFILIATED TO
M.S.B.T.E.
Evolution sheet for Micro Project
Marks out of 4
Marks out of 6 Total
for
for mars
Roll No Name of students performance
performance in out
in oral/
group activity of 10
Presentation
Name and
Signature of Ms. Sarvade P.S.
faculty
SVP’s Swami Vivekanand Institute of Technology(Polytechnic),
Solapur
.
CERTIFICATE
Place: Solapur
Date: / /
Acknowledgement
“TCP And UDP” has been developed successfully with a great contribution of two students in a
period of two months. We like to appreciate their guidance, encouragement and willingness since without
their support the project would not have been a success. We would like to give our heartfelt gratitude to
Principal Dr. Bhosale , Guide Ms. Sarvade P.S. & HOD Mrs.Waghmare P.U. who is the supervisor
of our project for helping and encouraging us in many ways to make our project a success. We would
never been able to finish our work without great support and enthusiasm from friends and support from
our family. We would like to thank the department of Computer Engineering, for giving us permission to
initiate this project and successfully finish it.
Resources Used:
Sr. Specification Remark
No.
1 Intel Core i5, RAM 16GB As per
requirement
2 Operating System – Windows 11 As per
requirement
3 Application – Microsoft Word 2021 As per
requirement
TCP :-
What is TCP (Transmission Control Protocol)?
TCP (Transmission Control Protocol) is one of the main protocols of the TCP/IP suite. It lies between the Application and
Network Layers which are used in providing reliable delivery services. Transmission Control Protocol (TCP) ensures reliable
and efficient data transmission over the internet. TCP plays a crucial role in managing the flow of data between computers,
guaranteeing that information is delivered accurately and in the correct sequence.
In this article, we will discuss about Transmission control protocol (TCP) in detail. We will also discuss IP, the Difference
between TCP and IP, and the working process of IP here. Let’s proceed with the definition of TCP First.
What is Transmission Control Protocol (TCP)?
Transmission Control Protocol (TCP) is a connection-oriented protocol for communications that helps in the exchange
of messages between different devices over a network. The Internet Protocol (IP), which establishes the technique for sending
data packets between computers, works with TCP.
The position of TCP is at the transport layer of the OSI model. TCP also helps in ensuring that information is transmitted
accurately by establishing a virtual connection between the sender and receiver.
After a particular message is broken down into bundles, these bundles may travel along multiple routes if one route is
jammed but the destination remains the same.
For Example:
When a user requests a web page on the internet, somewhere in the world, the server processes that request and sends back an
HTML Page to that user. The server makes use of a protocol called the HTTP Protocol. The HTTP then requests the TCP
layer to set the required connection and send the HTML file.
Now, the TCP breaks the data into small packets and forwards it toward the Internet Protocol (IP) layer. The packets are then
sent to the destination through different routes.
The TCP layer in the user’s system waits for the transmission to get finished and acknowledges once all packets have been
received.
Features of TCP/IP:-
Some of the most prominent features of Transmission control protocol are mentioned below.
1. Segment Numbering System: TCP keeps track of the segments being transmitted or received by assigning numbers to
each and every single one of them. A specific Byte Number is assigned to data bytes that are to be transferred while
segments are assigned sequence numbers. Acknowledgment Numbers are assigned to received segments.
2. Connection Oriented: It means sender and receiver are connected to each other till the completion of the process. The
order of the data is maintained i.e. order remains same before and after transmission.
3. Full Duplex: In TCP data can be transmitted from receiver to the sender or vice – versa at the same time. It increases
efficiency of data flow between sender and receiver.
4. Flow Control: Flow control limits the rate at which a sender transfers data. This is done to ensure reliable delivery. The
receiver continually hints to the sender on how much data can be received (using a sliding window).
5. Error Control: TCP implements an error control mechanism for reliable data transfer. Error control is byte-oriented.
Segments are checked for error detection. Error Control includes – Corrupted Segment & Lost Segment Management,
Out-of-order segments, Duplicate segments, etc.
6. Congestion Control: TCP takes into account the level of congestion in the network. Congestion level is determined by
the amount of data sent by a sender.
Advantages of TCP:-
1. It is a reliable protocol.
2. It provides an error-checking mechanism as well as one for recovery.
3. It gives flow control.
4. It makes sure that the data reaches the proper destination in the exact order that it was sent.
5. It is a well-documented and widely implemented protocol, maintained by standards organizations like the IETF (Internet
Engineering Task Force).
6. It works in conjunction with IP (Internet Protocol) to establish connections between devices on a network.
Disadvantages of TCP:-
1. TCP is made for Wide Area Networks, thus its size can become an issue for small networks with low resources.
2. TCP runs several layers so it can slow down the speed of the network.
3. It is not generic in nature. Meaning, it cannot represent any protocol stack other than the TCP/IP suite. E.g., it cannot
work with a Bluetooth connection.
4. No modifications since their development around 30 years ago.
What is the purpose of TCP Header?
TCP Header contains the important information for the proper delivery of the data. It contains port numbers,
acknowledgement numbers, flags, etc.
Can TCP handles both reliable and unreliable data transfer?
Transmission Control Protocol (TCP) is designed for reliable data transfer. For Unreliable data transfer, User Datagram
Protocol is a better choice.
Is Transmission Control Protocol (TCP) and Internet Protocol(IP) same?
TCP (Transmission Control Protocol) and IP (Internet Protocol) are not the same, but they work together in the TCP/IP suite
to enable internet communication. TCP ensures reliable data transmission by managing the breakdown and reassembly of
data packets, while IP handles addressing and routing these packets to the correct destination.
UDP:-
User Datagram Protocol (UDP) is a Transport Layer protocol. UDP is a part of the Internet Protocol suite, referred to as
UDP/IP suite. Unlike TCP, it is an unreliable and connectionless protocol. So, there is no need to establish a connection
prior to data transfer. The UDP helps to establish low-latency and loss-tolerating Connections establish over the network.The
UDP enables process to process communication.
Though Transmission Control Protocol (TCP) is the dominant transport layer protocol used with most of the Internet services;
provides assured delivery, reliability, and much more but all these services cost us additional overhead and latency. Here,
UDP comes into the picture. For real-time services like computer gaming, voice or video communication, live conferences;
we need UDP. Since high performance is needed, UDP permits packets to be dropped instead of processing delayed packets.
There is no error checking in UDP, so it also saves bandwidth. User Datagram Protocol (UDP) is more efficient in terms of
both latency and bandwidth.
UDP also provides a different port number to distinguish different user requests and also provides the checksum capability to
verify whether the complete data has arrived or not; the IP layer does not provide these two services.
UDP Header :-
UDP header is an 8-bytes fixed and simple header, while for TCP it may vary from 20 bytes to 60 bytes. The first 8 Bytes
contains all necessary header information and the remaining part consist of data. UDP port number fields are each 16 bits
long, therefore the range for port numbers is defined from 0 to 65535; port number 0 is reserved. Port numbers help to
distinguish different user requests or processes.
1. Source Port: Source Port is a 2 Byte long field used to identify the port number of the source.
2. Destination Port: It is a 2 Byte long field, used to identify the port of the destined packet.
3. Length: Length is the length of UDP including the header and the data. It is a 16-bits field.
4. Checksum: Checksum is 2 Bytes long field. It is the 16-bit one’s complement of the one’s complement sum of the UDP
header, the pseudo-header of information from the IP header, and the data, padded with zero octets at the end (if necessary) to
make a multiple of two octets.
UDP Services:-
1. Process to Process Communication
2. Connectionless Services
3. Flow Control
4. Error Control
5. Multiplexing and Demultiplexing
6. Encapsulation and Decapsulation
7. Queuing
8. Congestion Control
Applications of UDP :-
1. Used for simple request-response communication when the size of data is less and hence there is lesser concern about
flow and error control.
2. It is a suitable protocol for multicasting as UDP supports packet switching.
3. UDP is used for some routing update protocols like RIP(Routing Information Protocol).
4. Normally used for real-time applications which can not tolerate uneven delays between sections of a received message.
5. Following implementations uses UDP as a transport layer protocol:
i. NTP (Network Time Protocol)
ii. DNS (Domain Name Service)
iii. BOOTP, DHCP.
iv. NNP (Network News Protocol)
v. Quote of the day protocol
vi. TFTP, RTSP, RIP.
6.The application layer can do some of the tasks through UDP
i. Trace Route
ii. Record Route
iii. Timestamp
7. UDP takes a datagram from Network Layer, attaches its header, and sends it to the user. So, it works fast
8.Actually, UDP is a null protocol if you remove the checksum field.
i. Reduce the requirement of computer resources.
ii. When using the Multicast or Broadcast to transfer.
iii. The transmission of Real-time packets, mainly in multimedia
iv. applications.
9.DHCP (Dynamic Host Configuration Protocol) uses UDP to dynamically assign IP addresses to devices on a network.
DHCP messages are typically small, and the delay caused by packet loss or retransmission is generally not critical for this
application.
Advantages of UDP:
1. Speed: UDP is faster than TCP because it does not have the overhead of establishing a connection and ensuring reliable
data delivery.
2. Lower latency: Since there is no connection establishment, there is lower latency and faster response time.
3. Simplicity: UDP has a simpler protocol design than TCP, making it easier to implement and manage.
4. Broadcast support: UDP supports broadcasting to multiple recipients, making it useful for applications such as video
streaming and online gaming.
Disadvantages of UDP:
1. No reliability: UDP do not guarantee delivery of packet or order of delivery, which can lead to missing or duplicate data.
2. No congestion control: UDP does not have congestion control, which means that it can send packets at a rate that can
cause network congestion.
3. No flow control: UDP does not have flow control, which means that it can overwhelm the receiver with packets that it
cannot handle.
4. Vulnerable to attacks: UDP is vulnerable to denial-of-service attacks, where an attacker can flood a network with UDP
packets, overwhelming the network and causing it to crash.
TCP (Transmission Control Protocol) is a vital component of internet communication, ensuring that data is transmitted
reliably and accurately between devices. Its ability to manage data packet transmission, error correction, and proper
sequencing underpins the smooth and efficient exchange of information that we rely on every day.
User Datagram Protocol (UDP) is a Transport Layer protocol. UDP is a part of the Internet Protocol suite, referred to as
UDP/IP suite. Unlike TCP, it is an unreliable and connectionless protocol. So, there is no need to establish a connection prior
to data transfer. The UDP helps to establish low-latency and loss-tolerating Connections establish over the network.The UDP
enables process to process communication.
References:
1. https://www.geeksforgeeks.org/TCP/
2. https://www.geeksforgeeks.org/UDP/
3. https://acowebs.com/TCP/
4. https://acowebs.com/UDP /
5. https://en.wikipedia.org/wiki/TCP
6. https://en.wikipedia.org/wiki/UDP
7. https://www.google.com