111k views
2 votes
How is a UDP socket fully identified? What about a TCP socket? What is the difference between the full identification of both sockets?

User Csmba
by
5.1k points

2 Answers

6 votes

Answer:

Following are the solution to this question:

Step-by-step explanation:

Two tuples were fully identified only with UDP socket.:

< IP address assigned, the port for destination >

Its two tuples have been used in UDP as demux, buttons to identify its UDP socket.

The IP address for the destination:

Its received data is directly provided by the IP address of its port.

Port number of the destination:

The function of the IP address of its port number whenever you obtain a UDP segment would be to control the IP addresses of a segment or send that segment to a port with the same IP address. Its port number for endpoint allows demultiplexing incoming information from its IP.

TCP socket is completely recognized by the following four tuples:

< source IP, port source, IP source, port location >

It tuples are being used to label the sockets by using a demultiplexing (demux) key.

IP address source:

The IP address is being used to identify the unique host that links to. It can assume that perhaps the source IP address shows us all the source Addresses of the sender.

Port number of source:

Its port number amount allows us to identify which section is arriving at which port.

IP address destination:

Its IP address of a destination is the IP address of a port accepting incoming information.

Port number of the destination:

It is port numbers number allows us to identify the facilities or section should be sent to.

Differentiation between TCP and UDP identifier:

As TCP ports (4 tuples) and UDP ports (2 tuples) are using demux keys to define socks, however, demux keys in UDP are unique from others in TCP for both the following reasons:

TCP uses a separate socket for every contact between both the server and client whereas UDP utilizes its same sockets to process all clients accessed by UDP servers with all communications, it maintains TCP is much more dependable and hence has to hold a different port.

Even so, UDP doesn't accomplish things apart from multicasting and demodulation, but no separate port is necessary by each link. Therefore the TCP socket becomes connection-driven as well as the UDP socket is direct link-free.

User Buomsoo Kim
by
5.3k points
2 votes

There are different ways' to identify the Socket. The presence or absence of a connection needs that the identifier format of each socket are known to be very different.

The TCP socket is identified by the quadruple. This includes;

  • Source IP address
  • Source port number
  • Destination IP address
  • Destination port number

An UDP socket is identified by the tuple such as

  • Destination IP address
  • Destination port number

There are some difference between TCP socket and UDP socket. They are;

  • TCP is known to be a connection-oriented protocol but the UDP is a connectionless protocol.

  • Another difference between TCP and UDP is speed. TCP is said to be slower than UDP. UDP is said to be faster, simpler, and efficient protocol than TCP.

Learn more about TCP socket from

ainly.com/question/17387945

User Yashdeep Patel
by
4.5k points