×

TCP Ports

What is TCP?

TCP is a transport layer protocol that helps to establish connections. TCP means Transmission Control Protocol. It guarantees secure data transmission between two network-connected devices. The data can only be sent when a secure connection has been established.

The receiver sends an acknowledgment of receiving the data after receiving it. To transfer data between devices, it uses data blocks. It has more system functionalities, including flow control, error control, and congestion control, but it transmits data slowly. The TCP header is 20-60 bytes long and contains a variety of information to improve reliability.  TCP is used by protocols like HTTP, FTP, etc. for secure data transmission over networks because of its dependability.

What is a Port?

A number is given to server applications and user sessions in an IP network. The Internet Assigned Numbers Authority (IANA) establishes port numbers and places them in the header section of packets so that they can be used to specify the various purposes such as Web, email, voice call, video call, etc.

For example, if we want to open the email and games applications on our computer, then  we have to send mail to the host through the email application, and we can play online games through the games application. These applications give various special numbers to perform all of these tasks. There is a port number for each address and protocol. TCP and UDP are the two protocols that primarily use the port numbers.

TCP ports are those that adhere to transmission control protocols. File Transfer Protocol ports (20 and 21), SMTP port (25), IMAP port (143), and Secure Shell port are the various TCP ports that are used for file transfers.

TCP ports establish connections before sharing data. Suppose, you call your friend to tell him about a new game or movie. Your friend will pick up the phone if he/she receives the call and verifies that it is you on the other end of the line. After then, you can start telling him/her about the game.
TCP ports operate similarly. Data is transmitted only after a secure connection has been established between the sender and the receiver. The three-way handshake is used for sending or receiving data between the devices that use TCP ports.

What is a three-way handshake?

Three-way handshake is used by TCP ports to create secure connections. When using TCP, the sending device creates a connection with the receiving device.

The three messages SYN, SYN-ACK, and ACK are used to represent the three distinct interactions that make up a three-way handshake. The first segment is called SYN. The sending device sends a SYN (synchronized sequence number) message to the receiving computer.

It's attempting to say, "Hello! Are you open to making a connection?"

When a device receives a connection request and the receiver is prepared to establish a connection, it responds with a SYN-ACK segment.  The SYN-ACK segment responds with a synchronized sequence number after acknowledging the connection request. In simple terms, the device is indicating that it is willing to establish a connection and that it has acknowledged your request.

When this occurs, the sending device notifies the receiving device that its message has been acknowledged by sending an ACK segment. After that, a connection is established, and data transfer starts. When the data is transmitted completely, then the connection is automatically broken.

By doing this, it is assured that all data sent to the receiving device is correct and sent in the right order. Additionally, no packets are missing because a connection was established first.

Another way of using TCP Ports?

Enterprise applications such as Oracle, SQL, and SharePoint require you to configure services on specific port numbers. To enable traffic to flow on those port IDs, it is crucial to cooperate with your network administrator. For system security, firewalls keep an eye on ports.

For troubleshooting, we use port numbers. We can specifically detect malicious processes and troubleshoot malware.

Rules that indicate both aspects of a socket are frequently used in the firewall configuration. Using IP addresses, port numbers, or a combination of both, you can set up allowances or traffic blocks.

Port

In the TCP/IP model, there are a total of 65,535 ports available, each of which is a 16-bit unsigned integer. Consequently, the range of port number is from 0 to 65535. The zero-port number is unavailable in UDP but is reserved for TCP which cannot be used. The port numbers are assigned by a standardized organization called IANA (Internet Assigned Numbers Authority).

Different Types Of Ports?

There are 3 different types of Ports which are mentioned below:

  • Well Known Ports
  • Registered Ports
  • Dynamic Ports

Registered Port

The registered port range is from 1024 to 49151. The user processes the registered ports. Instead of the usual applications with a well-known port, these processes the individual applications.

Well Known Ports

Range of the well-known port is from 0 to 1023. The well-known ports are used with protocols like IMAP, HTTP, SMTP, etc. that support popular applications and services.

Dynamic Ports

Dynamic ports have a range of 49152 to 65535. Another name for the dynamic port is ephemeral port. These port numbers are given to the client application dynamically when a client establishes a connection. Clients are unaware of this port until they connect to a service.

How can you view your TCP Information?

TCPView.exe is highly advisable if you're using a Windows Operating System. Mark Russinovich was the original developer, and it is now a Microsoft asset. The tool also comes in a free command-line version called TCPVcon.

When you run TCPView, you may notice that you have a lot of remote connections running on your system. That is one of the reasons TCPView is such an effective tool for identifying rogue processes. It might be a Trojan horse, a backdoor administrative program that calls home.

Conclusion

In the TCP/IP model, there are a total of 65,535 ports available, each of which is a 16-bit unsigned integer. Consequently, the port number range is 0 to 65535. The zero-port number is unavailable in UDP but is reserved for TCP which cannot be used. The port numbers are assigned by a standardized organization called IANA (Internet Assigned Numbers Authority).


Related Topics

Advantages and Disadvantages of MAN

Before we move to advantages and disadvantages of MAN, first we discuss about what is MAN and what are its examples. A network that encircles a city or a sizable university...

3 minutes read.

Error Correction and Error Detection

Error Correction and Error Detection Error correction and error detection techniques are work on the data-link layer. The data link layer ensures the frames are sent from the sender to the...

16 minutes read.

Domain Name System in Computer Network

Domain Name System Domain Name System is also called DNS. DNS was introduced by Paul Mockapetris and Jon Postel in 1983. DNS is an internet service that converts Domain names to...

2 minutes read.

Cryptography in Computer Network

Cryptography: Cryptography is derived from the Greek word, which means "Hidden Secrets." In other words, it is an art in which we can protect our data and information. Through cryptography,...

2 minutes read.

Basic Networking Devices

Introduction Physical components, or network devices, allow hardware on a computer network to link and convey with one another. Network equipment such as switches, routers, gateways, hubs, repeaters, bridges, and routers...

6 minutes read.

OSI Model

OSI Model: OSI stands for Open Systems Interconnection. The ISO (International Standards Organization) was introduced the OSI model in 1983. The OSI model is a standard reference model for communication between...

6 minutes read.

Method of Joining and Fusion of Fiber Optic Cable

What is Fiber Optics Cable? Fiber optics cable transforms the information at a light pulse. We can transfer voice, data, and video through the fiber optics cable. The fiber optics cable...

3 minutes read.

Multiple Access Control

Multiple Access Control: The data link layer is separated into two sub-layers. The upper sub-layer is responsible for flow control and error control that is called the logical link control...

5 minutes read.

Computer Network Topology: Bus, Star, Ring, Tree and Hybrid

Network Topology: The Computer network topology refers to the layout of connected devices on a network. The network topology is the combination by which computer or network devices interconnected to...

4 minutes read.

Star Topology in Computer Networks

Star topology comes from or is a part of the network topology which was invented by Dr.Howard Frank. It is also to be known as star network because of its...

4 minutes read.

Data Link Layer Protocols

 Data Link Layer Protocols Bluetooth Low EnergyZ-WaveZigBee Smart EnergyLoRaWANWirelessHARTLTE-A  1. Bluetooth Low Energy Bluetooth Low Energy or Bluetooth is a short-range communication protocol with the physical layer and medium access control layer. It is widely used in IoT...

3 minutes read.

Address Mapping

Address Mapping: Internet is made of a combination of physical networks connected together by internetworking devices such as routers. A logical address is an internetwork address. A physical address is...

4 minutes read.

Unicast Routing Protocol

Unicast Routing Protocol: Unicast is a point to point communication arrangement that only occurs between the sender and receiver. Routing Information Protocol RIP is an open standard protocol that can work with...

3 minutes read.

Disadvantages of Computer Network

What is Computer Network? A computer network is a collection of interconnected devices that can communicate and exchange data with each other. Networks allow devices to share resources such as printers...

3 minutes read.

Aloha

Aloha Norman Abramson and his colleagues were developed aloha at the University of Hawaii in the 1970s. ALOHA is a Multiple Access Protocol which is used for random access in the...

3 minutes read.

Uses of Computer Networks

During the twentieth century, the most significant technology is information collecting, processing, and distribution. Computers and communications have been integrated, which has considerably influenced the organization of computer systems. The previous...

6 minutes read.

Integrated Services Digital Network (ISDN)

Integrated Services Digital Network (ISDN): ISDN means Integrated Services Digital Network. ISDN was developed by ITU-T in the 1980s. These are digital telephony and data transport services offered by regional...

3 minutes read.

Mesh Topology Diagram in Computer Network

Topology in simple terms can be defined asthe arrangement of a computer network, which is further divided into logical and physical arrangements. Logical arrangement refers to how the data flow...

4 minutes read.

IPv4 vs IPv6

What is an IP? The process or protocol used to transmit data from one computer to another over the internet is known as Internet Protocol (IP). Every computer connected to the...

5 minutes read.

Stream Control Transmission Protocol

Stream Control Transmission Protocol: SCTP stands for Stream Control Transmission Protocol. SCTP was developed by the Internet Engineering Task Force (IETF). It is a reliable message-oriented protocol of the transport...

3 minutes read.