Difference Between TCP and UDP
Difference Between TCP and UDP
Difference Between TCP and UDP
ANS:
TCP UDP
Reliability: TCP is connection-oriented protocol. Reliability: UDP is connectionless protocol.
When a file or message send it will get delivered When you a send a data or message, you don't
unless connections fails. If connection lost, the know if it'll get there, it could get lost on the
server will request the lost part. There is no way. There may be corruption while
corruption while transferring a message. transferring a message.
Ordered: If you send two messages along a Ordered: If you send two messages out, you
connection, one after the other, you know the don't know what order they'll arrive in i.e. no
first message will get there first. You don't have ordered
to worry about data arriving in the wrong order.
Heavyweight: - when the low level parts of the Lightweight: No ordering of messages, no
TCP "stream" arrive in the wrong order, resend tracking connections, etc. It's just fire and
requests have to be sent, and all the out of forget! This means it's a lot quicker, and the
sequence parts have to be put back together, so network card / OS have to do very little work to
requires a bit of work to piece together. translate the data back from the packets.
Streaming: Data is read as a "stream," with Datagrams: Packets are sent individually and
nothing distinguishing where one packet ends are guaranteed to be whole if they arrive. One
and another begins. There may be multiple packet per one read call.
packets per read call.
Examples: World Wide Web (Apache TCP port Examples: Domain Name System (DNS UDP
80), e-mail (SMTP TCP port 25 Postfix MTA), port 53), streaming media applications such as
File Transfer Protocol (FTP port 21) and Secure IPTV or movies, Voice over IP (VoIP), Trivial
Shell (OpenSSH port 22) etc. File Transfer Protocol (TFTP) and online
multiplayer games etc
TCP FRAME STRUCTURE
UDP FRAME STRUCTURE
Q2: DIFFERENCE BETWEEN LAN,MAN,WAN?
ANS:
LAN
MAN
WAN
1. WAN stands for Wide Area Network.
4. Its long distance communications, which may or may not be provided by public packet
network
Q3 DIFFERENCE BETWEEN BROADCAST AND P2P
NETWORK?
ANS:
So Point to point Network is "A method of communication where one "point" (person or
entity) speaks to another entity"