TCP and UDP port

TCP and UDP port

In computer networking, a port is an application-specific or process-specific software construct serving as a communications endpoint used by Transport Layer protocols of the Internet Protocol Suite such as Transmission Control Protocol (TCP) and User Datagram Protocol (UDP). A specific port is identified by its number commonly known as the port number.

Example

An example for the use of ports is the Internet mail system (e-mail). A server used for sending and receiving e-mail provides both an SMTP service (for sending) and a POP3 service (for receiving). These are handled by different server processes, and the port number is used to determine which data is associated with which process. By convention, the SMTP server listens on port 25, while POP3 listens on port 110.

The concept of ports can be readily explained with an analogy: think of IP addresses as the street address of an apartment building, and the port number as the number of a particular apartment within that building. If a letter (a data packet) is sent to the apartment building (IP) without an apartment number (port number) on it, then nobody knows whom (which service) it is intended for. In order for the delivery to be successful, the sender needs to include an apartment number along with the address to ensure the letter gets to the right domicile.

Technical details

Transport Layer protocol, such as TCP, UDP, SCTP, and DCCP specify a source and destination port in their packet headers. A port number is a 16-bit unsigned integer, ranging from 0 to 65535. A process "binds" to a particular port to send and receive data, meaning that it will listen for incoming packets whose destination port matches that port number, and/or send outgoing packets whose source port is set to that port number. Processes may bind to multiple ports.

Applications implementing common services will normally listen on specific port numbers which have been defined by convention for use with the given protocol — see list of TCP and UDP port numbers. Typically, these will be low port numbers, and in Unix only processes owned by the superuser can create ports with numbers from 0 to 1023. This is for security to prevent untrusted processes from acting as system services. Conversely, the client end of the connection will typically use a varying, high port number (ephemeral port).

Because the port number is a part of the packet header, it is readily interpreted not only by the sending and receiving computers, but also by other components of the networking infrastructure. In particular, firewalls are commonly configured to respond differently to packets depending on their source and/or destination port numbers. Port forwarding is an example application of this.

Processes implement connections to transport protocol ports by means of sockets. A socket is the software structure used as the transport end-point. It is created by the process and bound to a socket address which consists of a combination of a port and an IP address. Sockets may be set to send/receive data in one direction at a time, called "half duplex", or simultaneously in both directions, called "full duplex". In addition to the transport protocols, sockets are also used by interprocess communications protocols within a single host.

Because different services commonly listen on different port numbers, the practice of attempting to connect in sequence to a wide range of services on a single computer is commonly known as port scanning. This is usually associated either with malicious cracking attempts or with a search for possible vulnerabilities to help prevent such attacks.

Port connection attempts are frequently monitored and logged by computers connected to networks. The technique of port knocking uses a series of port connections or "knocks" from a client computer to enable a server connection.

Use in URLs

Port numbers can occasionally be seen in the URLs of websites. By default, HTTP uses port 80 and HTTPS uses port 443, but a URL like http://www.example.com:8000/blah/ would try to connect to an HTTP server on port 8000 instead of the default port 80.

Common ports

"See list of TCP and UDP port numbers."

IANA

The Internet Assigned Numbers Authority (IANA) is responsible for the global coordination of the DNS Root, IP addressing, and other Internet protocol resources.

The port numbers are divided into three ranges: the Well Known Ports, the Registered Ports, and the Dynamic and/or Private Ports.

The "Well Known Ports" are those from 0 through 1023.

The "Registered Ports" are those from 1024 through 49151.

A list of registered ports can be found on the IANA Website - http://www.iana.org/assignments/port-numbers


Wikimedia Foundation. 2010.

Игры ⚽ Поможем сделать НИР

Look at other dictionaries:

  • List of TCP and UDP port numbers — The Transmission Control Protocol (TCP) and the User Datagram Protocol (UDP) are Transport Layer protocols of the Internet Protocol Suite (commonly TCP/IP) for communication between computers. The Internet Assigned Numbers Authority (IANA) is… …   Wikipedia

  • Список портов TCP и UDP — Эта статья содержит незавершённый перевод с английского языка. Вы можете помочь проекту, переведя её до конца. В данной статье приведён список портов TCP и UDP, ко …   Википедия

  • TCP/IP model — See also: Internet Protocol Suite The TCP/IP model (Transmission Control Protocol/Internet Protocol) is a descriptive framework for the Internet Protocol Suite of computer network protocols created in the 1970s by DARPA, an agency of the United… …   Wikipedia

  • Port scanner — A port scanner is a piece of software designed to search a network host for open ports. This is often used by administrators to check the security of their networks and by crackers to compromise it.To portscan a host is to scan for listening… …   Wikipedia

  • Port number — In computer networking, a port is an application specific or process specific software construct serving as a communications endpoint in a computer s host operating system. A port is associated with an IP address of the host, as well as the type… …   Wikipedia

  • Port (disambiguation) — Contents 1 Transportation 2 Computing 3 Places 4 Medicine …   Wikipedia

  • Port address translation — (PAT) is a feature of a network device that translates TCP or UDP communications made between hosts on a private network and hosts on a public network. It allows a single public IP address to be used by many hosts on a private network, which is… …   Wikipedia

  • UDP — Название: User Datagram Protocol Уровень (по модели OSI): Транспортный Семейство: TCP/IP (иногда называют UDP/IP) Порт/ID: 17 (в IP) Спецификация: RFC 768 / STD 6 Основ …   Википедия

  • TCP-Header — TCP (Transmission Control Protocol) Familie: Internetprotokollfamilie Einsatzgebiet: Zuverlässiger bidirektionaler Datentransport TCP im TCP/IP‑Protokollstapel: Anwendung HTTP SMTP … Transport …   Deutsch Wikipedia

  • Computer port (software) — For software socket port information, see Port number For porting software to other computer systems, see Porting. For other uses of port , see port (disambiguation). In computer programming, port has a wide range of meanings. A software port… …   Wikipedia

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”