Difference Between TCP and UDP

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 6

COMPUTER NETWORKS

Q1 Difference between TCP and UDP?

ANS:

Transmission Control Protocol (TCP) and User Datagram Protocol (UDP)is a


transportation protocol that is one of the core protocols of the Internet protocol
suite. Both TCP and UDP work at transport layer TCP/IP model and both have
very different usage.

Difference between TCP and UDP

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

1. LAN stands for Local Area Network.

2. Used Guided Media

3. A communication network linking a number of stations in same local area.

4. LAN generally provides a high-speed 100 Kbps to 100 Mbps.

MAN

1. MAN stands for Metropolitan Area Network.

2. Use may be Guided or may be Unguided media.

3. This network shares the characteristics of packet broadcasting networks.

4. A MAN is optimized for a large geographical area than LAN.

WAN
1. WAN stands for Wide Area Network.

2. Used Unguided media.

3. A communication network distinguished from a Local 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:

Broadcast Network: Let us imagine the scenario Teacher taking the


attendance in a class room. He will call every roll no in the
classroom , all will listen but only the respective person will respond.

So Broad cast means "sending a signal where multiple parties may


hear a single sender".
Point to point Network: Here the scenario is  Teacher taking the attendance in an
examination hall.  He will go to each member of the room and will take the attendance
individually. Here only one person listen and he only responds to the call.

So Point to point Network is "A method of communication where one "point" (person or
entity) speaks to another entity"

You might also like