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.
In the client–server model of application architecture, multiple simultaneous communication sessions may be initiated for the same service.
[1] The well-known ports are defined by convention overseen by the Internet Assigned Numbers Authority (IANA).
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 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.
This is usually associated either with malicious cracking attempts or with network administrators looking for possible vulnerabilities to help prevent such attacks.
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 concept of port numbers was established by the early developers of the ARPANET in informal cooperation of software authors and system administrators.
[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.
[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.