comparison of tcp v/s udp
TRANSCRIPT
Index Structure of Packet What is UDP? What is TCP? Revisited TCP & UDP header TCP v/s UDP Who is Better?
Structure of packet
Physical Layer
Data Link Layer
Network Layer
Transport Layer
Application Layer
HTTP
UDP and TCP
IP
Ethernet and Wi-Fi
Coaxial Ethernet Cable
Purpose of Transport Layer
Letting Multiple applications use one network connection
USER DATAGRAM PROTOCOL( The lightweight, connectionless choice … NOT reliable
Header of UDP
Advantages of UDP• Small Packet Size
• UDP header: 8 Bytes• TCP Header : 20 Bytes
• No connection to create and maintain• More control over when data is sent• NO error control• NO congestion Control (Just Drop ;)
TRANSMISSION CONTROL PROTOCOL( The Heavy weight, connection oriented choice & reliable
Header of TCP
Features of TCP
Wanna Connect…
Sure
Well established
3-way Handshaking
• Deliver Acknowledgements • Re transmission• In-order delivery• Congestion Control
• Delays transmission When the n/w is congested• Error detection
• No improvement, but checksum now mandatory
Features of TCP (cont..)
Disadvantages of TCP • Bigger Header• Data Does not always get sent out immediately• Side effect of ___________ ?
• Bigger Overhead• Retransmission of packets• Acknowledgment of packets
Differences are-Properties TCP UDP
Header Dynamic header ( 20 – 60 B) Static header of 8 Bytes
Max segment any size or 2^30 B short message 65536 Bytes
Flow Control Yes, Window and seq. no. NO
Checksum Compulsory Optional
Connection nature TCP+ IP = connection oriented UDP+ IP= connection less
Error control Own mechanism Depends on ICMP(No self feature)
Support multicast NO YES
Support broadcast NO Yes
Examples service HTTP,SMTP,FTP,TELNET TFTP,DNS,SNMP
Which one is better?
It Depends….
TCP
UDP
Text Communication
Hi HC,
Life gives me so many beautiful things JULY 2016, after then your friendship is added in my life, and which made it awesome
With love,Binary
things JULY 2016, after then your friendship Life gives me so many beautiful is added in my life, and which made is awesome many beautiful is added in my life, and
With love,
UDPTCP
WHY TCP?
File TransferRemote Access (E.g. SSH)When acknowledgement are neededWhen Its overhead doesn't deteriorate
performanceSome firewall blocks UDP for security reasons.
WHY UDP?
Less delay is desirable (Multimedia Streaming) Data loss can be made Small transaction ( DNS lookup) Bandwidth intensive app that tolerate packet loss
We concluded that-
• Take advantage of TCP features like persistent connection and reliability but on the cost of extra overhead of congestion control etc.
• You can use UDP is NO DELAY policy is your mantra ,plus make sure you are not concern about data loss too much.
• Both have pros and cons, USE Wisely because it depends ..
ping THANK.YOU.any.questions