Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

UDP vs IP- difference?

Tags:

tcp

ip

udp

I understand that UDP resides on the transport layer and IP on the internet layer. I also get that they're both connectionless and unreliable. Then what is the point of UDP when we already have IP? The distinction is not very clear. Any help on this is greatly appreciated. Thanks!

like image 657
OckhamsRazor Avatar asked Sep 18 '11 19:09

OckhamsRazor


People also ask

Is UDP part of IP?

In computer networking, the User Datagram Protocol (UDP) is one of the core members of the Internet protocol suite. With UDP, computer applications can send messages, in this case referred to as datagrams, to other hosts on an Internet Protocol (IP) network.

Why is there a need of UDP over IP?

UDP reduces overall network traffic owing to network broadcasts feature which broadcasts packets to some computers on the same network and eliminates the need for duplication across the network. As UDP is connectionless protocol, the delivery or order of the data content packets varies.

Is IP protocol TCP or UDP?

There are two types of Internet Protocol (IP) traffic. They are TCP or Transmission Control Protocol and UDP or User Datagram Protocol. TCP is connection oriented – once a connection is established, data can be sent bidirectional. UDP is a simpler, connectionless Internet protocol.


1 Answers

Then what is the point of UDP when we already have IP?

To multiplex services. The UDP port number can differentiate between multiple services on the same host, using the same L3 identification. Using IP only it wouldn't be possible to host multiple services on the same station and easily differentiate between them.

Also, consider the case of UDP over IPv6. Since IPv6 doesn't have error-checking somebody has to perform it: the Checksum field of UDP is not optional.

like image 63
cnicutar Avatar answered Nov 22 '22 19:11

cnicutar