Introduction to
TCP and UDP
-Ramesh Giri
Contents
•Introduction
•Pros and Cons
•TCP header
•UDP header
•Conclusion
Introduction
TCP(transmission control protocol) and UDP(User
Datagram protocol)works in transport layer of OSI
model and are used for data transfer.
1
1
TCP
-> It a connection-oriented protocol, which means a
connection is established before transferring data.
-> Connection should be maintained until
the application programs at each end have finished
exchanging messages.
-> Used for confidential data transfer
1 2
11 3
3-Way Handshaking
1
Pros OF TCP
• It guarantees three things –
-> Your data reaches its destination,
-> It reaches there in time.
-> It reaches there without duplication.
•In TCP, since all the work is done by the operating
system, so you just need to sit back and watch the
show
1 4
1
Cons OF TCP
•If there are bugs in your OS, then you will face
many problems like problems in surfing and
downloading contents from the net.
• TCP cannot be used for broadcast and multicast
connections.
•It is slower in functioning than UDP
1 5
11 6
UDP
•UDP is not connection-oriented, So no connection
needed to transfer data.
•Mostly suitable for applications that needs fast and
efficient transmission
•Used in Video conferencing, Streaming and Voice
call.
1 7
81 8
Pros of UDP
• Multiple messages can be sent as packets in
chunks.
• It does not restrict you to connection based
communication model.
•Much faster than TCP
1 9
Cons of UDP
• There are no guarantees with UDP. It is possible
that a packet may not be delivered, or delivered
twice, or not delivered in time.
• Doesn’t ensure that communication has reached
receiver as acknowledge is not sent.
•Connectionless and unreliable
1 10
Contd…
•No way of predicting the order in which message is
received.
•Cannot ensure the lost data or packet.
1 11
UDP Header
1 9 12
Conclusion
Both TCP and UDP are protocols used for sending
bits of data — known as packets.
They both build on top of the Internet protocol.
Either TCHP header or UDP header is sent as
header while sending data.
1 9 13
THANK YOU
  

TCP and UDP

  • 1.
    Introduction to TCP andUDP -Ramesh Giri
  • 2.
    Contents •Introduction •Pros and Cons •TCPheader •UDP header •Conclusion
  • 3.
    Introduction TCP(transmission control protocol)and UDP(User Datagram protocol)works in transport layer of OSI model and are used for data transfer. 1
  • 4.
    1 TCP -> It aconnection-oriented protocol, which means a connection is established before transferring data. -> Connection should be maintained until the application programs at each end have finished exchanging messages. -> Used for confidential data transfer 1 2
  • 5.
  • 6.
    1 Pros OF TCP •It guarantees three things – -> Your data reaches its destination, -> It reaches there in time. -> It reaches there without duplication. •In TCP, since all the work is done by the operating system, so you just need to sit back and watch the show 1 4
  • 7.
    1 Cons OF TCP •Ifthere are bugs in your OS, then you will face many problems like problems in surfing and downloading contents from the net. • TCP cannot be used for broadcast and multicast connections. •It is slower in functioning than UDP 1 5
  • 8.
  • 9.
    UDP •UDP is notconnection-oriented, So no connection needed to transfer data. •Mostly suitable for applications that needs fast and efficient transmission •Used in Video conferencing, Streaming and Voice call. 1 7
  • 10.
  • 11.
    Pros of UDP •Multiple messages can be sent as packets in chunks. • It does not restrict you to connection based communication model. •Much faster than TCP 1 9
  • 12.
    Cons of UDP •There are no guarantees with UDP. It is possible that a packet may not be delivered, or delivered twice, or not delivered in time. • Doesn’t ensure that communication has reached receiver as acknowledge is not sent. •Connectionless and unreliable 1 10
  • 13.
    Contd… •No way ofpredicting the order in which message is received. •Cannot ensure the lost data or packet. 1 11
  • 14.
  • 15.
    Conclusion Both TCP andUDP are protocols used for sending bits of data — known as packets. They both build on top of the Internet protocol. Either TCHP header or UDP header is sent as header while sending data. 1 9 13
  • 16.

Editor's Notes

  • #7 Even debugging is taken care by the OS.
  • #9 20 bits header length Urgent
  • #10 It is connectionless transport protocol.
  • #11 No need to establish the connection.
  • #14 Every data is send once. Doesnot compensate Lost data,