Thursday, April 30, 2009

Now you may raise a question “what is port?”


Port is a unique door in the computer through which the data is sent and received back from the hardware or computer connected to it. For a real-time example I am in India I want to travel to Bangkok through the sea transportation, then I need to get in to the shipping port first from then I have to get into a ship to travel and at the other end I have to land my ship at shipping port in the Bangkok then I have to reach out the destination where ever I want it. From the above example it clearly shows the purpose and the function of the ports.
Well in computer architecture there are two ports.

  1. Physical ports
  2. Virtual ports

Physical ports
 On computer and telecommunication devices, a port (noun) is generally a specific place for being physically connected to some other device, usually with a socket and plug of some kind. Typically, a personal computer is provided with one or more serial ports and usually one parallel port. The serial port supports sequential, one bit-at-a-time transmission to peripheral devices such as scanners and the parallel port supports multiple-bit-at-a-time transmission to devices such as printers.

Virtual ports
In programming, a port (noun) is a "logical connection place" and specifically, using the Internet's protocol, TCP/IP, the way a client program specifies a particular server program on a computer in a network. Higher-level applications that use TCP/IP such as the Web protocol, Hypertext Transfer Protocol, have ports with preassigned numbers. These are known as "well-known ports" that have been assigned by the Internet Assigned Numbers Authority (IANA). Other application processes are given port numbers dynamically for each connection. When a service (server program) initially is started, it is said to bind to its designated port number. As any client program wants to use that server, it also must request to bind to the designated port number.
Port numbers are from 0 to 65535. Ports 0 to 1024 are reserved for use by certain privileged services. For the HTTP service, port 80 is defined as a default and it does not have to be specified in the Uniform Resource Locator (URL).