What Are TCP and UDP Ports?

Have you ever wondered how the Internet works? How can you send and receive pictures, emails, calls and view web pages from your device connected to the Internet comfortably? These actions depend on TCP and UDP ports. How do these ports work and what are they?

Before diving into the topic, you must understand what a port is. Computers use ports to communicate and make connections with other computers on the network. The port mentioned here is not a physical component but a virtual endpoint between two or more computers. The most common ports on the internet are TCP and UDP ports.

What is TCP port?

TCP stands for Transmission Control Protocol, and it is a connection-oriented protocol. In networking, protocols are the rules or standards that govern how data is transmitted between devices. TCP is known as a connection-oriented protocol because it establishes a connection between sending and receiving devices before transmitting any data.

TCP ports are ports that are compliant with transmission control protocols. Some TCP ports include File Transfer Protocol ports (20 and 21) for file transfers, SMTP ports (25) and IMAP ports (143) for email, and Secure Shell ports (22).

How does TCP port work?

The TCP port makes the connection before the data is shared. For example, if you want to tell your friends about a new movie or game, you can make a phone call. You dial your friend’s number, and if she gets the call and confirms that you’re on the other end of the line, she’ll pick up. Then you can start telling her about the game.


That’s also how TCP ports work. Ensure a secure connection between the sender and the receiving device before transmitting data. But how do devices that use TCP ports to receive or send data make that connection in the first place? They do this using a three-way handshake.

What is a three-way handshake?

In TCP, the device sending data connects to the device receiving the data. The way a TCP port establishes a trusted connection is called a three-way handshake.

As the name implies, a three-way handshake requires three different interactions, in the form of three messages: SYN → SYN-ACK → ACK.

The first is the SYN segment. The sending device sends a SYN (synchronized sequence number) message to attempt to communicate with the receiving computer. It’s trying to say, “Hello! Are you ready to connect?”

If the receiving device is available to make a connection, it will respond to the device that sent the connection request with a SYN-ACK segment. The SYN-ACK segment acknowledges the connection request and resends a synchronized sequence number. In a word, the device is saying, “Yes, I confirm your request and I’m ready to connect.”

When this happens, the sending device sends an ACK segment to the receiving device, letting the device know that it has acknowledged its message. Then a connection is formed and it starts transmitting data. Once the data transfer has been confirmed and completed, the connection is terminated.

This way, all data sent to the receiving device will be complete and sent in the correct order. Furthermore, no packets are missing because a connection has already been made.

What is a UDP port?

UDP stands for User Datagram Protocol. The User Datagram protocol is connectionless, which means that the host device can transmit data to the receiver without first establishing a connection. UDP ports depend on the UDP/IP protocol. UDP ports include DNS port (53), Dynamic Host Configuration Protocol port (68), and Kerberos port (88), which are used by game services.

How does UDP port work?

Unlike TCP ports, UDP ports do not need to establish a connection before transmitting data. So if you want to tell your friends about a new movie that mimics the up version, you’ll have to shout out your conversation and hope that your friends are nearby and can hear it. friend. Pretty unreliable, right?

The responsibility of receiving the information you are trying to pass on lies solely with your friend. Because you haven’t made a connection, your friend may not hear you correctly and hear only small bits or not at all.

In UDP ports, the server sends data as packets (small segments) without regard to certain destination. It then expects that the receiving device will receive those packets, which is unreliable as it does not guarantee the data will be received seamlessly. As a result, the packets do not reach the receiver and data is lost. This is called packet loss.

What is the difference between a TCP port and a UDP port?

Although TCP ports perform the same function of sending information over the internet, they have different features and uses.


The TCP port is more reliable for communication and data transfer because, being a connection-oriented protocol, it establishes a connection with two devices using a three-way handshake before sending data. This way all data is received and in the correct order. And when there is an error in the processing, it is easy to detect. However, this is not the same with UDP ports.

Due to its reliability, TCP ports are used for services where you need secure and complete data transmission such as emails, pictures, web pages, etc.


Because UDP ports are connectionless protocols, they save a lot of time by not establishing a connection before sending a data packet, which is useful for services that are sensitive to when and where data is sent. received in real time. UDP ports are used in video, voice and game streaming.

TCP and UDP Ports, Explain

TCP and UDP ports are networking terms you don’t often hear, but they are the foundation of our internet. These two ports play a huge role in your daily life, because without these ports, data transmission would not be possible.


What is Internet Control Message Protocol (ICMP) and how does it work?

Continue reading

About the author

https://www.makeuseof.com/what-are-tcp-and-udp-ports/ What Are TCP and UDP Ports?

Sarah Ridley

USTimesPost.com is an automatic aggregator of the all world’s media. In each content, the hyperlink to the primary source is specified. All trademarks belong to their rightful owners, all materials to their authors. If you are the owner of the content and do not want us to publish your materials, please contact us by email – admin@ustimespost.com. The content will be deleted within 24 hours.

Related Articles

Back to top button