User Data Protocol (UDP)

UDP stands for User Datagram Protocol. The UDP is a simple transport layer communication available in the TCP/IP protocol suit. It involves minimum amount of communication mechanism. UDP is said to be an unreliable transport, but it uses IP services which provide best effort delivery system.

In UDP, the receiver does not generate an acknowledgment of packet received and in turn that sender does not wait for any acknowledgment of packets sent.

This shortcoming makes this protocol unreliable as well as easier on processing. Now why do we need an unreliable protocol to transport the data. We deploy UDP where the acknowledge packet share significant amount of bandwidth along with the actual data.

For example

UDP can be implemented in video streaming where thousands of packets at a time is troublesome and wastes a lot of bandwidth and loss of few packets in video and video traffic could not make much impact and can be ignored.

It is a connectionless protocol where each datagram is independent of another datagram. There is no connection establishment and termination. Order delivery of data is not guaranteed. As USD is not numbered, it is suitable for the data to flow in a direction. It cannot send a stream of data, instead each request much be small enough to fit into one user datagram. It is stateless as it doesn’t send any acknowledgment messages.

In the UDP protocol, the protocol numbers are used to distinguish the process running on the server and client-side. We know that UDP provides a process to process communication. The client generates the process that needs services while the server generates processes that provide services. Queues are opened for server and client processes, 2 queues for each process, Incoming Queue for receiving messages, and an outgoing queue for sending messages.

The queues perform functions as long as the process is running and when the process is terminated, the queues are destroyed. UDP handles the sending and receiving of UDP packets with the help of the following components:

  • Input Modules
  • Input Queues
  • Control Block Module
  • Control Block Table
  • Output Module

The input module receives a user datagram from the IP and searches the Control Block Table to find an entry having same port as this user datagram. If it is formed, the module uses information in the entry to enqueue the data. Control Block Table keep a track of open port. Control Block Module manages the control block table.

The UDP packets use a set of input queues for each process. Then at last the output module creates in send user datagram. Several processes may want to use the services of UDP. UDP multiplexes and demultiplexes to handle this so that multiple processes can run on a single host.

Limitation of UDP

Now let’s discuss the limitations or disadvantages of UDP. The UDP provides an unreliable connection delivery service. It does not add anything to the services of the IP except for providing process-to-process communication instead of host-to-host communication. UDP message can be lost, duplicated, delayed, and can be out of order.

UDP doesn’t provide a reliable stream transport service. There is no flow control mechanism and there is no acknowledgment to receive packets. However, it does provide error control to some extent.

Advantage of UDP

The advantage of USD is that it produces a minimum number of overheads.

Internet Control Message Protocol (ICMP)

The ICMP stands of Internet Control Message Protocol or simply Ping. We use this commonly in the networking world and in the IT world for troubleshooting network connectivity. The way it works is that when we open the command prompt, and we type ping to whatever device we want to communicate with whether we know the IP address or we know the domain name and we will send them a ping.

After our computer pings them, and if they can communicate with them, the device is going to ping us back. We call this an echo request and an echo reply. If we can send a request, we can echo the request and if they can communicate back, they can echo the reply. If for some reason they can’t communicate back, they are going to send a destination unreachable which is why we use it mainly is network support and desktop support realm.

If we are on a system and that system can’t get out to the network, we can simply use a ping command if we can communicate with one of the servers or one of the other desktop systems. If we can’t communicate then we know that we have some sort of issue that we have to troubleshoot. So, here is a quick example. In the image below I am pinging

After typing ping (which is the command), it says pinging and shows Google’s IP address with 32 bytes of information and then replies. Google sent 4 replies which show that Google was able to get my ping and give back some responses with the 32-bit information. It also shows how many milliseconds it took the first. We can also see if we have any packets lost. It shows that we sent 4 packets and received 4, so lost none.

Advantages of ICMP

Generally, the ICMP or error is for error detection and control which reports errors when employed. Its main purpose is to give us feedback to show if our connection is properly established or not.

Disadvantage of ICMP

It degrades the performance of the device because for troubleshooting, it sends a lot of network traffic. The device also receives malicious packets sometimes that cause ping errors.

Q 2) Explain the complete working of the hub, switch, and router.


The purpose of a Hub is to connect all of our network devices on an internal network. It is a device that has multiple ports that accepts Ethernet connections from network devices. A Hub is not considered to be an intelligent device because if does not filter any data or has any intelligence as to where the data is supposed to be sent. And that’s because the only thing, the Hub knows, is when a device is connected to one of its ports.

So, when a data packet arrives at one of the ports, it is copied to all of the other ports, so that all the devices on the hub can see that data packets. So, when the data is received at one port, the Hub will then rebroadcast that data to every port that has a device connected to it.

If there are multiple devices connected to a Hub and if one computer wants to communicate with one specific device, the other devices connected to that Hub will still receive that data even though the data was not intended for them. So, when this happens, it not only creates security concerns, but it also creates unnecessary traffic on the network which wastes bandwidth.


A switch is very similar to a Hub. It’s also a device that has multiple ports that accepts ethernet connections from network devices. The difference between a hub and a switch is that the switch is intelligent. The switch can actually learn the physical addresses of the devices that are connected to it and it stores that physical addresses called MAC addresses, in its table.

So, when a data packet is sent to a switch, it is only directed to its intended destination port, unlike a hub where the hub would broadcast the data to every port. For example, if a computer wants to communicate with another computer through a switch, the data packets will arrive at the switch and then the switch will look at its table of MAC addresses and matching ports and deliver the data to the correct port. Therefore, the data packets would only go to that computer.

So, that’s the major difference between a switch and a hub. This is the reason, why the switch is preferred over hubs because they reduce any unnecessary traffic on the network.

Hubs and Switches, both are used to exchange data within a local area network such as a home network or in a business. They are not used to exchange data outside their own network, such as out on the internet because to exchange or route data outside their own network to another network, a device needs to be able to read IP addresses.


As, hubs and switches do not read IP addresses, so that’s where the routers come in. A router does exactly what its name implies. A router is a device that routes or forward data from one network to another based on their IP addresses. When a data packet is received from the router, the router inspects the data’s IP address and determines if the packet was meant for its own network or if it’s meant for another network.

If the router determines that the data packet is determined for its own network, it receives it. But if it’s not meant for its own network, it sends it off to another network. So, a router is a Gateway of a network. So, if we have a private network with a router, we are going to have different data packets received by the routers which was different Ip addresses, and they are going to be entering a specific network’s router from the internet.

The local router will only accept some specific data packets because they are the only ones that are intended for this network. So, all the other data packets will be rejected by the router because they were not intended for this network as their IP addresses were not meant for this network

Leave a Comment