TCP /IP Ports

Posted on: July 24, 2010

What is a port?

In computer networking, a port is an application-specific or process-specific software construct serving as a communications endpoint, providing a multiplexing  service. It is used by Transmission Control Protocol (TCP) and User Datagram Protocol (UDP).

A port number is a 16-bit unsigned integer, thus ranging from 0 to 65535.

A specific port is identified by its number, commonly known as the port number, the IP address with which it is associated, and the protocol used for communication.

Why do we need ports?

To support multitasking. Ports enable multiple programs to share a single physical network connection simultaneously, as opposed to having only one program using the connection for a long period of time.

In multitasking, multiple programs need to contact other programs on other computers over the network all at the same time, using ports and sockets.

Where do we specify port number so that packet knows which port to enter?

Transport Layer protocols, such as TCP, UDP specify a source and destination port number in their packet headers.

What is Binding?

A process associates its network input or output channels each with a particular port number, a process known as binding, to send and receive data. The operating system’s networking software has the task of transmitting outgoing data from all application ports onto the network, and forwarding arriving network packets to a process by matching the packets IP address and port numbers.

What is Listening?

Applications implementing common services often use specifically reserved, well-known port numbers for receiving service requests from client hosts. This process is known as listening and involves the receipt of a request on the well-known port and reestablishing one-to-one server-client communications on another private port, so that other clients may also contact the well-known service port.

The well-known ports are defined by convention overseen by the Internet Assigned Numbers Authority (IANA), cf. list of TCP and UDP port numbers.

What are Sockets?

Processes create associations with transport protocol ports by means of sockets. A socket is the software structure used as the transport end-point. It is created by the operating system for the process and bound to a socket address which consists of a combination of a port number and an IP address.

What is Port scanning?

Because different services commonly listen on different port numbers, the practice of attempting to connect to a range of ports in sequence on a single computer is commonly known as port scanning.

This is usually associated either with malicious cracking attempts or with network administrators looking for possible vulnerabilities to help prevent such attacks. Port connection attempts are frequently monitored and logged by computers. The technique of port knocking uses a series of port connections (knocks) from a client computer to enable a server connection.

An example for the use of ports is the Internet serving Web content through port 80, using available web servers like IIS or Apache.

Port numbers can occasionally be seen in the Uniform Resource Locator (URL) of a website or other services.

By default, HTTP uses port 80 and HTTPS uses port 443,

but a URL like http://www.localhost:8080/ specifies that the web site is served by the HTTP server on port 8080.

The port numbers are divided into three ranges: the well-known ports, the registered ports, and the dynamic or private ports. The well-known ports are those from 0 through 1023. Examples include:

21: FTP

23: Telnet

25: SMTP

53: Domain Name System

80: World Wide Web HTTP

443: HTTP over Transport Layer Security/Secure Sockets Layer


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Join 50 other followers

What I am Upto Now

Follow Me On Twitter

Blog Stats

  • 80,276 hits

Live Traffic

My Paintings

%d bloggers like this: