Port (computer networking)

In computer networking, a port or port number is a number assigned to uniquely identify a connection endpoint and to direct data to a specific service. At the software level, within an operating system, a port is a logical construct that identifies a specific process or a type of network service. A port at the software level is identified for each transport protocol and address combination by the port number assigned to it. The most common transport protocols that use port numbers are the Transmission Control Protocol (TCP) and the User Datagram Protocol (UDP); those port numbers are 16-bit unsigned numbers.

A port number is always associated with a network address of a host, such as an IP address, and the type of transport protocol used for communication. It completes the destination or origination address of a message. Specific port numbers are reserved to identify specific services so that an arriving packet can be easily forwarded to a running application. For this purpose, port numbers lower than 1024 identify the historically most commonly used services and are called the well-known port numbers. Higher-numbered ports are available for general use by applications and are known as ephemeral ports.

Ports provide a multiplexing service for multiple services or multiple communication sessions at one network address. In the client–server model of application architecture, multiple simultaneous communication sessions may be initiated for the same service.

Port number

For TCP and UDP, a port number is a 16-bit unsigned integer, thus ranging from 0 to 65535. For TCP, port number 0 is reserved and cannot be used, while for UDP, the source port is optional and a value of zero means no port. A process associates its input or output channels via an internet socket, which is a type of file descriptor, associated with a transport protocol, a network address such as an IP address, and a port number. This is known as binding. A socket is used by a process to send and receive data via the network. 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 processes by matching the packet's IP address and port number to a socket. For TCP, only one process may bind to a specific IP address and port combination. Common application failures, sometimes called port conflicts, occur when multiple programs attempt to use the same port number on the same IP address with the same protocol.

Applications implementing common services often use specifically reserved well-known port numbers for receiving service requests from clients. This process is known as listening, and involves the receipt of a request on the well-known port potentially establishing a one-to-one server-client dialog, using this listening port. Other clients may simultaneously connect to the same listening port; this works because a TCP connection is identified by a tuple consisting of the local address, the local port, the remote address, and the remote port.[1] The well-known ports are defined by convention overseen by the Internet Assigned Numbers Authority (IANA). In many operating systems special privileges are required for applications to bind to these ports because these are often deemed critical to the operation of IP networks. Conversely, the client end of a connection typically uses a high port number allocated for short-term use, therefore called an ephemeral port.

Common port numbers

IANA is responsible for the global coordination of the DNS root, IP addressing, and other protocol resources. This includes the registration of commonly used TCP and UDP port numbers for well-known internet services.

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 (also known as system ports) are those numbered from 0 through 1023. The requirements for new assignments in this range are stricter than for other registrations.[2]

Notable well-known port numbers
Number Assignment
20 File Transfer Protocol (FTP) Data Transfer
21 File Transfer Protocol (FTP) Command Control
22 Secure Shell (SSH) Secure Login
23 Telnet remote login service, unencrypted text messages
25 Simple Mail Transfer Protocol (SMTP) email delivery
53 Domain Name System (DNS) service
67, 68 Dynamic Host Configuration Protocol (DHCP)
80 Hypertext Transfer Protocol (HTTP) used in the World Wide Web
110 Post Office Protocol (POP3)
119 Network News Transfer Protocol (NNTP)
123 Network Time Protocol (NTP)
143 Internet Message Access Protocol (IMAP) Management of digital mail
161 Simple Network Management Protocol (SNMP)
194 Internet Relay Chat (IRC)
443 HTTP Secure (HTTPS) HTTP over TLS/SSL
546, 547 DHCPv6 IPv6 version of DHCP

The registered ports are those from 1024 through 49151. IANA maintains the official list of well-known and registered ranges.[3]

The dynamic or private ports are those from 49152 through 65535. One common use for this range is for ephemeral ports.

Network behavior

Transport-layer protocols, such as the Transmission Control Protocol (TCP) and the User Datagram Protocol (UDP), transfer data using protocol data units (PDUs). For TCP, the PDU is a segment, and for UDP it is a datagram. Both protocols use a header field for indicating the source and destination port numbers. The port numbers are encoded in the transport protocol packet header, and they can be readily interpreted not only by the sending and receiving hosts but also by other components of the networking infrastructure. In particular, firewalls are commonly configured to differentiate between packets based on their source or destination port numbers. Port forwarding is an example application of this.

Port scanning

The practice of attempting to connect to a range of ports in sequence on a single host 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 hosts. The technique of port knocking uses a series of port connections (knocks) from a client computer to enable a server connection.

Examples

An example of the use of ports is the delivery of email. A server used for sending and receiving email generally needs two services. The first service is used to transport email to and from other servers. This is accomplished with the Simple Mail Transfer Protocol (SMTP). A standard SMTP service application listens on TCP port 25 for incoming requests. The second service is usually either the Post Office Protocol (POP) or the Internet Message Access Protocol (IMAP) which is used by email client applications on users' personal computers to fetch email messages from the server. The POP service listens on TCP port number 110. Both services may be running on the same host computer, in which case the port number distinguishes the service that was requested by a remote computer, be it a user's computer or another mail server.

While the listening port number of a server is well defined (IANA calls these the well-known ports), the client's port number is often chosen from the dynamic port range (see below). In some applications, the clients and the server each use specific port numbers assigned by the IANA. A good example of this is DHCP in which the client always uses UDP port 68 and the server always uses UDP port 67.

Use in URLs

Port numbers are sometimes seen in web or other uniform resource locators (URLs). By default, HTTP uses port 80 and HTTPS uses port 443, but a URL like http://www.example.com:8080/path/ specifies that the web browser connects instead to port 8080 of the HTTP server.

History

The concept of port numbers was established by the early developers of the ARPANET in informal cooperation of software authors and system administrators. The term port number was not yet in use. It was preceded by the use of the term socket number in the early development stages of the network. A socket number for a remote host was a 40-bit quantity.[4] The first 32 bits were similar to today's IPv4 address, but at the time the most-significant 8 bits were the host number. The least-significant portion of the socket number (bits 33 through 40) was an entity called Another Eightbit Number, abbreviated AEN.[5] Today, network socket refers to a related but distinct concept, namely the internal address of an endpoint used only within the node.

On March 26, 1972, Vint Cerf and Jon Postel called for documenting the then-current usages and establishing a socket number catalog in RFC 322. Network administrators were asked to submit a note or place a phone call, "describing the function and socket numbers of network service programs at each HOST".[6] This catalog was subsequently published as RFC 433 in December 1972 and included a list of hosts and their port numbers and the corresponding function used at each host in the network. This first registry function served primarily as documentation of usage and indicated that port number usage was conflicting between some hosts for "useful public services".[5] The document promised a resolution of the conflicts based on a standard that Postel had published in May 1972 in RFC 349, in which he first proposed official assignments of port numbers to network services and suggested a dedicated administrative function, which he called a czar, to maintain a registry.[7] The 256 values of the AEN were divided into the following ranges:

AEN ranges
Port number range Assignment
0 through 63 Network-wide standard functions
64 through 127 Host-specific functions
128 through 239 Reserved for future use
240 through 255 Any experimental function

The Telnet service received the first official assignment of the value 1. In detail, the first set of assignments was:[7]

Port assignments in RFC 349
Port number Assignment
1 Telnet
3 File transfer
5 Remote job entry
7 Echo
9 Discard

In the early ARPANET, the AEN was also called a socket name,[8] and was used with the Initial Connection Protocol (ICP), a component of the Network Control Protocol (NCP).[9][10] NCP was the forerunner of the modern Internet protocols. Today the terminology service name is still closely connected with port numbers, the former being text strings used in some network functions to represent a numerical port number.

References

  1. ^ Postel, John. Transport Control Protocol. doi:10.17487/RFC0793. RFC 793. Retrieved 1 January 2023.
  2. ^ Michelle Cotton; Lars Eggert; et al. (August 2011). Internet Assigned Numbers Authority (IANA) Procedures for the Management of the Service Name and Transport Protocol Port Number Registry. IETF. doi:10.17487/RFC6335. BCP 165. RFC 6335.
  3. ^ "Port Numbers". Internet Assigned Numbers Authority (IANA).
  4. ^ Crocker, S. (16 March 1970). Protocol Notes. doi:10.17487/RFC0036. RFC 36.
  5. ^ a b Postel, J.; Neigus, N. (22 December 1972). Socket number list. doi:10.17487/RFC0433. RFC 433.
  6. ^ Cerf, V.; Postel, J. (26 March 1972). Well Known Socket Numbers. doi:10.17487/RFC0322. RFC 322.
  7. ^ a b Postel, J. (30 May 1972). Proposed Standard Socket Numbers. doi:10.17487/RFC0349. RFC 349.
  8. ^ Shoshani, A.; Harslem, E. (14 July 1971). Initial Connection Protocol--Reviewed. doi:10.17487/RFC0197. RFC 197.
  9. ^ NIC 7104, ARPANET Protocol Handbook
  10. ^ Postel, Jon; Feinler, E. (1978). ARPANET Protocol Handbook. Menlo Park, CA: Network Information Center.

Read other articles:

Anggota Neturei Karta dalam demonstrasi menentang serangan dan kelaparan rakyat Palestina Pada 30 Juli 2006 di Alun-Alun Trafalgar, London. Antizionisme adalah tentangan terhadap Zionisme atau tentangan terhadap negara Israel. Antizionisme berbeda dengan Anti-Yahudi atau Antisemitisme, Antizionis adalah anti pembentukan dari sebuah tanah air Yahudi di dalam tanah air Palestina dan menentang kekerasan Zionis terhadap Palestina. Istilah ini digunakan untuk menggambarkan beragam sudut pandang ke...

 

International athletics championship event2008 African ChampionshipsDates30 April – 4 MayHost cityAddis Ababa, Ethiopia VenueAddis Ababa StadiumEvents44Participation543 athletes from 42 nations← 2006 Bambous 2010 Nairobi → The 16th African Championships in Athletics was held in Addis Ababa, the capital city of Ethiopia, from April 30 to May 4, 2008. The competition venue was the Addis Ababa Stadium. It is the largest Athletics event held in Ethiopia to date. It was the first tim...

 

Pour les articles homonymes, voir Lefebvre. Jean de Cheverus Jean de Cheverus par Gilbert Stuart (1823). Biographie Naissance 28 janvier 1768Mayenne (France) Ordination sacerdotale 18 décembre 1790 Décès 19 juillet 1836 (à 68 ans)Hôtel Lecomte de Latresne, Bordeaux (France) Cardinal de l'Église catholique Créécardinal 1er février 1836 par lepape Grégoire XVI Titre cardinalice Cardinal-prêtre de la Sainte-Trinité-des-Monts Évêque de l'Église catholique Ordination épiscopa...

Hungarian architect, artist and entrepreneur The native form of this personal name is Somlai-Fischer Ádám. This article uses Western name order when mentioning individuals. Ádám Somlai-Fischer, 2015 Ádám Somlai-Fischer Aleph project in Belsay Hall, UK. Aleph is constructing stories from fragments it finds around itself. Ádám (Szabolcs) Somlai-Fischer, born 1976 in Budapest, is an architect and interaction designer. He is also the Co-founder and Principal Artist of Prezi and create...

 

Type of military tactics and operational warfare RaidBritish commandos watch as an ammunition dump burns during Operation Archery, Vågsøy 27 December 1941.Battlespace Land Air Sea StrategyOperational Part of a series onWar History Prehistoric Ancient Post-classical Early modern Pike and shot napoleonic Late modern industrial fourth-gen Military Organization Command and control Defense ministry Army Navy Air force Marines Coast guard Space force Reserves Regular / Irregular Ranks Specialties...

 

Swiss cyclist Reto HollensteinHollenstein in 2015Personal informationBorn (1985-08-22) 22 August 1985 (age 38)Frauenfeld, SwitzerlandHeight1.97 m (6 ft 6 in)Weight80 kg (176 lb)Team informationDisciplineRoadRoleRiderProfessional teams2008Atlas–Romer's Hausbäckerei[1]2009–2011Vorarlberg–Corratec[1]2012Team NetApp[1]2013–2016IAM Cycling[1]2017–2019Team Katusha–Alpecin[1][2]2020–2023Israel Start-Up Natio...

هذه المقالة عن المجموعة العرقية الأتراك وليس عن من يحملون جنسية الجمهورية التركية أتراكTürkler (بالتركية) التعداد الكليالتعداد 70~83 مليون نسمةمناطق الوجود المميزةالبلد  القائمة ... تركياألمانياسورياالعراقبلغارياالولايات المتحدةفرنساالمملكة المتحدةهولنداالنمساأسترالي�...

 

Ця стаття потребує додаткових посилань на джерела для поліпшення її перевірності. Будь ласка, допоможіть удосконалити цю статтю, додавши посилання на надійні (авторитетні) джерела. Зверніться на сторінку обговорення за поясненнями та допоможіть виправити недоліки. Мат...

 

Irish poet and critic This article has multiple issues. Please help improve it or discuss these issues on the talk page. (Learn how and when to remove these template messages) This biography of a living person needs additional citations for verification. Please help by adding reliable sources. Contentious material about living persons that is unsourced or poorly sourced must be removed immediately from the article and its talk page, especially if potentially libelous.Find sources: Caitri...

سوني إريكسون إكسبيريا إكس 8معلومات عامةالنوع هاتف ذكي الصانع سوني موبايل كوميونيكيشنزعائلة المنتج Sony Xperia (en) موقع الويب sonyericsson.com… (الإنجليزية) أهم التواريختاريخ الإصدار 2010الوظائفالشاشة شاشة لمس إل سي ديالإدخال شاشة لمس، مقياس تسارع، جي بي إس مساعد، مقياس المغناطيسية، بو...

 

Lightweight antisubmarine torpedoMk 46 is also the designation of the Mk 46 Mod 0 variant of the M249 light machine gun Mark 46 torpedo A Mk 46 exercise torpedo launched from USS Moosbrugger.TypeLightweight anti-submarine torpedo[1]Place of originUnited StatesService historyIn service• Mod 0: 1963[1]• Mod 5: 1979Used bySee operatorsProduction historyDesignerNaval Ordnance Test Station Pasadena[1]Aerojet[1]Alliant TechsystemsDesigned...

 

Artikel ini sebatang kara, artinya tidak ada artikel lain yang memiliki pranala balik ke halaman ini.Bantulah menambah pranala ke artikel ini dari artikel yang berhubungan atau coba peralatan pencari pranala.Tag ini diberikan pada Februari 2023. Ayumu adalah nama Jepang. Tokoh-tokoh dengan nama Jepang ini antara lain: Pemain sepak bola Jepang Ayumu Hosoda Ayumu Kawai Ayumu Matsumoto Ayumu Nagato Ayumu Ohata Ayumu Seko Ayumu Tachibana Halaman-halaman lainnya Semua halaman dengan Ayumu Semua ha...

Обухівський краєзнавчий музей імені Юрія Домотенка 50°06′38″ пн. ш. 30°37′38″ сх. д. / 50.11081725462892678° пн. ш. 30.62733026379289214° сх. д. / 50.11081725462892678; 30.62733026379289214Координати: 50°06′38″ пн. ш. 30°37′38″ сх. д. / 50.11081725462892678° пн. ш. 30.62733026379289214°...

 

Large lake in southern Oregon, United States Upper Klamath LakeAerial view of Williamson River and Agency LakeUpper Klamath LakeLocation of Upper Klamath Lake in OregonShow map of OregonUpper Klamath LakeUpper Klamath Lake (the United States)Show map of the United StatesUpper Kalamath Lake WatershedLocationKlamath County, Oregon,United StatesCoordinates42°23′32″N 121°52′49″W / 42.39222°N 121.88028°W / 42.39222; -121.88028Lake typeHypereutrophicPrimary inflo...

 

Sosialisme internasional beralih ke halaman ini. Untuk artikel mengenai organisasi, silakan lihat Sosialis Internasional. Bagian dari seri tentangMarxisme Teori kerja Manifesto Komunis Sebuah Kontribusi untuk Kritik Politik Ekonomi Das Kapital Brumaire ke-28 Louis Napoleon Grundrisse Ideologi Jerman Ekonomi dan Filsafat Naskah 1844 Tesis Feuerbach Konsep Materialisme dialektik Penentuan ekonomi Materialisme historis Metode Marx Sosialisme Marxian Overdetermination Sosialisme ilimiah Determini...

South Korean boy band ONFONF in October 2019From L-R: Minkyun, U, E-Tion, Hyojin, Seungjun, and WyattBackground informationOriginSeoul, South KoreaGenresK-popdance[1]Years active2017–presentLabelsWMVictor[2]Members Hyojin E-Tion Seungjun[a] Wyatt Minkyun[b] U Past members Laun Websiteon7off.com ONF (Korean: 온앤오프; RR: Onaenopeu; pronounced as On and Off) is a South Korean - Japanese boy band formed and managed by WM Entertainment....

 

Jamie MetzlLahir1 Juli 1968 (umur 55)Kansas City, MissouriPendidikanUniversitas BrownUniversitas OxfordSekolah Hukum Harvard Jamie Frederic Metzl (lahir 1 Juli 1968)[1] adalah komentator geopolitik Amerika Serikat, penulis, rekan senior di Dewan Atlantik, dan mantan mitra di perusahaan investasi global Cranemere LLC,.[2][3] Ia adalah penulis dari lima buku, termasuk novel fiksi ilmiah, Genesis Code dan Eternal Sonata, dan karya non fiksi, Hacking Darwin: Genetic ...

 

此條目需要擴充。 (2008年9月16日)请協助改善这篇條目,更進一步的信息可能會在討論頁或扩充请求中找到。请在擴充條目後將此模板移除。 阿德南·门德列斯Adnan Menderes第9任土耳其總理任期1950年5月22日—1960年5月27日总统傑拉勒·拜亞爾前任塞姆斯丁·居纳尔塔伊继任傑馬勒·古爾塞勒土耳其民主党领袖任期1950年6月9日—1960年5月27日前任傑拉勒·拜亞爾继任职位废除Template:GNAT ...

Type of localized bleeding in tissues outside blood vessels For other uses, see Bruise (disambiguation). Black-and-blue redirects here. For other uses, see Black and Blue (disambiguation). Medical conditionBruiseOther namesContusion, ecchymosis[1][2]Bruise on upper leg caused by a blunt objectSpecialtyEmergency medicineTreatmentRICE (rest, ice, compression, and elevation) A bruise, also known as a contusion, is a type of hematoma of tissue,[3] the most common cause bei...

 

For the place with the same name in Dorset, see Bearwood, Dorset. This article needs additional citations for verification. Please help improve this article by adding citations to reliable sources. Unsourced material may be challenged and removed.Find sources: Bearwood, West Midlands – news · newspapers · books · scholar · JSTOR (November 2007) (Learn how and when to remove this message) Human settlement in EnglandBearwoodBearwood sign on Portland Road...