Examples of TCP and UDP in Real Life - GeeksforGeeks (2024)

Last Updated : 03 Aug, 2022

Comments

Improve

Today we will see the Real-Life Examples of TCP and UDP in Computer Networks

Before looking at the Real-Life Examples of TCP and UDP, Let’s see

What is Computer Network?

A Computer Network is a set of devices (Nodes) that are connected to each other by communication links to share digital information.
The communication links can either be wireless medium or wired medium. In present times, it is impossible to imagine a world without a computer network. From chatting with a friend to making video calls, everything is possible due to the presence of a Computer Network

Computer Network is broadly divided into 3 types.

They are as follows :

  • Local Area Network (LAN) –
    It is a privately owned network, which usually includes Office, Building, or Campus. Speed Ranges from 100 – 1000Mbps
  • Wide Area Network(WAN) –
    It involves transmitting the data over large geographic areas such as the country, the continent, or even the whole world.
  • Metropolitan Area Network(MAN) –
    It involves transmitting the data in and around a city or a town, hence the name Metropolitan Area Network. Its size ranges between that of LAN and WAN.

Network Model :

  • A network is an amalgamation of Hardware and Software.
  • The Hardware part of the network consists of physical devices such as a switch, hub, and router which are responsible for the transmission of data signals from one network to another
  • The Software part consists of protocols(rules) that are required for the proper functioning of the network
  • Hence based on the above points, the Network Model is divided into two types
    1. OSI Reference Model
    2. TCP/IP Reference Model

OSI Reference Model :
The Open Systems Interconnection model (OSI Model) was first introduced in the late 1970s. It is a reference model for designing a network architecture that is robust and flexible. It is a universally accepted model which describes the communication of various applications over the internet.

The OSI Model is divided into 7 layers :

  • In order to reduce the design complexity, networks are organized as stacks of layers and levels.
  • Each layer has its own set of functions which aids in the successful transfer of data
  • Each layer passes the data to the layer immediately below or above it.

The Layers are as follows :

  1. Application Layer –
    It consists of application layer protocol that allows network applications to work correctly in the network
  2. Presentation Layer
    It receives the data from the application layer and is responsible for Translation, Data Compression, and Encryption/Decryption of the data
  3. Session Layer –
    It is responsible for setting up and managing connections. Its functions include Authentication, Authorization, and Session Restoration.
  4. Transport Layer
    It receives the data from the Session Layer. It is responsible for the delivery of a message from one process to another. It controls the reliability of communication through flow control, error control, and segmentation. It has two protocols namely TCP and UDP.
  5. Network Layer
    It is responsible for the transmission of data segments from one computer to another located in different networks
  6. Data Link Layer –
    Responsible for moving frames from one hop to another.
  7. Physical Layer –
    It is responsible for converting the binary bits into signals and transmitting over local media

TCP/IP Reference Model :
The layers in the TCP/IP protocol suite do not exactly match those in the OSI model The original TCP/IP protocol suite was defined as having four layers host to network internet transport and application. TCP/IP Reference Model is the practical implementation of the theoretical OSI Model

Transport Layer :
The layer below the Session Layer is called the Transport Layer. The Data in this layer is called a segment. It is responsible for the delivery of a message from one process to another. It is also responsible for reliable communication through flow control, error control, and segmentation. Some of the most important protocols are Transmission Control Protocol (TCP) and User Datagram Protocol(UDP). It does two types of Transmission i.e Connection-Oriented Transmission and Connectionless Transmission which are carried out by TCP and UDP respectively.

Some of the Responsibilities of Transport Layer are as Follows :

  • End to End delivery
  • Reliability
  • Error Control
  • Flow Control
  • Multiplexing and Demultiplexing

Transmission Control Protocol (TCP) :
It is a connection-oriented protocol that is used for the reliable transfer of data from one process to another process. It takes the help of the Port numbers for transmission. It uses flow control and error control mechanisms at the transport level. There are three phases in which TCP transmits the data between the sender and receiver which is as follows:

  • Connection Establishment –
    It takes the help of 3 way handshaking mechanism for Connection Establishment which involves the exchange of SYN, ACK, and window size
  • Data transfer –
    In this step, the transmission of data occurs
  • Connection termination –
    Here the transmission of data gets terminated by sending a FIN packet to the receiver.

Services offered by the TCP are as follows :

  • Process to Process or end to end Communication using Port numbers
  • Transmits the data as a stream of bytes from source to destination
  • It groups the data that comes from the application into packets called Segments. It also adds a header to each data segment and sends it to the network layer
  • It offers Full Duplex communications
  • Reliable Service: TCP uses an acknowledgment mechanism which makes it reliable
  • It offers Flow control, Error control, and Congestion control too.

Advantages :

  • Flow Control
  • Error Control
  • Congestion Control
  • Process to Process Communication
  • Inorder delivery of data segments

Disadvantages :

  • The data segments don’t get transmitted immediately
  • More overhead(20-60Bytes)
  • It has a large TCP Header

User Datagram Protocol (UDP) :
It is a transport layer protocol. It is an unreliable and connectionless protocol. It is much faster, simpler, and efficient than TCP. However, it doesn’t check errors due to which Bandwidth is saved. It is widely used in real-time services like videogame, voice, or video communication
The packets sent by the UDP are called user datagrams.

Services offered by the UDP are as follows :

  • Process to Process port to port transmission of segments
  • Connectionless and minimum overhead Protocol
  • Fast and simple transmission
  • No flow and error control, applications using UDP services are responsible for providing them
  • UDP encapsulates and decapsulates the messages.

Advantages :

  • The packet created by UDP is relatively smaller than that of TCP(UDP Header: 8 bytes)
  • Connectionless Transmission
  • It is Faster, Simpler and Efficient

Disadvantages :

  • There is no guarantee that the sender will receive the data
  • Lack of proper Error checking mechanisms
  • The lost packets will not be retransmitted
  • There is a possibility of receiving out of order packets

Real-Life Examples of TCP :

  1. Text Communication –
    We all are aware of the importance of Text Communication in the present times. Any discrepancy in texting between sender and receiver cannot be tolerated. Hence TCP is used in Text Communication due to its reliable transmission, error control, and in order receiving of the data.
    Example : Whatsapp, Instagram, Google Chat,iMessage.
  2. Transfer of files or FTP –
    TCP is used in File transfer when we cannot tolerate the loss of data and receiving the data incorrect order is of utmost importance. FTP uses two TCP connections i.e control connection and data connection.
    Control Connection : FTP sends information like user identification and passwords.
    Data Connection: In this connection, files are sent over the network.
    Ex : FileZilla Client and Server
  3. HyperText Transfer Protocol (HTTP) –
    It is used to access the data present on the World Wide Web. It uses TCP protocol for accessing the web pages present on the internet due to the fact that TCP provides inorder data, error control and flow control, and retransmission of data segments.
  4. Simple Mail Transfer Protocol(SMTP)
    It is an application layer protocol that is used to send Emails from one system to another. SMTP uses the services of TCP to start a connection with the SMTP server. Once the SMTP server accepts the connection request, it allows the sender to send the mails.
    Ex: Yahoo, Gmail, Outlook, etc

Real-Life Examples of UDP :

  1. Online Games –
    Most of the online games we play use the services of User Datagram Protocol. Since any amount of delay cannot be tolerated in online games UDP is widely used over TCP which is quite slower. UDP doesn’t retransmit the lost data and is a connectionless protocol due to which it is much faster.
    Ex : All online games
  2. Video Conferencing –
    Video Conferencing apps like Skype, Gmeet, Zoom, all use the services of UDP due to the fact that they are real-time applications and any delay in receiving the data cannot be tolerated.
    Ex: Skype, Google Meet, zoom, and Facetime.
  3. Voice Over IP(VoIP) –
    It is similar to Video Conferencing, where apps like Viber, Whatsapp, Google Hangouts use UDP for converting our voice to digital data and transmit it over the network, hence the name VoIP.
    Ex : Viber, Whatsapp Voice calling, Wi-Fi calling.
  4. Domain Name System(DNS) –
    It is a service used for mapping domain names to their corresponding IP address. It is used by the application layer. It can also be looked at as a distributed DataBase that has a hierarchical name Server.DNS uses UDP for fetching the corresponding IP address due to the following reasons:

    a) UDP is much faster than TCP. After all, speed matters a lot when loading a webpage
    b) DNS requests are typically small requests and can be accommodated inside UDP segments(Header).
    c) Even though UDP is unreliable, it can be achieved in the application layer too

Hence, these were the Real-Life Examples of TCP and UDP.

Why does DNS use UDP and not TCP?



phanitejau

Improve

Next Article

Differences between TCP and UDP

Please Login to comment...

Examples of TCP and UDP in Real Life - GeeksforGeeks (2024)

FAQs

Examples of TCP and UDP in Real Life - GeeksforGeeks? ›

World Wide Web, email, remote administration, and file transfer rely on TCP. UDP : User Datagram Protocol is a simpler message-based connectionless protocol. Connectionless protocols do not set up a dedicated end-to-end connection.

What are examples of TCP and UDP in real life scenarios? ›

What are TCP and UDP used for? TCP is best used for direct communication in which a reliable connection is needed, such as web browsing, email, text messaging, and file transfers. UDP is best used for live and real-time data transmission when speed is more important than reliability.

Can you give example applications that use TCP and UDP? ›

Example : Whatsapp, Instagram, Google Chat,iMessage. TCP is used in File transfer when we cannot tolerate the loss of data and receiving the data incorrect order is of utmost importance. FTP uses two TCP connections i.e control connection and data connection.

What is an example of TCP IP in real life? ›

A good example of how this works in practice is when an email is sent using SMTP from an email server. To start the process, the TCP layer in the server divides the message into packets, numbers them, and forwards them to the IP layer, which then transports each packet to the destination email server.

What is the application of UDP in real life? ›

User datagram protocol (UDP) is used for time-critical data transmissions such as DNS lookups, online gaming, and video streaming. This communication protocol boosts transfer speeds by removing the need for a formal two-way connection before the data transmission begins.

What are some application scenarios where UDP may be more useful than TCP? ›

Typically, applications that transfer data files will use TCP since the protocol's latency and performance issues are not that critical. UDP benefits applications that need to receive data quickly even if accuracy suffers. This is why real-time applications like audio and video streaming will often use UDP.

Does Netflix use UDP? ›

"Netflix uses TCP because TCP is much time-sensitive and does not require port forwarding. It helps to enable the full bandwidth of the network.

What uses both TCP and UDP? ›

For example, DNS uses both TCP and UDP for valid reasons described below. UDP messages aren't larger than 512 Bytes and are truncated when greater than this size. DNS uses TCP for Zone transfer and UDP for name, and queries either regular (primary) or reverse.

Which three common applications use TCP? ›

Major internet applications such as the World Wide Web, email, remote administration, and file transfer rely on TCP, which is part of the Transport layer of the TCP/IP suite. SSL/TLS often runs on top of TCP.

What are the real time applications of TCP? ›

TCP in Real Life

Whenever you visit a website, your computer establishes a connection with webserver using TCP. TCP ensures that data is transferred reliably and in correct order. It also handles any lost packets, retransmitting them if necessary.

When where is TCP commonly used in the real world? ›

World Wide Web, email, remote administration, and file transfer rely on TCP. UDP : User Datagram Protocol is a simpler message-based connectionless protocol. Connectionless protocols do not set up a dedicated end-to-end connection.

What is a real life example of IP? ›

An example of a plant patent is pest-free versions of fruit trees. But inventors may also want a design patient if the tree has unique visual properties. Utility patents: Protection for a product that serves a practical purpose and is useful. IP examples include vehicle safety systems, software, and pharmaceuticals.

What are examples of using UDP? ›

Applications. Numerous key Internet applications use UDP, including: the Domain Name System (DNS), the Simple Network Management Protocol (SNMP), the Routing Information Protocol (RIP) and the Dynamic Host Configuration Protocol (DHCP). Voice and video traffic is generally transmitted using UDP.

What is UDP used for today? ›

User Datagram Protocol (UDP) is a communications protocol for time-sensitive applications like gaming, playing videos, or Domain Name System (DNS) lookups. UDP results in speedier communication because it does not spend time forming a firm connection with the destination before transferring the data.

What is UDP best used for? ›

UDP is commonly used in time-sensitive communications where occasionally dropping packets is better than waiting. Voice and video traffic are often sent using this protocol because they are both time-sensitive and designed to handle some level of loss.

What is UDP used for example? ›

User Datagram Protocol (UDP) is a communications protocol for time-sensitive applications like gaming, playing videos, or Domain Name System (DNS) lookups. UDP results in speedier communication because it does not spend time forming a firm connection with the destination before transferring the data.

What is a real life example of protocol? ›

In the store we check food ingredients. We adopt protocols regarding our diet, posture, movements, security, and the use of tools of all kinds. Without these protocols—these habits of daily action—the little risks of daily life would soon overcome us.

What are examples of UDP based attacks? ›

UDP Based Denial-of-Service (DoS) Attack
  • Denial-of-Service (DoS) Attack. ...
  • Distributed Denial-of-Service (DDoS) Attack. ...
  • User Datagram Protocol (UDP) ...
  • Reconnaissance. ...
  • Direct Attacks. ...
  • Reflection Attacks. ...
  • Internet Protocol (IP) Spoofing. ...
  • Amplification.

Top Articles
Mexican Shredded Beef
Healthy Eating for Teenagers and Young People Aged 13 to 18 Years
Week 2 Defense (DEF) Streamers, Starters & Rankings: 2024 Fantasy Tiers, Rankings
Craftsman M230 Lawn Mower Oil Change
Professor Qwertyson
Top 10: Die besten italienischen Restaurants in Wien - Falstaff
Call Follower Osrs
30% OFF Jellycat Promo Code - September 2024 (*NEW*)
Hallowed Sepulchre Instances & More
Robot or human?
Wordle auf Deutsch - Wordle mit Deutschen Wörtern Spielen
Identogo Brunswick Ga
Elizabethtown Mesothelioma Legal Question
Studentvue Columbia Heights
Google Feud Unblocked 6969
Xomissmandi
NHS England » Winter and H2 priorities
Weather Rotterdam - Detailed bulletin - Free 15-day Marine forecasts - METEO CONSULT MARINE
Whitefish Bay Calendar
Amih Stocktwits
Sodium azide 1% in aqueous solution
Garnish For Shrimp Taco Nyt
Magic Seaweed Daytona
Powerschool Mcvsd
Craigslist Apartments In Philly
Calvin Coolidge: Life in Brief | Miller Center
Life Insurance Policies | New York Life
Housing Assistance Rental Assistance Program RAP
MethStreams Live | BoxingStreams
Moses Lake Rv Show
Wow Quest Encroaching Heat
Peter Vigilante Biography, Net Worth, Age, Height, Family, Girlfriend
Atlantic Broadband Email Login Pronto
Cox Outage in Bentonville, Arkansas
Deshuesadero El Pulpo
877-292-0545
Ig Weekend Dow
National Weather Service Richmond Va
Ts In Baton Rouge
Greatpeople.me Login Schedule
Gander Mountain Mastercard Login
Minterns German Shepherds
Sc Pick 3 Past 30 Days Midday
Lebron James Name Soundalikes
Model Center Jasmin
Craigslist Sarasota Free Stuff
Runelite Ground Markers
Peugeot-dealer Hedin Automotive: alles onder één dak | Hedin
Myhrkohls.con
Karen Kripas Obituary
Haunted Mansion Showtimes Near The Grand 14 - Ambassador
Noaa Duluth Mn
Latest Posts
Article information

Author: Greg Kuvalis

Last Updated:

Views: 6511

Rating: 4.4 / 5 (55 voted)

Reviews: 94% of readers found this page helpful

Author information

Name: Greg Kuvalis

Birthday: 1996-12-20

Address: 53157 Trantow Inlet, Townemouth, FL 92564-0267

Phone: +68218650356656

Job: IT Representative

Hobby: Knitting, Amateur radio, Skiing, Running, Mountain biking, Slacklining, Electronics

Introduction: My name is Greg Kuvalis, I am a witty, spotless, beautiful, charming, delightful, thankful, beautiful person who loves writing and wants to share my knowledge and understanding with you.