comparison of tcp v/s udp

19
TCP v/s UDP By- Vasundhara Ghose M.Tech (InfoSec) IGDTUW,Delhi [email protected]

Upload: vasundhara-ghose

Post on 19-Feb-2017

50 views

Category:

Engineering


0 download

TRANSCRIPT

Page 1: Comparison of tcp v/s udp

TCP v/s UDPBy- Vasundhara Ghose

M.Tech (InfoSec)

IGDTUW,Delhi

[email protected]

Page 2: Comparison of tcp v/s udp

Index Structure of Packet What is UDP? What is TCP? Revisited TCP & UDP header TCP v/s UDP Who is Better?

Page 3: Comparison of tcp v/s udp

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

Page 4: Comparison of tcp v/s udp

Purpose of Transport Layer

Letting Multiple applications use one network connection

Page 5: Comparison of tcp v/s udp

USER DATAGRAM PROTOCOL( The lightweight, connectionless choice … NOT reliable

Page 6: Comparison of tcp v/s udp

Header of UDP

Page 7: Comparison of tcp v/s 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 ;)

Page 8: Comparison of tcp v/s udp

TRANSMISSION CONTROL PROTOCOL( The Heavy weight, connection oriented choice & reliable

Page 9: Comparison of tcp v/s udp

Header of TCP

Page 10: Comparison of tcp v/s udp

Features of TCP

Wanna Connect…

Sure

Well established

3-way Handshaking

Page 11: Comparison of tcp v/s udp

• 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..)

Page 12: Comparison of tcp v/s udp

Disadvantages of TCP • Bigger Header• Data Does not always get sent out immediately• Side effect of ___________ ?

• Bigger Overhead• Retransmission of packets• Acknowledgment of packets

Page 13: Comparison of tcp v/s udp

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

Page 14: Comparison of tcp v/s udp

Which one is better?

It Depends….

TCP

UDP

Page 15: Comparison of tcp v/s 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

Page 16: Comparison of tcp v/s udp

WHY TCP?

File TransferRemote Access (E.g. SSH)When acknowledgement are neededWhen Its overhead doesn't deteriorate

performanceSome firewall blocks UDP for security reasons.

Page 17: Comparison of tcp v/s udp

WHY UDP?

Less delay is desirable (Multimedia Streaming) Data loss can be made Small transaction ( DNS lookup) Bandwidth intensive app that tolerate packet loss

Page 18: Comparison of tcp v/s udp

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 ..

Page 19: Comparison of tcp v/s udp

ping THANK.YOU.any.questions